diff --git a/app/Console/Commands/DisableUsersWithAccessExpired.php b/app/Console/Commands/DisableUsersWithAccessExpired.php
new file mode 100644
index 0000000000..7d16734dd3
--- /dev/null
+++ b/app/Console/Commands/DisableUsersWithAccessExpired.php
@@ -0,0 +1,47 @@
+dispatch($job);
+ return 0;
+ }
+}
diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php
index 4215f91a25..57b1ccd3e3 100644
--- a/app/Http/Controllers/Auth/ResetPasswordController.php
+++ b/app/Http/Controllers/Auth/ResetPasswordController.php
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
+use App\Services\ChangeUserPasswordService;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
@@ -33,8 +34,9 @@ class ResetPasswordController extends Controller
*
* @return void
*/
- public function __construct()
+ public function __construct(ChangeUserPasswordService $changeUserPasswordService)
{
+ $this->changeUserPasswordService = $changeUserPasswordService;
$this->middleware('guest');
}
@@ -46,7 +48,7 @@ protected function rules()
return [
'token' => 'required',
'login' => 'required',
- 'password' => 'required|confirmed|min:6',
+ 'password' => 'required|confirmed',
];
}
@@ -58,7 +60,6 @@ protected function validationErrorMessages()
return [
'password.required' => 'O campo senha é obrigatório.',
'password.confirmed' => 'As senhas não são iguais.',
- 'password.min' => 'A senha deve conter ao menos 8 caracteres.',
];
}
@@ -74,4 +75,10 @@ protected function credentials(Request $request)
'token'
);
}
+
+ protected function setUserPassword($user, $password)
+ {
+ $employee = $user->employee;
+ $this->changeUserPasswordService->execute($employee, $password);
+ }
}
diff --git a/app/Http/Controllers/PasswordController.php b/app/Http/Controllers/PasswordController.php
index 4e9d02674c..364b235b1d 100644
--- a/app/Http/Controllers/PasswordController.php
+++ b/app/Http/Controllers/PasswordController.php
@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
+use App\Services\ChangeUserPasswordService;
use App\User;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
@@ -11,6 +12,11 @@ class PasswordController extends Controller
{
use ResetsPasswords;
+ public function __construct(ChangeUserPasswordService $changeUserPasswordService)
+ {
+ $this->changeUserPasswordService = $changeUserPasswordService;
+ }
+
public function change(Request $request, User $user)
{
if ($request->isMethod('get')) {
@@ -30,10 +36,6 @@ function ($user, $password) {
);
if ($response == Password::PASSWORD_RESET) {
- $employee = $user->employee;
- $employee->force_reset_password = false;
- $employee->save();
-
return $this->sendResetResponse($request, $response);
}
@@ -44,7 +46,7 @@ protected function rules()
{
return [
'login' => 'required',
- 'password' => 'required|confirmed|min:8',
+ 'password' => 'required|confirmed',
];
}
@@ -77,4 +79,10 @@ protected function credentials(Request $request)
'token'
);
}
+
+ protected function setUserPassword($user, $password)
+ {
+ $employee = $user->employee;
+ $this->changeUserPasswordService->execute($employee, $password);
+ }
}
diff --git a/app/Http/Middleware/CheckResetPassword.php b/app/Http/Middleware/CheckResetPassword.php
index b4027117da..81c181af2c 100644
--- a/app/Http/Middleware/CheckResetPassword.php
+++ b/app/Http/Middleware/CheckResetPassword.php
@@ -2,12 +2,19 @@
namespace App\Http\Middleware;
+use App\Services\ForceUserChangePasswordService;
use Closure;
+use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class CheckResetPassword
{
+ public function __construct(ForceUserChangePasswordService $forceUserChangePasswordService)
+ {
+ $this->forceUserChangePasswordService = $forceUserChangePasswordService;
+ }
+
/**
* Handle an incoming request.
*
@@ -24,10 +31,17 @@ public function handle($request, Closure $next)
return $next($request);
}
+ $this->validateUserExpirationPassword($user);
+
if ($user->employee->force_reset_password) {
return redirect()->route('change-password');
}
return $next($request);
}
+
+ public function validateUserExpirationPassword(Authenticatable $user)
+ {
+ $this->forceUserChangePasswordService->execute($user);
+ }
}
diff --git a/app/Jobs/BatchDisableUsersWithDaysGoneSinceLastAccess.php b/app/Jobs/BatchDisableUsersWithDaysGoneSinceLastAccess.php
new file mode 100644
index 0000000000..34c51c4ec4
--- /dev/null
+++ b/app/Jobs/BatchDisableUsersWithDaysGoneSinceLastAccess.php
@@ -0,0 +1,49 @@
+databaseConnection = $databaseConnection;
+ }
+
+ public function handle(Repository $config)
+ {
+ DB::setDefaultConnection($this->databaseConnection);
+ $expirationPeriod = $config->get('legacy.app.user_accounts.max_days_without_login_to_disable_user');
+
+ if (empty($expirationPeriod) === false) {
+ $this->disableUsersWithDaysGoneSinceLastAccess($expirationPeriod);
+ }
+ }
+
+ private function disableUsersWithDaysGoneSinceLastAccess($expirationPeriod): void
+ {
+ $users = (new User())->getActiveUsersNotAdmin();
+
+ foreach ($users as $user) {
+ $disableUsersWithDaysGoneSinceLastAccessService = app(DisableUsersWithDaysGoneSinceLastAccessService::class);
+ $disableUsersWithDaysGoneSinceLastAccessService->execute($user);
+ }
+ }
+}
diff --git a/app/Listeners/AuthenticatedUser.php b/app/Listeners/AuthenticatedUser.php
index aa25e5e8ce..b1a2a7225c 100644
--- a/app/Listeners/AuthenticatedUser.php
+++ b/app/Listeners/AuthenticatedUser.php
@@ -2,12 +2,21 @@
namespace App\Listeners;
+use App\Services\DisableUsersWithDaysGoneSinceLastAccessService;
use Illuminate\Auth\Events\Authenticated;
+use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\ValidationException;
class AuthenticatedUser
{
+ private $disableUsersWithDaysGoneSinceLastAccessService;
+
+ public function __construct(DisableUsersWithDaysGoneSinceLastAccessService $disableUsersWithDaysGoneSinceLastAccessService)
+ {
+ $this->disableUsersWithDaysGoneSinceLastAccessService = $disableUsersWithDaysGoneSinceLastAccessService;
+ }
+
/**
* Handle the event.
*
@@ -25,12 +34,19 @@ public function handle(Authenticated $event)
]);
}
+ $this->validateUserExpirationPeriod($event->user);
+
if ($event->user->isExpired()) {
Auth::logout();
throw ValidationException::withMessages([
- $event->user->login => __('auth.inactive')
+ $event->user->login => __('auth.expired')
]);
}
}
+
+ public function validateUserExpirationPeriod(Authenticatable $user)
+ {
+ $this->disableUsersWithDaysGoneSinceLastAccessService->execute($user);
+ }
}
diff --git a/app/Models/Exporter/Student.php b/app/Models/Exporter/Student.php
index 2692e6af46..daffbdd12f 100644
--- a/app/Models/Exporter/Student.php
+++ b/app/Models/Exporter/Student.php
@@ -67,6 +67,7 @@ public function getExportedColumnsByGroup()
'grade' => 'Série',
'course' => 'Curso',
'registration_date' => 'Data da Matrícula',
+ 'registration_out' => 'Data de saída da matrícula',
'year' => 'Ano',
'status_text' => 'Situação da Matrícula',
'period' => 'Turno',
diff --git a/app/Models/LegacyAccess.php b/app/Models/LegacyAccess.php
new file mode 100644
index 0000000000..cae03cef8a
--- /dev/null
+++ b/app/Models/LegacyAccess.php
@@ -0,0 +1,32 @@
+query()
+ ->orderBy('data_hora', 'DESC')
+ ->first();
+ }
+}
diff --git a/app/Models/LegacyEmployee.php b/app/Models/LegacyEmployee.php
index 1ad7f27756..71d60353c3 100644
--- a/app/Models/LegacyEmployee.php
+++ b/app/Models/LegacyEmployee.php
@@ -2,6 +2,7 @@
namespace App\Models;
+use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
@@ -39,6 +40,8 @@ class LegacyEmployee extends Model
'email',
];
+ protected $dates = ['data_reativa_conta', 'data_troca_senha'];
+
/**
* @return string
*/
@@ -106,4 +109,14 @@ public function getActiveAttribute()
{
return boolval($this->ativo);
}
+
+ public function getEnabledUserDate(): ?Carbon
+ {
+ return $this->data_reativa_conta;
+ }
+
+ public function getPasswordUpdatedDate(): ?Carbon
+ {
+ return $this->data_troca_senha;
+ }
}
diff --git a/app/Services/ChangeUserPasswordService.php b/app/Services/ChangeUserPasswordService.php
new file mode 100644
index 0000000000..1a6d22b062
--- /dev/null
+++ b/app/Services/ChangeUserPasswordService.php
@@ -0,0 +1,35 @@
+validateUserPasswordService = $validateUserPasswordService;
+ $this->hash = $hash;
+ $this->carbon = $carbon;
+ }
+
+ public function execute(LegacyEmployee $legacyEmployee, string $password)
+ {
+ $this->validate($password, $legacyEmployee->getPasswordAttribute());
+ $legacyEmployee->setPasswordAttribute($this->hash->make($password));
+ $legacyEmployee->force_reset_password = false;
+ $legacyEmployee->data_troca_senha = $this->carbon->nowWithSameTz();
+ $legacyEmployee->save();
+ }
+
+ public function validate(string $newPassword, string $oldPassword)
+ {
+ $this->validateUserPasswordService->execute($newPassword, $oldPassword);
+ }
+}
diff --git a/app/Services/DisableUsersWithDaysGoneSinceLastAccessService.php b/app/Services/DisableUsersWithDaysGoneSinceLastAccessService.php
new file mode 100644
index 0000000000..e38775d0d1
--- /dev/null
+++ b/app/Services/DisableUsersWithDaysGoneSinceLastAccessService.php
@@ -0,0 +1,27 @@
+config = $config;
+ }
+ public function execute(Authenticatable $user){
+ $expirationPeriod = $this->config->get('legacy.app.user_accounts.max_days_without_login_to_disable_user');
+
+ if (empty($expirationPeriod) === false && $user->isAdmin() === false) {
+ $daysGone = $user->getDaysSinceLastAccessOrEnabledUserDate();
+ if ($daysGone >= $expirationPeriod) {
+ $user->disable();
+ }
+ }
+ }
+}
diff --git a/app/Services/Educacenso/ImportServiceFactory.php b/app/Services/Educacenso/ImportServiceFactory.php
index c3db6b5c4b..d9517faff0 100644
--- a/app/Services/Educacenso/ImportServiceFactory.php
+++ b/app/Services/Educacenso/ImportServiceFactory.php
@@ -5,6 +5,7 @@
use App\Exceptions\Educacenso\NotImplementedYear;
use App\Services\Educacenso\Version2019\ImportService as ImportService2019;
use App\Services\Educacenso\Version2020\ImportService as ImportService2020;
+use App\Services\Educacenso\Version2021\ImportService as ImportService2021;
use DateTime;
class ImportServiceFactory
@@ -40,6 +41,7 @@ private static function getClassByYear($year)
$imports = [
2019 => ImportService2019::class,
2020 => ImportService2020::class,
+ 2021 => ImportService2021::class,
];
if (isset($imports[$year])) {
diff --git a/app/Services/Educacenso/Version2021/ImportService.php b/app/Services/Educacenso/Version2021/ImportService.php
new file mode 100644
index 0000000000..ffc471a46b
--- /dev/null
+++ b/app/Services/Educacenso/Version2021/ImportService.php
@@ -0,0 +1,20 @@
+config = $config;
+ }
+
+ public function execute(Authenticatable $user)
+ {
+ $expirationPeriod = $this->config->get('legacy.app.user_accounts.default_password_expiration_period');
+
+ if (empty($expirationPeriod)) {
+ return;
+ }
+
+ if ($user->isAdmin()) {
+ return;
+ }
+
+ $daysGone = $user->getDaysSinceLastPasswordUpdated();
+
+ if ($daysGone >= $expirationPeriod) {
+ $user->employee->force_reset_password = true;
+ $user->employee->save();
+ }
+ }
+}
diff --git a/app/Services/ValidateUserPasswordService.php b/app/Services/ValidateUserPasswordService.php
new file mode 100644
index 0000000000..552e25dca4
--- /dev/null
+++ b/app/Services/ValidateUserPasswordService.php
@@ -0,0 +1,58 @@
+hash = $hash;
+ }
+
+ public function execute(string $newPassword, string $oldPassword = null)
+ {
+ try {
+ $this->validate($newPassword, $oldPassword);
+ } catch (ValidationException $ex){
+ throw ValidationException::withMessages([
+ 'password' => [
+ 'A senha deve conter pelo menos ' .
+ self::MIN_LENGTH_PASSWORD .
+ ' caracteres e uma combinação de letras maiúsculas e minúsculas, números e símbolos (!@#$%*).'
+ ]
+ ]);
+ } catch (\Exception $ex){
+ throw ValidationException::withMessages([
+ 'password' => $ex->getMessage()
+ ]);
+ }
+ }
+
+ public function validate(string $newPassword, $oldPassword = null)
+ {
+ if ($this->hash->check($newPassword, $oldPassword)){
+ throw new \Exception('A senha informada foi usada recentemente. Por favor, escolha outra.');
+ }
+
+ validator(
+ ['password' => $newPassword],
+ [
+ 'password' => [
+ Password::min(self::MIN_LENGTH_PASSWORD)
+ ->mixedCase()
+ ->letters()
+ ->numbers()
+ ->symbols()
+ ]
+ ]
+ )->validate();
+ }
+}
diff --git a/app/User.php b/app/User.php
index efacb1440e..70947a772e 100644
--- a/app/User.php
+++ b/app/User.php
@@ -2,14 +2,18 @@
namespace App;
+use App\Models\LegacyAccess;
use App\Models\LegacyEmployee;
use App\Models\LegacyPerson;
use App\Models\LegacyUserType;
use App\Models\School;
+use App\Services\DisableUsersWithDaysGoneSinceLastAccessService;
+use Illuminate\Contracts\Config\Repository;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
+use Illuminate\Support\Carbon;
/**
* @property int $id
@@ -230,6 +234,14 @@ public function employee()
return $this->belongsTo(LegacyEmployee::class, 'cod_usuario', 'ref_cod_pessoa_fj');
}
+ /**
+ * @return BelongsTo
+ */
+ public function access()
+ {
+ return $this->belongsTo(LegacyAccess::class, 'cod_usuario', 'cod_pessoa');
+ }
+
/**
* @return BelongsToMany
*/
@@ -269,4 +281,84 @@ public function schools()
'cod_escola'
);
}
+
+ public function getCreatedAtCustom(): ?Carbon
+ {
+ return Carbon::createFromTimestamp((new \DateTime($this->getCreatedAtAttribute()))->getTimestamp());
+ }
+
+ public function getEnabledUserDate(): ?Carbon
+ {
+ if ($this->employee) {
+ return $this->employee->getEnabledUserDate();
+ }
+ return null;
+ }
+ public function getPasswordUpdatedDate(): ?Carbon
+ {
+ if ($this->employee) {
+ return $this->employee->getPasswordUpdatedDate();
+ }
+ return null;
+ }
+
+ public function getLastAccessDate(): Carbon
+ {
+ $legacyAccess = $this->access()
+ ->orderBy('data_hora', 'DESC')
+ ->first();
+
+ if (!$legacyAccess) {
+ return $this->getCreatedAtCustom() ?? Carbon::now();
+ }
+
+ return $legacyAccess->data_hora;
+ }
+
+ public function getDaysSinceLastAccessOrEnabledUserDate(): int
+ {
+ $daysGone = 0;
+ $lastAccessDate = $this->getLastAccessDate();
+
+ if ($this->getEnabledUserDate() &&
+ $this->getEnabledUserDate()->gt($lastAccessDate)) {
+ $lastAccessDate = $this->getEnabledUserDate();
+ }
+
+ $currentDate = Carbon::now();
+ if ($currentDate->gt($lastAccessDate)){
+ $daysGone = $currentDate->diffInDays($lastAccessDate);
+ }
+ return $daysGone;
+ }
+
+ public function getDaysSinceLastPasswordUpdated(): int
+ {
+ $daysGone = 0;
+ $lastPasswordUpdatedDate = $this->getPasswordUpdatedDate();
+
+ $currentDate = Carbon::now();
+ if ($currentDate->gt($lastPasswordUpdatedDate)){
+ $daysGone = $currentDate->diffInDays($lastPasswordUpdatedDate);
+ }
+ return $daysGone;
+ }
+
+ public function getActiveUsersNotAdmin()
+ {
+ return $this->query()
+ ->join('portal.funcionario', 'usuario.cod_usuario', '=', 'funcionario.ref_cod_pessoa_fj')
+ ->where('funcionario.ativo', 1)
+ ->where('ref_cod_tipo_usuario', '<>', LegacyUserType::LEVEL_ADMIN)
+ ->get();
+ }
+
+ public function disable()
+ {
+ $this->employee->data_expiracao = now();
+ $this->employee->ativo = 0;
+ $this->employee->save();
+ $this->ativo = 0;
+ $this->save();
+ }
}
diff --git a/composer.json b/composer.json
index 0751006560..cd999370bf 100644
--- a/composer.json
+++ b/composer.json
@@ -3,7 +3,7 @@
"description": "Software livre de gestão escolar",
"type": "project",
"license": "GPL-2.0-or-later",
- "version": "2.6.2",
+ "version": "2.6.3",
"keywords": [
"Portabilis",
"i-Educar"
diff --git a/composer.lock b/composer.lock
index 70f25381de..f1df8ed236 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "736818665d88c53ce757d8313001e048",
+ "content-hash": "c3070592bf4a0c3373633db08bdb53a4",
"packages": [
{
"name": "asm89/stack-cors",
@@ -64,16 +64,16 @@
},
{
"name": "aws/aws-sdk-php",
- "version": "3.185.17",
+ "version": "3.186.3",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
- "reference": "3f639e8a6fff677f788700940a68dc138ea5da71"
+ "reference": "037fd80e421b1dde4d32ec16d0f79c61bbee1605"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3f639e8a6fff677f788700940a68dc138ea5da71",
- "reference": "3f639e8a6fff677f788700940a68dc138ea5da71",
+ "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/037fd80e421b1dde4d32ec16d0f79c61bbee1605",
+ "reference": "037fd80e421b1dde4d32ec16d0f79c61bbee1605",
"shasum": ""
},
"require": {
@@ -148,9 +148,9 @@
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
- "source": "https://github.com/aws/aws-sdk-php/tree/3.185.17"
+ "source": "https://github.com/aws/aws-sdk-php/tree/3.186.3"
},
- "time": "2021-07-20T18:19:09+00:00"
+ "time": "2021-07-30T18:30:36+00:00"
},
{
"name": "aws/aws-sdk-php-laravel",
@@ -457,6 +457,81 @@
},
"time": "2021-03-17T21:49:00+00:00"
},
+ {
+ "name": "dflydev/dot-access-data",
+ "version": "v3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/dflydev/dflydev-dot-access-data.git",
+ "reference": "e04ff030d24a33edc2421bef305e32919dd78fc3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/e04ff030d24a33edc2421bef305e32919dd78fc3",
+ "reference": "e04ff030d24a33edc2421bef305e32919dd78fc3",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.42",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
+ "scrutinizer/ocular": "1.6.0",
+ "squizlabs/php_codesniffer": "^3.5",
+ "vimeo/psalm": "^3.14"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Dflydev\\DotAccessData\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Dragonfly Development Inc.",
+ "email": "info@dflydev.com",
+ "homepage": "http://dflydev.com"
+ },
+ {
+ "name": "Beau Simensen",
+ "email": "beau@dflydev.com",
+ "homepage": "http://beausimensen.com"
+ },
+ {
+ "name": "Carlos Frutos",
+ "email": "carlos@kiwing.it",
+ "homepage": "https://github.com/cfrutos"
+ },
+ {
+ "name": "Colin O'Dell",
+ "email": "colinodell@gmail.com",
+ "homepage": "https://www.colinodell.com"
+ }
+ ],
+ "description": "Given a deep data structure, access data by dot notation.",
+ "homepage": "https://github.com/dflydev/dflydev-dot-access-data",
+ "keywords": [
+ "access",
+ "data",
+ "dot",
+ "notation"
+ ],
+ "support": {
+ "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues",
+ "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.0"
+ },
+ "time": "2021-01-01T22:08:42+00:00"
+ },
{
"name": "doctrine/cache",
"version": "2.1.1",
@@ -1788,16 +1863,16 @@
},
{
"name": "intervention/image",
- "version": "2.6.0",
+ "version": "2.6.1",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
- "reference": "a2d7238069bb01322f9c2a661449955434fec9c6"
+ "reference": "0925f10b259679b5d8ca58f3a2add9255ffcda45"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Intervention/image/zipball/a2d7238069bb01322f9c2a661449955434fec9c6",
- "reference": "a2d7238069bb01322f9c2a661449955434fec9c6",
+ "url": "https://api.github.com/repos/Intervention/image/zipball/0925f10b259679b5d8ca58f3a2add9255ffcda45",
+ "reference": "0925f10b259679b5d8ca58f3a2add9255ffcda45",
"shasum": ""
},
"require": {
@@ -1856,7 +1931,7 @@
],
"support": {
"issues": "https://github.com/Intervention/image/issues",
- "source": "https://github.com/Intervention/image/tree/2.6.0"
+ "source": "https://github.com/Intervention/image/tree/2.6.1"
},
"funding": [
{
@@ -1868,20 +1943,20 @@
"type": "github"
}
],
- "time": "2021-07-06T13:35:54+00:00"
+ "time": "2021-07-22T14:31:53+00:00"
},
{
"name": "laravel/framework",
- "version": "v8.51.0",
+ "version": "v8.52.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "208d9c0043b4c192a9bb9b15782cc4ec37f28bb0"
+ "reference": "8fe9877d52e25f8aed36c51734e5a8510be967e6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/208d9c0043b4c192a9bb9b15782cc4ec37f28bb0",
- "reference": "208d9c0043b4c192a9bb9b15782cc4ec37f28bb0",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/8fe9877d52e25f8aed36c51734e5a8510be967e6",
+ "reference": "8fe9877d52e25f8aed36c51734e5a8510be967e6",
"shasum": ""
},
"require": {
@@ -2036,7 +2111,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-07-20T14:38:36+00:00"
+ "time": "2021-07-27T13:03:29+00:00"
},
{
"name": "laravel/horizon",
@@ -2299,42 +2374,51 @@
},
{
"name": "league/commonmark",
- "version": "1.6.6",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
- "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf"
+ "reference": "0d57f20aa03129ee7ef5f690e634884315d4238c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c4228d11e30d7493c6836d20872f9582d8ba6dcf",
- "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf",
+ "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/0d57f20aa03129ee7ef5f690e634884315d4238c",
+ "reference": "0d57f20aa03129ee7ef5f690e634884315d4238c",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
- "php": "^7.1 || ^8.0"
- },
- "conflict": {
- "scrutinizer/ocular": "1.7.*"
+ "league/config": "^1.1",
+ "php": "^7.4 || ^8.0",
+ "psr/event-dispatcher": "^1.0",
+ "symfony/polyfill-php80": "^1.15"
},
"require-dev": {
- "cebe/markdown": "~1.0",
- "commonmark/commonmark.js": "0.29.2",
- "erusev/parsedown": "~1.0",
+ "cebe/markdown": "^1.0",
+ "commonmark/cmark": "0.30.0",
+ "commonmark/commonmark.js": "0.30.0",
+ "composer/package-versions-deprecated": "^1.8",
+ "erusev/parsedown": "^1.0",
"ext-json": "*",
"github/gfm": "0.29.0",
- "michelf/php-markdown": "~1.4",
- "mikehaertl/php-shellcommand": "^1.4",
- "phpstan/phpstan": "^0.12.90",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2",
- "scrutinizer/ocular": "^1.5",
- "symfony/finder": "^4.2"
+ "michelf/php-markdown": "^1.4",
+ "phpstan/phpstan": "^0.12.88",
+ "phpunit/phpunit": "^9.5.5",
+ "scrutinizer/ocular": "^1.8.1",
+ "symfony/finder": "^5.3",
+ "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0",
+ "unleashedtech/php-coding-standard": "^3.1",
+ "vimeo/psalm": "^4.7.3"
+ },
+ "suggest": {
+ "symfony/yaml": "v2.3+ required if using the Front Matter extension"
},
- "bin": [
- "bin/commonmark"
- ],
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "2.1-dev"
+ }
+ },
"autoload": {
"psr-4": {
"League\\CommonMark\\": "src"
@@ -2352,7 +2436,7 @@
"role": "Lead Developer"
}
],
- "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)",
+ "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)",
"homepage": "https://commonmark.thephpleague.com",
"keywords": [
"commonmark",
@@ -2366,6 +2450,7 @@
],
"support": {
"docs": "https://commonmark.thephpleague.com/",
+ "forum": "https://github.com/thephpleague/commonmark/discussions",
"issues": "https://github.com/thephpleague/commonmark/issues",
"rss": "https://github.com/thephpleague/commonmark/releases.atom",
"source": "https://github.com/thephpleague/commonmark"
@@ -2396,7 +2481,89 @@
"type": "tidelift"
}
],
- "time": "2021-07-17T17:13:23+00:00"
+ "time": "2021-07-31T19:15:22+00:00"
+ },
+ {
+ "name": "league/config",
+ "version": "v1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/config.git",
+ "reference": "20d42d88f12a76ff862e17af4f14a5a4bbfd0925"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/config/zipball/20d42d88f12a76ff862e17af4f14a5a4bbfd0925",
+ "reference": "20d42d88f12a76ff862e17af4f14a5a4bbfd0925",
+ "shasum": ""
+ },
+ "require": {
+ "dflydev/dot-access-data": "^3.0",
+ "nette/schema": "^1.2",
+ "php": "^7.4 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.90",
+ "phpunit/phpunit": "^9.5.5",
+ "scrutinizer/ocular": "^1.8.1",
+ "unleashedtech/php-coding-standard": "^3.1",
+ "vimeo/psalm": "^4.7.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.2-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "League\\Config\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Colin O'Dell",
+ "email": "colinodell@gmail.com",
+ "homepage": "https://www.colinodell.com",
+ "role": "Lead Developer"
+ }
+ ],
+ "description": "Define configuration arrays with strict schemas and access values with dot notation",
+ "homepage": "https://config.thephpleague.com",
+ "keywords": [
+ "array",
+ "config",
+ "configuration",
+ "dot",
+ "dot-access",
+ "nested",
+ "schema"
+ ],
+ "support": {
+ "docs": "https://config.thephpleague.com/",
+ "issues": "https://github.com/thephpleague/config/issues",
+ "rss": "https://github.com/thephpleague/config/releases.atom",
+ "source": "https://github.com/thephpleague/config"
+ },
+ "funding": [
+ {
+ "url": "https://www.colinodell.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.paypal.me/colinpodell/10.00",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/colinodell",
+ "type": "github"
+ }
+ ],
+ "time": "2021-06-19T15:52:37+00:00"
},
{
"name": "league/csv",
@@ -3154,16 +3321,16 @@
},
{
"name": "monolog/monolog",
- "version": "2.3.1",
+ "version": "2.3.2",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "9738e495f288eec0b187e310b7cdbbb285777dbe"
+ "reference": "71312564759a7db5b789296369c1a264efc43aad"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9738e495f288eec0b187e310b7cdbbb285777dbe",
- "reference": "9738e495f288eec0b187e310b7cdbbb285777dbe",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/71312564759a7db5b789296369c1a264efc43aad",
+ "reference": "71312564759a7db5b789296369c1a264efc43aad",
"shasum": ""
},
"require": {
@@ -3234,7 +3401,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
- "source": "https://github.com/Seldaek/monolog/tree/2.3.1"
+ "source": "https://github.com/Seldaek/monolog/tree/2.3.2"
},
"funding": [
{
@@ -3246,7 +3413,7 @@
"type": "tidelift"
}
],
- "time": "2021-07-14T11:56:39+00:00"
+ "time": "2021-07-23T07:42:52+00:00"
},
{
"name": "mtdowling/jmespath.php",
@@ -3371,22 +3538,23 @@
},
{
"name": "nesbot/carbon",
- "version": "2.50.0",
+ "version": "2.51.1",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
- "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb"
+ "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f47f17d17602b2243414a44ad53d9f8b9ada5fdb",
- "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb",
+ "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922",
+ "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^7.1.8 || ^8.0",
"symfony/polyfill-mbstring": "^1.0",
+ "symfony/polyfill-php80": "^1.16",
"symfony/translation": "^3.4 || ^4.0 || ^5.0"
},
"require-dev": {
@@ -3405,8 +3573,8 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.x-dev",
- "dev-3.x": "3.x-dev"
+ "dev-3.x": "3.x-dev",
+ "dev-master": "2.x-dev"
},
"laravel": {
"providers": [
@@ -3460,7 +3628,154 @@
"type": "tidelift"
}
],
- "time": "2021-06-28T22:38:45+00:00"
+ "time": "2021-07-28T13:16:28+00:00"
+ },
+ {
+ "name": "nette/schema",
+ "version": "v1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nette/schema.git",
+ "reference": "f5ed39fc96358f922cedfd1e516f0dadf5d2be0d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nette/schema/zipball/f5ed39fc96358f922cedfd1e516f0dadf5d2be0d",
+ "reference": "f5ed39fc96358f922cedfd1e516f0dadf5d2be0d",
+ "shasum": ""
+ },
+ "require": {
+ "nette/utils": "^3.1.4 || ^4.0",
+ "php": ">=7.1 <8.1"
+ },
+ "require-dev": {
+ "nette/tester": "^2.3 || ^2.4",
+ "phpstan/phpstan-nette": "^0.12",
+ "tracy/tracy": "^2.7"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.2-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause",
+ "GPL-2.0-only",
+ "GPL-3.0-only"
+ ],
+ "authors": [
+ {
+ "name": "David Grudl",
+ "homepage": "https://davidgrudl.com"
+ },
+ {
+ "name": "Nette Community",
+ "homepage": "https://nette.org/contributors"
+ }
+ ],
+ "description": "📐 Nette Schema: validating data structures against a given Schema.",
+ "homepage": "https://nette.org",
+ "keywords": [
+ "config",
+ "nette"
+ ],
+ "support": {
+ "issues": "https://github.com/nette/schema/issues",
+ "source": "https://github.com/nette/schema/tree/v1.2.1"
+ },
+ "time": "2021-03-04T17:51:11+00:00"
+ },
+ {
+ "name": "nette/utils",
+ "version": "v3.2.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nette/utils.git",
+ "reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nette/utils/zipball/967cfc4f9a1acd5f1058d76715a424c53343c20c",
+ "reference": "967cfc4f9a1acd5f1058d76715a424c53343c20c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2 <8.1"
+ },
+ "conflict": {
+ "nette/di": "<3.0.6"
+ },
+ "require-dev": {
+ "nette/tester": "~2.0",
+ "phpstan/phpstan": "^0.12",
+ "tracy/tracy": "^2.3"
+ },
+ "suggest": {
+ "ext-gd": "to use Image",
+ "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
+ "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
+ "ext-json": "to use Nette\\Utils\\Json",
+ "ext-mbstring": "to use Strings::lower() etc...",
+ "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()",
+ "ext-xml": "to use Strings::length() etc. when mbstring is not available"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause",
+ "GPL-2.0-only",
+ "GPL-3.0-only"
+ ],
+ "authors": [
+ {
+ "name": "David Grudl",
+ "homepage": "https://davidgrudl.com"
+ },
+ {
+ "name": "Nette Community",
+ "homepage": "https://nette.org/contributors"
+ }
+ ],
+ "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
+ "homepage": "https://nette.org",
+ "keywords": [
+ "array",
+ "core",
+ "datetime",
+ "images",
+ "json",
+ "nette",
+ "paginator",
+ "password",
+ "slugify",
+ "string",
+ "unicode",
+ "utf-8",
+ "utility",
+ "validation"
+ ],
+ "support": {
+ "issues": "https://github.com/nette/utils/issues",
+ "source": "https://github.com/nette/utils/tree/v3.2.2"
+ },
+ "time": "2021-03-03T22:53:25+00:00"
},
{
"name": "nikic/php-parser",
@@ -4577,16 +4892,16 @@
},
{
"name": "ramsey/collection",
- "version": "1.1.3",
+ "version": "1.1.4",
"source": {
"type": "git",
"url": "https://github.com/ramsey/collection.git",
- "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1"
+ "reference": "ab2237657ad99667a5143e32ba2683c8029563d4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ramsey/collection/zipball/28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1",
- "reference": "28a5c4ab2f5111db6a60b2b4ec84057e0f43b9c1",
+ "url": "https://api.github.com/repos/ramsey/collection/zipball/ab2237657ad99667a5143e32ba2683c8029563d4",
+ "reference": "ab2237657ad99667a5143e32ba2683c8029563d4",
"shasum": ""
},
"require": {
@@ -4638,7 +4953,7 @@
],
"support": {
"issues": "https://github.com/ramsey/collection/issues",
- "source": "https://github.com/ramsey/collection/tree/1.1.3"
+ "source": "https://github.com/ramsey/collection/tree/1.1.4"
},
"funding": [
{
@@ -4650,7 +4965,7 @@
"type": "tidelift"
}
],
- "time": "2021-01-21T17:40:04+00:00"
+ "time": "2021-07-30T00:58:27+00:00"
},
{
"name": "ramsey/uuid",
@@ -4936,16 +5251,16 @@
},
{
"name": "symfony/console",
- "version": "v5.3.2",
+ "version": "v5.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1"
+ "reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/649730483885ff2ca99ca0560ef0e5f6b03f2ac1",
- "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1",
+ "url": "https://api.github.com/repos/symfony/console/zipball/51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
+ "reference": "51b71afd6d2dc8f5063199357b9880cea8d8bfe2",
"shasum": ""
},
"require": {
@@ -4953,11 +5268,12 @@
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
- "symfony/polyfill-php80": "^1.15",
+ "symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2",
"symfony/string": "^5.1"
},
"conflict": {
+ "psr/log": ">=3",
"symfony/dependency-injection": "<4.4",
"symfony/dotenv": "<5.1",
"symfony/event-dispatcher": "<4.4",
@@ -4965,10 +5281,10 @@
"symfony/process": "<4.4"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/event-dispatcher": "^4.4|^5.0",
@@ -5014,7 +5330,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v5.3.2"
+ "source": "https://github.com/symfony/console/tree/v5.3.6"
},
"funding": [
{
@@ -5030,24 +5346,25 @@
"type": "tidelift"
}
],
- "time": "2021-06-12T09:42:48+00:00"
+ "time": "2021-07-27T19:10:22+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v5.3.0",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "fcd0b29a7a0b1bb5bfbedc6231583d77fea04814"
+ "reference": "7fb120adc7f600a59027775b224c13a33530dd90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/fcd0b29a7a0b1bb5bfbedc6231583d77fea04814",
- "reference": "fcd0b29a7a0b1bb5bfbedc6231583d77fea04814",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/7fb120adc7f600a59027775b224c13a33530dd90",
+ "reference": "7fb120adc7f600a59027775b224c13a33530dd90",
"shasum": ""
},
"require": {
- "php": ">=7.2.5"
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -5079,7 +5396,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/css-selector/tree/v5.3.0"
+ "source": "https://github.com/symfony/css-selector/tree/v5.3.4"
},
"funding": [
{
@@ -5095,7 +5412,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:40:38+00:00"
+ "time": "2021-07-21T12:38:00+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -5166,22 +5483,21 @@
},
{
"name": "symfony/error-handler",
- "version": "v5.3.3",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
- "reference": "43323e79c80719e8a4674e33484bca98270d223f"
+ "reference": "281f6c4660bcf5844bb0346fe3a4664722fe4c73"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/error-handler/zipball/43323e79c80719e8a4674e33484bca98270d223f",
- "reference": "43323e79c80719e8a4674e33484bca98270d223f",
+ "url": "https://api.github.com/repos/symfony/error-handler/zipball/281f6c4660bcf5844bb0346fe3a4664722fe4c73",
+ "reference": "281f6c4660bcf5844bb0346fe3a4664722fe4c73",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
- "psr/log": "^1.0",
- "symfony/polyfill-php80": "^1.15",
+ "psr/log": "^1|^2|^3",
"symfony/var-dumper": "^4.4|^5.0"
},
"require-dev": {
@@ -5215,7 +5531,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/error-handler/tree/v5.3.3"
+ "source": "https://github.com/symfony/error-handler/tree/v5.3.4"
},
"funding": [
{
@@ -5231,27 +5547,27 @@
"type": "tidelift"
}
],
- "time": "2021-06-24T08:13:00+00:00"
+ "time": "2021-07-23T15:55:36+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v5.3.0",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce"
+ "reference": "f2fd2208157553874560f3645d4594303058c4bd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67a5f354afa8e2f231081b3fa11a5912f933c3ce",
- "reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f2fd2208157553874560f3645d4594303058c4bd",
+ "reference": "f2fd2208157553874560f3645d4594303058c4bd",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/event-dispatcher-contracts": "^2",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/dependency-injection": "<4.4"
@@ -5261,7 +5577,7 @@
"symfony/event-dispatcher-implementation": "2.0"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/error-handler": "^4.4|^5.0",
@@ -5300,7 +5616,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.0"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.4"
},
"funding": [
{
@@ -5316,7 +5632,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:43:10+00:00"
+ "time": "2021-07-23T15:55:36+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -5399,20 +5715,21 @@
},
{
"name": "symfony/finder",
- "version": "v5.3.0",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6"
+ "reference": "17f50e06018baec41551a71a15731287dbaab186"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6",
- "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/17f50e06018baec41551a71a15731287dbaab186",
+ "reference": "17f50e06018baec41551a71a15731287dbaab186",
"shasum": ""
},
"require": {
- "php": ">=7.2.5"
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -5440,7 +5757,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v5.3.0"
+ "source": "https://github.com/symfony/finder/tree/v5.3.4"
},
"funding": [
{
@@ -5456,7 +5773,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T12:52:38+00:00"
+ "time": "2021-07-23T15:54:19+00:00"
},
{
"name": "symfony/http-client-contracts",
@@ -5538,23 +5855,23 @@
},
{
"name": "symfony/http-foundation",
- "version": "v5.3.3",
+ "version": "v5.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "0e45ab1574caa0460d9190871a8ce47539e40ccf"
+ "reference": "a8388f7b7054a7401997008ce9cd8c6b0ab7ac75"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0e45ab1574caa0460d9190871a8ce47539e40ccf",
- "reference": "0e45ab1574caa0460d9190871a8ce47539e40ccf",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a8388f7b7054a7401997008ce9cd8c6b0ab7ac75",
+ "reference": "a8388f7b7054a7401997008ce9cd8c6b0ab7ac75",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.1",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"predis/predis": "~1.0",
@@ -5591,7 +5908,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-foundation/tree/v5.3.3"
+ "source": "https://github.com/symfony/http-foundation/tree/v5.3.6"
},
"funding": [
{
@@ -5607,25 +5924,25 @@
"type": "tidelift"
}
],
- "time": "2021-06-27T09:19:40+00:00"
+ "time": "2021-07-27T17:08:17+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v5.3.3",
+ "version": "v5.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8"
+ "reference": "60030f209018356b3b553b9dbd84ad2071c1b7e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8",
- "reference": "90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/60030f209018356b3b553b9dbd84ad2071c1b7e0",
+ "reference": "60030f209018356b3b553b9dbd84ad2071c1b7e0",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
- "psr/log": "~1.0",
+ "psr/log": "^1|^2",
"symfony/deprecation-contracts": "^2.1",
"symfony/error-handler": "^4.4|^5.0",
"symfony/event-dispatcher": "^5.0",
@@ -5633,7 +5950,7 @@
"symfony/http-foundation": "^5.3",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-php73": "^1.9",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/browser-kit": "<4.4",
@@ -5652,7 +5969,7 @@
"twig/twig": "<2.13"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
"psr/cache": "^1.0|^2.0|^3.0",
@@ -5703,7 +6020,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/http-kernel/tree/v5.3.3"
+ "source": "https://github.com/symfony/http-kernel/tree/v5.3.6"
},
"funding": [
{
@@ -5719,20 +6036,20 @@
"type": "tidelift"
}
],
- "time": "2021-06-30T08:27:49+00:00"
+ "time": "2021-07-29T07:06:27+00:00"
},
{
"name": "symfony/mime",
- "version": "v5.3.2",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/mime.git",
- "reference": "47dd7912152b82d0d4c8d9040dbc93d6232d472a"
+ "reference": "633e4e8afe9e529e5599d71238849a4218dd497b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/mime/zipball/47dd7912152b82d0d4c8d9040dbc93d6232d472a",
- "reference": "47dd7912152b82d0d4c8d9040dbc93d6232d472a",
+ "url": "https://api.github.com/repos/symfony/mime/zipball/633e4e8afe9e529e5599d71238849a4218dd497b",
+ "reference": "633e4e8afe9e529e5599d71238849a4218dd497b",
"shasum": ""
},
"require": {
@@ -5740,7 +6057,7 @@
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"egulias/email-validator": "~3.0.0",
@@ -5786,7 +6103,7 @@
"mime-type"
],
"support": {
- "source": "https://github.com/symfony/mime/tree/v5.3.2"
+ "source": "https://github.com/symfony/mime/tree/v5.3.4"
},
"funding": [
{
@@ -5802,7 +6119,7 @@
"type": "tidelift"
}
],
- "time": "2021-06-09T10:58:01+00:00"
+ "time": "2021-07-21T12:40:44+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -5965,16 +6282,16 @@
},
{
"name": "symfony/polyfill-intl-grapheme",
- "version": "v1.23.0",
+ "version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab"
+ "reference": "16880ba9c5ebe3642d1995ab866db29270b36535"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab",
- "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
+ "reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": ""
},
"require": {
@@ -6026,7 +6343,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.1"
},
"funding": [
{
@@ -6042,7 +6359,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-27T09:17:38+00:00"
+ "time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
@@ -6217,16 +6534,16 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.23.0",
+ "version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
+ "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
- "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
+ "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
},
"require": {
@@ -6277,7 +6594,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
},
"funding": [
{
@@ -6293,7 +6610,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-27T09:27:20+00:00"
+ "time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-php72",
@@ -6452,16 +6769,16 @@
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.23.0",
+ "version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
},
"require": {
@@ -6515,7 +6832,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
},
"funding": [
{
@@ -6531,25 +6848,25 @@
"type": "tidelift"
}
],
- "time": "2021-02-19T12:13:01+00:00"
+ "time": "2021-07-28T13:41:28+00:00"
},
{
"name": "symfony/process",
- "version": "v5.3.2",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "714b47f9196de61a196d86c4bad5f09201b307df"
+ "reference": "d16634ee55b895bd85ec714dadc58e4428ecf030"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/714b47f9196de61a196d86c4bad5f09201b307df",
- "reference": "714b47f9196de61a196d86c4bad5f09201b307df",
+ "url": "https://api.github.com/repos/symfony/process/zipball/d16634ee55b895bd85ec714dadc58e4428ecf030",
+ "reference": "d16634ee55b895bd85ec714dadc58e4428ecf030",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -6577,7 +6894,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v5.3.2"
+ "source": "https://github.com/symfony/process/tree/v5.3.4"
},
"funding": [
{
@@ -6593,26 +6910,26 @@
"type": "tidelift"
}
],
- "time": "2021-06-12T10:15:01+00:00"
+ "time": "2021-07-23T15:54:19+00:00"
},
{
"name": "symfony/routing",
- "version": "v5.3.0",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "368e81376a8e049c37cb80ae87dbfbf411279199"
+ "reference": "0a35d2f57d73c46ab6d042ced783b81d09a624c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/368e81376a8e049c37cb80ae87dbfbf411279199",
- "reference": "368e81376a8e049c37cb80ae87dbfbf411279199",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/0a35d2f57d73c46ab6d042ced783b81d09a624c4",
+ "reference": "0a35d2f57d73c46ab6d042ced783b81d09a624c4",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"doctrine/annotations": "<1.12",
@@ -6622,7 +6939,7 @@
},
"require-dev": {
"doctrine/annotations": "^1.12",
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^5.3",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/expression-language": "^4.4|^5.0",
@@ -6667,7 +6984,7 @@
"url"
],
"support": {
- "source": "https://github.com/symfony/routing/tree/v5.3.0"
+ "source": "https://github.com/symfony/routing/tree/v5.3.4"
},
"funding": [
{
@@ -6683,7 +7000,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:43:10+00:00"
+ "time": "2021-07-23T15:55:36+00:00"
},
{
"name": "symfony/service-contracts",
@@ -6849,23 +7166,23 @@
},
{
"name": "symfony/translation",
- "version": "v5.3.3",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "380b8c9e944d0e364b25f28e8e555241eb49c01c"
+ "reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/380b8c9e944d0e364b25f28e8e555241eb49c01c",
- "reference": "380b8c9e944d0e364b25f28e8e555241eb49c01c",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/d89ad7292932c2699cbe4af98d72c5c6bbc504c1",
+ "reference": "d89ad7292932c2699cbe4af98d72c5c6bbc504c1",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php80": "^1.15",
+ "symfony/polyfill-php80": "^1.16",
"symfony/translation-contracts": "^2.3"
},
"conflict": {
@@ -6879,7 +7196,7 @@
"symfony/translation-implementation": "2.3"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^4.4|^5.0",
"symfony/console": "^4.4|^5.0",
"symfony/dependency-injection": "^5.0",
@@ -6924,7 +7241,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/translation/tree/v5.3.3"
+ "source": "https://github.com/symfony/translation/tree/v5.3.4"
},
"funding": [
{
@@ -6940,7 +7257,7 @@
"type": "tidelift"
}
],
- "time": "2021-06-27T12:22:47+00:00"
+ "time": "2021-07-25T09:39:16+00:00"
},
{
"name": "symfony/translation-contracts",
@@ -7022,22 +7339,22 @@
},
{
"name": "symfony/var-dumper",
- "version": "v5.3.3",
+ "version": "v5.3.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "46aa709affb9ad3355bd7a810f9662d71025c384"
+ "reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46aa709affb9ad3355bd7a810f9662d71025c384",
- "reference": "46aa709affb9ad3355bd7a810f9662d71025c384",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0",
+ "reference": "3dd8ddd1e260e58ecc61bb78da3b6584b3bfcba0",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
@@ -7090,7 +7407,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v5.3.3"
+ "source": "https://github.com/symfony/var-dumper/tree/v5.3.6"
},
"funding": [
{
@@ -7106,7 +7423,7 @@
"type": "tidelift"
}
],
- "time": "2021-06-24T08:13:00+00:00"
+ "time": "2021-07-27T01:56:02+00:00"
},
{
"name": "thecodingmachine/safe",
@@ -7792,21 +8109,21 @@
},
{
"name": "composer/xdebug-handler",
- "version": "2.0.1",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
- "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496"
+ "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
- "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339",
+ "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0",
- "psr/log": "^1.0"
+ "psr/log": "^1 || ^2 || ^3"
},
"require-dev": {
"phpstan/phpstan": "^0.12.55",
@@ -7836,7 +8153,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/xdebug-handler/issues",
- "source": "https://github.com/composer/xdebug-handler/tree/2.0.1"
+ "source": "https://github.com/composer/xdebug-handler/tree/2.0.2"
},
"funding": [
{
@@ -7852,7 +8169,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-05T19:37:51+00:00"
+ "time": "2021-07-31T17:03:58+00:00"
},
{
"name": "doctrine/annotations",
@@ -8740,16 +9057,16 @@
},
{
"name": "nunomaduro/collision",
- "version": "v5.5.0",
+ "version": "v5.6.0",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/collision.git",
- "reference": "b5cb36122f1c142c3c3ee20a0ae778439ef0244b"
+ "reference": "0122ac6b03c75279ef78d1c0ad49725dfc52a8d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nunomaduro/collision/zipball/b5cb36122f1c142c3c3ee20a0ae778439ef0244b",
- "reference": "b5cb36122f1c142c3c3ee20a0ae778439ef0244b",
+ "url": "https://api.github.com/repos/nunomaduro/collision/zipball/0122ac6b03c75279ef78d1c0ad49725dfc52a8d2",
+ "reference": "0122ac6b03c75279ef78d1c0ad49725dfc52a8d2",
"shasum": ""
},
"require": {
@@ -8763,10 +9080,10 @@
"fideloper/proxy": "^4.4.1",
"friendsofphp/php-cs-fixer": "^2.17.3",
"fruitcake/laravel-cors": "^2.0.3",
- "laravel/framework": "^9.0",
+ "laravel/framework": "^8.0 || ^9.0",
"nunomaduro/larastan": "^0.6.2",
"nunomaduro/mock-final-classes": "^1.0",
- "orchestra/testbench": "^7.0",
+ "orchestra/testbench": "^6.0 || ^7.0",
"phpstan/phpstan": "^0.12.64",
"phpunit/phpunit": "^9.5.0"
},
@@ -8824,7 +9141,7 @@
"type": "patreon"
}
],
- "time": "2021-06-22T20:47:22+00:00"
+ "time": "2021-07-26T20:39:06+00:00"
},
{
"name": "phar-io/manifest",
@@ -9537,16 +9854,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.5.7",
+ "version": "9.5.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5"
+ "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0dc8b6999c937616df4fb046792004b33fd31c5",
- "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/191768ccd5c85513b4068bdbe99bb6390c7d54fb",
+ "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb",
"shasum": ""
},
"require": {
@@ -9558,7 +9875,7 @@
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
- "phar-io/manifest": "^2.0.1",
+ "phar-io/manifest": "^2.0.3",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
@@ -9624,7 +9941,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.7"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.8"
},
"funding": [
{
@@ -9636,7 +9953,7 @@
"type": "github"
}
],
- "time": "2021-07-19T06:14:47+00:00"
+ "time": "2021-07-31T15:17:34+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -10491,6 +10808,7 @@
"type": "github"
}
],
+ "abandoned": true,
"time": "2020-09-28T06:45:17+00:00"
},
{
@@ -10604,21 +10922,22 @@
},
{
"name": "symfony/filesystem",
- "version": "v5.3.3",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9"
+ "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/19b71c8f313b411172dd5f470fd61f24466d79a9",
- "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32",
+ "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
- "symfony/polyfill-ctype": "~1.8"
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -10646,7 +10965,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v5.3.3"
+ "source": "https://github.com/symfony/filesystem/tree/v5.3.4"
},
"funding": [
{
@@ -10662,27 +10981,27 @@
"type": "tidelift"
}
],
- "time": "2021-06-30T07:27:52+00:00"
+ "time": "2021-07-21T12:40:44+00:00"
},
{
"name": "symfony/options-resolver",
- "version": "v5.3.0",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
- "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5"
+ "reference": "a603e5701bd6e305cfc777a8b50bf081ef73105e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/162e886ca035869866d233a2bfef70cc28f9bbe5",
- "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a603e5701bd6e305cfc777a8b50bf081ef73105e",
+ "reference": "a603e5701bd6e305cfc777a8b50bf081ef73105e",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-php73": "~1.0",
- "symfony/polyfill-php80": "^1.15"
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -10715,7 +11034,7 @@
"options"
],
"support": {
- "source": "https://github.com/symfony/options-resolver/tree/v5.3.0"
+ "source": "https://github.com/symfony/options-resolver/tree/v5.3.4"
},
"funding": [
{
@@ -10731,7 +11050,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:43:10+00:00"
+ "time": "2021-07-23T15:55:36+00:00"
},
{
"name": "symfony/polyfill-php70",
@@ -10803,16 +11122,16 @@
},
{
"name": "symfony/stopwatch",
- "version": "v5.3.0",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "313d02f59d6543311865007e5ff4ace05b35ee65"
+ "reference": "b24c6a92c6db316fee69e38c80591e080e41536c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/313d02f59d6543311865007e5ff4ace05b35ee65",
- "reference": "313d02f59d6543311865007e5ff4ace05b35ee65",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b24c6a92c6db316fee69e38c80591e080e41536c",
+ "reference": "b24c6a92c6db316fee69e38c80591e080e41536c",
"shasum": ""
},
"require": {
@@ -10845,7 +11164,7 @@
"description": "Provides a way to profile code",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/stopwatch/tree/v5.3.0"
+ "source": "https://github.com/symfony/stopwatch/tree/v5.3.4"
},
"funding": [
{
@@ -10861,20 +11180,20 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:43:10+00:00"
+ "time": "2021-07-10T08:58:57+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.2.0",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "75a63c33a8577608444246075ea0af0d052e452a"
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
- "reference": "75a63c33a8577608444246075ea0af0d052e452a",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"shasum": ""
},
"require": {
@@ -10903,7 +11222,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
- "source": "https://github.com/theseer/tokenizer/tree/master"
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
},
"funding": [
{
@@ -10911,7 +11230,7 @@
"type": "github"
}
],
- "time": "2020-07-12T23:59:07+00:00"
+ "time": "2021-07-28T10:34:58+00:00"
}
],
"aliases": [],
diff --git a/database/migrations/2020_08_03_000000_populate_settings_table.php b/database/migrations/2021_01_01_000000_populate_settings_table.php
similarity index 100%
rename from database/migrations/2020_08_03_000000_populate_settings_table.php
rename to database/migrations/2021_01_01_000000_populate_settings_table.php
diff --git a/database/migrations/2021_05_11_113201_remove_required_cnpj_for_juridica.php b/database/migrations/2021_05_11_113201_remove_required_cnpj_for_juridica.php
new file mode 100644
index 0000000000..6c32bcc2b3
--- /dev/null
+++ b/database/migrations/2021_05_11_113201_remove_required_cnpj_for_juridica.php
@@ -0,0 +1,29 @@
+updateOrCreate([
+ 'key' => 'legacy.app.user_accounts.max_days_without_login_to_disable_user',
+ ], [
+ 'type' => 'integer',
+ 'description' => 'Quantidade de dias permitidos sem acessar o sistema para inativação automática de conta',
+ 'hint' => 'A contagem será efetuada em dias corridos. Se o valor preenchido for zero (0) ou nenhum, não ocorrerá automatização',
+ 'setting_category_id' => 10,
+ 'value' => 0,
+ ]);
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Setting::query()->where('key', 'legacy.app.max_days_without_login_to_disable_user')->delete();
+ }
+}
diff --git a/database/migrations/2021_06_25_153934_change_description_hint_default_password_expiration_period_settings.php b/database/migrations/2021_06_25_153934_change_description_hint_default_password_expiration_period_settings.php
new file mode 100644
index 0000000000..1edf234489
--- /dev/null
+++ b/database/migrations/2021_06_25_153934_change_description_hint_default_password_expiration_period_settings.php
@@ -0,0 +1,50 @@
+updateOrInsert([
+ 'key' => 'legacy.app.user_accounts.default_password_expiration_period',
+ ], [
+ 'description' => 'Quantidade de dias para expirar automaticamente as senhas dos usuários ativos',
+ 'hint' => 'A contagem será efetuada em dias corridos. Se o valor preenchido for zero (0), não ocorrerá automatização',
+ 'value' => 0,
+ 'type' => 'integer'
+ ]);
+
+ Setting::query()->updateOrInsert([
+ 'key' => 'legacy.app.user_accounts.max_days_without_login_to_disable_user',
+ ], [
+ 'description' => 'Quantidade de dias permitidos sem acessar o sistema para inativação automática de usuário',
+ 'hint' => 'A contagem será efetuada em dias corridos. Se o valor preenchido for zero (0), não ocorrerá automatização',
+ ]);
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Setting::query()->updateOrInsert([
+ 'key' => 'legacy.app.user_accounts.default_password_expiration_period',
+ ], [
+ 'description' => 'Dias para expiração de senha',
+ 'hint' => '',
+ 'value' => 180,
+ 'type' => 'string'
+ ]);
+
+ Setting::query()->updateOrCreate([
+ 'key' => 'legacy.app.user_accounts.max_days_without_login_to_disable_user',
+ ], [
+ 'description' => 'Quantidade de dias permitidos sem acessar o sistema para inativação automática de conta',
+ 'hint' => 'A contagem será efetuada em dias corridos. Se o valor preenchido for zero (0) ou nenhum, não ocorrerá automatização',
+ ]);
+ }
+}
diff --git a/database/migrations/2021_06_29_104528_corrige_funcao_do_servidor_disciplinas.php b/database/migrations/2021_06_29_104528_corrige_funcao_do_servidor_disciplinas.php
new file mode 100755
index 0000000000..5aa5b6c542
--- /dev/null
+++ b/database/migrations/2021_06_29_104528_corrige_funcao_do_servidor_disciplinas.php
@@ -0,0 +1,42 @@
+foreign('ref_cod_funcao')->on('pmieducar.servidor_funcao')->references('cod_servidor_funcao');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('pmieducar.servidor_disciplina', function (Blueprint $table) {
+ $table->dropForeign(['ref_cod_funcao']);
+ });
+ }
+}
diff --git a/database/migrations/2021_07_19_105119_add_data_cancel_in_view_exporter_student.php b/database/migrations/2021_07_19_105119_add_data_cancel_in_view_exporter_student.php
new file mode 100644
index 0000000000..7371289de5
--- /dev/null
+++ b/database/migrations/2021_07_19_105119_add_data_cancel_in_view_exporter_student.php
@@ -0,0 +1,49 @@
+dropView('public.exporter_social_assistance');
+ $this->dropView('public.exporter_student');
+
+ $this->executeSqlFile(
+ __DIR__ . '/../sqls/views/public.exporter_student-2021-07-19.sql'
+ );
+
+ $this->executeSqlFile(
+ __DIR__ . '/../sqls/views/public.exporter_social_assistance-2020-05-07.sql'
+ );
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ $this->dropView('public.exporter_social_assistance');
+ $this->dropView('public.exporter_student');
+
+ $this->executeSqlFile(
+ __DIR__ . '/../sqls/views/public.exporter_student-2021-04-19.sql'
+ );
+
+ $this->executeSqlFile(
+ __DIR__ . '/../sqls/views/public.exporter_social_assistance-2020-05-07.sql'
+ );
+ }
+}
diff --git a/database/sqls/views/public.exporter_student-2021-07-19.sql b/database/sqls/views/public.exporter_student-2021-07-19.sql
new file mode 100644
index 0000000000..d40dadfbbf
--- /dev/null
+++ b/database/sqls/views/public.exporter_student-2021-07-19.sql
@@ -0,0 +1,63 @@
+create view public.exporter_student as
+SELECT p.id,
+ p.name,
+ p.social_name,
+ p.cpf,
+ p.rg,
+ p.rg_issue_date,
+ p.rg_state_abbreviation,
+ p.date_of_birth,
+ p.email,
+ p.sus,
+ p.nis,
+ p.occupation,
+ p.organization,
+ p.monthly_income,
+ p.gender,
+ p.mother_id,
+ p.father_id,
+ p.guardian_id,
+ ep.nome AS school,
+ t.nm_turma AS school_class,
+ s.nm_serie AS grade,
+ c.nm_curso AS course,
+ m.data_matricula::date AS registration_date,
+ COALESCE(m.data_cancel::date, mt.data_exclusao::date) AS registration_out,
+ m.ano AS year,
+ vs.cod_situacao AS status,
+ vs.texto_situacao AS status_text,
+ a.cod_aluno AS student_id,
+ m.cod_matricula AS registration_id,
+ m.ref_cod_curso AS course_id,
+ m.ref_ref_cod_serie AS grade_id,
+ m.ref_ref_cod_escola AS school_id,
+ t.cod_turma AS school_class_id,
+ t.tipo_atendimento AS attendance_type,
+ ece.cod_escola_inep AS school_inep,
+ t.etapa_educacenso AS school_class_stage,
+ COALESCE(tm.nome, tt.nome) AS period,
+ array_to_string(ARRAY( SELECT json_array_elements_text(ma.recursos_tecnologicos) AS json_array_elements_text), ';'::text) AS technological_resources,
+ p.nationality,
+ p.birthplace,
+ CASE m.modalidade_ensino
+ WHEN 0 THEN 'Semipresencial'::varchar
+ WHEN 1 THEN 'EAD'::varchar
+ WHEN 2 THEN 'Off-line'::varchar
+ ELSE 'Presencial'::varchar
+ END AS modalidade_ensino
+FROM exporter_person p
+ JOIN pmieducar.aluno a ON p.id = a.ref_idpes::numeric
+ JOIN pmieducar.matricula m ON m.ref_cod_aluno = a.cod_aluno
+ JOIN pmieducar.escola e ON e.cod_escola = m.ref_ref_cod_escola
+ JOIN cadastro.pessoa ep ON ep.idpes = e.ref_idpes::numeric
+ JOIN pmieducar.serie s ON s.cod_serie = m.ref_ref_cod_serie
+ JOIN pmieducar.curso c ON c.cod_curso = m.ref_cod_curso
+ JOIN pmieducar.matricula_turma mt ON mt.ref_cod_matricula = m.cod_matricula
+ JOIN relatorio.view_situacao vs ON vs.cod_matricula = m.cod_matricula AND vs.cod_turma = mt.ref_cod_turma AND vs.sequencial = mt.sequencial
+ JOIN pmieducar.turma t ON t.cod_turma = mt.ref_cod_turma
+ LEFT JOIN modules.educacenso_cod_escola ece ON e.cod_escola = ece.cod_escola
+ LEFT JOIN pmieducar.turma_turno tt ON tt.id = t.turma_turno_id
+ LEFT JOIN pmieducar.turma_turno tm ON tm.id = mt.turno_id
+ LEFT JOIN modules.moradia_aluno ma ON ma.ref_cod_aluno = a.cod_aluno
+WHERE true AND a.ativo = 1 AND m.ativo = 1
+ORDER BY a.ref_idpes;
diff --git a/database/sqls/views/public.exporter_student.sql b/database/sqls/views/public.exporter_student.sql
index 6055473e7e..2eeccb8d9d 100644
--- a/database/sqls/views/public.exporter_student.sql
+++ b/database/sqls/views/public.exporter_student.sql
@@ -22,6 +22,7 @@ SELECT p.id,
s.nm_serie AS grade,
c.nm_curso AS course,
m.data_matricula AS registration_date,
+ COALESCE(m.data_cancel, mt.data_exclusao) AS registration_out,
m.ano AS year,
vs.cod_situacao AS status,
vs.texto_situacao AS status_text,
diff --git a/ieducar/intranet/agenda.php b/ieducar/intranet/agenda.php
index 11f7935b5c..7fd314ffb9 100644
--- a/ieducar/intranet/agenda.php
+++ b/ieducar/intranet/agenda.php
@@ -68,14 +68,14 @@ public function RenderHTML()
EDITAR
*/
if (isset($_POST['agenda_rap_id'])) {
- $objAgenda->edita_compromisso($_POST['agenda_rap_id'], $_POST['agenda_rap_titulo'], $_POST['agenda_rap_conteudo'], $_POST['agenda_rap_data'], $_POST['agenda_rap_hora'], $_POST['agenda_rap_horafim'], $_POST['agenda_rap_publico'], $_POST['agenda_rap_importante']);
+ $objAgenda->edita_compromisso($_POST['agenda_rap_id'], pg_escape_string($_POST['agenda_rap_titulo']), pg_escape_string($_POST['agenda_rap_conteudo']), $_POST['agenda_rap_data'], $_POST['agenda_rap_hora'], $_POST['agenda_rap_horafim'], $_POST['agenda_rap_publico'], $_POST['agenda_rap_importante']);
}
/*
INSERIR
*/
if (isset($_POST['novo_hora_inicio'])) {
- $objAgenda->cadastraCompromisso(false, $_POST['novo_titulo'], $_POST['novo_descricao'], $_POST['novo_data'], $_POST['novo_hora_inicio'], $_POST['novo_hora_fim'], $_POST['novo_publico'], $_POST['novo_importante'], $_POST['novo_repetir_dias'], $_POST['novo_repetir_qtd']);
+ $objAgenda->cadastraCompromisso(false, pg_escape_string($_POST['novo_titulo']), pg_escape_string($_POST['novo_descricao']), $_POST['novo_data'], $_POST['novo_hora_inicio'], $_POST['novo_hora_fim'], $_POST['novo_publico'], $_POST['novo_importante'], $_POST['novo_repetir_dias'], $_POST['novo_repetir_qtd']);
}
/*
diff --git a/ieducar/intranet/atendidos_lst.php b/ieducar/intranet/atendidos_lst.php
index 832fc5c6dc..743e22b619 100644
--- a/ieducar/intranet/atendidos_lst.php
+++ b/ieducar/intranet/atendidos_lst.php
@@ -5,14 +5,12 @@ public function Gerar()
{
$this->titulo = 'Pessoas Físicas';
- $this->addCabecalhos([ 'Nome', 'CPF']);
- $this->campoTexto('nm_pessoa', 'Nome', $this->getQueryString('nm_pessoa'), '50', '255', true);
- $this->campoCpf('id_federal', 'CPF', $this->getQueryString('id_federal'), '50', '', true);
+ $this->addCabecalhos(['Nome', 'CPF']);
+ $this->campoTexto('nm_pessoa', 'Nome', $this->getQueryString('nm_pessoa'), '50', '255');
+ $this->campoCpf('id_federal', 'CPF', $this->getQueryString('id_federal'));
- $where='';
$par_nome = $this->getQueryString('nm_pessoa') ?: false;
$par_id_federal = idFederal2Int($this->getQueryString('id_federal')) ?: false;
- $dba = $db = new clsBanco();
$objPessoa = new clsPessoaFisica();
diff --git a/ieducar/intranet/educar_curso_cad.php b/ieducar/intranet/educar_curso_cad.php
index 88447fbe14..af5bb791a4 100644
--- a/ieducar/intranet/educar_curso_cad.php
+++ b/ieducar/intranet/educar_curso_cad.php
@@ -417,7 +417,7 @@ public function Gerar()
$resources = [
null => 'Selecione',
1 => 'Ensino regular',
- 2 => 'Educação Especial - Modalidade Substitutiva',
+ 2 => 'Educação especial',
3 => 'Educação de Jovens e Adultos (EJA)',
4 => 'Educação profissional'
];
diff --git a/ieducar/intranet/educar_escola_cad.php b/ieducar/intranet/educar_escola_cad.php
index 8ef7b9fdab..dde9fca296 100644
--- a/ieducar/intranet/educar_escola_cad.php
+++ b/ieducar/intranet/educar_escola_cad.php
@@ -40,6 +40,7 @@
use iEducar\Support\View\SelectOptions;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Http\RedirectResponse;
+use Illuminate\Support\Facades\DB;
return new class extends clsCadastro {
use LegacyAddressingFields;
@@ -183,8 +184,11 @@
public $qtd_vice_diretor;
public $qtd_orientador_comunitario;
public $iddis;
+ public $pessoaj_idpes;
+ public $pessoaj_id;
+ public bool $pesquisaPessoaJuridica = true;
- private $inputsRecursos = [
+ public $inputsRecursos = [
'qtd_secretario_escolar' => 'Secretário(a) escolar',
'qtd_auxiliar_administrativo' => 'Auxiliares de secretaria ou auxiliares administrativos, atendentes',
'qtd_apoio_pedagogico' => 'Profissionais de apoio e supervisão pedagógica: pedagogo(a), coordenador(a) pedagógico(a), orientador(a) educacional, supervisor(a) escolar e coordenador(a) de área de ensino',
@@ -212,124 +216,122 @@ public function Inicializar()
$this->cod_escola = $this->getQueryString('cod_escola');
$this->sem_cnpj = false;
+ $this->pesquisaPessoaJuridica = true;
- // cadastro Novo sem CNPJ
- if (is_numeric($_POST['sem_cnpj']) && !$this->cod_escola) {
+ if (is_numeric($_POST['pessoaj_id']) && !$this->cod_escola) {
+ $pessoaJuridicaId = (int) $_POST['pessoaj_id'];
+ if (!$this->pessoaJuridicaContemEscola($pessoaJuridicaId)) {
+ return false;
+ }
+
+ $this->pesquisaPessoaJuridica = false;
$this->sem_cnpj = true;
+ $this->pessoaj_idpes = $pessoaJuridicaId;
+ $this->pessoaj_id = $pessoaJuridicaId;
+ $this->ref_idpes = $pessoaJuridicaId;
+
+ $this->loadAddress($this->pessoaj_id);
+ $this->carregaDadosContato($this->ref_idpes);
+
$retorno = 'Novo';
- } // cadastro Novo com CNPJ
- elseif ($_POST['cnpj']) {
- $this->com_cnpj = true;
- $obj_juridica = new clsPessoaJuridica();
- $lst_juridica = $obj_juridica->lista(idFederal2int($_POST['cnpj']));
- // caso exista o CNPJ na BD
- if (is_array($lst_juridica)) {
- $retorno = 'Editar';
- $det_juridica = array_shift($lst_juridica);
- $this->ref_idpes = $det_juridica['idpes'];
- $obj = new clsPmieducarEscola();
- $lst_escola = $obj->lista(null, null, null, null, null, null, $this->ref_idpes, null, null, null, 1);
- if (is_array($lst_escola)) {
- $registro = array_shift($lst_escola);
- $this->cod_escola = $registro['cod_escola'];
- }
- } // caso nao exista o CNPJ
- else {
- $retorno = 'Editar';
- }
- } // cadastro Editar
- if (is_numeric($this->cod_escola) && !$_POST['passou']) {
+ }
+
+ if (is_numeric($this->cod_escola)) {
$obj = new clsPmieducarEscola($this->cod_escola);
$registro = $obj->detalhe();
- if ($registro['ref_idpes']) {
- $this->com_cnpj = true;
- } else {
- $this->sem_cnpj = true;
+ if ($registro === false) {
+ throw new HttpResponseException(
+ new RedirectResponse('educar_escola_lst.php')
+ );
}
- if ($registro) {
- foreach ($registro as $campo => $val) {
- // passa todos os valores obtidos no registro para atributos do objeto
- $this->$campo = $val;
- }
+ $this->pesquisaPessoaJuridica = false;
+
+ $this->carregaCamposComDadosDaEscola($registro);
+
+ $objJuridica = (new clsPessoaJuridica($this->ref_idpes))->detalhe();
+
+ if (validaCNPJ($objJuridica['cnpj'])) {
+ $this->cnpj = int2CNPJ($objJuridica['cnpj']);
+ }
+
+ $this->fexcluir = $obj_permissoes->permissao_excluir(561, $this->pessoa_logada, 3);
+
+ $this->loadAddress($this->ref_idpes);
+ $this->carregaDadosContato($this->ref_idpes);
+
+ $retorno = 'Editar';
+ }
+
+ $this->inicializaDados();
+
+ $this->url_cancelar = ($retorno == 'Editar') ? "educar_escola_det.php?cod_escola={$registro['cod_escola']}" : 'educar_escola_lst.php';
+
+ $this->breadcrumb('Escola', ['educar_index.php' => 'Escola']);
+ $this->nome_url_cancelar = 'Cancelar';
+
+ return $retorno;
+ }
+
+ private function carregaCamposComDadosDaEscola($registro)
+ {
+ $this->pessoaj_id = $registro['ref_idpes'];
- $this->loadAddress($this->ref_idpes);
-
- $this->gestor_id = $registro['ref_idpes_gestor'];
- $this->secretario_id = $registro['ref_idpes_secretario_escolar'];
-
- $this->fantasia = $registro['nome'];
- $objJuridica = new clsPessoaJuridica($this->ref_idpes);
- $det = $objJuridica->detalhe();
- $this->cnpj = int2CNPJ($det['cnpj']);
- $this->fexcluir = $obj_permissoes->permissao_excluir(561, $this->pessoa_logada, 3);
- $retorno = 'Editar';
-
- if ($registro['tipo_cadastro'] == 1) {
- $objJuridica = new clsPessoaJuridica(false, idFederal2int($this->cnpj));
- $det = $objJuridica->detalhe();
- $objPessoa = new clsPessoaFj($det['idpes']);
- list(
- $this->p_ddd_telefone_1,
- $this->p_telefone_1,
- $this->p_ddd_telefone_2,
- $this->p_telefone_2,
- $this->p_ddd_telefone_mov,
- $this->p_telefone_mov,
- $this->p_ddd_telefone_fax,
- $this->p_telefone_fax,
- $this->p_email,
- $this->p_http,
- $this->tipo_pessoa
- ) = $objPessoa->queryRapida(
- $det['idpes'],
- 'ddd_1',
- 'fone_1',
- 'ddd_2',
- 'fone_2',
- 'ddd_mov',
- 'fone_mov',
- 'ddd_fax',
- 'fone_fax',
- 'email',
- 'url',
- 'tipo'
- );
+ foreach ($registro as $campo => $val) {
+ // passa todos os valores obtidos no registro para atributos do objeto
+ $this->$campo = $val;
+ }
+
+ $this->gestor_id = $registro['ref_idpes_gestor'];
+ $this->secretario_id = $registro['ref_idpes_secretario_escolar'];
+ $this->fantasia = $registro['nome'];
+ }
+
+ private function carregaDadosContato($idpes)
+ {
+ $objPessoa = new clsPessoaFj($idpes);
+ [
+ $this->p_ddd_telefone_1,
+ $this->p_telefone_1,
+ $this->p_ddd_telefone_2,
+ $this->p_telefone_2,
+ $this->p_ddd_telefone_mov,
+ $this->p_telefone_mov,
+ $this->p_ddd_telefone_fax,
+ $this->p_telefone_fax,
+ $this->p_email,
+ $this->p_http,
+ $this->tipo_pessoa
+ ] = $objPessoa->queryRapida(
+ $idpes,
+ 'ddd_1',
+ 'fone_1',
+ 'ddd_2',
+ 'fone_2',
+ 'ddd_mov',
+ 'fone_mov',
+ 'ddd_fax',
+ 'fone_fax',
+ 'email',
+ 'url',
+ 'tipo'
+ );
+ }
+
+ private function carregaDadosDoPost()
+ {
+ if ($_POST) {
+ foreach ($_POST as $campo => $val) {
+ if ($campo !== 'tipoacao' && $campo !== 'sem_cnpj') {
+ $this->$campo = ($this->$campo) ?: $val;
}
}
- } elseif ($_POST['cnpj'] && !$_POST['passou']) {
- $objJuridica = new clsPessoaJuridica(false, idFederal2int($_POST['cnpj']));
- $det = $objJuridica->detalhe();
- $objPessoa = new clsPessoaFj($det['idpes']);
- list(
- $this->p_ddd_telefone_1,
- $this->p_telefone_1,
- $this->p_ddd_telefone_2,
- $this->p_telefone_2,
- $this->p_ddd_telefone_mov,
- $this->p_telefone_mov,
- $this->p_ddd_telefone_fax,
- $this->p_telefone_fax,
- $this->p_email,
- $this->p_http,
- $this->tipo_pessoa
- ) = $objPessoa->queryRapida(
- $det['idpes'],
- 'ddd_1',
- 'fone_1',
- 'ddd_2',
- 'fone_2',
- 'ddd_mov',
- 'fone_mov',
- 'ddd_fax',
- 'fone_fax',
- 'email',
- 'url',
- 'tipo'
- );
}
+ }
+ private function inicializaDados()
+ {
if ($this->cnpj_mantenedora_principal) {
$this->cnpj_mantenedora_principal = int2CNPJ($this->cnpj_mantenedora_principal);
}
@@ -433,13 +435,24 @@ public function Inicializar()
if (is_string($this->codigo_lingua_indigena)) {
$this->codigo_lingua_indigena = explode(',', str_replace(['{', '}'], '', $this->codigo_lingua_indigena));
}
+ }
- $this->url_cancelar = ($retorno == 'Editar') ? "educar_escola_det.php?cod_escola={$registro['cod_escola']}" : 'educar_escola_lst.php';
+ private function pessoaJuridicaContemEscola($pessoaj_id)
+ {
+ $escola = (new clsPmieducarEscola())->lista(null, null, null, null, null, null, $pessoaj_id);
- $this->breadcrumb('Escola', ['educar_index.php' => 'Escola']);
- $this->nome_url_cancelar = 'Cancelar';
+ if (count($escola) > 0) {
+ $current = current($escola);
- return $retorno;
+ if (is_array($current) &&
+ array_key_exists('cod_escola', $current) &&
+ is_numeric($current['cod_escola'])) {
+ $this->mensagem = "Escola criada, para editar clique aqui.";
+ return false;
+ }
+ }
+
+ return true;
}
public function Gerar()
@@ -461,228 +474,203 @@ public function Gerar()
$obrigarCamposCenso = $this->validarCamposObrigatoriosCenso();
$this->campoOculto('obrigar_campos_censo', (int) $obrigarCamposCenso);
+ $this->campoOculto('pessoaj_id_oculto', $this->pessoaj_id);
+ $this->campoOculto('pessoaj_id', $this->pessoaj_id);
- if (!$this->sem_cnpj && !$this->com_cnpj) {
- $parametros = new clsParametrosPesquisas();
- $parametros->setSubmit(1);
- $parametros->setPessoa('J');
- $parametros->setPessoaCampo('sem_cnpj');
- $parametros->setPessoaNovo('S');
- $parametros->setPessoaCPF('N');
- $parametros->setPessoaTela('frame');
- $this->campoOculto('sem_cnpj', '');
- $parametros->setCodSistema(13);
- $parametros->adicionaCampoTexto('cnpj', 'cnpj');
- $this->campoCnpjPesq('cnpj', 'CNPJ', $this->cnpj, 'pesquisa_pessoa_lst.php', $parametros->serializaCampos(), true);
+ if ($this->pesquisaPessoaJuridica) {
+ $this->inputsHelper()->simpleSearchPessoaj('idpes', ['label'=> 'Pessoa Jurídica']);
$this->acao_enviar = false;
$this->url_cancelar = false;
$this->array_botao = ['Continuar', 'Cancelar'];
- $this->array_botao_url_script = ['obj = document.getElementById(\'cnpj\');if(obj.value != \'\' ) { acao(); } else { acao(); }', 'go(\'educar_escola_lst.php\');'];
+ $this->array_botao_url_script = ['obj = document.getElementById(\'pessoaj_idpes\');if(obj.value != \'\' ) {
+ document.getElementById(\'tipoacao\').value = \'\'; acao(); } else { acao(); }', 'go(\'educar_escola_lst.php\');'];
} else {
$this->inputsHelper()->integer('escola_inep_id', ['label' => 'Código INEP', 'placeholder' => 'INEP', 'required' => $obrigarCamposCenso, 'max_length' => 8, 'label_hint' => 'Somente números']);
- if ($_POST) {
- foreach ($_POST as $campo => $val) {
- if ($campo != 'tipoacao' && $campo != 'sem_cnpj') {
- $this->$campo = ($this->$campo) ? $this->$campo : $val;
+ $this->carregaDadosDoPost();
+
+ $objTemp = new clsPessoaJuridica($this->ref_idpes);
+ $objTemp->detalhe();
+
+ $this->campoOculto('cod_escola', $this->cod_escola);
+ $this->campoTexto('fantasia', 'Escola', $this->fantasia, 30, 255, true);
+ $this->campoTexto('sigla', 'Sigla', $this->sigla, 30, 255, true);
+ $nivel = $obj_permissoes->nivel_acesso($this->pessoa_logada);
+
+ if ($nivel === 1) {
+ $cabecalhos[] = 'Instituicao';
+ $objInstituicao = new clsPmieducarInstituicao();
+ $opcoes = ['' => 'Selecione'];
+ $objInstituicao->setOrderby('nm_instituicao ASC');
+ $lista = $objInstituicao->lista();
+
+ if (is_array($lista)) {
+ foreach ($lista as $linha) {
+ $opcoes[$linha['cod_instituicao']] = $linha['nm_instituicao'];
}
}
- }
- if ($this->sem_cnpj) {
- $this->campoOculto('sem_cnpj', $this->sem_cnpj);
- $this->p_ddd_telefone_1 = ($this->p_ddd_telefone_1 == null) ? '' : $this->p_ddd_telefone_1;
- $this->p_ddd_telefone_fax = ($this->p_ddd_telefone_fax == null) ? '' : $this->p_ddd_telefone_fax;
+ $this->campoLista('ref_cod_instituicao', 'Instituição', $opcoes, $this->ref_cod_instituicao);
+ } else {
+ $this->ref_cod_instituicao = $obj_permissoes->getInstituicao($this->pessoa_logada);
- if ($this->ref_idpes) {
- $objTemp = new clsPessoaJuridica($this->ref_idpes);
- $detalhe = $objTemp->detalhe();
+ if ($this->ref_cod_instituicao) {
+ $this->campoOculto('ref_cod_instituicao', $this->ref_cod_instituicao);
+ } else {
+ die('Usuário não é do nivel poli-institucional e não possui uma instituição');
}
- $this->campoOculto('cod_escola', $this->cod_escola);
- $this->campoTexto('fantasia', 'Escola', $this->fantasia, 30, 255, true);
- $this->campoTexto('sigla', 'Sigla', $this->sigla, 30, 255, true);
- $nivel = $obj_permissoes->nivel_acesso($this->pessoa_logada);
-
- if ($nivel == 1) {
- $cabecalhos[] = 'Instituicao';
- $objInstituicao = new clsPmieducarInstituicao();
- $opcoes = ['' => 'Selecione'];
- $objInstituicao->setOrderby('nm_instituicao ASC');
- $lista = $objInstituicao->lista();
-
- if (is_array($lista)) {
- foreach ($lista as $linha) {
- $opcoes[$linha['cod_instituicao']] = $linha['nm_instituicao'];
- }
- }
+ }
- $this->campoLista('ref_cod_instituicao', 'Instituição', $opcoes, $this->ref_cod_instituicao);
- } else {
- $this->ref_cod_instituicao = $obj_permissoes->getInstituicao($this->pessoa_logada);
+ $opcoes = ['' => 'Selecione'];
- if ($this->ref_cod_instituicao) {
- $this->campoOculto('ref_cod_instituicao', $this->ref_cod_instituicao);
- } else {
- die('Usuário não é do nivel poli-institucional e não possui uma instituição');
+ // EDITAR
+ $script = 'javascript:showExpansivelIframe(520, 120, \'educar_escola_rede_ensino_cad_pop.php\');';
+ $display = "'display: none;'";
+ if ($this->ref_cod_instituicao) {
+ $objTemp = new clsPmieducarEscolaRedeEnsino();
+ $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao);
+
+ if (is_array($lista) && count($lista)) {
+ foreach ($lista as $registro) {
+ $opcoes["{$registro['cod_escola_rede_ensino']}"] = "{$registro['nm_rede']}";
}
}
- $opcoes = ['' => 'Selecione'];
-
- // EDITAR
- $script = 'javascript:showExpansivelIframe(520, 120, \'educar_escola_rede_ensino_cad_pop.php\');';
+ $display = "'display: '';'";
+ }
- if ($this->ref_cod_instituicao) {
- $objTemp = new clsPmieducarEscolaRedeEnsino();
- $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao);
+ $script = "";
- if (is_array($lista) && count($lista)) {
- foreach ($lista as $registro) {
- $opcoes["{$registro['cod_escola_rede_ensino']}"] = "{$registro['nm_rede']}";
- }
- }
+ $this->campoLista('ref_cod_escola_rede_ensino', 'Rede Ensino', $opcoes, $this->ref_cod_escola_rede_ensino, '', false, '', $script);
- $script = "";
- } else {
- $script = "";
- }
+ $zonas = App_Model_ZonaLocalizacao::getInstance();
+ $zonas = [null => 'Selecione'] + $zonas->getEnums();
- $this->campoLista('ref_cod_escola_rede_ensino', 'Rede Ensino', $opcoes, $this->ref_cod_escola_rede_ensino, '', false, '', $script);
+ $options = [
+ 'label' => 'Zona localização',
+ 'value' => $this->zona_localizacao,
+ 'resources' => $zonas,
+ 'required' => true,
+ ];
- $zonas = App_Model_ZonaLocalizacao::getInstance();
- $zonas = [null => 'Selecione'] + $zonas->getEnums();
+ $this->inputsHelper()->select('zona_localizacao', $options);
- $options = [
- 'label' => 'Zona localização',
- 'value' => $this->zona_localizacao,
- 'resources' => $zonas,
- 'required' => true,
- ];
+ $this->campoOculto('com_cnpj', $this->com_cnpj);
- $this->inputsHelper()->select('zona_localizacao', $options);
+ if (!$this->cod_escola) {
+ $this->cnpj = urldecode($_POST['cnpj']);
+ $this->cnpj = idFederal2int($this->cnpj);
+ $this->cnpj = empty($this->cnpj) ? $this->cnpj : int2IdFederal($this->cnpj);
+ }
- $this->campoTexto('p_ddd_telefone_1', 'DDD Telefone 1', $this->p_ddd_telefone_1, '2', '2', false);
- $this->campoTexto('p_telefone_1', 'Telefone 1', $this->p_telefone_1, '10', '15', false);
- $this->campoTexto('p_ddd_telefone_fax', 'DDD Fax', $this->p_ddd_telefone_fax, '2', '2', false);
- $this->campoTexto('p_telefone_fax', 'Fax', $this->p_telefone_fax, '10', '15', false);
- $this->campoTexto('p_email', 'E-mail', $this->p_email, '50', '100', false);
+ if (empty($this->cnpj) && $objTemp->cnpj) {
+ $this->cnpj = $objTemp->cnpj;
}
- if ($this->com_cnpj) {
- $this->campoOculto('com_cnpj', $this->com_cnpj);
+ $objJuridica = new clsPessoaJuridica($this->pessoaj_id);
- if (!$this->cod_escola) {
- $this->cnpj = urldecode($_POST['cnpj']);
- $this->cnpj = idFederal2int($this->cnpj);
- $this->cnpj = int2IdFederal($this->cnpj);
- }
+ $det = $objJuridica->detalhe();
+ $this->ref_idpes = $det['idpes'];
- $objJuridica = new clsPessoaJuridica(false, idFederal2int($this->cnpj));
- $det = $objJuridica->detalhe();
- $this->ref_idpes = $det['idpes'];
+ if (!$this->fantasia) {
+ $this->fantasia = $det['fantasia'];
+ }
- if (!$this->fantasia) {
- $this->fantasia = $det['fantasia'];
- }
+ if ($this->cnpj) {
+ $this->cnpj = (is_numeric($this->cnpj)) ? int2CNPJ($this->cnpj) : int2CNPJ(idFederal2int($this->cnpj));
+ }
- if ($this->passou) {
- $this->cnpj = (is_numeric($this->cnpj)) ? $this->cnpj : idFederal2int($this->cnpj);
- $this->cnpj = int2IdFederal($this->cnpj);
- }
+ $this->campoRotulo('cnpj_', 'CNPJ', $this->cnpj);
+ $this->campoOculto('cnpj', idFederal2int($this->cnpj));
+ $this->campoOculto('ref_idpes', $this->ref_idpes);
+ $this->campoOculto('cod_escola', $this->cod_escola);
+ $this->campoTexto('fantasia', 'Escola', $this->fantasia, 30, 255, true);
+ $this->campoTexto('sigla', 'Sigla', $this->sigla, 30, 20, true);
+ $nivel = $obj_permissoes->nivel_acesso($this->pessoa_logada);
+
+ if ($nivel == 1) {
+ $cabecalhos[] = 'Instituicao';
+ $objInstituicao = new clsPmieducarInstituicao();
+ $opcoes = ['' => 'Selecione'];
+ $objInstituicao->setOrderby('nm_instituicao ASC');
+ $lista = $objInstituicao->lista();
- $this->campoRotulo('cnpj_', 'CNPJ', $this->cnpj);
- $this->campoOculto('cnpj', idFederal2int($this->cnpj));
- $this->campoOculto('ref_idpes', $this->ref_idpes);
- $this->campoOculto('cod_escola', $this->cod_escola);
- $this->campoTexto('fantasia', 'Escola', $this->fantasia, 30, 255, true);
- $this->campoTexto('sigla', 'Sigla', $this->sigla, 30, 20, true);
- $nivel = $obj_permissoes->nivel_acesso($this->pessoa_logada);
-
- if ($nivel == 1) {
- $cabecalhos[] = 'Instituicao';
- $objInstituicao = new clsPmieducarInstituicao();
- $opcoes = ['' => 'Selecione'];
- $objInstituicao->setOrderby('nm_instituicao ASC');
- $lista = $objInstituicao->lista();
-
- if (is_array($lista)) {
- foreach ($lista as $linha) {
- $opcoes[$linha['cod_instituicao']] = $linha['nm_instituicao'];
- }
+ if (is_array($lista)) {
+ foreach ($lista as $linha) {
+ $opcoes[$linha['cod_instituicao']] = $linha['nm_instituicao'];
}
+ }
- $this->campoLista('ref_cod_instituicao', 'Instituicao', $opcoes, $this->ref_cod_instituicao);
- } else {
- $this->ref_cod_instituicao = $obj_permissoes->getInstituicao($this->pessoa_logada);
+ $this->campoLista('ref_cod_instituicao', 'Instituicao', $opcoes, $this->ref_cod_instituicao);
+ } else {
+ $this->ref_cod_instituicao = $obj_permissoes->getInstituicao($this->pessoa_logada);
- if ($this->ref_cod_instituicao) {
- $this->campoOculto('ref_cod_instituicao', $this->ref_cod_instituicao);
- } else {
- die('Usuário não é do nivel poli-institucional e não possui uma instituição');
- }
+ if ($this->ref_cod_instituicao) {
+ $this->campoOculto('ref_cod_instituicao', $this->ref_cod_instituicao);
+ } else {
+ die('Usuário não é do nivel poli-institucional e não possui uma instituição');
}
+ }
- $opcoes = ['' => 'Selecione'];
+ $opcoes = ['' => 'Selecione'];
- // EDITAR
- $script = 'javascript:showExpansivelIframe(520, 120, \'educar_escola_rede_ensino_cad_pop.php\');';
- if ($this->ref_cod_instituicao) {
- $objTemp = new clsPmieducarEscolaRedeEnsino();
- $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao);
+ // EDITAR
+ $script = 'javascript:showExpansivelIframe(520, 120, \'educar_escola_rede_ensino_cad_pop.php\');';
+ if ($this->ref_cod_instituicao) {
+ $objTemp = new clsPmieducarEscolaRedeEnsino();
+ $lista = $objTemp->lista(null, null, null, null, null, null, null, null, 1, $this->ref_cod_instituicao);
- if (is_array($lista) && count($lista)) {
- foreach ($lista as $registro) {
- $opcoes["{$registro['cod_escola_rede_ensino']}"] = "{$registro['nm_rede']}";
- }
+ if (is_array($lista) && count($lista)) {
+ foreach ($lista as $registro) {
+ $opcoes["{$registro['cod_escola_rede_ensino']}"] = "{$registro['nm_rede']}";
}
-
- $script = "";
- } else {
- $script = "";
}
- $this->campoLista('ref_cod_escola_rede_ensino', 'Rede Ensino', $opcoes, $this->ref_cod_escola_rede_ensino, '', false, '', $script);
- $opcoes = ['' => 'Selecione'];
+ $script = "";
+ } else {
+ $script = "";
+ }
- $zonas = App_Model_ZonaLocalizacao::getInstance();
- $zonas = [null => 'Selecione'] + $zonas->getEnums();
+ $this->campoLista('ref_cod_escola_rede_ensino', 'Rede Ensino', $opcoes, $this->ref_cod_escola_rede_ensino, '', false, '', $script);
- $options = [
- 'label' => 'Zona localização',
- 'value' => $this->zona_localizacao,
- 'resources' => $zonas,
- 'required' => true,
- ];
+ $zonas = App_Model_ZonaLocalizacao::getInstance();
+ $zonas = [null => 'Selecione'] + $zonas->getEnums();
- $this->inputsHelper()->select('zona_localizacao', $options);
+ $options = [
+ 'label' => 'Zona localização',
+ 'value' => $this->zona_localizacao,
+ 'resources' => $zonas,
+ 'required' => true,
+ ];
- $resources = SelectOptions::localizacoesDiferenciadasEscola();
- $options = ['label' => 'Localização diferenciada da escola', 'resources' => $resources, 'value' => $this->localizacao_diferenciada, 'required' => $obrigarCamposCenso, 'size' => 70];
- $this->inputsHelper()->select('localizacao_diferenciada', $options);
+ $this->inputsHelper()->select('zona_localizacao', $options);
- $this->viewAddress();
+ $resources = SelectOptions::localizacoesDiferenciadasEscola();
+ $options = ['label' => 'Localização diferenciada da escola', 'resources' => $resources, 'value' => $this->localizacao_diferenciada, 'required' => $obrigarCamposCenso, 'size' => 70];
+ $this->inputsHelper()->select('localizacao_diferenciada', $options);
- $this->inputsHelper()->simpleSearchDistrito('district', [
- 'required' => $obrigarCamposCenso,
- 'label' => 'Distrito',
- ], [
- 'objectName' => 'district',
- 'hiddenInputOptions' => [
- 'options' => [
- 'value' => $this->iddis ?? $this->district_id,
- ],
+ $this->viewAddress();
+
+ $this->inputsHelper()->simpleSearchDistrito('district', [
+ 'required' => $obrigarCamposCenso,
+ 'label' => 'Distrito',
+ ], [
+ 'objectName' => 'district',
+ 'hiddenInputOptions' => [
+ 'options' => [
+ 'value' => $this->iddis ?? $this->district_id,
],
- ]);
-
- $this->inputTelefone('1', 'Telefone 1');
- $this->inputTelefone('2', 'Telefone 2');
- $this->inputTelefone('mov', 'Celular');
- $this->inputTelefone('fax', 'Fax');
- $this->campoTexto('p_email', 'E-mail', $this->p_email, '50', '100', false);
- $this->campoTexto('p_http', 'Site/Blog/Rede social', $this->p_http, '50', '255', false);
- $this->passou = true;
- $this->campoOculto('passou', $this->passou);
- }
+ ],
+ ]);
+
+ $this->inputTelefone('1', 'Telefone 1');
+ $this->inputTelefone('2', 'Telefone 2');
+ $this->inputTelefone('mov', 'Celular');
+ $this->inputTelefone('fax', 'Fax');
+ $this->campoTexto('p_email', 'E-mail', $this->p_email, '50', '100', false);
+ $this->campoTexto('p_http', 'Site/Blog/Rede social', $this->p_http, '50', '255', false);
+ $this->passou = true;
+ $this->campoOculto('passou', $this->passou);
$this->inputsHelper()->numeric('latitude', ['max_length' => '20', 'size' => '20', 'required' => false, 'value' => $this->latitude, 'label_hint' => 'São aceito somente números, ponto "." e hífen "-"']);
$this->inputsHelper()->numeric('longitude', ['max_length' => '20', 'size' => '20', 'required' => false, 'value' => $this->longitude, 'label_hint' => 'São aceito somente números, ponto "." e hífen "-"']);
@@ -754,36 +742,49 @@ public function Gerar()
];
$this->inputsHelper()->multipleSearchCustom('', $options, $helperOptions);
- $resources = ['' => 'Selecione',
+ $resources = [
+ '' => 'Selecione',
1 => 'Particular',
2 => 'Comunitária',
3 => 'Confessional',
- 4 => 'Filantrópica'];
- $options = ['label' => 'Categoria da escola privada',
+ 4 => 'Filantrópica'
+ ];
+
+ $options = [
+ 'label' => 'Categoria da escola privada',
'resources' => $resources,
'value' => $this->categoria_escola_privada,
'required' => false,
- 'size' => 70];
+ 'size' => 70
+ ];
+
$this->inputsHelper()->select('categoria_escola_privada', $options);
- $resources = ['' => 'Selecione',
+ $resources = [
+ '' => 'Selecione',
1 => 'Estadual',
2 => 'Municipal',
- 3 => 'Estadual e Municipal'];
- $options = ['label' => 'Conveniada com poder público',
+ 3 => 'Estadual e Municipal'
+ ];
+
+ $options = [
+ 'label' => 'Conveniada com poder público',
'resources' => $resources,
'value' => $this->conveniada_com_poder_publico,
'required' => false,
- 'size' => 70];
- $this->inputsHelper()->select('conveniada_com_poder_publico', $options);
+ 'size' => 70
+ ];
+ $this->inputsHelper()->select('conveniada_com_poder_publico', $options);
$this->campoCnpj('cnpj_mantenedora_principal', 'CNPJ da mantenedora principal da escola privada', $this->cnpj_mantenedora_principal);
$hiddenInputOptions = ['options' => ['value' => $this->secretario_id]];
$helperOptions = ['objectName' => 'secretario', 'hiddenInputOptions' => $hiddenInputOptions];
- $options = ['label' => 'Secretário escolar',
+ $options = [
+ 'label' => 'Secretário escolar',
'size' => 50,
- 'required' => false];
+ 'required' => false
+ ];
$this->inputsHelper()->simpleSearchPessoa('nome', $options, $helperOptions);
$resources = SelectOptions::esferasAdministrativasEscola();
@@ -799,15 +800,15 @@ public function Gerar()
$this->addSchoolManagersTable();
if ($_POST['escola_curso']) {
- $this->escola_curso = unserialize(urldecode($_POST['escola_curso']));
+ $this->escola_curso = unserialize(urldecode($_POST['escola_curso']),['stdclass']);
}
if ($_POST['escola_curso_autorizacao']) {
- $this->escola_curso_autorizacao = unserialize(urldecode($_POST['escola_curso_autorizacao']));
+ $this->escola_curso_autorizacao = unserialize(urldecode($_POST['escola_curso_autorizacao']),['stdclass']);
}
if ($_POST['escola_curso_anos_letivos']) {
- $this->escola_curso_anos_letivos = unserialize(urldecode($_POST['escola_curso_anos_letivos']));
+ $this->escola_curso_anos_letivos = unserialize(urldecode($_POST['escola_curso_anos_letivos']), ['stdclass']);
}
if (is_numeric($this->cod_escola) && !$_POST) {
@@ -1451,31 +1452,8 @@ public function Novo()
{
$obj_permissoes = new clsPermissoes();
$obj_permissoes->permissao_cadastra(561, $this->pessoa_logada, 3, 'educar_escola_lst.php');
- $orgao_vinculado_escola = implode(',', $this->orgao_vinculado_escola);
- $mantenedora_escola_privada = implode(',', $this->mantenedora_escola_privada);
- $local_funcionamento = implode(',', $this->local_funcionamento);
- $abastecimento_agua = implode(',', $this->abastecimento_agua);
- $abastecimento_energia = implode(',', $this->abastecimento_energia);
- $esgoto_sanitario = implode(',', $this->esgoto_sanitario);
- $destinacao_lixo = implode(',', $this->destinacao_lixo);
- $tratamento_lixo = implode(',', $this->tratamento_lixo);
- $salas_funcionais = implode(',', $this->salas_funcionais);
- $salas_gerais = implode(',', $this->salas_gerais);
- $banheiros = implode(',', $this->banheiros);
- $laboratorios = implode(',', $this->laboratorios);
- $salas_atividades = implode(',', $this->salas_atividades);
- $dormitorios = implode(',', $this->dormitorios);
- $areas_externas = implode(',', $this->areas_externas);
- $recursos_acessibilidade = implode(',', $this->recursos_acessibilidade);
- $equipamentos = implode(',', $this->equipamentos);
- $uso_internet = implode(',', $this->uso_internet);
- $rede_local = implode(',', $this->rede_local);
- $equipamentos_acesso_internet = implode(',', $this->equipamentos_acesso_internet);
- $organizacao_ensino = implode(',', $this->organizacao_ensino);
- $instrumentos_pedagogicos = implode(',', $this->instrumentos_pedagogicos);
- $orgaos_colegiados = implode(',', $this->orgaos_colegiados);
- $reserva_vagas_cotas = implode(',', $this->reserva_vagas_cotas);
- $codigo_lingua_indigena = implode(',', $this->codigo_lingua_indigena);
+
+ $this->preparaDados();
if (!$this->validaDigitosInepEscola($this->escola_inep_id, 'Código INEP')) {
return false;
@@ -1495,301 +1473,250 @@ public function Novo()
$this->validateManagersRules();
- for ($i = 1; $i <= 6; $i++) {
- $seq = $i == 1 ? '' : $i;
- $campo = 'codigo_inep_escola_compartilhada'.$seq;
- $ret = $this->validaDigitosInepEscola($this->$campo, 'Código da escola que compartilha o prédio '.$i);
- if (!$ret) {
- return false;
- }
+ if (!$this->validaDigitosInepEscolaCompartilhada()) {
+ return false;
}
if (!$this->validaOpcoesUnicasMultipleSearch()) {
return false;
}
+ if (! isset($this->pessoaj_id_oculto) ||
+ ! is_int((int)$this->pessoaj_id_oculto)
+ ) {
+ $this->mensagem = 'Erro ao selecionar a pessoa jurídica';
+ return false;
+ }
+
+ $pessoaJuridica = (new clsJuridica((int)$this->pessoaj_id_oculto))->detalhe();
+
+ if ($pessoaJuridica === false) {
+ throw new \iEducar\Support\Exceptions\Exception('Pessoa jurídica não encontrada');
+ }
+
$this->bloquear_lancamento_diario_anos_letivos_encerrados = is_null($this->bloquear_lancamento_diario_anos_letivos_encerrados) ? 0 : 1;
$this->utiliza_regra_diferenciada = !is_null($this->utiliza_regra_diferenciada);
- if ($this->com_cnpj) {
- $objPessoa = new clsPessoa_(false, $this->fantasia, $this->pessoa_logada, $this->p_http, 'J', false, false, $this->p_email);
- $this->ref_idpes = $objPessoa->cadastra();
-
- if ($this->ref_idpes) {
- $obj_pes_juridica = new clsJuridica($this->ref_idpes, $this->cnpj, $this->fantasia, false, false, $this->pessoa_logada);
- $cadastrou = $obj_pes_juridica->cadastra();
-
- if ($cadastrou) {
- $obj = new clsPmieducarEscola(null, $this->pessoa_logada, null, $this->ref_cod_instituicao, $this->zona_localizacao, $this->ref_cod_escola_rede_ensino, $this->ref_idpes, $this->sigla, null, null, 1, null, $this->bloquear_lancamento_diario_anos_letivos_encerrados);
- $obj->situacao_funcionamento = $this->situacao_funcionamento;
- $obj->dependencia_administrativa = $this->dependencia_administrativa;
- $obj->orgao_vinculado_escola = $orgao_vinculado_escola;
- $obj->latitude = $this->latitude;
- $obj->longitude = $this->longitude;
- $obj->regulamentacao = $this->regulamentacao;
- $obj->ref_idpes_gestor = $this->gestor_id;
- $obj->cargo_gestor = $this->cargo_gestor;
- $obj->email_gestor = $this->email_gestor;
- $obj->local_funcionamento = $local_funcionamento;
- $obj->condicao = $this->condicao;
- $obj->predio_compartilhado_outra_escola = $this->predio_compartilhado_outra_escola;
- $obj->codigo_inep_escola_compartilhada = $this->codigo_inep_escola_compartilhada;
- $obj->codigo_inep_escola_compartilhada2 = $this->codigo_inep_escola_compartilhada2;
- $obj->codigo_inep_escola_compartilhada3 = $this->codigo_inep_escola_compartilhada3;
- $obj->codigo_inep_escola_compartilhada4 = $this->codigo_inep_escola_compartilhada4;
- $obj->codigo_inep_escola_compartilhada5 = $this->codigo_inep_escola_compartilhada5;
- $obj->codigo_inep_escola_compartilhada6 = $this->codigo_inep_escola_compartilhada6;
- $obj->agua_potavel_consumo = $this->agua_potavel_consumo;
- $obj->abastecimento_agua = $abastecimento_agua;
- $obj->abastecimento_energia = $abastecimento_energia;
- $obj->esgoto_sanitario = $esgoto_sanitario;
- $obj->destinacao_lixo = $destinacao_lixo;
- $obj->tratamento_lixo = $tratamento_lixo;
- $obj->alimentacao_escolar_alunos = $this->alimentacao_escolar_alunos;
- $obj->compartilha_espacos_atividades_integracao = $this->compartilha_espacos_atividades_integracao;
- $obj->usa_espacos_equipamentos_atividades_regulares = $this->usa_espacos_equipamentos_atividades_regulares;
- $obj->salas_funcionais = $salas_funcionais;
- $obj->salas_gerais = $salas_gerais;
- $obj->banheiros = $banheiros;
- $obj->laboratorios = $laboratorios;
- $obj->salas_atividades = $salas_atividades;
- $obj->dormitorios = $dormitorios;
- $obj->areas_externas = $areas_externas;
- $obj->recursos_acessibilidade = $recursos_acessibilidade;
- $obj->possui_dependencias = $this->possui_dependencias;
- $obj->numero_salas_utilizadas_dentro_predio = $this->numero_salas_utilizadas_dentro_predio;
- $obj->numero_salas_utilizadas_fora_predio = $this->numero_salas_utilizadas_fora_predio;
- $obj->numero_salas_climatizadas = $this->numero_salas_climatizadas;
- $obj->numero_salas_acessibilidade = $this->numero_salas_acessibilidade;
- $obj->total_funcionario = $this->total_funcionario;
- $obj->atendimento_aee = $this->atendimento_aee;
- $obj->fundamental_ciclo = $this->fundamental_ciclo;
- $obj->organizacao_ensino = $organizacao_ensino;
- $obj->instrumentos_pedagogicos = $instrumentos_pedagogicos;
- $obj->orgaos_colegiados = $orgaos_colegiados;
- $obj->exame_selecao_ingresso = $this->exame_selecao_ingresso;
- $obj->reserva_vagas_cotas = $reserva_vagas_cotas;
- $obj->projeto_politico_pedagogico = $this->projeto_politico_pedagogico;
- $obj->localizacao_diferenciada = $this->localizacao_diferenciada;
- $obj->educacao_indigena = $this->educacao_indigena;
- $obj->lingua_ministrada = $this->lingua_ministrada;
- $obj->codigo_lingua_indigena = $this->codigo_lingua_indigena;
- $obj->codigo_lingua_indigena = $codigo_lingua_indigena;
- $obj->equipamentos = $equipamentos;
- $obj->uso_internet = $uso_internet;
- $obj->rede_local = $rede_local;
- $obj->equipamentos_acesso_internet = $equipamentos_acesso_internet;
- $obj->quantidade_computadores_alunos_mesa = $this->quantidade_computadores_alunos_mesa;
- $obj->quantidade_computadores_alunos_portateis = $this->quantidade_computadores_alunos_portateis;
- $obj->quantidade_computadores_alunos_tablets = $this->quantidade_computadores_alunos_tablets;
- $obj->lousas_digitais = $this->lousas_digitais;
- $obj->televisoes = $this->televisoes;
- $obj->dvds = $this->dvds;
- $obj->aparelhos_de_som = $this->aparelhos_de_som;
- $obj->projetores_digitais = $this->projetores_digitais;
- $obj->acesso_internet = $this->acesso_internet;
- $obj->ato_criacao = $this->ato_criacao;
- $obj->ato_autorizativo = $this->ato_autorizativo;
- $obj->ref_idpes_secretario_escolar = $this->secretario_id;
- $obj->unidade_vinculada_outra_instituicao = $this->unidade_vinculada_outra_instituicao;
- $obj->inep_escola_sede = $this->inep_escola_sede;
- $obj->codigo_ies = $this->codigo_ies_id;
- $obj->categoria_escola_privada = $this->categoria_escola_privada;
- $obj->conveniada_com_poder_publico = $this->conveniada_com_poder_publico;
- $obj->mantenedora_escola_privada = $mantenedora_escola_privada;
- $obj->cnpj_mantenedora_principal = idFederal2int($this->cnpj_mantenedora_principal);
- $obj->esfera_administrativa = $this->esfera_administrativa;
- $obj->iddis = (int)$this->district_id;
- foreach ($this->inputsRecursos as $key => $value) {
- $obj->{$key} = $this->{$key};
- }
+ $cod_escola = $this->cadastraEscola((int)$this->pessoaj_id_oculto);
- $cod_escola = $cadastrou1 = $obj->cadastra();
-
- if ($cadastrou1) {
- $escola = new clsPmieducarEscola($cod_escola);
- $escola = $escola->detalhe();
-
- $objTelefone = new clsPessoaTelefone($this->ref_idpes);
- $objTelefone->excluiTodos();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 1, str_replace('-', '', $this->p_telefone_1), $this->p_ddd_telefone_1);
- $objTelefone->cadastra();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 2, str_replace('-', '', $this->p_telefone_2), $this->p_ddd_telefone_2);
- $objTelefone->cadastra();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 3, str_replace('-', '', $this->p_telefone_mov), $this->p_ddd_telefone_mov);
- $objTelefone->cadastra();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 4, str_replace('-', '', $this->p_telefone_fax), $this->p_ddd_telefone_fax);
- $objTelefone->cadastra();
-
- $this->saveAddress($this->ref_idpes);
-
- //-----------------------CADASTRA CURSO------------------------//
- $this->escola_curso = unserialize(urldecode($this->escola_curso));
- $this->escola_curso_autorizacao = unserialize(urldecode($this->escola_curso_autorizacao));
- $this->escola_curso_anos_letivos = unserialize(urldecode($this->escola_curso_anos_letivos));
-
- if ($this->escola_curso) {
- foreach ($this->escola_curso as $campo) {
- $curso_escola = new clsPmieducarEscolaCurso($cadastrou1, $campo, null, $this->pessoa_logada, null, null, 1, $this->escola_curso_autorizacao[$campo], $this->escola_curso_anos_letivos[$campo]);
- $cadastrou_ = $curso_escola->cadastra();
-
- if (!$cadastrou_) {
- $this->mensagem = 'Cadastro não realizado.
';
-
- return false;
- }
- }
-
- $this->storeManagers($cod_escola);
- }
- //-----------------------FIM CADASTRA CURSO------------------------//
- } else {
- $this->mensagem = 'Cadastro não realizado (clsPmieducarEscola).
';
+ if ($cod_escola === false) {
+ return false;
+ }
- return false;
- }
- } else {
- $this->mensagem = 'Cadastro não realizado (clsJuridica).
';
+ $this->processaTelefones($this->pessoaj_id_oculto);
- return false;
- }
+ $this->saveAddress($this->ref_idpes);
- $this->saveInep($escola['cod_escola']);
+ if (!$this->cadastraEscolaCurso($cod_escola, false)) {
+ return false;
+ }
- $this->mensagem .= 'Cadastro efetuado com sucesso.
';
+ $this->saveInep($cod_escola);
- throw new HttpResponseException(
- new RedirectResponse('educar_escola_lst.php')
- );
- } else {
- $this->mensagem = 'Cadastro não realizado (clsPessoa_).
';
+ $this->atualizaNomePessoaJuridica($this->ref_idpes);
+
+ $this->mensagem .= 'Cadastro efetuado com sucesso.
';
+ throw new HttpResponseException(
+ new RedirectResponse('educar_escola_lst.php')
+ );
+ }
+
+ private function validaDigitosInepEscolaCompartilhada()
+ {
+ for ($i = 1; $i <= 6; $i++) {
+ $seq = $i == 1 ? '' : $i;
+ $campo = 'codigo_inep_escola_compartilhada'.$seq;
+ $ret = $this->validaDigitosInepEscola($this->$campo, 'Código da escola que compartilha o prédio '.$i);
+ if (!$ret) {
return false;
}
- } elseif ($this->sem_cnpj) {
- $obj = new clsPmieducarEscola(null, $this->pessoa_logada, null, $this->ref_cod_instituicao, $this->zona_localizacao, $this->ref_cod_escola_rede_ensino, null, $this->sigla, null, null, 1, null, $this->bloquear_lancamento_diario_anos_letivos_encerrados, $this->utiliza_regra_diferenciada);
- $obj->dependencia_administrativa = $this->dependencia_administrativa;
- $obj->orgao_vinculado_escola = $orgao_vinculado_escola;
- $obj->latitude = $this->latitude;
- $obj->longitude = $this->longitude;
- $obj->regulamentacao = $this->regulamentacao;
- $obj->situacao_funcionamento = $this->situacao_funcionamento;
- $obj->ref_idpes_gestor = $this->gestor_id;
- $obj->cargo_gestor = $this->cargo_gestor;
- $obj->email_gestor = $this->email_gestor;
- $obj->local_funcionamento = $local_funcionamento;
- $obj->condicao = $this->condicao;
- $obj->predio_compartilhado_outra_escola = $this->predio_compartilhado_outra_escola;
- $obj->codigo_inep_escola_compartilhada = $this->codigo_inep_escola_compartilhada;
- $obj->codigo_inep_escola_compartilhada2 = $this->codigo_inep_escola_compartilhada2;
- $obj->codigo_inep_escola_compartilhada3 = $this->codigo_inep_escola_compartilhada3;
- $obj->codigo_inep_escola_compartilhada4 = $this->codigo_inep_escola_compartilhada4;
- $obj->codigo_inep_escola_compartilhada5 = $this->codigo_inep_escola_compartilhada5;
- $obj->codigo_inep_escola_compartilhada6 = $this->codigo_inep_escola_compartilhada6;
- $obj->agua_potavel_consumo = $this->agua_potavel_consumo;
- $obj->abastecimento_agua = $abastecimento_agua;
- $obj->abastecimento_energia = $abastecimento_energia;
- $obj->esgoto_sanitario = $esgoto_sanitario;
- $obj->destinacao_lixo = $destinacao_lixo;
- $obj->tratamento_lixo = $tratamento_lixo;
- $obj->alimentacao_escolar_alunos = $this->alimentacao_escolar_alunos;
- $obj->compartilha_espacos_atividades_integracao = $this->compartilha_espacos_atividades_integracao;
- $obj->usa_espacos_equipamentos_atividades_regulares = $this->usa_espacos_equipamentos_atividades_regulares;
- $obj->salas_funcionais = $salas_funcionais;
- $obj->salas_gerais = $salas_gerais;
- $obj->banheiros = $banheiros;
- $obj->laboratorios = $laboratorios;
- $obj->salas_atividades = $salas_atividades;
- $obj->dormitorios = $dormitorios;
- $obj->areas_externas = $areas_externas;
- $obj->recursos_acessibilidade = $recursos_acessibilidade;
- $obj->possui_dependencias = $this->possui_dependencias;
- $obj->numero_salas_utilizadas_dentro_predio = $this->numero_salas_utilizadas_dentro_predio;
- $obj->numero_salas_utilizadas_fora_predio = $this->numero_salas_utilizadas_fora_predio;
- $obj->numero_salas_climatizadas = $this->numero_salas_climatizadas;
- $obj->numero_salas_acessibilidade = $this->numero_salas_acessibilidade;
- $obj->total_funcionario = $this->total_funcionario;
- $obj->atendimento_aee = $this->atendimento_aee;
- $obj->fundamental_ciclo = $this->fundamental_ciclo;
- $obj->organizacao_ensino = $this->organizacao_ensino;
- $obj->instrumentos_pedagogicos = $this->instrumentos_pedagogicos;
- $obj->orgaos_colegiados = $orgaos_colegiados;
- $obj->exame_selecao_ingresso = $this->exame_selecao_ingresso;
- $obj->reserva_vagas_cotas = $reserva_vagas_cotas;
- $obj->projeto_politico_pedagogico = $this->projeto_politico_pedagogico;
- $obj->localizacao_diferenciada = $this->localizacao_diferenciada;
- $obj->educacao_indigena = $this->educacao_indigena;
- $obj->lingua_ministrada = $this->lingua_ministrada;
- $obj->codigo_lingua_indigena = $this->codigo_lingua_indigena;
- $obj->codigo_lingua_indigena = $codigo_lingua_indigena;
- $obj->equipamentos = $equipamentos;
- $obj->uso_internet = $uso_internet;
- $obj->rede_local = $rede_local;
- $obj->equipamentos_acesso_internet = $equipamentos_acesso_internet;
- $obj->quantidade_computadores_alunos_mesa = $this->quantidade_computadores_alunos_mesa;
- $obj->quantidade_computadores_alunos_portateis = $this->quantidade_computadores_alunos_portateis;
- $obj->quantidade_computadores_alunos_tablets = $this->quantidade_computadores_alunos_tablets;
- $obj->lousas_digitais = $this->lousas_digitais;
- $obj->televisoes = $this->televisoes;
- $obj->dvds = $this->dvds;
- $obj->aparelhos_de_som = $this->aparelhos_de_som;
- $obj->projetores_digitais = $this->projetores_digitais;
- $obj->acesso_internet = $this->acesso_internet;
- $obj->ato_criacao = $this->ato_criacao;
- $obj->ato_autorizativo = $this->ato_autorizativo;
- $obj->ref_idpes_secretario_escolar = $this->secretario_id;
- $obj->unidade_vinculada_outra_instituicao = $this->unidade_vinculada_outra_instituicao;
- $obj->inep_escola_sede = $this->inep_escola_sede;
- $obj->codigo_ies = $this->codigo_ies_id;
- $obj->categoria_escola_privada = $this->categoria_escola_privada;
- $obj->conveniada_com_poder_publico = $this->conveniada_com_poder_publico;
- $obj->mantenedora_escola_privada = $mantenedora_escola_privada;
- $obj->cnpj_mantenedora_principal = idFederal2int($this->cnpj_mantenedora_principal);
- $obj->esfera_administrativa = $this->esfera_administrativa;
- $obj->iddis = (int)$this->district_id;
- foreach ($this->inputsRecursos as $key => $value) {
- $obj->{$key} = $this->{$key};
+ }
+ return true;
+ }
+
+ private function cadastraEscolaCurso($cod_escola, $excluirEscolaCursos = false)
+ {
+ if ($excluirEscolaCursos === true) {
+ (new clsPmieducarEscolaCurso($this->cod_escola))->excluirTodos();
+ }
+
+ $this->escola_curso = unserialize(urldecode($this->escola_curso), ['stdclass']);
+ $this->escola_curso_autorizacao = unserialize(urldecode($this->escola_curso_autorizacao), ['stdclass']);
+ $this->escola_curso_anos_letivos = unserialize(urldecode($this->escola_curso_anos_letivos), ['stdclass']);
+
+ if ($this->escola_curso) {
+ foreach ($this->escola_curso as $campo) {
+ $curso_escola = new clsPmieducarEscolaCurso($cod_escola, $campo, null, $this->pessoa_logada, null, null, 1, $this->escola_curso_autorizacao[$campo], $this->escola_curso_anos_letivos[$campo]);
+ $cadastrou_ = $curso_escola->cadastra();
+
+ if (!$cadastrou_) {
+ $this->mensagem = 'Cadastro não realizado.
';
+ return false;
+ }
}
- $cod_escola = $cadastrou = $obj->cadastra();
+ $this->storeManagers($cod_escola);
+ }
- if ($cadastrou) {
- $escola = new clsPmieducarEscola($cod_escola);
- $escola = $escola->detalhe();
+ return true;
+ }
- //-----------------------CADASTRA CURSO------------------------//
- $this->escola_curso = unserialize(urldecode($this->escola_curso));
- $this->escola_curso_autorizacao = unserialize(urldecode($this->escola_curso_autorizacao));
- $this->escola_curso_anos_letivos = unserialize(urldecode($this->escola_curso_anos_letivos));
+ private function constroiObjetoEscola($pessoaj_id_oculto, $escola = null)
+ {
+ if($escola instanceof clsPmieducarEscola) {
+ $obj = $escola;
+ } else {
+ $obj = new clsPmieducarEscola(null, $this->pessoa_logada, null, $this->ref_cod_instituicao, $this->zona_localizacao, $this->ref_cod_escola_rede_ensino,$pessoaj_id_oculto, $this->sigla, null, null, 1, null, $this->bloquear_lancamento_diario_anos_letivos_encerrados);
+ }
+
+ $obj->situacao_funcionamento = $this->situacao_funcionamento;
+ $obj->dependencia_administrativa = $this->dependencia_administrativa;
+ $obj->orgao_vinculado_escola = $this->orgao_vinculado_escola;
+ $obj->latitude = $this->latitude;
+ $obj->longitude = $this->longitude;
+ $obj->regulamentacao = $this->regulamentacao;
+ $obj->ref_idpes_gestor = $this->gestor_id;
+ $obj->cargo_gestor = $this->cargo_gestor;
+ $obj->email_gestor = $this->email_gestor;
+ $obj->local_funcionamento = $this->local_funcionamento;
+ $obj->condicao = $this->condicao;
+ $obj->predio_compartilhado_outra_escola = $this->predio_compartilhado_outra_escola;
+ $obj->codigo_inep_escola_compartilhada = $this->codigo_inep_escola_compartilhada;
+ $obj->codigo_inep_escola_compartilhada2 = $this->codigo_inep_escola_compartilhada2;
+ $obj->codigo_inep_escola_compartilhada3 = $this->codigo_inep_escola_compartilhada3;
+ $obj->codigo_inep_escola_compartilhada4 = $this->codigo_inep_escola_compartilhada4;
+ $obj->codigo_inep_escola_compartilhada5 = $this->codigo_inep_escola_compartilhada5;
+ $obj->codigo_inep_escola_compartilhada6 = $this->codigo_inep_escola_compartilhada6;
+ $obj->agua_potavel_consumo = $this->agua_potavel_consumo;
+ $obj->abastecimento_agua = $this->abastecimento_agua;
+ $obj->abastecimento_energia = $this->abastecimento_energia;
+ $obj->esgoto_sanitario = $this->esgoto_sanitario;
+ $obj->destinacao_lixo = $this->destinacao_lixo;
+ $obj->tratamento_lixo = $this->tratamento_lixo;
+ $obj->alimentacao_escolar_alunos = $this->alimentacao_escolar_alunos;
+ $obj->compartilha_espacos_atividades_integracao = $this->compartilha_espacos_atividades_integracao;
+ $obj->usa_espacos_equipamentos_atividades_regulares = $this->usa_espacos_equipamentos_atividades_regulares;
+ $obj->salas_funcionais = $this->salas_funcionais;
+ $obj->salas_gerais = $this->salas_gerais;
+ $obj->banheiros = $this->banheiros;
+ $obj->laboratorios = $this->laboratorios;
+ $obj->salas_atividades = $this->salas_atividades;
+ $obj->dormitorios = $this->dormitorios;
+ $obj->areas_externas = $this->areas_externas;
+ $obj->recursos_acessibilidade = $this->recursos_acessibilidade;
+ $obj->possui_dependencias = $this->possui_dependencias;
+ $obj->numero_salas_utilizadas_dentro_predio = $this->numero_salas_utilizadas_dentro_predio;
+ $obj->numero_salas_utilizadas_fora_predio = $this->numero_salas_utilizadas_fora_predio;
+ $obj->numero_salas_climatizadas = $this->numero_salas_climatizadas;
+ $obj->numero_salas_acessibilidade = $this->numero_salas_acessibilidade;
+ $obj->total_funcionario = $this->total_funcionario;
+ $obj->atendimento_aee = $this->atendimento_aee;
+ $obj->fundamental_ciclo = $this->fundamental_ciclo;
+ $obj->organizacao_ensino = $this->organizacao_ensino;
+ $obj->instrumentos_pedagogicos = $this->instrumentos_pedagogicos;
+ $obj->orgaos_colegiados = $this->orgaos_colegiados;
+ $obj->exame_selecao_ingresso = $this->exame_selecao_ingresso;
+ $obj->reserva_vagas_cotas = $this->reserva_vagas_cotas;
+ $obj->projeto_politico_pedagogico = $this->projeto_politico_pedagogico;
+ $obj->localizacao_diferenciada = $this->localizacao_diferenciada;
+ $obj->educacao_indigena = $this->educacao_indigena;
+ $obj->lingua_ministrada = $this->lingua_ministrada;
+ $obj->codigo_lingua_indigena = $this->codigo_lingua_indigena;
+ $obj->equipamentos = $this->equipamentos;
+ $obj->uso_internet = $this->uso_internet;
+ $obj->rede_local = $this->rede_local;
+ $obj->equipamentos_acesso_internet = $this->equipamentos_acesso_internet;
+ $obj->quantidade_computadores_alunos_mesa = $this->quantidade_computadores_alunos_mesa;
+ $obj->quantidade_computadores_alunos_portateis = $this->quantidade_computadores_alunos_portateis;
+ $obj->quantidade_computadores_alunos_tablets = $this->quantidade_computadores_alunos_tablets;
+ $obj->lousas_digitais = $this->lousas_digitais;
+ $obj->televisoes = $this->televisoes;
+ $obj->dvds = $this->dvds;
+ $obj->aparelhos_de_som = $this->aparelhos_de_som;
+ $obj->projetores_digitais = $this->projetores_digitais;
+ $obj->acesso_internet = $this->acesso_internet;
+ $obj->ato_criacao = $this->ato_criacao;
+ $obj->ato_autorizativo = $this->ato_autorizativo;
+ $obj->ref_idpes_secretario_escolar = $this->secretario_id;
+ $obj->unidade_vinculada_outra_instituicao = $this->unidade_vinculada_outra_instituicao;
+ $obj->inep_escola_sede = $this->inep_escola_sede;
+ $obj->codigo_ies = $this->codigo_ies_id;
+ $obj->categoria_escola_privada = $this->categoria_escola_privada;
+ $obj->conveniada_com_poder_publico = $this->conveniada_com_poder_publico;
+ $obj->mantenedora_escola_privada = $this->mantenedora_escola_privada;
+ $obj->cnpj_mantenedora_principal = idFederal2int($this->cnpj_mantenedora_principal);
+ $obj->esfera_administrativa = $this->esfera_administrativa;
+ $obj->iddis = (int)$this->district_id;
+
+ foreach ($this->inputsRecursos as $key => $value) {
+ $obj->{$key} = $this->{$key};
+ }
+
+ return $obj;
+ }
- if ($this->escola_curso) {
- foreach ($this->escola_curso as $campo) {
- $curso_escola = new clsPmieducarEscolaCurso($cadastrou, $campo, null, $this->pessoa_logada, null, null, 1, $this->escola_curso_autorizacao[$campo], $this->escola_curso_anos_letivos[$campo]);
- $cadastrou_ = $curso_escola->cadastra();
+ private function processaTelefones($idpes)
+ {
+ $objTelefone = new clsPessoaTelefone($idpes);
+ $objTelefone->excluiTodos();
- if (!$cadastrou_) {
- $this->mensagem = 'Cadastro não realizado.
';
+ $this->cadastraTelefone($idpes, 1, str_replace('-', '', $this->p_telefone_1), $this->p_ddd_telefone_1);
+ $this->cadastraTelefone($idpes, 2, str_replace('-', '', $this->p_telefone_2), $this->p_ddd_telefone_2);
+ $this->cadastraTelefone($idpes, 3, str_replace('-', '', $this->p_telefone_mov), $this->p_ddd_telefone_mov);
+ $this->cadastraTelefone($idpes,4, str_replace('-', '', $this->p_telefone_fax), $this->p_ddd_telefone_fax);
- return false;
- }
- }
+ }
- $this->storeManagers($cod_escola);
- }
- $this->saveInep($escola['cod_escola']);
- //-----------------------FIM CADASTRA CURSO------------------------//
+ private function cadastraTelefone($idpes,$tipo,$telefone, $ddd)
+ {
+ return (new clsPessoaTelefone($idpes, $tipo, $telefone, $ddd, $this->pessoa_logada))->cadastra();
+ }
- $this->mensagem .= 'Cadastro efetuado com sucesso.
';
+ public function cadastraEscola(int $pessoaj_id_oculto)
+ {
+ $escola = $this->constroiObjetoEscola($pessoaj_id_oculto);
- throw new HttpResponseException(
- new RedirectResponse('educar_escola_lst.php')
- );
- } else {
- $this->mensagem = 'Cadastro não realizado (clsPmieducarEscola).
';
+ $cod_escola = $escola->cadastra();
- return false;
- }
+ if ($cod_escola === false) {
+ $this->mensagem = 'Cadastro não realizado
';
+ return false;
}
+
+ return $cod_escola;
+ }
+
+ /**
+ * Coloca os dados disponíveis no objeto da classe para serem lidos no @method cadastraEscola()
+ */
+ public function preparaDados()
+ {
+ $this->orgao_vinculado_escola = implode(',', $this->orgao_vinculado_escola);
+ $this->mantenedora_escola_privada = implode(',', $this->mantenedora_escola_privada);
+ $this->local_funcionamento = implode(',', $this->local_funcionamento);
+ $this->abastecimento_agua = implode(',', $this->abastecimento_agua);
+ $this->abastecimento_energia = implode(',', $this->abastecimento_energia);
+ $this->esgoto_sanitario = implode(',', $this->esgoto_sanitario);
+ $this->destinacao_lixo = implode(',', $this->destinacao_lixo);
+ $this->tratamento_lixo = implode(',', $this->tratamento_lixo);
+ $this->salas_funcionais = implode(',', $this->salas_funcionais);
+ $this->salas_gerais = implode(',', $this->salas_gerais);
+ $this->banheiros = implode(',', $this->banheiros);
+ $this->laboratorios = implode(',', $this->laboratorios);
+ $this->salas_atividades = implode(',', $this->salas_atividades);
+ $this->dormitorios = implode(',', $this->dormitorios);
+ $this->areas_externas = implode(',', $this->areas_externas);
+ $this->recursos_acessibilidade = implode(',', $this->recursos_acessibilidade);
+ $this->equipamentos = implode(',', $this->equipamentos);
+ $this->uso_internet = implode(',', $this->uso_internet);
+ $this->rede_local = implode(',', $this->rede_local);
+ $this->equipamentos_acesso_internet = implode(',', $this->equipamentos_acesso_internet);
+ $this->organizacao_ensino = implode(',', $this->organizacao_ensino);
+ $this->instrumentos_pedagogicos = implode(',', $this->instrumentos_pedagogicos);
+ $this->orgaos_colegiados = implode(',', $this->orgaos_colegiados);
+ $this->reserva_vagas_cotas = implode(',', $this->reserva_vagas_cotas);
+ $this->codigo_lingua_indigena = implode(',', $this->codigo_lingua_indigena);
}
public function Editar()
@@ -1797,6 +1724,8 @@ public function Editar()
$obj_permissoes = new clsPermissoes();
$obj_permissoes->permissao_cadastra(561, $this->pessoa_logada, 7, 'educar_escola_lst.php');
+ $this->preparaDados();
+
if (!$this->validaDigitosInepEscola($this->escola_inep_id, 'Código INEP')) {
return false;
}
@@ -1815,326 +1744,52 @@ public function Editar()
$this->validateManagersRules();
- for ($i = 1; $i <= 6; $i++) {
- $seq = $i == 1 ? '' : $i;
- $campo = 'codigo_inep_escola_compartilhada'.$seq;
- $ret = $this->validaDigitosInepEscola($this->$campo, 'Código da escola que compartilha o prédio '.$i);
- if (!$ret) {
- return false;
- }
+ if (!$this->validaDigitosInepEscolaCompartilhada()) {
+ return false;
}
- $orgao_vinculado_escola = implode(',', $this->orgao_vinculado_escola);
- $mantenedora_escola_privada = implode(',', $this->mantenedora_escola_privada);
- $local_funcionamento = implode(',', $this->local_funcionamento);
- $abastecimento_agua = implode(',', $this->abastecimento_agua);
- $abastecimento_energia = implode(',', $this->abastecimento_energia);
- $esgoto_sanitario = implode(',', $this->esgoto_sanitario);
- $destinacao_lixo = implode(',', $this->destinacao_lixo);
- $tratamento_lixo = implode(',', $this->tratamento_lixo);
- $salas_funcionais = implode(',', $this->salas_funcionais);
- $salas_gerais = implode(',', $this->salas_gerais);
- $banheiros = implode(',', $this->banheiros);
- $laboratorios = implode(',', $this->laboratorios);
- $salas_atividades = implode(',', $this->salas_atividades);
- $dormitorios = implode(',', $this->dormitorios);
- $areas_externas = implode(',', $this->areas_externas);
- $recursos_acessibilidade = implode(',', $this->recursos_acessibilidade);
- $equipamentos = implode(',', $this->equipamentos);
- $uso_internet = implode(',', $this->uso_internet);
- $rede_local = implode(',', $this->rede_local);
- $equipamentos_acesso_internet = implode(',', $this->equipamentos_acesso_internet);
- $organizacao_ensino = implode(',', $this->organizacao_ensino);
- $instrumentos_pedagogicos = implode(',', $this->instrumentos_pedagogicos);
- $orgaos_colegiados = implode(',', $this->orgaos_colegiados);
- $reserva_vagas_cotas = implode(',', $this->reserva_vagas_cotas);
- $codigo_lingua_indigena = implode(',', $this->codigo_lingua_indigena);
-
if (!$this->validaOpcoesUnicasMultipleSearch()) {
return false;
}
$this->bloquear_lancamento_diario_anos_letivos_encerrados = is_null($this->bloquear_lancamento_diario_anos_letivos_encerrados) ? 0 : 1;
$this->utiliza_regra_diferenciada = !is_null($this->utiliza_regra_diferenciada);
- $obj = new clsPmieducarEscola($this->cod_escola);
- $escolaDetAntigo = $obj->detalhe();
- $this->ref_idpes = $this->ref_idpes ?? $escolaDetAntigo['ref_idpes'];
- if ($this->cod_escola) {
- $obj = new clsPmieducarEscola($this->cod_escola, null, $this->pessoa_logada, $this->ref_cod_instituicao, $this->zona_localizacao, $this->ref_cod_escola_rede_ensino, $this->ref_idpes, $this->sigla, null, null, 1, $this->bloquear_lancamento_diario_anos_letivos_encerrados, $this->utiliza_regra_diferenciada);
- $obj->dependencia_administrativa = $this->dependencia_administrativa;
- $obj->orgao_vinculado_escola = $orgao_vinculado_escola;
- $obj->latitude = $this->latitude;
- $obj->longitude = $this->longitude;
- $obj->regulamentacao = $this->regulamentacao;
- $obj->situacao_funcionamento = $this->situacao_funcionamento;
- $obj->ref_idpes_gestor = $this->gestor_id;
- $obj->cargo_gestor = $this->cargo_gestor;
- $obj->email_gestor = $this->email_gestor;
- $obj->local_funcionamento = $local_funcionamento;
- $obj->condicao = $this->condicao;
- $obj->predio_compartilhado_outra_escola = $this->predio_compartilhado_outra_escola;
- $obj->codigo_inep_escola_compartilhada = $this->codigo_inep_escola_compartilhada;
- $obj->codigo_inep_escola_compartilhada2 = $this->codigo_inep_escola_compartilhada2;
- $obj->codigo_inep_escola_compartilhada3 = $this->codigo_inep_escola_compartilhada3;
- $obj->codigo_inep_escola_compartilhada4 = $this->codigo_inep_escola_compartilhada4;
- $obj->codigo_inep_escola_compartilhada5 = $this->codigo_inep_escola_compartilhada5;
- $obj->codigo_inep_escola_compartilhada6 = $this->codigo_inep_escola_compartilhada6;
- $obj->agua_potavel_consumo = $this->agua_potavel_consumo;
- $obj->abastecimento_agua = $abastecimento_agua;
- $obj->abastecimento_energia = $abastecimento_energia;
- $obj->esgoto_sanitario = $esgoto_sanitario;
- $obj->destinacao_lixo = $destinacao_lixo;
- $obj->tratamento_lixo = $tratamento_lixo;
- $obj->alimentacao_escolar_alunos = $this->alimentacao_escolar_alunos;
- $obj->compartilha_espacos_atividades_integracao = $this->compartilha_espacos_atividades_integracao;
- $obj->usa_espacos_equipamentos_atividades_regulares = $this->usa_espacos_equipamentos_atividades_regulares;
- $obj->salas_funcionais = $salas_funcionais;
- $obj->salas_gerais = $salas_gerais;
- $obj->banheiros = $banheiros;
- $obj->laboratorios = $laboratorios;
- $obj->salas_atividades = $salas_atividades;
- $obj->dormitorios = $dormitorios;
- $obj->areas_externas = $areas_externas;
- $obj->recursos_acessibilidade = $recursos_acessibilidade;
- $obj->possui_dependencias = $this->possui_dependencias;
- $obj->numero_salas_utilizadas_dentro_predio = $this->numero_salas_utilizadas_dentro_predio;
- $obj->numero_salas_utilizadas_fora_predio = $this->numero_salas_utilizadas_fora_predio;
- $obj->numero_salas_climatizadas = $this->numero_salas_climatizadas;
- $obj->numero_salas_acessibilidade = $this->numero_salas_acessibilidade;
- $obj->total_funcionario = $this->total_funcionario;
- $obj->atendimento_aee = $this->atendimento_aee;
- $obj->fundamental_ciclo = $this->fundamental_ciclo;
- $obj->organizacao_ensino = $organizacao_ensino;
- $obj->instrumentos_pedagogicos = $instrumentos_pedagogicos;
- $obj->orgaos_colegiados = $orgaos_colegiados;
- $obj->exame_selecao_ingresso = $this->exame_selecao_ingresso;
- $obj->reserva_vagas_cotas = $reserva_vagas_cotas;
- $obj->projeto_politico_pedagogico = $this->projeto_politico_pedagogico;
- $obj->localizacao_diferenciada = $this->localizacao_diferenciada;
- $obj->educacao_indigena = $this->educacao_indigena;
- $obj->lingua_ministrada = $this->lingua_ministrada;
- $obj->codigo_lingua_indigena = $this->codigo_lingua_indigena;
- $obj->codigo_lingua_indigena = $codigo_lingua_indigena;
- $obj->equipamentos = $equipamentos;
- $obj->uso_internet = $uso_internet;
- $obj->rede_local = $rede_local;
- $obj->equipamentos_acesso_internet = $equipamentos_acesso_internet;
- $obj->quantidade_computadores_alunos_mesa = $this->quantidade_computadores_alunos_mesa;
- $obj->quantidade_computadores_alunos_portateis = $this->quantidade_computadores_alunos_portateis;
- $obj->quantidade_computadores_alunos_tablets = $this->quantidade_computadores_alunos_tablets;
- $obj->lousas_digitais = $this->lousas_digitais;
- $obj->televisoes = $this->televisoes;
- $obj->dvds = $this->dvds;
- $obj->aparelhos_de_som = $this->aparelhos_de_som;
- $obj->projetores_digitais = $this->projetores_digitais;
- $obj->acesso_internet = $this->acesso_internet;
- $obj->ato_criacao = $this->ato_criacao;
- $obj->ato_autorizativo = $this->ato_autorizativo;
- $obj->ref_idpes_secretario_escolar = $this->secretario_id;
- $obj->unidade_vinculada_outra_instituicao = $this->unidade_vinculada_outra_instituicao;
- $obj->inep_escola_sede = $this->inep_escola_sede;
- $obj->codigo_ies = $this->codigo_ies_id;
- $obj->categoria_escola_privada = $this->categoria_escola_privada;
- $obj->conveniada_com_poder_publico = $this->conveniada_com_poder_publico;
- $obj->mantenedora_escola_privada = $mantenedora_escola_privada;
- $obj->cnpj_mantenedora_principal = idFederal2int($this->cnpj_mantenedora_principal);
- $obj->esfera_administrativa = $this->esfera_administrativa;
- $obj->iddis = (int)$this->district_id;
- foreach ($this->inputsRecursos as $key => $value) {
- $obj->{$key} = $this->{$key};
- }
- $editou = $obj->edita();
+ $obj = new clsPmieducarEscola($this->cod_escola, null, $this->pessoa_logada, $this->ref_cod_instituicao, $this->zona_localizacao, $this->ref_cod_escola_rede_ensino, $this->ref_idpes, $this->sigla, null, null, 1, $this->bloquear_lancamento_diario_anos_letivos_encerrados, $this->utiliza_regra_diferenciada);
- if ($editou) {
- $escolaDetAtual = $obj->detalhe();
- }
- } else {
- $obj = new clsPmieducarEscola(null, $this->pessoa_logada, null, $this->ref_cod_instituicao, $this->zona_localizacao, $this->ref_cod_escola_rede_ensino, $this->ref_idpes, $this->sigla, null, null, 1, $this->bloquear_lancamento_diario_anos_letivos_encerrados, $this->utiliza_regra_diferenciada);
- $obj->situacao_funcionamento = $this->situacao_funcionamento;
- $obj->dependencia_administrativa = $this->dependencia_administrativa;
- $obj->orgao_vinculado_escola = $orgao_vinculado_escola;
- $obj->latitude = $this->latitude;
- $obj->longitude = $this->longitude;
- $obj->regulamentacao = $this->regulamentacao;
- $obj->ref_idpes_gestor = $this->gestor_id;
- $obj->cargo_gestor = $this->cargo_gestor;
- $obj->email_gestor = $this->email_gestor;
- $obj->local_funcionamento = $local_funcionamento;
- $obj->condicao = $this->condicao;
- $obj->predio_compartilhado_outra_escola = $this->predio_compartilhado_outra_escola;
- $obj->codigo_inep_escola_compartilhada = $this->codigo_inep_escola_compartilhada;
- $obj->codigo_inep_escola_compartilhada2 = $this->codigo_inep_escola_compartilhada2;
- $obj->codigo_inep_escola_compartilhada3 = $this->codigo_inep_escola_compartilhada3;
- $obj->codigo_inep_escola_compartilhada4 = $this->codigo_inep_escola_compartilhada4;
- $obj->codigo_inep_escola_compartilhada5 = $this->codigo_inep_escola_compartilhada5;
- $obj->codigo_inep_escola_compartilhada6 = $this->codigo_inep_escola_compartilhada6;
- $obj->agua_potavel_consumo = $this->agua_potavel_consumo;
- $obj->abastecimento_agua = $abastecimento_agua;
- $obj->abastecimento_energia = $abastecimento_energia;
- $obj->esgoto_sanitario = $esgoto_sanitario;
- $obj->destinacao_lixo = $destinacao_lixo;
- $obj->tratamento_lixo = $tratamento_lixo;
- $obj->alimentacao_escolar_alunos = $this->alimentacao_escolar_alunos;
- $obj->compartilha_espacos_atividades_integracao = $this->compartilha_espacos_atividades_integracao;
- $obj->usa_espacos_equipamentos_atividades_regulares = $this->usa_espacos_equipamentos_atividades_regulares;
- $obj->salas_funcionais = $salas_funcionais;
- $obj->salas_gerais = $salas_gerais;
- $obj->banheiros = $banheiros;
- $obj->laboratorios = $laboratorios;
- $obj->salas_atividades = $salas_atividades;
- $obj->dormitorios = $dormitorios;
- $obj->areas_externas = $areas_externas;
- $obj->recursos_acessibilidade = $recursos_acessibilidade;
- $obj->possui_dependencias = $this->possui_dependencias;
- $obj->numero_salas_utilizadas_dentro_predio = $this->numero_salas_utilizadas_dentro_predio;
- $obj->numero_salas_utilizadas_fora_predio = $this->numero_salas_utilizadas_fora_predio;
- $obj->numero_salas_climatizadas = $this->numero_salas_climatizadas;
- $obj->numero_salas_acessibilidade = $this->numero_salas_acessibilidade;
- $obj->total_funcionario = $this->total_funcionario;
- $obj->atendimento_aee = $this->atendimento_aee;
- $obj->fundamental_ciclo = $this->fundamental_ciclo;
- $obj->organizacao_ensino = $organizacao_ensino;
- $obj->instrumentos_pedagogicos = $instrumentos_pedagogicos;
- $obj->orgaos_colegiados = $orgaos_colegiados;
- $obj->exame_selecao_ingresso = $this->exame_selecao_ingresso;
- $obj->reserva_vagas_cotas = $reserva_vagas_cotas;
- $obj->projeto_politico_pedagogico = $this->projeto_politico_pedagogico;
- $obj->localizacao_diferenciada = $this->localizacao_diferenciada;
- $obj->educacao_indigena = $this->educacao_indigena;
- $obj->lingua_ministrada = $this->lingua_ministrada;
- $obj->codigo_lingua_indigena = $this->codigo_lingua_indigena;
- $obj->codigo_lingua_indigena = $codigo_lingua_indigena;
- $obj->equipamentos = $equipamentos;
- $obj->uso_internet = $uso_internet;
- $obj->rede_local = $rede_local;
- $obj->equipamentos_acesso_internet = $equipamentos_acesso_internet;
- $obj->quantidade_computadores_alunos_mesa = $this->quantidade_computadores_alunos_mesa;
- $obj->quantidade_computadores_alunos_portateis = $this->quantidade_computadores_alunos_portateis;
- $obj->quantidade_computadores_alunos_tablets = $this->quantidade_computadores_alunos_tablets;
- $obj->lousas_digitais = $this->lousas_digitais;
- $obj->televisoes = $this->televisoes;
- $obj->dvds = $this->dvds;
- $obj->aparelhos_de_som = $this->aparelhos_de_som;
- $obj->projetores_digitais = $this->projetores_digitais;
- $obj->acesso_internet = $this->acesso_internet;
- $obj->ato_criacao = $this->ato_criacao;
- $obj->ato_autorizativo = $this->ato_autorizativo;
- $obj->ref_idpes_secretario_escolar = $this->secretario_id;
- $obj->unidade_vinculada_outra_instituicao = $this->unidade_vinculada_outra_instituicao;
- $obj->inep_escola_sede = $this->inep_escola_sede;
- $obj->codigo_ies = $this->codigo_ies_id;
- $obj->categoria_escola_privada = $this->categoria_escola_privada;
- $obj->conveniada_com_poder_publico = $this->conveniada_com_poder_publico;
- $obj->mantenedora_escola_privada = $mantenedora_escola_privada;
- $obj->cnpj_mantenedora_principal = idFederal2int($this->cnpj_mantenedora_principal);
- $obj->esfera_administrativa = $this->esfera_administrativa;
- $obj->iddis = (int)$this->district_id;
- foreach ($this->inputsRecursos as $key => $value) {
- $obj->{$key} = $this->{$key};
- }
+ $escola = $this->constroiObjetoEscola($this->ref_idpes, $obj);
- $this->cod_escola = $editou = $obj->cadastra();
+ $edita = $escola->edita();
- if ($this->cod_escola) {
- $obj = new clsPmieducarEscola($this->cod_escola);
- $escolaDetAtual = $obj->detalhe();
- }
+ if ($edita === false) {
+ $this->mensagem = 'Edição não efetuada.
';
+ return false;
}
- if ($editou) {
- if ($this->com_cnpj) {
- $objPessoa = new clsPessoa_($this->ref_idpes, null, false, $this->p_http, false, $this->pessoa_logada, date('Y-m-d H:i:s', time()), $this->p_email);
- $editou1 = $objPessoa->edita();
-
- if ($editou1) {
- $obj_pes_juridica = new clsJuridica($this->ref_idpes, $this->cnpj, $this->fantasia, false, false, false, $this->pessoa_logada);
- $editou2 = $obj_pes_juridica->edita();
-
- if ($editou2) {
- $objTelefone = new clsPessoaTelefone($this->ref_idpes);
- $objTelefone->excluiTodos();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 1, str_replace('-', '', $this->p_telefone_1), $this->p_ddd_telefone_1);
- $objTelefone->cadastra();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 2, str_replace('-', '', $this->p_telefone_2), $this->p_ddd_telefone_2);
- $objTelefone->cadastra();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 3, str_replace('-', '', $this->p_telefone_mov), $this->p_ddd_telefone_mov);
- $objTelefone->cadastra();
- $objTelefone = new clsPessoaTelefone($this->ref_idpes, 4, str_replace('-', '', $this->p_telefone_fax), $this->p_ddd_telefone_fax);
- $objTelefone->cadastra();
-
- $this->saveAddress($this->ref_idpes);
-
- //-----------------------EDITA CURSO------------------------//
- $this->escola_curso = unserialize(urldecode($this->escola_curso));
- $this->escola_curso_autorizacao = unserialize(urldecode($this->escola_curso_autorizacao));
- $this->escola_curso_anos_letivos = unserialize(urldecode($this->escola_curso_anos_letivos));
- $obj = new clsPmieducarEscolaCurso($this->cod_escola);
- $excluiu = $obj->excluirTodos();
-
- if ($excluiu) {
- if ($this->escola_curso) {
- foreach ($this->escola_curso as $campo) {
- $obj = new clsPmieducarEscolaCurso($this->cod_escola, $campo, null, $this->pessoa_logada, null, null, 1, $this->escola_curso_autorizacao[$campo], $this->escola_curso_anos_letivos[$campo]);
- $cadastrou_ = $obj->cadastra();
-
- if (!$cadastrou_) {
- $this->mensagem = 'Edição não realizada.
';
-
- return false;
- }
- }
- }
- }
-
- $this->storeManagers($this->cod_escola);
-
- $this->saveInep($this->cod_escola);
- //-----------------------FIM EDITA CURSO------------------------//
- $this->mensagem .= 'Edição efetuada com sucesso.
';
-
- throw new HttpResponseException(
- new RedirectResponse('educar_escola_lst.php')
- );
- }
- }
- } elseif ($this->sem_cnpj) {
- //-----------------------EDITA CURSO------------------------//
- $this->escola_curso = unserialize(urldecode($this->escola_curso));
- $this->escola_curso_autorizacao = unserialize(urldecode($this->escola_curso_autorizacao));
- $this->escola_curso_anos_letivos = unserialize(urldecode($this->escola_curso_anos_letivos));
- $obj = new clsPmieducarEscolaCurso($this->cod_escola);
- $excluiu = $obj->excluirTodos();
-
- if ($excluiu) {
- if ($this->escola_curso) {
- foreach ($this->escola_curso as $campo) {
- $obj = new clsPmieducarEscolaCurso($this->cod_escola, $campo, null, $this->pessoa_logada, null, null, 1, $this->escola_curso_autorizacao[$campo], $this->escola_curso_anos_letivos[$campo]);
- $cadastrou_ = $obj->cadastra();
- if (!$cadastrou_) {
- $this->mensagem = 'Edição não realizada.
';
-
- return false;
- }
- }
- }
- }
-
- $this->storeManagers($this->cod_escola);
+ $this->processaTelefones($this->ref_idpes);
- $this->saveInep($this->cod_escola);
- //-----------------------FIM EDITA CURSO------------------------//
- $this->mensagem .= 'Edição efetuada com sucesso.
';
+ $this->saveAddress($this->ref_idpes);
- throw new HttpResponseException(
- new RedirectResponse('educar_escola_lst.php')
- );
- }
+ if (!$this->cadastraEscolaCurso($this->cod_escola,true)) {
+ return false;
}
- $this->mensagem = 'Edição não realizada.
';
+ $this->storeManagers($this->cod_escola);
- return false;
+ $this->saveInep($this->cod_escola);
+
+ $this->atualizaNomePessoaJuridica($this->ref_idpes);
+
+ $this->mensagem = 'Edição efetuada com sucesso.
';
+
+ throw new HttpResponseException(
+ new RedirectResponse('educar_escola_lst.php')
+ );
+ }
+
+ private function atualizaNomePessoaJuridica($idpes)
+ {
+ (new clsJuridica($idpes, null, $this->fantasia))->edita();
}
public function Excluir()
@@ -2142,20 +1797,19 @@ public function Excluir()
$obj_permissoes = new clsPermissoes();
$obj_permissoes->permissao_cadastra(561, $this->pessoa_logada, 3, 'educar_escola_lst.php');
$obj = new clsPmieducarEscola($this->cod_escola, null, $this->pessoa_logada, null, null, null, null, null, null, null, 0);
- $escola = $obj->detalhe();
+ $obj->detalhe();
$excluiu = $obj->excluir();
- if ($excluiu) {
- $this->mensagem .= 'Exclusão efetuada com sucesso.
';
-
- throw new HttpResponseException(
- new RedirectResponse('educar_escola_lst.php')
- );
+ if ($excluiu === false) {
+ $this->mensagem = 'Exclusão não realizada.
';
+ return false;
}
- $this->mensagem = 'Exclusão não realizada.
';
+ $this->mensagem = 'Exclusão efetuada com sucesso.
';
- return false;
+ throw new HttpResponseException(
+ new RedirectResponse('educar_escola_lst.php')
+ );
}
protected function inputTelefone($type, $typeLabel = '')
{
@@ -2170,7 +1824,7 @@ protected function inputTelefone($type, $typeLabel = '')
'placeholder' => 'DDD',
'value' => $this->{"p_ddd_telefone_{$type}"},
'max_length' => 3,
- 'size' => 3,
+ 'size' => 4,
'inline' => true,
];
$this->inputsHelper()->integer("p_ddd_telefone_{$type}", $options);
@@ -2311,7 +1965,7 @@ protected function validaTelefones($telefone1, $telefone2)
return true;
}
- protected function validaDDDTelefone($valorDDD = null, $valorTelefone = null, $nomeCampo)
+ protected function validaDDDTelefone($valorDDD, $valorTelefone, $nomeCampo)
{
$msgRequereTelefone = "O campo: {$nomeCampo}, deve ser preenchido quando o DDD estiver preenchido.";
$msgRequereDDD = "O campo: DDD, deve ser preenchido quando o {$nomeCampo} estiver preenchido.";
@@ -2812,7 +2466,9 @@ protected function validaRecursos()
$this->mensagem = "O campo: {$label} não pode ser preenchido com 0";
return false;
- } elseif ((int) $this->{$key} > 0) {
+ }
+
+ if ((int) $this->{$key} > 0) {
$algumCampoPreenchido = true;
}
}
diff --git a/ieducar/intranet/educar_importacao_educacenso.php b/ieducar/intranet/educar_importacao_educacenso.php
index 706059b031..98e74ab6dc 100644
--- a/ieducar/intranet/educar_importacao_educacenso.php
+++ b/ieducar/intranet/educar_importacao_educacenso.php
@@ -33,7 +33,9 @@ public function Gerar()
null => 'Selecione',
'2019' => '2019',
'2020' => '2020',
+ '2021' => '2021',
];
+
$options = [
'label' => 'Ano',
'resources' => $resources,
diff --git a/ieducar/intranet/educar_matricula_cad.php b/ieducar/intranet/educar_matricula_cad.php
index 5ff7e31cb1..f692535ea7 100644
--- a/ieducar/intranet/educar_matricula_cad.php
+++ b/ieducar/intranet/educar_matricula_cad.php
@@ -424,7 +424,10 @@ public function Novo()
if (is_array($m) && count($m) && !$dependencia) {
$curso = $this->getCurso($this->ref_cod_curso);
- if ($m['ref_ref_cod_serie'] == $this->ref_cod_serie) {
+ $cursoADeferir = new clsPmieducarCurso($this->ref_cod_curso);
+ $cursoDeAtividadeComplementar = $cursoADeferir->cursoDeAtividadeComplementar();
+
+ if ($m['ref_ref_cod_serie'] == $this->ref_cod_serie && !$cursoDeAtividadeComplementar) {
$this->mensagem = 'Este aluno já está matriculado nesta série e curso, não é possivel matricular um aluno mais de uma vez na mesma série.
';
return false;
diff --git a/ieducar/intranet/educar_servidor_cad.php b/ieducar/intranet/educar_servidor_cad.php
index 4df9b12265..3ba5fb5d6e 100644
--- a/ieducar/intranet/educar_servidor_cad.php
+++ b/ieducar/intranet/educar_servidor_cad.php
@@ -136,6 +136,8 @@ public function Inicializar()
$obj_servidor_disciplina = new clsPmieducarServidorDisciplina();
$lst_servidor_disciplina = $obj_servidor_disciplina->lista(null, $this->ref_cod_instituicao, $this->cod_servidor);
+ Session::forget("servant:{$this->cod_servidor}");
+
if ($lst_servidor_disciplina) {
foreach ($lst_servidor_disciplina as $disciplina) {
$funcoes[$disciplina['ref_cod_funcao']][$disciplina['ref_cod_curso']][] = $disciplina['ref_cod_disciplina'];
@@ -796,8 +798,6 @@ public function cadastraFuncoes()
}
}
- $this->excluiFuncoesRemovidas($listFuncoesCadastradas);
-
if (!$existe_funcao_professor) {
$this->excluiDisciplinas(array_keys($funcoes));
$this->excluiCursos();
@@ -841,6 +841,18 @@ public function cadastraFuncoes()
}
}
}
+
+ $funcoesRemovidas = $funcoes;
+
+ foreach ($listFuncoesCadastradas as $funcao) {
+ unset($funcoesRemovidas[$funcao]);
+ }
+
+ if (count($funcoesRemovidas) > 0) {
+ $this->excluiDisciplinas(array_keys($funcoesRemovidas));
+ }
+
+ $this->excluiFuncoesRemovidas($listFuncoesCadastradas);
}
}
diff --git a/ieducar/intranet/educar_turma_cad.php b/ieducar/intranet/educar_turma_cad.php
index 19a4b01fda..432292591e 100644
--- a/ieducar/intranet/educar_turma_cad.php
+++ b/ieducar/intranet/educar_turma_cad.php
@@ -1126,7 +1126,7 @@ private function validaEtapaEducacenso()
}
if ($course->modalidade_curso == 2 && !in_array($this->etapa_educacenso, [1, 2, 3, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 56, 39, 40, 69, 70, 71, 72, 73, 74, 64, 67, 68])) {
- $this->mensagem = 'Quando a modalidade do curso é: Educação Especial - Modalidade Substitutiva, o campo: Etapa de ensino deve ser uma das seguintes opções: 1, 2, 3, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 56, 39, 40, 69, 70, 71, 72, 73, 74, 64, 67 ou 68.';
+ $this->mensagem = 'Quando a modalidade do curso é: Educação especial, o campo: Etapa de ensino deve ser uma das seguintes opções: 1, 2, 3, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 41, 56, 39, 40, 69, 70, 71, 72, 73, 74, 64, 67 ou 68.';
return false;
}
diff --git a/ieducar/intranet/educar_turma_lst.php b/ieducar/intranet/educar_turma_lst.php
index e997f2a5c0..08ef669fda 100644
--- a/ieducar/intranet/educar_turma_lst.php
+++ b/ieducar/intranet/educar_turma_lst.php
@@ -81,7 +81,7 @@ public function Gerar()
$this->ano = date('Y');
}
- $this->inputsHelper()->dynamic(['ano', 'instituicao', 'escola', 'curso', 'serie']);
+ $this->inputsHelper()->dynamic(['ano', 'instituicao', 'escola', 'curso', 'serie'], ['ano' => $this->ano]);
$this->campoTexto('nm_turma', 'Turma', $this->nm_turma, 30, 255, false);
$this->campoLista('visivel', 'Situação', ['' => 'Selecione', '1' => 'Ativo', '2' => 'Inativo'], $this->visivel, null, null, null, null, null, false);
diff --git a/ieducar/intranet/educar_usuario_cad.php b/ieducar/intranet/educar_usuario_cad.php
index c722b57210..3ad55d6af2 100644
--- a/ieducar/intranet/educar_usuario_cad.php
+++ b/ieducar/intranet/educar_usuario_cad.php
@@ -1,8 +1,13 @@
validatesPassword($this->matricula, $this->_senha)) {
+ try {
+ $this->validatesPassword($this->_senha);
+ } catch (ValidationException $ex) {
+ $this->mensagem = $ex->validator->errors()->first();
return false;
}
@@ -272,18 +280,20 @@ public function Editar()
// Ao editar não é necessário trocar a senha, então apenas quando algo
// for informado é que a mesma será alterada.
-
- $senha = null;
-
if ($this->_senha) {
- if (!$this->validatesPassword($this->matricula, $this->_senha)) {
+ $legacyEmployee = LegacyEmployee::find($this->ref_pessoa);
+ $changeUserPasswordService = app(ChangeUserPasswordService::class);
+ try {
+ $changeUserPasswordService->execute($legacyEmployee, $this->_senha);
+ } catch (ValidationException $ex){
+ $this->mensagem = $ex->validator->errors()->first();
return false;
}
-
- $senha = Hash::make($this->_senha);
}
- $obj_funcionario = new clsPortalFuncionario($this->ref_pessoa, $this->matricula, $senha, $this->ativo, null, null, null, null, null, null, null, null, null, null, $this->ref_cod_funcionario_vinculo, $this->tempo_expira_senha, Portabilis_Date_Utils::brToPgSQL($this->data_expiracao), 'NOW()', 'NOW()', $this->pessoa_logada, 0, 0, null, 0, null, $this->email, $this->matricula_interna);
+ $data_reativa_conta = $this->hasChangeStatusUser() && $this->ativo == '1' ? 'NOW()' : null;
+
+ $obj_funcionario = new clsPortalFuncionario($this->ref_pessoa, $this->matricula, null, $this->ativo, null, null, null, null, null, null, null, null, null, null, $this->ref_cod_funcionario_vinculo, $this->tempo_expira_senha, Portabilis_Date_Utils::brToPgSQL($this->data_expiracao), null, $data_reativa_conta, $this->pessoa_logada, 0, 0, null, 0, null, $this->email, $this->matricula_interna);
if ($obj_funcionario->edita()) {
if ($this->ref_cod_instituicao) {
@@ -374,25 +384,6 @@ public function validatesUniquenessOfMatricula($pessoaId, $matricula)
return true;
}
- public function validatesPassword($matricula, $password)
- {
- $msg = '';
-
- if ($password == $matricula) {
- $msg = 'Informe uma senha diferente da matricula.';
- } elseif (strlen($password) < 8) {
- $msg = 'Por favor informe uma senha segura, com pelo menos 8 caracteres.';
- }
-
- if ($msg) {
- $this->mensagem = $msg;
-
- return false;
- }
-
- return true;
- }
-
public function excluiTodosVinculosEscola($codUsuario)
{
$usuarioEscola = new clsPmieducarEscolaUsuario();
@@ -451,4 +442,16 @@ public function Formular()
$this->title = 'Cadastro de usuários';
$this->processoAp = 555;
}
+
+ public function hasChangeStatusUser(): bool
+ {
+ $legacyEmployer = LegacyEmployee::find($this->ref_pessoa);
+ return $legacyEmployer->ativo != $this->ativo;
+ }
+
+ public function validatesPassword($password)
+ {
+ $validateUserPasswordService = app(ValidateUserPasswordService::class);
+ $validateUserPasswordService->execute($password);
+ }
};
diff --git a/ieducar/intranet/empresas_cad.php b/ieducar/intranet/empresas_cad.php
index 6ea5fe6841..7d684260c0 100644
--- a/ieducar/intranet/empresas_cad.php
+++ b/ieducar/intranet/empresas_cad.php
@@ -1,6 +1,7 @@
busca_empresa = $_POST['busca_empresa'];
- $this->cod_pessoa_fj = $_GET['idpes'];
+ $this->cod_pessoa_fj = is_numeric($_GET['idpes']) ? (int) $_GET['idpes'] : null;
$this->idpes_cad = $this->pessoa_logada;
- if ($this->busca_empresa) {
- $this->cnpj = $this->busca_empresa;
- $this->busca_empresa = idFederal2int($this->busca_empresa);
- $this->retorno = 'Novo';
- $objPessoa = new clsPessoaJuridica();
- list($this->cod_pessoa_fj) = $objPessoa->queryRapidaCNPJ($this->busca_empresa, 'idpes');
- }
+ $this->retorno = 'Novo';
if ($this->cod_pessoa_fj) {
$this->busca_empresa = true;
$objPessoaJuridica = new clsPessoaJuridica($this->cod_pessoa_fj);
$detalhePessoaJuridica = $objPessoaJuridica->detalhe();
- //echo "
"; - //print_r($detalhePessoaJuridica); - //die(); $this->email = $detalhePessoaJuridica['email']; $this->url = $detalhePessoaJuridica['url']; $this->insc_est = $detalhePessoaJuridica['insc_estadual']; $this->capital_social = $detalhePessoaJuridica['capital_social']; $this->razao_social = $detalhePessoaJuridica['nome']; $this->fantasia = $detalhePessoaJuridica['fantasia']; - $this->cnpj = int2CNPJ($detalhePessoaJuridica['cnpj']); + $this->cnpj = validaCNPJ($detalhePessoaJuridica['cnpj']) ? int2CNPJ($detalhePessoaJuridica['cnpj']) : null; $this->ddd_telefone_1 = $detalhePessoaJuridica['ddd_1']; $this->telefone_1 = $detalhePessoaJuridica['fone_1']; $this->ddd_telefone_2 = $detalhePessoaJuridica['ddd_2']; @@ -77,7 +68,7 @@ public function Inicializar() $this->nome_url_cancelar = 'Cancelar'; - $nomeMenu = $this->retorno == 'Editar' ? $this->retorno : 'Cadastrar'; + $nomeMenu = $this->retorno === 'Editar' ? $this->retorno : 'Cadastrar'; $this->breadcrumb("{$nomeMenu} pessoa jurídica", [ url('intranet/educar_pessoas_index.php') => 'Pessoas', @@ -88,41 +79,35 @@ public function Inicializar() public function Gerar() { - if (!$this->busca_empresa) { - $this->campoCnpj('busca_empresa', 'CNPJ', $this->busca_empresa, true); - } else { - $this->url_cancelar = ($this->retorno == 'Editar') ? "empresas_det.php?cod_empresa={$this->cod_pessoa_fj}" : 'empresas_lst.php'; - - $this->campoOculto('cod_pessoa_fj', $this->cod_pessoa_fj); - $this->campoOculto('idpes_cad', $this->idpes_cad); - - // Dados da Empresa - $this->campoTexto('fantasia', 'Nome Fantasia', $this->fantasia, '50', '255', true); - $this->campoTexto('razao_social', 'Razão Social', $this->razao_social, '50', '255', true); - $this->campoTexto('capital_social', 'Capital Social', $this->capital_social, '50', '255'); - - $nivelUsuario = (new clsPermissoes)->nivel_acesso(\Illuminate\Support\Facades\Auth::id()); - if (!$this->cod_pessoa_fj || $nivelUsuario > App_Model_NivelTipoUsuario::INSTITUCIONAL) { - $this->campoRotulo('cnpj_', 'CNPJ', $this->cnpj); - $this->campoOculto('cnpj', $this->cnpj); - } else { - $this->campoCnpj('cnpj', 'CNPJ', $this->cnpj, true); - } + $this->url_cancelar = ($this->retorno === 'Editar') ? "empresas_det.php?cod_empresa={$this->cod_pessoa_fj}" : 'empresas_lst.php'; - $this->viewAddress(); + $this->campoOculto('cod_pessoa_fj', $this->cod_pessoa_fj); + $this->campoOculto('idpes_cad', $this->idpes_cad); - $this->inputTelefone('1', 'Telefone 1'); - $this->inputTelefone('2', 'Telefone 2'); - $this->inputTelefone('mov', 'Celular'); - $this->inputTelefone('fax', 'Fax'); + // Dados da Empresa + $this->campoTexto('fantasia', 'Nome Fantasia', $this->fantasia, '50', '255', true); + $this->campoTexto('razao_social', 'Razão Social', $this->razao_social, '50', '255', true); + $this->campoTexto('capital_social', 'Capital Social', $this->capital_social, '50', '255'); - // Dados da Empresa - - $this->campoTexto('url', 'Site', $this->url, '50', '255', false); - $this->campoTexto('email', 'E-mail', $this->email, '50', '255', false); - $this->campoTexto('insc_est', 'Inscrição Estadual', $this->insc_est, '20', '30', false); + if ((new clsPermissoes)->nivel_acesso(Auth::id()) > App_Model_NivelTipoUsuario::INSTITUCIONAL) { + $this->campoRotulo('cnpj_', 'CNPJ', $this->cnpj); + $this->campoOculto('cnpj', $this->cnpj); + } else { + $this->campoCnpj('cnpj', 'CNPJ', $this->cnpj); } + $this->viewAddress(); + + $this->inputTelefone('1', 'Telefone 1'); + $this->inputTelefone('2', 'Telefone 2'); + $this->inputTelefone('mov', 'Celular'); + $this->inputTelefone('fax', 'Fax'); + + // Dados da Empresa + $this->campoTexto('url', 'Site', $this->url, '50', '255'); + $this->campoTexto('email', 'E-mail', $this->email, '50', '255'); + $this->campoTexto('insc_est', 'Inscrição Estadual', $this->insc_est, '20', '30'); + Portabilis_View_Helper_Application::loadJavascript($this, [ '/modules/Cadastro/Assets/Javascripts/Addresses.js', ]); @@ -130,101 +115,100 @@ public function Gerar() public function Novo() { - $this->cnpj = idFederal2int(urldecode($this->cnpj)); - $objJuridica = new clsJuridica(false, $this->cnpj); - $detalhJuridica = $objJuridica->detalhe(); - if (!$detalhJuridica) { - $this->insc_est = idFederal2int($this->insc_est); - - $this->idpes_cad = $this->pessoa_logada; - - $objPessoa = new clsPessoa_( - false, - $this->razao_social, - $this->idpes_cad, - $this->url, - 'J', - false, - false, - $this->email - ); - $this->cod_pessoa_fj = $objPessoa->cadastra(); - - $objJuridica = new clsJuridica( - $this->cod_pessoa_fj, - $this->cnpj, - $this->fantasia, - $this->insc_est, - $this->capital_social - ); - $objJuridica->cadastra(); - - if ($this->telefone_1) { - $this->telefone_1 = str_replace('-', '', $this->telefone_1); - $this->telefone_1 = trim($this->telefone_1); - if (is_numeric($this->telefone_1) && (strlen($this->telefone_1) < 12)) { - $objTelefone = new clsPessoaTelefone( - $this->cod_pessoa_fj, - 1, - $this->telefone_1, - $this->ddd_telefone_1 - ); - $objTelefone->cadastra(); - } - } - if ($this->telefone_2) { - $this->telefone_2 = str_replace('-', '', $this->telefone_2); - $this->telefone_2 = trim($this->telefone_2); - if (is_numeric($this->telefone_2) && (strlen($this->telefone_2) < 12)) { - $objTelefone = new clsPessoaTelefone( - $this->cod_pessoa_fj, - 2, - $this->telefone_2, - $this->ddd_telefone_2 - ); - $objTelefone->cadastra(); - } - } - if ($this->telefone_mov) { - $this->telefone_mov = str_replace('-', '', $this->telefone_mov); - $this->telefone_mov = trim($this->telefone_mov); - if (is_numeric($this->telefone_mov) && (strlen($this->telefone_mov) < 12)) { - $objTelefone = new clsPessoaTelefone( - $this->cod_pessoa_fj, - 3, - $this->telefone_mov, - $this->ddd_telefone_mov - ); - $objTelefone->cadastra(); - } - } - if ($this->telefone_fax) { - $this->telefone_fax = str_replace('-', '', $this->telefone_fax); - $this->telefone_fax = trim($this->telefone_fax); - if (is_numeric($this->telefone_fax) && (strlen($this->telefone_fax) < 12)) { - $objTelefone = new clsPessoaTelefone( - $this->cod_pessoa_fj, - 4, - $this->telefone_fax, - $this->ddd_telefone_fax - ); - $objTelefone->cadastra(); - } - } + if (! empty($this->cnpj) && validaCNPJ($this->cnpj) === false) { + $this->mensagem = 'CNPJ inválido'; + return false; + } + + $this->cnpj = validaCNPJ($this->cnpj) ? idFederal2int(urldecode($this->cnpj)) : null; + + $contemPessoaJuridica = (new clsJuridica(false, $this->cnpj))->detalhe(); + if ($this->cnpj !== null && $contemPessoaJuridica) { + $this->mensagem = 'Já existe uma empresa cadastrada com este CNPJ.'; + return false; + } + + $this->insc_est = idFederal2int($this->insc_est); + $this->idpes_cad = $this->pessoa_logada; + + $objPessoa = new clsPessoa_( + false, + $this->razao_social, + $this->idpes_cad, + $this->url, + 'J', + false, + false, + $this->email + ); + + $this->cod_pessoa_fj = $objPessoa->cadastra(); + + (new clsJuridica( + $this->cod_pessoa_fj, + $this->cnpj, + $this->fantasia, + $this->insc_est, + $this->capital_social + ))->cadastra(); + + + if ($this->telefone_1) { + $this->cadastraTelefone($this->cod_pessoa_fj,1, $this->telefone_1, $this->ddd_telefone_1); + } + + if ($this->telefone_2) { + $this->cadastraTelefone($this->cod_pessoa_fj, 2,$this->telefone_2, $this->ddd_telefone_2); + } + + if ($this->telefone_mov) { + $this->cadastraTelefone($this->cod_pessoa_fj, 3,$this->telefone_mov, $this->ddd_telefone_mov); + } - $this->saveAddress($this->cod_pessoa_fj); + if ($this->telefone_fax) { + $this->cadastraTelefone($this->cod_pessoa_fj, 4,$this->telefone_fax, $this->ddd_telefone_fax); + } + + $this->saveAddress($this->cod_pessoa_fj); + + $this->simpleRedirect('empresas_lst.php'); + + return true; + } - $this->simpleRedirect('empresas_lst.php'); + private function cadastraTelefone($codPessoaJuridica, $tipo, $telefone, $dddTelefone) + { + $telefone = $this->limpaDadosTelefone($telefone); + + if ($this->validaDadosTelefone($telefone)) { + (new clsPessoaTelefone( + $codPessoaJuridica, + $tipo, + $telefone, + $dddTelefone + ))->cadastra(); } + } - $this->mensagem = 'Já existe uma empresa cadastrada com este CNPJ.'; + private function limpaDadosTelefone($telefone) + { + return trim(str_replace('-', '', $telefone)); + } - return false; + private function validaDadosTelefone($telefone) + { + return is_numeric($telefone) && (strlen($telefone) < 12); } public function Editar() { - $this->cnpj = idFederal2int(urldecode($this->cnpj)); + if (! empty($this->cnpj) && validaCNPJ($this->cnpj) === false) { + $this->mensagem = 'CNPJ inválido'; + return false; + } + + $this->cnpj = validaCNPJ($this->cnpj) ? idFederal2int(urldecode($this->cnpj)) : false; + $objJuridica = new clsJuridica(false, $this->cnpj); $detalhe = $objJuridica->detalhe(); @@ -377,7 +361,7 @@ protected function validaDadosTelefones() $this->validaDDDTelefone($this->ddd_telefone_fax, $this->telefone_fax, 'Fax'); } - protected function validaDDDTelefone($valorDDD = null, $valorTelefone = null, $nomeCampo) + protected function validaDDDTelefone($valorDDD, $valorTelefone, $nomeCampo) { $msgRequereTelefone = "O campo: {$nomeCampo}, deve ser preenchido quando o DDD estiver preenchido."; $msgRequereDDD = "O campo: DDD, deve ser preenchido quando o {$nomeCampo} estiver preenchido."; @@ -399,7 +383,7 @@ protected function validaDDDTelefone($valorDDD = null, $valorTelefone = null, $n public function Formular() { - $this->title = 'Empresas!'; + $this->_titulo = 'Empresas!'; $this->processoAp = 41; } }; diff --git a/ieducar/intranet/empresas_det.php b/ieducar/intranet/empresas_det.php index 9f13e1183c..60c89af47a 100644 --- a/ieducar/intranet/empresas_det.php +++ b/ieducar/intranet/empresas_det.php @@ -8,22 +8,22 @@ public function Gerar() $cod_empresa = @$_GET['cod_empresa']; $objPessoaJuridica = new clsPessoaJuridica(); - list($cod_pessoa_fj, $nm_pessoa, $id_federal, $endereco, $cep, $nm_bairro, $cidade, $ddd_telefone_1, $telefone_1, $ddd_telefone_2, $telefone_2, $ddd_telefone_mov, $telefone_mov, $ddd_telefone_fax, $telefone_fax, $http, $email, $ins_est, $tipo_pessoa, $razao_social, $capital_social, $ins_mun, $idtlog) = $objPessoaJuridica->queryRapida($cod_empresa, 'idpes', 'fantasia', 'cnpj', 'logradouro', 'cep', 'bairro', 'cidade', 'ddd_1', 'fone_1', 'ddd_2', 'fone_2', 'ddd_mov', 'fone_mov', 'ddd_fax', 'fone_fax', 'url', 'email', 'insc_estadual', 'tipo', 'nome', 'insc_municipal', 'idtlog'); + [$cod_pessoa_fj, $nm_pessoa, $id_federal, $endereco, $cep, $nm_bairro, $cidade, $ddd_telefone_1, $telefone_1, $ddd_telefone_2, $telefone_2, $ddd_telefone_mov, $telefone_mov, $ddd_telefone_fax, $telefone_fax, $http, $email, $ins_est, $tipo_pessoa, $razao_social, $capital_social, $ins_mun, $idtlog] = $objPessoaJuridica->queryRapida($cod_empresa, 'idpes', 'fantasia', 'cnpj', 'logradouro', 'cep', 'bairro', 'cidade', 'ddd_1', 'fone_1', 'ddd_2', 'fone_2', 'ddd_mov', 'fone_mov', 'ddd_fax', 'fone_fax', 'url', 'email', 'insc_estadual', 'tipo', 'nome', 'insc_municipal', 'idtlog'); $endereco = "$idtlog $endereco"; $db = new clsBanco(); - $this->addDetalhe(['Razão Social', $razao_social]); + $this->addDetalhe(['Razão Social', $razao_social]); $this->addDetalhe(['Nome Fantasia', $nm_pessoa]); - $this->addDetalhe(['CNPJ', int2CNPJ($id_federal)]); - $this->addDetalhe(['Endereço', $endereco]); + $this->addDetalhe(['CNPJ', empty($id_federal) ? '' : int2CNPJ($id_federal)]); + $this->addDetalhe(['Endereço', $endereco]); $this->addDetalhe(['CEP', $cep]); $this->addDetalhe(['Bairro', $nm_bairro]); $this->addDetalhe(['Cidade', $cidade]); - $this->addDetalhe(['Telefone 1', "({$ddd_telefone_1}) {$telefone_1}"]); - $this->addDetalhe(['Telefone 2', "({$ddd_telefone_2}) {$telefone_2}"]); - $this->addDetalhe(['Celular', "({$ddd_telefone_mov}) {$telefone_mov}"]); - $this->addDetalhe(['Fax', "({$ddd_telefone_fax}) {$telefone_fax}"]); + $this->addDetalhe(['Telefone 1', $this->preparaTelefone($ddd_telefone_1, $telefone_1)]); + $this->addDetalhe(['Telefone 2', $this->preparaTelefone($ddd_telefone_2, $telefone_2)]); + $this->addDetalhe(['Celular', $this->preparaTelefone( $ddd_telefone_mov, $telefone_mov)]); + $this->addDetalhe(['Fax', $this->preparaTelefone($ddd_telefone_fax, $telefone_fax)]); $this->addDetalhe(['Site', $http]); $this->addDetalhe(['E-mail', $email]); @@ -31,7 +31,7 @@ public function Gerar() if (! $ins_est) { $ins_est = 'isento'; } - $this->addDetalhe(['Inscrição Estadual', $ins_est]); + $this->addDetalhe(['Inscrição Estadual', $ins_est]); $this->addDetalhe(['Capital Social', $capital_social]); $obj_permissao = new clsPermissoes(); @@ -50,6 +50,11 @@ public function Gerar() ]); } + private function preparaTelefone($ddd, $telefone) + { + return !empty($telefone) ? "({$ddd}) {$telefone}" : ""; + } + public function Formular() { $this->title = 'Empresas'; diff --git a/ieducar/intranet/empresas_lst.php b/ieducar/intranet/empresas_lst.php index dd9069b6f3..589249874b 100644 --- a/ieducar/intranet/empresas_lst.php +++ b/ieducar/intranet/empresas_lst.php @@ -5,11 +5,11 @@ public function Gerar() { $this->titulo = 'Empresas'; - $this->addCabecalhos([ 'Razão Social', 'Nome Fantasia' ]); + $this->addCabecalhos(['Razão Social', 'Nome Fantasia' ]); - $this->campoTexto('fantasia', 'Nome Fantasia', $_GET['nm_pessoa'], '50', '255', true); - $this->campoTexto('razao_social', 'Razão Social', $_GET['razao_social'], '50', '255', true); - $this->campoCnpj('id_federal', 'CNPJ', $_GET['id_federal'], '50', '255', true); + $this->campoTexto('fantasia', 'Nome Fantasia', $_GET['fantasia'], '50', '255'); + $this->campoTexto('razao_social', 'Razão Social', $_GET['razao_social'], '50', '255'); + $this->campoCnpj('id_federal', 'CNPJ', $_GET['id_federal']); // Paginador $limite = 10; diff --git a/ieducar/intranet/include/RDStationAPI.class.php b/ieducar/intranet/include/RDStationAPI.class.php index 572921a596..8b5d756a08 100644 --- a/ieducar/intranet/include/RDStationAPI.class.php +++ b/ieducar/intranet/include/RDStationAPI.class.php @@ -64,7 +64,7 @@ protected function validateToken() $url: (String) RD Station endpoint returned by $this->getURL() $data: (Array) **/ - protected function request($method='POST', $url, $data=[]) + protected function request($method, $url, $data=[]) { $data['token_rdstation'] = $this->token; $JSONData = json_encode($data); diff --git a/ieducar/intranet/include/clsAgenda.inc.php b/ieducar/intranet/include/clsAgenda.inc.php index 24a8bb0d52..9eea2bf832 100644 --- a/ieducar/intranet/include/clsAgenda.inc.php +++ b/ieducar/intranet/include/clsAgenda.inc.php @@ -159,7 +159,7 @@ public function listaVersoes($cod_compromisso) } } - public function cadastraCompromisso($cod_compromisso = false, $titulo, $descricao, $data, $hora_inicio, $hora_fim=false, $publico = false, $importante=false, $repetir_dias=false, $repetir_qtd=false, $tipo_compromisso = false) + public function cadastraCompromisso($cod_compromisso, $titulo, $descricao, $data, $hora_inicio, $hora_fim=false, $publico = false, $importante=false, $repetir_dias=false, $repetir_qtd=false, $tipo_compromisso = false) { $db = new clsBanco(); $campos = ''; diff --git a/ieducar/intranet/include/clsCampos.inc.php b/ieducar/intranet/include/clsCampos.inc.php index 25279ef484..2921186986 100644 --- a/ieducar/intranet/include/clsCampos.inc.php +++ b/ieducar/intranet/include/clsCampos.inc.php @@ -184,7 +184,7 @@ public function campoCnpj($nome, $campo, $valor, $obrigatorio = false) $arr_componente = [ 'cnpj', $this->__adicionando_tabela ? $nome : $campo, - $obrigatorio ? "/[0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}\-[0-9]{2}/" : "*(/[0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}\-[0-9]{2}/)", + $obrigatorio ? "/[0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}\-[0-9]{2}/" : '', $valor, 20, 18, @@ -1788,12 +1788,12 @@ public function getCampoTexto( public function getCampoLista( $nome, - $id = '', - $acao = '', + $id, + $acao, $valor, $default, - $complemento = '', - $desabilitado = false, + $complemento, + $desabilitado, $class, $multiple = false ) { @@ -1844,13 +1844,13 @@ public function getCampoLista( public function getCampoMonetario( $nome, - $id = '', - $valor = '', + $id, + $valor, $tamanhovisivel, $tamanhomaximo, - $disabled = false, - $descricao = '', - $descricao2 = '', + $disabled, + $descricao, + $descricao2, $class, $evento = 'onChange', $script = '' @@ -1872,8 +1872,8 @@ public function getCampoMonetario( public function getCampoHora( $nome, - $id = '', - $valor = '', + $id, + $valor, $class, $tamanhovisivel, $tamanhomaximo, @@ -1892,9 +1892,9 @@ public function getCampoRotulo($valor) return " $valor"; } - public function getCampoCheck($nome, $id = '', $valor, $desc = '', $script = false, $disabled = false) + public function getCampoCheck($nome, $id, $valor, $desc = '', $script = false, $disabled = false) { - $id = $id ? $id : $nome; + $id = $id ?: $nome; $onClick = ''; @@ -1919,16 +1919,16 @@ public function getCampoCheck($nome, $id = '', $valor, $desc = '', $script = fal return $retorno; } - public function getCampoCNPJ($nome, $id = '', $valor, $class, $tamanhovisivel, $tamanhomaximo) + public function getCampoCNPJ($nome, $id, $valor, $class, $tamanhovisivel, $tamanhomaximo) { - $id = $id ? $id : $nome; + $id = $id ?: $nome; return ""; } - public function getCampoCPF($nome, $id = '', $valor, $class, $tamanhovisivel, $tamanhomaximo, $disabled = false, $onChange = '') + public function getCampoCPF($nome, $id, $valor, $class, $tamanhovisivel, $tamanhomaximo, $disabled = false, $onChange = '') { - $id = $id ? $id : $nome; + $id = $id ?: $nome; if ($disabled) { $disabled = 'disabled=\'disabled\''; @@ -1941,14 +1941,14 @@ public function getCampoCPF($nome, $id = '', $valor, $class, $tamanhovisivel, $t public function getCampoIdFederal( $nome, - $id = '', + $id, $valor, $class, $tamanhovisivel, $tamanhomaximo, $disabled = false ) { - $id = $id ? $id : $nome; + $id = $id ?: $nome; if ($disabled) { $disabled = 'disabled=\'disabled\''; @@ -1970,17 +1970,16 @@ public function getCampoOculto($nome, $valor, $id = '') return "\n"; } - public function getCampoData($nome, $id = '', $valor, $class, $tamanhovisivel, $tamanhomaximo, $disabled = false) + public function getCampoData($nome, $id, $valor, $class, $tamanhovisivel, $tamanhomaximo, $disabled = false) { - if ($disabled) { - $disabled = 'disabled=\'disabled\''; - } else { - $disabled = ''; + $campoDisabled = ''; + if ($disabled !== false) { + $campoDisabled = 'disabled=\'disabled\''; } - $id = $id ? $id : $nome; + $id = $id ?: $nome; - return " \n"; + return " \n"; } public function getCampoCep( @@ -2013,12 +2012,12 @@ public function getCampoCep( */ public function getCampoTextoPesquisa( $nome, - $id = '', + $id, $valor, $class, $tamanhovisivel, $tamanhomaximo, - $disabled = false, + $disabled, $caminho, $campos_serializados = null, $descricao = null, @@ -2031,7 +2030,7 @@ public function getCampoTextoPesquisa( $disabled = ''; } - $id = $id ? $id : $nome; + $id = $id ?: $nome; $retorno = " "; diff --git a/ieducar/intranet/include/funcoes.inc.php b/ieducar/intranet/include/funcoes.inc.php index 87498a4d6f..87cc896a44 100644 --- a/ieducar/intranet/include/funcoes.inc.php +++ b/ieducar/intranet/include/funcoes.inc.php @@ -321,3 +321,65 @@ function _cl($key) { return CustomLabel::getInstance()->customize($key); } + +function validaCNPJ($cnpj = null) +{ + + if (empty($cnpj)) { + return false; + } + + $cnpj = preg_replace("/[^0-9]/", "", $cnpj); + $cnpj = str_pad($cnpj, 14, '0', STR_PAD_LEFT); + + if (strlen($cnpj) != 14) { + return false; + } + + if (verificaSequencia($cnpj)) { + return false; + } + + return validaDigitosCNPJ($cnpj); +} + + function verificaSequencia($cnpj) { + return ($cnpj == '00000000000000' || + $cnpj == '11111111111111' || + $cnpj == '22222222222222' || + $cnpj == '33333333333333' || + $cnpj == '44444444444444' || + $cnpj == '55555555555555' || + $cnpj == '66666666666666' || + $cnpj == '77777777777777' || + $cnpj == '88888888888888' || + $cnpj == '99999999999999'); +} + +function validaDigitosCNPJ($cnpj): bool +{ + $j = 5; + $k = 6; + $soma1 = 0; + $soma2 = 0; + + for ($i = 0; $i < 13; $i++) { + + $j = $j == 1 ? 9 : $j; + $k = $k == 1 ? 9 : $k; + + $soma2 += ($cnpj[$i] * $k); + + if ($i < 12) { + $soma1 += ($cnpj[$i] * $j); + } + + $k--; + $j--; + } + + $digitoVerificador1 = $soma1 % 11 < 2 ? 0 : 11 - $soma1 % 11; + $digitoVerificador2 = $soma2 % 11 < 2 ? 0 : 11 - $soma2 % 11; + + return (((int) $cnpj[12] === $digitoVerificador1) && ((int)$cnpj[13] === $digitoVerificador2)); +} diff --git a/ieducar/intranet/include/pessoa/clsFuncionario.inc.php b/ieducar/intranet/include/pessoa/clsFuncionario.inc.php index 3c394fec4b..6aaebb23b3 100644 --- a/ieducar/intranet/include/pessoa/clsFuncionario.inc.php +++ b/ieducar/intranet/include/pessoa/clsFuncionario.inc.php @@ -197,7 +197,7 @@ public function listaFuncionarioUsuario( $filtros = ''; $filtro_pessoa = false; - $whereAnd = ' WHERE u.ativo = 1 AND '; + $whereAnd = ' WHERE true AND '; if (is_string($str_matricula) && $str_matricula != '') { $filtros .= "{$whereAnd} (f.matricula) LIKE ('%{$str_matricula}%')"; @@ -237,6 +237,7 @@ public function listaFuncionarioUsuario( if (is_numeric($int_ativo)) { $filtros .= "{$whereAnd} f.ativo = '$int_ativo'"; + $filtros .= "{$whereAnd} u.ativo = '$int_ativo'"; $whereAnd = ' AND '; } diff --git a/ieducar/intranet/include/pessoa/clsJuridica.inc.php b/ieducar/intranet/include/pessoa/clsJuridica.inc.php index 360a0d6a0f..f6b5b70c75 100644 --- a/ieducar/intranet/include/pessoa/clsJuridica.inc.php +++ b/ieducar/intranet/include/pessoa/clsJuridica.inc.php @@ -49,7 +49,7 @@ public function cadastra() { $db = new clsBanco(); - if (is_numeric($this->idpes) && is_numeric($this->cnpj) && is_numeric($this->idpes_cad)) { + if (is_numeric($this->idpes) && is_numeric($this->idpes_cad)) { $campos = ''; $valores = ''; if ($this->fantasia) { @@ -66,10 +66,20 @@ public function cadastra() $valores .= ", '{$this->capital_social}' "; } - $db->Consulta("INSERT INTO {$this->schema}.{$this->tabela} (idpes, cnpj, origem_gravacao, data_cad, operacao, idpes_cad $campos) VALUES ($this->idpes, '$this->cnpj', 'M', NOW(), 'I', '$this->idpes_cad' $valores)"); + /** + * Quando o CNPJ é null é preciso montar um insert específico por conta da concatenação com NULL + */ + if ($this->cnpj === null) { + $sql = "INSERT INTO {$this->schema}.{$this->tabela} (idpes, cnpj, origem_gravacao, data_cad, operacao, idpes_cad $campos) VALUES ($this->idpes, null, 'M', NOW(), 'I', '$this->idpes_cad' $valores)"; + + } else { + $sql = "INSERT INTO {$this->schema}.{$this->tabela} (idpes, cnpj, origem_gravacao, data_cad, operacao, idpes_cad $campos) VALUES ($this->idpes, '$this->cnpj', 'M', NOW(), 'I', '$this->idpes_cad' $valores)"; + } + + $db->Consulta($sql); if ($this->idpes) { - $detalhe = $this->detalhe(); + $this->detalhe(); } return true; diff --git a/ieducar/intranet/include/pmieducar/clsPmieducarExemplar.inc.php b/ieducar/intranet/include/pmieducar/clsPmieducarExemplar.inc.php index a89e0d1718..1c0b7dbcef 100644 --- a/ieducar/intranet/include/pmieducar/clsPmieducarExemplar.inc.php +++ b/ieducar/intranet/include/pmieducar/clsPmieducarExemplar.inc.php @@ -462,7 +462,7 @@ public function retorna_tombo_valido($bibliotecaId, $exceptExemplarId = null, $t * * @return array */ - public function lista_com_acervos($int_cod_exemplar = null, $int_ref_cod_fonte = null, $int_ref_cod_motivo_baixa = null, $int_ref_cod_acervo = null, $int_ref_cod_situacao = null, $int_ref_usuario_exc = null, $int_ref_usuario_cad = null, $int_permite_emprestimo = null, $int_preco = null, $date_data_cadastro_ini = null, $date_data_cadastro_fim = null, $date_data_exclusao_ini = null, $date_data_exclusao_fim = null, $int_ativo = null, $date_data_aquisicao_ini = null, $date_data_aquisicao_fim = null, $int_ref_exemplar_tipo = null, $str_titulo_livro = null, $int_ref_cod_biblioteca = null, $int_ref_cod_instituicao = null, $int_ref_cod_escola = null, $int_ref_cod_acervo_colecao = null, $int_ref_cod_acervo_editora = null, $tombo) + public function lista_com_acervos($int_cod_exemplar, $int_ref_cod_fonte, $int_ref_cod_motivo_baixa, $int_ref_cod_acervo, $int_ref_cod_situacao, $int_ref_usuario_exc, $int_ref_usuario_cad, $int_permite_emprestimo, $int_preco, $date_data_cadastro_ini, $date_data_cadastro_fim, $date_data_exclusao_ini, $date_data_exclusao_fim, $int_ativo, $date_data_aquisicao_ini, $date_data_aquisicao_fim, $int_ref_exemplar_tipo, $str_titulo_livro, $int_ref_cod_biblioteca, $int_ref_cod_instituicao, $int_ref_cod_escola, $int_ref_cod_acervo_colecao, $int_ref_cod_acervo_editora, $tombo) { $db = new clsBanco(); diff --git a/ieducar/intranet/include/pmieducar/clsPmieducarExemplarEmprestimo.inc.php b/ieducar/intranet/include/pmieducar/clsPmieducarExemplarEmprestimo.inc.php index 44429b939b..7052282db1 100644 --- a/ieducar/intranet/include/pmieducar/clsPmieducarExemplarEmprestimo.inc.php +++ b/ieducar/intranet/include/pmieducar/clsPmieducarExemplarEmprestimo.inc.php @@ -469,7 +469,7 @@ public function clienteDividaTotal($int_idpes = null, $int_cod_cliente = null, $ * * @return string */ - public function listaDividaPagamentoCliente($int_cod_cliente = null, $int_idpes = null, $int_cod_cliente_tipo = null, $int_cod_usuario, $int_cod_biblioteca = null, $int_cod_escola = null, $int_cod_instituicao = null, $pago = false) + public function listaDividaPagamentoCliente($int_cod_cliente, $int_idpes, $int_cod_cliente_tipo, $int_cod_usuario, $int_cod_biblioteca = null, $int_cod_escola = null, $int_cod_instituicao = null, $pago = false) { $obj_nivel = new clsPermissoes(); $nivel = $obj_nivel->nivel_acesso($int_cod_usuario); diff --git a/ieducar/intranet/include/pmieducar/clsPmieducarFaltaAtrasoCompensado.inc.php b/ieducar/intranet/include/pmieducar/clsPmieducarFaltaAtrasoCompensado.inc.php index 9e3bd0e5ab..dcfe2aa0d9 100644 --- a/ieducar/intranet/include/pmieducar/clsPmieducarFaltaAtrasoCompensado.inc.php +++ b/ieducar/intranet/include/pmieducar/clsPmieducarFaltaAtrasoCompensado.inc.php @@ -409,8 +409,8 @@ public function excluir() * @return array */ public function ServidorHorasCompensadas( - $int_ref_cod_servidor = null, - $int_ref_cod_escola = null, + $int_ref_cod_servidor, + $int_ref_cod_escola, $int_ref_cod_instituicao ) { if (is_numeric($int_ref_cod_servidor)) { diff --git a/ieducar/intranet/include/pmieducar/clsPmieducarHistoricoEscolar.inc.php b/ieducar/intranet/include/pmieducar/clsPmieducarHistoricoEscolar.inc.php index bfb023534e..d0e7785653 100644 --- a/ieducar/intranet/include/pmieducar/clsPmieducarHistoricoEscolar.inc.php +++ b/ieducar/intranet/include/pmieducar/clsPmieducarHistoricoEscolar.inc.php @@ -1,4 +1,4 @@ -arredondaNota($registration->cod_matricula, $average, 2); $mediaGeral = number_format($mediaGeral, 1, '.', ','); - $sql = "INSERT INTO pmieducar.historico_disciplinas values ({$sequencial}, {$this->ref_cod_aluno}, {$this->sequencial}, 'Média Geral', {$mediaGeral});"; + $sql = "INSERT INTO pmieducar.historico_disciplinas (sequencial, ref_ref_cod_aluno, ref_sequencial, nm_disciplina, nota) values ({$sequencial}, {$this->ref_cod_aluno}, {$this->sequencial}, 'Média Geral' , {$mediaGeral});"; + $db = new clsBanco(); $db->Consulta($sql); diff --git a/ieducar/intranet/include/pmieducar/clsPmieducarSerie.inc.php b/ieducar/intranet/include/pmieducar/clsPmieducarSerie.inc.php index d94309104e..8b9e41dcf5 100644 --- a/ieducar/intranet/include/pmieducar/clsPmieducarSerie.inc.php +++ b/ieducar/intranet/include/pmieducar/clsPmieducarSerie.inc.php @@ -556,7 +556,7 @@ public function lista( $filtros[] = "idade_final= '{$int_idade_final}'"; } - if (is_numeric($int_ref_cod_escola)) { + if (isset($int_ref_cod_escola)) { $condicao = " EXISTS (SELECT 1 FROM @@ -566,13 +566,13 @@ public function lista( AND es.ativo = 1 AND es.ref_cod_escola = '{$int_ref_cod_escola}' "; - if (is_numeric($ano)) { + if (isset($ano)) { $condicao .= " AND {$ano} = ANY(es.anos_letivos) "; } $condicao .= ' ) '; $filtros[] = $condicao; - } elseif (is_numeric($ano)) { + } elseif (isset($ano)) { $filtros[] = "{$whereAnd} EXISTS (SELECT 1 FROM pmieducar.escola_serie es WHERE s.cod_serie = es.ref_cod_serie diff --git a/ieducar/intranet/meusdados.php b/ieducar/intranet/meusdados.php index 786054aef6..23cef63286 100644 --- a/ieducar/intranet/meusdados.php +++ b/ieducar/intranet/meusdados.php @@ -1,8 +1,10 @@ email, FILTER_VALIDATE_EMAIL)) { - $this->mensagem = 'Formato do e-mail inválido.'; - - return false; - } - if ($this->senha != $this->senha_confirma) { - $this->mensagem = 'As senhas que você digitou não conferem.'; - - return false; - } - - if (strlen($this->senha) < 8) { - $this->mensagem = 'Por favor informe uma senha mais segura, com pelo menos 8 caracteres.'; - - return false; - } - - if (strrpos($this->senha, $this->matricula)) { - $this->mensagem = 'A senha informada é similar a sua matricula, informe outra senha.'; - - return false; - } - if (!$this->validatePhoto()) { return false; } @@ -239,7 +218,18 @@ public function Editar() $senha_old = urldecode($this->senha_old); if ($senha_old != $this->senha) { - $funcionario->senha = Hash::make($this->senha); + if ($this->senha !== $this->senha_confirma) { + $this->mensagem = 'O campo de confirmação de senha deve ser igual ao campo de confirmação da senha.'; + return false; + } + $legacyEmployee = LegacyEmployee::find($this->pessoa_logada); + $changeUserPasswordService = app(ChangeUserPasswordService::class); + try { + $changeUserPasswordService->execute($legacyEmployee, $this->senha); + } catch (ValidationException $ex){ + $this->mensagem = $ex->validator->errors()->first(); + return false; + } } $funcionario->edita(); diff --git a/ieducar/intranet/styles/custom.css b/ieducar/intranet/styles/custom.css index 4acfb213b8..69b6213efe 100644 --- a/ieducar/intranet/styles/custom.css +++ b/ieducar/intranet/styles/custom.css @@ -615,7 +615,7 @@ table.calendar .dayLastMonth, .day{ } table.calendar .day{ - background-color: #e9f0f8 !; + background-color: #e9f0f8; cursor: pointer; } diff --git a/ieducar/intranet/transporte_empresa_det.php b/ieducar/intranet/transporte_empresa_det.php index 166f33ead5..e96fa3874f 100644 --- a/ieducar/intranet/transporte_empresa_det.php +++ b/ieducar/intranet/transporte_empresa_det.php @@ -27,8 +27,8 @@ public function Gerar() $this->addDetalhe(['Código da empresa', $cod_empresa_transporte_escolar]); $this->addDetalhe(['Nome fantasia', $registro['nome_empresa']]); $this->addDetalhe(['Nome do responsável', $registro['nome_responsavel']]); - $this->addDetalhe(['CNPJ', int2CNPJ($id_federal)]); - $this->addDetalhe(['Endereço', $endereco]); + $this->addDetalhe(['CNPJ', empty($id_federal) ? '' : int2CNPJ($id_federal)]); + $this->addDetalhe(['Endereço', $endereco]); $this->addDetalhe(['CEP', $cep]); $this->addDetalhe(['Bairro', $nm_bairro]); $this->addDetalhe(['Cidade', $cidade]); @@ -50,8 +50,9 @@ public function Gerar() if (! $ins_est) { $ins_est = 'isento'; } - $this->addDetalhe(['Inscrição estadual', $ins_est]); - $this->addDetalhe(['Observação', $registro['observacao']]); + + $this->addDetalhe(['Inscrição estadual', $ins_est]); + $this->addDetalhe(['Observação', $registro['observacao']]); $this->url_cancelar = 'transporte_empresa_lst.php'; $obj_permissao = new clsPermissoes(); diff --git a/ieducar/lib/App/Unificacao/Base.php b/ieducar/lib/App/Unificacao/Base.php index a79c051aeb..cd82091b35 100644 --- a/ieducar/lib/App/Unificacao/Base.php +++ b/ieducar/lib/App/Unificacao/Base.php @@ -235,7 +235,7 @@ private function buildSqlExtraBeforeUnification(string $tableName) if ($tableName === 'pmieducar.servidor_afastamento') { $addSql .= ', sequencial = ( select - max(sequencial)+1 + COALESCE(max(sequencial)+1,1) from pmieducar.servidor_afastamento where ref_cod_servidor = ' . $this->codigoUnificador . ' ) '; diff --git a/ieducar/lib/CoreExt/Entity.php b/ieducar/lib/CoreExt/Entity.php index 91a7becc08..f30a8d919a 100644 --- a/ieducar/lib/CoreExt/Entity.php +++ b/ieducar/lib/CoreExt/Entity.php @@ -922,7 +922,7 @@ protected function _setDefaultValidatorCollection() */ public function validateIfEquals( $key, - $value = null, + $value, $validatorClassName, array $equalsParams = [], array $notEqualsParams = [] diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/Biblioteca.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/Biblioteca.php index d62abc76ee..679853f4ce 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/Biblioteca.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/Biblioteca.php @@ -61,7 +61,7 @@ public function stringInput($options = []) $inputOptions['id'] = 'biblioteca_nome'; - call_user_func_array([$this->viewInstance, 'campoRotulo'], $inputOptions); + $this->viewInstance->campoRotulo(...array_values($inputOptions)); } public function biblioteca($options = []) diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaCliente.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaCliente.php index 60f4bc0d43..39c34db19d 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaCliente.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaCliente.php @@ -36,7 +36,7 @@ public function bibliotecaPesquisaCliente($options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoTexto'], $inputOptions); + $this->viewInstance->campoTexto(...array_values($inputOptions)); $defaultHiddenInputOptions = [ 'id' => 'ref_cod_cliente', @@ -45,7 +45,7 @@ public function bibliotecaPesquisaCliente($options = []) $hiddenInputOptions = $this->mergeOptions($options['hiddenInputOptions'], $defaultHiddenInputOptions); - call_user_func_array([$this->viewInstance, 'campoOculto'], $hiddenInputOptions); + $this->viewInstance->campoOculto(...array_values($hiddenInputOptions)); Portabilis_View_Helper_Application::embedJavascript($this->viewInstance, ' var resetCliente = function(){ diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaObra.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaObra.php index cc03195fdc..637521319e 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaObra.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/BibliotecaPesquisaObra.php @@ -52,7 +52,7 @@ public function bibliotecaPesquisaObra($options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoTexto'], $inputOptions); + $this->viewInstance->campoTexto(...array_values($inputOptions)); $defaultHiddenInputOptions = [ 'id' => 'ref_cod_acervo', @@ -61,7 +61,7 @@ public function bibliotecaPesquisaObra($options = []) $hiddenInputOptions = $this->mergeOptions($options['hiddenInputOptions'], $defaultHiddenInputOptions); - call_user_func_array([$this->viewInstance, 'campoOculto'], $hiddenInputOptions); + $this->viewInstance->campoOculto(...array_values($hiddenInputOptions)); // Ao selecionar obra, na pesquisa de obra é setado o value deste elemento $this->viewInstance->campoOculto('cod_biblioteca', ''); diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/ComponenteCurricular.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/ComponenteCurricular.php index 39866c74b8..ad90a67dd2 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/ComponenteCurricular.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/ComponenteCurricular.php @@ -44,6 +44,6 @@ public function componenteCurricular($options = []) $selectOptions = $this->mergeOptions($options['options'], $defaultSelectOptions); - call_user_func_array([$this->viewInstance, 'campoLista'], $selectOptions); + $this->viewInstance->campoLista(...array_values($selectOptions)); } } diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataFinal.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataFinal.php index 08f95f7328..fd3b716af6 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataFinal.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataFinal.php @@ -34,6 +34,6 @@ public function dataFinal($options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoData'], $inputOptions); + $this->viewInstance->campoData(...array_values( $inputOptions)); } } diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataInicial.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataInicial.php index 42f42b2f1d..f131ef1d9e 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataInicial.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/DataInicial.php @@ -34,6 +34,6 @@ public function dataInicial($options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoData'], $inputOptions); + $this->viewInstance->campoData(...array_values($inputOptions)); } } diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/PesquisaAluno.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/PesquisaAluno.php index f784ba9d58..a56676f0dc 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/PesquisaAluno.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/PesquisaAluno.php @@ -52,7 +52,7 @@ public function pesquisaAluno($options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoTexto'], $inputOptions); + $this->viewInstance->campoTexto(...array_values($inputOptions)); $this->viewInstance->campoOculto('ref_cod_aluno', $this->inputValue($options['id'])); diff --git a/ieducar/lib/Portabilis/View/Helper/DynamicInput/Serie.php b/ieducar/lib/Portabilis/View/Helper/DynamicInput/Serie.php index 8db035719b..ce219a470e 100644 --- a/ieducar/lib/Portabilis/View/Helper/DynamicInput/Serie.php +++ b/ieducar/lib/Portabilis/View/Helper/DynamicInput/Serie.php @@ -15,11 +15,12 @@ protected function inputOptions($options) $cursoId = $this->getCursoId($options['cursoId'] ?? null); $userId = $this->getCurrentUserId(); $isOnlyProfessor = Portabilis_Business_Professor::isOnlyProfessor($instituicaoId, $userId); + $ano = $options['options']['ano'] ?? null; if ($isOnlyProfessor && Portabilis_Business_Professor::canLoadSeriesAlocado($instituicaoId)) { $resources = Portabilis_Business_Professor::seriesAlocado($instituicaoId, $escolaId, $cursoId, $userId); } elseif ($escolaId && $cursoId && empty($resources)) { - $resources = App_Model_IedFinder::getSeries($instituicaoId = null, $escolaId, $cursoId); + $resources = App_Model_IedFinder::getSeries($instituicaoId, $escolaId, $cursoId, $ano); } return $this->insertOption(null, 'Selecione uma série', $resources); diff --git a/ieducar/lib/Portabilis/View/Helper/Input/Ano.php b/ieducar/lib/Portabilis/View/Helper/Input/Ano.php index 21fd297968..0675d82557 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/Ano.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/Ano.php @@ -38,6 +38,6 @@ public function ano($options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoNumero'], $inputOptions); + $this->viewInstance->campoNumero(...array_values($inputOptions)); } } diff --git a/ieducar/lib/Portabilis/View/Helper/Input/Checkbox.php b/ieducar/lib/Portabilis/View/Helper/Input/Checkbox.php index c137c8ec61..21566692ac 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/Checkbox.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/Checkbox.php @@ -30,6 +30,6 @@ public function checkbox($attrName, $options = []) '; Portabilis_View_Helper_Application::embedJavascript($this->viewInstance, $js, $afterReady = false); - call_user_func_array([$this->viewInstance, 'campoCheck'], $inputOptions); + $this->viewInstance->campoCheck(...array_values($inputOptions)); } } diff --git a/ieducar/lib/Portabilis/View/Helper/Input/Date.php b/ieducar/lib/Portabilis/View/Helper/Input/Date.php index 7d976ef40c..f947d8c93d 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/Date.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/Date.php @@ -34,7 +34,7 @@ public function date($attrName, $options = []) $inputOptions['value'] = Portabilis_Date_Utils::pgSQLToBr($inputOptions['value']); } - call_user_func_array([$this->viewInstance, 'campoData'], $inputOptions); + $this->viewInstance->campoData(...array_values($inputOptions)); $this->fixupPlaceholder($inputOptions); $this->fixupOptions($inputOptions); diff --git a/ieducar/lib/Portabilis/View/Helper/Input/DateDiaMes.php b/ieducar/lib/Portabilis/View/Helper/Input/DateDiaMes.php index 1ae14598d1..1a2b585718 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/DateDiaMes.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/DateDiaMes.php @@ -37,7 +37,7 @@ public function dateDiaMes($attrName, $options = []) $inputOptions['value'] = Portabilis_Date_Utils::pgSQLToBr($inputOptions['value']); } - call_user_func_array([$this->viewInstance, 'campoDataDiaMes'], $inputOptions); + $this->viewInstance->campoDataDiaMes(...array_values($inputOptions)); $this->fixupPlaceholder($inputOptions); $this->fixupOptions($inputOptions); diff --git a/ieducar/lib/Portabilis/View/Helper/Input/Hidden.php b/ieducar/lib/Portabilis/View/Helper/Input/Hidden.php index 975143d9f0..7e75bfd53e 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/Hidden.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/Hidden.php @@ -15,6 +15,6 @@ public function hidden($attrName, $options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoOculto'], $inputOptions); + $this->viewInstance->campoOculto(...array_values($inputOptions)); } } diff --git a/ieducar/lib/Portabilis/View/Helper/Input/Numeric.php b/ieducar/lib/Portabilis/View/Helper/Input/Numeric.php index ba176a9340..dc012bf6dc 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/Numeric.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/Numeric.php @@ -53,7 +53,7 @@ public function numeric($attrName, $options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); $inputOptions['label'] = Portabilis_String_Utils::toLatin1($inputOptions['label'], ['escape' => false]); - call_user_func_array([$this->viewInstance, 'campoNumero'], $inputOptions); + $this->viewInstance->campoNumero(...array_values($inputOptions)); $this->fixupPlaceholder($inputOptions); $this->fixupValidation($inputOptions); diff --git a/ieducar/lib/Portabilis/View/Helper/Input/Select.php b/ieducar/lib/Portabilis/View/Helper/Input/Select.php index 32aab8371a..d93920042a 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/Select.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/Select.php @@ -27,6 +27,6 @@ public function select($attrName, $options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); $inputOptions['label'] = Portabilis_String_Utils::toLatin1($inputOptions['label'], ['escape' => false]); - call_user_func_array([$this->viewInstance, 'campoLista'], $inputOptions); + $this->viewInstance->campoLista(...array_values($inputOptions)); } } diff --git a/ieducar/lib/Portabilis/View/Helper/Input/Text.php b/ieducar/lib/Portabilis/View/Helper/Input/Text.php index 15609c2725..bc59089ac6 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/Text.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/Text.php @@ -31,7 +31,7 @@ public function text($attrName, $options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); $inputOptions['label'] = Portabilis_String_Utils::toLatin1($inputOptions['label'], ['escape' => false]); - call_user_func_array([$this->viewInstance, 'campoTexto'], $inputOptions); + $this->viewInstance->campoTexto(...array_values($inputOptions)); $this->fixupPlaceholder($inputOptions); } } diff --git a/ieducar/lib/Portabilis/View/Helper/Input/TextArea.php b/ieducar/lib/Portabilis/View/Helper/Input/TextArea.php index f305eba548..809e573399 100644 --- a/ieducar/lib/Portabilis/View/Helper/Input/TextArea.php +++ b/ieducar/lib/Portabilis/View/Helper/Input/TextArea.php @@ -29,7 +29,7 @@ public function textArea($attrName, $options = []) $inputOptions = $this->mergeOptions($options['options'], $defaultInputOptions); - call_user_func_array([$this->viewInstance, 'campoMemo'], $inputOptions); + $this->viewInstance->campoMemo(...array_values($inputOptions)); $this->fixupPlaceholder($inputOptions); if ($inputOptions['max_length'] > 0) { diff --git a/ieducar/modules/Api/Views/EducacensoAnaliseController.php b/ieducar/modules/Api/Views/EducacensoAnaliseController.php index 1c022d70fd..24e13477b8 100644 --- a/ieducar/modules/Api/Views/EducacensoAnaliseController.php +++ b/ieducar/modules/Api/Views/EducacensoAnaliseController.php @@ -221,6 +221,20 @@ protected function analisaEducacensoRegistro00() ]; } + if ($escola->situacaoFuncionamento == SituacaoFuncionamento::EM_ATIVIDADE && + $escola->dependenciaAdministrativa == DependenciaAdministrativaEscola::PRIVADA && + empty($escola->cnpjEscolaPrivada) + ) { + $idpesEscola = School::find($codEscola)->ref_idpes; + + $mensagem[] = [ + 'text' => "Dados para formular o registro 00 da escola {$nomeEscola} não encontrados. Verifique se o CNPJ da escola foi informado. Quando a escola possui o tipo de 'Dependência administrativa' como 'Privada', deve ser informado CNPJ.", + 'path' => '(Pessoas > Cadastros > Pessoas jurídicas > Editar > Campo: CNPJ)', + 'linkPath' => "/intranet/empresas_cad.php?idpes={$idpesEscola}", + 'fail' => true + ]; + } + if (!$escola->esferaAdministrativa && ($escola->regulamentacao == Regulamentacao::SIM || $escola->regulamentacao == Regulamentacao::EM_TRAMITACAO)) { $mensagem[] = [ 'text' => "Dados para formular o registro 00 da escola {$nomeEscola} não encontrados. Verificamos que a escola é regulamentada ou está em tramitação pelo conselho/órgão, portanto é necessário informar qual a esfera administrativa;", diff --git a/ieducar/modules/Api/Views/ReportController.php b/ieducar/modules/Api/Views/ReportController.php index 4ae2d4a86e..c54ccaef9b 100644 --- a/ieducar/modules/Api/Views/ReportController.php +++ b/ieducar/modules/Api/Views/ReportController.php @@ -2,9 +2,6 @@ use iEducar\Reports\Contracts\TeacherReportCard; -require_once 'Reports/Reports/ReportCardReport.php'; -require_once 'Reports/Reports/TeacherReportCardReport.php'; - class ReportController extends ApiCoreController { diff --git a/ieducar/modules/Avaliacao/Views/PromocaoApiController.php b/ieducar/modules/Avaliacao/Views/PromocaoApiController.php index 69e631442e..b1c8e8eecc 100644 --- a/ieducar/modules/Avaliacao/Views/PromocaoApiController.php +++ b/ieducar/modules/Avaliacao/Views/PromocaoApiController.php @@ -176,7 +176,7 @@ protected function boletimService($reload = false) return $this->_boletimServices[$matriculaId]; } - protected function getNota($etapa = null, $componenteCurricularId) + protected function getNota($etapa, $componenteCurricularId) { $notaComponente = $this->boletimService()->getNotaComponente($componenteCurricularId, $etapa); diff --git a/ieducar/modules/Cadastro/Assets/Javascripts/AlunoShow.js b/ieducar/modules/Cadastro/Assets/Javascripts/AlunoShow.js index 3ec8f7ccbb..d8d37f70c2 100644 --- a/ieducar/modules/Cadastro/Assets/Javascripts/AlunoShow.js +++ b/ieducar/modules/Cadastro/Assets/Javascripts/AlunoShow.js @@ -13,7 +13,7 @@ function fixupTabelaMatriculas() { $j('').html('Ano').appendTo($tr); $j(' ').html(stringUtils.toUtf8('Situação')).appendTo($tr); $j(' ').html('Turma').appendTo($tr); - $j(' ').html('Enturma\u00e7\u00e3o anterior').appendTo($tr); + $j(' ').html('Enturmação anterior').appendTo($tr); $j(' ').html(stringUtils.toUtf8('Série')).appendTo($tr); $j(' ').html('Curso').appendTo($tr); $j(' ').html('Escola').appendTo($tr); @@ -36,6 +36,9 @@ var handleGetMatriculas = function(dataResponse) { try{ handleMessages(dataResponse.msgs); + $j('#matriculas').remove(); + + fixupTabelaMatriculas(); var $matriculasTable = $j('#matriculas'); var transferenciaEmAberto = false; @@ -177,6 +180,7 @@ function onSituacaoChange(matricula_id, novaSituacao){ var handlePostSituacao = function(dataresponse){ handleMessages(dataresponse.msgs); + getMatriculas(); } function onDataEntradaChange(matricula_id, key, campo){ diff --git a/ieducar/modules/Cadastro/Assets/Javascripts/Escola.js b/ieducar/modules/Cadastro/Assets/Javascripts/Escola.js index f06801ca51..5caa6065c9 100644 --- a/ieducar/modules/Cadastro/Assets/Javascripts/Escola.js +++ b/ieducar/modules/Cadastro/Assets/Javascripts/Escola.js @@ -195,10 +195,13 @@ function changePossuiDependencias() { $j("#salas_gerais,#salas_funcionais,#banheiros,#laboratorios,#salas_atividades,#dormitorios,#areas_externas").trigger("chosen:updated"); } +const link = ' Caso não encontre a pessoa jurídica, cadastre em Pessoas > Cadastros > Pessoas jurídicas.'; +$j('#pessoaj_idpes').after(link); + //abas // hide nos campos das outras abas (deixando só os campos da primeira aba) -if (!$j('#cnpj').is(':visible')){ +if (!$j('#pessoaj_idpes').is(':visible')) { $j('td .formdktd:first').append(' '); $j('td .formdktd b').remove(); @@ -526,7 +529,11 @@ $j(document).ready(function() { $j('#longitude').on('change', verificaLatitudeLongitude); }); -document.getElementById('cnpj').readOnly = true; +const cnpj = document.getElementById('cnpj'); + +if (cnpj !== null) { + document.getElementById('cnpj').readOnly = true; +} function getRedeEnsino(xml_escola_rede_ensino) { diff --git a/ieducar/modules/Cadastro/Views/AlunoController.php b/ieducar/modules/Cadastro/Views/AlunoController.php index 4e01d85025..c905f8edf8 100644 --- a/ieducar/modules/Cadastro/Views/AlunoController.php +++ b/ieducar/modules/Cadastro/Views/AlunoController.php @@ -1268,7 +1268,7 @@ public function Gerar() $this->inputsHelper()->select('recebe_escolarizacao_em_outro_espaco', $options); // Projetos - $this->campoTabelaInicio('projetos', 'Projetos', ['Projeto', 'Data inclusão'], 'Data desligamento', 'Turno'); + $this->campoTabelaInicio('projetos', 'Projetos', ['Projeto', 'Data inclusão', 'Data desligamento', 'Turno']); $this->inputsHelper()->text('projeto_cod_projeto', ['required' => false]); diff --git a/public/vendor/horizon/app.js b/public/vendor/horizon/app.js index 88dc8b51af..f628ed21d5 100644 --- a/public/vendor/horizon/app.js +++ b/public/vendor/horizon/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(()=>{var e,t={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),a=n(6026),i=n(4372),o=n(5327),s=n(4097),c=n(4109),l=n(7985),u=n(5061);e.exports=function(e){return new Promise((function(t,n){var d=e.data,f=e.headers;r.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(h+":"+m)}var _=s(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),o(_,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};a(t,n,i),p=null}},p.onabort=function(){p&&(n(u("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var M=(e.withCredentials||l(_))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;M&&(f[e.xsrfHeaderName]=M)}if("setRequestHeader"in p&&r.forEach(f,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),d||(d=null),p.send(d)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),a=n(1849),i=n(321),o=n(7185);function s(e){var t=new i(e),n=a(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var c=s(n(6419));c.Axios=i,c.create=function(e){return s(o(c.defaults,e))},c.Cancel=n(5263),c.CancelToken=n(4972),c.isCancel=n(6502),c.all=function(e){return Promise.all(e)},c.spread=n(8713),c.isAxiosError=n(6268),e.exports=c,e.exports.default=c},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),a=n(5327),i=n(782),o=n(3572),s=n(7185);function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[o,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},c.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=c},782:(e,t,n)=>{"use strict";var r=n(4867);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},4097:(e,t,n)=>{"use strict";var r=n(9699),a=n(7303);e.exports=function(e,t){return e&&!r(t)?a(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,a,i){var o=new Error(e);return r(o,t,n,a,i)}},3572:(e,t,n)=>{"use strict";var r=n(4867),a=n(8527),i=n(6502),o=n(6419);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=a(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,a){return e.config=t,n&&(e.code=n),e.request=r,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=c(void 0,e[a])):n[a]=c(e[a],t[a])}r.forEach(a,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(i,l),r.forEach(o,(function(a){r.isUndefined(t[a])?r.isUndefined(e[a])||(n[a]=c(void 0,e[a])):n[a]=c(void 0,t[a])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var u=a.concat(i).concat(o).concat(s),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(d,l),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},6419:(e,t,n)=>{"use strict";var r=n(4155),a=n(4867),i=n(6016),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!a.isUndefined(e)&&a.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,l={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(5448)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),a.isFormData(e)||a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)?e:a.isArrayBufferView(e)?e.buffer:a.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):a.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},a.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),a.forEach(["post","put","patch"],(function(e){l.headers[e]=a.merge(o)})),e.exports=l},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r
Dados gerais Infraestrutura Depend\u00eancias Equipamentos Recursos Dados do ensino{"use strict";var r=n(4867);function a(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))})))})),i=o.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,a,i,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(a)&&s.push("path="+a),r.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},9699:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function a(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=a(window.location.href),function(t){var n=r.isString(t)?a(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,o={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(o[t]&&a.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4867:(e,t,n)=>{"use strict";var r=n(1849),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==a.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n {"use strict";var r=Object.freeze({});function a(e){return null==e}function i(e){return null!=e}function o(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function c(e){return null!==e&&"object"==typeof e}var l=Object.prototype.toString;function u(e){return"[object Object]"===l.call(e)}function d(e){return"[object RegExp]"===l.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||u(e)&&e.toString===l?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function _(e,t){for(var n=Object.create(null),r=e.split(","),a=0;a -1)return e.splice(n,1)}}var v=Object.prototype.hasOwnProperty;function y(e,t){return v.call(e,t)}function L(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var A=/-(\w)/g,z=L((function(e){return e.replace(A,(function(e,t){return t?t.toUpperCase():""}))})),w=L((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),T=/\B([A-Z])/g,k=L((function(e){return e.replace(T,"-$1").toLowerCase()}));var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function O(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function D(e,t){for(var n in t)e[n]=t[n];return e}function S(e){for(var t={},n=0;n 0,te=Q&&Q.indexOf("edge/")>0,ne=(Q&&Q.indexOf("android"),Q&&/iphone|ipad|ipod|ios/.test(Q)||"ios"===K),re=(Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q),Q&&Q.match(/firefox\/(\d+)/)),ae={}.watch,ie=!1;if(J)try{var oe={};Object.defineProperty(oe,"passive",{get:function(){ie=!0}}),window.addEventListener("test-passive",null,oe)}catch(e){}var se=function(){return void 0===U&&(U=!J&&!G&&void 0!==n.g&&(n.g.process&&"server"===n.g.process.env.VUE_ENV)),U},ce=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function le(e){return"function"==typeof e&&/native code/.test(e.toString())}var ue,de="undefined"!=typeof Symbol&&le(Symbol)&&"undefined"!=typeof Reflect&&le(Reflect.ownKeys);ue="undefined"!=typeof Set&&le(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var fe=N,pe=0,he=function(){this.id=pe++,this.subs=[]};he.prototype.addSub=function(e){this.subs.push(e)},he.prototype.removeSub=function(e){g(this.subs,e)},he.prototype.depend=function(){he.target&&he.target.addDep(this)},he.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t -1)if(i&&!y(a,"default"))o=!1;else if(""===o||o===k(e)){var c=Fe(String,a.type);(c<0||s 0&&(mt((r=_t(r,(t||"")+"_"+n))[0])&&mt(l)&&(u[c]=ye(l.text+r[0].text),r.shift()),u.push.apply(u,r)):s(r)?mt(l)?u[c]=ye(l.text+r):""!==r&&u.push(ye(r)):mt(r)&&mt(l)?u[c]=ye(l.text+r.text):(o(e._isVList)&&i(r.tag)&&a(r.key)&&i(t)&&(r.key="__vlist"+t+"_"+n+"__"),u.push(r)));return u}function Mt(e,t){if(e){for(var n=Object.create(null),r=de?Reflect.ownKeys(e):Object.keys(e),a=0;a 0,o=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(o&&n&&n!==r&&s===n.$key&&!i&&!n.$hasNormal)return n;for(var c in a={},e)e[c]&&"$"!==c[0]&&(a[c]=yt(t,c,e[c]))}else a={};for(var l in t)l in a||(a[l]=Lt(t,l));return e&&Object.isExtensible(e)&&(e._normalized=a),I(a,"$stable",o),I(a,"$key",s),I(a,"$hasNormal",i),a}function yt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ht(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function Lt(e,t){return function(){return e[t]}}function At(e,t){var n,r,a,o,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,a=e.length;rdocument.createEvent("Event").timeStamp&&(_n=function(){return Mn.now()})}function bn(){var e,t;for(mn=_n(),pn=!0,ln.sort((function(e,t){return e.id-t.id})),hn=0;hn hn&&ln[n].id>e.id;)n--;ln.splice(n+1,0,e)}else ln.push(e);fn||(fn=!0,it(bn))}}(this)},vn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){$e(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},vn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},vn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},vn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var yn={enumerable:!0,configurable:!0,get:N,set:N};function Ln(e,t,n){yn.get=function(){return this[t][n]},yn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,yn)}function An(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},a=e.$options._propKeys=[];e.$parent&&ke(!1);var i=function(i){a.push(i);var o=Xe(i,t,n,e);De(r,i,o),i in e||Ln(e,"_props",i)};for(var o in t)i(o);ke(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?N:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;u(t=e._data="function"==typeof t?function(e,t){_e();try{return e.call(t,t)}catch(e){return $e(e,t,"data()"),{}}finally{Me()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,a=(e.$options.methods,n.length);for(;a--;){var i=n[a];0,r&&y(r,i)||R(i)||Ln(e,"_data",i)}Oe(t,!0)}(e):Oe(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=se();for(var a in t){var i=t[a],o="function"==typeof i?i:i.get;0,r||(n[a]=new vn(e,o||N,N,zn)),a in e||wn(e,a,i)}}(e,t.computed),t.watch&&t.watch!==ae&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var a=0;a -1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!d(e)&&e.test(t)}function Wn(e,t){var n=e.cache,r=e.keys,a=e._vnode;for(var i in n){var o=n[i];if(o){var s=Yn(o.componentOptions);s&&!t(s)&&qn(n,i,r,a)}}}function qn(e,t,n,r){var a=e[t];!a||r&&a.tag===r.tag||a.componentInstance.$destroy(),e[t]=null,g(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=On++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var a=r.componentOptions;n.propsData=a.propsData,n._parentListeners=a.listeners,n._renderChildren=a.children,n._componentTag=a.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Pe(Dn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&tn(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,a=n&&n.context;e.$slots=bt(t._renderChildren,a),e.$scopedSlots=r,e._c=function(t,n,r,a){return Ft(e,t,n,r,a,!1)},e.$createElement=function(t,n,r,a){return Ft(e,t,n,r,a,!0)};var i=n&&n.data;De(e,"$attrs",i&&i.attrs||r,null,!0),De(e,"$listeners",t._parentListeners||r,null,!0)}(t),cn(t,"beforeCreate"),function(e){var t=Mt(e.$options.inject,e);t&&(ke(!1),Object.keys(t).forEach((function(n){De(e,n,t[n])})),ke(!0))}(t),An(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),cn(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(Sn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Se,e.prototype.$delete=Ne,e.prototype.$watch=function(e,t,n){var r=this;if(u(t))return xn(r,e,t,n);(n=n||{}).user=!0;var a=new vn(r,e,t,n);if(n.immediate)try{t.call(r,a.value)}catch(e){$e(e,r,'callback for immediate watcher "'+a.expression+'"')}return function(){a.teardown()}}}(Sn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var a=0,i=e.length;a1?O(n):n;for(var r=O(arguments,1),a='event handler for "'+e+'"',i=0,o=n.length;i parseInt(this.max)&&qn(o,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return H}};Object.defineProperty(e,"config",t),e.util={warn:fe,extend:D,mergeOptions:Pe,defineReactive:De},e.set=Se,e.delete=Ne,e.nextTick=it,e.observable=function(e){return Oe(e),e},e.options=Object.create(null),B.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,D(e.options.components,jn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Pe(this.options,e),this}}(e),Nn(e),function(e){B.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Sn),Object.defineProperty(Sn.prototype,"$isServer",{get:se}),Object.defineProperty(Sn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Sn,"FunctionalRenderContext",{value:jt}),Sn.version="2.6.12";var Bn=_("style,class"),Pn=_("input,textarea,option,select,progress"),Hn=function(e,t,n){return"value"===n&&Pn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Xn=_("contenteditable,draggable,spellcheck"),Rn=_("events,caret,typing,plaintext-only"),In=_("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Fn="http://www.w3.org/1999/xlink",$n=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Un=function(e){return $n(e)?e.slice(6,e.length):""},Vn=function(e){return null==e||!1===e};function Jn(e){for(var t=e.data,n=e,r=e;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Gn(r.data,t));for(;i(n=n.parent);)n&&n.data&&(t=Gn(t,n.data));return function(e,t){if(i(e)||i(t))return Kn(e,Qn(t));return""}(t.staticClass,t.class)}function Gn(e,t){return{staticClass:Kn(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function Kn(e,t){return e?t?e+" "+t:e:t||""}function Qn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,a=e.length;r-1?Ar(e,t,n):In(t)?Vn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Xn(t)?e.setAttribute(t,function(e,t){return Vn(t)||"false"===t?"false":"contenteditable"===e&&Rn(t)?t:"true"}(t,n)):$n(t)?Vn(n)?e.removeAttributeNS(Fn,Un(t)):e.setAttributeNS(Fn,t,n):Ar(e,t,n)}function Ar(e,t,n){if(Vn(n))e.removeAttribute(t);else{if(Z&&!ee&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var zr={create:yr,update:yr};function wr(e,t){var n=t.elm,r=t.data,o=e.data;if(!(a(r.staticClass)&&a(r.class)&&(a(o)||a(o.staticClass)&&a(o.class)))){var s=Jn(t),c=n._transitionClasses;i(c)&&(s=Kn(s,Qn(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Tr,kr,xr,Or,Dr,Sr,Nr={create:wr,update:wr},Yr=/[\w).+\-_$\]]/;function Cr(e){var t,n,r,a,i,o=!1,s=!1,c=!1,l=!1,u=0,d=0,f=0,p=0;for(r=0;r =0&&" "===(m=e.charAt(h));h--);m&&Yr.test(m)||(l=!0)}}else void 0===a?(p=r+1,a=e.slice(0,r).trim()):_();function _(){(i||(i=[])).push(e.slice(p,r).trim()),p=r+1}if(void 0===a?a=e.slice(0,r).trim():0!==p&&_(),i)for(r=0;r -1?{exp:e.slice(0,Or),key:'"'+e.slice(Or+1)+'"'}:{exp:e,key:null};kr=e,Or=Dr=Sr=0;for(;!Kr();)Qr(xr=Gr())?ea(xr):91===xr&&Zr(xr);return{exp:e.slice(0,Dr),key:e.slice(Dr+1,Sr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Gr(){return kr.charCodeAt(++Or)}function Kr(){return Or>=Tr}function Qr(e){return 34===e||39===e}function Zr(e){var t=1;for(Dr=Or;!Kr();)if(Qr(e=Gr()))ea(e);else if(91===e&&t++,93===e&&t--,0===t){Sr=Or;break}}function ea(e){for(var t=e;!Kr()&&(e=Gr())!==t;);}var ta,na="__r";function ra(e,t,n){var r=ta;return function a(){var i=t.apply(null,arguments);null!==i&&oa(e,a,n,r)}}var aa=Ke&&!(re&&Number(re[1])<=53);function ia(e,t,n,r){if(aa){var a=mn,i=t;t=i._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=a||e.timeStamp<=0||e.target.ownerDocument!==document)return i.apply(this,arguments)}}ta.addEventListener(e,t,ie?{capture:n,passive:r}:n)}function oa(e,t,n,r){(r||ta).removeEventListener(e,t._wrapper||t,n)}function sa(e,t){if(!a(e.data.on)||!a(t.data.on)){var n=t.data.on||{},r=e.data.on||{};ta=t.elm,function(e){if(i(e.__r)){var t=Z?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}i(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),dt(n,r,ia,oa,ra,t.context),ta=void 0}}var ca,la={create:sa,update:sa};function ua(e,t){if(!a(e.data.domProps)||!a(t.data.domProps)){var n,r,o=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in i(c.__ob__)&&(c=t.data.domProps=D({},c)),s)n in c||(o[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var l=a(r)?"":String(r);da(o,l)&&(o.value=l)}else if("innerHTML"===n&&tr(o.tagName)&&a(o.innerHTML)){(ca=ca||document.createElement("div")).innerHTML="";for(var u=ca.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;u.firstChild;)o.appendChild(u.firstChild)}else if(r!==s[n])try{o[n]=r}catch(e){}}}}function da(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.number)return m(n)!==m(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var fa={create:ua,update:ua},pa=L((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function ha(e){var t=ma(e.style);return e.staticStyle?D(e.staticStyle,t):t}function ma(e){return Array.isArray(e)?S(e):"string"==typeof e?pa(e):e}var _a,Ma=/^--/,ba=/\s*!important$/,ga=function(e,t,n){if(Ma.test(t))e.style.setProperty(t,n);else if(ba.test(n))e.style.setProperty(k(t),n.replace(ba,""),"important");else{var r=ya(t);if(Array.isArray(n))for(var a=0,i=n.length;a-1?t.split(za).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Ta(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(za).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function ka(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&D(t,xa(e.name||"v")),D(t,e),t}return"string"==typeof e?xa(e):void 0}}var xa=L((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),Oa=J&&!ee,Da="transition",Sa="animation",Na="transition",Ya="transitionend",Ca="animation",Wa="animationend";Oa&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Na="WebkitTransition",Ya="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ca="WebkitAnimation",Wa="webkitAnimationEnd"));var qa=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ea(e){qa((function(){qa(e)}))}function ja(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),wa(e,t))}function Ba(e,t){e._transitionClasses&&g(e._transitionClasses,t),Ta(e,t)}function Pa(e,t,n){var r=Xa(e,t),a=r.type,i=r.timeout,o=r.propCount;if(!a)return n();var s=a===Da?Ya:Wa,c=0,l=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++c>=o&&l()};setTimeout((function(){c 0&&(n=Da,u=o,d=i.length):t===Sa?l>0&&(n=Sa,u=l,d=c.length):d=(n=(u=Math.max(o,l))>0?o>l?Da:Sa:null)?n===Da?i.length:c.length:0,{type:n,timeout:u,propCount:d,hasTransform:n===Da&&Ha.test(r[Na+"Property"])}}function Ra(e,t){for(;e.length 1}function Ja(e,t){!0!==t.data.show&&Fa(t)}var Ga=function(e){var t,n,r={},c=e.modules,l=e.nodeOps;for(t=0;t h?g(e,a(n[M+1])?null:n[M+1].elm,n,p,M,r):p>M&&y(t,f,h)}(f,_,M,n,u):i(M)?(i(e.text)&&l.setTextContent(f,""),g(f,null,M,0,M.length-1,n)):i(_)?y(_,0,_.length-1):i(e.text)&&l.setTextContent(f,""):e.text!==t.text&&l.setTextContent(f,t.text),i(h)&&i(p=h.hook)&&i(p=p.postpatch)&&p(e,t)}}}function w(e,t,n){if(o(n)&&i(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r -1,o.selected!==i&&(o.selected=i);else if(W(ti(o),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));a||(e.selectedIndex=-1)}}function ei(e,t){return t.every((function(t){return!W(t,e)}))}function ti(e){return"_value"in e?e._value:e.value}function ni(e){e.target.composing=!0}function ri(e){e.target.composing&&(e.target.composing=!1,ai(e.target,"input"))}function ai(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function ii(e){return!e.componentInstance||e.data&&e.data.transition?e:ii(e.componentInstance._vnode)}var oi={model:Ka,show:{bind:function(e,t,n){var r=t.value,a=(n=ii(n)).data&&n.data.transition,i=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&a?(n.data.show=!0,Fa(n,(function(){e.style.display=i}))):e.style.display=r?i:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=ii(n)).data&&n.data.transition?(n.data.show=!0,r?Fa(n,(function(){e.style.display=e.__vOriginalDisplay})):$a(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,a){a||(e.style.display=e.__vOriginalDisplay)}}},si={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ci(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?ci(Kt(t.children)):e}function li(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var a=n._parentListeners;for(var i in a)t[z(i)]=a[i];return t}function ui(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var di=function(e){return e.tag||Gt(e)},fi=function(e){return"show"===e.name},pi={name:"transition",props:si,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(di)).length){0;var r=this.mode;0;var a=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return a;var i=ci(a);if(!i)return a;if(this._leaving)return ui(e,a);var o="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?o+"comment":o+i.tag:s(i.key)?0===String(i.key).indexOf(o)?i.key:o+i.key:i.key;var c=(i.data||(i.data={})).transition=li(this),l=this._vnode,u=ci(l);if(i.data.directives&&i.data.directives.some(fi)&&(i.data.show=!0),u&&u.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(i,u)&&!Gt(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var d=u.data.transition=D({},c);if("out-in"===r)return this._leaving=!0,ft(d,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),ui(e,a);if("in-out"===r){if(Gt(i))return l;var f,p=function(){f()};ft(c,"afterEnter",p),ft(c,"enterCancelled",p),ft(d,"delayLeave",(function(e){f=e}))}}return a}}},hi=D({tag:String,moveClass:String},si);function mi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function _i(e){e.data.newPos=e.elm.getBoundingClientRect()}function Mi(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,a=t.top-n.top;if(r||a){e.data.moved=!0;var i=e.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+a+"px)",i.transitionDuration="0s"}}delete hi.mode;var bi={Transition:pi,TransitionGroup:{props:hi,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var a=rn(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,a(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,a=this.$slots.default||[],i=this.children=[],o=li(this),s=0;s -1?ar[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ar[e]=/HTMLUnknownElement/.test(t.toString())},D(Sn.options.directives,oi),D(Sn.options.components,bi),Sn.prototype.__patch__=J?Ga:N,Sn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ve),cn(e,"beforeMount"),r=function(){e._update(e._render(),n)},new vn(e,r,N,{before:function(){e._isMounted&&!e._isDestroyed&&cn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,cn(e,"mounted")),e}(this,e=e&&J?or(e):void 0,t)},J&&setTimeout((function(){H.devtools&&ce&&ce.emit("init",Sn)}),0);var gi=/\{\{((?:.|\r?\n)+?)\}\}/g,vi=/[-.*+?^${}()|[\]\/\\]/g,yi=L((function(e){var t=e[0].replace(vi,"\\$&"),n=e[1].replace(vi,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}));var Li={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Fr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Ir(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var Ai,zi={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Fr(e,"style");n&&(e.staticStyle=JSON.stringify(pa(n)));var r=Ir(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},wi=function(e){return(Ai=Ai||document.createElement("div")).innerHTML=e,Ai.textContent},Ti=_("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ki=_("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),xi=_("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Oi=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Di=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Si="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+X.source+"]*",Ni="((?:"+Si+"\\:)?"+Si+")",Yi=new RegExp("^<"+Ni),Ci=/^\s*(\/?)>/,Wi=new RegExp("^<\\/"+Ni+"[^>]*>"),qi=/^]+>/i,Ei=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Xi=/&(?:lt|gt|quot|amp|#39);/g,Ri=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Ii=_("pre,textarea",!0),Fi=function(e,t){return e&&Ii(e)&&"\n"===t[0]};function $i(e,t){var n=t?Ri:Xi;return e.replace(n,(function(e){return Hi[e]}))}var Ui,Vi,Ji,Gi,Ki,Qi,Zi,eo,to=/^@|^v-on:/,no=/^v-|^@|^:|^#/,ro=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,ao=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,io=/^\(|\)$/g,oo=/^\[.*\]$/,so=/:(.*)$/,co=/^:|^\.|^v-bind:/,lo=/\.[^.\]]+(?=[^\]]*$)/g,uo=/^v-slot(:|$)|^#/,fo=/[\r\n]/,po=/\s+/g,ho=L(wi),mo="_empty_";function _o(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:Ao(t),rawAttrsMap:{},parent:n,children:[]}}function Mo(e,t){Ui=t.warn||qr,Qi=t.isPreTag||Y,Zi=t.mustUseProp||Y,eo=t.getTagNamespace||Y;var n=t.isReservedTag||Y;(function(e){return!!e.component||!n(e.tag)}),Ji=Er(t.modules,"transformNode"),Gi=Er(t.modules,"preTransformNode"),Ki=Er(t.modules,"postTransformNode"),Vi=t.delimiters;var r,a,i=[],o=!1!==t.preserveWhitespace,s=t.whitespace,c=!1,l=!1;function u(e){if(d(e),c||e.processed||(e=bo(e,t)),i.length||e===r||r.if&&(e.elseif||e.else)&&vo(r,{exp:e.elseif,block:e}),a&&!e.forbidden)if(e.elseif||e.else)o=e,(s=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(a.children))&&s.if&&vo(s,{exp:o.elseif,block:o});else{if(e.slotScope){var n=e.slotTarget||'"default"';(a.scopedSlots||(a.scopedSlots={}))[n]=e}a.children.push(e),e.parent=a}var o,s;e.children=e.children.filter((function(e){return!e.slotScope})),d(e),e.pre&&(c=!1),Qi(e.tag)&&(l=!1);for(var u=0;u ]*>)","i")),f=e.replace(d,(function(e,n,r){return l=r.length,Bi(u)||"noscript"===u||(n=n.replace(//g,"$1").replace(//g,"$1")),Fi(u,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));c+=e.length-f.length,e=f,T(u,c-l,c)}else{var p=e.indexOf("<");if(0===p){if(Ei.test(e)){var h=e.indexOf("--\x3e");if(h>=0){t.shouldKeepComment&&t.comment(e.substring(4,h),c,c+h+3),A(h+3);continue}}if(ji.test(e)){var m=e.indexOf("]>");if(m>=0){A(m+2);continue}}var _=e.match(qi);if(_){A(_[0].length);continue}var M=e.match(Wi);if(M){var b=c;A(M[0].length),T(M[1],b,c);continue}var g=z();if(g){w(g),Fi(g.tagName,e)&&A(1);continue}}var v=void 0,y=void 0,L=void 0;if(p>=0){for(y=e.slice(p);!(Wi.test(y)||Yi.test(y)||Ei.test(y)||ji.test(y)||(L=y.indexOf("<",1))<0);)p+=L,y=e.slice(p);v=e.substring(0,p)}p<0&&(v=e),v&&A(v.length),t.chars&&v&&t.chars(v,c-v.length,c)}if(e===n){t.chars&&t.chars(e);break}}function A(t){c+=t,e=e.substring(t)}function z(){var t=e.match(Yi);if(t){var n,r,a={tagName:t[1],attrs:[],start:c};for(A(t[0].length);!(n=e.match(Ci))&&(r=e.match(Di)||e.match(Oi));)r.start=c,A(r[0].length),r.end=c,a.attrs.push(r);if(n)return a.unarySlash=n[1],A(n[0].length),a.end=c,a}}function w(e){var n=e.tagName,c=e.unarySlash;i&&("p"===r&&xi(n)&&T(r),s(n)&&r===n&&T(n));for(var l=o(n)||!!c,u=e.attrs.length,d=new Array(u),f=0;f=0&&a[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var l=a.length-1;l>=o;l--)t.end&&t.end(a[l].tag,n,i);a.length=o,r=o&&a[o-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,i):"p"===s&&(t.start&&t.start(e,[],!1,n,i),t.end&&t.end(e,n,i))}T()}(e,{warn:Ui,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,n,o,s,d){var f=a&&a.ns||eo(e);Z&&"svg"===f&&(n=function(e){for(var t=[],n=0;n c&&(s.push(i=e.slice(c,a)),o.push(JSON.stringify(i)));var l=Cr(r[1].trim());o.push("_s("+l+")"),s.push({"@binding":l}),c=a+r[0].length}return c -1"+("true"===i?":("+t+")":":_q("+t+","+i+")")),Rr(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+o+");if(Array.isArray($$a)){var $$v="+(r?"_n("+a+")":a)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Jr(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Jr(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Jr(t,"$$c")+"}",null,!0)}(e,r,a);else if("input"===i&&"radio"===o)!function(e,t,n){var r=n&&n.number,a=Ir(e,"value")||"null";jr(e,"checked","_q("+t+","+(a=r?"_n("+a+")":a)+")"),Rr(e,"change",Jr(t,a),null,!0)}(e,r,a);else if("input"===i||"textarea"===i)!function(e,t,n){var r=e.attrsMap.type;0;var a=n||{},i=a.lazy,o=a.number,s=a.trim,c=!i&&"range"!==r,l=i?"change":"range"===r?na:"input",u="$event.target.value";s&&(u="$event.target.value.trim()");o&&(u="_n("+u+")");var d=Jr(t,u);c&&(d="if($event.target.composing)return;"+d);jr(e,"value","("+t+")"),Rr(e,l,d,null,!0),(s||o)&&Rr(e,"blur","$forceUpdate()")}(e,r,a);else{if(!H.isReservedTag(i))return Vr(e,r,a),!1}return!0},text:function(e,t){t.value&&jr(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&jr(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:Ti,mustUseProp:Hn,canBeLeftOpenTag:ki,isReservedTag:nr,getTagNamespace:rr,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(ko)},So=L((function(e){return _("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));function No(e,t){e&&(xo=So(t.staticKeys||""),Oo=t.isReservedTag||Y,Yo(e),Co(e,!1))}function Yo(e){if(e.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||M(e.tag)||!Oo(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(xo)))}(e),1===e.type){if(!Oo(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t |^function(?:\s+[\w$]+)?\s*\(/,qo=/\([^)]*?\);*$/,Eo=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,jo={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Bo={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Po=function(e){return"if("+e+")return null;"},Ho={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Po("$event.target !== $event.currentTarget"),ctrl:Po("!$event.ctrlKey"),shift:Po("!$event.shiftKey"),alt:Po("!$event.altKey"),meta:Po("!$event.metaKey"),left:Po("'button' in $event && $event.button !== 0"),middle:Po("'button' in $event && $event.button !== 1"),right:Po("'button' in $event && $event.button !== 2")};function Xo(e,t){var n=t?"nativeOn:":"on:",r="",a="";for(var i in e){var o=Ro(e[i]);e[i]&&e[i].dynamic?a+=i+","+o+",":r+='"'+i+'":'+o+","}return r="{"+r.slice(0,-1)+"}",a?n+"_d("+r+",["+a.slice(0,-1)+"])":n+r}function Ro(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return Ro(e)})).join(",")+"]";var t=Eo.test(e.value),n=Wo.test(e.value),r=Eo.test(e.value.replace(qo,""));if(e.modifiers){var a="",i="",o=[];for(var s in e.modifiers)if(Ho[s])i+=Ho[s],jo[s]&&o.push(s);else if("exact"===s){var c=e.modifiers;i+=Po(["ctrl","shift","alt","meta"].filter((function(e){return!c[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else o.push(s);return o.length&&(a+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(Io).join("&&")+")return null;"}(o)),i&&(a+=i),"function($event){"+a+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Io(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=jo[e],r=Bo[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Fo={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:N},$o=function(e){this.options=e,this.warn=e.warn||qr,this.transforms=Er(e.modules,"transformCode"),this.dataGenFns=Er(e.modules,"genData"),this.directives=D(D({},Fo),e.directives);var t=e.isReservedTag||Y;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Uo(e,t){var n=new $o(t);return{render:"with(this){return "+(e?Vo(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Vo(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Jo(e,t);if(e.once&&!e.onceProcessed)return Go(e,t);if(e.for&&!e.forProcessed)return Zo(e,t);if(e.if&&!e.ifProcessed)return Ko(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=rs(e,t),a="_t("+n+(r?","+r:""),i=e.attrs||e.dynamicAttrs?os((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:z(e.name),value:e.value,dynamic:e.dynamic}}))):null,o=e.attrsMap["v-bind"];!i&&!o||r||(a+=",null");i&&(a+=","+i);o&&(a+=(i?"":",null")+","+o);return a+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:rs(t,n,!0);return"_c("+e+","+es(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=es(e,t));var a=e.inlineTemplate?null:rs(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(a?","+a:"")+")"}for(var i=0;i >>0}(o):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var i=function(e,t){var n=e.children[0];0;if(n&&1===n.type){var r=Uo(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);i&&(n+=i+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+os(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function ts(e){return 1===e.type&&("slot"===e.tag||e.children.some(ts))}function ns(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ko(e,t,ns,"null");if(e.for&&!e.forProcessed)return Zo(e,t,ns);var r=e.slotScope===mo?"":String(e.slotScope),a="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(rs(e,t)||"undefined")+":undefined":rs(e,t)||"undefined":Vo(e,t))+"}",i=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+a+i+"}"}function rs(e,t,n,r,a){var i=e.children;if(i.length){var o=i[0];if(1===i.length&&o.for&&"template"!==o.tag&&"slot"!==o.tag){var s=n?t.maybeComponent(o)?",1":",0":"";return""+(r||Vo)(o,t)+s}var c=n?function(e,t){for(var n=0,r=0;r ':'',ds.innerHTML.indexOf(" ")>0}var ms=!!J&&hs(!1),_s=!!J&&hs(!0),Ms=L((function(e){var t=or(e);return t&&t.innerHTML})),bs=Sn.prototype.$mount;Sn.prototype.$mount=function(e,t){if((e=e&&or(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Ms(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){0;var a=ps(r,{outputSourceRange:!1,shouldDecodeNewlines:ms,shouldDecodeNewlinesForHref:_s,delimiters:n.delimiters,comments:n.comments},this),i=a.render,o=a.staticRenderFns;n.render=i,n.staticRenderFns=o}}return bs.call(this,e,t)},Sn.compile=ps;const gs=Sn;var vs=n(8),ys=n.n(vs);const Ls={computed:{Horizon:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return Horizon}))},methods:{formatDate:function(e){return ys()(1e3*e).add((new Date).getTimezoneOffset()/60)},formatDateIso:function(e){return ys()(e).add((new Date).getTimezoneOffset()/60)},jobBaseName:function(e){if(!e.includes("\\"))return e;var t=e.split("\\");return t[t.length-1]},autoLoadNewEntries:function(){this.autoLoadsNewEntries?(this.autoLoadsNewEntries=!1,localStorage.autoLoadsNewEntries=0):(this.autoLoadsNewEntries=!0,localStorage.autoLoadsNewEntries=1)},readableTimestamp:function(e){return this.formatDate(e).format("YYYY-MM-DD HH:mm:ss")}}};var As=n(9669),zs=n.n(As);const ws=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:n(2388).Z},{path:"/monitoring",name:"monitoring",component:n(2429).Z},{path:"/monitoring/:tag",component:n(675).Z,children:[{path:"jobs",name:"monitoring-jobs",component:n(2475).Z,props:{type:"jobs"}},{path:"failed",name:"monitoring-failed",component:n(2475).Z,props:{type:"failed"}}]},{path:"/metrics",redirect:"/metrics/jobs"},{path:"/metrics/",component:n(900).Z,children:[{path:"jobs",name:"metrics-jobs",component:n(2289).Z},{path:"queues",name:"metrics-queues",component:n(7994).Z}]},{path:"/metrics/:type/:slug",name:"metrics-preview",component:n(16).Z},{path:"/jobs/:type",name:"jobs",component:n(9180).Z},{path:"/jobs/pending/:jobId",name:"pending-jobs-preview",component:n(6219).Z},{path:"/jobs/completed/:jobId",name:"completed-jobs-preview",component:n(6219).Z},{path:"/failed",name:"failed-jobs",component:n(3296).Z},{path:"/failed/:jobId",name:"failed-jobs-preview",component:n(5745).Z},{path:"/batches",name:"batches",component:n(5632).Z},{path:"/batches/:batchId",name:"batches-preview",component:n(7164).Z}];function Ts(e,t){for(var n in t)e[n]=t[n];return e}var ks=/[!'()*]/g,xs=function(e){return"%"+e.charCodeAt(0).toString(16)},Os=/%2C/g,Ds=function(e){return encodeURIComponent(e).replace(ks,xs).replace(Os,",")};function Ss(e){try{return decodeURIComponent(e)}catch(e){0}return e}var Ns=function(e){return null==e||"object"==typeof e?e:String(e)};function Ys(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var n=e.replace(/\+/g," ").split("="),r=Ss(n.shift()),a=n.length>0?Ss(n.join("=")):null;void 0===t[r]?t[r]=a:Array.isArray(t[r])?t[r].push(a):t[r]=[t[r],a]})),t):t}function Cs(e){var t=e?Object.keys(e).map((function(t){var n=e[t];if(void 0===n)return"";if(null===n)return Ds(t);if(Array.isArray(n)){var r=[];return n.forEach((function(e){void 0!==e&&(null===e?r.push(Ds(t)):r.push(Ds(t)+"="+Ds(e)))})),r.join("&")}return Ds(t)+"="+Ds(n)})).filter((function(e){return e.length>0})).join("&"):null;return t?"?"+t:""}var Ws=/\/?$/;function qs(e,t,n,r){var a=r&&r.options.stringifyQuery,i=t.query||{};try{i=Es(i)}catch(e){}var o={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:i,params:t.params||{},fullPath:Ps(t,a),matched:e?Bs(e):[]};return n&&(o.redirectedFrom=Ps(n,a)),Object.freeze(o)}function Es(e){if(Array.isArray(e))return e.map(Es);if(e&&"object"==typeof e){var t={};for(var n in e)t[n]=Es(e[n]);return t}return e}var js=qs(null,{path:"/"});function Bs(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function Ps(e,t){var n=e.path,r=e.query;void 0===r&&(r={});var a=e.hash;return void 0===a&&(a=""),(n||"/")+(t||Cs)(r)+a}function Hs(e,t,n){return t===js?e===t:!!t&&(e.path&&t.path?e.path.replace(Ws,"")===t.path.replace(Ws,"")&&(n||e.hash===t.hash&&Xs(e.query,t.query)):!(!e.name||!t.name)&&(e.name===t.name&&(n||e.hash===t.hash&&Xs(e.query,t.query)&&Xs(e.params,t.params))))}function Xs(e,t){if(void 0===e&&(e={}),void 0===t&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((function(n,a){var i=e[n];if(r[a]!==n)return!1;var o=t[n];return null==i||null==o?i===o:"object"==typeof i&&"object"==typeof o?Xs(i,o):String(i)===String(o)}))}function Rs(e){for(var t=0;t =0&&(t=e.slice(r),e=e.slice(0,r));var a=e.indexOf("?");return a>=0&&(n=e.slice(a+1),e=e.slice(0,a)),{path:e,query:n,hash:t}}(a.path||""),l=t&&t.path||"/",u=c.path?$s(c.path,l,n||a.append):l,d=function(e,t,n){void 0===t&&(t={});var r,a=n||Ys;try{r=a(e||"")}catch(e){r={}}for(var i in t){var o=t[i];r[i]=Array.isArray(o)?o.map(Ns):Ns(o)}return r}(c.query,a.query,r&&r.options.parseQuery),f=a.hash||c.hash;return f&&"#"!==f.charAt(0)&&(f="#"+f),{_normalized:!0,path:u,query:d,hash:f}}var hc,mc=function(){},_c={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var t=this,n=this.$router,r=this.$route,a=n.resolve(this.to,r,this.append),i=a.location,o=a.route,s=a.href,c={},l=n.options.linkActiveClass,u=n.options.linkExactActiveClass,d=null==l?"router-link-active":l,f=null==u?"router-link-exact-active":u,p=null==this.activeClass?d:this.activeClass,h=null==this.exactActiveClass?f:this.exactActiveClass,m=o.redirectedFrom?qs(null,pc(o.redirectedFrom),null,n):o;c[h]=Hs(r,m,this.exactPath),c[p]=this.exact||this.exactPath?c[h]:function(e,t){return 0===e.path.replace(Ws,"/").indexOf(t.path.replace(Ws,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(r,m);var _=c[h]?this.ariaCurrentValue:null,M=function(e){Mc(e)&&(t.replace?n.replace(i,mc):n.push(i,mc))},b={click:Mc};Array.isArray(this.event)?this.event.forEach((function(e){b[e]=M})):b[this.event]=M;var g={class:c},v=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:o,navigate:M,isActive:c[p],isExactActive:c[h]});if(v){if(1===v.length)return v[0];if(v.length>1||!v.length)return 0===v.length?e():e("span",{},v)}if("a"===this.tag)g.on=b,g.attrs={href:s,"aria-current":_};else{var y=bc(this.$slots.default);if(y){y.isStatic=!1;var L=y.data=Ts({},y.data);for(var A in L.on=L.on||{},L.on){var z=L.on[A];A in b&&(L.on[A]=Array.isArray(z)?z:[z])}for(var w in b)w in L.on?L.on[w].push(b[w]):L.on[w]=M;var T=y.data.attrs=Ts({},y.data.attrs);T.href=s,T["aria-current"]=_}else g.on=b}return e(this.tag,g,this.$slots.default)}};function Mc(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function bc(e){if(e)for(var t,n=0;n -1&&(s.params[f]=n.params[f]);return s.path=fc(u.path,s.params),c(u,s,o)}if(s.path){s.params={};for(var p=0;p =e.length?n():e[a]?t(e[a],(function(){r(a+1)})):r(a+1)};r(0)}var Fc={redirected:2,aborted:4,cancelled:8,duplicated:16};function $c(e,t){return Vc(e,t,Fc.redirected,'Redirected when going from "'+e.fullPath+'" to "'+function(e){if("string"==typeof e)return e;if("path"in e)return e.path;var t={};return Jc.forEach((function(n){n in e&&(t[n]=e[n])})),JSON.stringify(t,null,2)}(t)+'" via a navigation guard.')}function Uc(e,t){return Vc(e,t,Fc.cancelled,'Navigation cancelled from "'+e.fullPath+'" to "'+t.fullPath+'" with a new navigation.')}function Vc(e,t,n,r){var a=new Error(r);return a._isRouter=!0,a.from=e,a.to=t,a.type=n,a}var Jc=["params","query","hash"];function Gc(e){return Object.prototype.toString.call(e).indexOf("Error")>-1}function Kc(e,t){return Gc(e)&&e._isRouter&&(null==t||e.type===t)}function Qc(e){return function(t,n,r){var a=!1,i=0,o=null;Zc(e,(function(e,t,n,s){if("function"==typeof e&&void 0===e.cid){a=!0,i++;var c,l=nl((function(t){var a;((a=t).__esModule||tl&&"Module"===a[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:hc.extend(t),n.components[s]=t,--i<=0&&r()})),u=nl((function(e){var t="Failed to resolve async component "+s+": "+e;o||(o=Gc(e)?e:new Error(t),r(o))}));try{c=e(l,u)}catch(e){u(e)}if(c)if("function"==typeof c.then)c.then(l,u);else{var d=c.component;d&&"function"==typeof d.then&&d.then(l,u)}}})),a||r()}}function Zc(e,t){return el(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function el(e){return Array.prototype.concat.apply([],e)}var tl="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function nl(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var rl=function(e,t){this.router=e,this.base=function(e){if(!e)if(gc){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=js,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function al(e,t,n,r){var a=Zc(e,(function(e,r,a,i){var o=function(e,t){"function"!=typeof e&&(e=hc.extend(e));return e.options[t]}(e,t);if(o)return Array.isArray(o)?o.map((function(e){return n(e,r,a,i)})):n(o,r,a,i)}));return el(r?a.reverse():a)}function il(e,t){if(t)return function(){return e.apply(t,arguments)}}rl.prototype.listen=function(e){this.cb=e},rl.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},rl.prototype.onError=function(e){this.errorCbs.push(e)},rl.prototype.transitionTo=function(e,t,n){var r,a=this;try{r=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach((function(t){t(e)})),e}var i=this.current;this.confirmTransition(r,(function(){a.updateRoute(r),t&&t(r),a.ensureURL(),a.router.afterHooks.forEach((function(e){e&&e(r,i)})),a.ready||(a.ready=!0,a.readyCbs.forEach((function(e){e(r)})))}),(function(e){n&&n(e),e&&!a.ready&&(Kc(e,Fc.redirected)&&i===js||(a.ready=!0,a.readyErrorCbs.forEach((function(t){t(e)}))))}))},rl.prototype.confirmTransition=function(e,t,n){var r=this,a=this.current;this.pending=e;var i,o,s=function(e){!Kc(e)&&Gc(e)&&r.errorCbs.length&&r.errorCbs.forEach((function(t){t(e)})),n&&n(e)},c=e.matched.length-1,l=a.matched.length-1;if(Hs(e,a)&&c===l&&e.matched[c]===a.matched[l])return this.ensureURL(),s(((o=Vc(i=a,e,Fc.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",o));var u=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n 0)){var t=this.router,n=t.options.scrollBehavior,r=Hc&&n;r&&this.listeners.push(Sc());var a=function(){var n=e.current,a=sl(e.base);e.current===js&&a===e._startLocation||e.transitionTo(a,(function(e){r&&Nc(t,e,n,!0)}))};window.addEventListener("popstate",a),this.listeners.push((function(){window.removeEventListener("popstate",a)}))}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var r=this,a=this.current;this.transitionTo(e,(function(e){Xc(Us(r.base+e.fullPath)),Nc(r.router,e,a,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,a=this.current;this.transitionTo(e,(function(e){Rc(Us(r.base+e.fullPath)),Nc(r.router,e,a,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(sl(this.base)!==this.current.fullPath){var t=Us(this.base+this.current.fullPath);e?Xc(t):Rc(t)}},t.prototype.getCurrentLocation=function(){return sl(this.base)},t}(rl);function sl(e){var t=window.location.pathname;return e&&0===t.toLowerCase().indexOf(e.toLowerCase())&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var cl=function(e){function t(t,n,r){e.call(this,t,n),r&&function(e){var t=sl(e);if(!/^\/#/.test(t))return window.location.replace(Us(e+"/#"+t)),!0}(this.base)||ll()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=Hc&&t;n&&this.listeners.push(Sc());var r=function(){var t=e.current;ll()&&e.transitionTo(ul(),(function(r){n&&Nc(e.router,r,t,!0),Hc||pl(r.fullPath)}))},a=Hc?"popstate":"hashchange";window.addEventListener(a,r),this.listeners.push((function(){window.removeEventListener(a,r)}))}},t.prototype.push=function(e,t,n){var r=this,a=this.current;this.transitionTo(e,(function(e){fl(e.fullPath),Nc(r.router,e,a,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,a=this.current;this.transitionTo(e,(function(e){pl(e.fullPath),Nc(r.router,e,a,!1),t&&t(e)}),n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;ul()!==t&&(e?fl(t):pl(t))},t.prototype.getCurrentLocation=function(){return ul()},t}(rl);function ll(){var e=ul();return"/"===e.charAt(0)||(pl("/"+e),!1)}function ul(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function dl(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function fl(e){Hc?Xc(dl(e)):window.location.hash=e}function pl(e){Hc?Rc(dl(e)):window.location.replace(dl(e))}var hl=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index+1).concat(e),r.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var e=t.current;t.index=n,t.updateRoute(r),t.router.afterHooks.forEach((function(t){t&&t(r,e)}))}),(function(e){Kc(e,Fc.duplicated)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(rl),ml=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Ac(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!Hc&&!1!==e.fallback,this.fallback&&(t="hash"),gc||(t="abstract"),this.mode=t,t){case"history":this.history=new ol(this,e.base);break;case"hash":this.history=new cl(this,e.base,this.fallback);break;case"abstract":this.history=new hl(this,e.base);break;default:0}},_l={currentRoute:{configurable:!0}};function Ml(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}ml.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},_l.currentRoute.get=function(){return this.history&&this.history.current},ml.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()})),!this.app){this.app=e;var n=this.history;if(n instanceof ol||n instanceof cl){var r=function(e){n.setupListeners(),function(e){var r=n.current,a=t.options.scrollBehavior;Hc&&a&&"fullPath"in e&&Nc(t,e,r,!1)}(e)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},ml.prototype.beforeEach=function(e){return Ml(this.beforeHooks,e)},ml.prototype.beforeResolve=function(e){return Ml(this.resolveHooks,e)},ml.prototype.afterEach=function(e){return Ml(this.afterHooks,e)},ml.prototype.onReady=function(e,t){this.history.onReady(e,t)},ml.prototype.onError=function(e){this.history.onError(e)},ml.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.push(e,t,n)}));this.history.push(e,t,n)},ml.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.replace(e,t,n)}));this.history.replace(e,t,n)},ml.prototype.go=function(e){this.history.go(e)},ml.prototype.back=function(){this.go(-1)},ml.prototype.forward=function(){this.go(1)},ml.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},ml.prototype.resolve=function(e,t,n){var r=pc(e,t=t||this.history.current,n,this),a=this.match(r,t),i=a.redirectedFrom||a.fullPath;return{location:r,route:a,href:function(e,t,n){var r="hash"===n?"#"+t:t;return e?Us(e+"/"+r):r}(this.history.base,i,this.mode),normalizedTo:r,resolved:a}},ml.prototype.getRoutes=function(){return this.matcher.getRoutes()},ml.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==js&&this.history.transitionTo(this.history.getCurrentLocation())},ml.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==js&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(ml.prototype,_l),ml.install=function e(t){if(!e.installed||hc!==t){e.installed=!0,hc=t;var n=function(e){return void 0!==e},r=function(e,t){var r=e.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",Is),t.component("RouterLink",_c);var a=t.config.optionMergeStrategies;a.beforeRouteEnter=a.beforeRouteLeave=a.beforeRouteUpdate=a.created}},ml.version="3.5.1",ml.isNavigationFailure=Kc,ml.NavigationFailureType=Fc,ml.START_LOCATION=js,gc&&window.Vue&&window.Vue.use(ml);const bl=ml;var gl=n(4566),vl=n.n(gl);window.Popper=n(8981).default;try{window.$=window.jQuery=n(9755),n(3734)}catch(e){}var yl=document.head.querySelector('meta[name="csrf-token"]');zs().defaults.headers.common["X-Requested-With"]="XMLHttpRequest",yl&&(zs().defaults.headers.common["X-CSRF-TOKEN"]=yl.content),gs.use(bl),gs.prototype.$http=zs().create(),window.Horizon.basePath="/"+window.Horizon.path;var Ll=window.Horizon.basePath+"/";""!==window.Horizon.path&&"/"!==window.Horizon.path||(Ll="/",window.Horizon.basePath="");var Al=new bl({routes:ws,mode:"history",base:Ll});gs.component("vue-json-pretty",vl()),gs.component("alert",n(2516).Z),gs.mixin(Ls),gs.directive("tooltip",(function(e,t){$(e).tooltip({title:t.value,placement:t.arg,trigger:"hover"})})),new gs({el:"#horizon",router:Al,data:function(){return{alert:{type:null,autoClose:0,message:"",confirmationProceed:null,confirmationCancel:null},autoLoadsNewEntries:"1"===localStorage.autoLoadsNewEntries}}})},3734:function(e,t,n){!function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t),i=r(n);function o(e,t){for(var n=0;n =o)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};M.jQueryDetection(),_();var b="alert",g="4.6.0",v="bs.alert",y="."+v,L=".data-api",A=a.default.fn[b],z='[data-dismiss="alert"]',w="close"+y,T="closed"+y,k="click"+y+L,x="alert",O="fade",D="show",S=function(){function e(e){this._element=e}var t=e.prototype;return t.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},t.dispose=function(){a.default.removeData(this._element,v),this._element=null},t._getRootElement=function(e){var t=M.getSelectorFromElement(e),n=!1;return t&&(n=document.querySelector(t)),n||(n=a.default(e).closest("."+x)[0]),n},t._triggerCloseEvent=function(e){var t=a.default.Event(w);return a.default(e).trigger(t),t},t._removeElement=function(e){var t=this;if(a.default(e).removeClass(D),a.default(e).hasClass(O)){var n=M.getTransitionDurationFromElement(e);a.default(e).one(M.TRANSITION_END,(function(n){return t._destroyElement(e,n)})).emulateTransitionEnd(n)}else this._destroyElement(e)},t._destroyElement=function(e){a.default(e).detach().trigger(T).remove()},e._jQueryInterface=function(t){return this.each((function(){var n=a.default(this),r=n.data(v);r||(r=new e(this),n.data(v,r)),"close"===t&&r[t](this)}))},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(e,null,[{key:"VERSION",get:function(){return g}}]),e}();a.default(document).on(k,z,S._handleDismiss(new S)),a.default.fn[b]=S._jQueryInterface,a.default.fn[b].Constructor=S,a.default.fn[b].noConflict=function(){return a.default.fn[b]=A,S._jQueryInterface};var N="button",Y="4.6.0",C="bs.button",W="."+C,q=".data-api",E=a.default.fn[N],j="active",B="btn",P="focus",H='[data-toggle^="button"]',X='[data-toggle="buttons"]',R='[data-toggle="button"]',I='[data-toggle="buttons"] .btn',F='input:not([type="hidden"])',$=".active",U=".btn",V="click"+W+q,J="focus"+W+q+" blur"+W+q,G="load"+W+q,K=function(){function e(e){this._element=e,this.shouldAvoidTriggerChange=!1}var t=e.prototype;return t.toggle=function(){var e=!0,t=!0,n=a.default(this._element).closest(X)[0];if(n){var r=this._element.querySelector(F);if(r){if("radio"===r.type)if(r.checked&&this._element.classList.contains(j))e=!1;else{var i=n.querySelector($);i&&a.default(i).removeClass(j)}e&&("checkbox"!==r.type&&"radio"!==r.type||(r.checked=!this._element.classList.contains(j)),this.shouldAvoidTriggerChange||a.default(r).trigger("change")),r.focus(),t=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(t&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(j)),e&&a.default(this._element).toggleClass(j))},t.dispose=function(){a.default.removeData(this._element,C),this._element=null},e._jQueryInterface=function(t,n){return this.each((function(){var r=a.default(this),i=r.data(C);i||(i=new e(this),r.data(C,i)),i.shouldAvoidTriggerChange=n,"toggle"===t&&i[t]()}))},s(e,null,[{key:"VERSION",get:function(){return Y}}]),e}();a.default(document).on(V,H,(function(e){var t=e.target,n=t;if(a.default(t).hasClass(B)||(t=a.default(t).closest(U)[0]),!t||t.hasAttribute("disabled")||t.classList.contains("disabled"))e.preventDefault();else{var r=t.querySelector(F);if(r&&(r.hasAttribute("disabled")||r.classList.contains("disabled")))return void e.preventDefault();"INPUT"!==n.tagName&&"LABEL"===t.tagName||K._jQueryInterface.call(a.default(t),"toggle","INPUT"===n.tagName)}})).on(J,H,(function(e){var t=a.default(e.target).closest(U)[0];a.default(t).toggleClass(P,/^focus(in)?$/.test(e.type))})),a.default(window).on(G,(function(){for(var e=[].slice.call(document.querySelectorAll(I)),t=0,n=e.length;t 0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=e.prototype;return t.next=function(){this._isSliding||this._slide(ue)},t.nextWhenVisible=function(){var e=a.default(this._element);!document.hidden&&e.is(":visible")&&"hidden"!==e.css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(de)},t.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(Be)&&(M.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(e){var t=this;this._activeElement=this._element.querySelector(qe);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)a.default(this._element).one(me,(function(){return t.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var r=e>n?ue:de;this._slide(r,this._items[e])}},t.dispose=function(){a.default(this._element).off(te),a.default.removeData(this._element,ee),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(e){return e=c({},ce,e),M.typeCheckConfig(Q,e,le),e},t._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=se)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t>0&&this.prev(),t<0&&this.next()}},t._addEventListeners=function(){var e=this;this._config.keyboard&&a.default(this._element).on(_e,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&a.default(this._element).on(Me,(function(t){return e.pause(t)})).on(be,(function(t){return e.cycle(t)})),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var t=function(t){e._pointerEvent&&Re[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},n=function(t){t.originalEvent.touches&&t.originalEvent.touches.length>1?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX},r=function(t){e._pointerEvent&&Re[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),oe+e._config.interval))};a.default(this._element.querySelectorAll(je)).on(ze,(function(e){return e.preventDefault()})),this._pointerEvent?(a.default(this._element).on(Le,(function(e){return t(e)})),a.default(this._element).on(Ae,(function(e){return r(e)})),this._element.classList.add(Ce)):(a.default(this._element).on(ge,(function(e){return t(e)})),a.default(this._element).on(ve,(function(e){return n(e)})),a.default(this._element).on(ye,(function(e){return r(e)})))}},t._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case ae:e.preventDefault(),this.prev();break;case ie:e.preventDefault(),this.next()}},t._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(Ee)):[],this._items.indexOf(e)},t._getItemByDirection=function(e,t){var n=e===ue,r=e===de,a=this._getItemIndex(t),i=this._items.length-1;if((r&&0===a||n&&a===i)&&!this._config.wrap)return t;var o=(a+(e===de?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},t._triggerSlideEvent=function(e,t){var n=this._getItemIndex(e),r=this._getItemIndex(this._element.querySelector(qe)),i=a.default.Event(he,{relatedTarget:e,direction:t,from:r,to:n});return a.default(this._element).trigger(i),i},t._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var t=[].slice.call(this._indicatorsElement.querySelectorAll(We));a.default(t).removeClass(xe);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&a.default(n).addClass(xe)}},t._updateInterval=function(){var e=this._activeElement||this._element.querySelector(qe);if(e){var t=parseInt(e.getAttribute("data-interval"),10);t?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=t):this._config.interval=this._config.defaultInterval||this._config.interval}},t._slide=function(e,t){var n,r,i,o=this,s=this._element.querySelector(qe),c=this._getItemIndex(s),l=t||s&&this._getItemByDirection(e,s),u=this._getItemIndex(l),d=Boolean(this._interval);if(e===ue?(n=Se,r=Ne,i=fe):(n=De,r=Ye,i=pe),l&&a.default(l).hasClass(xe))this._isSliding=!1;else if(!this._triggerSlideEvent(l,i).isDefaultPrevented()&&s&&l){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(l),this._activeElement=l;var f=a.default.Event(me,{relatedTarget:l,direction:i,from:c,to:u});if(a.default(this._element).hasClass(Oe)){a.default(l).addClass(r),M.reflow(l),a.default(s).addClass(n),a.default(l).addClass(n);var p=M.getTransitionDurationFromElement(s);a.default(s).one(M.TRANSITION_END,(function(){a.default(l).removeClass(n+" "+r).addClass(xe),a.default(s).removeClass(xe+" "+r+" "+n),o._isSliding=!1,setTimeout((function(){return a.default(o._element).trigger(f)}),0)})).emulateTransitionEnd(p)}else a.default(s).removeClass(xe),a.default(l).addClass(xe),this._isSliding=!1,a.default(this._element).trigger(f);d&&this.cycle()}},e._jQueryInterface=function(t){return this.each((function(){var n=a.default(this).data(ee),r=c({},ce,a.default(this).data());"object"==typeof t&&(r=c({},r,t));var i="string"==typeof t?t:r.slide;if(n||(n=new e(this,r),a.default(this).data(ee,n)),"number"==typeof t)n.to(t);else if("string"==typeof i){if(void 0===n[i])throw new TypeError('No method named "'+i+'"');n[i]()}else r.interval&&r.ride&&(n.pause(),n.cycle())}))},e._dataApiClickHandler=function(t){var n=M.getSelectorFromElement(this);if(n){var r=a.default(n)[0];if(r&&a.default(r).hasClass(ke)){var i=c({},a.default(r).data(),a.default(this).data()),o=this.getAttribute("data-slide-to");o&&(i.interval=!1),e._jQueryInterface.call(a.default(r),i),o&&a.default(r).data(ee).to(o),t.preventDefault()}}},s(e,null,[{key:"VERSION",get:function(){return Z}},{key:"Default",get:function(){return ce}}]),e}();a.default(document).on(Te,He,Ie._dataApiClickHandler),a.default(window).on(we,(function(){for(var e=[].slice.call(document.querySelectorAll(Xe)),t=0,n=e.length;t 0&&(this._selector=o,this._triggerArray.push(i))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=e.prototype;return t.toggle=function(){a.default(this._element).hasClass(at)?this.hide():this.show()},t.show=function(){var t,n,r=this;if(!(this._isTransitioning||a.default(this._element).hasClass(at)||(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(ut)).filter((function(e){return"string"==typeof r._config.parent?e.getAttribute("data-parent")===r._config.parent:e.classList.contains(it)}))).length&&(t=null),t&&(n=a.default(t).not(this._selector).data(Ue))&&n._isTransitioning))){var i=a.default.Event(Ze);if(a.default(this._element).trigger(i),!i.isDefaultPrevented()){t&&(e._jQueryInterface.call(a.default(t).not(this._selector),"hide"),n||a.default(t).data(Ue,null));var o=this._getDimension();a.default(this._element).removeClass(it).addClass(ot),this._element.style[o]=0,this._triggerArray.length&&a.default(this._triggerArray).removeClass(st).attr("aria-expanded",!0),this.setTransitioning(!0);var s=function(){a.default(r._element).removeClass(ot).addClass(it+" "+at),r._element.style[o]="",r.setTransitioning(!1),a.default(r._element).trigger(et)},c="scroll"+(o[0].toUpperCase()+o.slice(1)),l=M.getTransitionDurationFromElement(this._element);a.default(this._element).one(M.TRANSITION_END,s).emulateTransitionEnd(l),this._element.style[o]=this._element[c]+"px"}}},t.hide=function(){var e=this;if(!this._isTransitioning&&a.default(this._element).hasClass(at)){var t=a.default.Event(tt);if(a.default(this._element).trigger(t),!t.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",M.reflow(this._element),a.default(this._element).addClass(ot).removeClass(it+" "+at);var r=this._triggerArray.length;if(r>0)for(var i=0;i 0},t._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=c({},t.offsets,e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},t._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(e.modifiers.applyStyle={enabled:!1}),c({},e,this._config.popperConfig)},e._jQueryInterface=function(t){return this.each((function(){var n=a.default(this).data(mt);if(n||(n=new e(this,"object"==typeof t?t:null),a.default(this).data(mt,n)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},e._clearMenus=function(t){if(!t||t.which!==zt&&("keyup"!==t.type||t.which===yt))for(var n=[].slice.call(document.querySelectorAll(Ht)),r=0,i=n.length;r0&&o--,t.which===At&&o document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(On);var r=M.getTransitionDurationFromElement(this._dialog);a.default(this._element).off(M.TRANSITION_END),a.default(this._element).one(M.TRANSITION_END,(function(){e._element.classList.remove(On),n||a.default(e._element).one(M.TRANSITION_END,(function(){e._element.style.overflowY=""})).emulateTransitionEnd(e._element,r)})).emulateTransitionEnd(r),this._element.focus()}},t._showElement=function(e){var t=this,n=a.default(this._element).hasClass(kn),r=this._dialog?this._dialog.querySelector(Sn):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),a.default(this._dialog).hasClass(An)&&r?r.scrollTop=0:this._element.scrollTop=0,n&&M.reflow(this._element),a.default(this._element).addClass(xn),this._config.focus&&this._enforceFocus();var i=a.default.Event(mn,{relatedTarget:e}),o=function(){t._config.focus&&t._element.focus(),t._isTransitioning=!1,a.default(t._element).trigger(i)};if(n){var s=M.getTransitionDurationFromElement(this._dialog);a.default(this._dialog).one(M.TRANSITION_END,o).emulateTransitionEnd(s)}else o()},t._enforceFocus=function(){var e=this;a.default(document).off(_n).on(_n,(function(t){document!==t.target&&e._element!==t.target&&0===a.default(e._element).has(t.target).length&&e._element.focus()}))},t._setEscapeEvent=function(){var e=this;this._isShown?a.default(this._element).on(gn,(function(t){e._config.keyboard&&t.which===cn?(t.preventDefault(),e.hide()):e._config.keyboard||t.which!==cn||e._triggerBackdropTransition()})):this._isShown||a.default(this._element).off(gn)},t._setResizeEvent=function(){var e=this;this._isShown?a.default(window).on(Mn,(function(t){return e.handleUpdate(t)})):a.default(window).off(Mn)},t._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){a.default(document.body).removeClass(Tn),e._resetAdjustments(),e._resetScrollbar(),a.default(e._element).trigger(pn)}))},t._removeBackdrop=function(){this._backdrop&&(a.default(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(e){var t=this,n=a.default(this._element).hasClass(kn)?kn:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=wn,n&&this._backdrop.classList.add(n),a.default(this._backdrop).appendTo(document.body),a.default(this._element).on(bn,(function(e){t._ignoreBackdropClick?t._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===t._config.backdrop?t._triggerBackdropTransition():t.hide())})),n&&M.reflow(this._backdrop),a.default(this._backdrop).addClass(xn),!e)return;if(!n)return void e();var r=M.getTransitionDurationFromElement(this._backdrop);a.default(this._backdrop).one(M.TRANSITION_END,e).emulateTransitionEnd(r)}else if(!this._isShown&&this._backdrop){a.default(this._backdrop).removeClass(xn);var i=function(){t._removeBackdrop(),e&&e()};if(a.default(this._element).hasClass(kn)){var o=M.getTransitionDurationFromElement(this._backdrop);a.default(this._backdrop).one(M.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}else e&&e()},t._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right) ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:jn,popperConfig:null},er="show",tr="out",nr={HIDE:"hide"+$n,HIDDEN:"hidden"+$n,SHOW:"show"+$n,SHOWN:"shown"+$n,INSERTED:"inserted"+$n,CLICK:"click"+$n,FOCUSIN:"focusin"+$n,FOCUSOUT:"focusout"+$n,MOUSEENTER:"mouseenter"+$n,MOUSELEAVE:"mouseleave"+$n},rr="fade",ar="show",ir=".tooltip-inner",or=".arrow",sr="hover",cr="focus",lr="click",ur="manual",dr=function(){function e(e,t){if(void 0===i.default)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var t=e.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(e){if(this._isEnabled)if(e){var t=this.constructor.DATA_KEY,n=a.default(e.currentTarget).data(t);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),a.default(e.currentTarget).data(t,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(a.default(this.getTipElement()).hasClass(ar))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),a.default.removeData(this.element,this.constructor.DATA_KEY),a.default(this.element).off(this.constructor.EVENT_KEY),a.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&a.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===a.default(this.element).css("display"))throw new Error("Please use show on visible elements");var t=a.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a.default(this.element).trigger(t);var n=M.findShadowRoot(this.element),r=a.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!r)return;var o=this.getTipElement(),s=M.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&a.default(o).addClass(rr);var c="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,l=this._getAttachment(c);this.addAttachmentClass(l);var u=this._getContainer();a.default(o).data(this.constructor.DATA_KEY,this),a.default.contains(this.element.ownerDocument.documentElement,this.tip)||a.default(o).appendTo(u),a.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new i.default(this.element,o,this._getPopperConfig(l)),a.default(o).addClass(ar),a.default(o).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&a.default(document.body).children().on("mouseover",null,a.default.noop);var d=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,a.default(e.element).trigger(e.constructor.Event.SHOWN),t===tr&&e._leave(null,e)};if(a.default(this.tip).hasClass(rr)){var f=M.getTransitionDurationFromElement(this.tip);a.default(this.tip).one(M.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},t.hide=function(e){var t=this,n=this.getTipElement(),r=a.default.Event(this.constructor.Event.HIDE),i=function(){t._hoverState!==er&&n.parentNode&&n.parentNode.removeChild(n),t._cleanTipClass(),t.element.removeAttribute("aria-describedby"),a.default(t.element).trigger(t.constructor.Event.HIDDEN),null!==t._popper&&t._popper.destroy(),e&&e()};if(a.default(this.element).trigger(r),!r.isDefaultPrevented()){if(a.default(n).removeClass(ar),"ontouchstart"in document.documentElement&&a.default(document.body).children().off("mouseover",null,a.default.noop),this._activeTrigger[lr]=!1,this._activeTrigger[cr]=!1,this._activeTrigger[sr]=!1,a.default(this.tip).hasClass(rr)){var o=M.getTransitionDurationFromElement(n);a.default(n).one(M.TRANSITION_END,i).emulateTransitionEnd(o)}else i();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(e){a.default(this.getTipElement()).addClass(Vn+"-"+e)},t.getTipElement=function(){return this.tip=this.tip||a.default(this.config.template)[0],this.tip},t.setContent=function(){var e=this.getTipElement();this.setElementContent(a.default(e.querySelectorAll(ir)),this.getTitle()),a.default(e).removeClass(rr+" "+ar)},t.setElementContent=function(e,t){"object"!=typeof t||!t.nodeType&&!t.jquery?this.config.html?(this.config.sanitize&&(t=Xn(t,this.config.whiteList,this.config.sanitizeFn)),e.html(t)):e.text(t):this.config.html?a.default(t).parent().is(e)||e.empty().append(t):e.text(a.default(t).text())},t.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},t._getPopperConfig=function(e){var t=this;return c({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:or},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},this.config.popperConfig)},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=c({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:M.isElement(this.config.container)?a.default(this.config.container):a.default(document).find(this.config.container)},t._getAttachment=function(e){return Qn[e.toUpperCase()]},t._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach((function(t){if("click"===t)a.default(e.element).on(e.constructor.Event.CLICK,e.config.selector,(function(t){return e.toggle(t)}));else if(t!==ur){var n=t===sr?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=t===sr?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;a.default(e.element).on(n,e.config.selector,(function(t){return e._enter(t)})).on(r,e.config.selector,(function(t){return e._leave(t)}))}})),this._hideModalHandler=function(){e.element&&e.hide()},a.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=c({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(e,t){var n=this.constructor.DATA_KEY;(t=t||a.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),a.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusin"===e.type?cr:sr]=!0),a.default(t.getTipElement()).hasClass(ar)||t._hoverState===er?t._hoverState=er:(clearTimeout(t._timeout),t._hoverState=er,t.config.delay&&t.config.delay.show?t._timeout=setTimeout((function(){t._hoverState===er&&t.show()}),t.config.delay.show):t.show())},t._leave=function(e,t){var n=this.constructor.DATA_KEY;(t=t||a.default(e.currentTarget).data(n))||(t=new this.constructor(e.currentTarget,this._getDelegateConfig()),a.default(e.currentTarget).data(n,t)),e&&(t._activeTrigger["focusout"===e.type?cr:sr]=!1),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=tr,t.config.delay&&t.config.delay.hide?t._timeout=setTimeout((function(){t._hoverState===tr&&t.hide()}),t.config.delay.hide):t.hide())},t._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},t._getConfig=function(e){var t=a.default(this.element).data();return Object.keys(t).forEach((function(e){-1!==Gn.indexOf(e)&&delete t[e]})),"number"==typeof(e=c({},this.constructor.Default,t,"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),M.typeCheckConfig(Rn,e,this.constructor.DefaultType),e.sanitize&&(e.template=Xn(e.template,e.whiteList,e.sanitizeFn)),e},t._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},t._cleanTipClass=function(){var e=a.default(this.getTipElement()),t=e.attr("class").match(Jn);null!==t&&t.length&&e.removeClass(t.join(""))},t._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},t._fixTransition=function(){var e=this.getTipElement(),t=this.config.animation;null===e.getAttribute("x-placement")&&(a.default(e).removeClass(rr),this.config.animation=!1,this.hide(),this.show(),this.config.animation=t)},e._jQueryInterface=function(t){return this.each((function(){var n=a.default(this),r=n.data(Fn),i="object"==typeof t&&t;if((r||!/dispose|hide/.test(t))&&(r||(r=new e(this,i),n.data(Fn,r)),"string"==typeof t)){if(void 0===r[t])throw new TypeError('No method named "'+t+'"');r[t]()}}))},s(e,null,[{key:"VERSION",get:function(){return In}},{key:"Default",get:function(){return Zn}},{key:"NAME",get:function(){return Rn}},{key:"DATA_KEY",get:function(){return Fn}},{key:"Event",get:function(){return nr}},{key:"EVENT_KEY",get:function(){return $n}},{key:"DefaultType",get:function(){return Kn}}]),e}();a.default.fn[Rn]=dr._jQueryInterface,a.default.fn[Rn].Constructor=dr,a.default.fn[Rn].noConflict=function(){return a.default.fn[Rn]=Un,dr._jQueryInterface};var fr="popover",pr="4.6.0",hr="bs.popover",mr="."+hr,_r=a.default.fn[fr],Mr="bs-popover",br=new RegExp("(^|\\s)"+Mr+"\\S+","g"),gr=c({},dr.Default,{placement:"right",trigger:"click",content:"",template:' '}),vr=c({},dr.DefaultType,{content:"(string|element|function)"}),yr="fade",Lr="show",Ar=".popover-header",zr=".popover-body",wr={HIDE:"hide"+mr,HIDDEN:"hidden"+mr,SHOW:"show"+mr,SHOWN:"shown"+mr,INSERTED:"inserted"+mr,CLICK:"click"+mr,FOCUSIN:"focusin"+mr,FOCUSOUT:"focusout"+mr,MOUSEENTER:"mouseenter"+mr,MOUSELEAVE:"mouseleave"+mr},Tr=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.isWithContent=function(){return this.getTitle()||this._getContent()},n.addAttachmentClass=function(e){a.default(this.getTipElement()).addClass(Mr+"-"+e)},n.getTipElement=function(){return this.tip=this.tip||a.default(this.config.template)[0],this.tip},n.setContent=function(){var e=a.default(this.getTipElement());this.setElementContent(e.find(Ar),this.getTitle());var t=this._getContent();"function"==typeof t&&(t=t.call(this.element)),this.setElementContent(e.find(zr),t),e.removeClass(yr+" "+Lr)},n._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},n._cleanTipClass=function(){var e=a.default(this.getTipElement()),t=e.attr("class").match(br);null!==t&&t.length>0&&e.removeClass(t.join(""))},t._jQueryInterface=function(e){return this.each((function(){var n=a.default(this).data(hr),r="object"==typeof e?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new t(this,r),a.default(this).data(hr,n)),"string"==typeof e)){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},s(t,null,[{key:"VERSION",get:function(){return pr}},{key:"Default",get:function(){return gr}},{key:"NAME",get:function(){return fr}},{key:"DATA_KEY",get:function(){return hr}},{key:"Event",get:function(){return wr}},{key:"EVENT_KEY",get:function(){return mr}},{key:"DefaultType",get:function(){return vr}}]),t}(dr);a.default.fn[fr]=Tr._jQueryInterface,a.default.fn[fr].Constructor=Tr,a.default.fn[fr].noConflict=function(){return a.default.fn[fr]=_r,Tr._jQueryInterface};var kr="scrollspy",xr="4.6.0",Or="bs.scrollspy",Dr="."+Or,Sr=".data-api",Nr=a.default.fn[kr],Yr={offset:10,method:"auto",target:""},Cr={offset:"number",method:"string",target:"(string|element)"},Wr="activate"+Dr,qr="scroll"+Dr,Er="load"+Dr+Sr,jr="dropdown-item",Br="active",Pr='[data-spy="scroll"]',Hr=".nav, .list-group",Xr=".nav-link",Rr=".nav-item",Ir=".list-group-item",Fr=".dropdown",$r=".dropdown-item",Ur=".dropdown-toggle",Vr="offset",Jr="position",Gr=function(){function e(e,t){var n=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(t),this._selector=this._config.target+" "+Xr+","+this._config.target+" "+Ir+","+this._config.target+" "+$r,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a.default(this._scrollElement).on(qr,(function(e){return n._process(e)})),this.refresh(),this._process()}var t=e.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?Vr:Jr,n="auto"===this._config.method?t:this._config.method,r=n===Jr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(e){var t,i=M.getSelectorFromElement(e);if(i&&(t=document.querySelector(i)),t){var o=t.getBoundingClientRect();if(o.width||o.height)return[a.default(t)[n]().top+r,i]}return null})).filter((function(e){return e})).sort((function(e,t){return e[0]-t[0]})).forEach((function(t){e._offsets.push(t[0]),e._targets.push(t[1])}))},t.dispose=function(){a.default.removeData(this._element,Or),a.default(this._scrollElement).off(Dr),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(e){if("string"!=typeof(e=c({},Yr,"object"==typeof e&&e?e:{})).target&&M.isElement(e.target)){var t=a.default(e.target).attr("id");t||(t=M.getUID(kr),a.default(e.target).attr("id",t)),e.target="#"+t}return M.typeCheckConfig(kr,e,Cr),e},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=n){var r=this._targets[this._targets.length-1];this._activeTarget!==r&&this._activate(r)}else{if(this._activeTarget&&e0)return this._activeTarget=null,void this._clear();for(var a=this._offsets.length;a--;)this._activeTarget!==this._targets[a]&&e>=this._offsets[a]&&(void 0===this._offsets[a+1]||e li > .active",Ma='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',ba=".dropdown-toggle",ga="> .dropdown-menu .active",va=function(){function e(e){this._element=e}var t=e.prototype;return t.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&a.default(this._element).hasClass(la)||a.default(this._element).hasClass(ua))){var t,n,r=a.default(this._element).closest(ha)[0],i=M.getSelectorFromElement(this._element);if(r){var o="UL"===r.nodeName||"OL"===r.nodeName?_a:ma;n=(n=a.default.makeArray(a.default(r).find(o)))[n.length-1]}var s=a.default.Event(ra,{relatedTarget:this._element}),c=a.default.Event(ia,{relatedTarget:n});if(n&&a.default(n).trigger(s),a.default(this._element).trigger(c),!c.isDefaultPrevented()&&!s.isDefaultPrevented()){i&&(t=document.querySelector(i)),this._activate(this._element,r);var l=function(){var t=a.default.Event(aa,{relatedTarget:e._element}),r=a.default.Event(oa,{relatedTarget:n});a.default(n).trigger(t),a.default(e._element).trigger(r)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){a.default.removeData(this._element,Zr),this._element=null},t._activate=function(e,t,n){var r=this,i=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?a.default(t).children(ma):a.default(t).find(_a))[0],o=n&&i&&a.default(i).hasClass(da),s=function(){return r._transitionComplete(e,i,n)};if(i&&o){var c=M.getTransitionDurationFromElement(i);a.default(i).removeClass(fa).one(M.TRANSITION_END,s).emulateTransitionEnd(c)}else s()},t._transitionComplete=function(e,t,n){if(t){a.default(t).removeClass(la);var r=a.default(t.parentNode).find(ga)[0];r&&a.default(r).removeClass(la),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}if(a.default(e).addClass(la),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),M.reflow(e),e.classList.contains(da)&&e.classList.add(fa),e.parentNode&&a.default(e.parentNode).hasClass(ca)){var i=a.default(e).closest(pa)[0];if(i){var o=[].slice.call(i.querySelectorAll(ba));a.default(o).addClass(la)}e.setAttribute("aria-expanded",!0)}n&&n()},e._jQueryInterface=function(t){return this.each((function(){var n=a.default(this),r=n.data(Zr);if(r||(r=new e(this),n.data(Zr,r)),"string"==typeof t){if(void 0===r[t])throw new TypeError('No method named "'+t+'"');r[t]()}}))},s(e,null,[{key:"VERSION",get:function(){return Qr}}]),e}();a.default(document).on(sa,Ma,(function(e){e.preventDefault(),va._jQueryInterface.call(a.default(this),"show")})),a.default.fn[Kr]=va._jQueryInterface,a.default.fn[Kr].Constructor=va,a.default.fn[Kr].noConflict=function(){return a.default.fn[Kr]=na,va._jQueryInterface};var ya="toast",La="4.6.0",Aa="bs.toast",za="."+Aa,wa=a.default.fn[ya],Ta="click.dismiss"+za,ka="hide"+za,xa="hidden"+za,Oa="show"+za,Da="shown"+za,Sa="fade",Na="hide",Ya="show",Ca="showing",Wa={animation:"boolean",autohide:"boolean",delay:"number"},qa={animation:!0,autohide:!0,delay:500},Ea='[data-dismiss="toast"]',ja=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var t=e.prototype;return t.show=function(){var e=this,t=a.default.Event(Oa);if(a.default(this._element).trigger(t),!t.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add(Sa);var n=function(){e._element.classList.remove(Ca),e._element.classList.add(Ya),a.default(e._element).trigger(Da),e._config.autohide&&(e._timeout=setTimeout((function(){e.hide()}),e._config.delay))};if(this._element.classList.remove(Na),M.reflow(this._element),this._element.classList.add(Ca),this._config.animation){var r=M.getTransitionDurationFromElement(this._element);a.default(this._element).one(M.TRANSITION_END,n).emulateTransitionEnd(r)}else n()}},t.hide=function(){if(this._element.classList.contains(Ya)){var e=a.default.Event(ka);a.default(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},t.dispose=function(){this._clearTimeout(),this._element.classList.contains(Ya)&&this._element.classList.remove(Ya),a.default(this._element).off(Ta),a.default.removeData(this._element,Aa),this._element=null,this._config=null},t._getConfig=function(e){return e=c({},qa,a.default(this._element).data(),"object"==typeof e&&e?e:{}),M.typeCheckConfig(ya,e,this.constructor.DefaultType),e},t._setListeners=function(){var e=this;a.default(this._element).on(Ta,Ea,(function(){return e.hide()}))},t._close=function(){var e=this,t=function(){e._element.classList.add(Na),a.default(e._element).trigger(xa)};if(this._element.classList.remove(Ya),this._config.animation){var n=M.getTransitionDurationFromElement(this._element);a.default(this._element).one(M.TRANSITION_END,t).emulateTransitionEnd(n)}else t()},t._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},e._jQueryInterface=function(t){return this.each((function(){var n=a.default(this),r=n.data(Aa);if(r||(r=new e(this,"object"==typeof t&&t),n.data(Aa,r)),"string"==typeof t){if(void 0===r[t])throw new TypeError('No method named "'+t+'"');r[t](this)}}))},s(e,null,[{key:"VERSION",get:function(){return La}},{key:"DefaultType",get:function(){return Wa}},{key:"Default",get:function(){return qa}}]),e}();a.default.fn[ya]=ja._jQueryInterface,a.default.fn[ya].Constructor=ja,a.default.fn[ya].noConflict=function(){return a.default.fn[ya]=wa,ja._jQueryInterface},e.Alert=S,e.Button=K,e.Carousel=Ie,e.Collapse=ft,e.Dropdown=en,e.Modal=qn,e.Popover=Tr,e.Scrollspy=Gr,e.Tab=va,e.Toast=ja,e.Tooltip=dr,e.Util=M,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(9755),n(8981))},7757:function(e,t,n){e.exports=function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}function n(e){return e&&e.default||e}e=e&&e.hasOwnProperty("default")?e.default:e;var r={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},a=t((function(e){var t={};for(var n in r)r.hasOwnProperty(n)&&(t[r[n]]=n);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var i in a)if(a.hasOwnProperty(i)){if(!("channels"in a[i]))throw new Error("missing channels property: "+i);if(!("labels"in a[i]))throw new Error("missing channel labels property: "+i);if(a[i].labels.length!==a[i].channels)throw new Error("channel and label counts mismatch: "+i);var o=a[i].channels,s=a[i].labels;delete a[i].channels,delete a[i].labels,Object.defineProperty(a[i],"channels",{value:o}),Object.defineProperty(a[i],"labels",{value:s})}function c(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}a.rgb.hsl=function(e){var t,n,r=e[0]/255,a=e[1]/255,i=e[2]/255,o=Math.min(r,a,i),s=Math.max(r,a,i),c=s-o;return s===o?t=0:r===s?t=(a-i)/c:a===s?t=2+(i-r)/c:i===s&&(t=4+(r-a)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?c/(s+o):c/(2-s-o)),100*n]},a.rgb.hsv=function(e){var t,n,r,a,i,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+.5};return 0===u?a=i=0:(i=u/l,t=d(o),n=d(s),r=d(c),o===l?a=r-n:s===l?a=1/3+t-r:c===l&&(a=2/3+n-t),a<0?a+=1:a>1&&(a-=1)),[360*a,100*i,100*l]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-a)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-a-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var n=t[e];if(n)return n;var a,i=1/0;for(var o in r)if(r.hasOwnProperty(o)){var s=c(e,r[o]);s.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(e){var t,n,r,a,i,o=e[0]/360,s=e[1]/100,c=e[2]/100;if(0===s)return[i=255*c,i,i];t=2*c-(n=c<.5?c*(1+s):c+s-c*s),a=[0,0,0];for(var l=0;l<3;l++)(r=o+1/3*-(l-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[l]=255*i;return a},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,a=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,a*=i<=1?i:2-i,[t,100*(0===r?2*a/(i+a):2*n/(r+n)),(r+n)/2*100]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,a=Math.floor(t)%6,i=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*i),c=255*r*(1-n*(1-i));switch(r*=255,a){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){var t,n,r,a=e[0],i=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-i)*o,n=i*s,[a,100*(n=(n/=(t=(2-i)*s)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,a,i,o,s,c=e[0]/360,l=e[1]/100,u=e[2]/100,d=l+u;switch(d>1&&(l/=d,u/=d),r=6*c-(t=Math.floor(6*c)),0!=(1&t)&&(r=1-r),a=l+r*((n=1-u)-l),t){default:case 6:case 0:i=n,o=a,s=l;break;case 1:i=a,o=n,s=l;break;case 2:i=l,o=n,s=a;break;case 3:i=l,o=a,s=n;break;case 4:i=a,o=l,s=n;break;case 5:i=n,o=l,s=a}return[255*i,255*o,255*s]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},a.xyz.rgb=function(e){var t,n,r,a=e[0]/100,i=e[1]/100,o=e[2]/100;return n=-.9689*a+1.8758*i+.0415*o,r=.0557*a+-.204*i+1.057*o,t=(t=3.2406*a+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,a=e[0];t=e[1]/500+(n=(a+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],a=e[2];return(t=360*Math.atan2(a,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+a*a),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255,i=Math.max(Math.max(n,r),a),o=Math.min(Math.min(n,r),a),s=i-o;return t=s<=0?0:i===n?(r-a)/s%6:i===r?2+(a-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,a=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var a=[0,0,0],i=t%1*6,o=i%1,s=1-o,c=0;switch(Math.floor(i)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return c=(1-n)*r,[255*(n*a[0]+c),255*(n*a[1]+c),255*(n*a[2]+c)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function i(){for(var e={},t=Object.keys(a),n=t.length,r=0;r 1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function f(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,a=0;a =0&&t<1?N(Math.round(255*t)):"")}function A(e,t){return t<1||e[3]&&e[3]<1?z(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"}function z(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function w(e,t){return t<1||e[3]&&e[3]<1?T(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"}function T(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function k(e,t){return t<1||e[3]&&e[3]<1?x(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"}function x(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function O(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"}function D(e){return Y[e.slice(0,3)]}function S(e,t,n){return Math.min(Math.max(t,e),n)}function N(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var Y={};for(var C in h)Y[h[C]]=C;var W=function(e){return e instanceof W?e:this instanceof W?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=m.getRgba(e))?this.setValues("rgb",t):(t=m.getHsla(e))?this.setValues("hsl",t):(t=m.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new W(e);var t};W.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return m.hexString(this.values.rgb)},rgbString:function(){return m.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return m.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return m.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return m.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return m.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return m.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return m.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=this,r=e,a=void 0===t?.5:t,i=2*a-1,o=n.alpha()-r.alpha(),s=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,c=1-s;return this.rgb(s*n.red()+c*r.red(),s*n.green()+c*r.green(),s*n.blue()+c*r.blue()).alpha(n.alpha()*a+r.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new W,r=this.values,a=n.values;for(var i in r)r.hasOwnProperty(i)&&(e=r[i],"[object Array]"===(t={}.toString.call(e))?a[i]=e.slice(0):"[object Number]"===t&&(a[i]=e));return n}},W.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},W.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},W.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r =0;a--)t.call(n,e[a],a);else for(a=0;a=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-H.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*H.easeInBounce(2*e):.5*H.easeOutBounce(2*e-1)+.5}},X={effects:H};P.easingEffects=H;var R=Math.PI,I=R/180,F=2*R,$=R/2,U=R/4,V=2*R/3,J={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,a,i){if(i){var o=Math.min(i,a/2,r/2),s=t+o,c=n+o,l=t+r-o,u=n+a-o;e.moveTo(t,c),s t.left-n&&e.x t.top-n&&e.y 0&&e.requestAnimationFrame()},advance:function(){for(var e,t,n,r,a=this.animations,i=0;i =n?(oe.callback(e.onAnimationComplete,[e],t),t.animating=!1,a.splice(i,1)):++i}},be=oe.options.resolve,ge=["push","pop","shift","splice","unshift"];function ve(e,t){e._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ge.forEach((function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),a=r.apply(this,t);return oe.each(e._chartjs.listeners,(function(e){"function"==typeof e[n]&&e[n].apply(e,t)})),a}})})))}function ye(e,t){var n=e._chartjs;if(n){var r=n.listeners,a=r.indexOf(t);-1!==a&&r.splice(a,1),r.length>0||(ge.forEach((function(t){delete e[t]})),delete e._chartjs)}}var Le=function(e,t){this.initialize(e,t)};oe.extend(Le.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),n=e.chart,r=n.scales,a=e.getDataset(),i=n.options.scales;null!==t.xAxisID&&t.xAxisID in r&&!a.xAxisID||(t.xAxisID=a.xAxisID||i.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in r&&!a.yAxisID||(t.yAxisID=a.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ye(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,n=t.dataElementType;return n&&new n({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var e,t,n=this,r=n.getMeta(),a=n.getDataset().data||[],i=r.data;for(e=0,t=a.length;e r&&e.insertElements(r,a-r)},insertElements:function(e,t){for(var n=0;n a?(i=a/t.innerRadius,e.arc(o,s,t.innerRadius-a,r+i,n-i,!0)):e.arc(o,s,a,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function Te(e,t,n,r){var a,i=n.endAngle;for(r&&(n.endAngle=n.startAngle+ze,we(e,n),n.endAngle=i,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=ze,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+ze,n.startAngle,!0),a=0;a s;)a-=ze;for(;a =o&&a<=s,l=i>=n.innerRadius&&i<=n.outerRadius;return c&&l}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/ze)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+ze,t.beginPath(),t.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),t.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),t.closePath(),e=0;e e.x&&(t=Pe(t,"left","right")):e.base n?n:r,r:c.right||a<0?0:a>t?t:a,b:c.bottom||i<0?0:i>n?n:i,l:c.left||o<0?0:o>t?t:o}}function Re(e){var t=Be(e),n=t.right-t.left,r=t.bottom-t.top,a=Xe(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+a.l,y:t.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b}}}function Ie(e,t,n){var r=null===t,a=null===n,i=!(!e||r&&a)&&Be(e);return i&&(r||t>=i.left&&t<=i.right)&&(a||n>=i.top&&n<=i.bottom)}Q._set("global",{elements:{rectangle:{backgroundColor:Ee,borderColor:Ee,borderSkipped:"bottom",borderWidth:0}}});var Fe=he.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=Re(t),r=n.outer,a=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===a.w&&r.h===a.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(a.x,a.y,a.w,a.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return Ie(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return je(n)?Ie(n,e,null):Ie(n,null,t)},inXRange:function(e){return Ie(this._view,e,null)},inYRange:function(e){return Ie(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return je(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return je(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),$e={},Ue=xe,Ve=Se,Je=qe,Ge=Fe;$e.Arc=Ue,$e.Line=Ve,$e.Point=Je,$e.Rectangle=Ge;var Ke=oe._deprecated,Qe=oe.valueOrDefault;function Ze(e,t){var n,r,a,i,o=e._length;for(a=1,i=t.length;a0?Math.min(o,Math.abs(r-n)):o,n=r;return o}function et(e,t,n){var r,a,i=n.barThickness,o=t.stackCount,s=t.pixels[e],c=oe.isNullOrUndef(i)?Ze(t.scale,t.pixels):-1;return oe.isNullOrUndef(i)?(r=c*n.categoryPercentage,a=n.barPercentage):(r=i*o,a=1),{chunk:r/o,ratio:a,start:s-r/2}}function tt(e,t,n){var r,a=t.pixels,i=a[e],o=e>0?a[e-1]:null,s=e =0&&_.min>=0?_.min:_.max,y=void 0===_.start?_.end:_.max>=0&&_.min>=0?_.max-_.min:_.min-_.max,L=m.length;if(b||void 0===b&&void 0!==g)for(r=0;r =0&&l.max>=0?l.max:l.min,(_.min<0&&i<0||_.max>=0&&i>0)&&(v+=i));return o=f.getPixelForValue(v),c=(s=f.getPixelForValue(v+y))-o,void 0!==M&&Math.abs(c) =0&&!p||y<0&&p?o-M:o+M),{size:c,base:o,head:s,center:s+c/2}},calculateBarIndexPixels:function(e,t,n,r){var a=this,i="flex"===r.barThickness?tt(t,n,r):et(t,n,r),o=a.getStackIndex(e,a.getMeta().stack),s=i.start+i.chunk*o+i.chunk/2,c=Math.min(Qe(r.maxBarThickness,1/0),i.chunk*i.ratio);return{base:s-c/2,head:s+c/2,center:s,size:c}},draw:function(){var e=this,t=e.chart,n=e._getValueScale(),r=e.getMeta().data,a=e.getDataset(),i=r.length,o=0;for(oe.canvas.clipArea(t.ctx,t.chartArea);o=st?-ct:b<-st?ct:0)+_,v=Math.cos(b),y=Math.sin(b),L=Math.cos(g),A=Math.sin(g),z=b<=0&&g>=0||g>=ct,w=b<=lt&&g>=lt||g>=ct+lt,T=b<=-lt&&g>=-lt||g>=st+lt,k=b===-st||g>=st?-1:Math.min(v,v*m,L,L*m),x=T?-1:Math.min(y,y*m,A,A*m),O=z?1:Math.max(v,v*m,L,L*m),D=w?1:Math.max(y,y*m,A,A*m);l=(O-k)/2,u=(D-x)/2,d=-(O+k)/2,f=-(D+x)/2}for(r=0,a=h.length;r0&&!isNaN(e)?ct*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,a,i,o,s,c,l=this,u=0,d=l.chart;if(!e)for(t=0,n=d.data.datasets.length;t (u=s>u?s:u)?c:u);return u},setHoverStyle:function(e){var t=e._model,n=e._options,r=oe.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=ot(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=ot(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=ot(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n 0&&ht(l[e-1]._model,c)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,c.left,c.right),n.controlPointPreviousY=u(n.controlPointPreviousY,c.top,c.bottom)),e 0&&(i=e.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(e,t){return Dt(e,t,{intersect:!1})},point:function(e,t){return kt(e,wt(t,e))},nearest:function(e,t,n){var r=wt(t,e);n.axis=n.axis||"xy";var a=Ot(n.axis);return xt(e,r,n.intersect,a)},x:function(e,t,n){var r=wt(t,e),a=[],i=!1;return Tt(e,(function(e){e.inXRange(r.x)&&a.push(e),e.inRange(r.x,r.y)&&(i=!0)})),n.intersect&&!i&&(a=[]),a},y:function(e,t,n){var r=wt(t,e),a=[],i=!1;return Tt(e,(function(e){e.inYRange(r.y)&&a.push(e),e.inRange(r.x,r.y)&&(i=!0)})),n.intersect&&!i&&(a=[]),a}}},Nt=oe.extend;function Yt(e,t){return oe.where(e,(function(e){return e.pos===t}))}function Ct(e,t){return e.sort((function(e,n){var r=t?n:e,a=t?e:n;return r.weight===a.weight?r.index-a.index:r.weight-a.weight}))}function Wt(e){var t,n,r,a=[];for(t=0,n=(e||[]).length;t div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n",Ut=n(Object.freeze({__proto__:null,default:$t})),Vt="$chartjs",Jt="chartjs-",Gt=Jt+"size-monitor",Kt=Jt+"render-monitor",Qt=Jt+"render-animation",Zt=["animationstart","webkitAnimationStart"],en={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function tn(e,t){var n=oe.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}function nn(e,t){var n=e.style,r=e.getAttribute("height"),a=e.getAttribute("width");if(e[Vt]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var i=tn(e,"width");void 0!==i&&(e.width=i)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var o=tn(e,"height");void 0!==i&&(e.height=o)}return e}var rn=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function an(e,t,n){e.addEventListener(t,n,rn)}function on(e,t,n){e.removeEventListener(t,n,rn)}function sn(e,t,n,r,a){return{type:e,chart:t,native:a||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function cn(e,t){var n=en[e.type]||e.type,r=oe.getRelativePosition(e,t);return sn(n,t,r.x,r.y,e)}function ln(e,t){var n=!1,r=[];return function(){r=Array.prototype.slice.call(arguments),t=t||this,n||(n=!0,oe.requestAnimFrame.call(window,(function(){n=!1,e.apply(t,r)})))}}function un(e){var t=document.createElement("div");return t.className=e||"",t}function dn(e){var t=1e6,n=un(Gt),r=un(Gt+"-expand"),a=un(Gt+"-shrink");r.appendChild(un()),a.appendChild(un()),n.appendChild(r),n.appendChild(a),n._reset=function(){r.scrollLeft=t,r.scrollTop=t,a.scrollLeft=t,a.scrollTop=t};var i=function(){n._reset(),e()};return an(r,"scroll",i.bind(r,"expand")),an(a,"scroll",i.bind(a,"shrink")),n}function fn(e,t){var n=e[Vt]||(e[Vt]={}),r=n.renderProxy=function(e){e.animationName===Qt&&t()};oe.each(Zt,(function(t){an(e,t,r)})),n.reflow=!!e.offsetParent,e.classList.add(Kt)}function pn(e){var t=e[Vt]||{},n=t.renderProxy;n&&(oe.each(Zt,(function(t){on(e,t,n)})),delete t.renderProxy),e.classList.remove(Kt)}function hn(e,t,n){var r=e[Vt]||(e[Vt]={}),a=r.resizer=dn(ln((function(){if(r.resizer){var a=n.options.maintainAspectRatio&&e.parentNode,i=a?a.clientWidth:0;t(sn("resize",n)),a&&a.clientWidth0){var i=e[0];i.label?n=i.label:i.xLabel?n=i.xLabel:a>0&&i.index-1?e.split("\n"):e}function kn(e){var t=e._xScale,n=e._yScale||e._scale,r=e._index,a=e._datasetIndex,i=e._chart.getDatasetMeta(a).controller,o=i._getIndexScale(),s=i._getValueScale();return{xLabel:t?t.getLabelForIndex(r,a):"",yLabel:n?n.getLabelForIndex(r,a):"",label:o?""+o.getLabelForIndex(r,a):"",value:s?""+s.getLabelForIndex(r,a):"",index:r,datasetIndex:a,x:e._model.x,y:e._model.y}}function xn(e){var t=Q.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Ln(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Ln(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Ln(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Ln(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Ln(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Ln(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Ln(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Ln(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Ln(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function On(e,t){var n=e._chart.ctx,r=2*t.yPadding,a=0,i=t.body,o=i.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0);o+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,c=t.footer.length,l=t.titleFontSize,u=t.bodyFontSize,d=t.footerFontSize;r+=s*l,r+=s?(s-1)*t.titleSpacing:0,r+=s?t.titleMarginBottom:0,r+=o*u,r+=o?(o-1)*t.bodySpacing:0,r+=c?t.footerMarginTop:0,r+=c*d,r+=c?(c-1)*t.footerSpacing:0;var f=0,p=function(e){a=Math.max(a,n.measureText(e).width+f)};return n.font=oe.fontString(l,t._titleFontStyle,t._titleFontFamily),oe.each(t.title,p),n.font=oe.fontString(u,t._bodyFontStyle,t._bodyFontFamily),oe.each(t.beforeBody.concat(t.afterBody),p),f=t.displayColors?u+2:0,oe.each(i,(function(e){oe.each(e.before,p),oe.each(e.lines,p),oe.each(e.after,p)})),f=0,n.font=oe.fontString(d,t._footerFontStyle,t._footerFontFamily),oe.each(t.footer,p),{width:a+=2*t.xPadding,height:r}}function Dn(e,t){var n,r,a,i,o,s=e._model,c=e._chart,l=e._chart.chartArea,u="center",d="center";s.y c.height-t.height&&(d="bottom");var f=(l.left+l.right)/2,p=(l.top+l.bottom)/2;"center"===d?(n=function(e){return e<=f},r=function(e){return e>f}):(n=function(e){return e<=t.width/2},r=function(e){return e>=c.width-t.width/2}),a=function(e){return e+t.width+s.caretSize+s.caretPadding>c.width},i=function(e){return e-t.width-s.caretSize-s.caretPadding<0},o=function(e){return e<=p?"top":"bottom"},n(s.x)?(u="left",a(s.x)&&(u="center",d=o(s.y))):r(s.x)&&(u="right",i(s.x)&&(u="center",d=o(s.y)));var h=e._options;return{xAlign:h.xAlign?h.xAlign:u,yAlign:h.yAlign?h.yAlign:d}}function Sn(e,t,n,r){var a=e.x,i=e.y,o=e.caretSize,s=e.caretPadding,c=e.cornerRadius,l=n.xAlign,u=n.yAlign,d=o+s,f=c+s;return"right"===l?a-=t.width:"center"===l&&((a-=t.width/2)+t.width>r.width&&(a=r.width-t.width),a<0&&(a=0)),"top"===u?i+=d:i-="bottom"===u?t.height+d:t.height/2,"center"===u?"left"===l?a+=d:"right"===l&&(a-=d):"left"===l?a-=f:"right"===l&&(a+=f),{x:a,y:i}}function Nn(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Yn(e){return wn([],Tn(e))}var Cn=he.extend({initialize:function(){this._model=xn(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options.callbacks,n=t.beforeTitle.apply(e,arguments),r=t.title.apply(e,arguments),a=t.afterTitle.apply(e,arguments),i=[];return i=wn(i,Tn(n)),i=wn(i,Tn(r)),i=wn(i,Tn(a))},getBeforeBody:function(){return Yn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,r=n._options.callbacks,a=[];return oe.each(e,(function(e){var i={before:[],lines:[],after:[]};wn(i.before,Tn(r.beforeLabel.call(n,e,t))),wn(i.lines,r.label.call(n,e,t)),wn(i.after,Tn(r.afterLabel.call(n,e,t))),a.push(i)})),a},getAfterBody:function(){return Yn(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),a=t.afterFooter.apply(e,arguments),i=[];return i=wn(i,Tn(n)),i=wn(i,Tn(r)),i=wn(i,Tn(a))},update:function(e){var t,n,r=this,a=r._options,i=r._model,o=r._model=xn(a),s=r._active,c=r._data,l={xAlign:i.xAlign,yAlign:i.yAlign},u={x:i.x,y:i.y},d={width:i.width,height:i.height},f={x:i.caretX,y:i.caretY};if(s.length){o.opacity=1;var p=[],h=[];f=zn[a.position].call(r,s,r._eventPosition);var m=[];for(t=0,n=s.length;t 0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},a=Math.abs(t.opacity<.001)?0:t.opacity,i=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&i&&(e.save(),e.globalAlpha=a,this.drawBackground(r,t,e,n),r.y+=t.yPadding,oe.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),oe.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t=this,n=t._options,r=!1;return t._lastActive=t._lastActive||[],"mouseout"===e.type?t._active=[]:(t._active=t._chart.getElementsAtEventForMode(e,n.mode,n),n.reverse&&t._active.reverse()),(r=!oe.arrayEquals(t._active,t._lastActive))&&(t._lastActive=t._active,(n.enabled||n.custom)&&(t._eventPosition={x:e.x,y:e.y},t.update(!0),t.pivot())),r}}),Wn=zn,qn=Cn;qn.positioners=Wn;var En=oe.valueOrDefault;function jn(){return oe.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var a,i,o,s=n[e].length;for(t[e]||(t[e]=[]),a=0;a =t[e].length&&t[e].push({}),!t[e][a].type||o.type&&o.type!==t[e][a].type?oe.merge(t[e][a],[yn.getScaleDefaults(i),o]):oe.merge(t[e][a],o)}else oe._merger(e,t,n,r)}})}function Bn(){return oe.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){var a=t[e]||Object.create(null),i=n[e];"scales"===e?t[e]=jn(a,i):"scale"===e?t[e]=oe.merge(a,[yn.getScaleDefaults(i.type),i]):oe._merger(e,t,n,r)}})}function Pn(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Bn(Q.global,Q[e.type],e.options||{}),e}function Hn(e){var t=e.options;oe.each(e.scales,(function(t){It.removeBox(e,t)})),t=Bn(Q.global,Q[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Xn(e,t,n){var r,a=function(e){return e.id===r};do{r=t+n++}while(oe.findIndex(e,a)>=0);return r}function Rn(e){return"top"===e||"bottom"===e}function In(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}Q._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Fn=function(e,t){return this.construct(e,t),this};oe.extend(Fn.prototype,{construct:function(e,t){var n=this;t=Pn(t);var r=gn.acquireContext(e,t),a=r&&r.canvas,i=a&&a.height,o=a&&a.width;n.id=oe.uid(),n.ctx=r,n.canvas=a,n.config=t,n.width=o,n.height=i,n.aspectRatio=i?o/i:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Fn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&a&&(n.initialize(),n.update())},initialize:function(){var e=this;return vn.notify(e,"beforeInit"),oe.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),vn.notify(e,"afterInit"),e},clear:function(){return oe.canvas.clear(this),this},stop:function(){return Me.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,a=n.maintainAspectRatio&&t.aspectRatio||null,i=Math.max(0,Math.floor(oe.getMaximumWidth(r))),o=Math.max(0,Math.floor(a?i/a:oe.getMaximumHeight(r)));if((t.width!==i||t.height!==o)&&(r.width=t.width=i,r.height=t.height=o,r.style.width=i+"px",r.style.height=o+"px",oe.retinaScale(t,n.devicePixelRatio),!e)){var s={width:i,height:o};vn.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;oe.each(t.xAxes,(function(e,n){e.id||(e.id=Xn(t.xAxes,"x-axis-",n))})),oe.each(t.yAxes,(function(e,n){e.id||(e.id=Xn(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],a=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),oe.each(r,(function(t){var r=t.options,i=r.id,o=En(r.type,t.dtype);Rn(r.position)!==Rn(t.dposition)&&(r.position=t.dposition),a[i]=!0;var s=null;if(i in n&&n[i].type===o)(s=n[i]).options=r,s.ctx=e.ctx,s.chart=e;else{var c=yn.getScaleConstructor(o);if(!c)return;s=new c({id:i,type:o,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),oe.each(a,(function(e,t){e||delete n[t]})),e.scales=n,yn.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],a=n.data.datasets;for(e=0,t=a.length;e=0;--n)r.drawDataset(t[n],e);vn.notify(r,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n=this,r={meta:e,index:e.index,easingValue:t};!1!==vn.notify(n,"beforeDatasetDraw",[r])&&(e.controller.draw(t),vn.notify(n,"afterDatasetDraw",[r]))},_drawTooltip:function(e){var t=this,n=t.tooltip,r={tooltip:n,easingValue:e};!1!==vn.notify(t,"beforeTooltipDraw",[r])&&(n.draw(),vn.notify(t,"afterTooltipDraw",[r]))},getElementAtEvent:function(e){return St.modes.single(this,e)},getElementsAtEvent:function(e){return St.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return St.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=St.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return St.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,n=t.data.datasets[e];n._meta||(n._meta={});var r=n._meta[t.id];return r||(r=n._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:e}),r},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t =0;r--){var a=e[r];if(t(a))return a}},oe.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},oe.almostEquals=function(e,t,n){return Math.abs(e-t) =e},oe.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},oe.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},oe.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},oe.toRadians=function(e){return e*(Math.PI/180)},oe.toDegrees=function(e){return e*(180/Math.PI)},oe._decimalPlaces=function(e){if(oe.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},oe.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,a=Math.sqrt(n*n+r*r),i=Math.atan2(r,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:a}},oe.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},oe.aliasPixel=function(e){return e%2==0?0:.5},oe._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,a=n/2;return Math.round((t-a)*r)/r+a},oe.splineCurve=function(e,t,n,r){var a=e.skip?t:e,i=t,o=n.skip?t:n,s=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),c=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),l=s/(s+c),u=c/(s+c),d=r*(l=isNaN(l)?0:l),f=r*(u=isNaN(u)?0:u);return{previous:{x:i.x-d*(o.x-a.x),y:i.y-d*(o.y-a.y)},next:{x:i.x+f*(o.x-a.x),y:i.y+f*(o.y-a.y)}}},oe.EPSILON=Number.EPSILON||1e-14,oe.splineCurveMonotone=function(e){var t,n,r,a,i,o,s,c,l,u=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),d=u.length;for(t=0;t 0?u[t-1]:null,(a=t 0?u[t-1]:null,a=t =e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},oe.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},oe.niceNum=function(e,t){var n=Math.floor(oe.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},oe.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},oe.getRelativePosition=function(e,t){var n,r,a=e.originalEvent||e,i=e.target||e.srcElement,o=i.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=a.clientX,r=a.clientY);var c=parseFloat(oe.getStyle(i,"padding-left")),l=parseFloat(oe.getStyle(i,"padding-top")),u=parseFloat(oe.getStyle(i,"padding-right")),d=parseFloat(oe.getStyle(i,"padding-bottom")),f=o.right-o.left-c-u,p=o.bottom-o.top-l-d;return{x:n=Math.round((n-o.left-c)/f*i.width/t.currentDevicePixelRatio),y:r=Math.round((r-o.top-l)/p*i.height/t.currentDevicePixelRatio)}},oe.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},oe.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},oe._calculatePadding=function(e,t,n){return(t=oe.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},oe._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},oe.getMaximumWidth=function(e){var t=oe._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-oe._calculatePadding(t,"padding-left",n)-oe._calculatePadding(t,"padding-right",n),a=oe.getConstraintWidth(e);return isNaN(a)?r:Math.min(r,a)},oe.getMaximumHeight=function(e){var t=oe._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-oe._calculatePadding(t,"padding-top",n)-oe._calculatePadding(t,"padding-bottom",n),a=oe.getConstraintHeight(e);return isNaN(a)?r:Math.min(r,a)},oe.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},oe.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,a=e.height,i=e.width;r.height=a*n,r.width=i*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=a+"px",r.style.width=i+"px")}},oe.fontString=function(e,t,n){return t+" "+e+"px "+n},oe.longestText=function(e,t,n,r){var a=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(a=r.data={},i=r.garbageCollect=[],r.font=t),e.font=t;var o,s,c,l,u,d=0,f=n.length;for(o=0;o n.length){for(o=0;o r&&(r=i),r},oe.numberOfLabelLines=function(e){var t=1;return oe.each(e,(function(e){oe.isArray(e)&&e.length>t&&(t=e.length)})),t},oe.color=q?function(e){return e instanceof CanvasGradient&&(e=Q.global.defaultColor),q(e)}:function(e){return e},oe.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:oe.color(e).saturate(.5).darken(.1).rgbString()}};function Vn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Jn(e){this.options=e||{}}oe.extend(Jn.prototype,{formats:Vn,parse:Vn,format:Vn,add:Vn,diff:Vn,startOf:Vn,endOf:Vn,_create:function(e){return e}}),Jn.override=function(e){oe.extend(Jn.prototype,e)};var Gn={_date:Jn},Kn={formatters:{values:function(e){return oe.isArray(e)?e:""+e},linear:function(e,t,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var a=oe.log10(Math.abs(r)),i="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=oe.log10(Math.abs(e)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),i=e.toExponential(s)}else{var c=-1*Math.floor(a);c=Math.max(Math.min(c,20),0),i=e.toFixed(c)}else i="0";return i},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(oe.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},Qn=oe.isArray,Zn=oe.isNullOrUndef,er=oe.valueOrDefault,tr=oe.valueAtIndexOrDefault;function nr(e,t){for(var n=[],r=e.length/t,a=0,i=e.length;ac+l)))return o}function ar(e,t){oe.each(e,(function(e){var n,r=e.gc,a=r.length/2;if(a>t){for(n=0;nl)return i;return Math.max(l,1)}function pr(e){var t,n,r=[];for(t=0,n=e.length;t
=f||u<=1||!s.isHorizontal()?s.labelRotation=d:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),t+6>(a=c.offset?s.maxWidth/u:r/(u-1))&&(a=r/(u-(c.offset?.5:1)),i=s.maxHeight-or(c.gridLines)-l.padding-sr(c.scaleLabel),o=Math.sqrt(t*t+n*n),p=oe.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/a,1)),Math.asin(Math.min(i/o,1))-Math.asin(n/o))),p=Math.max(d,Math.min(f,p))),s.labelRotation=p)},afterCalculateTickRotation:function(){oe.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){oe.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,a=r.ticks,i=r.scaleLabel,o=r.gridLines,s=e._isVisible(),c="bottom"===r.position,l=e.isHorizontal();if(l?t.width=e.maxWidth:s&&(t.width=or(o)+sr(i)),l?s&&(t.height=or(o)+sr(i)):t.height=e.maxHeight,a.display&&s){var u=lr(a),d=e._getLabelSizes(),f=d.first,p=d.last,h=d.widest,m=d.highest,_=.4*u.minor.lineHeight,M=a.padding;if(l){var b=0!==e.labelRotation,g=oe.toRadians(e.labelRotation),v=Math.cos(g),y=Math.sin(g),L=y*h.width+v*(m.height-(b?m.offset:0))+(b?0:_);t.height=Math.min(e.maxHeight,t.height+L+M);var A,z,w=e.getPixelForTick(0)-e.left,T=e.right-e.getPixelForTick(e.getTicks().length-1);b?(A=c?v*f.width+y*f.offset:y*(f.height-f.offset),z=c?y*(p.height-p.offset):v*p.width+y*p.offset):(A=f.width/2,z=p.width/2),e.paddingLeft=Math.max((A-w)*e.width/(e.width-w),0)+3,e.paddingRight=Math.max((z-T)*e.width/(e.width-T),0)+3}else{var k=a.mirror?0:h.width+M+_;t.width=Math.min(e.maxWidth,t.width+k),e.paddingTop=f.height/2,e.paddingBottom=p.height/2}}e.handleMargins(),l?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){oe.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(Zn(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r,a=this;for(a.ticks=e.map((function(e){return e.value})),a.beforeTickToLabelConversion(),t=a.convertTicksToLabels(e)||a.ticks,a.afterTickToLabelConversion(),n=0,r=e.length;n r-1?null:t.getPixelForDecimal(e*a+(n?a/2:0))},getPixelForDecimal:function(e){var t=this;return t._reversePixels&&(e=1-e),t._startPixel+e*t._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,n=e.max;return e.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0},_autoSkip:function(e){var t,n,r,a,i=this,o=i.options.ticks,s=i._length,c=o.maxTicksLimit||s/i._tickSize()+1,l=o.major.enabled?pr(e):[],u=l.length,d=l[0],f=l[u-1];if(u>c)return hr(e,l,u/c),ur(e);if(r=fr(l,e,s,c),u>0){for(t=0,n=u-1;t 1?(f-d)/(u-1):null,mr(e,r,oe.isNullOrUndef(a)?0:d-a,d),mr(e,r,f,oe.isNullOrUndef(a)?e.length:f+a),ur(e)}return mr(e,r),ur(e)},_tickSize:function(){var e=this,t=e.options.ticks,n=oe.toRadians(e.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),i=e._getLabelSizes(),o=t.autoSkipPadding||0,s=i?i.widest.width+o:0,c=i?i.highest.height+o:0;return e.isHorizontal()?c*r>s*a?s/r:c/a:c*a =0&&(o=e),void 0!==i&&(e=n.indexOf(i))>=0&&(s=e),t.minIndex=o,t.maxIndex=s,t.min=n[o],t.max=n[s]},buildTicks:function(){var e=this,t=e._getLabels(),n=e.minIndex,r=e.maxIndex;e.ticks=0===n&&r===t.length-1?t:t.slice(n,r+1)},getLabelForIndex:function(e,t){var n=this,r=n.chart;return r.getDatasetMeta(t).controller._getValueScaleId()===n.id?n.getRightValue(r.data.datasets[t].data[e]):n._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;Mr.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,a,i,o=this;return br(t)||br(n)||(e=o.chart.data.datasets[n].data[t]),br(e)||(r=o.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(a=o._getLabels(),e=oe.valueOrDefault(r,e),t=-1!==(i=a.indexOf(e))?i:t,isNaN(t)&&(t=e)),o.getPixelForDecimal((t-o._startValue)/o._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,n=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(n,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}}),yr=gr;vr._defaults=yr;var Lr=oe.noop,Ar=oe.isNullOrUndef;function zr(e,t){var n,r,a,i,o=[],s=1e-14,c=e.stepSize,l=c||1,u=e.maxTicks-1,d=e.min,f=e.max,p=e.precision,h=t.min,m=t.max,_=oe.niceNum((m-h)/u/l)*l;if(_u&&(_=oe.niceNum(i*_/u/l)*l),c||Ar(p)?n=Math.pow(10,oe._decimalPlaces(_)):(n=Math.pow(10,p),_=Math.ceil(_*n)/n),r=Math.floor(h/_)*_,a=Math.ceil(m/_)*_,c&&(!Ar(d)&&oe.almostWhole(d/_,_/1e3)&&(r=d),!Ar(f)&&oe.almostWhole(f/_,_/1e3)&&(a=f)),i=(a-r)/_,i=oe.almostEquals(i,Math.round(i),_/1e3)?Math.round(i):Math.ceil(i),r=Math.round(r*n)/n,a=Math.round(a*n)/n,o.push(Ar(d)?r:d);for(var M=1;M0&&r>0&&(e.min=0)}var a=void 0!==t.min||void 0!==t.suggestedMin,i=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),a!==i&&e.min>=e.max&&(a?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this,n=t.options.ticks,r=n.stepSize,a=n.maxTicksLimit;return r?e=Math.ceil(t.max/r)-Math.floor(t.min/r)+1:(e=t._computeTickLimit(),a=a||11),a&&(e=Math.min(a,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Lr,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:oe.valueOrDefault(t.fixedStepSize,t.stepSize)},a=e.ticks=zr(r,e);e.handleDirectionalChanges(),e.max=oe.max(a),e.min=oe.min(a),t.reverse?(a.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),Mr.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,n=t.getTicks(),r=t.min,a=t.max;Mr.prototype._configure.call(t),t.options.offset&&n.length&&(r-=e=(a-r)/Math.max(n.length-1,1)/2,a+=e),t._startValue=r,t._endValue=a,t._valueRange=a-r}}),Tr={position:"left",ticks:{callback:Kn.formatters.linear}},kr=0,xr=1;function Or(e,t,n){var r=[n.type,void 0===t&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===e[r]&&(e[r]={pos:[],neg:[]}),e[r]}function Dr(e,t,n,r){var a,i,o=e.options,s=Or(t,o.stacked,n),c=s.pos,l=s.neg,u=r.length;for(a=0;at.length-1?null:this.getPixelForValue(t[e])}}),Yr=Tr;Nr._defaults=Yr;var Cr=oe.valueOrDefault,Wr=oe.math.log10;function qr(e,t){var n,r,a=[],i=Cr(e.min,Math.pow(10,Math.floor(Wr(t.min)))),o=Math.floor(Wr(t.max)),s=Math.ceil(t.max/Math.pow(10,o));0===i?(n=Math.floor(Wr(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),a.push(i),i=r*Math.pow(10,n)):(n=Math.floor(Wr(i)),r=Math.floor(i/Math.pow(10,n)));var c=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(i),10==++r&&(r=1,c=++n>=0?1:c),i=Math.round(r*Math.pow(10,n)*c)/c}while(n=0?e:t}var Br=Mr.extend({determineDataLimits:function(){var e,t,n,r,a,i,o=this,s=o.options,c=o.chart,l=c.data.datasets,u=o.isHorizontal();function d(e){return u?e.xAxisID===o.id:e.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var f=s.stacked;if(void 0===f)for(e=0;e 0){var t=oe.min(e),n=oe.max(e);o.min=Math.min(o.min,t),o.max=Math.max(o.max,n)}}))}else for(e=0;e 0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Wr(e.max))):e.minNotZero=n)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:jr(t.min),max:jr(t.max)},a=e.ticks=qr(r,e);e.max=oe.max(a),e.min=oe.min(a),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),Mr.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Wr(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;Mr.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=Cr(e.options.ticks.fontSize,Q.global.defaultFontSize)/e._length),e._startValue=Wr(t),e._valueOffset=n,e._valueRange=(Wr(e.max)-Wr(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(Wr(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),Pr=Er;Br._defaults=Pr;var Hr=oe.valueOrDefault,Xr=oe.valueAtIndexOrDefault,Rr=oe.options.resolve,Ir={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Kn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Fr(e){var t=e.ticks;return t.display&&e.display?Hr(t.fontSize,Q.global.defaultFontSize)+2*t.backdropPaddingY:0}function $r(e,t,n){return oe.isArray(n)?{w:oe.longestText(e,e.font,n),h:n.length*t}:{w:e.measureText(n).width,h:t}}function Ur(e,t,n,r,a){return e===r||e===a?{start:t-n/2,end:t+n/2}:e a?{start:t-n,end:t}:{start:t,end:t+n}}function Vr(e){var t,n,r,a=oe.options._parseFont(e.options.pointLabels),i={l:0,r:e.width,t:0,b:e.height-e.paddingTop},o={};e.ctx.font=a.string,e._pointLabelSizes=[];var s=e.chart.data.labels.length;for(t=0;t i.r&&(i.r=u.end,o.r=c),d.starti.b&&(i.b=d.end,o.b=c)}e.setReductions(e.drawingArea,i,o)}function Jr(e){return 0===e||180===e?"center":e<180?"left":"right"}function Gr(e,t,n,r){var a,i,o=n.y+r/2;if(oe.isArray(t))for(a=0,i=t.length;a270||e<90)&&(n.y-=t.h)}function Qr(e){var t=e.ctx,n=e.options,r=n.pointLabels,a=Fr(n),i=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),o=oe.options._parseFont(r);t.save(),t.font=o.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var c=0===s?a/2:0,l=e.getPointPosition(s,i+c+5),u=Xr(r.fontColor,s,Q.global.defaultFontColor);t.fillStyle=u;var d=e.getIndexAngle(s),f=oe.toDegrees(d);t.textAlign=Jr(f),Kr(f,e._pointLabelSizes[s],l),Gr(t,e.pointLabels[s],l,o.lineHeight)}t.restore()}function Zr(e,t,n,r){var a,i=e.ctx,o=t.circular,s=e.chart.data.labels.length,c=Xr(t.color,r-1),l=Xr(t.lineWidth,r-1);if((o||s)&&c&&l){if(i.save(),i.strokeStyle=c,i.lineWidth=l,i.setLineDash&&(i.setLineDash(t.borderDash||[]),i.lineDashOffset=t.borderDashOffset||0),i.beginPath(),o)i.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{a=e.getPointPosition(0,n),i.moveTo(a.x,a.y);for(var u=1;u 0&&r>0?n:0)},_drawGrid:function(){var e,t,n,r=this,a=r.ctx,i=r.options,o=i.gridLines,s=i.angleLines,c=Hr(s.lineWidth,o.lineWidth),l=Hr(s.color,o.color);if(i.pointLabels.display&&Qr(r),o.display&&oe.each(r.ticks,(function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),Zr(r,o,t,n))})),s.display&&c&&l){for(a.save(),a.lineWidth=c,a.strokeStyle=l,a.setLineDash&&(a.setLineDash(Rr([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Rr([s.borderDashOffset,o.borderDashOffset,0])),e=r.chart.data.labels.length-1;e>=0;e--)t=r.getDistanceFromCenterForValue(i.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),a.beginPath(),a.moveTo(r.xCenter,r.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,a,i=e.getIndexAngle(0),o=oe.options._parseFont(n),s=Hr(n.fontColor,Q.global.defaultFontColor);t.save(),t.font=o.string,t.translate(e.xCenter,e.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",oe.each(e.ticks,(function(i,c){(0!==c||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[c]),n.showLabelBackdrop&&(a=t.measureText(i).width,t.fillStyle=n.backdropColor,t.fillRect(-a/2-n.backdropPaddingX,-r-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(i,0,-r))})),t.restore()}},_drawTitle:oe.noop}),na=Ir;ta._defaults=na;var ra=oe._deprecated,aa=oe.options.resolve,ia=oe.valueOrDefault,oa=Number.MIN_SAFE_INTEGER||-9007199254740991,sa=Number.MAX_SAFE_INTEGER||9007199254740991,ca={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},la=Object.keys(ca);function ua(e,t){return e-t}function da(e){var t,n,r,a={},i=[];for(t=0,n=e.length;tt&&s =0&&o<=s;){if(a=e[(r=o+s>>1)-1]||null,i=e[r],!a)return{lo:null,hi:i};if(i[t] n))return{lo:a,hi:i};s=r-1}}return{lo:i,hi:null}}function _a(e,t,n,r){var a=ma(e,t,n),i=a.lo?a.hi?a.lo:e[e.length-2]:e[0],o=a.lo?a.hi?a.hi:e[e.length-1]:e[1],s=o[t]-i[t],c=s?(n-i[t])/s:0,l=(o[r]-i[r])*c;return i[r]+l}function Ma(e,t){var n=e._adapter,r=e.options.time,a=r.parser,i=a||r.format,o=t;return"function"==typeof a&&(o=a(o)),oe.isFinite(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null!==o?+o:(a||"function"!=typeof i||(o=i(t),oe.isFinite(o)||(o=n.parse(o))),o)}function ba(e,t){if(oe.isNullOrUndef(t))return null;var n=e.options.time,r=Ma(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function ga(e,t,n,r){var a,i,o,s=la.length;for(a=la.indexOf(e);a =la.indexOf(n);i--)if(o=la[i],ca[o].common&&e._adapter.diff(a,r,o)>=t-1)return o;return la[n?la.indexOf(n):0]}function ya(e){for(var t=la.indexOf(e)+1,n=la.length;t 1e5*l)throw t+" and "+n+" are too far apart with stepSize of "+l+" "+c;for(a=d;a =0&&(t[i].major=!0);return t}function wa(e,t,n){var r,a,i=[],o={},s=t.length;for(r=0;r 1?da(h).sort(ua):h.sort(ua),f=Math.min(f,h[0]),p=Math.max(p,h[h.length-1])),f=ba(s,fa(u))||f,p=ba(s,pa(u))||p,f=f===sa?+l.startOf(Date.now(),d):f,p=p===oa?+l.endOf(Date.now(),d)+1:p,s.min=Math.min(f,p),s.max=Math.max(f+1,p),s._table=[],s._timestamps={data:h,datasets:m,labels:_}},buildTicks:function(){var e,t,n,r=this,a=r.min,i=r.max,o=r.options,s=o.ticks,c=o.time,l=r._timestamps,u=[],d=r.getLabelCapacity(a),f=s.source,p=o.distribution;for(l="data"===f||"auto"===f&&"series"===p?l.data:"labels"===f?l.labels:La(r,a,i,d),"ticks"===o.bounds&&l.length&&(a=l[0],i=l[l.length-1]),a=ba(r,fa(o))||a,i=ba(r,pa(o))||i,e=0,t=l.length;e=a&&n<=i&&u.push(n);return r.min=a,r.max=i,r._unit=c.unit||(s.autoSkip?ga(c.minUnit,r.min,r.max,d):va(r,u.length,c.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?ya(r._unit):void 0,r._table=ha(r._timestamps.data,a,i,p),r._offsets=Aa(r._table,u,a,i,o),s.reverse&&u.reverse(),wa(r,u,r._majorUnit)},getLabelForIndex:function(e,t){var n=this,r=n._adapter,a=n.chart.data,i=n.options.time,o=a.labels&&e =0&&e 0?s:1}}),xa=Ta;ka._defaults=xa;var Oa={category:vr,linear:Nr,logarithmic:Br,radialLinear:ta,time:ka},Da={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Gn._date.override("function"==typeof e?{_id:"moment",formats:function(){return Da},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,r){return e(t).add(n,r).valueOf()},diff:function(t,n,r){return e(t).diff(e(n),r)},startOf:function(t,n,r){return t=e(t),"isoWeek"===n?t.isoWeekday(r).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),Q._set("global",{plugins:{filler:{propagate:!0}}});var Sa={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),a=r&&n.isDatasetVisible(t)&&r.dataset._children||[],i=a.length||0;return i?function(e,t){return t=n)&&r;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function Ya(e){var t,n=e.el._model||{},r=e.el._scale||{},a=e.fill,i=null;if(isFinite(a))return null;if("start"===a?i=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===a?i=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?i=n.scaleZero:r.getBasePixel&&(i=r.getBasePixel()),null!=i){if(void 0!==i.x&&void 0!==i.y)return i;if(oe.isFinite(i))return{x:(t=r.isHorizontal())?i:null,y:t?null:i}}return null}function Ca(e){var t,n,r,a,i,o=e.el._scale,s=o.options,c=o.chart.data.labels.length,l=e.fill,u=[];if(!c)return null;for(t=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,r=o.getPointPositionForValue(0,t),a=0;a 0;--i)oe.canvas.lineTo(e,n[i],n[i-1],!0);else for(o=n[0].cx,s=n[0].cy,c=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),i=a-1;i>0;--i)e.arc(o,s,c,n[i].angle,n[i-1].angle,!0)}}function Pa(e,t,n,r,a,i){var o,s,c,l,u,d,f,p,h=t.length,m=r.spanGaps,_=[],M=[],b=0,g=0;for(e.beginPath(),o=0,s=h;o =0;--n)(t=c[n].$filler)&&t.visible&&(a=(r=t.el)._view,i=r._children||[],o=t.mapper,s=a.backgroundColor||Q.global.defaultColor,o&&s&&i.length&&(oe.canvas.clipArea(l,e.chartArea),Pa(l,i,o,a,s,r._loop),oe.canvas.unclipArea(l)))}},Xa=oe.rtl.getRtlAdapter,Ra=oe.noop,Ia=oe.valueOrDefault;function Fa(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}Q._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,a=r.getDatasetMeta(n);a.hidden=null===a.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:a.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,r,a=document.createElement("ul"),i=e.data.datasets;for(a.setAttribute("class",e.id+"-legend"),t=0,n=i.length;tc.width)&&(d+=o+n.padding,u[u.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:r,height:o},u[u.length-1]+=r+n.padding})),c.height+=d}else{var f=n.padding,p=e.columnWidths=[],h=e.columnHeights=[],m=n.padding,_=0,M=0;oe.each(e.legendItems,(function(e,t){var r=Fa(n,o)+o/2+a.measureText(e.text).width;t>0&&M+o+2*f>c.height&&(m+=_+n.padding,p.push(_),h.push(M),_=0,M=0),_=Math.max(_,r),M+=o+f,s[t]={left:0,top:0,width:r,height:o}})),m+=_,p.push(_),h.push(M),c.width+=m}e.width=c.width,e.height=c.height}else e.width=c.width=e.height=c.height=0},afterFit:Ra,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,r=Q.global,a=r.defaultColor,i=r.elements.line,o=e.height,s=e.columnHeights,c=e.width,l=e.lineWidths;if(t.display){var u,d=Xa(t.rtl,e.left,e.minSize.width),f=e.ctx,p=Ia(n.fontColor,r.defaultFontColor),h=oe.options._parseFont(n),m=h.size;f.textAlign=d.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=p,f.fillStyle=p,f.font=h.string;var _=Fa(n,m),M=e.legendHitBoxes,b=function(e,t,r){if(!(isNaN(_)||_<=0)){f.save();var o=Ia(r.lineWidth,i.borderWidth);if(f.fillStyle=Ia(r.fillStyle,a),f.lineCap=Ia(r.lineCap,i.borderCapStyle),f.lineDashOffset=Ia(r.lineDashOffset,i.borderDashOffset),f.lineJoin=Ia(r.lineJoin,i.borderJoinStyle),f.lineWidth=o,f.strokeStyle=Ia(r.strokeStyle,a),f.setLineDash&&f.setLineDash(Ia(r.lineDash,i.borderDash)),n&&n.usePointStyle){var s=_*Math.SQRT2/2,c=d.xPlus(e,_/2),l=t+m/2;oe.canvas.drawPoint(f,r.pointStyle,s,c,l,r.rotation)}else f.fillRect(d.leftForLtr(e,_),t,_,m),0!==o&&f.strokeRect(d.leftForLtr(e,_),t,_,m);f.restore()}},g=function(e,t,n,r){var a=m/2,i=d.xPlus(e,_+a),o=t+a;f.fillText(n.text,i,o),n.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(i,o),f.lineTo(d.xPlus(i,r),o),f.stroke())},v=function(e,r){switch(t.align){case"start":return n.padding;case"end":return e-r;default:return(e-r+n.padding)/2}},y=e.isHorizontal();u=y?{x:e.left+v(c,l[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+v(o,s[0]),line:0},oe.rtl.overrideTextDirection(e.ctx,t.textDirection);var L=m+n.padding;oe.each(e.legendItems,(function(t,r){var a=f.measureText(t.text).width,i=_+m/2+a,p=u.x,h=u.y;d.setWidth(e.minSize.width),y?r>0&&p+i+n.padding>e.left+e.minSize.width&&(h=u.y+=L,u.line++,p=u.x=e.left+v(c,l[u.line])):r>0&&h+L>e.top+e.minSize.height&&(p=u.x=p+e.columnWidths[u.line]+n.padding,u.line++,h=u.y=e.top+v(o,s[u.line]));var A=d.x(p);b(A,h,t),M[r].left=d.leftForLtr(A,M[r].width),M[r].top=h,g(A,h,t,a),y?u.x+=i+n.padding:u.y+=L})),oe.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,r,a,i=this;if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)for(a=i.legendHitBoxes,n=0;n =(r=a[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return i.legendItems[n];return null},handleEvent:function(e){var t,n=this,r=n.options,a="mouseup"===e.type?"click":e.type;if("mousemove"===a){if(!r.onHover&&!r.onLeave)return}else{if("click"!==a)return;if(!r.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===a?t&&r.onClick&&r.onClick.call(n,e.native,t):(r.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),r.onHover&&t&&r.onHover.call(n,e.native,t))}});function Ua(e,t){var n=new $a({ctx:e.ctx,options:t,chart:e});It.configure(e,n,t),It.addBox(e,n),e.legend=n}var Va={id:"legend",_element:$a,beforeInit:function(e){var t=e.options.legend;t&&Ua(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(oe.mergeIf(t,Q.global.legend),n?(It.configure(e,n,t),n.options=t):Ua(e,t)):n&&(It.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},Ja=oe.noop;Q._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ga=he.extend({initialize:function(e){var t=this;oe.extend(t,e),t.legendHitBoxes=[]},beforeUpdate:Ja,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Ja,beforeSetDimensions:Ja,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Ja,beforeBuildLabels:Ja,buildLabels:Ja,afterBuildLabels:Ja,beforeFit:Ja,fit:function(){var e,t=this,n=t.options,r=t.minSize={},a=t.isHorizontal();n.display?(e=(oe.isArray(n.text)?n.text.length:1)*oe.options._parseFont(n).lineHeight+2*n.padding,t.width=r.width=a?t.maxWidth:e,t.height=r.height=a?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:Ja,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r,a,i,o=oe.options._parseFont(n),s=o.lineHeight,c=s/2+n.padding,l=0,u=e.top,d=e.left,f=e.bottom,p=e.right;t.fillStyle=oe.valueOrDefault(n.fontColor,Q.global.defaultFontColor),t.font=o.string,e.isHorizontal()?(a=d+(p-d)/2,i=u+c,r=p-d):(a="left"===n.position?d+c:p-c,i=u+(f-u)/2,r=f-u,l=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(a,i),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var h=n.text;if(oe.isArray(h))for(var m=0,_=0;_ {"use strict";n.d(t,{Z:()=>i});var r=n(3645),a=n.n(r)()((function(e){return e[1]}));a.push([e.id,"#alertModal{z-index:99999;background:rgba(0,0,0,.5)}#alertModal svg{display:block;margin:0 auto;width:4rem;height:4rem}",""]);const i=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i 0&&t-1 in e)}z.fn=z.prototype={jquery:A,constructor:z,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=z.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return z.each(this,e)},map:function(e){return this.pushStack(z.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(z.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(z.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n +~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),F=new RegExp(E+"|>"),$=new RegExp(P),U=new RegExp("^"+j+"$"),V={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+q+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ae=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){f()},oe=ve((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{Y.apply(D=C.call(y.childNodes),y.childNodes),D[y.childNodes.length].nodeType}catch(e){Y={apply:D.length?function(e,t){N.apply(e,C.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,a){var i,s,l,u,d,h,M,b=t&&t.ownerDocument,y=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return r;if(!a&&(f(t),t=t||p,m)){if(11!==y&&(d=Z.exec(e)))if(i=d[1]){if(9===y){if(!(l=t.getElementById(i)))return r;if(l.id===i)return r.push(l),r}else if(b&&(l=b.getElementById(i))&&g(t,l)&&l.id===i)return r.push(l),r}else{if(d[2])return Y.apply(r,t.getElementsByTagName(e)),r;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return Y.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!k[e+" "]&&(!_||!_.test(e))&&(1!==y||"object"!==t.nodeName.toLowerCase())){if(M=e,b=t,1===y&&(F.test(e)||I.test(e))){for((b=ee.test(e)&&Me(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(re,ae):t.setAttribute("id",u=v)),s=(h=o(e)).length;s--;)h[s]=(u?"#"+u:":scope")+" "+ge(h[s]);M=h.join(",")}try{return Y.apply(r,b.querySelectorAll(M)),r}catch(t){k(e,!0)}finally{u===v&&t.removeAttribute("id")}}}return c(e.replace(X,"$1"),t,r,a)}function ce(){var e=[];return function t(n,a){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=a}}function le(e){return e[v]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),a=n.length;a--;)r.attrHandle[n[a]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function _e(e){return le((function(t){return t=+t,le((function(n,r){for(var a,i=e([],n.length,t),o=i.length;o--;)n[a=i[o]]&&(n[a]=!(r[a]=n[a]))}))}))}function Me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,a,o=e?e.ownerDocument||e:y;return o!=p&&9===o.nodeType&&o.documentElement?(h=(p=o).documentElement,m=!i(p),y!=p&&(a=p.defaultView)&&a.top!==a&&(a.addEventListener?a.addEventListener("unload",ie,!1):a.attachEvent&&a.attachEvent("onunload",ie)),n.scope=ue((function(e){return h.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(p.getElementsByClassName),n.getById=ue((function(e){return h.appendChild(e).id=v,!p.getElementsByName||!p.getElementsByName(v).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,a,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(a=t.getElementsByName(e),r=0;i=a[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],a=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[a++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},M=[],_=[],(n.qsa=Q.test(p.querySelectorAll))&&(ue((function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+q+")"),e.querySelectorAll("[id~="+v+"-]").length||_.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||_.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+v+"+*").length||_.push(".#.+[+~]"),e.querySelectorAll("\\\f"),_.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&_.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")}))),(n.matchesSelector=Q.test(b=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=b.call(e,"*"),b.call(e,"[s!='']:x"),M.push("!=",P)})),_=_.length&&new RegExp(_.join("|")),M=M.length&&new RegExp(M.join("|")),t=Q.test(h.compareDocumentPosition),g=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},x=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==y&&g(y,e)?-1:t==p||t.ownerDocument==y&&g(y,t)?1:u?W(u,e)-W(u,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,a=e.parentNode,i=t.parentNode,o=[e],s=[t];if(!a||!i)return e==p?-1:t==p?1:a?-1:i?1:u?W(u,e)-W(u,t):0;if(a===i)return fe(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?fe(o[r],s[r]):o[r]==y?-1:s[r]==y?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(f(e),n.matchesSelector&&m&&!k[t+" "]&&(!M||!M.test(t))&&(!_||!_.test(t)))try{var r=b.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=p&&f(e),g(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=p&&f(e);var a=r.attrHandle[t.toLowerCase()],i=a&&O.call(r.attrHandle,t.toLowerCase())?a(e,t,!m):void 0;return void 0!==i?i:n.attributes||!m?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(re,ae)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],a=0,i=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(x),d){for(;t=e[i++];)t===e[i]&&(a=r.push(i));for(;a--;)e.splice(r[a],1)}return u=null,e},a=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=a(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=o(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+E+"|$)"))&&z(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var a=se.attr(r,e);return null==a?"!="===t:!t||(a+="","="===t?a===n:"!="===t?a!==n:"^="===t?n&&0===a.indexOf(n):"*="===t?n&&a.indexOf(n)>-1:"$="===t?n&&a.slice(-n.length)===n:"~="===t?(" "+a.replace(H," ")+" ").indexOf(n)>-1:"|="===t&&(a===n||a.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,a){var i="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===a?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,f,p,h,m=i!==o?"nextSibling":"previousSibling",_=t.parentNode,M=s&&t.nodeName.toLowerCase(),b=!c&&!s,g=!1;if(_){if(i){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===M:1===f.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[o?_.firstChild:_.lastChild],o&&b){for(g=(p=(l=(u=(d=(f=_)[v]||(f[v]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===L&&l[1])&&l[2],f=p&&_.childNodes[p];f=++p&&f&&f[m]||(g=p=0)||h.pop();)if(1===f.nodeType&&++g&&f===t){u[e]=[L,p,g];break}}else if(b&&(g=p=(l=(u=(d=(f=t)[v]||(f[v]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===L&&l[1]),!1===g)for(;(f=++p&&f&&f[m]||(g=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==M:1!==f.nodeType)||!++g||(b&&((u=(d=f[v]||(f[v]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[L,g]),f!==t)););return(g-=a)===r||g%r==0&&g/r>=0}}},PSEUDO:function(e,t){var n,a=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[v]?a(t):a.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,i=a(e,t),o=i.length;o--;)e[r=W(e,i[o])]=!(n[r]=i[o])})):function(e){return a(e,0,n)}):a}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(X,"$1"));return r[v]?le((function(e,t,n,a){for(var i,o=r(e,null,a,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))})):function(e,a,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||a(t)).indexOf(e)>-1}})),lang:le((function(e){return U.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:_e((function(){return[0]})),last:_e((function(e,t){return[t-1]})),eq:_e((function(e,t,n){return[n<0?n+t:n]})),even:_e((function(e,t){for(var n=0;n t?t:n;--r>=0;)e.push(r);return e})),gt:_e((function(e,t,n){for(var r=n<0?n+t:n;++r 1?function(t,n,r){for(var a=e.length;a--;)if(!e[a](t,n,r))return!1;return!0}:e[0]}function Le(e,t,n,r,a){for(var i,o=[],s=0,c=e.length,l=null!=t;s -1&&(i[l]=!(o[l]=d))}}else M=Le(M===o?M.splice(h,M.length):M),a?a(null,o,M,c):Y.apply(o,M)}))}function ze(e){for(var t,n,a,i=e.length,o=r.relative[e[0].type],s=o||r.relative[" "],c=o?1:0,u=ve((function(e){return e===t}),s,!0),d=ve((function(e){return W(t,e)>-1}),s,!0),f=[function(e,n,r){var a=!o&&(r||n!==l)||((t=n).nodeType?u(e,n,r):d(e,n,r));return t=null,a}];c1&&ye(f),c>1&&ge(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(X,"$1"),n,c0,a=e.length>0,i=function(i,o,s,c,u){var d,h,_,M=0,b="0",g=i&&[],v=[],y=l,A=i||a&&r.find.TAG("*",u),z=L+=null==y?1:Math.random()||.1,w=A.length;for(u&&(l=o==p||o||u);b!==w&&null!=(d=A[b]);b++){if(a&&d){for(h=0,o||d.ownerDocument==p||(f(d),s=!m);_=e[h++];)if(_(d,o||p,s)){c.push(d);break}u&&(L=z)}n&&((d=!_&&d)&&M--,i&&g.push(d))}if(M+=b,n&&b!==M){for(h=0;_=t[h++];)_(g,v,o,s);if(i){if(M>0)for(;b--;)g[b]||v[b]||(v[b]=S.call(c));v=Le(v)}Y.apply(c,v),u&&!i&&v.length>0&&M+t.length>1&&se.uniqueSort(c)}return u&&(L=z,l=y),g};return n?le(i):i}(i,a))).selector=e}return s},c=se.select=function(e,t,n,a){var i,c,l,u,d,f="function"==typeof e&&e,p=!a&&o(e=f.selector||e);if(n=n||[],1===p.length){if((c=p[0]=p[0].slice(0)).length>2&&"ID"===(l=c[0]).type&&9===t.nodeType&&m&&r.relative[c[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(c.shift().value.length)}for(i=V.needsContext.test(e)?0:c.length;i--&&(l=c[i],!r.relative[u=l.type]);)if((d=r.find[u])&&(a=d(l.matches[0].replace(te,ne),ee.test(c[0].type)&&Me(t.parentNode)||t))){if(c.splice(i,1),!(e=a.length&&ge(c)))return Y.apply(n,a),n;break}}return(f||s(e,p))(a,t,!m,n,!t||ee.test(e)&&Me(t.parentNode)||t),n},n.sortStable=v.split("").sort(x).join("")===v,n.detectDuplicates=!!d,f(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ue((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||de(q,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);z.find=T,z.expr=T.selectors,z.expr[":"]=z.expr.pseudos,z.uniqueSort=z.unique=T.uniqueSort,z.text=T.getText,z.isXMLDoc=T.isXML,z.contains=T.contains,z.escapeSelector=T.escape;var k=function(e,t,n){for(var r=[],a=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(a&&z(e).is(n))break;r.push(e)}return r},x=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},O=z.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(e,t,n){return M(t)?z.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?z.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?z.grep(e,(function(e){return u.call(t,e)>-1!==n})):z.filter(t,e,n)}z.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?z.find.matchesSelector(r,e)?[r]:[]:z.find.matches(e,z.grep(t,(function(e){return 1===e.nodeType})))},z.fn.extend({find:function(e){var t,n,r=this.length,a=this;if("string"!=typeof e)return this.pushStack(z(e).filter((function(){for(t=0;t 1?z.uniqueSort(n):n},filter:function(e){return this.pushStack(N(this,e||[],!1))},not:function(e){return this.pushStack(N(this,e||[],!0))},is:function(e){return!!N(this,"string"==typeof e&&O.test(e)?z(e):e||[],!1).length}});var Y,C=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(z.fn.init=function(e,t,n){var r,a;if(!e)return this;if(n=n||Y,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:C.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof z?t[0]:t,z.merge(this,z.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),S.test(r[1])&&z.isPlainObject(t))for(r in t)M(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(a=g.getElementById(r[2]))&&(this[0]=a,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):M(e)?void 0!==n.ready?n.ready(e):e(z):z.makeArray(e,this)}).prototype=z.fn,Y=z(g);var W=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function E(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}z.fn.extend({has:function(e){var t=z(e,this),n=t.length;return this.filter((function(){for(var e=0;e -1:1===n.nodeType&&z.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?z.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?u.call(z(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(z.uniqueSort(z.merge(this.get(),z(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return E(e,"nextSibling")},prev:function(e){return E(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return x((e.parentNode||{}).firstChild,e)},children:function(e){return x(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(D(e,"template")&&(e=e.content||e),z.merge([],e.childNodes))}},(function(e,t){z.fn[e]=function(n,r){var a=z.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(a=z.filter(r,a)),this.length>1&&(q[e]||z.uniqueSort(a),W.test(e)&&a.reverse()),this.pushStack(a)}}));var j=/[^\x20\t\r\n\f]+/g;function B(e){return e}function P(e){throw e}function H(e,t,n,r){var a;try{e&&M(a=e.promise)?a.call(e).done(t).fail(n):e&&M(a=e.then)?a.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}z.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return z.each(e.match(j)||[],(function(e,n){t[n]=!0})),t}(e):z.extend({},e);var t,n,r,a,i=[],o=[],s=-1,c=function(){for(a=a||e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s -1;)i.splice(n,1),n<=s&&s--})),this},has:function(e){return e?z.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return a=o=[],i=n="",this},disabled:function(){return!i},lock:function(){return a=o=[],n||t||(i=n=""),this},locked:function(){return!!a},fireWith:function(e,n){return a||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||c()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},z.extend({Deferred:function(e){var t=[["notify","progress",z.Callbacks("memory"),z.Callbacks("memory"),2],["resolve","done",z.Callbacks("once memory"),z.Callbacks("once memory"),0,"resolved"],["reject","fail",z.Callbacks("once memory"),z.Callbacks("once memory"),1,"rejected"]],n="pending",a={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return a.then(null,e)},pipe:function(){var e=arguments;return z.Deferred((function(n){z.each(t,(function(t,r){var a=M(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=a&&a.apply(this,arguments);e&&M(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,a?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,a){var i=0;function o(e,t,n,a){return function(){var s=this,c=arguments,l=function(){var r,l;if(!(e=i&&(n!==P&&(s=void 0,c=[r]),t.rejectWith(s,c))}};e?u():(z.Deferred.getStackHook&&(u.stackTrace=z.Deferred.getStackHook()),r.setTimeout(u))}}return z.Deferred((function(r){t[0][3].add(o(0,r,M(a)?a:B,r.notifyWith)),t[1][3].add(o(0,r,M(e)?e:B)),t[2][3].add(o(0,r,M(n)?n:P))})).promise()},promise:function(e){return null!=e?z.extend(e,a):a}},i={};return z.each(t,(function(e,r){var o=r[2],s=r[5];a[r[1]]=o.add,s&&o.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=o.fireWith})),a.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),a=s.call(arguments),i=z.Deferred(),o=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?s.call(arguments):n,--t||i.resolveWith(r,a)}};if(t<=1&&(H(e,i.done(o(n)).resolve,i.reject,!t),"pending"===i.state()||M(a[n]&&a[n].then)))return i.then();for(;n--;)H(a[n],o(n),i.reject);return i.promise()}});var X=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;z.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&X.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},z.readyException=function(e){r.setTimeout((function(){throw e}))};var R=z.Deferred();function I(){g.removeEventListener("DOMContentLoaded",I),r.removeEventListener("load",I),z.ready()}z.fn.ready=function(e){return R.then(e).catch((function(e){z.readyException(e)})),this},z.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--z.readyWait:z.isReady)||(z.isReady=!0,!0!==e&&--z.readyWait>0||R.resolveWith(g,[z]))}}),z.ready.then=R.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?r.setTimeout(z.ready):(g.addEventListener("DOMContentLoaded",I),r.addEventListener("load",I));var F=function(e,t,n,r,a,i,o){var s=0,c=e.length,l=null==n;if("object"===L(n))for(s in a=!0,n)F(e,t,s,n[s],!0,i,o);else if(void 0!==r&&(a=!0,M(r)||(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(z(e),n)})),t))for(;s 1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),z.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,z.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=z.queue(e,t),r=n.length,a=n.shift(),i=z._queueHooks(e,t);"inprogress"===a&&(a=n.shift(),r--),a&&("fx"===t&&n.unshift("inprogress"),delete i.stop,a.call(e,(function(){z.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:z.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length \x20\t\r\n\f]*)/i,be=/^$|^module$|\/(?:java|ecma)script/i;he=g.createDocumentFragment().appendChild(g.createElement("div")),(me=g.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),he.appendChild(me),_.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="",_.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="",_.option=!!he.lastChild;var ge={thead:[1," ","
"],col:[2,""],tr:[2,"
"," ","
"],td:[3,""],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?z.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n
"," ",""]);var Le=/<|?\w+;/;function Ae(e,t,n,r,a){for(var i,o,s,c,l,u,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p -1)a&&a.push(i);else if(l=se(i),o=ve(d.appendChild(i),"script"),l&&ye(o),n)for(u=0;i=o[u++];)be.test(i.type||"")&&n.push(i);return d}var ze=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function ke(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function xe(e,t,n,r,a,i){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)xe(e,s,n,r,t[s],i);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=Te;else if(!a)return e;return 1===i&&(o=a,(a=function(e){return z().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=z.guid++)),e.each((function(){z.event.add(this,t,a,r,n)}))}function Oe(e,t,n){n?(Q.set(e,t,!1),z.event.add(e,t,{namespace:!1,handler:function(e){var r,a,i=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(z.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=s.call(arguments),Q.set(this,t,i),r=n(this,t),this[t](),i!==(a=Q.get(this,t))||r?Q.set(this,t,!1):a={},i!==a)return e.stopImmediatePropagation(),e.preventDefault(),a&&a.value}else i.length&&(Q.set(this,t,{value:z.event.trigger(z.extend(i[0],z.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&z.event.add(e,t,we)}z.event={global:{},add:function(e,t,n,r,a){var i,o,s,c,l,u,d,f,p,h,m,_=Q.get(e);if(G(e))for(n.handler&&(n=(i=n).handler,a=i.selector),a&&z.find.matchesSelector(oe,a),n.guid||(n.guid=z.guid++),(c=_.events)||(c=_.events=Object.create(null)),(o=_.handle)||(o=_.handle=function(t){return void 0!==z&&z.event.triggered!==t.type?z.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(j)||[""]).length;l--;)p=m=(s=ze.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=z.event.special[p]||{},p=(a?d.delegateType:d.bindType)||p,d=z.event.special[p]||{},u=z.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:a,needsContext:a&&z.expr.match.needsContext.test(a),namespace:h.join(".")},i),(f=c[p])||((f=c[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,o)||e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),a?f.splice(f.delegateCount++,0,u):f.push(u),z.event.global[p]=!0)},remove:function(e,t,n,r,a){var i,o,s,c,l,u,d,f,p,h,m,_=Q.hasData(e)&&Q.get(e);if(_&&(c=_.events)){for(l=(t=(t||"").match(j)||[""]).length;l--;)if(p=m=(s=ze.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=z.event.special[p]||{},f=c[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=i=f.length;i--;)u=f[i],!a&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(f.splice(i,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(e,u));o&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,_.handle)||z.removeEvent(e,p,_.handle),delete c[p])}else for(p in c)z.event.remove(e,p+t[l],n,r,!0);z.isEmptyObject(c)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,a,i,o,s=new Array(arguments.length),c=z.event.fix(e),l=(Q.get(this,"events")||Object.create(null))[c.type]||[],u=z.event.special[c.type]||{};for(s[0]=c,t=1;t =1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],o={},n=0;n -1:z.find(a,this,null,[l]).length),o[a]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return l=this,c \s*$/g;function Ye(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&z(e).children("tbody")[0]||e}function Ce(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function qe(e,t){var n,r,a,i,o,s;if(1===t.nodeType){if(Q.hasData(e)&&(s=Q.get(e).events))for(a in Q.remove(t,"handle events"),s)for(n=0,r=s[a].length;n 1&&"string"==typeof h&&!_.checkClone&&Se.test(h))return e.each((function(a){var i=e.eq(a);m&&(t[0]=h.call(this,a,i.html())),je(i,t,n,r)}));if(f&&(i=(a=Ae(t,e[0].ownerDocument,!1,e,r)).firstChild,1===a.childNodes.length&&(a=i),i||r)){for(s=(o=z.map(ve(a,"script"),Ce)).length;d 0&&ye(o,!c&&ve(e,"script")),s},cleanData:function(e){for(var t,n,r,a=z.event.special,i=0;void 0!==(n=e[i]);i++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)a[r]?z.event.remove(n,r):z.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),z.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return F(this,(function(e){return void 0===e?z.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return je(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ye(this,e).appendChild(e)}))},prepend:function(){return je(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ye(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return je(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return je(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(z.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return z.clone(this,e,t)}))},html:function(e){return F(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!ge[(Me.exec(e)||["",""])[1].toLowerCase()]){e=z.htmlPrefilter(e);try{for(;n =0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-c-s-.5))||0),c}function nt(e,t,n){var r=He(e),a=(!_.boxSizingReliable()||n)&&"border-box"===z.css(e,"boxSizing",!1,r),i=a,o=Ie(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(o)){if(!n)return o;o="auto"}return(!_.boxSizingReliable()&&a||!_.reliableTrDimensions()&&D(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===z.css(e,"display",!1,r))&&e.getClientRects().length&&(a="border-box"===z.css(e,"boxSizing",!1,r),(i=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+tt(e,t,n||(a?"border":"content"),i,r,o)+"px"}function rt(e,t,n,r,a){return new rt.prototype.init(e,t,n,r,a)}z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ie(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var a,i,o,s=J(t),c=Ke.test(t),l=e.style;if(c||(t=Je(s)),o=z.cssHooks[t]||z.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(a=o.get(e,!1,r))?a:l[t];"string"===(i=typeof n)&&(a=ae.exec(n))&&a[1]&&(n=ue(e,t,a),i="number"),null!=n&&n==n&&("number"!==i||c||(n+=a&&a[3]||(z.cssNumber[s]?"":"px")),_.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(c?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var a,i,o,s=J(t);return Ke.test(t)||(t=Je(s)),(o=z.cssHooks[t]||z.cssHooks[s])&&"get"in o&&(a=o.get(e,!0,n)),void 0===a&&(a=Ie(e,t,r)),"normal"===a&&t in Ze&&(a=Ze[t]),""===n||n?(i=parseFloat(a),!0===n||isFinite(i)?i||0:a):a}}),z.each(["height","width"],(function(e,t){z.cssHooks[t]={get:function(e,n,r){if(n)return!Ge.test(z.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):Xe(e,Qe,(function(){return nt(e,t,r)}))},set:function(e,n,r){var a,i=He(e),o=!_.scrollboxSize()&&"absolute"===i.position,s=(o||r)&&"border-box"===z.css(e,"boxSizing",!1,i),c=r?tt(e,t,r,s,i):0;return s&&o&&(c-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-tt(e,t,"border",!1,i)-.5)),c&&(a=ae.exec(n))&&"px"!==(a[3]||"px")&&(e.style[t]=n,n=z.css(e,t)),et(0,n,c)}}})),z.cssHooks.marginLeft=Fe(_.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ie(e,"marginLeft"))||e.getBoundingClientRect().left-Xe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),z.each({margin:"",padding:"",border:"Width"},(function(e,t){z.cssHooks[e+t]={expand:function(n){for(var r=0,a={},i="string"==typeof n?n.split(" "):[n];r<4;r++)a[e+ie[r]+t]=i[r]||i[r-2]||i[0];return a}},"margin"!==e&&(z.cssHooks[e+t].set=et)})),z.fn.extend({css:function(e,t){return F(this,(function(e,t,n){var r,a,i={},o=0;if(Array.isArray(t)){for(r=He(e),a=t.length;o1)}}),z.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,r,a,i){this.elem=e,this.prop=n,this.easing=a||z.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(z.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=z.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=z.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){z.fx.step[e.prop]?z.fx.step[e.prop](e):1!==e.elem.nodeType||!z.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:z.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},z.fx=rt.prototype.init,z.fx.step={};var at,it,ot=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function ct(){it&&(!1===g.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ct):r.setTimeout(ct,z.fx.interval),z.fx.tick())}function lt(){return r.setTimeout((function(){at=void 0})),at=Date.now()}function ut(e,t){var n,r=0,a={height:e};for(t=t?1:0;r<4;r+=2-t)a["margin"+(n=ie[r])]=a["padding"+n]=e;return t&&(a.opacity=a.width=e),a}function dt(e,t,n){for(var r,a=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),i=0,o=a.length;i 1)},removeAttr:function(e){return this.each((function(){z.removeAttr(this,e)}))}}),z.extend({attr:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?z.prop(e,t,n):(1===i&&z.isXMLDoc(e)||(a=z.attrHooks[t.toLowerCase()]||(z.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void z.removeAttr(e,t):a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:(e.setAttribute(t,n+""),n):a&&"get"in a&&null!==(r=a.get(e,t))?r:null==(r=z.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!_.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,a=t&&t.match(j);if(a&&1===e.nodeType)for(;n=a[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?z.removeAttr(e,n):e.setAttribute(n,n),n}},z.each(z.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||z.find.attr;ht[t]=function(e,t,r){var a,i,o=t.toLowerCase();return r||(i=ht[o],ht[o]=a,a=null!=n(e,t,r)?o:null,ht[o]=i),a}}));var mt=/^(?:input|select|textarea|button)$/i,_t=/^(?:a|area)$/i;function Mt(e){return(e.match(j)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function gt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(j)||[]}z.fn.extend({prop:function(e,t){return F(this,z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[z.propFix[e]||e]}))}}),z.extend({prop:function(e,t,n){var r,a,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&z.isXMLDoc(e)||(t=z.propFix[t]||t,a=z.propHooks[t]),void 0!==n?a&&"set"in a&&void 0!==(r=a.set(e,n,t))?r:e[t]=n:a&&"get"in a&&null!==(r=a.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=z.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){z.propFix[this.toLowerCase()]=this})),z.fn.extend({addClass:function(e){var t,n,r,a,i,o,s,c=0;if(M(e))return this.each((function(t){z(this).addClass(e.call(this,t,bt(this)))}));if((t=gt(e)).length)for(;n=this[c++];)if(a=bt(n),r=1===n.nodeType&&" "+Mt(a)+" "){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a!==(s=Mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,a,i,o,s,c=0;if(M(e))return this.each((function(t){z(this).removeClass(e.call(this,t,bt(this)))}));if(!arguments.length)return this.attr("class","");if((t=gt(e)).length)for(;n=this[c++];)if(a=bt(n),r=1===n.nodeType&&" "+Mt(a)+" "){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");a!==(s=Mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):M(e)?this.each((function(n){z(this).toggleClass(e.call(this,n,bt(this),t),t)})):this.each((function(){var t,a,i,o;if(r)for(a=0,i=z(this),o=gt(e);t=o[a++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=bt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+Mt(bt(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;z.fn.extend({val:function(e){var t,n,r,a=this[0];return arguments.length?(r=M(e),this.each((function(n){var a;1===this.nodeType&&(null==(a=r?e.call(this,n,z(this).val()):e)?a="":"number"==typeof a?a+="":Array.isArray(a)&&(a=z.map(a,(function(e){return null==e?"":e+""}))),(t=z.valHooks[this.type]||z.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,a,"value")||(this.value=a))}))):a?(t=z.valHooks[a.type]||z.valHooks[a.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(a,"value"))?n:"string"==typeof(n=a.value)?n.replace(vt,""):null==n?"":n:void 0}}),z.extend({valHooks:{option:{get:function(e){var t=z.find.attr(e,"value");return null!=t?t:Mt(z.text(e))}},select:{get:function(e){var t,n,r,a=e.options,i=e.selectedIndex,o="select-one"===e.type,s=o?null:[],c=o?i+1:a.length;for(r=i<0?c:o?i:0;r -1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),z.each(["radio","checkbox"],(function(){z.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=z.inArray(z(e).val(),t)>-1}},_.checkOn||(z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),_.focusin="onfocusin"in r;var yt=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){e.stopPropagation()};z.extend(z.event,{trigger:function(e,t,n,a){var i,o,s,c,l,u,d,f,h=[n||g],m=p.call(e,"type")?e.type:e,_=p.call(e,"namespace")?e.namespace.split("."):[];if(o=f=s=n=n||g,3!==n.nodeType&&8!==n.nodeType&&!yt.test(m+z.event.triggered)&&(m.indexOf(".")>-1&&(_=m.split("."),m=_.shift(),_.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[z.expando]?e:new z.Event(m,"object"==typeof e&&e)).isTrigger=a?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:z.makeArray(t,[e]),d=z.event.special[m]||{},a||!d.trigger||!1!==d.trigger.apply(n,t))){if(!a&&!d.noBubble&&!b(n)){for(c=d.delegateType||m,yt.test(c+m)||(o=o.parentNode);o;o=o.parentNode)h.push(o),s=o;s===(n.ownerDocument||g)&&h.push(s.defaultView||s.parentWindow||r)}for(i=0;(o=h[i++])&&!e.isPropagationStopped();)f=o,e.type=i>1?c:d.bindType||m,(u=(Q.get(o,"events")||Object.create(null))[e.type]&&Q.get(o,"handle"))&&u.apply(o,t),(u=l&&o[l])&&u.apply&&G(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=m,a||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),t)||!G(n)||l&&M(n[m])&&!b(n)&&((s=n[l])&&(n[l]=null),z.event.triggered=m,e.isPropagationStopped()&&f.addEventListener(m,Lt),n[m](),e.isPropagationStopped()&&f.removeEventListener(m,Lt),z.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,n){var r=z.extend(new z.Event,n,{type:e,isSimulated:!0});z.event.trigger(r,null,t)}}),z.fn.extend({trigger:function(e,t){return this.each((function(){z.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return z.event.trigger(e,t,n,!0)}}),_.focusin||z.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){z.event.simulate(t,e.target,z.event.fix(e))};z.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,a=Q.access(r,t);a||r.addEventListener(e,n,!0),Q.access(r,t,(a||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,a=Q.access(r,t)-1;a?Q.access(r,t,a):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}}));var At=r.location,zt={guid:Date.now()},wt=/\?/;z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||z.error("Invalid XML: "+(n?z.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Tt=/\[\]$/,kt=/\r?\n/g,xt=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,n,r){var a;if(Array.isArray(t))z.each(t,(function(t,a){n||Tt.test(e)?r(e,a):Dt(e+"["+("object"==typeof a&&null!=a?t:"")+"]",a,n,r)}));else if(n||"object"!==L(t))r(e,t);else for(a in t)Dt(e+"["+a+"]",t[a],n,r)}z.param=function(e,t){var n,r=[],a=function(e,t){var n=M(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!z.isPlainObject(e))z.each(e,(function(){a(this.name,this.value)}));else for(n in e)Dt(n,e[n],t,a);return r.join("&")},z.fn.extend({serialize:function(){return z.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=z.prop(this,"elements");return e?z.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!z(this).is(":disabled")&&Ot.test(this.nodeName)&&!xt.test(e)&&(this.checked||!_e.test(e))})).map((function(e,t){var n=z(this).val();return null==n?null:Array.isArray(n)?z.map(n,(function(e){return{name:t.name,value:e.replace(kt,"\r\n")}})):{name:t.name,value:n.replace(kt,"\r\n")}})).get()}});var St=/%20/g,Nt=/#.*$/,Yt=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,Wt=/^(?:GET|HEAD)$/,qt=/^\/\//,Et={},jt={},Bt="*/".concat("*"),Pt=g.createElement("a");function Ht(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,a=0,i=t.toLowerCase().match(j)||[];if(M(n))for(;r=i[a++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Xt(e,t,n,r){var a={},i=e===jt;function o(s){var c;return a[s]=!0,z.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||i||a[l]?i?!(c=l):void 0:(t.dataTypes.unshift(l),o(l),!1)})),c}return o(t.dataTypes[0])||!a["*"]&&o("*")}function Rt(e,t){var n,r,a=z.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((a[n]?e:r||(r={}))[n]=t[n]);return r&&z.extend(!0,e,r),e}Pt.href=At.href,z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Rt(Rt(e,z.ajaxSettings),t):Rt(z.ajaxSettings,e)},ajaxPrefilter:Ht(Et),ajaxTransport:Ht(jt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,a,i,o,s,c,l,u,d,f,p=z.ajaxSetup({},t),h=p.context||p,m=p.context&&(h.nodeType||h.jquery)?z(h):z.event,_=z.Deferred(),M=z.Callbacks("once memory"),b=p.statusCode||{},v={},y={},L="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=Ct.exec(i);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?i:null},setRequestHeader:function(e,t){return null==l&&(e=y[e.toLowerCase()]=y[e.toLowerCase()]||e,v[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)A.always(e[A.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||L;return n&&n.abort(t),w(0,t),this}};if(_.promise(A),p.url=((e||p.url||At.href)+"").replace(qt,At.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(j)||[""],null==p.crossDomain){c=g.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Pt.protocol+"//"+Pt.host!=c.protocol+"//"+c.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=z.param(p.data,p.traditional)),Xt(Et,p,t,A),l)return A;for(d in(u=z.event&&p.global)&&0==z.active++&&z.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Wt.test(p.type),a=p.url.replace(Nt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(St,"+")):(f=p.url.slice(a.length),p.data&&(p.processData||"string"==typeof p.data)&&(a+=(wt.test(a)?"&":"?")+p.data,delete p.data),!1===p.cache&&(a=a.replace(Yt,"$1"),f=(wt.test(a)?"&":"?")+"_="+zt.guid+++f),p.url=a+f),p.ifModified&&(z.lastModified[a]&&A.setRequestHeader("If-Modified-Since",z.lastModified[a]),z.etag[a]&&A.setRequestHeader("If-None-Match",z.etag[a])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&A.setRequestHeader("Content-Type",p.contentType),A.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Bt+"; q=0.01":""):p.accepts["*"]),p.headers)A.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(h,A,p)||l))return A.abort();if(L="abort",M.add(p.complete),A.done(p.success),A.fail(p.error),n=Xt(jt,p,t,A)){if(A.readyState=1,u&&m.trigger("ajaxSend",[A,p]),l)return A;p.async&&p.timeout>0&&(s=r.setTimeout((function(){A.abort("timeout")}),p.timeout));try{l=!1,n.send(v,w)}catch(e){if(l)throw e;w(-1,e)}}else w(-1,"No Transport");function w(e,t,o,c){var d,f,g,v,y,L=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,i=c||"",A.readyState=e>0?4:0,d=e>=200&&e<300||304===e,o&&(v=function(e,t,n){for(var r,a,i,o,s=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){c.unshift(a);break}if(c[0]in n)i=c[0];else{for(a in n){if(!c[0]||e.converters[a+" "+c[0]]){i=a;break}o||(o=a)}i=i||o}if(i)return i!==c[0]&&c.unshift(i),n[i]}(p,A,o)),!d&&z.inArray("script",p.dataTypes)>-1&&z.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),v=function(e,t,n,r){var a,i,o,s,c,l={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(i=u.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=i,i=u.shift())if("*"===i)i=c;else if("*"!==c&&c!==i){if(!(o=l[c+" "+i]||l["* "+i]))for(a in l)if((s=a.split(" "))[1]===i&&(o=l[c+" "+s[0]]||l["* "+s[0]])){!0===o?o=l[a]:!0!==l[a]&&(i=s[0],u.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+c+" to "+i}}}return{state:"success",data:t}}(p,v,A,d),d?(p.ifModified&&((y=A.getResponseHeader("Last-Modified"))&&(z.lastModified[a]=y),(y=A.getResponseHeader("etag"))&&(z.etag[a]=y)),204===e||"HEAD"===p.type?L="nocontent":304===e?L="notmodified":(L=v.state,f=v.data,d=!(g=v.error))):(g=L,!e&&L||(L="error",e<0&&(e=0))),A.status=e,A.statusText=(t||L)+"",d?_.resolveWith(h,[f,L,A]):_.rejectWith(h,[A,L,g]),A.statusCode(b),b=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[A,p,d?f:g]),M.fireWith(h,[A,L]),u&&(m.trigger("ajaxComplete",[A,p]),--z.active||z.event.trigger("ajaxStop")))}return A},getJSON:function(e,t,n){return z.get(e,t,n,"json")},getScript:function(e,t){return z.get(e,void 0,t,"script")}}),z.each(["get","post"],(function(e,t){z[t]=function(e,n,r,a){return M(n)&&(a=a||r,r=n,n=void 0),z.ajax(z.extend({url:e,type:t,dataType:a,data:n,success:r},z.isPlainObject(e)&&e))}})),z.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),z._evalUrl=function(e,t,n){return z.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){z.globalEval(e,t,n)}})},z.fn.extend({wrapAll:function(e){var t;return this[0]&&(M(e)&&(e=e.call(this[0])),t=z(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return M(e)?this.each((function(t){z(this).wrapInner(e.call(this,t))})):this.each((function(){var t=z(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=M(e);return this.each((function(n){z(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){z(this).replaceWith(this.childNodes)})),this}}),z.expr.pseudos.hidden=function(e){return!z.expr.pseudos.visible(e)},z.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},z.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var It={0:200,1223:204},Ft=z.ajaxSettings.xhr();_.cors=!!Ft&&"withCredentials"in Ft,_.ajax=Ft=!!Ft,z.ajaxTransport((function(e){var t,n;if(_.cors||Ft&&!e.crossDomain)return{send:function(a,i){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];for(o in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||a["X-Requested-With"]||(a["X-Requested-With"]="XMLHttpRequest"),a)s.setRequestHeader(o,a[o]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(It[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),z.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return z.globalEval(e),e}}}),z.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),z.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,a){t=z("