diff --git a/.env.development.example b/.env.development.example index d6f55b049..be06cac76 100644 --- a/.env.development.example +++ b/.env.development.example @@ -8,6 +8,7 @@ GROUPID= PROJECT_PATH_ON_HOST=/Users/your-username-here/code/coollabsio/coolify SERVEO_URL= MUX_ENABLED=false +RAY_HOST=ray@host.docker.internal ############################################################################################################ APP_NAME=Coolify diff --git a/.env.production b/.env.production index 7ea84bd0e..c43d5552d 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,12 @@ +COOLIFY_DEFAULT_PROXY=traefik +COOLIFY_DEFAULT_NETWORK=coolify + +SENTRY_LARAVEL_DSN=https://fc21c062604d4526a4a9f263a0addeac@o1082494.ingest.sentry.io/4504672605372416 +SENTRY_TRACES_SAMPLE_RATE=0.2 + APP_NAME=Coolify APP_SERVICE=php -APP_ENV=local +APP_ENV=production APP_KEY= APP_DEBUG=false APP_URL=http://localhost @@ -18,3 +24,5 @@ DB_PASSWORD= QUEUE_CONNECTION=redis REDIS_HOST=coolify-redis REDIS_PASSWORD= + +CACHE_DRIVER=redis diff --git a/.gitignore b/.gitignore index cdbd7bf66..e1b6b679e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,7 @@ _volumes/ .lesshst psysh_history .psql_history +_ide_helper.php +.gitignore +.phpstorm.meta.php +_ide_helper_models.php diff --git a/README.md b/README.md index 9f60c244f..35efc8c78 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,19 @@ # v4 Thinks will be added here incrementally through PR's. +# Installation + +```bash +curl -fsSL https://coolify-cdn.b-cdn.net/files/install.sh | bash +``` + ## Support - Mastodon: [@andrasbacsai@fosstodon.org](https://fosstodon.org/@andrasbacsai) -- Telegram: [@andrasbacsai](https://t.me/andrasbacsai) -- Twitter: [@andrasbacsai](https://twitter.com/heyandras) +- Twitter: [@heyandras](https://twitter.com/heyandras) - Email: [andras@coollabs.io](mailto:andras@coollabs.io) - Discord: [Invitation](https://coollabs.io/discord) +- Telegram: [@andrasbacsai](https://t.me/andrasbacsai) --- diff --git a/app/Actions/CoolifyTask/RunRemoteProcess.php b/app/Actions/CoolifyTask/RunRemoteProcess.php index 877e95170..45040b717 100644 --- a/app/Actions/CoolifyTask/RunRemoteProcess.php +++ b/app/Actions/CoolifyTask/RunRemoteProcess.php @@ -4,12 +4,15 @@ use App\Enums\ActivityTypes; use App\Enums\ProcessStatus; -use App\Jobs\DeployApplicationJob; +use App\Jobs\ApplicationDeploymentJob; use Illuminate\Process\ProcessResult; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Process; use Spatie\Activitylog\Models\Activity; +const TIMEOUT = 3600; +const IDLE_TIMEOUT = 3600; + class RunRemoteProcess { public Activity $activity; @@ -52,7 +55,7 @@ public function __invoke(): ProcessResult $status = ProcessStatus::IN_PROGRESS; - $processResult = Process::run($this->getCommand(), $this->handleOutput(...)); + $processResult = Process::timeout(TIMEOUT)->idleTimeout(IDLE_TIMEOUT)->run($this->getCommand(), $this->handleOutput(...)); if ($this->activity->properties->get('status') === ProcessStatus::ERROR->value) { $status = ProcessStatus::ERROR; @@ -97,7 +100,7 @@ protected function getCommand(): string $port = $this->activity->getExtraProperty('port'); $command = $this->activity->getExtraProperty('command'); - return generateSshCommand($private_key_location, $server_ip, $user, $port, $command); + return generate_ssh_command($private_key_location, $server_ip, $user, $port, $command); } protected function handleOutput(string $type, string $output) @@ -125,7 +128,7 @@ public function encodeOutput($type, $output) 'type' => $type, 'output' => $output, 'timestamp' => hrtime(true), - 'batch' => DeployApplicationJob::$batch_counter, + 'batch' => ApplicationDeploymentJob::$batch_counter, 'order' => $this->getLatestCounter(), ]; diff --git a/app/Actions/Proxy/CheckProxySettingsInSync.php b/app/Actions/Proxy/CheckProxySettingsInSync.php index ce2b4c034..88c01d624 100644 --- a/app/Actions/Proxy/CheckProxySettingsInSync.php +++ b/app/Actions/Proxy/CheckProxySettingsInSync.php @@ -11,7 +11,7 @@ class CheckProxySettingsInSync public function __invoke(Server $server, bool $reset = false) { $proxy_path = config('coolify.proxy_config_path'); - $output = instantRemoteProcess([ + $output = instant_remote_process([ "cat $proxy_path/docker-compose.yml", ], $server, false); if (is_null($output) || $reset) { @@ -23,7 +23,7 @@ public function __invoke(Server $server, bool $reset = false) $server->extra_attributes->last_saved_proxy_settings = Str::of($docker_compose_yml_base64)->pipe('md5')->value; $server->save(); if (is_null($output) || $reset) { - instantRemoteProcess([ + instant_remote_process([ "mkdir -p $proxy_path", "echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml", ], $server); diff --git a/app/Actions/Proxy/InstallProxy.php b/app/Actions/Proxy/InstallProxy.php index 5b61118cd..8e447ae07 100644 --- a/app/Actions/Proxy/InstallProxy.php +++ b/app/Actions/Proxy/InstallProxy.php @@ -2,16 +2,12 @@ namespace App\Actions\Proxy; -use App\Enums\ActivityTypes; -use App\Models\InstanceSettings; use App\Models\Server; use Spatie\Activitylog\Models\Activity; use Illuminate\Support\Str; -use Spatie\Url\Url; class InstallProxy { - public function __invoke(Server $server): Activity { $proxy_path = config('coolify.proxy_config_path'); @@ -26,7 +22,7 @@ public function __invoke(Server $server): Activity return "docker network ls --format '{{.Name}}' | grep '^$network$' >/dev/null 2>&1 || docker network create --attachable $network > /dev/null 2>&1"; }); - $configuration = instantRemoteProcess([ + $configuration = instant_remote_process([ "cat $proxy_path/docker-compose.yml", ], $server, false); if (is_null($configuration)) { @@ -38,16 +34,16 @@ public function __invoke(Server $server): Activity $server->extra_attributes->last_applied_proxy_settings = Str::of($docker_compose_yml_base64)->pipe('md5')->value; $server->save(); - $env_file_base64 = base64_encode( - $this->getEnvContents() - ); - $activity = remoteProcess([ + // $env_file_base64 = base64_encode( + // $this->getEnvContents() + // ); + $activity = remote_process([ ...$create_networks_command, "echo 'Docker networks created...'", "mkdir -p $proxy_path", "cd $proxy_path", "echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml", - "echo '$env_file_base64' | base64 -d > $proxy_path/.env", + // "echo '$env_file_base64' | base64 -d > $proxy_path/.env", "echo 'Docker compose file created...'", "echo 'Pulling docker image...'", 'docker compose pull -q', @@ -56,23 +52,20 @@ public function __invoke(Server $server): Activity "echo 'Starting proxy...'", 'docker compose up -d --remove-orphans', "echo 'Proxy installed successfully...'" - ], $server, ActivityTypes::INLINE->value); + ], $server); return $activity; } - protected function getEnvContents() - { - $instance_fqdn = InstanceSettings::get()->fqdn ?? config('app.url'); - $url = Url::fromString($instance_fqdn); - $data = [ - 'TRAEFIK_DASHBOARD_HOST' => $url->getHost(), - 'LETS_ENCRYPT_EMAIL' => '', - ]; + // protected function getEnvContents() + // { + // $data = [ + // 'LETS_ENCRYPT_EMAIL' => '', + // ]; - return collect($data) - ->map(fn ($v, $k) => "{$k}={$v}") - ->push(PHP_EOL) - ->implode(PHP_EOL); - } + // return collect($data) + // ->map(fn ($v, $k) => "{$k}={$v}") + // ->push(PHP_EOL) + // ->implode(PHP_EOL); + // } } diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php index 55c1fcc4b..77471c07e 100644 --- a/app/Actions/Server/InstallDocker.php +++ b/app/Actions/Server/InstallDocker.php @@ -10,14 +10,14 @@ class InstallDocker public function __invoke(Server $server) { $config = base64_encode('{ "live-restore": true }'); - $activity = remoteProcess([ + $activity = remote_process([ "echo Installing Docker...", "curl https://releases.rancher.com/install-docker/23.0.sh | sh", "echo Configuring Docker...", "echo '{$config}' | base64 -d > /etc/docker/daemon.json", "echo Restarting Docker...", "systemctl restart docker" - ], $server, ActivityTypes::INLINE->value); + ], $server); return $activity; } diff --git a/app/Console/Commands/SyncBunny.php b/app/Console/Commands/SyncBunny.php index a06d515fc..88062fb6b 100644 --- a/app/Console/Commands/SyncBunny.php +++ b/app/Console/Commands/SyncBunny.php @@ -60,7 +60,7 @@ public function handle() ]; return PendingRequest::withHeaders($headers)->post('https://api.bunny.net/purge', [ "urls" => [$url], - ]); + ])->throw(); }); try { Http::pool(fn (Pool $pool) => [ @@ -72,18 +72,14 @@ public function handle() $pool->storage(file: "$parent_dir/scripts/$docker_install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$docker_install_script"), $pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$versions"), ]); - Http::pool(fn (Pool $pool) => [ - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file_prod"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$production_env"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$upgrade_script"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$install_script"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$docker_install_script"), - $pool->purge(url: "$bunny_cdn/$versions"), - ]); + Http::withHeaders([ + 'AccessKey' => env('BUNNY_API_KEY'), + 'Accept' => 'application/json', + ])->get('https://api.bunny.net/purge', [ + "url" => "$bunny_cdn/$bunny_cdn_path/*", + "async" => false + ])->throw(); echo "All files uploaded & purged...\n"; - return; - throw new \Exception("Something went wrong."); } catch (\Exception $e) { echo $e->getMessage(); } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index a636e1c5d..eda379d82 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,9 +2,9 @@ namespace App\Console; -use App\Jobs\ContainerStatusJob; -use App\Jobs\DockerCleanupDanglingImagesJob; -use App\Jobs\ProxyCheckJob; +use App\Jobs\InstanceAutoUpdateJob; +use App\Jobs\InstanceProxyCheckJob; +use App\Jobs\InstanceDockerCleanupJob; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; @@ -15,9 +15,11 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule): void { - $schedule->job(new ContainerStatusJob)->everyMinute(); - $schedule->job(new DockerCleanupDanglingImagesJob)->everyMinute(); - // $schedule->job(new ProxyCheckJob)->everyMinute(); + $schedule->command('horizon:snapshot')->everyFiveMinutes(); + + $schedule->job(new InstanceDockerCleanupJob)->everyFiveMinutes(); + $schedule->job(new InstanceAutoUpdateJob)->everyFifteenMinutes(); + // $schedule->job(new InstanceProxyCheckJob)->everyMinute(); } /** diff --git a/app/Data/ApplicationPreview.php b/app/Data/ApplicationPreview.php deleted file mode 100644 index 8af3e3ec9..000000000 --- a/app/Data/ApplicationPreview.php +++ /dev/null @@ -1,15 +0,0 @@ -reportable(function (Throwable $e) { - // + Integration::captureUnhandledException($e); }); } } diff --git a/app/Http/Controllers/ApplicationController.php b/app/Http/Controllers/ApplicationController.php index 450abac73..1da769023 100644 --- a/app/Http/Controllers/ApplicationController.php +++ b/app/Http/Controllers/ApplicationController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use App\Models\ApplicationDeploymentQueue; use Illuminate\Http\Request; use Spatie\Activitylog\Models\Activity; @@ -21,7 +22,7 @@ public function configuration() if (!$application) { return redirect()->route('dashboard'); } - return view('project.application.configuration', ['application' => $application,]); + return view('project.application.configuration', ['application' => $application]); } public function deployments() { @@ -37,7 +38,7 @@ public function deployments() if (!$application) { return redirect()->route('dashboard'); } - return view('project.application.deployments', ['application' => $application, 'deployments' => $application->deployments()]); + return view('project.application.deployments', ['application' => $application]); } public function deployment() @@ -64,9 +65,18 @@ public function deployment() 'application_uuid' => $application->uuid, ]); } + $deployment = ApplicationDeploymentQueue::where('deployment_uuid', $deployment_uuid)->first(); + if (!$deployment) { + return redirect()->route('project.application.deployments', [ + 'project_uuid' => $project->uuid, + 'environment_name' => $environment->name, + 'application_uuid' => $application->uuid, + ]); + } return view('project.application.deployment', [ 'application' => $application, 'activity' => $activity, + 'deployment' => $deployment, 'deployment_uuid' => $deployment_uuid, ]); } diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 6ccca4793..7fc5680ff 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -2,13 +2,24 @@ namespace App\Http\Controllers; -use Spatie\Activitylog\Models\Activity; +use App\Models\Project; class ProjectController extends Controller { - public function environments() + public function all() { - $project = session('currentTeam')->load(['projects'])->projects->where('uuid', request()->route('project_uuid'))->first(); + $team_id = session('currentTeam')->id; + + $projects = Project::where('team_id', $team_id)->get(); + return view('projects', ['projects' => $projects]); + } + + public function show() + { + $project_uuid = request()->route('project_uuid'); + $team_id = session('currentTeam')->id; + + $project = Project::where('team_id', $team_id)->where('uuid', $project_uuid)->first(); if (!$project) { return redirect()->route('dashboard'); } @@ -16,7 +27,7 @@ public function environments() if (count($project->environments) == 1) { return redirect()->route('project.resources', ['project_uuid' => $project->uuid, 'environment_name' => $project->environments->first()->name]); } - return view('project.environments', ['project' => $project]); + return view('project.show', ['project' => $project]); } public function new() diff --git a/app/Http/Livewire/CheckUpdate.php b/app/Http/Livewire/CheckUpdate.php index 6330852c0..5c0cee39b 100644 --- a/app/Http/Livewire/CheckUpdate.php +++ b/app/Http/Livewire/CheckUpdate.php @@ -13,7 +13,7 @@ class CheckUpdate extends Component public function checkUpdate() { - $this->latestVersion = getLatestVersionOfCoolify(); + $this->latestVersion = get_latest_version_of_coolify(); $this->currentVersion = config('version'); if ($this->latestVersion === 'latest') { $this->updateAvailable = true; diff --git a/app/Http/Livewire/Destination/Form.php b/app/Http/Livewire/Destination/Form.php index 3643e6782..bc1c24c88 100644 --- a/app/Http/Livewire/Destination/Form.php +++ b/app/Http/Livewire/Destination/Form.php @@ -25,13 +25,13 @@ public function delete() if ($this->destination->attachedTo()) { return $this->emit('error', 'You must delete all resources before deleting this destination.'); } - instantRemoteProcess(["docker network disconnect {$this->destination->network} coolify-proxy"], $this->destination->server, throwError: false); - instantRemoteProcess(['docker network rm -f ' . $this->destination->network], $this->destination->server); + instant_remote_process(["docker network disconnect {$this->destination->network} coolify-proxy"], $this->destination->server, throwError: false); + instant_remote_process(['docker network rm -f ' . $this->destination->network], $this->destination->server); } $this->destination->delete(); return redirect()->route('dashboard'); } catch (\Exception $e) { - return generalErrorHandler($e); + return general_error_handler($e); } } } diff --git a/app/Http/Livewire/Destination/New/StandaloneDocker.php b/app/Http/Livewire/Destination/New/StandaloneDocker.php index f7ce86713..d9d556510 100644 --- a/app/Http/Livewire/Destination/New/StandaloneDocker.php +++ b/app/Http/Livewire/Destination/New/StandaloneDocker.php @@ -33,7 +33,7 @@ public function mount() } } $this->network = new Cuid2(7); - $this->name = generateRandomName(); + $this->name = generate_random_name(); } public function submit() @@ -45,8 +45,8 @@ public function submit() return; } $server = Server::find($this->server_id); - instantRemoteProcess(['docker network create --attachable ' . $this->network], $server, throwError: false); - instantRemoteProcess(["docker network connect $this->network coolify-proxy"], $server, throwError: false); + instant_remote_process(['docker network create --attachable ' . $this->network], $server, throwError: false); + instant_remote_process(["docker network connect $this->network coolify-proxy"], $server, throwError: false); $docker = ModelsStandaloneDocker::create([ 'name' => $this->name, diff --git a/app/Http/Livewire/ForceUpgrade.php b/app/Http/Livewire/ForceUpgrade.php index 52c9a28ad..9642a6af4 100644 --- a/app/Http/Livewire/ForceUpgrade.php +++ b/app/Http/Livewire/ForceUpgrade.php @@ -2,51 +2,19 @@ namespace App\Http\Livewire; -use App\Enums\ActivityTypes; -use App\Models\Server; +use App\Jobs\InstanceAutoUpdateJob; use Livewire\Component; class ForceUpgrade extends Component { + public bool $visible = false; public function upgrade() { - if (config('app.env') === 'local') { - $server = Server::where('ip', 'coolify-testing-host')->first(); - if (!$server) { - return; - } - instantRemoteProcess([ - "sleep 2" - ], $server); - remoteProcess([ - "sleep 10" - ], $server, ActivityTypes::INLINE->value); - $this->emit('updateInitiated'); - } else { - $latestVersion = getLatestVersionOfCoolify(); - - $cdn = "https://coolify-cdn.b-cdn.net/files"; - $server = Server::where('ip', 'host.docker.internal')->first(); - if (!$server) { - return; - } - - instantRemoteProcess([ - "curl -fsSL $cdn/docker-compose.yml -o /data/coolify/source/docker-compose.yml", - "curl -fsSL $cdn/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml", - "curl -fsSL $cdn/.env.production -o /data/coolify/source/.env.production", - "curl -fsSL $cdn/upgrade.sh -o /data/coolify/source/upgrade.sh", - ], $server); - - instantRemoteProcess([ - "docker compose -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml pull", - ], $server); - - remoteProcess([ - "bash /data/coolify/source/upgrade.sh $latestVersion" - ], $server, ActivityTypes::INLINE->value); - - $this->emit('updateInitiated'); + try { + $this->visible = true; + dispatch(new InstanceAutoUpdateJob(force: true)); + } catch (\Exception $e) { + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/PrivateKey/Change.php b/app/Http/Livewire/PrivateKey/Change.php index d8d9e3ffd..27889feb1 100644 --- a/app/Http/Livewire/PrivateKey/Change.php +++ b/app/Http/Livewire/PrivateKey/Change.php @@ -35,7 +35,7 @@ public function changePrivateKey() $this->private_key->save(); session('currentTeam')->privateKeys = PrivateKey::where('team_id', session('currentTeam')->id)->get(); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Profile/Form.php b/app/Http/Livewire/Profile/Form.php new file mode 100644 index 000000000..4b463b4d3 --- /dev/null +++ b/app/Http/Livewire/Profile/Form.php @@ -0,0 +1,35 @@ + 'required', + ]; + public function mount() + { + $this->userId = auth()->user()->id; + $this->name = auth()->user()->name; + $this->email = auth()->user()->email; + } + public function submit() + + { + try { + $this->validate(); + User::where('id', $this->userId)->update([ + 'name' => $this->name, + ]); + } catch (\Throwable $error) { + return general_error_handler($error, $this); + } + } +} diff --git a/app/Http/Livewire/Project/Application/Danger.php b/app/Http/Livewire/Project/Application/Danger.php index 0a2f59d34..52c947c58 100644 --- a/app/Http/Livewire/Project/Application/Danger.php +++ b/app/Http/Livewire/Project/Application/Danger.php @@ -2,8 +2,27 @@ namespace App\Http\Livewire\Project\Application; +use App\Models\Application; use Livewire\Component; class Danger extends Component { + public Application $application; + public array $parameters; + + public function mount() + { + $this->parameters = get_parameters(); + } + public function delete() + { + $destination = $this->application->destination->getMorphClass()::where('id', $this->application->destination->id)->first(); + + instant_remote_process(["docker rm -f {$this->application->uuid}"], $destination->server); + $this->application->delete(); + return redirect()->route('project.resources', [ + 'project_uuid' => $this->parameters['project_uuid'], + 'environment_name' => $this->parameters['environment_name'] + ]); + } } diff --git a/app/Http/Livewire/Project/Application/Deploy.php b/app/Http/Livewire/Project/Application/Deploy.php index 66191f83c..f78ad8e23 100644 --- a/app/Http/Livewire/Project/Application/Deploy.php +++ b/app/Http/Livewire/Project/Application/Deploy.php @@ -2,9 +2,8 @@ namespace App\Http\Livewire\Project\Application; -use App\Jobs\DeployApplicationJob; +use App\Jobs\ContainerStopJob; use App\Models\Application; -use Illuminate\Support\Facades\Route; use Livewire\Component; use Visus\Cuid2\Cuid2; @@ -21,67 +20,47 @@ class Deploy extends Component protected array $command = []; protected $source; + protected $listeners = [ + 'applicationStatusChanged' => 'applicationStatusChanged', + ]; + public function mount() { - $this->parameters = getParameters(); + $this->parameters = get_parameters(); $this->application = Application::where('id', $this->applicationId)->first(); $this->destination = $this->application->destination->getMorphClass()::where('id', $this->application->destination->id)->first(); } - protected function setDeploymentUuid() + public function applicationStatusChanged() + { + $this->application->refresh(); + } + protected function set_deployment_uuid() { // Create Deployment ID $this->deployment_uuid = new Cuid2(7); $this->parameters['deployment_uuid'] = $this->deployment_uuid; } - protected function redirectToDeployment() + public function deploy(bool $force = false) { - return redirect()->route('project.application.deployment', $this->parameters); - } - public function start() - { - $this->setDeploymentUuid(); + $this->set_deployment_uuid(); - dispatch(new DeployApplicationJob( + queue_application_deployment( + application_id: $this->application->id, deployment_uuid: $this->deployment_uuid, - application_uuid: $this->application->uuid, - force_rebuild: false, - )); - - return $this->redirectToDeployment(); - } - public function forceRebuild() - { - $this->setDeploymentUuid(); - - dispatch(new DeployApplicationJob( - deployment_uuid: $this->deployment_uuid, - application_uuid: $this->application->uuid, - force_rebuild: true, - )); - - return $this->redirectToDeployment(); - } - - public function delete() - { - $this->stop(); - Application::find($this->applicationId)->delete(); - return redirect()->route('project.resources', [ + force_rebuild: $force, + ); + return redirect()->route('project.application.deployment', [ 'project_uuid' => $this->parameters['project_uuid'], - 'environment_name' => $this->parameters['environment_name'] + 'application_uuid' => $this->parameters['application_uuid'], + 'deployment_uuid' => $this->deployment_uuid, + 'environment_name' => $this->parameters['environment_name'], ]); } + public function stop() { - instantRemoteProcess(["docker rm -f {$this->application->uuid}"], $this->destination->server); - if ($this->application->status != 'exited') { - $this->application->status = 'exited'; - $this->application->save(); - } - } - - public function pollingStatus() - { - $this->application->refresh(); + instant_remote_process(["docker rm -f {$this->application->uuid}"], $this->application->destination->server); + $this->application->status = get_container_status(server: $this->application->destination->server, container_id: $this->application->uuid); + $this->application->save(); } } diff --git a/app/Http/Livewire/Project/Application/PollDeployment.php b/app/Http/Livewire/Project/Application/DeploymentLogs.php similarity index 74% rename from app/Http/Livewire/Project/Application/PollDeployment.php rename to app/Http/Livewire/Project/Application/DeploymentLogs.php index c09106afb..3780608da 100644 --- a/app/Http/Livewire/Project/Application/PollDeployment.php +++ b/app/Http/Livewire/Project/Application/DeploymentLogs.php @@ -3,18 +3,21 @@ namespace App\Http\Livewire\Project\Application; use App\Enums\ActivityTypes; +use App\Models\Application; +use Illuminate\Support\Facades\Redis; use Livewire\Component; use Spatie\Activitylog\Models\Activity; -class PollDeployment extends Component +class DeploymentLogs extends Component { + public Application $application; public $activity; public $isKeepAliveOn = true; public $deployment_uuid; - public function polling() { - if ( is_null($this->activity) && isset($this->deployment_uuid)) { + $this->emit('deploymentFinished'); + if (is_null($this->activity) && isset($this->deployment_uuid)) { $this->activity = Activity::query() ->where('properties->type', '=', ActivityTypes::DEPLOYMENT->value) ->where('properties->type_uuid', '=', $this->deployment_uuid) @@ -23,7 +26,7 @@ public function polling() $this->activity?->refresh(); } - if (data_get($this->activity, 'properties.status') == 'finished' || data_get($this->activity, 'properties.status') == 'failed' ) { + if (data_get($this->activity, 'properties.status') == 'finished' || data_get($this->activity, 'properties.status') == 'failed') { $this->isKeepAliveOn = false; } } diff --git a/app/Http/Livewire/Project/Application/DeploymentNavbar.php b/app/Http/Livewire/Project/Application/DeploymentNavbar.php new file mode 100644 index 000000000..20809d2db --- /dev/null +++ b/app/Http/Livewire/Project/Application/DeploymentNavbar.php @@ -0,0 +1,44 @@ +activity->refresh(); + } + public function cancel() + { + try { + ray('Cancelling deployment: ' . $this->deployment_uuid . ' of application: ' . $this->application->uuid); + + // Update deployment queue + $deployment = ApplicationDeploymentQueue::where('deployment_uuid', $this->deployment_uuid)->first(); + $deployment->status = 'cancelled by user'; + $deployment->save(); + + // Update activity + $this->activity->properties = $this->activity->properties->merge([ + 'exitCode' => 1, + 'status' => ProcessStatus::CANCELLED->value, + ]); + $this->activity->save(); + + // Remove builder container + instant_remote_process(["docker rm -f {$this->deployment_uuid}"], $this->application->destination->server, throwError: false, repeat: 25); + queue_next_deployment($this->application); + } catch (\Throwable $th) { + return general_error_handler($th, $this); + } + } +} diff --git a/app/Http/Livewire/Project/Application/Deployments.php b/app/Http/Livewire/Project/Application/Deployments.php new file mode 100644 index 000000000..3002051d8 --- /dev/null +++ b/app/Http/Livewire/Project/Application/Deployments.php @@ -0,0 +1,41 @@ +current_url = url()->current(); + } + public function reload_deployments() + { + $this->load_deployments(); + } + public function load_deployments(int|null $take = null) + { + if ($take) { + $this->skip = $this->skip + $take; + } + + $take = $this->default_take; + ['deployments' => $deployments, 'count' => $count] = Application::find($this->application_id)->deployments($this->skip, $take); + $this->deployments = $deployments; + $this->deployments_count = $count; + if (count($this->deployments) !== 0 && count($this->deployments) < $take) { + $this->show_next = false; + return; + } + } +} diff --git a/app/Http/Livewire/Project/Application/EnvironmentVariable/Add.php b/app/Http/Livewire/Project/Application/EnvironmentVariable/Add.php index e169aa28a..6c3eebb28 100644 --- a/app/Http/Livewire/Project/Application/EnvironmentVariable/Add.php +++ b/app/Http/Livewire/Project/Application/EnvironmentVariable/Add.php @@ -23,7 +23,7 @@ class Add extends Component ]; public function mount() { - $this->parameters = getParameters(); + $this->parameters = get_parameters(); } public function submit() { diff --git a/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php b/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php index 4d7836b5f..99366e5e8 100644 --- a/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php +++ b/app/Http/Livewire/Project/Application/EnvironmentVariable/All.php @@ -26,7 +26,7 @@ public function submit($data) $this->application->refresh(); $this->emit('clearAddEnv'); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php b/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php index f09df0e49..9d58776f0 100644 --- a/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php +++ b/app/Http/Livewire/Project/Application/EnvironmentVariable/Show.php @@ -17,7 +17,7 @@ class Show extends Component ]; public function mount() { - $this->parameters = getParameters(); + $this->parameters = get_parameters(); } public function submit() { diff --git a/app/Http/Livewire/Project/Application/General.php b/app/Http/Livewire/Project/Application/General.php index bdf5e2dfa..2591482c8 100644 --- a/app/Http/Livewire/Project/Application/General.php +++ b/app/Http/Livewire/Project/Application/General.php @@ -3,8 +3,10 @@ namespace App\Http\Livewire\Project\Application; use App\Models\Application; +use App\Models\InstanceSettings; use Livewire\Component; use Illuminate\Support\Str; +use Spatie\Url\Url; class General extends Component { @@ -17,16 +19,17 @@ class General extends Component public string $git_branch; public string|null $git_commit_sha; public string $build_pack; + public string|null $wildcard_domain = null; + public string|null $project_wildcard_domain = null; + public string|null $global_wildcard_domain = null; public bool $is_static; - public bool $is_git_submodules_allowed; - public bool $is_git_lfs_allowed; - public bool $is_debug; - public bool $is_previews; - public bool $is_custom_ssl; - public bool $is_http2; - public bool $is_auto_deploy; - public bool $is_dual_cert; + public bool $is_git_submodules_enabled; + public bool $is_git_lfs_enabled; + public bool $is_debug_enabled; + public bool $is_preview_deployments_enabled; + public bool $is_auto_deploy_enabled; + public bool $is_force_https_enabled; protected $rules = [ 'application.name' => 'required|min:6', @@ -48,41 +51,68 @@ public function instantSave() { // @TODO: find another way - if possible $this->application->settings->is_static = $this->is_static; - $this->application->settings->is_git_submodules_allowed = $this->is_git_submodules_allowed; - $this->application->settings->is_git_lfs_allowed = $this->is_git_lfs_allowed; - $this->application->settings->is_debug = $this->is_debug; - $this->application->settings->is_previews = $this->is_previews; - $this->application->settings->is_custom_ssl = $this->is_custom_ssl; - $this->application->settings->is_http2 = $this->is_http2; - $this->application->settings->is_auto_deploy = $this->is_auto_deploy; - $this->application->settings->is_dual_cert = $this->is_dual_cert; + $this->application->settings->is_git_submodules_enabled = $this->is_git_submodules_enabled; + $this->application->settings->is_git_lfs_enabled = $this->is_git_lfs_enabled; + $this->application->settings->is_debug_enabled = $this->is_debug_enabled; + $this->application->settings->is_preview_deployments_enabled = $this->is_preview_deployments_enabled; + $this->application->settings->is_auto_deploy_enabled = $this->is_auto_deploy_enabled; + $this->application->settings->is_force_https_enabled = $this->is_force_https_enabled; $this->application->settings->save(); $this->application->refresh(); $this->emit('saved', 'Application settings updated!'); + $this->checkWildCardDomain(); + } + protected function checkWildCardDomain() + { + $coolify_instance_settings = InstanceSettings::get(); + $this->project_wildcard_domain = data_get($this->application, 'environment.project.settings.wildcard_domain'); + $this->global_wildcard_domain = data_get($coolify_instance_settings, 'wildcard_domain'); + $this->wildcard_domain = $this->project_wildcard_domain ?? $this->global_wildcard_domain ?? null; } public function mount() { $this->is_static = $this->application->settings->is_static; - $this->is_git_submodules_allowed = $this->application->settings->is_git_submodules_allowed; - $this->is_git_lfs_allowed = $this->application->settings->is_git_lfs_allowed; - $this->is_debug = $this->application->settings->is_debug; - $this->is_previews = $this->application->settings->is_previews; - $this->is_custom_ssl = $this->application->settings->is_custom_ssl; - $this->is_http2 = $this->application->settings->is_http2; - $this->is_auto_deploy = $this->application->settings->is_auto_deploy; - $this->is_dual_cert = $this->application->settings->is_dual_cert; + $this->is_git_submodules_enabled = $this->application->settings->is_git_submodules_enabled; + $this->is_git_lfs_enabled = $this->application->settings->is_git_lfs_enabled; + $this->is_debug_enabled = $this->application->settings->is_debug_enabled; + $this->is_preview_deployments_enabled = $this->application->settings->is_preview_deployments_enabled; + $this->is_auto_deploy_enabled = $this->application->settings->is_auto_deploy_enabled; + $this->is_force_https_enabled = $this->application->settings->is_force_https_enabled; + $this->checkWildCardDomain(); + } + public function generateGlobalRandomDomain() + { + // Set wildcard domain based on Global wildcard domain + $url = Url::fromString($this->global_wildcard_domain); + $host = $url->getHost(); + $path = $url->getPath() === '/' ? '' : $url->getPath(); + $scheme = $url->getScheme(); + $this->application->fqdn = $scheme . '://' . $this->application->uuid . '.' . $host . $path; + $this->application->save(); + } + public function generateProjectRandomDomain() + { + // Set wildcard domain based on Project wildcard domain + $url = Url::fromString($this->project_wildcard_domain); + $host = $url->getHost(); + $path = $url->getPath() === '/' ? '' : $url->getPath(); + $scheme = $url->getScheme(); + $this->application->fqdn = $scheme . '://' . $this->application->uuid . '.' . $host . $path; + $this->application->save(); } public function submit() { try { $this->validate(); + $domains = Str::of($this->application->fqdn)->trim()->explode(',')->map(function ($domain) { return Str::of($domain)->trim()->lower(); }); + $this->application->fqdn = $domains->implode(','); $this->application->save(); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Project/Application/GetDeployments.php b/app/Http/Livewire/Project/Application/GetDeployments.php deleted file mode 100644 index 2df15d0c4..000000000 --- a/app/Http/Livewire/Project/Application/GetDeployments.php +++ /dev/null @@ -1,19 +0,0 @@ -type_uuid', '=', $this->deployment_uuid)->first(); - $this->created_at = $activity->created_at; - $this->status = data_get($activity, 'properties.status'); - } -} diff --git a/app/Http/Livewire/Project/Application/Preview/Form.php b/app/Http/Livewire/Project/Application/Preview/Form.php new file mode 100644 index 000000000..9cdac681b --- /dev/null +++ b/app/Http/Livewire/Project/Application/Preview/Form.php @@ -0,0 +1,43 @@ + 'required', + ]; + public function resetToDefault() + { + $this->application->preview_url_template = '{{pr_id}}.{{domain}}'; + $this->preview_url_template = $this->application->preview_url_template; + $this->application->save(); + $this->generate_real_url(); + } + public function generate_real_url() + { + if (data_get($this->application, 'fqdn')) { + $url = Url::fromString($this->application->fqdn); + $host = $url->getHost(); + $this->preview_url_template = Str::of($this->application->preview_url_template)->replace('{{domain}}', $host); + } + } + public function mount() + { + $this->generate_real_url(); + } + public function submit() + { + $this->validate(); + $this->application->preview_url_template = str_replace(' ', '', $this->application->preview_url_template); + $this->application->save(); + $this->generate_real_url(); + } +} diff --git a/app/Http/Livewire/Project/Application/Previews.php b/app/Http/Livewire/Project/Application/Previews.php index 4f21134cb..4a3af6761 100644 --- a/app/Http/Livewire/Project/Application/Previews.php +++ b/app/Http/Livewire/Project/Application/Previews.php @@ -2,10 +2,84 @@ namespace App\Http\Livewire\Project\Application; +use App\Jobs\ContainerStatusJob; use App\Models\Application; +use App\Models\ApplicationPreview; +use Illuminate\Support\Collection; use Livewire\Component; +use Visus\Cuid2\Cuid2; class Previews extends Component { public Application $application; + public string $deployment_uuid; + public array $parameters; + public Collection $pull_requests; + public int $rate_limit_remaining; + + public function mount() + { + $this->pull_requests = collect(); + $this->parameters = get_parameters(); + } + public function loadStatus($pull_request_id) + { + dispatch(new ContainerStatusJob( + application: $this->application, + container_name: generate_container_name($this->application->uuid, $pull_request_id), + pull_request_id: $pull_request_id + )); + } + protected function set_deployment_uuid() + { + $this->deployment_uuid = new Cuid2(7); + $this->parameters['deployment_uuid'] = $this->deployment_uuid; + } + public function load_prs() + { + ['rate_limit_remaining' => $rate_limit_remaining, 'data' => $data] = get_from_git_api($this->application->source, "/repos/{$this->application->git_repository}/pulls"); + $this->rate_limit_remaining = $rate_limit_remaining; + $this->pull_requests = $data->sortBy('number')->values(); + } + public function deploy(int $pull_request_id, string|null $pull_request_html_url = null) + { + try { + $this->set_deployment_uuid(); + $found = ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->first(); + if (!$found && !is_null($pull_request_html_url)) { + ApplicationPreview::create([ + 'application_id' => $this->application->id, + 'pull_request_id' => $pull_request_id, + 'pull_request_html_url' => $pull_request_html_url + ]); + } + queue_application_deployment( + application_id: $this->application->id, + deployment_uuid: $this->deployment_uuid, + force_rebuild: true, + pull_request_id: $pull_request_id, + ); + return redirect()->route('project.application.deployment', [ + 'project_uuid' => $this->parameters['project_uuid'], + 'application_uuid' => $this->parameters['application_uuid'], + 'deployment_uuid' => $this->deployment_uuid, + 'environment_name' => $this->parameters['environment_name'], + ]); + } catch (\Throwable $th) { + return general_error_handler($th, $this); + } + } + public function stop(int $pull_request_id) + { + try { + $container_name = generate_container_name($this->application->uuid, $pull_request_id); + ray('Stopping container: ' . $container_name); + + instant_remote_process(["docker rm -f $container_name"], $this->application->destination->server, throwError: false); + ApplicationPreview::where('application_id', $this->application->id)->where('pull_request_id', $pull_request_id)->delete(); + $this->application->refresh(); + } catch (\Throwable $th) { + return general_error_handler($th, $this); + } + } } diff --git a/app/Http/Livewire/Project/Application/ResourceLimits.php b/app/Http/Livewire/Project/Application/ResourceLimits.php index d3f1096f8..161d29ecc 100644 --- a/app/Http/Livewire/Project/Application/ResourceLimits.php +++ b/app/Http/Livewire/Project/Application/ResourceLimits.php @@ -13,7 +13,6 @@ class ResourceLimits extends Component 'application.limits_memory_swap' => 'required|string', 'application.limits_memory_swappiness' => 'required|integer|min:0|max:100', 'application.limits_memory_reservation' => 'required|string', - 'application.limits_memory_oom_kill' => 'boolean', 'application.limits_cpus' => 'nullable', 'application.limits_cpuset' => 'nullable', 'application.limits_cpu_shares' => 'nullable', @@ -45,7 +44,7 @@ public function submit() $this->validate(); $this->application->save(); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Project/Application/Rollback.php b/app/Http/Livewire/Project/Application/Rollback.php index df166b25c..b1bbcec7f 100644 --- a/app/Http/Livewire/Project/Application/Rollback.php +++ b/app/Http/Livewire/Project/Application/Rollback.php @@ -5,27 +5,48 @@ use App\Models\Application; use Livewire\Component; use Illuminate\Support\Str; +use Visus\Cuid2\Cuid2; class Rollback extends Component { public Application $application; public $images = []; public string|null $current; - public function revertImage($tag) + public array $parameters; + + public function mount() { - dd("Reverting to {$this->application->uuid}:{$tag}"); + $this->parameters = get_parameters(); + } + public function rollbackImage($commit) + { + $deployment_uuid = new Cuid2(7); + + queue_application_deployment( + application_id: $this->application->id, + deployment_uuid: $deployment_uuid, + commit: $commit, + force_rebuild: false, + ); + + return redirect()->route('project.application.deployment', [ + 'project_uuid' => $this->parameters['project_uuid'], + 'application_uuid' => $this->parameters['application_uuid'], + 'deployment_uuid' => $deployment_uuid, + 'environment_name' => $this->parameters['environment_name'], + ]); } public function loadImages() { try { $image = $this->application->uuid; - $output = instantRemoteProcess([ + $output = instant_remote_process([ "docker inspect --format='{{.Config.Image}}' {$this->application->uuid}", ], $this->application->destination->server, throwError: false); $current_tag = Str::of($output)->trim()->explode(":"); $this->current = data_get($current_tag, 1); - $output = instantRemoteProcess([ + $output = instant_remote_process([ "docker images --format '{{.Repository}}#{{.Tag}}#{{.CreatedAt}}'", ], $this->application->destination->server); $this->images = Str::of($output)->trim()->explode("\n")->filter(function ($item) use ($image) { @@ -33,7 +54,7 @@ public function loadImages() })->map(function ($item) { $item = Str::of($item)->explode('#'); if ($item[1] === $this->current) { - $is_current = true; + // $is_current = true; } return [ 'tag' => $item[1], @@ -42,7 +63,7 @@ public function loadImages() ]; })->toArray(); } catch (\Throwable $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Project/Application/Status.php b/app/Http/Livewire/Project/Application/Status.php new file mode 100644 index 000000000..34a33b348 --- /dev/null +++ b/app/Http/Livewire/Project/Application/Status.php @@ -0,0 +1,17 @@ +emit('applicationStatusChanged'); + $this->application->refresh(); + } +} diff --git a/app/Http/Livewire/Project/Application/Storages/Add.php b/app/Http/Livewire/Project/Application/Storages/Add.php index f0d66780c..6bb7557f1 100644 --- a/app/Http/Livewire/Project/Application/Storages/Add.php +++ b/app/Http/Livewire/Project/Application/Storages/Add.php @@ -23,7 +23,7 @@ class Add extends Component ]; public function mount() { - $this->parameters = getParameters(); + $this->parameters = get_parameters(); } public function submit() { diff --git a/app/Http/Livewire/Project/Application/Storages/All.php b/app/Http/Livewire/Project/Application/Storages/All.php index a8606c175..0d1d2966b 100644 --- a/app/Http/Livewire/Project/Application/Storages/All.php +++ b/app/Http/Livewire/Project/Application/Storages/All.php @@ -27,7 +27,7 @@ public function submit($data) $this->application->refresh(); $this->emit('clearAddStorage'); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Project/DeleteEnvironment.php b/app/Http/Livewire/Project/DeleteEnvironment.php new file mode 100644 index 000000000..a009b268e --- /dev/null +++ b/app/Http/Livewire/Project/DeleteEnvironment.php @@ -0,0 +1,31 @@ +parameters = get_parameters(); + } + public function delete() + { + $this->validate([ + 'environment_id' => 'required|int', + ]); + $environment = Environment::findOrFail($this->environment_id); + if ($environment->applications->count() > 0) { + return $this->emit('error', 'Environment has resources defined, please delete them first.'); + } + $environment->delete(); + return redirect()->route('project.show', ['project_uuid' => $this->parameters['project_uuid']]); + } +} diff --git a/app/Http/Livewire/Project/Delete.php b/app/Http/Livewire/Project/DeleteProject.php similarity index 59% rename from app/Http/Livewire/Project/Delete.php rename to app/Http/Livewire/Project/DeleteProject.php index 9677052eb..89bd7bc5e 100644 --- a/app/Http/Livewire/Project/Delete.php +++ b/app/Http/Livewire/Project/DeleteProject.php @@ -5,11 +5,16 @@ use App\Models\Project; use Livewire\Component; -class Delete extends Component +class DeleteProject extends Component { + public array $parameters; public int $project_id; public int $resource_count = 0; + public function mount() + { + $this->parameters = get_parameters(); + } public function delete() { $this->validate([ @@ -17,9 +22,9 @@ public function delete() ]); $project = Project::findOrFail($this->project_id); if ($project->applications->count() > 0) { - return $this->emit('error', 'Project has applications, please delete them first.'); + return $this->emit('error', 'Project has resources defined, please delete them first.'); } $project->delete(); - return redirect()->route('dashboard'); + return redirect()->route('projects'); } } diff --git a/app/Http/Livewire/Project/New/EmptyProject.php b/app/Http/Livewire/Project/New/EmptyProject.php index 6763fa4ab..931348a22 100644 --- a/app/Http/Livewire/Project/New/EmptyProject.php +++ b/app/Http/Livewire/Project/New/EmptyProject.php @@ -10,9 +10,9 @@ class EmptyProject extends Component public function createEmptyProject() { $project = Project::create([ - 'name' => generateRandomName(), + 'name' => generate_random_name(), 'team_id' => session('currentTeam')->id, ]); - return redirect()->route('project.environments', ['project_uuid' => $project->uuid, 'environment_name' => 'production']); + return redirect()->route('project.show', ['project_uuid' => $project->uuid, 'environment_name' => 'production']); } } diff --git a/app/Http/Livewire/Project/New/GithubPrivateRepository.php b/app/Http/Livewire/Project/New/GithubPrivateRepository.php index c5cfabedd..1ca8cade6 100644 --- a/app/Http/Livewire/Project/New/GithubPrivateRepository.php +++ b/app/Http/Livewire/Project/New/GithubPrivateRepository.php @@ -110,7 +110,7 @@ public function submit() $environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first(); $application = Application::create([ - 'name' => generateRandomName(), + 'name' => generate_random_name(), 'repository_project_id' => $this->selected_repository_id, 'git_repository' => "{$this->selected_repository_owner}/{$this->selected_repository_repo}", 'git_branch' => $this->selected_branch_name, @@ -129,12 +129,12 @@ public function submit() 'environment_name' => $environment->name ]); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } public function mount() { - $this->parameters = getParameters(); + $this->parameters = get_parameters(); $this->query = request()->query(); $this->repositories = $this->branches = collect(); $this->github_apps = GithubApp::private(); diff --git a/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php b/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php index d7d643dca..71860358c 100644 --- a/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php +++ b/app/Http/Livewire/Project/New/GithubPrivateRepositoryDeployKey.php @@ -34,7 +34,7 @@ public function mount() if (config('app.env') === 'local') { $this->repository_url = 'https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify'; } - $this->parameters = getParameters(); + $this->parameters = get_parameters(); $this->query = request()->query(); $this->private_keys = PrivateKey::where('team_id', session('currentTeam')->id)->get(); } @@ -74,7 +74,7 @@ public function submit() $project = Project::where('uuid', $this->parameters['project_uuid'])->first(); $environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first(); $application_init = [ - 'name' => generateRandomName(), + 'name' => generate_random_name(), 'git_repository' => $git_repository, 'git_branch' => $git_branch, 'git_full_url' => "git@$git_host:$git_repository.git", @@ -96,7 +96,7 @@ public function submit() 'application_uuid' => $application->uuid, ]); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Project/New/PublicGitRepository.php b/app/Http/Livewire/Project/New/PublicGitRepository.php index c5a9f160e..2b68f24e2 100644 --- a/app/Http/Livewire/Project/New/PublicGitRepository.php +++ b/app/Http/Livewire/Project/New/PublicGitRepository.php @@ -37,7 +37,7 @@ public function mount() $this->repository_url = 'https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify'; $this->port = 3000; } - $this->parameters = getParameters(); + $this->parameters = get_parameters(); $this->query = request()->query(); } @@ -78,7 +78,7 @@ public function submit() $application_init = [ - 'name' => generateRandomName(), + 'name' => generate_application_name($git_repository, $git_branch), 'git_repository' => $git_repository, 'git_branch' => $git_branch, 'build_pack' => 'nixpacks', @@ -106,7 +106,7 @@ public function submit() 'application_uuid' => $application->uuid, ]); } catch (\Exception $e) { - return generalErrorHandler($e); + return general_error_handler($e); } } } diff --git a/app/Http/Livewire/RunCommand.php b/app/Http/Livewire/RunCommand.php index 55be8fe23..474e91cdc 100755 --- a/app/Http/Livewire/RunCommand.php +++ b/app/Http/Livewire/RunCommand.php @@ -26,10 +26,10 @@ public function runCommand() { try { $this->validate(); - $activity = remoteProcess([$this->command], Server::where('uuid', $this->server)->first(), ActivityTypes::INLINE->value); + $activity = remote_process([$this->command], Server::where('uuid', $this->server)->first()); $this->emit('newMonitorActivity', $activity->id); } catch (\Exception $e) { - return generalErrorHandler($e); + return general_error_handler($e); } } } diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php index d14bbcd21..83d7567f5 100644 --- a/app/Http/Livewire/Server/Form.php +++ b/app/Http/Livewire/Server/Form.php @@ -36,7 +36,7 @@ public function installDocker() public function validateServer() { try { - $this->uptime = instantRemoteProcess(['uptime'], $this->server, false); + $this->uptime = instant_remote_process(['uptime'], $this->server, false); if (!$this->uptime) { $this->uptime = 'Server not reachable.'; throw new \Exception('Server not reachable.'); @@ -47,16 +47,16 @@ public function validateServer() $this->emit('serverValidated'); } } - $this->dockerVersion = instantRemoteProcess(['docker version|head -2|grep -i version'], $this->server, false); + $this->dockerVersion = instant_remote_process(['docker version|head -2|grep -i version'], $this->server, false); if (!$this->dockerVersion) { $this->dockerVersion = 'Not installed.'; } - $this->dockerComposeVersion = instantRemoteProcess(['docker compose version|head -2|grep -i version'], $this->server, false); + $this->dockerComposeVersion = instant_remote_process(['docker compose version|head -2|grep -i version'], $this->server, false); if (!$this->dockerComposeVersion) { $this->dockerComposeVersion = 'Not installed.'; } } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } public function delete() diff --git a/app/Http/Livewire/Server/New/ByIp.php b/app/Http/Livewire/Server/New/ByIp.php index d2a4f1b3c..632ae89ef 100644 --- a/app/Http/Livewire/Server/New/ByIp.php +++ b/app/Http/Livewire/Server/New/ByIp.php @@ -30,7 +30,7 @@ class ByIp extends Component ]; public function mount() { - $this->name = generateRandomName(); + $this->name = generate_random_name(); $this->private_key_id = $this->private_keys->first()->id; } public function setPrivateKey(string $private_key_id) @@ -61,7 +61,7 @@ public function submit() $server->settings->save(); return redirect()->route('server.show', $server->uuid); } catch (\Exception $e) { - return generalErrorHandler($e); + return general_error_handler($e); } } } diff --git a/app/Http/Livewire/Server/PrivateKey.php b/app/Http/Livewire/Server/PrivateKey.php index e9d6cf072..4cfa60191 100644 --- a/app/Http/Livewire/Server/PrivateKey.php +++ b/app/Http/Livewire/Server/PrivateKey.php @@ -4,7 +4,6 @@ use App\Models\PrivateKey as ModelsPrivateKey; use App\Models\Server; -use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Storage; use Livewire\Component; @@ -19,13 +18,12 @@ public function setPrivateKey($private_key_id) 'private_key_id' => $private_key_id ]); // Delete the old ssh mux file to force a new one to be created - Storage::disk('local')->delete(".ssh/ssh_mux_{$server->first()->ip}_{$server->first()->port}_{$server->first()->user}"); - + Storage::disk('ssh-mux')->delete("{$server->first()->ip}_{$server->first()->port}_{$server->first()->user}"); return redirect()->route('server.show', $this->parameters['server_uuid']); } public function mount() { - $this->parameters = getParameters(); + $this->parameters = get_parameters(); $this->private_keys = ModelsPrivateKey::where('team_id', session('currentTeam')->id)->get(); } } diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.php index 078597382..8c637e1fe 100644 --- a/app/Http/Livewire/Server/Proxy.php +++ b/app/Http/Livewire/Server/Proxy.php @@ -39,7 +39,7 @@ public function installProxy() public function proxyStatus() { - $this->server->extra_attributes->proxy_status = checkContainerStatus(server: $this->server, container_id: 'coolify-proxy'); + $this->server->extra_attributes->proxy_status = get_container_status(server: $this->server, container_id: 'coolify-proxy'); $this->server->save(); $this->server->refresh(); } @@ -51,7 +51,7 @@ public function setProxy() } public function stopProxy() { - instantRemoteProcess([ + instant_remote_process([ "docker rm -f coolify-proxy", ], $this->server); $this->server->extra_attributes->proxy_status = 'exited'; @@ -65,11 +65,11 @@ public function saveConfiguration() $docker_compose_yml_base64 = base64_encode($this->proxy_settings); $this->server->extra_attributes->last_saved_proxy_settings = Str::of($docker_compose_yml_base64)->pipe('md5')->value; $this->server->save(); - instantRemoteProcess([ + instant_remote_process([ "echo '$docker_compose_yml_base64' | base64 -d > $proxy_path/docker-compose.yml", ], $this->server); } catch (\Exception $e) { - return generalErrorHandler($e); + return general_error_handler($e); } } public function resetProxy() @@ -77,7 +77,7 @@ public function resetProxy() try { $this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server, true); } catch (\Exception $e) { - return generalErrorHandler($e); + return general_error_handler($e); } } public function checkProxySettingsInSync() @@ -85,7 +85,7 @@ public function checkProxySettingsInSync() try { $this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server); } catch (\Exception $e) { - return generalErrorHandler($e); + return general_error_handler($e); } } } diff --git a/app/Http/Livewire/Settings/Form.php b/app/Http/Livewire/Settings/Form.php index 0c4dcf5a8..3d34b4ddc 100644 --- a/app/Http/Livewire/Settings/Form.php +++ b/app/Http/Livewire/Settings/Form.php @@ -3,7 +3,10 @@ namespace App\Http\Livewire\Settings; use App\Models\InstanceSettings as ModelsInstanceSettings; +use App\Models\Server; use Livewire\Component; +use Spatie\Url\Url; +use Symfony\Component\Yaml\Yaml; class Form extends Component { @@ -11,30 +14,174 @@ class Form extends Component public $do_not_track; public $is_auto_update_enabled; public $is_registration_enabled; - public $is_https_forced; + protected string $dynamic_config_path; + protected Server $server; protected $rules = [ 'settings.fqdn' => 'nullable', 'settings.wildcard_domain' => 'nullable', 'settings.public_port_min' => 'required', 'settings.public_port_max' => 'required', + 'settings.default_redirect_404' => 'nullable', ]; public function mount() { $this->do_not_track = $this->settings->do_not_track; $this->is_auto_update_enabled = $this->settings->is_auto_update_enabled; $this->is_registration_enabled = $this->settings->is_registration_enabled; - $this->is_https_forced = $this->settings->is_https_forced; } public function instantSave() { $this->settings->do_not_track = $this->do_not_track; $this->settings->is_auto_update_enabled = $this->is_auto_update_enabled; $this->settings->is_registration_enabled = $this->is_registration_enabled; - $this->settings->is_https_forced = $this->is_https_forced; $this->settings->save(); $this->emit('saved', 'Settings updated!'); } + private function setup_instance_fqdn() + { + $file = "$this->dynamic_config_path/coolify.yaml"; + if (empty($this->settings->fqdn)) { + remote_process([ + "rm -f $file", + ], $this->server); + } else { + $url = Url::fromString($this->settings->fqdn); + $host = $url->getHost(); + $schema = $url->getScheme(); + $traefik_dynamic_conf = [ + 'http' => + [ + 'routers' => + [ + 'coolify-http' => + [ + 'entryPoints' => [ + 0 => 'http', + ], + 'service' => 'coolify', + 'rule' => "Host(`{$host}`)", + ], + ], + 'services' => + [ + 'coolify' => + [ + 'loadBalancer' => + [ + 'servers' => + [ + 0 => + [ + 'url' => 'http://coolify:80', + ], + ], + ], + ], + ], + ], + ]; + + if ($schema === 'https') { + $traefik_dynamic_conf['http']['routers']['coolify-http']['middlewares'] = [ + 0 => 'redirect-to-https@docker', + ]; + $traefik_dynamic_conf['http']['routers']['coolify-https'] = [ + 'entryPoints' => [ + 0 => 'https', + ], + 'service' => 'coolify', + 'rule' => "Host(`{$host}`)", + 'tls' => [ + 'certresolver' => 'letsencrypt', + ], + ]; + } + $this->save_configuration_to_disk($traefik_dynamic_conf, $file); + } + } + private function setup_default_redirect_404() + { + $file = "$this->dynamic_config_path/default_redirect_404.yaml"; + + if (empty($this->settings->default_redirect_404)) { + remote_process([ + "rm -f $file", + ], $this->server); + } else { + $url = Url::fromString($this->settings->default_redirect_404); + $host = $url->getHost(); + $schema = $url->getScheme(); + $traefik_dynamic_conf = [ + 'http' => + [ + 'routers' => + [ + 'catchall' => + [ + 'entryPoints' => [ + 0 => 'http', + 1 => 'https', + ], + 'service' => 'noop', + 'rule' => "HostRegexp(`{catchall:.*}`)", + 'priority' => 1, + 'middlewares' => [ + 0 => 'redirect-regexp@file', + ], + ], + ], + 'services' => + [ + 'noop' => + [ + 'loadBalancer' => + [ + 'servers' => + [ + 0 => + [ + 'url' => '', + ], + ], + ], + ], + ], + 'middlewares' => + [ + 'redirect-regexp' => + [ + 'redirectRegex' => + [ + 'regex' => '(.*)', + 'replacement' => $this->settings->default_redirect_404, + 'permanent' => false, + ], + ], + ], + ], + ]; + $this->save_configuration_to_disk($traefik_dynamic_conf, $file); + } + } + private function save_configuration_to_disk(array $traefik_dynamic_conf, string $file) + { + $yaml = Yaml::dump($traefik_dynamic_conf, 12, 2); + $yaml = + "# This file is automatically generated by Coolify.\n" . + "# Do not edit it manually (only if you know what are you doing).\n\n" . + $yaml; + + $base64 = base64_encode($yaml); + remote_process([ + "mkdir -p $this->dynamic_config_path", + "echo '$base64' | base64 -d > $file", + ], $this->server); + + if (config('app.env') == 'local') { + ray($yaml); + } + } public function submit() { $this->resetErrorBag(); @@ -44,5 +191,14 @@ public function submit() } $this->validate(); $this->settings->save(); + + $this->dynamic_config_path = '/data/coolify/proxy/dynamic'; + if (config('app.env') == 'local') { + $this->server = Server::findOrFail(1); + } else { + $this->server = Server::findOrFail(0); + } + $this->setup_instance_fqdn(); + $this->setup_default_redirect_404(); } } diff --git a/app/Http/Livewire/Source/Github/Change.php b/app/Http/Livewire/Source/Github/Change.php index a01a0a1a4..ee06e1748 100644 --- a/app/Http/Livewire/Source/Github/Change.php +++ b/app/Http/Livewire/Source/Github/Change.php @@ -35,7 +35,7 @@ public function submit() $this->validate(); $this->github_app->save(); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } public function instantSave() @@ -45,7 +45,7 @@ public function instantSave() $this->github_app->save(); $this->emit('saved', 'GitHub settings updated!'); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } public function mount() @@ -54,7 +54,7 @@ public function mount() if ($settings->fqdn) { $this->host = $settings->fqdn; } - $this->parameters = getParameters(); + $this->parameters = get_parameters(); $this->is_system_wide = $this->github_app->is_system_wide; } public function delete() @@ -63,7 +63,7 @@ public function delete() $this->github_app->delete(); redirect()->route('dashboard'); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Source/Create.php b/app/Http/Livewire/Source/Github/Create.php similarity index 91% rename from app/Http/Livewire/Source/Create.php rename to app/Http/Livewire/Source/Github/Create.php index f7f09bba7..d6eb34f40 100644 --- a/app/Http/Livewire/Source/Create.php +++ b/app/Http/Livewire/Source/Github/Create.php @@ -1,6 +1,6 @@ name = generateRandomName(); + $this->name = generate_random_name(); } public function createGitHubApp() { @@ -43,7 +43,7 @@ public function createGitHubApp() ]); redirect()->route('source.github.show', ['github_app_uuid' => $github_app->uuid]); } catch (\Exception $e) { - return generalErrorHandler($e, $this); + return general_error_handler($e, $this); } } } diff --git a/app/Http/Livewire/Upgrading.php b/app/Http/Livewire/Upgrading.php new file mode 100644 index 000000000..b9de9bb03 --- /dev/null +++ b/app/Http/Livewire/Upgrading.php @@ -0,0 +1,15 @@ +visible = true; + } +} diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 3391630ec..c80ad531b 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -12,7 +12,7 @@ class TrustProxies extends Middleware * * @var array|string|null */ - protected $proxies; + protected $proxies = '*'; /** * The headers that should be used to detect proxies. @@ -20,7 +20,7 @@ class TrustProxies extends Middleware * @var int */ protected $headers = - Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php new file mode 100644 index 000000000..f77272657 --- /dev/null +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -0,0 +1,658 @@ +application_deployment_queue = ApplicationDeploymentQueue::find($this->application_deployment_queue_id); + $this->application_deployment_queue->update([ + 'status' => ProcessStatus::IN_PROGRESS->value, + ]); + if ($this->rollback_commit) { + $this->git_commit = $this->rollback_commit; + } + + $this->application = Application::find($this->application_id); + + if ($this->pull_request_id) { + $this->preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id); + } + + $this->destination = $this->application->destination->getMorphClass()::where('id', $this->application->destination->id)->first(); + + $server = $this->destination->server; + + $private_key_location = save_private_key_for_server($server); + + $remoteProcessArgs = new CoolifyTaskArgs( + server_ip: $server->ip, + private_key_location: $private_key_location, + command: 'overwritten-later', + port: $server->port, + user: $server->user, + type: ActivityTypes::DEPLOYMENT->value, + type_uuid: $this->deployment_uuid, + ); + + $this->activity = activity() + ->performedOn($this->application) + ->withProperties($remoteProcessArgs->toArray()) + ->event(ActivityTypes::DEPLOYMENT->value) + ->log("[]"); + } + public function handle(): void + { + try { + if ($this->application->deploymentType() === 'source') { + $this->source = $this->application->source->getMorphClass()::where('id', $this->application->source->id)->first(); + } + + $this->workdir = "/artifacts/{$this->deployment_uuid}"; + if ($this->pull_request_id) { + ray('Deploying pull/' . $this->pull_request_id . '/head for application: ' . $this->application->name); + $this->deploy_pull_request(); + } else { + $this->deploy(); + } + } catch (\Exception $e) { + $this->execute_now([ + "echo '\nOops something is not okay, are you okay? 😢'", + "echo '\n\n{$e->getMessage()}'", + ]); + $this->fail(); + } finally { + if (isset($this->docker_compose)) { + Storage::disk('deployments')->put(Str::kebab($this->application->name) . '/docker-compose.yml', $this->docker_compose); + } + $this->execute_now(["docker rm -f {$this->deployment_uuid} >/dev/null 2>&1"], hideFromOutput: true); + } + } + + private function start_builder_image() + { + $this->execute_now([ + "echo -n 'Pulling latest version of the builder image (ghcr.io/coollabsio/coolify-builder)... '", + ]); + $this->execute_now([ + "docker run --pull=always -d --name {$this->deployment_uuid} --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-builder", + ], isDebuggable: true); + $this->execute_now([ + "echo 'Done.'" + ]); + $this->execute_now([ + $this->execute_in_builder("mkdir -p {$this->workdir}"), + ]); + } + + private function clone_repository() + { + $this->execute_now([ + "echo -n 'Importing {$this->application->git_repository}:{$this->application->git_branch} to {$this->workdir}... '" + ]); + + $this->execute_now([ + ...$this->importing_git_repository(), + ], 'importing_git_repository'); + + $this->execute_now([ + "echo 'Done.'" + ]); + // Get git commit + $this->execute_now([$this->execute_in_builder("cd {$this->workdir} && git rev-parse HEAD")], 'commit_sha', hideFromOutput: true); + $this->git_commit = $this->activity->properties->get('commit_sha'); + } + + private function cleanup_git() + { + $this->execute_now([ + $this->execute_in_builder("rm -fr {$this->workdir}/.git") + ], hideFromOutput: true); + } + private function generate_buildpack() + { + $this->execute_now([ + "echo -n 'Generating nixpacks configuration... '", + ]); + $this->execute_now([ + $this->nixpacks_build_cmd(), + $this->execute_in_builder("cp {$this->workdir}/.nixpacks/Dockerfile {$this->workdir}/Dockerfile"), + $this->execute_in_builder("rm -f {$this->workdir}/.nixpacks/Dockerfile"), + ], isDebuggable: true); + $this->execute_now([ + "echo 'Done... '", + ]); + } + private function build_image() + { + $this->execute_now([ + "echo -n 'Building image... '", + ]); + + if ($this->application->settings->is_static) { + $this->execute_now([ + $this->execute_in_builder("docker build -f {$this->workdir}/Dockerfile {$this->build_args} --progress plain -t { $this->build_image_name {$this->workdir}"), + ], isDebuggable: true); + + $dockerfile = "FROM {$this->application->static_image} +WORKDIR /usr/share/nginx/html/ +LABEL coolify.deploymentId={$this->deployment_uuid} +COPY --from=$this->build_image_name /app/{$this->application->publish_directory} ."; + $docker_file = base64_encode($dockerfile); + + $this->execute_now([ + $this->execute_in_builder("echo '{$docker_file}' | base64 -d > {$this->workdir}/Dockerfile-prod"), + $this->execute_in_builder("docker build -f {$this->workdir}/Dockerfile-prod {$this->build_args} --progress plain -t $this->production_image_name {$this->workdir}"), + ], hideFromOutput: true); + } else { + $this->execute_now([ + $this->execute_in_builder("docker build -f {$this->workdir}/Dockerfile {$this->build_args} --progress plain -t $this->production_image_name {$this->workdir}"), + ], isDebuggable: true); + } + $this->execute_now([ + "echo 'Done.'", + ]); + } + private function deploy_pull_request() + { + $this->build_image_name = "{$this->application->uuid}:pr-{$this->pull_request_id}-build"; + $this->production_image_name = "{$this->application->uuid}:pr-{$this->pull_request_id}"; + $this->container_name = generate_container_name($this->application->uuid, $this->pull_request_id); + // Deploy pull request + $this->execute_now([ + "echo 'Starting deployment of {$this->application->git_repository}:{$this->application->git_branch} PR#{$this->pull_request_id}...'", + ]); + $this->start_builder_image(); + $this->clone_repository(); + $this->cleanup_git(); + $this->generate_buildpack(); + $this->generate_compose_file(); + // Needs separate preview variables + // $this->generate_build_env_variables(); + // $this->add_build_env_variables_to_dockerfile(); + $this->build_image(); + $this->stop_running_container(); + $this->start_by_compose_file(); + $this->next(ProcessStatus::FINISHED->value); + } + private function deploy() + { + $this->container_name = generate_container_name($this->application->uuid); + // Deploy normal commit + $this->execute_now([ + "echo 'Starting deployment of {$this->application->git_repository}:{$this->application->git_branch}...'", + ]); + $this->start_builder_image(); + ray('Rollback Commit: ' . $this->rollback_commit); + if ($this->rollback_commit === 'HEAD') { + $this->clone_repository(); + } + $this->build_image_name = "{$this->application->uuid}:{$this->git_commit}-build"; + $this->production_image_name = "{$this->application->uuid}:{$this->git_commit}"; + ray('Build Image Name: ' . $this->build_image_name . ' & Production Image Name:' . $this->production_image_name); + if (!$this->force_rebuild) { + $this->execute_now([ + "docker images -q {$this->application->uuid}:{$this->git_commit} 2>/dev/null", + ], 'local_image_found', hideFromOutput: true, ignoreErrors: true); + $image_found = Str::of($this->activity->properties->get('local_image_found'))->trim()->isNotEmpty(); + if ($image_found) { + $this->execute_now([ + "echo 'Docker Image found locally with the same Git Commit SHA. Build skipped...'" + ]); + $this->generate_compose_file(); + $this->stop_running_container(); + $this->start_by_compose_file(); + $this->next(ProcessStatus::FINISHED->value); + return; + } + } + $this->cleanup_git(); + $this->generate_buildpack(); + $this->generate_compose_file(); + $this->generate_build_env_variables(); + $this->add_build_env_variables_to_dockerfile(); + $this->build_image(); + $this->stop_running_container(); + $this->start_by_compose_file(); + $this->next(ProcessStatus::FINISHED->value); + } + + public function failed(): void + { + $this->next(ProcessStatus::ERROR->value); + } + + private function next(string $status) + { + if (!Str::of($this->application_deployment_queue->status)->startsWith('cancelled')) { + $this->application_deployment_queue->update([ + 'status' => $status, + ]); + } + dispatch(new ContainerStatusJob( + application: $this->application, + container_name: $this->container_name, + pull_request_id: $this->pull_request_id + )); + + queue_next_deployment($this->application); + } + private function execute_in_builder(string $command) + { + return "docker exec {$this->deployment_uuid} bash -c '{$command}'"; + } + private function generate_environment_variables($ports) + { + $environment_variables = collect(); + + foreach ($this->application->runtime_environment_variables as $env) { + $environment_variables->push("$env->key=$env->value"); + } + // Add PORT if not exists, use the first port as default + if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('PORT'))->isEmpty()) { + $environment_variables->push("PORT={$ports[0]}"); + } + return $environment_variables->all(); + } + private function generate_env_variables() + { + $this->env_args = collect([]); + foreach ($this->application->nixpacks_environment_variables as $env) { + $this->env_args->push("--env {$env->key}={$env->value}"); + } + $this->env_args = $this->env_args->implode(' '); + } + private function generate_build_env_variables() + { + $this->build_args = collect(["--build-arg SOURCE_COMMIT={$this->git_commit}"]); + foreach ($this->application->build_environment_variables as $env) { + $this->build_args->push("--build-arg {$env->key}={$env->value}"); + } + $this->build_args = $this->build_args->implode(' '); + } + private function add_build_env_variables_to_dockerfile() + { + $this->execute_now([ + $this->execute_in_builder("cat {$this->workdir}/Dockerfile") + ], propertyName: 'dockerfile', hideFromOutput: true); + $dockerfile = collect(Str::of($this->activity->properties->get('dockerfile'))->trim()->explode("\n")); + + foreach ($this->application->build_environment_variables as $env) { + $dockerfile->splice(1, 0, "ARG {$env->key}={$env->value}"); + } + $dockerfile_base64 = base64_encode($dockerfile->implode("\n")); + $this->execute_now([ + $this->execute_in_builder("echo '{$dockerfile_base64}' | base64 -d > {$this->workdir}/Dockerfile") + ], hideFromOutput: true); + } + private function generate_docker_compose() + { + $ports = $this->application->settings->is_static ? [80] : $this->application->ports_exposes_array; + if ($this->pull_request_id) { + $persistent_storages = []; + $volume_names = []; + $environment_variables = []; + } else { + $persistent_storages = $this->generate_local_persistent_volumes(); + $volume_names = $this->generate_local_persistent_volumes_only_volume_names(); + $environment_variables = $this->generate_environment_variables($ports); + } + $docker_compose = [ + 'version' => '3.8', + 'services' => [ + $this->container_name => [ + 'image' => $this->production_image_name, + 'container_name' => $this->container_name, + 'restart' => 'always', + 'environment' => $environment_variables, + 'labels' => $this->set_labels_for_applications(), + 'expose' => $ports, + 'networks' => [ + $this->destination->network, + ], + 'healthcheck' => [ + 'test' => [ + 'CMD-SHELL', + $this->generate_healthcheck_commands() + ], + 'interval' => $this->application->health_check_interval . 's', + 'timeout' => $this->application->health_check_timeout . 's', + 'retries' => $this->application->health_check_retries, + 'start_period' => $this->application->health_check_start_period . 's' + ], + 'mem_limit' => $this->application->limits_memory, + 'memswap_limit' => $this->application->limits_memory_swap, + 'mem_swappiness' => $this->application->limits_memory_swappiness, + 'mem_reservation' => $this->application->limits_memory_reservation, + 'cpus' => $this->application->limits_cpus, + 'cpuset' => $this->application->limits_cpuset, + 'cpu_shares' => $this->application->limits_cpu_shares, + ] + ], + 'networks' => [ + $this->destination->network => [ + 'external' => false, + 'name' => $this->destination->network, + 'attachable' => true, + ] + ] + ]; + if (count($this->application->ports_mappings_array) > 0 && !$this->pull_request_id) { + $docker_compose['services'][$this->container_name]['ports'] = $this->application->ports_mappings_array; + } + if (count($persistent_storages) > 0) { + $docker_compose['services'][$this->container_name]['volumes'] = $persistent_storages; + } + if (count($volume_names) > 0) { + $docker_compose['volumes'] = $volume_names; + } + return Yaml::dump($docker_compose, 10); + } + private function generate_local_persistent_volumes() + { + foreach ($this->application->persistentStorages as $persistentStorage) { + $volume_name = $persistentStorage->host_path ?? $persistentStorage->name; + $local_persistent_volumes[] = $volume_name . ':' . $persistentStorage->mount_path; + } + return $local_persistent_volumes ?? []; + } + + private function generate_local_persistent_volumes_only_volume_names() + { + foreach ($this->application->persistentStorages as $persistentStorage) { + if ($persistentStorage->host_path) { + continue; + } + $local_persistent_volumes_names[$persistentStorage->name] = [ + 'name' => $persistentStorage->name, + 'external' => false, + ]; + } + return $local_persistent_volumes_names ?? []; + } + private function generate_healthcheck_commands() + { + if (!$this->application->health_check_port) { + $this->application->health_check_port = $this->application->ports_exposes_array[0]; + } + if ($this->application->health_check_path) { + $generated_healthchecks_commands = [ + "curl -s -X {$this->application->health_check_method} -f {$this->application->health_check_scheme}://{$this->application->health_check_host}:{$this->application->health_check_port}{$this->application->health_check_path} > /dev/null" + ]; + } else { + $generated_healthchecks_commands = [ + "curl -s -X {$this->application->health_check_method} -f {$this->application->health_check_scheme}://{$this->application->health_check_host}:{$this->application->health_check_port}/" + ]; + } + return implode(' ', $generated_healthchecks_commands); + } + + private function set_labels_for_applications() + { + $labels = []; + $labels[] = 'coolify.managed=true'; + $labels[] = 'coolify.version=' . config('version'); + $labels[] = 'coolify.applicationId=' . $this->application->id; + $labels[] = 'coolify.type=application'; + $labels[] = 'coolify.name=' . $this->application->name; + if ($this->pull_request_id) { + $labels[] = 'coolify.pullRequestId=' . $this->pull_request_id; + } + if ($this->application->fqdn) { + if ($this->pull_request_id) { + $preview_fqdn = data_get($this->preview, 'fqdn'); + $template = $this->application->preview_url_template; + $url = Url::fromString($this->application->fqdn); + $host = $url->getHost(); + $schema = $url->getScheme(); + $random = new Cuid2(7); + $preview_fqdn = str_replace('{{random}}', $random, $template); + $preview_fqdn = str_replace('{{domain}}', $host, $preview_fqdn); + $preview_fqdn = str_replace('{{pr_id}}', $this->pull_request_id, $preview_fqdn); + $preview_fqdn = "$schema://$preview_fqdn"; + $this->preview->fqdn = $preview_fqdn; + $this->preview->save(); + $domains = Str::of($preview_fqdn)->explode(','); + } else { + $domains = Str::of($this->application->fqdn)->explode(','); + } + $labels[] = 'traefik.enable=true'; + foreach ($domains as $domain) { + $url = Url::fromString($domain); + $host = $url->getHost(); + $path = $url->getPath(); + $schema = $url->getScheme(); + $slug = Str::slug($host . $path); + + $http_label = "{$this->application->uuid}-{$slug}-http"; + $https_label = "{$this->application->uuid}-{$slug}-https"; + + if ($schema === 'https') { + // Set labels for https + $labels[] = "traefik.http.routers.{$https_label}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"; + $labels[] = "traefik.http.routers.{$https_label}.entryPoints=https"; + $labels[] = "traefik.http.routers.{$https_label}.middlewares=gzip"; + if ($path !== '/') { + $labels[] = "traefik.http.routers.{$https_label}.middlewares={$https_label}-stripprefix"; + $labels[] = "traefik.http.middlewares.{$https_label}-stripprefix.stripprefix.prefixes={$path}"; + } + + $labels[] = "traefik.http.routers.{$https_label}.tls=true"; + $labels[] = "traefik.http.routers.{$https_label}.tls.certresolver=letsencrypt"; + + // Set labels for http (redirect to https) + $labels[] = "traefik.http.routers.{$http_label}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"; + $labels[] = "traefik.http.routers.{$http_label}.entryPoints=http"; + if ($this->application->settings->is_force_https_enabled) { + $labels[] = "traefik.http.routers.{$http_label}.middlewares=redirect-to-https"; + } + } else { + // Set labels for http + $labels[] = "traefik.http.routers.{$http_label}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"; + $labels[] = "traefik.http.routers.{$http_label}.entryPoints=http"; + $labels[] = "traefik.http.routers.{$http_label}.middlewares=gzip"; + if ($path !== '/') { + $labels[] = "traefik.http.routers.{$http_label}.middlewares={$http_label}-stripprefix"; + $labels[] = "traefik.http.middlewares.{$http_label}-stripprefix.stripprefix.prefixes={$path}"; + } + } + } + } + return $labels; + } + + private function execute_now( + array|Collection $command, + string $propertyName = null, + bool $isFinished = false, + bool $hideFromOutput = false, + bool $isDebuggable = false, + bool $ignoreErrors = false + ) { + static::$batch_counter++; + + if ($command instanceof Collection) { + $commandText = $command->implode("\n"); + } else { + $commandText = collect($command)->implode("\n"); + } + ray('Executing command: ' . $commandText); + $this->activity->properties = $this->activity->properties->merge([ + 'command' => $commandText, + ]); + $this->activity->save(); + if ($isDebuggable && !$this->application->settings->is_debug_enabled) { + $hideFromOutput = true; + } + $remote_process = resolve(RunRemoteProcess::class, [ + 'activity' => $this->activity, + 'hideFromOutput' => $hideFromOutput, + 'isFinished' => $isFinished, + 'ignoreErrors' => $ignoreErrors, + ]); + $result = $remote_process(); + if ($propertyName) { + $this->activity->properties = $this->activity->properties->merge([ + $propertyName => trim($result->output()), + ]); + $this->activity->save(); + } + + if ($result->exitCode() != 0 && $result->errorOutput() && !$ignoreErrors) { + throw new \RuntimeException($result->errorOutput()); + } + } + private function set_git_import_settings($git_clone_command) + { + if ($this->application->git_commit_sha !== 'HEAD') { + $git_clone_command = "{$git_clone_command} && cd {$this->workdir} && git -c advice.detachedHead=false checkout {$this->application->git_commit_sha} >/dev/null 2>&1"; + } + if ($this->application->settings->is_git_submodules_enabled) { + $git_clone_command = "{$git_clone_command} && cd {$this->workdir} && git submodule update --init --recursive"; + } + if ($this->application->settings->is_git_lfs_enabled) { + $git_clone_command = "{$git_clone_command} && cd {$this->workdir} && git lfs pull"; + } + return $git_clone_command; + } + private function importing_git_repository() + { + $git_clone_command = "git clone -q -b {$this->application->git_branch}"; + if ($this->pull_request_id) { + $pr_branch_name = "pr-{$this->pull_request_id}-coolify"; + } + + if ($this->application->deploymentType() === 'source') { + $source_html_url = data_get($this->application, 'source.html_url'); + $url = parse_url(filter_var($source_html_url, FILTER_SANITIZE_URL)); + $source_html_url_host = $url['host']; + $source_html_url_scheme = $url['scheme']; + + if ($this->source->getMorphClass() == 'App\Models\GithubApp') { + if ($this->source->is_public) { + $git_clone_command = "{$git_clone_command} {$this->source->html_url}/{$this->application->git_repository} {$this->workdir}"; + $git_clone_command = $this->set_git_import_settings($git_clone_command); + + $commands = [$this->execute_in_builder($git_clone_command)]; + + if ($this->pull_request_id) { + $commands[] = $this->execute_in_builder("cd {$this->workdir} && git fetch origin pull/{$this->pull_request_id}/head:$pr_branch_name >/dev/null 2>&1 && git checkout $pr_branch_name >/dev/null 2>&1"); + } + return $commands; + } else { + $github_access_token = generate_github_installation_token($this->source); + $commands = [ + $this->execute_in_builder("git clone -q -b {$this->application->git_branch} $source_html_url_scheme://x-access-token:$github_access_token@$source_html_url_host/{$this->application->git_repository}.git {$this->workdir}") + ]; + if ($this->pull_request_id) { + $commands[] = $this->execute_in_builder("cd {$this->workdir} && git fetch origin pull/{$this->pull_request_id}/head:$pr_branch_name && git checkout $pr_branch_name"); + } + return $commands; + } + } + } + if ($this->application->deploymentType() === 'deploy_key') { + $private_key = base64_encode($this->application->private_key->private_key); + $git_clone_command = "GIT_SSH_COMMAND=\"ssh -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" {$git_clone_command} {$this->application->git_full_url} {$this->workdir}"; + $git_clone_command = $this->set_git_import_settings($git_clone_command); + return [ + $this->execute_in_builder("mkdir -p /root/.ssh"), + $this->execute_in_builder("echo '{$private_key}' | base64 -d > /root/.ssh/id_rsa"), + $this->execute_in_builder("chmod 600 /root/.ssh/id_rsa"), + $this->execute_in_builder($git_clone_command) + ]; + } + } + private function nixpacks_build_cmd() + { + $this->generate_env_variables(); + $nixpacks_command = "nixpacks build -o {$this->workdir} {$this->env_args} --no-error-without-start"; + if ($this->application->build_command) { + $nixpacks_command .= " --build-cmd \"{$this->application->build_command}\""; + } + if ($this->application->start_command) { + $nixpacks_command .= " --start-cmd \"{$this->application->start_command}\""; + } + if ($this->application->install_command) { + $nixpacks_command .= " --install-cmd \"{$this->application->install_command}\""; + } + $nixpacks_command .= " {$this->workdir}"; + return $this->execute_in_builder($nixpacks_command); + } + private function stop_running_container() + { + $this->execute_now([ + "echo -n 'Removing old instance... '", + $this->execute_in_builder("docker rm -f $this->container_name >/dev/null 2>&1"), + "echo 'Done.'", + ]); + } + private function start_by_compose_file() + { + $this->execute_now([ + "echo -n 'Starting your application... '", + ]); + $this->execute_now([ + $this->execute_in_builder("docker compose --project-directory {$this->workdir} up -d >/dev/null"), + ], isDebuggable: true); + $this->execute_now([ + "echo 'Done. 🎉'", + ], isFinished: true); + } + private function generate_compose_file() + { + $this->docker_compose = $this->generate_docker_compose(); + $docker_compose_base64 = base64_encode($this->docker_compose); + $this->execute_now([ + $this->execute_in_builder("echo '{$docker_compose_base64}' | base64 -d > {$this->workdir}/docker-compose.yml") + ], hideFromOutput: true); + } +} diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.php index de3660de4..9ff18f9ba 100644 --- a/app/Jobs/ContainerStatusJob.php +++ b/app/Jobs/ContainerStatusJob.php @@ -3,72 +3,86 @@ namespace App\Jobs; use App\Models\Application; +use App\Models\ApplicationPreview; use App\Models\Server; use Illuminate\Bus\Queueable; +use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Log; -class ContainerStatusJob implements ShouldQueue +class ContainerStatusJob implements ShouldQueue, ShouldBeUnique { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public function __construct( - public string|null $container_id = null, - ) { + public string $container_name; + public string|null $pull_request_id; + public Application $application; + + public function __construct($application, string $container_name, string|null $pull_request_id = null) + { + $this->application = $application; + $this->container_name = $container_name; + $this->pull_request_id = $pull_request_id; + } + public function uniqueId(): string + { + return $this->container_name; } public function handle(): void { try { - if ($this->container_id) { - $this->checkContainerStatus(); + $status = get_container_status(server: $this->application->destination->server, container_id: $this->container_name, throwError: false); + ray('Container ' . $this->container_name . ' statuus is ' . $status); + if ($this->pull_request_id) { + $preview = ApplicationPreview::findPreviewByApplicationAndPullId($this->application->id, $this->pull_request_id); + $preview->status = $status; + $preview->save(); } else { - $this->checkAllServers(); + $this->application->status = $status; + $this->application->save(); } } catch (\Exception $e) { Log::error($e->getMessage()); } } - protected function checkAllServers() + protected function check_container_status() { - $servers = Server::all()->reject(fn (Server $server) => $server->settings->is_build_server); - $applications = Application::all(); - $not_found_applications = $applications; - $containers = collect(); - foreach ($servers as $server) { - $output = instantRemoteProcess(['docker ps -a -q --format \'{{json .}}\''], $server); - $containers = $containers->concat(formatDockerCmdOutputToJson($output)); - } - foreach ($containers as $container) { - $found_application = $applications->filter(function ($value, $key) use ($container) { - return $value->uuid == $container['Names']; - })->first(); - if ($found_application) { - $not_found_applications = $not_found_applications->filter(function ($value, $key) use ($found_application) { - return $value->uuid != $found_application->uuid; - }); - $found_application->status = $container['State']; - $found_application->save(); - Log::info('Found application: ' . $found_application->uuid . '. Set status to: ' . $found_application->status); - } - } - foreach ($not_found_applications as $not_found_application) { - $not_found_application->status = 'exited'; - $not_found_application->save(); - Log::info('Not found application: ' . $not_found_application->uuid . '. Set status to: ' . $not_found_application->status); - } - } - protected function checkContainerStatus() - { - $application = Application::where('uuid', $this->container_id)->firstOrFail(); - if (!$application) { - return; - } - if ($application->destination->server) { - $application->status = checkContainerStatus(server: $application->destination->server, container_id: $this->container_id); - $application->save(); + if ($this->application->destination->server) { + $this->application->status = get_container_status(server: $this->application->destination->server, container_id: $this->application->uuid); + $this->application->save(); } } + // protected function check_all_servers() + // { + // $servers = Server::all()->reject(fn (Server $server) => $server->settings->is_build_server); + // $applications = Application::all(); + // $not_found_applications = $applications; + // $containers = collect(); + // foreach ($servers as $server) { + // $output = instant_remote_process(['docker ps -a -q --format \'{{json .}}\''], $server); + // $containers = $containers->concat(format_docker_command_output_to_json($output)); + // } + // foreach ($containers as $container) { + // $found_application = $applications->filter(function ($value, $key) use ($container) { + // return $value->uuid == $container['Names']; + // })->first(); + // if ($found_application) { + // $not_found_applications = $not_found_applications->filter(function ($value, $key) use ($found_application) { + // return $value->uuid != $found_application->uuid; + // }); + // $found_application->status = $container['State']; + // $found_application->save(); + // Log::info('Found application: ' . $found_application->uuid . '. Set status to: ' . $found_application->status); + // } + // } + // foreach ($not_found_applications as $not_found_application) { + // $not_found_application->status = 'exited'; + // $not_found_application->save(); + // Log::info('Not found application: ' . $not_found_application->uuid . '. Set status to: ' . $not_found_application->status); + // } + // } + } diff --git a/app/Jobs/CoolifyTask.php b/app/Jobs/CoolifyTask.php index d96095cc4..df4b0e8cc 100755 --- a/app/Jobs/CoolifyTask.php +++ b/app/Jobs/CoolifyTask.php @@ -19,18 +19,19 @@ class CoolifyTask implements ShouldQueue */ public function __construct( public Activity $activity, - ){} + ) { + } /** * Execute the job. */ public function handle(): void { - $remoteProcess = resolve(RunRemoteProcess::class, [ + $remote_process = resolve(RunRemoteProcess::class, [ 'activity' => $this->activity, ]); - $remoteProcess(); + $remote_process(); // @TODO: Remove file at $this->activity->getExtraProperty('private_key_location') after process is finished } } diff --git a/app/Jobs/DeployApplicationJob.php b/app/Jobs/DeployApplicationJob.php deleted file mode 100644 index f5a257095..000000000 --- a/app/Jobs/DeployApplicationJob.php +++ /dev/null @@ -1,518 +0,0 @@ -application = Application::query() - ->where('uuid', $this->application_uuid) - ->firstOrFail(); - $this->destination = $this->application->destination->getMorphClass()::where('id', $this->application->destination->id)->first(); - - $server = $this->destination->server; - - $private_key_location = savePrivateKeyForServer($server); - - $remoteProcessArgs = new CoolifyTaskArgs( - server_ip: $server->ip, - private_key_location: $private_key_location, - command: 'overwritten-later', - port: $server->port, - user: $server->user, - type: ActivityTypes::DEPLOYMENT->value, - type_uuid: $this->deployment_uuid, - ); - - $this->activity = activity() - ->performedOn($this->application) - ->withProperties($remoteProcessArgs->toArray()) - ->event(ActivityTypes::DEPLOYMENT->value) - ->log("[]"); - } - protected function stopRunningContainer() - { - $this->executeNow([ - "echo -n 'Removing old instance... '", - $this->execute_in_builder("docker rm -f {$this->application->uuid} >/dev/null 2>&1"), - "echo 'Done.'", - "echo -n 'Starting your application... '", - ]); - } - protected function startByComposeFile() - { - $this->executeNow([ - $this->execute_in_builder("docker compose --project-directory {$this->workdir} up -d >/dev/null"), - ], isDebuggable: true); - $this->executeNow([ - "echo 'Done. 🎉'", - ], isFinished: true); - } - protected function generateComposeFile() - { - $this->docker_compose = $this->generate_docker_compose(); - $docker_compose_base64 = base64_encode($this->docker_compose); - $this->executeNow([ - $this->execute_in_builder("echo '{$docker_compose_base64}' | base64 -d > {$this->workdir}/docker-compose.yml") - ], hideFromOutput: true); - } - /** - * Execute the job. - */ - public function handle(): void - { - try { - $coolify_instance_settings = InstanceSettings::get(); - if ($this->application->deploymentType() === 'source') { - $this->source = $this->application->source->getMorphClass()::where('id', $this->application->source->id)->first(); - } - - // Get Wildcard Domain - $project_wildcard_domain = data_get($this->application, 'environment.project.settings.wildcard_domain'); - $global_wildcard_domain = data_get($coolify_instance_settings, 'wildcard_domain'); - $wildcard_domain = $project_wildcard_domain ?? $global_wildcard_domain ?? null; - - // Set wildcard domain - if (!$this->application->fqdn && $wildcard_domain) { - $this->application->fqdn = 'http://' . $this->application->uuid . '.' . $wildcard_domain; - $this->application->save(); - } - $this->workdir = "/artifacts/{$this->deployment_uuid}"; - - // Pull builder image - $this->executeNow([ - "echo 'Starting deployment of {$this->application->git_repository}:{$this->application->git_branch}...'", - "echo -n 'Pulling latest version of the builder image (ghcr.io/coollabsio/coolify-builder)... '", - ]); - - $this->executeNow([ - "docker run --pull=always -d --name {$this->deployment_uuid} --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-builder", - ], isDebuggable: true); - - // Import git repository - $this->executeNow([ - "echo 'Done.'", - "echo -n 'Importing {$this->application->git_repository}:{$this->application->git_branch} to {$this->workdir}... '" - ]); - - $this->executeNow([ - ...$this->gitImport(), - ], 'importing_git_repository'); - - $this->executeNow([ - "echo 'Done.'" - ]); - - // Get git commit - $this->executeNow([$this->execute_in_builder("cd {$this->workdir} && git rev-parse HEAD")], 'commit_sha', hideFromOutput: true); - $this->git_commit = $this->activity->properties->get('commit_sha'); - - if (!$this->force_rebuild) { - $this->executeNow([ - "docker images -q {$this->application->uuid}:{$this->git_commit} 2>/dev/null", - ], 'local_image_found', hideFromOutput: true, ignoreErrors: true); - $image_found = Str::of($this->activity->properties->get('local_image_found'))->trim()->isNotEmpty(); - if ($image_found) { - $this->executeNow([ - "echo 'Docker Image found locally with the same Git Commit SHA. Build skipped...'" - ]); - // Generate docker-compose.yml - $this->generateComposeFile(); - - // Stop running container - $this->stopRunningContainer(); - - // Start application - $this->startByComposeFile(); - return; - } - } - $this->executeNow([ - $this->execute_in_builder("rm -fr {$this->workdir}/.git") - ], hideFromOutput: true); - - $this->executeNow([ - "echo -n 'Generating nixpacks configuration... '", - ]); - $this->executeNow([ - $this->nixpacks_build_cmd(), - $this->execute_in_builder("cp {$this->workdir}/.nixpacks/Dockerfile {$this->workdir}/Dockerfile"), - $this->execute_in_builder("rm -f {$this->workdir}/.nixpacks/Dockerfile"), - ], isDebuggable: true); - - // Generate docker-compose.yml - $this->generateComposeFile(); - $this->executeNow([ - "echo 'Done.'", - "echo -n 'Building image... '", - ]); - - $this->generate_build_env_variables(); - $this->add_build_env_variables_to_dockerfile(); - - if ($this->application->settings->is_static) { - $this->executeNow([ - $this->execute_in_builder("docker build -f {$this->workdir}/Dockerfile {$this->build_args} --progress plain -t {$this->application->uuid}:{$this->git_commit}-build {$this->workdir}"), - ], isDebuggable: true); - - $dockerfile = "FROM {$this->application->static_image} -WORKDIR /usr/share/nginx/html/ -LABEL coolify.deploymentId={$this->deployment_uuid} -COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->application->publish_directory} ."; - $docker_file = base64_encode($dockerfile); - - $this->executeNow([ - $this->execute_in_builder("echo '{$docker_file}' | base64 -d > {$this->workdir}/Dockerfile-prod"), - $this->execute_in_builder("docker build -f {$this->workdir}/Dockerfile-prod {$this->build_args} --progress plain -t {$this->application->uuid}:{$this->git_commit} {$this->workdir}"), - ], hideFromOutput: true); - } else { - $this->executeNow([ - $this->execute_in_builder("docker build -f {$this->workdir}/Dockerfile {$this->build_args} --progress plain -t {$this->application->uuid}:{$this->git_commit} {$this->workdir}"), - ], isDebuggable: true); - } - - $this->executeNow([ - "echo 'Done.'", - ]); - // Stop running container - $this->stopRunningContainer(); - - // Start application - $this->startByComposeFile(); - } catch (\Exception $e) { - $this->executeNow([ - "echo '\nOops something is not okay, are you okay? 😢'", - "echo '\n\n{$e->getMessage()}'", - ]); - $this->fail($e->getMessage()); - } finally { - // Saving docker-compose.yml - if (isset($this->docker_compose)) { - Storage::disk('deployments')->put(Str::kebab($this->application->name) . '/docker-compose.yml', $this->docker_compose); - } - $this->executeNow(["docker rm -f {$this->deployment_uuid} >/dev/null 2>&1"], hideFromOutput: true); - dispatch(new ContainerStatusJob($this->application_uuid)); - } - } - - private function execute_in_builder(string $command) - { - return "docker exec {$this->deployment_uuid} bash -c '{$command}'"; - } - private function generate_environment_variables($ports) - { - $environment_variables = collect(); - - foreach ($this->application->runtime_environment_variables as $env) { - $environment_variables->push("$env->key=$env->value"); - } - // Add PORT if not exists, use the first port as default - if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('PORT'))->isEmpty()) { - $environment_variables->push("PORT={$ports[0]}"); - } - return $environment_variables->all(); - } - private function generate_env_variables() - { - $this->env_args = collect([]); - foreach ($this->application->nixpacks_environment_variables as $env) { - $this->env_args->push("--env {$env->key}={$env->value}"); - } - $this->env_args = $this->env_args->implode(' '); - } - private function generate_build_env_variables() - { - $this->build_args = collect(["--build-arg SOURCE_COMMIT={$this->git_commit}"]); - foreach ($this->application->build_environment_variables as $env) { - $this->build_args->push("--build-arg {$env->key}={$env->value}"); - } - $this->build_args = $this->build_args->implode(' '); - } - private function add_build_env_variables_to_dockerfile() - { - $this->executeNow([ - $this->execute_in_builder("cat {$this->workdir}/Dockerfile") - ], propertyName: 'dockerfile', hideFromOutput: true); - $dockerfile = collect(Str::of($this->activity->properties->get('dockerfile'))->trim()->explode("\n")); - - foreach ($this->application->build_environment_variables as $env) { - $dockerfile->splice(1, 0, "ARG {$env->key}={$env->value}"); - } - $dockerfile_base64 = base64_encode($dockerfile->implode("\n")); - $this->executeNow([ - $this->execute_in_builder("echo '{$dockerfile_base64}' | base64 -d > {$this->workdir}/Dockerfile") - ], hideFromOutput: true); - } - private function generate_docker_compose() - { - $ports = $this->application->settings->is_static ? [80] : $this->application->ports_exposes_array; - $persistentStorages = $this->generate_local_persistent_volumes(); - $volume_names = $this->generate_local_persistent_volumes_only_volume_names(); - $environment_variables = $this->generate_environment_variables($ports); - $docker_compose = [ - 'version' => '3.8', - 'services' => [ - $this->application->uuid => [ - 'image' => "{$this->application->uuid}:$this->git_commit", - 'container_name' => $this->application->uuid, - 'restart' => 'always', - 'environment' => $environment_variables, - 'labels' => $this->set_labels_for_applications(), - 'expose' => $ports, - 'networks' => [ - $this->destination->network, - ], - 'healthcheck' => [ - 'test' => [ - 'CMD-SHELL', - $this->generate_healthcheck_commands() - ], - 'interval' => $this->application->health_check_interval . 's', - 'timeout' => $this->application->health_check_timeout . 's', - 'retries' => $this->application->health_check_retries, - 'start_period' => $this->application->health_check_start_period . 's' - ], - 'mem_limit' => $this->application->limits_memory, - 'memswap_limit' => $this->application->limits_memory_swap, - 'mem_swappiness' => $this->application->limits_memory_swappiness, - 'mem_reservation' => $this->application->limits_memory_reservation, - 'oom_kill_disable' => $this->application->limits_memory_oom_kill, - 'cpus' => $this->application->limits_cpus, - 'cpuset' => $this->application->limits_cpuset, - 'cpu_shares' => $this->application->limits_cpu_shares, - ] - ], - 'networks' => [ - $this->destination->network => [ - 'external' => false, - 'name' => $this->destination->network, - 'attachable' => true, - ] - ] - ]; - if (count($this->application->ports_mappings_array) > 0) { - $docker_compose['services'][$this->application->uuid]['ports'] = $this->application->ports_mappings_array; - } - if (count($persistentStorages) > 0) { - $docker_compose['services'][$this->application->uuid]['volumes'] = $persistentStorages; - } - if (count($volume_names) > 0) { - $docker_compose['volumes'] = $volume_names; - } - return Yaml::dump($docker_compose, 10); - } - private function generate_local_persistent_volumes() - { - foreach ($this->application->persistentStorages as $persistentStorage) { - $volume_name = $persistentStorage->host_path ?? $persistentStorage->name; - $local_persistent_volumes[] = $volume_name . ':' . $persistentStorage->mount_path; - } - return $local_persistent_volumes ?? []; - } - - private function generate_local_persistent_volumes_only_volume_names() - { - foreach ($this->application->persistentStorages as $persistentStorage) { - if ($persistentStorage->host_path) { - continue; - } - $local_persistent_volumes_names[$persistentStorage->name] = [ - 'name' => $persistentStorage->name, - 'external' => false, - ]; - } - return $local_persistent_volumes_names ?? []; - } - private function generate_healthcheck_commands() - { - if (!$this->application->health_check_port) { - $this->application->health_check_port = $this->application->ports_exposes_array[0]; - } - if ($this->application->health_check_path) { - $generated_healthchecks_commands = [ - "curl -s -X {$this->application->health_check_method} -f {$this->application->health_check_scheme}://{$this->application->health_check_host}:{$this->application->health_check_port}{$this->application->health_check_path} > /dev/null" - ]; - } else { - $generated_healthchecks_commands = [ - "curl -s -X {$this->application->health_check_method} -f {$this->application->health_check_scheme}://{$this->application->health_check_host}:{$this->application->health_check_port}/" - ]; - } - return implode(' ', $generated_healthchecks_commands); - } - - private function set_labels_for_applications() - { - $labels = []; - $labels[] = 'coolify.managed=true'; - $labels[] = 'coolify.version=' . config('version'); - $labels[] = 'coolify.applicationId=' . $this->application->id; - $labels[] = 'coolify.type=application'; - $labels[] = 'coolify.name=' . $this->application->name; - if ($this->application->fqdn) { - $domains = Str::of($this->application->fqdn)->explode(','); - $labels[] = 'traefik.enable=true'; - foreach ($domains as $domain) { - $url = Url::fromString($domain); - $host = $url->getHost(); - $path = $url->getPath(); - $slug = Str::slug($url); - $label_id = "{$this->application->uuid}-{$slug}"; - if ($path === '/') { - $labels[] = "traefik.http.routers.{$label_id}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"; - } else { - $labels[] = "traefik.http.routers.{$label_id}.rule=Host(`{$host}`) && PathPrefix(`{$path}`)"; - $labels[] = "traefik.http.routers.{$label_id}.middlewares={$label_id}-stripprefix"; - $labels[] = "traefik.http.middlewares.{$label_id}-stripprefix.stripprefix.prefixes={$path}"; - } - } - } - return $labels; - } - - private function executeNow( - array|Collection $command, - string $propertyName = null, - bool $isFinished = false, - bool $hideFromOutput = false, - bool $isDebuggable = false, - bool $ignoreErrors = false - ) { - static::$batch_counter++; - - if ($command instanceof Collection) { - $commandText = $command->implode("\n"); - } else { - $commandText = collect($command)->implode("\n"); - } - - $this->activity->properties = $this->activity->properties->merge([ - 'command' => $commandText, - ]); - $this->activity->save(); - if ($isDebuggable && !$this->application->settings->is_debug) { - $hideFromOutput = true; - } - $remoteProcess = resolve(RunRemoteProcess::class, [ - 'activity' => $this->activity, - 'hideFromOutput' => $hideFromOutput, - 'isFinished' => $isFinished, - 'ignoreErrors' => $ignoreErrors, - ]); - $result = $remoteProcess(); - if ($propertyName) { - $this->activity->properties = $this->activity->properties->merge([ - $propertyName => trim($result->output()), - ]); - $this->activity->save(); - } - - if ($result->exitCode() != 0 && $result->errorOutput() && !$ignoreErrors) { - throw new \RuntimeException($result->errorOutput()); - } - } - private function setGitImportSettings($git_clone_command) - { - if ($this->application->git_commit_sha !== 'HEAD') { - $git_clone_command = "{$git_clone_command} && cd {$this->workdir} && git -c advice.detachedHead=false checkout {$this->application->git_commit_sha} >/dev/null 2>&1"; - } - if ($this->application->settings->is_git_submodules_allowed) { - $git_clone_command = "{$git_clone_command} && cd {$this->workdir} && git submodule update --init --recursive"; - } - if ($this->application->settings->is_git_lfs_allowed) { - $git_clone_command = "{$git_clone_command} && cd {$this->workdir} && git lfs pull"; - } - return $git_clone_command; - } - private function gitImport() - { - $git_clone_command = "git clone -q -b {$this->application->git_branch}"; - - if ($this->application->deploymentType() === 'source') { - $source_html_url = data_get($this->application, 'source.html_url'); - $url = parse_url(filter_var($source_html_url, FILTER_SANITIZE_URL)); - $source_html_url_host = $url['host']; - $source_html_url_scheme = $url['scheme']; - - if ($this->source->getMorphClass() == 'App\Models\GithubApp') { - if ($this->source->is_public) { - $git_clone_command = "{$git_clone_command} {$this->source->html_url}/{$this->application->git_repository} {$this->workdir}"; - $git_clone_command = $this->setGitImportSettings($git_clone_command); - return [ - $this->execute_in_builder($git_clone_command) - ]; - } else { - $github_access_token = generate_github_installation_token($this->source); - return [ - $this->execute_in_builder("git clone -q -b {$this->application->git_branch} $source_html_url_scheme://x-access-token:$github_access_token@$source_html_url_host/{$this->application->git_repository}.git {$this->workdir}") - ]; - } - } - } - if ($this->application->deploymentType() === 'deploy_key') { - $private_key = base64_encode($this->application->private_key->private_key); - $git_clone_command = "GIT_SSH_COMMAND=\"ssh -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" {$git_clone_command} {$this->application->git_full_url} {$this->workdir}"; - $git_clone_command = $this->setGitImportSettings($git_clone_command); - return [ - $this->execute_in_builder("mkdir -p /root/.ssh"), - $this->execute_in_builder("echo '{$private_key}' | base64 -d > /root/.ssh/id_rsa"), - $this->execute_in_builder("chmod 600 /root/.ssh/id_rsa"), - $this->execute_in_builder($git_clone_command) - ]; - } - } - private function nixpacks_build_cmd() - { - $this->generate_env_variables(); - $nixpacks_command = "nixpacks build -o {$this->workdir} {$this->env_args} --no-error-without-start"; - if ($this->application->build_command) { - $nixpacks_command .= " --build-cmd \"{$this->application->build_command}\""; - } - if ($this->application->start_command) { - $nixpacks_command .= " --start-cmd \"{$this->application->start_command}\""; - } - if ($this->application->install_command) { - $nixpacks_command .= " --install-cmd \"{$this->application->install_command}\""; - } - $nixpacks_command .= " {$this->workdir}"; - return $this->execute_in_builder($nixpacks_command); - } -} diff --git a/app/Jobs/InstanceAutoUpdateJob.php b/app/Jobs/InstanceAutoUpdateJob.php new file mode 100644 index 000000000..c97b370b4 --- /dev/null +++ b/app/Jobs/InstanceAutoUpdateJob.php @@ -0,0 +1,73 @@ +firstOrFail(); + $latest_version = get_latest_version_of_coolify(); + $current_version = config('version'); + + if (config('app.env') === 'local') { + instant_remote_process([ + "sleep 10" + ], $server); + return; + } else { + if (!$this->force) { + $instance_settings = InstanceSettings::get(); + if (!$instance_settings->is_auto_update_enabled) { + $this->fail('Auto update is disabled'); + return; + } + if ($latest_version === $current_version) { + $this->fail("Already on latest version"); + return; + } + if (version_compare($latest_version, $current_version, '<')) { + $this->fail("Latest version is lower than current version?!"); + return; + } + } + instant_remote_process([ + "curl -fsSL https://coolify-cdn.b-cdn.net/files/upgrade.sh -o /data/coolify/source/upgrade.sh", + "bash /data/coolify/source/upgrade.sh $latest_version" + ], $server); + return; + } + } catch (\Exception $e) { + Log::error($e->getMessage()); + $this->fail($e->getMessage()); + return; + } + } +} diff --git a/app/Jobs/DockerCleanupDanglingImagesJob.php b/app/Jobs/InstanceDockerCleanupJob.php similarity index 80% rename from app/Jobs/DockerCleanupDanglingImagesJob.php rename to app/Jobs/InstanceDockerCleanupJob.php index 256016330..418ac6786 100644 --- a/app/Jobs/DockerCleanupDanglingImagesJob.php +++ b/app/Jobs/InstanceDockerCleanupJob.php @@ -4,17 +4,16 @@ use App\Models\Server; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Log; -class DockerCleanupDanglingImagesJob implements ShouldQueue +class InstanceDockerCleanupJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - + public $timeout = 500; /** * Create a new job instance. */ @@ -31,7 +30,7 @@ public function handle(): void try { $servers = Server::all(); foreach ($servers as $server) { - instantRemoteProcess(['docker image prune -f'], $server); + instant_remote_process(['docker image prune -f'], $server); } } catch (\Exception $e) { Log::error($e->getMessage()); diff --git a/app/Jobs/ProxyCheckJob.php b/app/Jobs/InstanceProxyCheckJob.php similarity index 82% rename from app/Jobs/ProxyCheckJob.php rename to app/Jobs/InstanceProxyCheckJob.php index 4c7ce12e6..1de91261b 100755 --- a/app/Jobs/ProxyCheckJob.php +++ b/app/Jobs/InstanceProxyCheckJob.php @@ -3,6 +3,7 @@ namespace App\Jobs; use App\Actions\Proxy\InstallProxy; +use App\Enums\ProxyTypes; use App\Models\Server; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; @@ -10,7 +11,7 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -class ProxyCheckJob implements ShouldQueue +class InstanceProxyCheckJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; @@ -29,10 +30,10 @@ public function handle() try { $container_name = 'coolify-proxy'; $configuration_path = config('coolify.proxy_config_path'); - $servers = Server::whereRelation('settings', 'is_validated', true)->get(); + $servers = Server::whereRelation('settings', 'is_validated', true)->where('extra_attributes->proxy_type', ProxyTypes::TRAEFIK_V2)->get(); foreach ($servers as $server) { - $status = checkContainerStatus(server: $server, container_id: $container_name); + $status = get_container_status(server: $server, container_id: $container_name); if ($status === 'running') { continue; } diff --git a/app/Models/Application.php b/app/Models/Application.php index 6170b670c..da41e4056 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -41,14 +41,6 @@ protected static function booted() 'private_key_id' ]; - public $casts = [ - 'previews' => SchemalessAttributes::class, - 'limits_memory_oom_kill' => 'boolean', - ]; - public function scopeWithExtraAttributes(): Builder - { - return $this->previews->modelScope(); - } public function publishDirectory(): Attribute { return Attribute::make( @@ -131,6 +123,10 @@ public function environment() { return $this->belongsTo(Environment::class); } + public function previews() + { + return $this->hasMany(ApplicationPreview::class); + } public function settings() { return $this->hasOne(ApplicationSetting::class); @@ -148,9 +144,15 @@ public function persistentStorages() return $this->morphMany(LocalPersistentVolume::class, 'resource'); } - public function deployments() + public function deployments(int $skip = 0, int $take = 10) { - return Activity::where('subject_id', $this->id)->where('properties->type', '=', 'deployment')->orderBy('created_at', 'desc')->get(); + $deployments = ApplicationDeploymentQueue::where('application_id', $this->id)->orderBy('created_at', 'desc'); + $count = $deployments->count(); + $deployments = $deployments->skip($skip)->take($take)->get(); + return [ + 'count' => $count, + 'deployments' => $deployments + ]; } public function get_deployment(string $deployment_uuid) { @@ -158,7 +160,14 @@ public function get_deployment(string $deployment_uuid) } public function isDeployable(): bool { - if ($this->settings->is_auto_deploy) { + if ($this->settings->is_auto_deploy_enabled) { + return true; + } + return false; + } + public function isPRDeployable(): bool + { + if ($this->settings->is_preview_deployments_enabled) { return true; } return false; diff --git a/app/Models/ApplicationDeploymentQueue.php b/app/Models/ApplicationDeploymentQueue.php new file mode 100644 index 000000000..474c38cc8 --- /dev/null +++ b/app/Models/ApplicationDeploymentQueue.php @@ -0,0 +1,20 @@ +belongsTo(Application::class); + } + static function findPreviewByApplicationAndPullId(int $application_id, int $pull_request_id) + { + return self::where('application_id', $application_id)->where('pull_request_id', $pull_request_id)->firstOrFail(); + } +} diff --git a/app/Models/ApplicationSetting.php b/app/Models/ApplicationSetting.php index b447cf948..3bdd6a7cd 100644 --- a/app/Models/ApplicationSetting.php +++ b/app/Models/ApplicationSetting.php @@ -7,21 +7,37 @@ class ApplicationSetting extends Model { + protected $cast = [ + 'is_static' => 'boolean', + 'is_auto_deploy_enabled' => 'boolean', + 'is_force_https_enabled' => 'boolean', + 'is_debug_enabled' => 'boolean', + 'is_preview_deployments_enabled' => 'boolean', + 'is_git_submodules_enabled' => 'boolean', + 'is_git_lfs_enabled' => 'boolean', + ]; protected $fillable = [ 'application_id', - 'is_git_submodules_allowed', - 'is_git_lfs_allowed', + 'is_static', + 'is_auto_deploy_enabled', + 'is_force_https_enabled', + 'is_debug_enabled', + 'is_preview_deployments_enabled', + 'is_git_submodules_enabled', + 'is_git_lfs_enabled', ]; public function isStatic(): Attribute { return Attribute::make( set: function ($value) { - if ($value) { - $this->application->ports_exposes = '80'; - } else { - $this->application->ports_exposes = '3000'; + if (is_null($this->application->ports_exposes)) { + if ($value) { + $this->application->ports_exposes = '80'; + } else { + $this->application->ports_exposes = '3000'; + } + $this->application->save(); } - $this->application->save(); return $value; } ); diff --git a/app/Models/Database.php b/app/Models/Database.php index bc1cb2a59..ab0476d27 100644 --- a/app/Models/Database.php +++ b/app/Models/Database.php @@ -12,8 +12,4 @@ public function destination() { return $this->morphTo(); } - public function deployments() - { - return $this->morphMany(Deployment::class, 'type'); - } } diff --git a/app/Models/Server.php b/app/Models/Server.php index d2afff3f5..9351becf7 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -28,6 +28,11 @@ protected static function booted() 'extra_attributes' => SchemalessAttributes::class, ]; + public function scopeWithExtraAttributes(): Builder + { + return $this->extra_attributes->modelScope(); + } + public function standaloneDockers() { return $this->hasMany(StandaloneDocker::class); @@ -38,10 +43,7 @@ public function swarmDockers() return $this->hasMany(SwarmDocker::class); } - public function scopeWithExtraAttributes(): Builder - { - return $this->extra_attributes->modelScope(); - } + public function privateKey() { diff --git a/app/Models/User.php b/app/Models/User.php index 3827bb5a0..c02ca47a0 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -12,38 +12,19 @@ class User extends Authenticatable { use HasApiTokens, HasFactory, Notifiable; - - /** - * The attributes that are mass assignable. - * - * @var array - */ protected $fillable = [ 'id', 'name', 'email', 'password', ]; - - /** - * The attributes that should be hidden for serialization. - * - * @var array - */ protected $hidden = [ 'password', 'remember_token', ]; - - /** - * The attributes that should be cast. - * - * @var array - */ protected $casts = [ 'email_verified_at' => 'datetime', ]; - protected static function boot() { parent::boot(); @@ -52,9 +33,15 @@ protected static function boot() $model->uuid = (string) new Cuid2(7); }); } - public function isRoot() + public function isPartOfRootTeam() { - return $this->id == 0; + $found_root_team = auth()->user()->teams->filter(function ($team) { + if ($team->id == 0) { + return true; + } + return false; + }); + return $found_root_team->count() > 0; } public function teams() { @@ -68,15 +55,14 @@ public function currentTeam() public function otherTeams() { - $team_id = data_get(session('currentTeam'), 'id'); - + $team_id = session('currentTeam')->id; return auth()->user()->teams->filter(function ($team) use ($team_id) { return $team->id != $team_id; }); } public function resources() { - $team_id = data_get(session('currentTeam'), 'id'); + $team_id = session('currentTeam')->id; $data = Application::where('team_id', $team_id)->get(); return $data; } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index be599237a..23061dde1 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,12 +2,8 @@ namespace App\Providers; -use App\Jobs\CoolifyTask; -use Illuminate\Queue\Events\JobProcessed; -use Illuminate\Support\Facades\Process; -use Illuminate\Support\Facades\Queue; +use Illuminate\Support\Facades\Http; use Illuminate\Support\ServiceProvider; -use Illuminate\Support\Str; class AppServiceProvider extends ServiceProvider { @@ -16,9 +12,6 @@ class AppServiceProvider extends ServiceProvider */ public function register(): void { - // if (config('app.env') === 'production' && Str::contains(config('version'), ['nightly'])) { - // Process::run('php artisan migrate:fresh --force --seed --seeder=ProductionSeeder'); - // } } /** @@ -26,10 +19,10 @@ public function register(): void */ public function boot(): void { - Queue::after(function (JobProcessed $event) { - // @TODO: Remove `coolify-builder` container after the remoteProcess job is finishged and remoteProcess->type == `deployment`. - if ($event->job->resolveName() === CoolifyTask::class) { - } + Http::macro('github', function (string $api_url) { + return Http::withHeaders([ + 'Accept' => 'application/vnd.github.v3+json' + ])->baseUrl($api_url); }); } } diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 2a8a22d18..570219cf5 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -55,6 +55,9 @@ public function boot(): void return $user; } }); + Fortify::requestPasswordResetLinkView(function () { + return view('auth.forgot-password'); + }); Fortify::createUsersUsing(CreateNewUser::class); Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class); Fortify::updateUserPasswordsUsing(UpdateUserPassword::class); diff --git a/bootstrap/helpers.php b/bootstrap/helpers.php deleted file mode 100644 index 9067a3dd4..000000000 --- a/bootstrap/helpers.php +++ /dev/null @@ -1,318 +0,0 @@ -errorInfo[0] === '23505') { - throw new \Exception('Duplicate entry found.', '23505'); - } else if (count($e->errorInfo) === 4) { - throw new \Exception($e->errorInfo[3]); - } else { - throw new \Exception($e->errorInfo[2]); - } - } else { - throw new \Exception($e->getMessage()); - } - } catch (\Throwable $error) { - if ($that) { - return $that->emit('error', $error->getMessage()); - } elseif ($isJson) { - return response()->json([ - 'code' => $error->getCode(), - 'error' => $error->getMessage(), - ]); - } else { - // dump($error); - } - } - } -} -if (!function_exists('remoteProcess')) { - /** - * Run a Remote Process, which SSH's asynchronously into a machine to run the command(s). - * @TODO Change 'root' to 'coolify' when it's able to run Docker commands without sudo - * - */ - function remoteProcess( - array $command, - Server $server, - string $type, - ?string $type_uuid = null, - ?Model $model = null, - ): Activity { - - $command_string = implode("\n", $command); - - // @TODO: Check if the user has access to this server - // checkTeam($server->team_id); - - $private_key_location = savePrivateKeyForServer($server); - - return resolve(PrepareCoolifyTask::class, [ - 'remoteProcessArgs' => new CoolifyTaskArgs( - server_ip: $server->ip, - private_key_location: $private_key_location, - command: <<port, - user: $server->user, - type: $type, - type_uuid: $type_uuid, - model: $model, - ), - ])(); - } -} - -// function checkTeam(string $team_id) -// { -// $found_team = auth()->user()->teams->pluck('id')->contains($team_id); -// if (!$found_team) { -// throw new \RuntimeException('You do not have access to this server.'); -// } -// } - -if (!function_exists('savePrivateKeyForServer')) { - function savePrivateKeyForServer(Server $server) - { - $temp_file = "id.root@{$server->ip}"; - Storage::disk('ssh-keys')->put($temp_file, $server->privateKey->private_key); - return '/var/www/html/storage/app/ssh-keys/' . $temp_file; - } -} - -if (!function_exists('generateSshCommand')) { - function generateSshCommand(string $private_key_location, string $server_ip, string $user, string $port, string $command, bool $isMux = true) - { - Storage::disk('local')->makeDirectory('.ssh'); - - $delimiter = 'EOF-COOLIFY-SSH'; - $ssh_command = "ssh "; - - if ($isMux && config('coolify.mux_enabled')) { - $ssh_command .= '-o ControlMaster=auto -o ControlPersist=1m -o ControlPath=/var/www/html/storage/app/.ssh/ssh_mux_%h_%p_%r '; - } - $ssh_command .= "-i {$private_key_location} " - . '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ' - . '-o PasswordAuthentication=no ' - . '-o ConnectTimeout=3600 ' - . '-o ServerAliveInterval=60 ' - . '-o RequestTTY=no ' - . '-o LogLevel=ERROR ' - . "-p {$port} " - . "{$user}@{$server_ip} " - . " 'bash -se' << \\$delimiter" . PHP_EOL - . $command . PHP_EOL - . $delimiter; - - return $ssh_command; - } -} -if (!function_exists('formatDockerCmdOutputToJson')) { - function formatDockerCmdOutputToJson($rawOutput): Collection - { - $outputLines = explode(PHP_EOL, $rawOutput); - - return collect($outputLines) - ->reject(fn ($line) => empty($line)) - ->map(fn ($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR)); - } -} -if (!function_exists('formatDockerLabelsToJson')) { - function formatDockerLabelsToJson($rawOutput): Collection - { - $outputLines = explode(PHP_EOL, $rawOutput); - - return collect($outputLines) - ->reject(fn ($line) => empty($line)) - ->map(function ($outputLine) { - $outputArray = explode(',', $outputLine); - return collect($outputArray) - ->map(function ($outputLine) { - return explode('=', $outputLine); - }) - ->mapWithKeys(function ($outputLine) { - return [$outputLine[0] => $outputLine[1]]; - }); - })[0]; - } -} -if (!function_exists('instantRemoteProcess')) { - function instantRemoteProcess(array $command, Server $server, $throwError = true) - { - $command_string = implode("\n", $command); - $private_key_location = savePrivateKeyForServer($server); - $ssh_command = generateSshCommand($private_key_location, $server->ip, $server->user, $server->port, $command_string); - $process = Process::run($ssh_command); - $output = trim($process->output()); - $exitCode = $process->exitCode(); - if ($exitCode !== 0) { - if (!$throwError) { - return null; - } - throw new \RuntimeException($process->errorOutput()); - } - return $output; - } -} - -if (!function_exists('getLatestVersionOfCoolify')) { - function getLatestVersionOfCoolify() - { - $response = Http::get('https://coolify-cdn.b-cdn.net/versions.json'); - $versions = $response->json(); - return data_get($versions, 'coolify.v4.version'); - } -} -if (!function_exists('generateRandomName')) { - function generateRandomName() - { - $generator = \Nubs\RandomNameGenerator\All::create(); - $cuid = new Cuid2(7); - return Str::kebab("{$generator->getName()}-{$cuid}"); - } -} - -use Lcobucci\JWT\Encoding\ChainedFormatter; -use Lcobucci\JWT\Encoding\JoseEncoder; -use Lcobucci\JWT\Signer\Key\InMemory; -use Lcobucci\JWT\Signer\Rsa\Sha256; -use Lcobucci\JWT\Token\Builder; -use Symfony\Component\Yaml\Yaml; - -if (!function_exists('generate_github_installation_token')) { - function generate_github_installation_token(GithubApp $source) - { - $signingKey = InMemory::plainText($source->privateKey->private_key); - $algorithm = new Sha256(); - $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); - $now = new DateTimeImmutable(); - $now = $now->setTime($now->format('H'), $now->format('i')); - $issuedToken = $tokenBuilder - ->issuedBy($source->app_id) - ->issuedAt($now) - ->expiresAt($now->modify('+10 minutes')) - ->getToken($algorithm, $signingKey) - ->toString(); - $token = Http::withHeaders([ - 'Authorization' => "Bearer $issuedToken", - 'Accept' => 'application/vnd.github.machine-man-preview+json' - ])->post("{$source->api_url}/app/installations/{$source->installation_id}/access_tokens"); - if ($token->failed()) { - throw new \Exception("Failed to get access token for " . $source->name . " with error: " . $token->json()['message']); - } - return $token->json()['token']; - } -} -if (!function_exists('generate_github_jwt_token')) { - function generate_github_jwt_token(GithubApp $source) - { - $signingKey = InMemory::plainText($source->privateKey->private_key); - $algorithm = new Sha256(); - $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); - $now = new DateTimeImmutable(); - $now = $now->setTime($now->format('H'), $now->format('i')); - $issuedToken = $tokenBuilder - ->issuedBy($source->app_id) - ->issuedAt($now->modify('-1 minute')) - ->expiresAt($now->modify('+10 minutes')) - ->getToken($algorithm, $signingKey) - ->toString(); - return $issuedToken; - } -} -if (!function_exists('getParameters')) { - function getParameters() - { - return Route::current()->parameters(); - } -} -if (!function_exists('checkContainerStatus')) { - function checkContainerStatus(Server $server, string $container_id, bool $throwError = false) - { - $container = instantRemoteProcess(["docker inspect --format '{{json .State}}' {$container_id}"], $server, $throwError); - if (!$container) { - return 'exited'; - } - $container = formatDockerCmdOutputToJson($container); - return $container[0]['Status']; - } -} -if (!function_exists('getProxyConfiguration')) { - function getProxyConfiguration(Server $server) - { - $proxy_config_path = config('coolify.proxy_config_path'); - $networks = collect($server->standaloneDockers)->map(function ($docker) { - return $docker['network']; - })->unique(); - if ($networks->count() === 0) { - $networks = collect(['coolify']); - } - $array_of_networks = collect([]); - $networks->map(function ($network) use ($array_of_networks) { - $array_of_networks[$network] = [ - "external" => true, - ]; - }); - return Yaml::dump([ - "version" => "3.8", - "networks" => $array_of_networks->toArray(), - "services" => [ - "traefik" => [ - "container_name" => "coolify-proxy", # Do not modify this! You will break everything! - "image" => "traefik:v2.10", - "restart" => "always", - "extra_hosts" => [ - "host.docker.internal:host-gateway", - ], - "networks" => $networks->toArray(), # Do not modify this! You will break everything! - "ports" => [ - "80:80", - "443:443", - "8080:8080", - ], - "volumes" => [ - "/var/run/docker.sock:/var/run/docker.sock:ro", - "{$proxy_config_path}/letsencrypt:/letsencrypt", # Do not modify this! You will break everything! - "{$proxy_config_path}/traefik.auth:/auth/traefik.auth", # Do not modify this! You will break everything! - ], - "command" => [ - "--api.dashboard=true", - "--api.insecure=true", - "--entrypoints.http.address=:80", - "--entrypoints.https.address=:443", - "--providers.docker=true", - "--providers.docker.exposedbydefault=false", - ], - "labels" => [ - "traefik.enable=true", # Do not modify this! You will break everything! - "traefik.http.routers.traefik.entrypoints=http", - 'traefik.http.routers.traefik.rule=Host(`${TRAEFIK_DASHBOARD_HOST}`)', - "traefik.http.routers.traefik.service=api@internal", - "traefik.http.services.traefik.loadbalancer.server.port=8080", - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https", - ], - ], - ], - ], 4, 2); - } -} diff --git a/bootstrap/helpers/applications.php b/bootstrap/helpers/applications.php new file mode 100644 index 000000000..3a1332e93 --- /dev/null +++ b/bootstrap/helpers/applications.php @@ -0,0 +1,51 @@ + $application_id, + 'deployment_uuid' => $deployment_uuid, + 'pull_request_id' => $pull_request_id, + 'force_rebuild' => $force_rebuild, + 'is_webhook' => $is_webhook, + 'commit' => $commit, + ]); + $queued_deployments = ApplicationDeploymentQueue::where('application_id', $application_id)->where('status', 'queued')->get()->sortByDesc('created_at'); + $running_deployments = ApplicationDeploymentQueue::where('application_id', $application_id)->where('status', 'in_progress')->get()->sortByDesc('created_at'); + ray('Q:' . $queued_deployments->count() . 'R:' . $running_deployments->count() . '| Queuing deployment: ' . $deployment_uuid . ' of applicationID: ' . $application_id . ' pull request: ' . $pull_request_id . ' with commit: ' . $commit . ' and is it forced: ' . $force_rebuild); + if ($queued_deployments->count() > 1) { + $queued_deployments = $queued_deployments->skip(1); + $queued_deployments->each(function ($queued_deployment, $key) { + $queued_deployment->status = 'cancelled by system'; + $queued_deployment->save(); + }); + } + if ($running_deployments->count() > 0) { + return; + } + dispatch(new ApplicationDeploymentJob( + application_deployment_queue_id: $deployment->id, + application_id: $application_id, + deployment_uuid: $deployment_uuid, + force_rebuild: $force_rebuild, + rollback_commit: $commit, + pull_request_id: $pull_request_id, + )); +} + +function queue_next_deployment(Application $application) +{ + $next_found = ApplicationDeploymentQueue::where('application_id', $application->id)->where('status', 'queued')->first(); + if ($next_found) { + dispatch(new ApplicationDeploymentJob( + application_deployment_queue_id: $next_found->id, + application_id: $next_found->application_id, + deployment_uuid: $next_found->deployment_uuid, + force_rebuild: $next_found->force_rebuild, + )); + } +} diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php new file mode 100644 index 000000000..0efd25c84 --- /dev/null +++ b/bootstrap/helpers/docker.php @@ -0,0 +1,49 @@ +reject(fn ($line) => empty($line)) + ->map(fn ($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR)); +} +function format_docker_labels_to_json($rawOutput): Collection +{ + $outputLines = explode(PHP_EOL, $rawOutput); + + return collect($outputLines) + ->reject(fn ($line) => empty($line)) + ->map(function ($outputLine) { + $outputArray = explode(',', $outputLine); + return collect($outputArray) + ->map(function ($outputLine) { + return explode('=', $outputLine); + }) + ->mapWithKeys(function ($outputLine) { + return [$outputLine[0] => $outputLine[1]]; + }); + })[0]; +} + +function get_container_status(Server $server, string $container_id, bool $throwError = false) +{ + $container = instant_remote_process(["docker inspect --format '{{json .State}}' {$container_id}"], $server, $throwError); + if (!$container) { + return 'exited'; + } + $container = format_docker_command_output_to_json($container); + return $container[0]['Status']; +} + +function generate_container_name(string $uuid, int|null $pull_request_id = null) +{ + if ($pull_request_id) { + return $uuid . '-pr-' . $pull_request_id; + } else { + return $uuid; + } +} diff --git a/bootstrap/helpers/github.php b/bootstrap/helpers/github.php new file mode 100644 index 000000000..9ede08f22 --- /dev/null +++ b/bootstrap/helpers/github.php @@ -0,0 +1,65 @@ +privateKey->private_key); + $algorithm = new Sha256(); + $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); + $now = new DateTimeImmutable(); + $now = $now->setTime($now->format('H'), $now->format('i')); + $issuedToken = $tokenBuilder + ->issuedBy($source->app_id) + ->issuedAt($now) + ->expiresAt($now->modify('+10 minutes')) + ->getToken($algorithm, $signingKey) + ->toString(); + $token = Http::withHeaders([ + 'Authorization' => "Bearer $issuedToken", + 'Accept' => 'application/vnd.github.machine-man-preview+json' + ])->post("{$source->api_url}/app/installations/{$source->installation_id}/access_tokens"); + if ($token->failed()) { + throw new \Exception("Failed to get access token for " . $source->name . " with error: " . $token->json()['message']); + } + return $token->json()['token']; +} +function generate_github_jwt_token(GithubApp $source) +{ + $signingKey = InMemory::plainText($source->privateKey->private_key); + $algorithm = new Sha256(); + $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); + $now = new DateTimeImmutable(); + $now = $now->setTime($now->format('H'), $now->format('i')); + $issuedToken = $tokenBuilder + ->issuedBy($source->app_id) + ->issuedAt($now->modify('-1 minute')) + ->expiresAt($now->modify('+10 minutes')) + ->getToken($algorithm, $signingKey) + ->toString(); + return $issuedToken; +} + +function get_from_git_api(GithubApp|GitlabApp $source, $endpoint) +{ + if ($source->getMorphClass() == 'App\Models\GithubApp') { + if ($source->is_public) { + $response = Http::github($source->api_url)->get($endpoint); + } + } + $json = $response->json(); + if ($response->status() !== 200) { + throw new \Exception("Failed to get data from {$source->name} with error: " . $json['message']); + } + return [ + 'rate_limit_remaining' => $response->header('X-RateLimit-Remaining'), + 'data' => collect($json) + ]; +} diff --git a/bootstrap/helpers/proxy.php b/bootstrap/helpers/proxy.php new file mode 100644 index 000000000..7290ac834 --- /dev/null +++ b/bootstrap/helpers/proxy.php @@ -0,0 +1,77 @@ +standaloneDockers)->map(function ($docker) { + return $docker['network']; + })->unique(); + if ($networks->count() === 0) { + $networks = collect(['coolify']); + } + $array_of_networks = collect([]); + $networks->map(function ($network) use ($array_of_networks) { + $array_of_networks[$network] = [ + "external" => true, + ]; + }); + $config = [ + "version" => "3.8", + "networks" => $array_of_networks->toArray(), + "services" => [ + "traefik" => [ + "container_name" => "coolify-proxy", + "image" => "traefik:v2.10", + "restart" => "always", + "extra_hosts" => [ + "host.docker.internal:host-gateway", + ], + "networks" => $networks->toArray(), + "ports" => [ + "80:80", + "443:443", + "8080:8080", + ], + "volumes" => [ + "/var/run/docker.sock:/var/run/docker.sock:ro", + "{$proxy_path}:/traefik", + ], + "command" => [ + "--api.dashboard=true", + "--api.insecure=true", + "--entrypoints.http.address=:80", + "--entrypoints.https.address=:443", + "--providers.docker=true", + "--providers.docker.exposedbydefault=false", + "--providers.file.directory=/traefik/dynamic/", + "--providers.file.watch=true", + "--certificatesresolvers.letsencrypt.acme.httpchallenge=true", + "--certificatesresolvers.letsencrypt.acme.storage=/traefik/acme.json", + "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=http", + ], + "labels" => [ + "traefik.enable=true", + "traefik.http.routers.traefik.entrypoints=http", + "traefik.http.routers.traefik.middlewares=traefik-basic-auth@file", + "traefik.http.routers.traefik.service=api@internal", + "traefik.http.services.traefik.loadbalancer.server.port=8080", + // Global Middlewares + "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https", + "traefik.http.middlewares.gzip.compress=true", + ], + ], + ], + ]; + if (config('app.env') === 'local') { + $config['services']['traefik']['command'][] = "--log.level=debug"; + } + return Yaml::dump($config, 4, 2); + } +} diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.php new file mode 100644 index 000000000..4b6fc9756 --- /dev/null +++ b/bootstrap/helpers/remoteProcess.php @@ -0,0 +1,101 @@ +value, + ?string $type_uuid = null, + ?Model $model = null, +): Activity { + + $command_string = implode("\n", $command); + + // @TODO: Check if the user has access to this server + // checkTeam($server->team_id); + + $private_key_location = save_private_key_for_server($server); + + return resolve(PrepareCoolifyTask::class, [ + 'remoteProcessArgs' => new CoolifyTaskArgs( + server_ip: $server->ip, + private_key_location: $private_key_location, + command: <<port, + user: $server->user, + type: $type, + type_uuid: $type_uuid, + model: $model, + ), + ])(); +} +function save_private_key_for_server(Server $server) +{ + $temp_file = "id.root@{$server->ip}"; + Storage::disk('ssh-keys')->put($temp_file, $server->privateKey->private_key); + Storage::disk('ssh-mux')->makeDirectory('.'); + return '/var/www/html/storage/app/ssh/keys/' . $temp_file; +} + +function generate_ssh_command(string $private_key_location, string $server_ip, string $user, string $port, string $command, bool $isMux = true) +{ + $delimiter = 'EOF-COOLIFY-SSH'; + $ssh_command = "ssh "; + + if ($isMux && config('coolify.mux_enabled')) { + $ssh_command .= '-o ControlMaster=auto -o ControlPersist=1m -o ControlPath=/var/www/html/storage/app/ssh/mux/%h_%p_%r '; + } + $ssh_command .= "-i {$private_key_location} " + . '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ' + . '-o PasswordAuthentication=no ' + . '-o ConnectTimeout=3600 ' + . '-o ServerAliveInterval=20 ' + . '-o RequestTTY=no ' + . '-o LogLevel=ERROR ' + . "-p {$port} " + . "{$user}@{$server_ip} " + . " 'bash -se' << \\$delimiter" . PHP_EOL + . $command . PHP_EOL + . $delimiter; + + return $ssh_command; +} + +function instant_remote_process(array $command, Server $server, $throwError = true, $repeat = 1) +{ + $command_string = implode("\n", $command); + $private_key_location = save_private_key_for_server($server); + $ssh_command = generate_ssh_command($private_key_location, $server->ip, $server->user, $server->port, $command_string); + $process = Process::run($ssh_command); + $output = trim($process->output()); + $exitCode = $process->exitCode(); + if ($exitCode !== 0) { + if ($repeat > 1) { + Sleep::for(200)->milliseconds(); + ray('executing again'); + return instant_remote_process($command, $server, $throwError, $repeat - 1); + } + ray($process->errorOutput()); + if (!$throwError) { + return null; + } + throw new \RuntimeException($process->errorOutput()); + } + return $output; +} diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php new file mode 100644 index 000000000..d3f017aa6 --- /dev/null +++ b/bootstrap/helpers/shared.php @@ -0,0 +1,60 @@ +getMessage()); + if ($e instanceof QueryException) { + if ($e->errorInfo[0] === '23505') { + throw new \Exception('Duplicate entry found.', '23505'); + } else if (count($e->errorInfo) === 4) { + throw new \Exception($e->errorInfo[3]); + } else { + throw new \Exception($e->errorInfo[2]); + } + } else { + throw new \Exception($e->getMessage()); + } + } catch (\Throwable $error) { + if ($that) { + return $that->emit('error', $error->getMessage()); + } elseif ($isJson) { + return response()->json([ + 'code' => $error->getCode(), + 'error' => $error->getMessage(), + ]); + } else { + ray($error); + } + } +} + +function get_parameters() +{ + return Route::current()->parameters(); +} + +function get_latest_version_of_coolify() +{ + $response = Http::get('https://coolify-cdn.b-cdn.net/versions.json'); + $versions = $response->json(); + return data_get($versions, 'coolify.v4.version'); +} + +function generate_random_name() +{ + $generator = \Nubs\RandomNameGenerator\All::create(); + $cuid = new Cuid2(7); + return Str::kebab("{$generator->getName()}-{$cuid}"); +} +function generate_application_name(string $git_repository, string $git_branch) +{ + $cuid = new Cuid2(7); + return Str::kebab("{$git_repository}:{$git_branch}-{$cuid}"); +} diff --git a/bootstrap/includeHelpers.php b/bootstrap/includeHelpers.php new file mode 100644 index 000000000..cc272b2c0 --- /dev/null +++ b/bootstrap/includeHelpers.php @@ -0,0 +1,5 @@ +=5.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "Clue\\StreamFilter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "A simple and modern approach to stream filtering in PHP", + "homepage": "https://github.com/clue/php-stream-filter", + "keywords": [ + "bucket brigade", + "callback", + "filter", + "php_user_filter", + "stream", + "stream_filter_append", + "stream_filter_register" + ], + "support": { + "issues": "https://github.com/clue/stream-filter/issues", + "source": "https://github.com/clue/stream-filter/tree/v1.6.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-02-21T13:15:14+00:00" + }, { "name": "dasprid/enum", "version": "1.0.4", @@ -1010,21 +1076,21 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.5.1", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9" + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", + "guzzlehttp/promises": "^1.5.3 || ^2.0", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", @@ -1036,7 +1102,8 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -1050,9 +1117,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { @@ -1118,7 +1182,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.1" + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" }, "funding": [ { @@ -1134,38 +1198,37 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:30:08+00:00" + "time": "2023-05-21T14:04:53+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -1202,7 +1265,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/2.0.0" }, "funding": [ { @@ -1218,7 +1281,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2023-05-21T13:50:22+00:00" }, { "name": "guzzlehttp/psr7", @@ -1420,6 +1483,123 @@ ], "time": "2021-10-07T12:57:01+00:00" }, + { + "name": "http-interop/http-factory-guzzle", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/http-interop/http-factory-guzzle.git", + "reference": "8f06e92b95405216b237521cc64c804dd44c4a81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/http-interop/http-factory-guzzle/zipball/8f06e92b95405216b237521cc64c804dd44c4a81", + "reference": "8f06e92b95405216b237521cc64c804dd44c4a81", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1.7||^2.0", + "php": ">=7.3", + "psr/http-factory": "^1.0" + }, + "provide": { + "psr/http-factory-implementation": "^1.0" + }, + "require-dev": { + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "guzzlehttp/psr7": "Includes an HTTP factory starting in version 2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Http\\Factory\\Guzzle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "An HTTP Factory using Guzzle PSR7", + "keywords": [ + "factory", + "http", + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/http-interop/http-factory-guzzle/issues", + "source": "https://github.com/http-interop/http-factory-guzzle/tree/1.2.0" + }, + "time": "2021-07-21T13:50:14+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A library to get pretty versions strings of installed dependencies", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" + }, + "time": "2021-10-08T21:21:46+00:00" + }, { "name": "laravel/fortify", "version": "v1.17.2", @@ -1486,16 +1666,16 @@ }, { "name": "laravel/framework", - "version": "v10.10.0", + "version": "v10.12.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "0da22a8d179f79b49d4e71f4822f759651f35012" + "reference": "9e6dcff23ab1d4b522bef56074c31625cf077576" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/0da22a8d179f79b49d4e71f4822f759651f35012", - "reference": "0da22a8d179f79b49d4e71f4822f759651f35012", + "url": "https://api.github.com/repos/laravel/framework/zipball/9e6dcff23ab1d4b522bef56074c31625cf077576", + "reference": "9e6dcff23ab1d4b522bef56074c31625cf077576", "shasum": "" }, "require": { @@ -1682,20 +1862,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-05-09T13:08:05+00:00" + "time": "2023-05-23T18:04:16+00:00" }, { "name": "laravel/horizon", - "version": "v5.15.1", + "version": "v5.16.0", "source": { "type": "git", "url": "https://github.com/laravel/horizon.git", - "reference": "952c2a0caa79b3fdc513e8db668029004f3a0f35" + "reference": "4f762b1bd47b51f0557da84873a208410de9eece" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/horizon/zipball/952c2a0caa79b3fdc513e8db668029004f3a0f35", - "reference": "952c2a0caa79b3fdc513e8db668029004f3a0f35", + "url": "https://api.github.com/repos/laravel/horizon/zipball/4f762b1bd47b51f0557da84873a208410de9eece", + "reference": "4f762b1bd47b51f0557da84873a208410de9eece", "shasum": "" }, "require": { @@ -1758,9 +1938,9 @@ ], "support": { "issues": "https://github.com/laravel/horizon/issues", - "source": "https://github.com/laravel/horizon/tree/v5.15.1" + "source": "https://github.com/laravel/horizon/tree/v5.16.0" }, - "time": "2023-04-26T16:00:44+00:00" + "time": "2023-05-18T14:11:32+00:00" }, { "name": "laravel/sanctum", @@ -1958,16 +2138,16 @@ }, { "name": "laravel/ui", - "version": "v4.2.1", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907" + "reference": "a58ec468db4a340b33f3426c778784717a2c144b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/05ff7ac1eb55e2dfd10edcfb18c953684d693907", - "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907", + "url": "https://api.github.com/repos/laravel/ui/zipball/a58ec468db4a340b33f3426c778784717a2c144b", + "reference": "a58ec468db4a340b33f3426c778784717a2c144b", "shasum": "" }, "require": { @@ -2014,9 +2194,9 @@ "ui" ], "support": { - "source": "https://github.com/laravel/ui/tree/v4.2.1" + "source": "https://github.com/laravel/ui/tree/v4.2.2" }, - "time": "2023-02-17T09:17:24+00:00" + "time": "2023-05-09T19:47:28+00:00" }, { "name": "lcobucci/jwt", @@ -2912,16 +3092,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.4", + "version": "v4.15.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", "shasum": "" }, "require": { @@ -2962,9 +3142,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" }, - "time": "2023-03-05T19:49:14+00:00" + "time": "2023-05-19T20:20:00+00:00" }, { "name": "nubs/random-name-generator", @@ -3105,6 +3285,84 @@ ], "time": "2023-02-08T01:06:31+00:00" }, + { + "name": "nyholm/psr7", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/Nyholm/psr7.git", + "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/3cb4d163b58589e47b35103e8e5e6a6a475b47be", + "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0", + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "http-interop/http-factory-tests": "^0.9", + "php-http/message-factory": "^1.0", + "php-http/psr7-integration-tests": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", + "symfony/error-handler": "^4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Nyholm\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" + }, + { + "name": "Martijn van der Ven", + "email": "martijn@vanderven.se" + } + ], + "description": "A fast PHP7 implementation of PSR-7", + "homepage": "https://tnyholm.se", + "keywords": [ + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/Nyholm/psr7/issues", + "source": "https://github.com/Nyholm/psr7/tree/1.8.0" + }, + "funding": [ + { + "url": "https://github.com/Zegnat", + "type": "github" + }, + { + "url": "https://github.com/nyholm", + "type": "github" + } + ], + "time": "2023-05-02T11:26:24+00:00" + }, { "name": "paragonie/constant_time_encoding", "version": "v2.6.3", @@ -3172,6 +3430,391 @@ }, "time": "2022-06-14T06:56:20+00:00" }, + { + "name": "php-http/client-common", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/client-common.git", + "reference": "880509727a447474d2a71b7d7fa5d268ddd3db4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/client-common/zipball/880509727a447474d2a71b7d7fa5d268ddd3db4b", + "reference": "880509727a447474d2a71b7d7fa5d268ddd3db4b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/httplug": "^2.0", + "php-http/message": "^1.6", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0 || ^2.0", + "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.17" + }, + "require-dev": { + "doctrine/instantiator": "^1.1", + "guzzlehttp/psr7": "^1.4", + "nyholm/psr7": "^1.2", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", + "phpspec/prophecy": "^1.10.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.33 || ^9.6.7" + }, + "suggest": { + "ext-json": "To detect JSON responses with the ContentTypePlugin", + "ext-libxml": "To detect XML responses with the ContentTypePlugin", + "php-http/cache-plugin": "PSR-6 Cache plugin", + "php-http/logger-plugin": "PSR-3 Logger plugin", + "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" + }, + "type": "library", + "autoload": { + "psr-4": { + "Http\\Client\\Common\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Common HTTP Client implementations and tools for HTTPlug", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "common", + "http", + "httplug" + ], + "support": { + "issues": "https://github.com/php-http/client-common/issues", + "source": "https://github.com/php-http/client-common/tree/2.7.0" + }, + "time": "2023-05-17T06:46:59+00:00" + }, + { + "name": "php-http/discovery", + "version": "1.18.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "f258b3a1d16acb7b21f3b42d7a2494a733365237" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/f258b3a1d16acb7b21f3b42d7a2494a733365237", + "reference": "f258b3a1d16acb7b21f3b42d7a2494a733365237", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": "^7.1 || ^8.0" + }, + "conflict": { + "nyholm/psr7": "<1.0", + "zendframework/zend-diactoros": "*" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", + "psr/http-message-implementation": "*" + }, + "require-dev": { + "composer/composer": "^1.0.2|^2.0", + "graham-campbell/phpspec-skip-example-extension": "^5.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", + "symfony/phpunit-bridge": "^6.2" + }, + "type": "composer-plugin", + "extra": { + "class": "Http\\Discovery\\Composer\\Plugin", + "plugin-optional": true + }, + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + }, + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", + "homepage": "http://php-http.org", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr17", + "psr7" + ], + "support": { + "issues": "https://github.com/php-http/discovery/issues", + "source": "https://github.com/php-http/discovery/tree/1.18.1" + }, + "time": "2023-05-17T08:53:10+00:00" + }, + { + "name": "php-http/httplug", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/httplug.git", + "reference": "625ad742c360c8ac580fcc647a1541d29e257f67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/httplug/zipball/625ad742c360c8ac580fcc647a1541d29e257f67", + "reference": "625ad742c360c8ac580fcc647a1541d29e257f67", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/promise": "^1.1", + "psr/http-client": "^1.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "require-dev": { + "friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0", + "phpspec/phpspec": "^5.1 || ^6.0 || ^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eric GELOEN", + "email": "geloen.eric@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "HTTPlug, the HTTP client abstraction for PHP", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http" + ], + "support": { + "issues": "https://github.com/php-http/httplug/issues", + "source": "https://github.com/php-http/httplug/tree/2.4.0" + }, + "time": "2023-04-14T15:10:03+00:00" + }, + { + "name": "php-http/message", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/message.git", + "reference": "47a14338bf4ebd67d317bf1144253d7db4ab55fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message/zipball/47a14338bf4ebd67d317bf1144253d7db4ab55fd", + "reference": "47a14338bf4ebd67d317bf1144253d7db4ab55fd", + "shasum": "" + }, + "require": { + "clue/stream-filter": "^1.5", + "php": "^7.2 || ^8.0", + "psr/http-message": "^1.1 || ^2.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.6", + "ext-zlib": "*", + "guzzlehttp/psr7": "^1.0 || ^2.0", + "laminas/laminas-diactoros": "^2.0 || ^3.0", + "php-http/message-factory": "^1.0.2", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", + "slim/slim": "^3.0" + }, + "suggest": { + "ext-zlib": "Used with compressor/decompressor streams", + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", + "laminas/laminas-diactoros": "Used with Diactoros Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation" + }, + "type": "library", + "autoload": { + "files": [ + "src/filters.php" + ], + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTP Message related tools", + "homepage": "http://php-http.org", + "keywords": [ + "http", + "message", + "psr-7" + ], + "support": { + "issues": "https://github.com/php-http/message/issues", + "source": "https://github.com/php-http/message/tree/1.16.0" + }, + "time": "2023-05-17T06:43:38+00:00" + }, + { + "name": "php-http/message-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/message-factory.git", + "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57", + "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Factory interfaces for PSR-7 HTTP Message", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "stream", + "uri" + ], + "support": { + "issues": "https://github.com/php-http/message-factory/issues", + "source": "https://github.com/php-http/message-factory/tree/1.1.0" + }, + "abandoned": "psr/http-factory", + "time": "2023-04-14T14:16:17+00:00" + }, + { + "name": "php-http/promise", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/promise.git", + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", + "phpspec/phpspec": "^5.1.2 || ^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Promise used for asynchronous HTTP requests", + "homepage": "http://httplug.io", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/php-http/promise/issues", + "source": "https://github.com/php-http/promise/tree/1.1.0" + }, + "time": "2020-07-07T09:29:14+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -3360,22 +4003,23 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.20.4", + "version": "1.21.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd" + "reference": "6df62b08faef4f899772bc7c3bbabb93d2b7a21c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", - "reference": "7d568c87a9df9c5f7e8b5f075fc469aa8cb0a4cd", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6df62b08faef4f899772bc7c3bbabb93d2b7a21c", + "reference": "6df62b08faef4f899772bc7c3bbabb93d2b7a21c", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", @@ -3399,9 +4043,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.4" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.21.0" }, - "time": "2023-05-02T09:19:37+00:00" + "time": "2023-05-17T13:13:44+00:00" }, { "name": "pimple/pimple", @@ -3971,16 +4615,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.17", + "version": "v0.11.18", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "3dc5d4018dabd80bceb8fe1e3191ba8460569f0a" + "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/3dc5d4018dabd80bceb8fe1e3191ba8460569f0a", - "reference": "3dc5d4018dabd80bceb8fe1e3191ba8460569f0a", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", + "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", "shasum": "" }, "require": { @@ -4041,9 +4685,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.17" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.18" }, - "time": "2023-05-05T20:02:42+00:00" + "time": "2023-05-23T02:31:11+00:00" }, { "name": "ralouphie/getallheaders", @@ -4270,6 +4914,258 @@ ], "time": "2023-04-15T23:01:58+00:00" }, + { + "name": "sentry/sdk", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/getsentry/sentry-php-sdk.git", + "reference": "7f1e04a5380a91e41a1a68c363ec19f88619a870" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getsentry/sentry-php-sdk/zipball/7f1e04a5380a91e41a1a68c363ec19f88619a870", + "reference": "7f1e04a5380a91e41a1a68c363ec19f88619a870", + "shasum": "" + }, + "require": { + "http-interop/http-factory-guzzle": "^1.0", + "sentry/sentry": "^3.18", + "symfony/http-client": "^4.3|^5.0|^6.0" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sentry", + "email": "accounts@sentry.io" + } + ], + "description": "This is a metapackage shipping sentry/sentry with a recommended HTTP client.", + "homepage": "http://sentry.io", + "keywords": [ + "crash-reporting", + "crash-reports", + "error-handler", + "error-monitoring", + "log", + "logging", + "sentry" + ], + "support": { + "issues": "https://github.com/getsentry/sentry-php-sdk/issues", + "source": "https://github.com/getsentry/sentry-php-sdk/tree/3.4.0" + }, + "funding": [ + { + "url": "https://sentry.io/", + "type": "custom" + }, + { + "url": "https://sentry.io/pricing/", + "type": "custom" + } + ], + "time": "2023-05-22T16:02:39+00:00" + }, + { + "name": "sentry/sentry", + "version": "3.19.1", + "source": { + "type": "git", + "url": "https://github.com/getsentry/sentry-php.git", + "reference": "dd1057fb37d4484ebb2d1bc9b05fa5969c078436" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/dd1057fb37d4484ebb2d1bc9b05fa5969c078436", + "reference": "dd1057fb37d4484ebb2d1bc9b05fa5969c078436", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/promises": "^1.5.3|^2.0", + "jean85/pretty-package-versions": "^1.5|^2.0.4", + "php": "^7.2|^8.0", + "php-http/async-client-implementation": "^1.0", + "php-http/client-common": "^1.5|^2.0", + "php-http/discovery": "^1.15", + "php-http/httplug": "^1.1|^2.0", + "php-http/message": "^1.5", + "php-http/message-factory": "^1.1", + "psr/http-factory": "^1.0", + "psr/http-factory-implementation": "^1.0", + "psr/log": "^1.0|^2.0|^3.0", + "symfony/options-resolver": "^3.4.43|^4.4.30|^5.0.11|^6.0", + "symfony/polyfill-php80": "^1.17" + }, + "conflict": { + "php-http/client-common": "1.8.0", + "raven/raven": "*" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19|3.4.*", + "guzzlehttp/psr7": "^1.8.4|^2.1.1", + "http-interop/http-factory-guzzle": "^1.0", + "monolog/monolog": "^1.6|^2.0|^3.0", + "nikic/php-parser": "^4.10.3", + "php-http/mock-client": "^1.3", + "phpbench/phpbench": "^1.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5.14|^9.4", + "symfony/phpunit-bridge": "^5.2|^6.0", + "vimeo/psalm": "^4.17" + }, + "suggest": { + "monolog/monolog": "Allow sending log messages to Sentry by using the included Monolog handler." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.13.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Sentry\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sentry", + "email": "accounts@sentry.io" + } + ], + "description": "A PHP SDK for Sentry (http://sentry.io)", + "homepage": "http://sentry.io", + "keywords": [ + "crash-reporting", + "crash-reports", + "error-handler", + "error-monitoring", + "log", + "logging", + "sentry" + ], + "support": { + "issues": "https://github.com/getsentry/sentry-php/issues", + "source": "https://github.com/getsentry/sentry-php/tree/3.19.1" + }, + "funding": [ + { + "url": "https://sentry.io/", + "type": "custom" + }, + { + "url": "https://sentry.io/pricing/", + "type": "custom" + } + ], + "time": "2023-05-25T06:19:09+00:00" + }, + { + "name": "sentry/sentry-laravel", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/getsentry/sentry-laravel.git", + "reference": "50ec5eae5d09d182d2d048981d0b45c24579a7f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/50ec5eae5d09d182d2d048981d0b45c24579a7f7", + "reference": "50ec5eae5d09d182d2d048981d0b45c24579a7f7", + "shasum": "" + }, + "require": { + "illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0", + "nyholm/psr7": "^1.0", + "php": "^7.2 | ^8.0", + "sentry/sdk": "^3.3", + "sentry/sentry": "^3.16", + "symfony/psr-http-message-bridge": "^1.0 | ^2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.11", + "laravel/framework": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0", + "mockery/mockery": "^1.3", + "orchestra/testbench": "^4.7 | ^5.1 | ^6.0 | ^7.0 | ^8.0", + "phpunit/phpunit": "^8.4 | ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev", + "dev-0.x": "0.x-dev" + }, + "laravel": { + "providers": [ + "Sentry\\Laravel\\ServiceProvider", + "Sentry\\Laravel\\Tracing\\ServiceProvider" + ], + "aliases": { + "Sentry": "Sentry\\Laravel\\Facade" + } + } + }, + "autoload": { + "psr-0": { + "Sentry\\Laravel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sentry", + "email": "accounts@sentry.io" + } + ], + "description": "Laravel SDK for Sentry (https://sentry.io)", + "homepage": "https://sentry.io", + "keywords": [ + "crash-reporting", + "crash-reports", + "error-handler", + "error-monitoring", + "laravel", + "log", + "logging", + "sentry" + ], + "support": { + "issues": "https://github.com/getsentry/sentry-laravel/issues", + "source": "https://github.com/getsentry/sentry-laravel/tree/3.4.0" + }, + "funding": [ + { + "url": "https://sentry.io/", + "type": "custom" + }, + { + "url": "https://sentry.io/pricing/", + "type": "custom" + } + ], + "time": "2023-05-08T14:15:56+00:00" + }, { "name": "spatie/backtrace", "version": "1.4.0", @@ -4425,16 +5321,16 @@ }, { "name": "spatie/laravel-data", - "version": "3.5.0", + "version": "3.5.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-data.git", - "reference": "4c3c31d7d9a515125bfa219099c4df563e4422a8" + "reference": "2ca317a41b52df78c48602f227da383ff8683b21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-data/zipball/4c3c31d7d9a515125bfa219099c4df563e4422a8", - "reference": "4c3c31d7d9a515125bfa219099c4df563e4422a8", + "url": "https://api.github.com/repos/spatie/laravel-data/zipball/2ca317a41b52df78c48602f227da383ff8683b21", + "reference": "2ca317a41b52df78c48602f227da383ff8683b21", "shasum": "" }, "require": { @@ -4496,7 +5392,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-data/issues", - "source": "https://github.com/spatie/laravel-data/tree/3.5.0" + "source": "https://github.com/spatie/laravel-data/tree/3.5.1" }, "funding": [ { @@ -4504,7 +5400,7 @@ "type": "github" } ], - "time": "2023-05-05T15:24:41+00:00" + "time": "2023-05-12T12:12:37+00:00" }, { "name": "spatie/laravel-package-tools", @@ -4779,16 +5675,16 @@ }, { "name": "spatie/ray", - "version": "1.37.1", + "version": "1.37.2", "source": { "type": "git", "url": "https://github.com/spatie/ray.git", - "reference": "a915e327f04c0fbed3bdd26e076e39feea091062" + "reference": "dea16182d4bc9d9833adec7e39fbb3d7b553425d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ray/zipball/a915e327f04c0fbed3bdd26e076e39feea091062", - "reference": "a915e327f04c0fbed3bdd26e076e39feea091062", + "url": "https://api.github.com/repos/spatie/ray/zipball/dea16182d4bc9d9833adec7e39fbb3d7b553425d", + "reference": "dea16182d4bc9d9833adec7e39fbb3d7b553425d", "shasum": "" }, "require": { @@ -4839,7 +5735,7 @@ ], "support": { "issues": "https://github.com/spatie/ray/issues", - "source": "https://github.com/spatie/ray/tree/1.37.1" + "source": "https://github.com/spatie/ray/tree/1.37.2" }, "funding": [ { @@ -4851,7 +5747,7 @@ "type": "other" } ], - "time": "2023-03-06T07:22:28+00:00" + "time": "2023-05-17T06:35:47+00:00" }, { "name": "spatie/url", @@ -5440,6 +6336,175 @@ ], "time": "2023-02-16T09:57:23+00:00" }, + { + "name": "symfony/http-client", + "version": "v6.2.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client.git", + "reference": "3f5545a91c8e79dedd1a06c4b04e1682c80c42f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client/zipball/3f5545a91c8e79dedd1a06c4b04e1682c80c42f9", + "reference": "3f5545a91c8e79dedd1a06c4b04e1682c80c42f9", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/http-client-contracts": "^3", + "symfony/service-contracts": "^1.0|^2|^3" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "3.0" + }, + "require-dev": { + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", + "amphp/http-tunnel": "^1.0", + "amphp/socket": "^1.1", + "guzzlehttp/promises": "^1.4", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", + "homepage": "https://symfony.com", + "keywords": [ + "http" + ], + "support": { + "source": "https://github.com/symfony/http-client/tree/v6.2.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-20T13:12:48+00:00" + }, + { + "name": "symfony/http-client-contracts", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/df2ecd6cb70e73c1080e6478aea85f5f4da2c48b", + "reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "suggest": { + "symfony/http-client-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.3-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to HTTP clients", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/http-client-contracts/tree/v3.2.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-01T10:32:47+00:00" + }, { "name": "symfony/http-foundation", "version": "v6.2.10", @@ -5791,6 +6856,73 @@ ], "time": "2023-04-19T09:54:16+00:00" }, + { + "name": "symfony/options-resolver", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/aa0e85b53bbb2b4951960efd61d295907eacd629", + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T08:44:56+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.27.0", @@ -6593,6 +7725,94 @@ ], "time": "2023-04-18T13:56:57+00:00" }, + { + "name": "symfony/psr-http-message-bridge", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "28a732c05bbad801304ad5a5c674cf2970508993" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993", + "reference": "28a732c05bbad801304ad5a5c674cf2970508993", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0", + "symfony/http-foundation": "^5.4 || ^6.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "psr/log": "^1.1 || ^2 || ^3", + "symfony/browser-kit": "^5.4 || ^6.0", + "symfony/config": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/framework-bundle": "^5.4 || ^6.0", + "symfony/http-kernel": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^6.2" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-main": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/symfony/psr-http-message-bridge/issues", + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-21T08:40:19+00:00" + }, { "name": "symfony/routing", "version": "v6.2.8", @@ -7866,6 +9086,152 @@ } ], "packages-dev": [ + { + "name": "barryvdh/laravel-ide-helper", + "version": "v2.13.0", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-ide-helper.git", + "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/81d5b223ff067a1f38e14c100997e153b837fe4a", + "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a", + "shasum": "" + }, + "require": { + "barryvdh/reflection-docblock": "^2.0.6", + "composer/class-map-generator": "^1.0", + "doctrine/dbal": "^2.6 || ^3", + "ext-json": "*", + "illuminate/console": "^8 || ^9 || ^10", + "illuminate/filesystem": "^8 || ^9 || ^10", + "illuminate/support": "^8 || ^9 || ^10", + "nikic/php-parser": "^4.7", + "php": "^7.3 || ^8.0", + "phpdocumentor/type-resolver": "^1.1.0" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "friendsofphp/php-cs-fixer": "^2", + "illuminate/config": "^8 || ^9 || ^10", + "illuminate/view": "^8 || ^9 || ^10", + "mockery/mockery": "^1.4", + "orchestra/testbench": "^6 || ^7 || ^8", + "phpunit/phpunit": "^8.5 || ^9", + "spatie/phpunit-snapshot-assertions": "^3 || ^4", + "vimeo/psalm": "^3.12" + }, + "suggest": { + "illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9|^10)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.12-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\LaravelIdeHelper\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", + "keywords": [ + "autocomplete", + "codeintel", + "helper", + "ide", + "laravel", + "netbeans", + "phpdoc", + "phpstorm", + "sublime" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", + "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.13.0" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2023-02-04T13:56:40+00:00" + }, + { + "name": "barryvdh/reflection-docblock", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/ReflectionDocBlock.git", + "reference": "bf44b757feb8ba1734659029357646466ded673e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/bf44b757feb8ba1734659029357646466ded673e", + "reference": "bf44b757feb8ba1734659029357646466ded673e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.14|^9" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Barryvdh": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "support": { + "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.1.0" + }, + "time": "2022-10-31T15:35:43+00:00" + }, { "name": "brianium/paratest", "version": "v7.1.4", @@ -7962,17 +9328,161 @@ "time": "2023-05-05T09:09:30+00:00" }, { - "name": "fakerphp/faker", - "version": "v1.21.0", + "name": "composer/class-map-generator", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/FakerPHP/Faker.git", - "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" + "url": "https://github.com/composer/class-map-generator.git", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", - "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "shasum": "" + }, + "require": { + "composer/pcre": "^2 || ^3", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-06-19T11:31:27+00:00" + }, + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "fakerphp/faker", + "version": "v1.22.0", + "source": { + "type": "git", + "url": "https://github.com/FakerPHP/Faker.git", + "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/f85772abd508bd04e20bb4b1bbe260a68d0066d2", + "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2", "shasum": "" }, "require": { @@ -8025,9 +9535,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.22.0" }, - "time": "2022-12-13T13:54:32+00:00" + "time": "2023-05-14T12:31:37+00:00" }, { "name": "fidry/cpu-core-counter", @@ -8212,65 +9722,6 @@ }, "time": "2020-07-09T08:09:16+00:00" }, - { - "name": "jean85/pretty-package-versions", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", - "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2.0.0", - "php": "^7.1|^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.17", - "jean85/composer-provided-replaced-stub-package": "^1.0", - "phpstan/phpstan": "^0.12.66", - "phpunit/phpunit": "^7.5|^8.5|^9.4", - "vimeo/psalm": "^4.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jean85\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alessandro Lai", - "email": "alessandro.lai85@gmail.com" - } - ], - "description": "A library to get pretty versions strings of installed dependencies", - "keywords": [ - "composer", - "package", - "release", - "versions" - ], - "support": { - "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" - }, - "time": "2021-10-08T21:21:46+00:00" - }, { "name": "laravel/dusk", "version": "v7.7.1", @@ -8639,113 +10090,35 @@ ], "time": "2023-04-22T22:12:40+00:00" }, - { - "name": "nyholm/psr7", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/Nyholm/psr7.git", - "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/3cb4d163b58589e47b35103e8e5e6a6a475b47be", - "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0" - }, - "provide": { - "php-http/message-factory-implementation": "1.0", - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "http-interop/http-factory-tests": "^0.9", - "php-http/message-factory": "^1.0", - "php-http/psr7-integration-tests": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", - "symfony/error-handler": "^4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Nyholm\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com" - }, - { - "name": "Martijn van der Ven", - "email": "martijn@vanderven.se" - } - ], - "description": "A fast PHP7 implementation of PSR-7", - "homepage": "https://tnyholm.se", - "keywords": [ - "psr-17", - "psr-7" - ], - "support": { - "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.8.0" - }, - "funding": [ - { - "url": "https://github.com/Zegnat", - "type": "github" - }, - { - "url": "https://github.com/nyholm", - "type": "github" - } - ], - "time": "2023-05-02T11:26:24+00:00" - }, { "name": "pestphp/pest", - "version": "v2.6.0", + "version": "v2.6.1", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "a34767fa15abd098c763db605fd0fc72665b7f69" + "reference": "faafedd55ca4479b0634f85cc1a68bf5af44764e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/a34767fa15abd098c763db605fd0fc72665b7f69", - "reference": "a34767fa15abd098c763db605fd0fc72665b7f69", + "url": "https://api.github.com/repos/pestphp/pest/zipball/faafedd55ca4479b0634f85cc1a68bf5af44764e", + "reference": "faafedd55ca4479b0634f85cc1a68bf5af44764e", "shasum": "" }, "require": { - "brianium/paratest": "^7.1.3", + "brianium/paratest": "^7.1.4", "nunomaduro/collision": "^7.5.2", "nunomaduro/termwind": "^1.15.1", "pestphp/pest-plugin": "^2.0.1", "pestphp/pest-plugin-arch": "^2.1.2", "php": "^8.1.0", - "phpunit/phpunit": "^10.1.2" + "phpunit/phpunit": "^10.1.3" }, "conflict": { - "phpunit/phpunit": ">10.1.2", + "phpunit/phpunit": ">10.1.3", "webmozart/assert": "<1.11.0" }, "require-dev": { - "pestphp/pest-dev-tools": "^2.8.0", + "pestphp/pest-dev-tools": "^2.9.0", "symfony/process": "^6.2.10" }, "bin": [ @@ -8802,7 +10175,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.6.0" + "source": "https://github.com/pestphp/pest/tree/v2.6.1" }, "funding": [ { @@ -8814,7 +10187,7 @@ "type": "github" } ], - "time": "2023-05-01T23:51:14+00:00" + "time": "2023-05-12T08:22:02+00:00" }, { "name": "pestphp/pest-plugin", @@ -9185,16 +10558,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.1", + "version": "10.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "884a0da7f9f46f28b2cb69134217fd810b793974" + "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/884a0da7f9f46f28b2cb69134217fd810b793974", - "reference": "884a0da7f9f46f28b2cb69134217fd810b793974", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/db1497ec8dd382e82c962f7abbe0320e4882ee4e", + "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e", "shasum": "" }, "require": { @@ -9251,7 +10624,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.1" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.2" }, "funding": [ { @@ -9259,7 +10632,7 @@ "type": "github" } ], - "time": "2023-04-17T12:15:40+00:00" + "time": "2023-05-22T09:04:27+00:00" }, { "name": "phpunit/php-file-iterator", @@ -9505,16 +10878,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.1.2", + "version": "10.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b" + "reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6f0cd95be71add539f8fd2be25b2a4a29789000b", - "reference": "6f0cd95be71add539f8fd2be25b2a4a29789000b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2379ebafc1737e71cdc84f402acb6b7f04198b9d", + "reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d", "shasum": "" }, "require": { @@ -9586,7 +10959,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.3" }, "funding": [ { @@ -9602,7 +10975,7 @@ "type": "tidelift" } ], - "time": "2023-04-22T07:38:19+00:00" + "time": "2023-05-11T05:16:22+00:00" }, { "name": "sebastian/cli-parser", @@ -10803,175 +12176,6 @@ ], "time": "2023-05-09T07:19:31+00:00" }, - { - "name": "symfony/http-client", - "version": "v6.2.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client.git", - "reference": "3f5545a91c8e79dedd1a06c4b04e1682c80c42f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/3f5545a91c8e79dedd1a06c4b04e1682c80c42f9", - "reference": "3f5545a91c8e79dedd1a06c4b04e1682c80c42f9", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-client-contracts": "^3", - "symfony/service-contracts": "^1.0|^2|^3" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "1.0", - "symfony/http-client-implementation": "3.0" - }, - "require-dev": { - "amphp/amp": "^2.5", - "amphp/http-client": "^4.2.1", - "amphp/http-tunnel": "^1.0", - "amphp/socket": "^1.1", - "guzzlehttp/promises": "^1.4", - "nyholm/psr7": "^1.0", - "php-http/httplug": "^1.0|^2.0", - "psr/http-client": "^1.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/stopwatch": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", - "homepage": "https://symfony.com", - "keywords": [ - "http" - ], - "support": { - "source": "https://github.com/symfony/http-client/tree/v6.2.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-04-20T13:12:48+00:00" - }, - { - "name": "symfony/http-client-contracts", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/df2ecd6cb70e73c1080e6478aea85f5f4da2c48b", - "reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "suggest": { - "symfony/http-client-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.3-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\HttpClient\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to HTTP clients", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.2.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-03-01T10:32:47+00:00" - }, { "name": "ta-tikoma/phpunit-architecture-test", "version": "0.7.3", diff --git a/config/filesystems.php b/config/filesystems.php index 5b579dc62..a7a0ba465 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -29,7 +29,6 @@ */ 'disks' => [ - 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), @@ -39,14 +38,20 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', + 'url' => env('APP_URL') . '/storage', 'visibility' => 'public', 'throw' => false, ], + 'ssh-mux' => [ + 'driver' => 'local', + 'root' => storage_path('app/ssh/mux'), + 'visibility' => 'private', + 'throw' => false, + ], 'ssh-keys' => [ 'driver' => 'local', - 'root' => storage_path('app/ssh-keys'), + 'root' => storage_path('app/ssh/keys'), 'visibility' => 'private', 'throw' => false, ], diff --git a/config/horizon.php b/config/horizon.php index 256119644..d9f841aa6 100644 --- a/config/horizon.php +++ b/config/horizon.php @@ -180,7 +180,7 @@ */ 'defaults' => [ - 'supervisor-1' => [ + 's6' => [ 'connection' => 'redis', 'queue' => ['default'], 'balance' => 'auto', @@ -190,25 +190,27 @@ 'maxJobs' => 0, 'memory' => 128, 'tries' => 1, - 'timeout' => 600, + 'timeout' => 3600, 'nice' => 0, ], ], 'environments' => [ 'production' => [ - 'supervisor-1' => [ + 's6' => [ + 'autoScalingStrategy' => 'size', 'maxProcesses' => env('HORIZON_MAX_PROCESSES', 10), 'balanceMaxShift' => env('HORIZON_BALANCE_MAX_SHIFT', 1), - 'balanceCooldown' => env('HORIZON_BALANCE_COOLDOWN', 3), + 'balanceCooldown' => env('HORIZON_BALANCE_COOLDOWN', 1), ], ], 'local' => [ - 'supervisor-1' => [ + 's6' => [ + 'autoScalingStrategy' => 'size', 'maxProcesses' => env('HORIZON_MAX_PROCESSES', 10), 'balanceMaxShift' => env('HORIZON_BALANCE_MAX_SHIFT', 1), - 'balanceCooldown' => env('HORIZON_BALANCE_COOLDOWN', 3), + 'balanceCooldown' => env('HORIZON_BALANCE_COOLDOWN', 1), ], ], ], diff --git a/config/sentry.php b/config/sentry.php new file mode 100644 index 000000000..bbf98c83d --- /dev/null +++ b/config/sentry.php @@ -0,0 +1,84 @@ + env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')), + + // The release version of your application + // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) + 'release' => env('SENTRY_RELEASE'), + + // When left empty or `null` the Laravel environment will be used + 'environment' => env('SENTRY_ENVIRONMENT'), + + 'breadcrumbs' => [ + // Capture Laravel logs in breadcrumbs + 'logs' => true, + + // Capture Laravel cache events in breadcrumbs + 'cache' => true, + + // Capture Livewire components in breadcrumbs + 'livewire' => true, + + // Capture SQL queries in breadcrumbs + 'sql_queries' => true, + + // Capture bindings on SQL queries logged in breadcrumbs + 'sql_bindings' => true, + + // Capture queue job information in breadcrumbs + 'queue_info' => true, + + // Capture command information in breadcrumbs + 'command_info' => true, + + // Capture HTTP client requests information in breadcrumbs + 'http_client_requests' => true, + ], + + 'tracing' => [ + // Trace queue jobs as their own transactions + 'queue_job_transactions' => env('SENTRY_TRACE_QUEUE_ENABLED', false), + + // Capture queue jobs as spans when executed on the sync driver + 'queue_jobs' => true, + + // Capture SQL queries as spans + 'sql_queries' => true, + + // Try to find out where the SQL query originated from and add it to the query spans + 'sql_origin' => true, + + // Capture views as spans + 'views' => true, + + // Capture Livewire components as spans + 'livewire' => true, + + // Capture HTTP client requests as spans + 'http_client_requests' => true, + + // Capture Redis operations as spans (this enables Redis events in Laravel) + 'redis_commands' => env('SENTRY_TRACE_REDIS_COMMANDS', false), + + // Try to find out where the Redis command originated from and add it to the command spans + 'redis_origin' => true, + + // Indicates if the tracing integrations supplied by Sentry should be loaded + 'default_integrations' => true, + + // Indicates that requests without a matching route should be traced + 'missing_routes' => false, + ], + + // @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send-default-pii + 'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false), + + // @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces-sample-rate + 'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_TRACES_SAMPLE_RATE'), + + 'profiles_sample_rate' => env('SENTRY_PROFILES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_PROFILES_SAMPLE_RATE'), + +]; diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index b0fc53227..c488fb4f3 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -18,7 +18,6 @@ class UserFactory extends Factory public function definition(): array { return [ - 'name' => fake()->name(), 'uuid' => Str::uuid(), 'email' => fake()->unique()->safeEmail(), 'email_verified_at' => now(), diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 9acafc53c..ff7a7e716 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -15,7 +15,7 @@ public function up(): void $table->id(); $table->string('uuid')->unique(); $table->boolean('is_root_user')->default(false); - $table->string('name'); + $table->string('name')->default('Your Name Here'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); diff --git a/database/migrations/2023_03_20_112410_create_activity_log_table.php b/database/migrations/2023_03_20_112410_create_activity_log_table.php index 7c05bc892..a6fa05393 100755 --- a/database/migrations/2023_03_20_112410_create_activity_log_table.php +++ b/database/migrations/2023_03_20_112410_create_activity_log_table.php @@ -9,7 +9,7 @@ class CreateActivityLogTable extends Migration public function up() { Schema::connection(config('activitylog.database_connection'))->create(config('activitylog.table_name'), function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id(); $table->string('log_name')->nullable(); $table->text('description'); $table->nullableMorphs('subject', 'subject'); diff --git a/database/migrations/2023_03_20_112813_create_instance_settings_table.php b/database/migrations/2023_03_20_112813_create_instance_settings_table.php index a09288e21..22c709fb8 100644 --- a/database/migrations/2023_03_20_112813_create_instance_settings_table.php +++ b/database/migrations/2023_03_20_112813_create_instance_settings_table.php @@ -15,16 +15,15 @@ public function up(): void $table->id(); $table->string('fqdn')->nullable(); $table->string('wildcard_domain')->nullable(); - $table->string('redirect_url')->nullable(); - // $table->string('preview_domain_separator')->default('.'); + $table->string('default_redirect_404')->nullable(); $table->integer('public_port_min')->default(9000); $table->integer('public_port_max')->default(9100); - // $table->string('custom_dns_servers')->default('1.1.1.1,8.8.8.8'); $table->boolean('do_not_track')->default(false); $table->boolean('is_auto_update_enabled')->default(true); - // $table->boolean('is_dns_check_enabled')->default(true); $table->boolean('is_registration_enabled')->default(true); - $table->boolean('is_https_forced')->default(true); + // $table->string('custom_dns_servers')->default('1.1.1.1,8.8.8.8'); + // $table->string('preview_domain_separator')->default('.'); + // $table->boolean('is_dns_check_enabled')->default(true); $table->timestamps(); }); } diff --git a/database/migrations/2023_03_27_081716_create_applications_table.php b/database/migrations/2023_03_27_081716_create_applications_table.php index b180ca8b9..ec91f0737 100644 --- a/database/migrations/2023_03_27_081716_create_applications_table.php +++ b/database/migrations/2023_03_27_081716_create_applications_table.php @@ -41,8 +41,6 @@ public function up(): void $table->string('base_directory')->default('/'); $table->string('publish_directory')->nullable(); - $table->schemalessAttributes('previews'); - $table->string('health_check_path')->default('/'); $table->string('health_check_port')->nullable(); $table->string('health_check_host')->default('localhost'); @@ -59,13 +57,13 @@ public function up(): void $table->string('limits_memory_swap')->default("0"); $table->integer('limits_memory_swappiness')->default(60); $table->string('limits_memory_reservation')->default("0"); - $table->boolean('limits_memory_oom_kill')->default(false); $table->string('limits_cpus')->default("0"); $table->string('limits_cpuset')->nullable()->default("0"); $table->integer('limits_cpu_shares')->default(1024); $table->string('status')->default('exited'); + $table->string('preview_url_template')->default('{{pr_id}}.{{domain}}'); $table->nullableMorphs('destination'); $table->nullableMorphs('source'); diff --git a/database/migrations/2023_03_27_081717_create_application_settings_table.php b/database/migrations/2023_03_27_081717_create_application_settings_table.php index 91a83ad57..e13f7f366 100644 --- a/database/migrations/2023_03_27_081717_create_application_settings_table.php +++ b/database/migrations/2023_03_27_081717_create_application_settings_table.php @@ -14,14 +14,15 @@ public function up(): void Schema::create('application_settings', function (Blueprint $table) { $table->id(); $table->boolean('is_static')->default(false); - $table->boolean('is_git_submodules_allowed')->default(true); - $table->boolean('is_git_lfs_allowed')->default(true); - $table->boolean('is_auto_deploy')->default(true); - $table->boolean('is_dual_cert')->default(false); - $table->boolean('is_debug')->default(false); - $table->boolean('is_previews')->default(false); - $table->boolean('is_custom_ssl')->default(false); - $table->boolean('is_http2')->default(false); + $table->boolean('is_git_submodules_enabled')->default(true); + $table->boolean('is_git_lfs_enabled')->default(true); + $table->boolean('is_auto_deploy_enabled')->default(true); + $table->boolean('is_force_https_enabled')->default(true); + $table->boolean('is_debug_enabled')->default(false); + $table->boolean('is_preview_deployments_enabled')->default(false); + // $table->boolean('is_dual_cert')->default(false); + // $table->boolean('is_custom_ssl')->default(false); + // $table->boolean('is_http2')->default(false); $table->foreignId('application_id'); $table->timestamps(); }); diff --git a/database/migrations/2023_03_27_081718_create_application_previews_table.php b/database/migrations/2023_03_27_081718_create_application_previews_table.php new file mode 100644 index 000000000..2900b5791 --- /dev/null +++ b/database/migrations/2023_03_27_081718_create_application_previews_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('uuid')->unique(); + $table->integer('pull_request_id'); + $table->string('pull_request_html_url'); + + $table->string('fqdn')->unique()->nullable(); + $table->string('status')->default('exited'); + + $table->foreignId('application_id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('application_previews'); + } +}; diff --git a/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php new file mode 100644 index 000000000..9573b9735 --- /dev/null +++ b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php @@ -0,0 +1,34 @@ +id(); + $table->string('application_id'); + $table->string('deployment_uuid')->unique(); + $table->integer('pull_request_id')->default(0); + $table->boolean('force_rebuild')->default(false); + $table->string('commit')->default('HEAD'); + $table->string('status')->default('queued'); + $table->boolean('is_webhook')->default(false); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('application_deployment_queues'); + } +}; diff --git a/database/seeders/ApplicationPreviewSeeder.php b/database/seeders/ApplicationPreviewSeeder.php new file mode 100644 index 000000000..512f1c990 --- /dev/null +++ b/database/seeders/ApplicationPreviewSeeder.php @@ -0,0 +1,25 @@ + $application_1->id, + // 'pull_request_id' => 1 + // ]); + } +} diff --git a/database/seeders/ApplicationSeeder.php b/database/seeders/ApplicationSeeder.php index 1bc48b76e..2859bed81 100644 --- a/database/seeders/ApplicationSeeder.php +++ b/database/seeders/ApplicationSeeder.php @@ -26,6 +26,7 @@ public function run(): void Application::create([ 'name' => 'coollabsio/coolify-examples:nodejs-fastify', + 'fqdn' => 'http://foo.com', 'repository_project_id' => 603035348, 'git_repository' => 'coollabsio/coolify-examples', 'git_branch' => 'nodejs-fastify', @@ -36,17 +37,7 @@ public function run(): void 'destination_id' => $standalone_docker_1->id, 'destination_type' => StandaloneDocker::class, 'source_id' => $github_public_source->id, - 'source_type' => GithubApp::class, - 'previews' => [ - ApplicationPreview::from([ - 'pullRequestId' => 1, - 'branch' => 'nodejs-fastify' - ]), - ApplicationPreview::from([ - 'pullRequestId' => 2, - 'branch' => 'nodejs-fastify' - ]) - ] + 'source_type' => GithubApp::class ]); } } diff --git a/database/seeders/ApplicationSettingsSeeder.php b/database/seeders/ApplicationSettingsSeeder.php index 1b6068ad5..3ab5bd967 100644 --- a/database/seeders/ApplicationSettingsSeeder.php +++ b/database/seeders/ApplicationSettingsSeeder.php @@ -18,7 +18,7 @@ class ApplicationSettingsSeeder extends Seeder public function run(): void { $application_1 = Application::find(1)->load(['settings']); - $application_1->settings->is_debug = false; + $application_1->settings->is_debug_enabled = false; $application_1->settings->save(); } } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a45d8462e..1f19fca02 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -26,6 +26,7 @@ public function run(): void GitlabAppSeeder::class, ApplicationSeeder::class, ApplicationSettingsSeeder::class, + ApplicationPreviewSeeder::class, DBSeeder::class, ServiceSeeder::class, EnvironmentVariableSeeder::class, diff --git a/database/seeders/InstanceSettingsSeeder.php b/database/seeders/InstanceSettingsSeeder.php index 574e778a4..51ccd1332 100644 --- a/database/seeders/InstanceSettingsSeeder.php +++ b/database/seeders/InstanceSettingsSeeder.php @@ -14,7 +14,6 @@ public function run(): void { InstanceSettings::create([ 'id' => 0, - 'is_https_forced' => false, 'is_registration_enabled' => true, ]); } diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php index 68d536216..d383fc823 100644 --- a/database/seeders/ProductionSeeder.php +++ b/database/seeders/ProductionSeeder.php @@ -2,12 +2,15 @@ namespace Database\Seeders; +use App\Data\ServerMetadata; +use App\Enums\ProxyStatus; +use App\Enums\ProxyTypes; use App\Models\GithubApp; use App\Models\GitlabApp; use App\Models\InstanceSettings; use App\Models\PrivateKey; -use App\Models\Project; use App\Models\Server; +use App\Models\StandaloneDocker; use App\Models\Team; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\Storage; @@ -53,7 +56,7 @@ public function run(): void // Save SSH Keys for the Coolify Host $coolify_key_name = "id.root@host.docker.internal"; - $coolify_key = Storage::disk('local')->get("ssh-keys/{$coolify_key_name}"); + $coolify_key = Storage::disk('ssh-keys')->get("{$coolify_key_name}"); if ($coolify_key) { $private_key = PrivateKey::find(0); @@ -72,23 +75,37 @@ public function run(): void } else { // TODO: Add a command to generate a new SSH key for the Coolify host machine (localhost). echo "No SSH key found for the Coolify host machine (localhost).\n"; - echo "Please generate one and save it in storage/app/ssh-keys/{$coolify_key_name}\n"; - exit(1); + echo "Please generate one and save it in storage/app/ssh/keys/{$coolify_key_name}\n"; } // Add Coolify host (localhost) as Server if it doesn't exist if (Server::find(0) == null) { - $server = Server::create([ + $server_details = [ 'id' => 0, 'name' => "localhost", - 'description' => "This is the local machine", + 'description' => "This is the server where Coolify is running on. Don't delete this!", 'user' => 'root', 'ip' => "host.docker.internal", 'team_id' => 0, - 'private_key_id' => 0, - ]); + 'private_key_id' => 0 + ]; + if (env('COOLIFY_DEFAULT_PROXY') == 'traefik') { + $server_details['extra_attributes'] = ServerMetadata::from([ + 'proxy_type' => ProxyTypes::TRAEFIK_V2->value, + 'proxy_status' => ProxyStatus::EXITED->value + ]); + } + $server = Server::create($server_details); $server->settings->is_validated = true; $server->settings->save(); } + if (StandaloneDocker::find(0) == null) { + StandaloneDocker::create([ + 'id' => 0, + 'name' => 'localhost-coolify', + 'network' => 'coolify', + 'server_id' => 0, + ]); + } } } diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index 85760830d..3cc459fe1 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -11,12 +11,10 @@ public function run(): void { User::factory()->create([ "id" => 0, - 'name' => 'Root User', 'email' => 'test@example.com', 'is_root_user' => true, ]); User::factory()->create([ - 'name' => 'Normal User', 'email' => 'test2@example.com', ]); } diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 4a9b3c0f9..07177d96f 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -67,5 +67,10 @@ services: ports: - '${FORWARD_MAILPIT_PORT:-1025}:1025' - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025' + buggregator: + image: ghcr.io/buggregator/server:latest + container_name: coolify-debug + ports: + - 23517:8000 networks: - coolify diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 2d088d90a..d7944b922 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,15 +1,14 @@ version: '3.8' services: coolify: - image: "ghcr.io/coollabsio/coolify:${APP_TAG:-4.0.0-nightly.0}" + image: "ghcr.io/coollabsio/coolify:${LATEST_IMAGE:-4.0.0-nightly.0}" volumes: - type: bind source: /data/coolify/source/.env target: /var/www/html/.env read_only: true + - /data/coolify/ssh:/var/www/html/storage/app/ssh - /data/coolify/deployments:/var/www/html/storage/app/deployments - - /data/coolify/ssh-keys:/var/www/html/storage/app/ssh-keys - - /data/coolify/proxy:/var/www/html/storage/app/proxy environment: - APP_ENV=production - APP_DEBUG diff --git a/docker-compose.yml b/docker-compose.yml index 5c44251a6..ecd3f8b7c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: - coolify depends_on: - postgres + - redis postgres: image: postgres:15-alpine @@ -25,4 +26,5 @@ services: - coolify networks: coolify: + name: coolify driver: bridge diff --git a/docker/dev-ssu/Dockerfile b/docker/dev-ssu/Dockerfile index d283f6a56..4236dd993 100644 --- a/docker/dev-ssu/Dockerfile +++ b/docker/dev-ssu/Dockerfile @@ -3,6 +3,8 @@ ARG POSTGRES_VERSION=15 RUN apt-get update && apt-get install -y php-pgsql openssh-client git git-lfs postgresql-client RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* +COPY docker/dev-ssu/nginx.conf /etc/nginx/conf.d/custom.conf + RUN echo "alias ll='ls -al'" >>/etc/bash.bashrc RUN echo "alias a='php artisan'" >>/etc/bash.bashrc RUN echo "alias mfs='php artisan migrate:fresh --seed'" >>/etc/bash.bashrc diff --git a/docker/dev-ssu/etc/s6-overlay/s6-rc.d/queue-worker/run b/docker/dev-ssu/etc/s6-overlay/s6-rc.d/queue-worker/run index 79fc840ee..0029f9615 100644 --- a/docker/dev-ssu/etc/s6-overlay/s6-rc.d/queue-worker/run +++ b/docker/dev-ssu/etc/s6-overlay/s6-rc.d/queue-worker/run @@ -1,2 +1,2 @@ #!/command/execlineb -P -su - webuser -c "php /var/www/html/artisan queue:listen --timeout=600 --rest=1 --memory=512" +su - webuser -c "php /var/www/html/artisan queue:listen" diff --git a/docker/dev-ssu/nginx.conf b/docker/dev-ssu/nginx.conf new file mode 100644 index 000000000..60e1f966d --- /dev/null +++ b/docker/dev-ssu/nginx.conf @@ -0,0 +1,4 @@ +# Custom nginx configuration + +# Disable access logs +access_log off; \ No newline at end of file diff --git a/docker/prod-ssu/Dockerfile b/docker/prod-ssu/Dockerfile index 14a5a21d1..0ed33a0d9 100644 --- a/docker/prod-ssu/Dockerfile +++ b/docker/prod-ssu/Dockerfile @@ -10,6 +10,8 @@ ARG POSTGRES_VERSION=15 RUN apt-get update && apt-get install -y php-pgsql openssh-client git git-lfs jq RUN apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* +COPY docker/prod-ssu/nginx.conf /etc/nginx/conf.d/custom.conf + COPY composer.json composer.lock ./ RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist @@ -27,3 +29,4 @@ RUN echo "alias a='php artisan'" >>/etc/bash.bashrc RUN echo "alias mfs='php artisan migrate:fresh --seed'" >>/etc/bash.bashrc RUN echo "alias cda='composer dump-autoload'" >>/etc/bash.bashrc RUN echo "alias run='./scripts/run'" >>/etc/bash.bashrc +RUN echo "alias logs='tail -f storage/logs/laravel.log'" >>/etc/bash.bashrc diff --git a/docker/prod-ssu/etc/s6-overlay/s6-rc.d/queue-worker/run b/docker/prod-ssu/etc/s6-overlay/s6-rc.d/queue-worker/run deleted file mode 100644 index ef166c7f1..000000000 --- a/docker/prod-ssu/etc/s6-overlay/s6-rc.d/queue-worker/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/command/execlineb -P -su - webuser -c "php /var/www/html/artisan queue:work --timeout=600" diff --git a/docker/prod-ssu/etc/s6-overlay/s6-rc.d/queue-worker/type b/docker/prod-ssu/etc/s6-overlay/s6-rc.d/queue-worker/type deleted file mode 100644 index 5883cff0c..000000000 --- a/docker/prod-ssu/etc/s6-overlay/s6-rc.d/queue-worker/type +++ /dev/null @@ -1 +0,0 @@ -longrun diff --git a/docker/prod-ssu/nginx.conf b/docker/prod-ssu/nginx.conf new file mode 100644 index 000000000..60e1f966d --- /dev/null +++ b/docker/prod-ssu/nginx.conf @@ -0,0 +1,4 @@ +# Custom nginx configuration + +# Disable access logs +access_log off; \ No newline at end of file diff --git a/examples/traefik-dynamic-catch-all.yaml b/examples/traefik-dynamic-catch-all.yaml new file mode 100644 index 000000000..54f7b1fb9 --- /dev/null +++ b/examples/traefik-dynamic-catch-all.yaml @@ -0,0 +1,23 @@ +# This is an example dynamic configuration. +http: + routers: + catchall: + entryPoints: + - http + - https + service: noop + rule: HostRegexp(`{catchall:.*}`) + priority: 1 + middlewares: + - redirect-regexp + services: + noop: + loadBalancer: + servers: + - url: '' + middlewares: + redirect-regexp: + redirectRegex: + regex: '(.*)' + replacement: 'https://coolify.io' + permanent: false \ No newline at end of file diff --git a/examples/traefik-dynamic-coolify.yaml b/examples/traefik-dynamic-coolify.yaml new file mode 100644 index 000000000..0c5f7e311 --- /dev/null +++ b/examples/traefik-dynamic-coolify.yaml @@ -0,0 +1,14 @@ +# This is an example dynamic configuration. +http: + routers: + coolify-http: + entryPoints: + - http + service: coolify + rule: Host(`coolify.io`) + services: + coolify: + loadBalancer: + servers: + - + url: 'http://coolify:80' \ No newline at end of file diff --git a/lang/en.json b/lang/en.json index c690f3fb6..3816ace19 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,8 +1,10 @@ { "auth.login": "Login", + "auth.already-registered": "Already registered?", + "auth.register-now": "Register now!", "auth.logout": "Logout", "auth.register": "Register", - "auth.registration_disabled": "Registration is disabled.", + "auth.registration_disabled": "Registration is disabled. Please contact the administrator.", "auth.reset_password": "Reset Password", "auth.failed": "These credentials do not match our records.", "auth.failed.password": "The provided password is incorrect.", @@ -11,5 +13,6 @@ "input.name": "Name", "input.email": "Email", "input.password": "Password", - "input.password.again": "Password Again" -} + "input.password.again": "Password Again", + "button.save": "Save" +} \ No newline at end of file diff --git a/public/vendor/horizon/app.js b/public/vendor/horizon/app.js index 128da5243..cf252d589 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 t,e={30:(t,e,o)=>{"use strict";var p=Object.freeze({}),b=Array.isArray;function n(t){return null==t}function M(t){return null!=t}function z(t){return!0===t}function c(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function r(t){return"function"==typeof t}function i(t){return null!==t&&"object"==typeof t}var a=Object.prototype.toString;function O(t){return"[object Object]"===a.call(t)}function s(t){return"[object RegExp]"===a.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return M(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function A(t){return null==t?"":Array.isArray(t)||O(t)&&t.toString===a?JSON.stringify(t,null,2):String(t)}function u(t){var e=parseFloat(t);return isNaN(e)?t:e}function f(t,e){for(var o=Object.create(null),p=t.split(","),b=0;b-1)return t.splice(p,1)}}var m=Object.prototype.hasOwnProperty;function g(t,e){return m.call(t,e)}function v(t){var e=Object.create(null);return function(o){return e[o]||(e[o]=t(o))}}var R=/-(\w)/g,y=v((function(t){return t.replace(R,(function(t,e){return e?e.toUpperCase():""}))})),B=v((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),L=/\B([A-Z])/g,X=v((function(t){return t.replace(L,"-$1").toLowerCase()}));var _=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function o(o){var p=arguments.length;return p?p>1?t.apply(e,arguments):t.call(e,o):t.call(e)}return o._length=t.length,o};function N(t,e){e=e||0;for(var o=t.length-e,p=new Array(o);o--;)p[o]=t[o+e];return p}function w(t,e){for(var o in e)t[o]=e[o];return t}function x(t){for(var e={},o=0;o0,et=Q&&Q.indexOf("edge/")>0;Q&&Q.indexOf("android");var ot=Q&&/iphone|ipad|ipod|ios/.test(Q);Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q);var pt,bt=Q&&Q.match(/firefox\/(\d+)/),nt={}.watch,Mt=!1;if(K)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){Mt=!0}}),window.addEventListener("test-passive",null,zt)}catch(t){}var ct=function(){return void 0===pt&&(pt=!K&&void 0!==o.g&&(o.g.process&&"server"===o.g.process.env.VUE_ENV)),pt},rt=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var at,Ot="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);at="undefined"!=typeof Set&&it(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var st=null;function lt(t){void 0===t&&(t=null),t||st&&st._scope.off(),st=t,t&&t._scope.on()}var dt=function(){function t(t,e,o,p,b,n,M,z){this.tag=t,this.data=e,this.children=o,this.text=p,this.elm=b,this.ns=void 0,this.context=n,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=M,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=z,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),At=function(t){void 0===t&&(t="");var e=new dt;return e.text=t,e.isComment=!0,e};function ut(t){return new dt(void 0,void 0,void 0,String(t))}function ft(t){var e=new dt(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var qt=0,ht=[],Wt=function(){function t(){this._pending=!1,this.id=qt++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){this.subs[this.subs.indexOf(t)]=null,this._pending||(this._pending=!0,ht.push(this))},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){var e=this.subs.filter((function(t){return t}));for(var o=0,p=e.length;o0&&(Jt((p=Kt(p,"".concat(e||"","_").concat(o)))[0])&&Jt(i)&&(a[r]=ut(i.text+p[0].text),p.shift()),a.push.apply(a,p)):c(p)?Jt(i)?a[r]=ut(i.text+p):""!==p&&a.push(ut(p)):Jt(p)&&Jt(i)?a[r]=ut(i.text+p.text):(z(t._isVList)&&M(p.tag)&&n(p.key)&&M(e)&&(p.key="__vlist".concat(e,"_").concat(o,"__")),a.push(p)));return a}function Qt(t,e,o,p,n,a){return(b(o)||c(o))&&(n=p,p=o,o=void 0),z(a)&&(n=2),function(t,e,o,p,n){if(M(o)&&M(o.__ob__))return At();M(o)&&M(o.is)&&(e=o.is);if(!e)return At();0;b(p)&&r(p[0])&&((o=o||{}).scopedSlots={default:p[0]},p.length=0);2===n?p=Gt(p):1===n&&(p=function(t){for(var e=0;e0,z=e?!!e.$stable:!M,c=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(z&&b&&b!==p&&c===b.$key&&!M&&!b.$hasNormal)return b;for(var r in n={},e)e[r]&&"$"!==r[0]&&(n[r]=qe(t,o,r,e[r]))}else n={};for(var i in o)i in n||(n[i]=he(o,i));return e&&Object.isExtensible(e)&&(e._normalized=n),Y(n,"$stable",z),Y(n,"$key",c),Y(n,"$hasNormal",M),n}function qe(t,e,o,p){var n=function(){var e=st;lt(t);var o=arguments.length?p.apply(null,arguments):p({}),n=(o=o&&"object"==typeof o&&!b(o)?[o]:Gt(o))&&o[0];return lt(e),o&&(!n||1===o.length&&n.isComment&&!ue(n))?void 0:o};return p.proxy&&Object.defineProperty(e,o,{get:n,enumerable:!0,configurable:!0}),n}function he(t,e){return function(){return t[e]}}function We(t){return{get attrs(){if(!t._attrsProxy){var e=t._attrsProxy={};Y(e,"_v_attr_proxy",!0),me(e,t.$attrs,p,t,"$attrs")}return t._attrsProxy},get listeners(){t._listenersProxy||me(t._listenersProxy={},t.$listeners,p,t,"$listeners");return t._listenersProxy},get slots(){return function(t){t._slotsProxy||ve(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(t)},emit:_(t.$emit,t),expose:function(e){e&&Object.keys(e).forEach((function(o){return Ft(t,e,o)}))}}}function me(t,e,o,p,b){var n=!1;for(var M in e)M in t?e[M]!==o[M]&&(n=!0):(n=!0,ge(t,M,p,b));for(var M in t)M in e||(n=!0,delete t[M]);return n}function ge(t,e,o,p){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return o[p][e]}})}function ve(t,e){for(var o in e)t[o]=e[o];for(var o in t)o in e||delete t[o]}var Re,ye=null;function Be(t,e){return(t.__esModule||Ot&&"Module"===t[Symbol.toStringTag])&&(t=t.default),i(t)?e.extend(t):t}function Le(t){if(b(t))for(var e=0;edocument.createEvent("Event").timeStamp&&(Ve=function(){return $e.now()})}var Ye=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function Ge(){var t,e;for(Ue=Ve(),Fe=!0,De.sort(Ye),He=0;HeHe&&De[o].id>t.id;)o--;De.splice(o+1,0,t)}else De.push(t);Ie||(Ie=!0,lo(Ge))}}var Ke="watcher";"".concat(Ke," callback"),"".concat(Ke," getter"),"".concat(Ke," cleanup");var Qe;var Ze=function(){function t(t){void 0===t&&(t=!1),this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Qe,!t&&Qe&&(this.index=(Qe.scopes||(Qe.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=Qe;try{return Qe=this,t()}finally{Qe=e}}else 0},t.prototype.on=function(){Qe=this},t.prototype.off=function(){Qe=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,o=void 0;for(e=0,o=this.effects.length;e-1)if(n&&!g(b,"default"))M=!1;else if(""===M||M===X(t)){var c=tp(String,b.type);(c<0||z-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!s(t)&&t.test(e)}function np(t,e){var o=t.cache,p=t.keys,b=t._vnode;for(var n in o){var M=o[n];if(M){var z=M.name;z&&!e(z)&&Mp(o,n,p,b)}}}function Mp(t,e,o,p){var b=t[e];!b||p&&b.tag===p.tag||b.componentInstance.$destroy(),t[e]=null,W(o,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=No++,e._isVue=!0,e.__v_skip=!0,e._scope=new Ze(!0),e._scope._vm=!0,t&&t._isComponent?function(t,e){var o=t.$options=Object.create(t.constructor.options),p=e._parentVnode;o.parent=e.parent,o._parentVnode=p;var b=p.componentOptions;o.propsData=b.propsData,o._parentListeners=b.listeners,o._renderChildren=b.children,o._componentTag=b.tag,e.render&&(o.render=e.render,o.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Yo(wo(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,o=e.parent;if(o&&!e.abstract){for(;o.$options.abstract&&o.$parent;)o=o.$parent;o.$children.push(t)}t.$parent=o,t.$root=o?o.$root:t,t.$children=[],t.$refs={},t._provided=o?o._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&we(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,o=t.$vnode=e._parentVnode,b=o&&o.context;t.$slots=de(e._renderChildren,b),t.$scopedSlots=o?fe(t.$parent,o.data.scopedSlots,t.$slots):p,t._c=function(e,o,p,b){return Qt(t,e,o,p,b,!1)},t.$createElement=function(e,o,p,b){return Qt(t,e,o,p,b,!0)};var n=o&&o.data;Et(t,"$attrs",n&&n.attrs||p,null,!0),Et(t,"$listeners",e._parentListeners||p,null,!0)}(e),Ee(e,"beforeCreate",void 0,!1),function(t){var e=_o(t.$options.inject,t);e&&(Tt(!1),Object.keys(e).forEach((function(o){Et(t,o,e[o])})),Tt(!0))}(e),vo(e),function(t){var e=t.$options.provide;if(e){var o=r(e)?e.call(t):e;if(!i(o))return;for(var p=to(t),b=Ot?Reflect.ownKeys(o):Object.keys(o),n=0;n1?N(o):o;for(var p=N(arguments,1),b='event handler for "'.concat(t,'"'),n=0,M=o.length;nparseInt(this.max)&&Mp(e,o[0],o,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Mp(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){np(t,(function(t){return bp(e,t)}))})),this.$watch("exclude",(function(e){np(t,(function(t){return!bp(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Le(t),o=e&&e.componentOptions;if(o){var p=pp(o),b=this.include,n=this.exclude;if(b&&(!p||!bp(b,p))||n&&p&&bp(n,p))return e;var M=this.cache,z=this.keys,c=null==e.key?o.Ctor.cid+(o.tag?"::".concat(o.tag):""):e.key;M[c]?(e.componentInstance=M[c].componentInstance,W(z,c),z.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},rp={KeepAlive:cp};!function(t){var e={get:function(){return H}};Object.defineProperty(t,"config",e),t.util={warn:jo,extend:w,mergeOptions:Yo,defineReactive:Et},t.set=Dt,t.delete=Pt,t.nextTick=lo,t.observable=function(t){return kt(t),t},t.options=Object.create(null),I.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,w(t.options.components,rp),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var o=N(arguments,1);return o.unshift(this),r(t.install)?t.install.apply(t,o):r(t)&&t.apply(null,o),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Yo(this.options,t),this}}(t),op(t),function(t){I.forEach((function(e){t[e]=function(t,o){return o?("component"===e&&O(o)&&(o.name=o.name||t,o=this.options._base.extend(o)),"directive"===e&&r(o)&&(o={bind:o,update:o}),this.options[e+"s"][t]=o,o):this.options[e+"s"][t]}}))}(t)}(ep),Object.defineProperty(ep.prototype,"$isServer",{get:ct}),Object.defineProperty(ep.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(ep,"FunctionalRenderContext",{value:xo}),ep.version="2.7.13";var ip=f("style,class"),ap=f("input,textarea,option,select,progress"),Op=function(t,e,o){return"value"===o&&ap(t)&&"button"!==e||"selected"===o&&"option"===t||"checked"===o&&"input"===t||"muted"===o&&"video"===t},sp=f("contenteditable,draggable,spellcheck"),lp=f("events,caret,typing,plaintext-only"),dp=f("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,truespeed,typemustmatch,visible"),Ap="http://www.w3.org/1999/xlink",up=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},fp=function(t){return up(t)?t.slice(6,t.length):""},qp=function(t){return null==t||!1===t};function hp(t){for(var e=t.data,o=t,p=t;M(p.componentInstance);)(p=p.componentInstance._vnode)&&p.data&&(e=Wp(p.data,e));for(;M(o=o.parent);)o&&o.data&&(e=Wp(e,o.data));return function(t,e){if(M(t)||M(e))return mp(t,gp(e));return""}(e.staticClass,e.class)}function Wp(t,e){return{staticClass:mp(t.staticClass,e.staticClass),class:M(t.class)?[t.class,e.class]:e.class}}function mp(t,e){return t?e?t+" "+e:t:e||""}function gp(t){return Array.isArray(t)?function(t){for(var e,o="",p=0,b=t.length;p-1?Gp(t,e,o):dp(e)?qp(o)?t.removeAttribute(e):(o="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,o)):sp(e)?t.setAttribute(e,function(t,e){return qp(e)||"false"===e?"false":"contenteditable"===t&&lp(e)?e:"true"}(e,o)):up(e)?qp(o)?t.removeAttributeNS(Ap,fp(e)):t.setAttributeNS(Ap,e,o):Gp(t,e,o)}function Gp(t,e,o){if(qp(o))t.removeAttribute(e);else{if(Z&&!tt&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==o&&!t.__ieph){var p=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",p)};t.addEventListener("input",p),t.__ieph=!0}t.setAttribute(e,o)}}var Jp={create:$p,update:$p};function Kp(t,e){var o=e.elm,p=e.data,b=t.data;if(!(n(p.staticClass)&&n(p.class)&&(n(b)||n(b.staticClass)&&n(b.class)))){var z=hp(e),c=o._transitionClasses;M(c)&&(z=mp(z,gp(c))),z!==o._prevClass&&(o.setAttribute("class",z),o._prevClass=z)}}var Qp,Zp,tb,eb,ob,pb,bb={create:Kp,update:Kp},nb=/[\w).+\-_$\]]/;function Mb(t){var e,o,p,b,n,M=!1,z=!1,c=!1,r=!1,i=0,a=0,O=0,s=0;for(p=0;p=0&&" "===(d=t.charAt(l));l--);d&&nb.test(d)||(r=!0)}}else void 0===b?(s=p+1,b=t.slice(0,p).trim()):A();function A(){(n||(n=[])).push(t.slice(s,p).trim()),s=p+1}if(void 0===b?b=t.slice(0,p).trim():0!==s&&A(),n)for(p=0;p-1?{exp:t.slice(0,eb),key:'"'+t.slice(eb+1)+'"'}:{exp:t,key:null};Zp=t,eb=ob=pb=0;for(;!gb();)vb(tb=mb())?yb(tb):91===tb&&Rb(tb);return{exp:t.slice(0,ob),key:t.slice(ob+1,pb)}}(t);return null===o.key?"".concat(t,"=").concat(e):"$set(".concat(o.exp,", ").concat(o.key,", ").concat(e,")")}function mb(){return Zp.charCodeAt(++eb)}function gb(){return eb>=Qp}function vb(t){return 34===t||39===t}function Rb(t){var e=1;for(ob=eb;!gb();)if(vb(t=mb()))yb(t);else if(91===t&&e++,93===t&&e--,0===e){pb=eb;break}}function yb(t){for(var e=t;!gb()&&(t=mb())!==e;);}var Bb,Lb="__r";function Xb(t,e,o){var p=Bb;return function b(){var n=e.apply(null,arguments);null!==n&&wb(t,b,o,p)}}var _b=Mo&&!(bt&&Number(bt[1])<=53);function Nb(t,e,o,p){if(_b){var b=Ue,n=e;e=n._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=b||t.timeStamp<=0||t.target.ownerDocument!==document)return n.apply(this,arguments)}}Bb.addEventListener(t,e,Mt?{capture:o,passive:p}:o)}function wb(t,e,o,p){(p||Bb).removeEventListener(t,e._wrapper||e,o)}function xb(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},p=t.data.on||{};Bb=e.elm||t.elm,function(t){if(M(t.__r)){var e=Z?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}M(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),Vt(o,p,Nb,wb,Xb,e.context),Bb=void 0}}var Tb,Cb={create:xb,update:xb,destroy:function(t){return xb(t,Sp)}};function Sb(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var o,p,b=e.elm,c=t.data.domProps||{},r=e.data.domProps||{};for(o in(M(r.__ob__)||z(r._v_attr_proxy))&&(r=e.data.domProps=w({},r)),c)o in r||(b[o]="");for(o in r){if(p=r[o],"textContent"===o||"innerHTML"===o){if(e.children&&(e.children.length=0),p===c[o])continue;1===b.childNodes.length&&b.removeChild(b.childNodes[0])}if("value"===o&&"PROGRESS"!==b.tagName){b._value=p;var i=n(p)?"":String(p);kb(b,i)&&(b.value=i)}else if("innerHTML"===o&&yp(b.tagName)&&n(b.innerHTML)){(Tb=Tb||document.createElement("div")).innerHTML="".concat(p,"");for(var a=Tb.firstChild;b.firstChild;)b.removeChild(b.firstChild);for(;a.firstChild;)b.appendChild(a.firstChild)}else if(p!==c[o])try{b[o]=p}catch(t){}}}}function kb(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var o=!0;try{o=document.activeElement!==t}catch(t){}return o&&t.value!==e}(t,e)||function(t,e){var o=t.value,p=t._vModifiers;if(M(p)){if(p.number)return u(o)!==u(e);if(p.trim)return o.trim()!==e.trim()}return o!==e}(t,e))}var Eb={create:Sb,update:Sb},Db=v((function(t){var e={},o=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var p=t.split(o);p.length>1&&(e[p[0].trim()]=p[1].trim())}})),e}));function Pb(t){var e=jb(t.style);return t.staticStyle?w(t.staticStyle,e):e}function jb(t){return Array.isArray(t)?x(t):"string"==typeof t?Db(t):t}var Ib,Fb=/^--/,Hb=/\s*!important$/,Ub=function(t,e,o){if(Fb.test(e))t.style.setProperty(e,o);else if(Hb.test(o))t.style.setProperty(X(e),o.replace(Hb,""),"important");else{var p=$b(e);if(Array.isArray(o))for(var b=0,n=o.length;b-1?e.split(Jb).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var o=" ".concat(t.getAttribute("class")||""," ");o.indexOf(" "+e+" ")<0&&t.setAttribute("class",(o+e).trim())}}function Qb(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Jb).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var o=" ".concat(t.getAttribute("class")||""," "),p=" "+e+" ";o.indexOf(p)>=0;)o=o.replace(p," ");(o=o.trim())?t.setAttribute("class",o):t.removeAttribute("class")}}function Zb(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&w(e,tn(t.name||"v")),w(e,t),e}return"string"==typeof t?tn(t):void 0}}var tn=v((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),en=K&&!tt,on="transition",pn="animation",bn="transition",nn="transitionend",Mn="animation",zn="animationend";en&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(bn="WebkitTransition",nn="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Mn="WebkitAnimation",zn="webkitAnimationEnd"));var cn=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function rn(t){cn((function(){cn(t)}))}function an(t,e){var o=t._transitionClasses||(t._transitionClasses=[]);o.indexOf(e)<0&&(o.push(e),Kb(t,e))}function On(t,e){t._transitionClasses&&W(t._transitionClasses,e),Qb(t,e)}function sn(t,e,o){var p=dn(t,e),b=p.type,n=p.timeout,M=p.propCount;if(!b)return o();var z=b===on?nn:zn,c=0,r=function(){t.removeEventListener(z,i),o()},i=function(e){e.target===t&&++c>=M&&r()};setTimeout((function(){c0&&(o=on,i=M,a=n.length):e===pn?r>0&&(o=pn,i=r,a=c.length):a=(o=(i=Math.max(M,r))>0?M>r?on:pn:null)?o===on?n.length:c.length:0,{type:o,timeout:i,propCount:a,hasTransform:o===on&&ln.test(p[bn+"Property"])}}function An(t,e){for(;t.length1}function mn(t,e){!0!==e.data.show&&fn(e)}var gn=function(t){var e,o,p={},r=t.modules,i=t.nodeOps;for(e=0;el?h(t,n(o[u+1])?null:o[u+1].elm,o,s,u,p):s>u&&m(e,a,l)}(a,d,u,o,r):M(u)?(M(t.text)&&i.setTextContent(a,""),h(a,null,u,0,u.length-1,o)):M(d)?m(d,0,d.length-1):M(t.text)&&i.setTextContent(a,""):t.text!==e.text&&i.setTextContent(a,e.text),M(l)&&M(s=l.hook)&&M(s=s.postpatch)&&s(t,e)}}}function y(t,e,o){if(z(o)&&M(t.parent))t.parent.data.pendingInsert=e;else for(var p=0;p-1,M.selected!==n&&(M.selected=n);else if(k(Ln(M),p))return void(t.selectedIndex!==z&&(t.selectedIndex=z));b||(t.selectedIndex=-1)}}function Bn(t,e){return e.every((function(e){return!k(e,t)}))}function Ln(t){return"_value"in t?t._value:t.value}function Xn(t){t.target.composing=!0}function _n(t){t.target.composing&&(t.target.composing=!1,Nn(t.target,"input"))}function Nn(t,e){var o=document.createEvent("HTMLEvents");o.initEvent(e,!0,!0),t.dispatchEvent(o)}function wn(t){return!t.componentInstance||t.data&&t.data.transition?t:wn(t.componentInstance._vnode)}var xn={bind:function(t,e,o){var p=e.value,b=(o=wn(o)).data&&o.data.transition,n=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;p&&b?(o.data.show=!0,fn(o,(function(){t.style.display=n}))):t.style.display=p?n:"none"},update:function(t,e,o){var p=e.value;!p!=!e.oldValue&&((o=wn(o)).data&&o.data.transition?(o.data.show=!0,p?fn(o,(function(){t.style.display=t.__vOriginalDisplay})):qn(o,(function(){t.style.display="none"}))):t.style.display=p?t.__vOriginalDisplay:"none")},unbind:function(t,e,o,p,b){b||(t.style.display=t.__vOriginalDisplay)}},Tn={model:vn,show:xn},Cn={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 Sn(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Sn(Le(e.children)):t}function kn(t){var e={},o=t.$options;for(var p in o.propsData)e[p]=t[p];var b=o._parentListeners;for(var p in b)e[y(p)]=b[p];return e}function En(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Dn=function(t){return t.tag||ue(t)},Pn=function(t){return"show"===t.name},jn={name:"transition",props:Cn,abstract:!0,render:function(t){var e=this,o=this.$slots.default;if(o&&(o=o.filter(Dn)).length){0;var p=this.mode;0;var b=o[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return b;var n=Sn(b);if(!n)return b;if(this._leaving)return En(t,b);var M="__transition-".concat(this._uid,"-");n.key=null==n.key?n.isComment?M+"comment":M+n.tag:c(n.key)?0===String(n.key).indexOf(M)?n.key:M+n.key:n.key;var z=(n.data||(n.data={})).transition=kn(this),r=this._vnode,i=Sn(r);if(n.data.directives&&n.data.directives.some(Pn)&&(n.data.show=!0),i&&i.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(n,i)&&!ue(i)&&(!i.componentInstance||!i.componentInstance._vnode.isComment)){var a=i.data.transition=w({},z);if("out-in"===p)return this._leaving=!0,$t(a,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),En(t,b);if("in-out"===p){if(ue(n))return r;var O,s=function(){O()};$t(z,"afterEnter",s),$t(z,"enterCancelled",s),$t(a,"delayLeave",(function(t){O=t}))}}return b}}},In=w({tag:String,moveClass:String},Cn);delete In.mode;var Fn={props:In,beforeMount:function(){var t=this,e=this._update;this._update=function(o,p){var b=Te(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,b(),e.call(t,o,p)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",o=Object.create(null),p=this.prevChildren=this.children,b=this.$slots.default||[],n=this.children=[],M=kn(this),z=0;z-1?Xp[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Xp[t]=/HTMLUnknownElement/.test(e.toString())},w(ep.options.directives,Tn),w(ep.options.components,$n),ep.prototype.__patch__=K?gn:T,ep.prototype.$mount=function(t,e){return function(t,e,o){var p;t.$el=e,t.$options.render||(t.$options.render=At),Ee(t,"beforeMount"),p=function(){t._update(t._render(),o)},new Wo(t,p,T,{before:function(){t._isMounted&&!t._isDestroyed&&Ee(t,"beforeUpdate")}},!0),o=!1;var b=t._preWatchers;if(b)for(var n=0;n\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,nM=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,MM="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(U.source,"]*"),zM="((?:".concat(MM,"\\:)?").concat(MM,")"),cM=new RegExp("^<".concat(zM)),rM=/^\s*(\/?)>/,iM=new RegExp("^<\\/".concat(zM,"[^>]*>")),aM=/^]+>/i,OM=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},uM=/&(?:lt|gt|quot|amp|#39);/g,fM=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,qM=f("pre,textarea",!0),hM=function(t,e){return t&&qM(t)&&"\n"===e[0]};function WM(t,e){var o=e?fM:uM;return t.replace(o,(function(t){return AM[t]}))}function mM(t,e){for(var o,p,b=[],n=e.expectHTML,M=e.isUnaryTag||C,z=e.canBeLeftOpenTag||C,c=0,r=function(){if(o=t,p&&lM(p)){var r=0,O=p.toLowerCase(),s=dM[O]||(dM[O]=new RegExp("([\\s\\S]*?)(]*>)","i"));m=t.replace(s,(function(t,o,p){return r=p.length,lM(O)||"noscript"===O||(o=o.replace(//g,"$1").replace(//g,"$1")),hM(O,o)&&(o=o.slice(1)),e.chars&&e.chars(o),""}));c+=t.length-m.length,t=m,a(O,c-r,c)}else{var l=t.indexOf("<");if(0===l){if(OM.test(t)){var d=t.indexOf("--\x3e");if(d>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,d),c,c+d+3),i(d+3),"continue"}if(sM.test(t)){var A=t.indexOf("]>");if(A>=0)return i(A+2),"continue"}var u=t.match(aM);if(u)return i(u[0].length),"continue";var f=t.match(iM);if(f){var q=c;return i(f[0].length),a(f[1],q,c),"continue"}var h=function(){var e=t.match(cM);if(e){var o={tagName:e[1],attrs:[],start:c};i(e[0].length);for(var p=void 0,b=void 0;!(p=t.match(rM))&&(b=t.match(nM)||t.match(bM));)b.start=c,i(b[0].length),b.end=c,o.attrs.push(b);if(p)return o.unarySlash=p[1],i(p[0].length),o.end=c,o}}();if(h)return function(t){var o=t.tagName,c=t.unarySlash;n&&("p"===p&&pM(o)&&a(p),z(o)&&p===o&&a(o));for(var r=M(o)||!!c,i=t.attrs.length,O=new Array(i),s=0;s=0){for(m=t.slice(l);!(iM.test(m)||cM.test(m)||OM.test(m)||sM.test(m)||(g=m.indexOf("<",1))<0);)l+=g,m=t.slice(l);W=t.substring(0,l)}l<0&&(W=t),W&&i(W.length),e.chars&&W&&e.chars(W,c-W.length,c)}if(t===o)return e.chars&&e.chars(t),"break"};t;){if("break"===r())break}function i(e){c+=e,t=t.substring(e)}function a(t,o,n){var M,z;if(null==o&&(o=c),null==n&&(n=c),t)for(z=t.toLowerCase(),M=b.length-1;M>=0&&b[M].lowerCasedTag!==z;M--);else M=0;if(M>=0){for(var r=b.length-1;r>=M;r--)e.end&&e.end(b[r].tag,o,n);b.length=M,p=M&&b[M-1].tag}else"br"===z?e.start&&e.start(t,[],!0,o,n):"p"===z&&(e.start&&e.start(t,[],!1,o,n),e.end&&e.end(t,o,n))}a()}var gM,vM,RM,yM,BM,LM,XM,_M,NM=/^@|^v-on:/,wM=/^v-|^@|^:|^#/,xM=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,TM=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,CM=/^\(|\)$/g,SM=/^\[.*\]$/,kM=/:(.*)$/,EM=/^:|^\.|^v-bind:/,DM=/\.[^.\]]+(?=[^\]]*$)/g,PM=/^v-slot(:|$)|^#/,jM=/[\r\n]/,IM=/[ \f\t\r\n]+/g,FM=v(tM),HM="_empty_";function UM(t,e,o){return{type:1,tag:t,attrsList:e,attrsMap:QM(e),rawAttrsMap:{},parent:o,children:[]}}function VM(t,e){gM=e.warn||cb,LM=e.isPreTag||C,XM=e.mustUseProp||C,_M=e.getTagNamespace||C;var o=e.isReservedTag||C;(function(t){return!(!(t.component||t.attrsMap[":is"]||t.attrsMap["v-bind:is"])&&(t.attrsMap.is?o(t.attrsMap.is):o(t.tag)))}),RM=rb(e.modules,"transformNode"),yM=rb(e.modules,"preTransformNode"),BM=rb(e.modules,"postTransformNode"),vM=e.delimiters;var p,b,n=[],M=!1!==e.preserveWhitespace,z=e.whitespace,c=!1,r=!1;function i(t){if(a(t),c||t.processed||(t=$M(t,e)),n.length||t===p||p.if&&(t.elseif||t.else)&&GM(p,{exp:t.elseif,block:t}),b&&!t.forbidden)if(t.elseif||t.else)M=t,z=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(b.children),z&&z.if&&GM(z,{exp:M.elseif,block:M});else{if(t.slotScope){var o=t.slotTarget||'"default"';(b.scopedSlots||(b.scopedSlots={}))[o]=t}b.children.push(t),t.parent=b}var M,z;t.children=t.children.filter((function(t){return!t.slotScope})),a(t),t.pre&&(c=!1),LM(t.tag)&&(r=!1);for(var i=0;ic&&(z.push(n=t.slice(c,b)),M.push(JSON.stringify(n)));var r=Mb(p[1].trim());M.push("_s(".concat(r,")")),z.push({"@binding":r}),c=b+p[0].length}return c-1")+("true"===n?":(".concat(e,")"):":_q(".concat(e,",").concat(n,")"))),db(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(n,"):(").concat(M,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(p?"_n("+b+")":b,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(Wb(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(Wb(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(Wb(e,"$$c"),"}"),null,!0)}(t,p,b);else if("input"===n&&"radio"===M)!function(t,e,o){var p=o&&o.number,b=Ab(t,"value")||"null";b=p?"_n(".concat(b,")"):b,ib(t,"checked","_q(".concat(e,",").concat(b,")")),db(t,"change",Wb(e,b),null,!0)}(t,p,b);else if("input"===n||"textarea"===n)!function(t,e,o){var p=t.attrsMap.type;0;var b=o||{},n=b.lazy,M=b.number,z=b.trim,c=!n&&"range"!==p,r=n?"change":"range"===p?Lb:"input",i="$event.target.value";z&&(i="$event.target.value.trim()");M&&(i="_n(".concat(i,")"));var a=Wb(e,i);c&&(a="if($event.target.composing)return;".concat(a));ib(t,"value","(".concat(e,")")),db(t,r,a,null,!0),(z||M)&&db(t,"blur","$forceUpdate()")}(t,p,b);else{if(!H.isReservedTag(n))return hb(t,p,b),!1}return!0},text:function(t,e){e.value&&ib(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&ib(t,"innerHTML","_s(".concat(e.value,")"),e)}},Mz={expectHTML:!0,modules:oz,directives:nz,isPreTag:function(t){return"pre"===t},isUnaryTag:eM,mustUseProp:Op,canBeLeftOpenTag:oM,isReservedTag:Bp,getTagNamespace:Lp,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(oz)},zz=v((function(t){return f("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function cz(t,e){t&&(pz=zz(e.staticKeys||""),bz=e.isReservedTag||C,rz(t),iz(t,!1))}function rz(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||q(t.tag)||!bz(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(pz)))}(t),1===t.type){if(!bz(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,o=t.children.length;e|^function(?:\s+[\w$]+)?\s*\(/,Oz=/\([^)]*?\);*$/,sz=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,lz={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},dz={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"]},Az=function(t){return"if(".concat(t,")return null;")},uz={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Az("$event.target !== $event.currentTarget"),ctrl:Az("!$event.ctrlKey"),shift:Az("!$event.shiftKey"),alt:Az("!$event.altKey"),meta:Az("!$event.metaKey"),left:Az("'button' in $event && $event.button !== 0"),middle:Az("'button' in $event && $event.button !== 1"),right:Az("'button' in $event && $event.button !== 2")};function fz(t,e){var o=e?"nativeOn:":"on:",p="",b="";for(var n in t){var M=qz(t[n]);t[n]&&t[n].dynamic?b+="".concat(n,",").concat(M,","):p+='"'.concat(n,'":').concat(M,",")}return p="{".concat(p.slice(0,-1),"}"),b?o+"_d(".concat(p,",[").concat(b.slice(0,-1),"])"):o+p}function qz(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return qz(t)})).join(","),"]");var e=sz.test(t.value),o=az.test(t.value),p=sz.test(t.value.replace(Oz,""));if(t.modifiers){var b="",n="",M=[],z=function(e){if(uz[e])n+=uz[e],lz[e]&&M.push(e);else if("exact"===e){var o=t.modifiers;n+=Az(["ctrl","shift","alt","meta"].filter((function(t){return!o[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else M.push(e)};for(var c in t.modifiers)z(c);M.length&&(b+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(hz).join("&&"),")return null;")}(M)),n&&(b+=n);var r=e?"return ".concat(t.value,".apply(null, arguments)"):o?"return (".concat(t.value,").apply(null, arguments)"):p?"return ".concat(t.value):t.value;return"function($event){".concat(b).concat(r,"}")}return e||o?t.value:"function($event){".concat(p?"return ".concat(t.value):t.value,"}")}function hz(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var o=lz[t],p=dz[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(o),",")+"$event.key,"+"".concat(JSON.stringify(p))+")"}var Wz={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(o){return"_b(".concat(o,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:T},mz=function(t){this.options=t,this.warn=t.warn||cb,this.transforms=rb(t.modules,"transformCode"),this.dataGenFns=rb(t.modules,"genData"),this.directives=w(w({},Wz),t.directives);var e=t.isReservedTag||C;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function gz(t,e){var o=new mz(e),p=t?"script"===t.tag?"null":vz(t,o):'_c("div")';return{render:"with(this){return ".concat(p,"}"),staticRenderFns:o.staticRenderFns}}function vz(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Rz(t,e);if(t.once&&!t.onceProcessed)return yz(t,e);if(t.for&&!t.forProcessed)return Xz(t,e);if(t.if&&!t.ifProcessed)return Bz(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var o=t.slotName||'"default"',p=xz(t,e),b="_t(".concat(o).concat(p?",function(){return ".concat(p,"}"):""),n=t.attrs||t.dynamicAttrs?Sz((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:y(t.name),value:t.value,dynamic:t.dynamic}}))):null,M=t.attrsMap["v-bind"];!n&&!M||p||(b+=",null");n&&(b+=",".concat(n));M&&(b+="".concat(n?"":",null",",").concat(M));return b+")"}(t,e);var o=void 0;if(t.component)o=function(t,e,o){var p=e.inlineTemplate?null:xz(e,o,!0);return"_c(".concat(t,",").concat(_z(e,o)).concat(p?",".concat(p):"",")")}(t.component,t,e);else{var p=void 0,b=e.maybeComponent(t);(!t.plain||t.pre&&b)&&(p=_z(t,e));var n=void 0,M=e.options.bindings;b&&M&&!1!==M.__isScriptSetup&&(n=function(t,e){var o=y(e),p=B(o),b=function(b){return t[e]===b?e:t[o]===b?o:t[p]===b?p:void 0},n=b("setup-const")||b("setup-reactive-const");if(n)return n;var M=b("setup-let")||b("setup-ref")||b("setup-maybe-ref");if(M)return M}(M,t.tag)),n||(n="'".concat(t.tag,"'"));var z=t.inlineTemplate?null:xz(t,e,!0);o="_c(".concat(n).concat(p?",".concat(p):"").concat(z?",".concat(z):"",")")}for(var c=0;c>>0}(M)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(o+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var n=function(t,e){var o=t.children[0];0;if(o&&1===o.type){var p=gz(o,e.options);return"inlineTemplate:{render:function(){".concat(p.render,"},staticRenderFns:[").concat(p.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);n&&(o+="".concat(n,","))}return o=o.replace(/,$/,"")+"}",t.dynamicAttrs&&(o="_b(".concat(o,',"').concat(t.tag,'",').concat(Sz(t.dynamicAttrs),")")),t.wrapData&&(o=t.wrapData(o)),t.wrapListeners&&(o=t.wrapListeners(o)),o}function Nz(t){return 1===t.type&&("slot"===t.tag||t.children.some(Nz))}function wz(t,e){var o=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!o)return Bz(t,e,wz,"null");if(t.for&&!t.forProcessed)return Xz(t,e,wz);var p=t.slotScope===HM?"":String(t.slotScope),b="function(".concat(p,"){")+"return ".concat("template"===t.tag?t.if&&o?"(".concat(t.if,")?").concat(xz(t,e)||"undefined",":undefined"):xz(t,e)||"undefined":vz(t,e),"}"),n=p?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(b).concat(n,"}")}function xz(t,e,o,p,b){var n=t.children;if(n.length){var M=n[0];if(1===n.length&&M.for&&"template"!==M.tag&&"slot"!==M.tag){var z=o?e.maybeComponent(M)?",1":",0":"";return"".concat((p||vz)(M,e)).concat(z)}var c=o?function(t,e){for(var o=0,p=0;p':'
',jz.innerHTML.indexOf(" ")>0}var Uz=!!K&&Hz(!1),Vz=!!K&&Hz(!0),$z=v((function(t){var e=Np(t);return e&&e.innerHTML})),Yz=ep.prototype.$mount;ep.prototype.$mount=function(t,e){if((t=t&&Np(t))===document.body||t===document.documentElement)return this;var o=this.$options;if(!o.render){var p=o.template;if(p)if("string"==typeof p)"#"===p.charAt(0)&&(p=$z(p));else{if(!p.nodeType)return this;p=p.innerHTML}else t&&(p=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(p){0;var b=Fz(p,{outputSourceRange:!1,shouldDecodeNewlines:Uz,shouldDecodeNewlinesForHref:Vz,delimiters:o.delimiters,comments:o.comments},this),n=b.render,M=b.staticRenderFns;o.render=n,o.staticRenderFns=M}}return Yz.call(this,t,e)},ep.compile=Fz;var Gz=o(8),Jz=o.n(Gz);function Kz(t){return function(t){if(Array.isArray(t))return Qz(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Qz(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Qz(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qz(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,p=new Array(e);o{const e=bc.call(t);return zc[e]||(zc[e]=e.slice(8,-1).toLowerCase())});var zc;const cc=t=>(t=t.toLowerCase(),e=>Mc(e)===t),rc=t=>e=>typeof e===t,{isArray:ic}=Array,ac=rc("undefined");const Oc=cc("ArrayBuffer");const sc=rc("string"),lc=rc("function"),dc=rc("number"),Ac=t=>null!==t&&"object"==typeof t,uc=t=>{if("object"!==Mc(t))return!1;const e=nc(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},fc=cc("Date"),qc=cc("File"),hc=cc("Blob"),Wc=cc("FileList"),mc=cc("URLSearchParams");function gc(t,e,{allOwnKeys:o=!1}={}){if(null==t)return;let p,b;if("object"!=typeof t&&(t=[t]),ic(t))for(p=0,b=t.length;p0;)if(p=o[b],e===p.toLowerCase())return p;return null}const Rc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,yc=t=>!ac(t)&&t!==Rc;const Bc=(Lc="undefined"!=typeof Uint8Array&&nc(Uint8Array),t=>Lc&&t instanceof Lc);var Lc;const Xc=cc("HTMLFormElement"),_c=(({hasOwnProperty:t})=>(e,o)=>t.call(e,o))(Object.prototype),Nc=cc("RegExp"),wc=(t,e)=>{const o=Object.getOwnPropertyDescriptors(t),p={};gc(o,((o,b)=>{!1!==e(o,b,t)&&(p[b]=o)})),Object.defineProperties(t,p)},xc="abcdefghijklmnopqrstuvwxyz",Tc="0123456789",Cc={DIGIT:Tc,ALPHA:xc,ALPHA_DIGIT:xc+xc.toUpperCase()+Tc};const Sc={isArray:ic,isArrayBuffer:Oc,isBuffer:function(t){return null!==t&&!ac(t)&&null!==t.constructor&&!ac(t.constructor)&&lc(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||bc.call(t)===e||lc(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Oc(t.buffer),e},isString:sc,isNumber:dc,isBoolean:t=>!0===t||!1===t,isObject:Ac,isPlainObject:uc,isUndefined:ac,isDate:fc,isFile:qc,isBlob:hc,isRegExp:Nc,isFunction:lc,isStream:t=>Ac(t)&&lc(t.pipe),isURLSearchParams:mc,isTypedArray:Bc,isFileList:Wc,forEach:gc,merge:function t(){const{caseless:e}=yc(this)&&this||{},o={},p=(p,b)=>{const n=e&&vc(o,b)||b;uc(o[n])&&uc(p)?o[n]=t(o[n],p):uc(p)?o[n]=t({},p):ic(p)?o[n]=p.slice():o[n]=p};for(let t=0,e=arguments.length;t(gc(e,((e,p)=>{o&&lc(e)?t[p]=pc(e,o):t[p]=e}),{allOwnKeys:p}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,o,p)=>{t.prototype=Object.create(e.prototype,p),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),o&&Object.assign(t.prototype,o)},toFlatObject:(t,e,o,p)=>{let b,n,M;const z={};if(e=e||{},null==t)return e;do{for(b=Object.getOwnPropertyNames(t),n=b.length;n-- >0;)M=b[n],p&&!p(M,t,e)||z[M]||(e[M]=t[M],z[M]=!0);t=!1!==o&&nc(t)}while(t&&(!o||o(t,e))&&t!==Object.prototype);return e},kindOf:Mc,kindOfTest:cc,endsWith:(t,e,o)=>{t=String(t),(void 0===o||o>t.length)&&(o=t.length),o-=e.length;const p=t.indexOf(e,o);return-1!==p&&p===o},toArray:t=>{if(!t)return null;if(ic(t))return t;let e=t.length;if(!dc(e))return null;const o=new Array(e);for(;e-- >0;)o[e]=t[e];return o},forEachEntry:(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let p;for(;(p=o.next())&&!p.done;){const o=p.value;e.call(t,o[0],o[1])}},matchAll:(t,e)=>{let o;const p=[];for(;null!==(o=t.exec(e));)p.push(o);return p},isHTMLForm:Xc,hasOwnProperty:_c,hasOwnProp:_c,reduceDescriptors:wc,freezeMethods:t=>{wc(t,((e,o)=>{if(lc(t)&&-1!==["arguments","caller","callee"].indexOf(o))return!1;const p=t[o];lc(p)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")}))}))},toObjectSet:(t,e)=>{const o={},p=t=>{t.forEach((t=>{o[t]=!0}))};return ic(t)?p(t):p(String(t).split(e)),o},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,o){return e.toUpperCase()+o})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:vc,global:Rc,isContextDefined:yc,ALPHABET:Cc,generateString:(t=16,e=Cc.ALPHA_DIGIT)=>{let o="";const{length:p}=e;for(;t--;)o+=e[Math.random()*p|0];return o},isSpecCompliantForm:function(t){return!!(t&&lc(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),o=(t,p)=>{if(Ac(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[p]=t;const b=ic(t)?[]:{};return gc(t,((t,e)=>{const n=o(t,p+1);!ac(n)&&(b[e]=n)})),e[p]=void 0,b}}return t};return o(t,0)}};function kc(t,e,o,p,b){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),o&&(this.config=o),p&&(this.request=p),b&&(this.response=b)}Sc.inherits(kc,Error,{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:Sc.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ec=kc.prototype,Dc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Dc[t]={value:t}})),Object.defineProperties(kc,Dc),Object.defineProperty(Ec,"isAxiosError",{value:!0}),kc.from=(t,e,o,p,b,n)=>{const M=Object.create(Ec);return Sc.toFlatObject(t,M,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),kc.call(M,t.message,e,o,p,b),M.cause=t,M.name=t.name,n&&Object.assign(M,n),M};const Pc=kc;var jc=o(764).lW;function Ic(t){return Sc.isPlainObject(t)||Sc.isArray(t)}function Fc(t){return Sc.endsWith(t,"[]")?t.slice(0,-2):t}function Hc(t,e,o){return t?t.concat(e).map((function(t,e){return t=Fc(t),!o&&e?"["+t+"]":t})).join(o?".":""):e}const Uc=Sc.toFlatObject(Sc,{},null,(function(t){return/^is[A-Z]/.test(t)}));const Vc=function(t,e,o){if(!Sc.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const p=(o=Sc.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!Sc.isUndefined(e[t])}))).metaTokens,b=o.visitor||r,n=o.dots,M=o.indexes,z=(o.Blob||"undefined"!=typeof Blob&&Blob)&&Sc.isSpecCompliantForm(e);if(!Sc.isFunction(b))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(Sc.isDate(t))return t.toISOString();if(!z&&Sc.isBlob(t))throw new Pc("Blob is not supported. Use a Buffer instead.");return Sc.isArrayBuffer(t)||Sc.isTypedArray(t)?z&&"function"==typeof Blob?new Blob([t]):jc.from(t):t}function r(t,o,b){let z=t;if(t&&!b&&"object"==typeof t)if(Sc.endsWith(o,"{}"))o=p?o:o.slice(0,-2),t=JSON.stringify(t);else if(Sc.isArray(t)&&function(t){return Sc.isArray(t)&&!t.some(Ic)}(t)||(Sc.isFileList(t)||Sc.endsWith(o,"[]"))&&(z=Sc.toArray(t)))return o=Fc(o),z.forEach((function(t,p){!Sc.isUndefined(t)&&null!==t&&e.append(!0===M?Hc([o],p,n):null===M?o:o+"[]",c(t))})),!1;return!!Ic(t)||(e.append(Hc(b,o,n),c(t)),!1)}const i=[],a=Object.assign(Uc,{defaultVisitor:r,convertValue:c,isVisitable:Ic});if(!Sc.isObject(t))throw new TypeError("data must be an object");return function t(o,p){if(!Sc.isUndefined(o)){if(-1!==i.indexOf(o))throw Error("Circular reference detected in "+p.join("."));i.push(o),Sc.forEach(o,(function(o,n){!0===(!(Sc.isUndefined(o)||null===o)&&b.call(e,o,Sc.isString(n)?n.trim():n,p,a))&&t(o,p?p.concat(n):[n])})),i.pop()}}(t),e};function $c(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Yc(t,e){this._pairs=[],t&&Vc(t,this,e)}const Gc=Yc.prototype;Gc.append=function(t,e){this._pairs.push([t,e])},Gc.toString=function(t){const e=t?function(e){return t.call(this,e,$c)}:$c;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const Jc=Yc;function Kc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Qc(t,e,o){if(!e)return t;const p=o&&o.encode||Kc,b=o&&o.serialize;let n;if(n=b?b(e,o):Sc.isURLSearchParams(e)?e.toString():new Jc(e,o).toString(p),n){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t}const Zc=class{constructor(){this.handlers=[]}use(t,e,o){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!o&&o.synchronous,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Sc.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},tr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},er="undefined"!=typeof URLSearchParams?URLSearchParams:Jc,or=FormData,pr=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),br="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,nr={isBrowser:!0,classes:{URLSearchParams:er,FormData:or,Blob},isStandardBrowserEnv:pr,isStandardBrowserWebWorkerEnv:br,protocols:["http","https","file","blob","url","data"]};const Mr=function(t){function e(t,o,p,b){let n=t[b++];const M=Number.isFinite(+n),z=b>=t.length;if(n=!n&&Sc.isArray(p)?p.length:n,z)return Sc.hasOwnProp(p,n)?p[n]=[p[n],o]:p[n]=o,!M;p[n]&&Sc.isObject(p[n])||(p[n]=[]);return e(t,o,p[n],b)&&Sc.isArray(p[n])&&(p[n]=function(t){const e={},o=Object.keys(t);let p;const b=o.length;let n;for(p=0;p{e(function(t){return Sc.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),p,o,0)})),o}return null},zr={"Content-Type":void 0};const cr={transitional:tr,adapter:["xhr","http"],transformRequest:[function(t,e){const o=e.getContentType()||"",p=o.indexOf("application/json")>-1,b=Sc.isObject(t);b&&Sc.isHTMLForm(t)&&(t=new FormData(t));if(Sc.isFormData(t))return p&&p?JSON.stringify(Mr(t)):t;if(Sc.isArrayBuffer(t)||Sc.isBuffer(t)||Sc.isStream(t)||Sc.isFile(t)||Sc.isBlob(t))return t;if(Sc.isArrayBufferView(t))return t.buffer;if(Sc.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let n;if(b){if(o.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Vc(t,new nr.classes.URLSearchParams,Object.assign({visitor:function(t,e,o,p){return nr.isNode&&Sc.isBuffer(t)?(this.append(e,t.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((n=Sc.isFileList(t))||o.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Vc(n?{"files[]":t}:t,e&&new e,this.formSerializer)}}return b||p?(e.setContentType("application/json",!1),function(t,e,o){if(Sc.isString(t))try{return(e||JSON.parse)(t),Sc.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(o||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||cr.transitional,o=e&&e.forcedJSONParsing,p="json"===this.responseType;if(t&&Sc.isString(t)&&(o&&!this.responseType||p)){const o=!(e&&e.silentJSONParsing)&&p;try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw Pc.from(t,Pc.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nr.classes.FormData,Blob:nr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Sc.forEach(["delete","get","head"],(function(t){cr.headers[t]={}})),Sc.forEach(["post","put","patch"],(function(t){cr.headers[t]=Sc.merge(zr)}));const rr=cr,ir=Sc.toObjectSet(["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"]),ar=Symbol("internals");function Or(t){return t&&String(t).trim().toLowerCase()}function sr(t){return!1===t||null==t?t:Sc.isArray(t)?t.map(sr):String(t)}function lr(t,e,o,p){return Sc.isFunction(p)?p.call(this,e,o):Sc.isString(e)?Sc.isString(p)?-1!==e.indexOf(p):Sc.isRegExp(p)?p.test(e):void 0:void 0}class dr{constructor(t){t&&this.set(t)}set(t,e,o){const p=this;function b(t,e,o){const b=Or(e);if(!b)throw new Error("header name must be a non-empty string");const n=Sc.findKey(p,b);(!n||void 0===p[n]||!0===o||void 0===o&&!1!==p[n])&&(p[n||e]=sr(t))}const n=(t,e)=>Sc.forEach(t,((t,o)=>b(t,o,e)));return Sc.isPlainObject(t)||t instanceof this.constructor?n(t,e):Sc.isString(t)&&(t=t.trim())&&!function(t){return/^[-_a-zA-Z]+$/.test(t.trim())}(t)?n((t=>{const e={};let o,p,b;return t&&t.split("\n").forEach((function(t){b=t.indexOf(":"),o=t.substring(0,b).trim().toLowerCase(),p=t.substring(b+1).trim(),!o||e[o]&&ir[o]||("set-cookie"===o?e[o]?e[o].push(p):e[o]=[p]:e[o]=e[o]?e[o]+", "+p:p)})),e})(t),e):null!=t&&b(e,t,o),this}get(t,e){if(t=Or(t)){const o=Sc.findKey(this,t);if(o){const t=this[o];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let p;for(;p=o.exec(t);)e[p[1]]=p[2];return e}(t);if(Sc.isFunction(e))return e.call(this,t,o);if(Sc.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Or(t)){const o=Sc.findKey(this,t);return!(!o||void 0===this[o]||e&&!lr(0,this[o],o,e))}return!1}delete(t,e){const o=this;let p=!1;function b(t){if(t=Or(t)){const b=Sc.findKey(o,t);!b||e&&!lr(0,o[b],b,e)||(delete o[b],p=!0)}}return Sc.isArray(t)?t.forEach(b):b(t),p}clear(t){const e=Object.keys(this);let o=e.length,p=!1;for(;o--;){const b=e[o];t&&!lr(0,this[b],b,t)||(delete this[b],p=!0)}return p}normalize(t){const e=this,o={};return Sc.forEach(this,((p,b)=>{const n=Sc.findKey(o,b);if(n)return e[n]=sr(p),void delete e[b];const M=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,o)=>e.toUpperCase()+o))}(b):String(b).trim();M!==b&&delete e[b],e[M]=sr(p),o[M]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Sc.forEach(this,((o,p)=>{null!=o&&!1!==o&&(e[p]=t&&Sc.isArray(o)?o.join(", "):o)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const o=new this(t);return e.forEach((t=>o.set(t))),o}static accessor(t){const e=(this[ar]=this[ar]={accessors:{}}).accessors,o=this.prototype;function p(t){const p=Or(t);e[p]||(!function(t,e){const o=Sc.toCamelCase(" "+e);["get","set","has"].forEach((p=>{Object.defineProperty(t,p+o,{value:function(t,o,b){return this[p].call(this,e,t,o,b)},configurable:!0})}))}(o,t),e[p]=!0)}return Sc.isArray(t)?t.forEach(p):p(t),this}}dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Sc.freezeMethods(dr.prototype),Sc.freezeMethods(dr);const Ar=dr;function ur(t,e){const o=this||rr,p=e||o,b=Ar.from(p.headers);let n=p.data;return Sc.forEach(t,(function(t){n=t.call(o,n,b.normalize(),e?e.status:void 0)})),b.normalize(),n}function fr(t){return!(!t||!t.__CANCEL__)}function qr(t,e,o){Pc.call(this,null==t?"canceled":t,Pc.ERR_CANCELED,e,o),this.name="CanceledError"}Sc.inherits(qr,Pc,{__CANCEL__:!0});const hr=qr;const Wr=nr.isStandardBrowserEnv?{write:function(t,e,o,p,b,n){const M=[];M.push(t+"="+encodeURIComponent(e)),Sc.isNumber(o)&&M.push("expires="+new Date(o).toGMTString()),Sc.isString(p)&&M.push("path="+p),Sc.isString(b)&&M.push("domain="+b),!0===n&&M.push("secure"),document.cookie=M.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function mr(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const gr=nr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let o;function p(o){let p=o;return t&&(e.setAttribute("href",p),p=e.href),e.setAttribute("href",p),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return o=p(window.location.href),function(t){const e=Sc.isString(t)?p(t):t;return e.protocol===o.protocol&&e.host===o.host}}():function(){return!0};const vr=function(t,e){t=t||10;const o=new Array(t),p=new Array(t);let b,n=0,M=0;return e=void 0!==e?e:1e3,function(z){const c=Date.now(),r=p[M];b||(b=c),o[n]=z,p[n]=c;let i=M,a=0;for(;i!==n;)a+=o[i++],i%=t;if(n=(n+1)%t,n===M&&(M=(M+1)%t),c-b{const n=b.loaded,M=b.lengthComputable?b.total:void 0,z=n-o,c=p(z);o=n;const r={loaded:n,total:M,progress:M?n/M:void 0,bytes:z,rate:c||void 0,estimated:c&&M&&n<=M?(M-n)/c:void 0,event:b};r[e?"download":"upload"]=!0,t(r)}}const yr="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,o){let p=t.data;const b=Ar.from(t.headers).normalize(),n=t.responseType;let M;function z(){t.cancelToken&&t.cancelToken.unsubscribe(M),t.signal&&t.signal.removeEventListener("abort",M)}Sc.isFormData(p)&&(nr.isStandardBrowserEnv||nr.isStandardBrowserWebWorkerEnv)&&b.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",o=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";b.set("Authorization","Basic "+btoa(e+":"+o))}const r=mr(t.baseURL,t.url);function i(){if(!c)return;const p=Ar.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,o){const p=o.config.validateStatus;o.status&&p&&!p(o.status)?e(new Pc("Request failed with status code "+o.status,[Pc.ERR_BAD_REQUEST,Pc.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o)):t(o)}((function(t){e(t),z()}),(function(t){o(t),z()}),{data:n&&"text"!==n&&"json"!==n?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:p,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Qc(r,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=i:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(i)},c.onabort=function(){c&&(o(new Pc("Request aborted",Pc.ECONNABORTED,t,c)),c=null)},c.onerror=function(){o(new Pc("Network Error",Pc.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const p=t.transitional||tr;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),o(new Pc(e,p.clarifyTimeoutError?Pc.ETIMEDOUT:Pc.ECONNABORTED,t,c)),c=null},nr.isStandardBrowserEnv){const e=(t.withCredentials||gr(r))&&t.xsrfCookieName&&Wr.read(t.xsrfCookieName);e&&b.set(t.xsrfHeaderName,e)}void 0===p&&b.setContentType(null),"setRequestHeader"in c&&Sc.forEach(b.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),Sc.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),n&&"json"!==n&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Rr(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Rr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(M=e=>{c&&(o(!e||e.type?new hr(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(M),t.signal&&(t.signal.aborted?M():t.signal.addEventListener("abort",M)));const a=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r);a&&-1===nr.protocols.indexOf(a)?o(new Pc("Unsupported protocol "+a+":",Pc.ERR_BAD_REQUEST,t)):c.send(p||null)}))},Br={http:null,xhr:yr};Sc.forEach(Br,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Lr=t=>{t=Sc.isArray(t)?t:[t];const{length:e}=t;let o,p;for(let b=0;bt instanceof Ar?t.toJSON():t;function wr(t,e){e=e||{};const o={};function p(t,e,o){return Sc.isPlainObject(t)&&Sc.isPlainObject(e)?Sc.merge.call({caseless:o},t,e):Sc.isPlainObject(e)?Sc.merge({},e):Sc.isArray(e)?e.slice():e}function b(t,e,o){return Sc.isUndefined(e)?Sc.isUndefined(t)?void 0:p(void 0,t,o):p(t,e,o)}function n(t,e){if(!Sc.isUndefined(e))return p(void 0,e)}function M(t,e){return Sc.isUndefined(e)?Sc.isUndefined(t)?void 0:p(void 0,t):p(void 0,e)}function z(o,b,n){return n in e?p(o,b):n in t?p(void 0,o):void 0}const c={url:n,method:n,data:n,baseURL:M,transformRequest:M,transformResponse:M,paramsSerializer:M,timeout:M,timeoutMessage:M,withCredentials:M,adapter:M,responseType:M,xsrfCookieName:M,xsrfHeaderName:M,onUploadProgress:M,onDownloadProgress:M,decompress:M,maxContentLength:M,maxBodyLength:M,beforeRedirect:M,transport:M,httpAgent:M,httpsAgent:M,cancelToken:M,socketPath:M,responseEncoding:M,validateStatus:z,headers:(t,e)=>b(Nr(t),Nr(e),!0)};return Sc.forEach(Object.keys(t).concat(Object.keys(e)),(function(p){const n=c[p]||b,M=n(t[p],e[p],p);Sc.isUndefined(M)&&n!==z||(o[p]=M)})),o}const xr="1.3.2",Tr={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Tr[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}}));const Cr={};Tr.transitional=function(t,e,o){return(p,b,n)=>{if(!1===t)throw new Pc(function(t,e){return"[Axios v1.3.2] Transitional option '"+t+"'"+e+(o?". "+o:"")}(b," has been removed"+(e?" in "+e:"")),Pc.ERR_DEPRECATED);return e&&!Cr[b]&&(Cr[b]=!0),!t||t(p,b,n)}};const Sr={assertOptions:function(t,e,o){if("object"!=typeof t)throw new Pc("options must be an object",Pc.ERR_BAD_OPTION_VALUE);const p=Object.keys(t);let b=p.length;for(;b-- >0;){const n=p[b],M=e[n];if(M){const e=t[n],o=void 0===e||M(e,n,t);if(!0!==o)throw new Pc("option "+n+" must be "+o,Pc.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new Pc("Unknown option "+n,Pc.ERR_BAD_OPTION)}},validators:Tr},kr=Sr.validators;class Er{constructor(t){this.defaults=t,this.interceptors={request:new Zc,response:new Zc}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=wr(this.defaults,e);const{transitional:o,paramsSerializer:p,headers:b}=e;let n;void 0!==o&&Sr.assertOptions(o,{silentJSONParsing:kr.transitional(kr.boolean),forcedJSONParsing:kr.transitional(kr.boolean),clarifyTimeoutError:kr.transitional(kr.boolean)},!1),void 0!==p&&Sr.assertOptions(p,{encode:kr.function,serialize:kr.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),n=b&&Sc.merge(b.common,b[e.method]),n&&Sc.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete b[t]})),e.headers=Ar.concat(n,b);const M=[];let z=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(z=z&&t.synchronous,M.unshift(t.fulfilled,t.rejected))}));const c=[];let r;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let i,a=0;if(!z){const t=[_r.bind(this),void 0];for(t.unshift.apply(t,M),t.push.apply(t,c),i=t.length,r=Promise.resolve(e);a{if(!o._listeners)return;let e=o._listeners.length;for(;e-- >0;)o._listeners[e](t);o._listeners=null})),this.promise.then=t=>{let e;const p=new Promise((t=>{o.subscribe(t),e=t})).then(t);return p.cancel=function(){o.unsubscribe(e)},p},t((function(t,p,b){o.reason||(o.reason=new hr(t,p,b),e(o.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Pr((function(e){t=e})),cancel:t}}}const jr=Pr;const Ir={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ir).forEach((([t,e])=>{Ir[e]=t}));const Fr=Ir;const Hr=function t(e){const o=new Dr(e),p=pc(Dr.prototype.request,o);return Sc.extend(p,Dr.prototype,o,{allOwnKeys:!0}),Sc.extend(p,o,null,{allOwnKeys:!0}),p.create=function(o){return t(wr(e,o))},p}(rr);Hr.Axios=Dr,Hr.CanceledError=hr,Hr.CancelToken=jr,Hr.isCancel=fr,Hr.VERSION=xr,Hr.toFormData=Vc,Hr.AxiosError=Pc,Hr.Cancel=Hr.CanceledError,Hr.all=function(t){return Promise.all(t)},Hr.spread=function(t){return function(e){return t.apply(null,e)}},Hr.isAxiosError=function(t){return Sc.isObject(t)&&!0===t.isAxiosError},Hr.mergeConfig=wr,Hr.AxiosHeaders=Ar,Hr.formToJSON=t=>Mr(Sc.isHTMLForm(t)?new FormData(t):t),Hr.HttpStatusCode=Fr,Hr.default=Hr;const Ur=Hr,Vr=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"dashboard",component:o(122).Z},{path:"/monitoring",name:"monitoring",component:o(161).Z},{path:"/monitoring/:tag",component:o(997).Z,children:[{path:"jobs",name:"monitoring-jobs",component:o(790).Z,props:{type:"jobs"}},{path:"failed",name:"monitoring-failed",component:o(790).Z,props:{type:"failed"}}]},{path:"/metrics",redirect:"/metrics/jobs"},{path:"/metrics/",component:o(20).Z,children:[{path:"jobs",name:"metrics-jobs",component:o(253).Z},{path:"queues",name:"metrics-queues",component:o(871).Z}]},{path:"/metrics/:type/:slug",name:"metrics-preview",component:o(295).Z},{path:"/jobs/:type",name:"jobs",component:o(347).Z},{path:"/jobs/pending/:jobId",name:"pending-jobs-preview",component:o(967).Z},{path:"/jobs/completed/:jobId",name:"completed-jobs-preview",component:o(967).Z},{path:"/jobs/silenced/:jobId",name:"silenced-jobs-preview",component:o(967).Z},{path:"/failed",name:"failed-jobs",component:o(404).Z},{path:"/failed/:jobId",name:"failed-jobs-preview",component:o(5).Z},{path:"/batches",name:"batches",component:o(472).Z},{path:"/batches/:batchId",name:"batches-preview",component:o(681).Z}];function $r(t,e){for(var o in e)t[o]=e[o];return t}var Yr=/[!'()*]/g,Gr=function(t){return"%"+t.charCodeAt(0).toString(16)},Jr=/%2C/g,Kr=function(t){return encodeURIComponent(t).replace(Yr,Gr).replace(Jr,",")};function Qr(t){try{return decodeURIComponent(t)}catch(t){0}return t}var Zr=function(t){return null==t||"object"==typeof t?t:String(t)};function ti(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var o=t.replace(/\+/g," ").split("="),p=Qr(o.shift()),b=o.length>0?Qr(o.join("=")):null;void 0===e[p]?e[p]=b:Array.isArray(e[p])?e[p].push(b):e[p]=[e[p],b]})),e):e}function ei(t){var e=t?Object.keys(t).map((function(e){var o=t[e];if(void 0===o)return"";if(null===o)return Kr(e);if(Array.isArray(o)){var p=[];return o.forEach((function(t){void 0!==t&&(null===t?p.push(Kr(e)):p.push(Kr(e)+"="+Kr(t)))})),p.join("&")}return Kr(e)+"="+Kr(o)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var oi=/\/?$/;function pi(t,e,o,p){var b=p&&p.options.stringifyQuery,n=e.query||{};try{n=bi(n)}catch(t){}var M={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:n,params:e.params||{},fullPath:zi(e,b),matched:t?Mi(t):[]};return o&&(M.redirectedFrom=zi(o,b)),Object.freeze(M)}function bi(t){if(Array.isArray(t))return t.map(bi);if(t&&"object"==typeof t){var e={};for(var o in t)e[o]=bi(t[o]);return e}return t}var ni=pi(null,{path:"/"});function Mi(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function zi(t,e){var o=t.path,p=t.query;void 0===p&&(p={});var b=t.hash;return void 0===b&&(b=""),(o||"/")+(e||ei)(p)+b}function ci(t,e,o){return e===ni?t===e:!!e&&(t.path&&e.path?t.path.replace(oi,"")===e.path.replace(oi,"")&&(o||t.hash===e.hash&&ri(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(o||t.hash===e.hash&&ri(t.query,e.query)&&ri(t.params,e.params))))}function ri(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var o=Object.keys(t).sort(),p=Object.keys(e).sort();return o.length===p.length&&o.every((function(o,b){var n=t[o];if(p[b]!==o)return!1;var M=e[o];return null==n||null==M?n===M:"object"==typeof n&&"object"==typeof M?ri(n,M):String(n)===String(M)}))}function ii(t){for(var e=0;e=0&&(e=t.slice(p),t=t.slice(0,p));var b=t.indexOf("?");return b>=0&&(o=t.slice(b+1),t=t.slice(0,b)),{path:t,query:o,hash:e}}(b.path||""),r=e&&e.path||"/",i=c.path?si(c.path,r,o||b.append):r,a=function(t,e,o){void 0===e&&(e={});var p,b=o||ti;try{p=b(t||"")}catch(t){p={}}for(var n in e){var M=e[n];p[n]=Array.isArray(M)?M.map(Zr):Zr(M)}return p}(c.query,b.query,p&&p.options.parseQuery),O=b.hash||c.hash;return O&&"#"!==O.charAt(0)&&(O="#"+O),{_normalized:!0,path:i,query:a,hash:O}}var Ci,Si=function(){},ki={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(t){var e=this,o=this.$router,p=this.$route,b=o.resolve(this.to,p,this.append),n=b.location,M=b.route,z=b.href,c={},r=o.options.linkActiveClass,i=o.options.linkExactActiveClass,a=null==r?"router-link-active":r,O=null==i?"router-link-exact-active":i,s=null==this.activeClass?a:this.activeClass,l=null==this.exactActiveClass?O:this.exactActiveClass,d=M.redirectedFrom?pi(null,Ti(M.redirectedFrom),null,o):M;c[l]=ci(p,d,this.exactPath),c[s]=this.exact||this.exactPath?c[l]:function(t,e){return 0===t.path.replace(oi,"/").indexOf(e.path.replace(oi,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var o in e)if(!(o in t))return!1;return!0}(t.query,e.query)}(p,d);var A=c[l]?this.ariaCurrentValue:null,u=function(t){Ei(t)&&(e.replace?o.replace(n,Si):o.push(n,Si))},f={click:Ei};Array.isArray(this.event)?this.event.forEach((function(t){f[t]=u})):f[this.event]=u;var q={class:c},h=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:z,route:M,navigate:u,isActive:c[s],isExactActive:c[l]});if(h){if(1===h.length)return h[0];if(h.length>1||!h.length)return 0===h.length?t():t("span",{},h)}if("a"===this.tag)q.on=f,q.attrs={href:z,"aria-current":A};else{var W=Di(this.$slots.default);if(W){W.isStatic=!1;var m=W.data=$r({},W.data);for(var g in m.on=m.on||{},m.on){var v=m.on[g];g in f&&(m.on[g]=Array.isArray(v)?v:[v])}for(var R in f)R in m.on?m.on[R].push(f[R]):m.on[R]=u;var y=W.data.attrs=$r({},W.data.attrs);y.href=z,y["aria-current"]=A}else q.on=f}return t(this.tag,q,this.$slots.default)}};function Ei(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Di(t){if(t)for(var e,o=0;o-1&&(z.params[O]=o.params[O]);return z.path=xi(i.path,z.params),c(i,z,M)}if(z.path){z.params={};for(var s=0;s-1}function ua(t,e){return Aa(t)&&t._isRouter&&(null==e||t.type===e)}function fa(t,e,o){var p=function(b){b>=t.length?o():t[b]?e(t[b],(function(){p(b+1)})):p(b+1)};p(0)}function qa(t){return function(e,o,p){var b=!1,n=0,M=null;ha(t,(function(t,e,o,z){if("function"==typeof t&&void 0===t.cid){b=!0,n++;var c,r=ga((function(e){var b;((b=e).__esModule||ma&&"Module"===b[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:Ci.extend(e),o.components[z]=e,--n<=0&&p()})),i=ga((function(t){var e="Failed to resolve async component "+z+": "+t;M||(M=Aa(t)?t:new Error(e),p(M))}));try{c=t(r,i)}catch(t){i(t)}if(c)if("function"==typeof c.then)c.then(r,i);else{var a=c.component;a&&"function"==typeof a.then&&a.then(r,i)}}})),b||p()}}function ha(t,e){return Wa(t.map((function(t){return Object.keys(t.components).map((function(o){return e(t.components[o],t.instances[o],t,o)}))})))}function Wa(t){return Array.prototype.concat.apply([],t)}var ma="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function ga(t){var e=!1;return function(){for(var o=[],p=arguments.length;p--;)o[p]=arguments[p];if(!e)return e=!0,t.apply(this,o)}}var va=function(t,e){this.router=t,this.base=function(t){if(!t)if(Pi){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=ni,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Ra(t,e,o,p){var b=ha(t,(function(t,p,b,n){var M=function(t,e){"function"!=typeof t&&(t=Ci.extend(t));return t.options[e]}(t,e);if(M)return Array.isArray(M)?M.map((function(t){return o(t,p,b,n)})):o(M,p,b,n)}));return Wa(p?b.reverse():b)}function ya(t,e){if(e)return function(){return t.apply(e,arguments)}}va.prototype.listen=function(t){this.cb=t},va.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},va.prototype.onError=function(t){this.errorCbs.push(t)},va.prototype.transitionTo=function(t,e,o){var p,b=this;try{p=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var n=this.current;this.confirmTransition(p,(function(){b.updateRoute(p),e&&e(p),b.ensureURL(),b.router.afterHooks.forEach((function(t){t&&t(p,n)})),b.ready||(b.ready=!0,b.readyCbs.forEach((function(t){t(p)})))}),(function(t){o&&o(t),t&&!b.ready&&(ua(t,aa.redirected)&&n===ni||(b.ready=!0,b.readyErrorCbs.forEach((function(e){e(t)}))))}))},va.prototype.confirmTransition=function(t,e,o){var p=this,b=this.current;this.pending=t;var n,M,z=function(t){!ua(t)&&Aa(t)&&p.errorCbs.length&&p.errorCbs.forEach((function(e){e(t)})),o&&o(t)},c=t.matched.length-1,r=b.matched.length-1;if(ci(t,b)&&c===r&&t.matched[c]===b.matched[r])return this.ensureURL(),t.hash&&Zi(this.router,b,t,!1),z(((M=la(n=b,t,aa.duplicated,'Avoided redundant navigation to current location: "'+n.fullPath+'".')).name="NavigationDuplicated",M));var i=function(t,e){var o,p=Math.max(t.length,e.length);for(o=0;o0)){var e=this.router,o=e.options.scrollBehavior,p=ca&&o;p&&this.listeners.push(Qi());var b=function(){var o=t.current,b=La(t.base);t.current===ni&&b===t._startLocation||t.transitionTo(b,(function(t){p&&Zi(e,t,o,!0)}))};window.addEventListener("popstate",b),this.listeners.push((function(){window.removeEventListener("popstate",b)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,o){var p=this,b=this.current;this.transitionTo(t,(function(t){ra(li(p.base+t.fullPath)),Zi(p.router,t,b,!1),e&&e(t)}),o)},e.prototype.replace=function(t,e,o){var p=this,b=this.current;this.transitionTo(t,(function(t){ia(li(p.base+t.fullPath)),Zi(p.router,t,b,!1),e&&e(t)}),o)},e.prototype.ensureURL=function(t){if(La(this.base)!==this.current.fullPath){var e=li(this.base+this.current.fullPath);t?ra(e):ia(e)}},e.prototype.getCurrentLocation=function(){return La(this.base)},e}(va);function La(t){var e=window.location.pathname,o=e.toLowerCase(),p=t.toLowerCase();return!t||o!==p&&0!==o.indexOf(li(p+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Xa=function(t){function e(e,o,p){t.call(this,e,o),p&&function(t){var e=La(t);if(!/^\/#/.test(e))return window.location.replace(li(t+"/#"+e)),!0}(this.base)||_a()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,o=ca&&e;o&&this.listeners.push(Qi());var p=function(){var e=t.current;_a()&&t.transitionTo(Na(),(function(p){o&&Zi(t.router,p,e,!0),ca||Ta(p.fullPath)}))},b=ca?"popstate":"hashchange";window.addEventListener(b,p),this.listeners.push((function(){window.removeEventListener(b,p)}))}},e.prototype.push=function(t,e,o){var p=this,b=this.current;this.transitionTo(t,(function(t){xa(t.fullPath),Zi(p.router,t,b,!1),e&&e(t)}),o)},e.prototype.replace=function(t,e,o){var p=this,b=this.current;this.transitionTo(t,(function(t){Ta(t.fullPath),Zi(p.router,t,b,!1),e&&e(t)}),o)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Na()!==e&&(t?xa(e):Ta(e))},e.prototype.getCurrentLocation=function(){return Na()},e}(va);function _a(){var t=Na();return"/"===t.charAt(0)||(Ta("/"+t),!1)}function Na(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function wa(t){var e=window.location.href,o=e.indexOf("#");return(o>=0?e.slice(0,o):e)+"#"+t}function xa(t){ca?ra(wa(t)):window.location.hash=t}function Ta(t){ca?ia(wa(t)):window.location.replace(wa(t))}var Ca=function(t){function e(e,o){t.call(this,e,o),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,o){var p=this;this.transitionTo(t,(function(t){p.stack=p.stack.slice(0,p.index+1).concat(t),p.index++,e&&e(t)}),o)},e.prototype.replace=function(t,e,o){var p=this;this.transitionTo(t,(function(t){p.stack=p.stack.slice(0,p.index).concat(t),e&&e(t)}),o)},e.prototype.go=function(t){var e=this,o=this.index+t;if(!(o<0||o>=this.stack.length)){var p=this.stack[o];this.confirmTransition(p,(function(){var t=e.current;e.index=o,e.updateRoute(p),e.router.afterHooks.forEach((function(e){e&&e(p,t)}))}),(function(t){ua(t,aa.duplicated)&&(e.index=o)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(va),Sa=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Hi(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!ca&&!1!==t.fallback,this.fallback&&(e="hash"),Pi||(e="abstract"),this.mode=e,e){case"history":this.history=new Ba(this,t.base);break;case"hash":this.history=new Xa(this,t.base,this.fallback);break;case"abstract":this.history=new Ca(this,t.base)}},ka={currentRoute:{configurable:!0}};Sa.prototype.match=function(t,e,o){return this.matcher.match(t,e,o)},ka.currentRoute.get=function(){return this.history&&this.history.current},Sa.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var o=e.apps.indexOf(t);o>-1&&e.apps.splice(o,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var o=this.history;if(o instanceof Ba||o instanceof Xa){var p=function(t){o.setupListeners(),function(t){var p=o.current,b=e.options.scrollBehavior;ca&&b&&"fullPath"in t&&Zi(e,t,p,!1)}(t)};o.transitionTo(o.getCurrentLocation(),p,p)}o.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Sa.prototype.beforeEach=function(t){return Da(this.beforeHooks,t)},Sa.prototype.beforeResolve=function(t){return Da(this.resolveHooks,t)},Sa.prototype.afterEach=function(t){return Da(this.afterHooks,t)},Sa.prototype.onReady=function(t,e){this.history.onReady(t,e)},Sa.prototype.onError=function(t){this.history.onError(t)},Sa.prototype.push=function(t,e,o){var p=this;if(!e&&!o&&"undefined"!=typeof Promise)return new Promise((function(e,o){p.history.push(t,e,o)}));this.history.push(t,e,o)},Sa.prototype.replace=function(t,e,o){var p=this;if(!e&&!o&&"undefined"!=typeof Promise)return new Promise((function(e,o){p.history.replace(t,e,o)}));this.history.replace(t,e,o)},Sa.prototype.go=function(t){this.history.go(t)},Sa.prototype.back=function(){this.go(-1)},Sa.prototype.forward=function(){this.go(1)},Sa.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Sa.prototype.resolve=function(t,e,o){var p=Ti(t,e=e||this.history.current,o,this),b=this.match(p,e),n=b.redirectedFrom||b.fullPath,M=function(t,e,o){var p="hash"===o?"#"+e:e;return t?li(t+"/"+p):p}(this.history.base,n,this.mode);return{location:p,route:b,href:M,normalizedTo:p,resolved:b}},Sa.prototype.getRoutes=function(){return this.matcher.getRoutes()},Sa.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==ni&&this.history.transitionTo(this.history.getCurrentLocation())},Sa.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==ni&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Sa.prototype,ka);var Ea=Sa;function Da(t,e){return t.push(e),function(){var o=t.indexOf(e);o>-1&&t.splice(o,1)}}Sa.install=function t(e){if(!t.installed||Ci!==e){t.installed=!0,Ci=e;var o=function(t){return void 0!==t},p=function(t,e){var p=t.$options._parentVnode;o(p)&&o(p=p.data)&&o(p=p.registerRouteInstance)&&p(t,e)};e.mixin({beforeCreate:function(){o(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,p(this,this)},destroyed:function(){p(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",ai),e.component("RouterLink",ki);var b=e.config.optionMergeStrategies;b.beforeRouteEnter=b.beforeRouteLeave=b.beforeRouteUpdate=b.created}},Sa.version="3.6.5",Sa.isNavigationFailure=ua,Sa.NavigationFailureType=aa,Sa.START_LOCATION=ni,Pi&&window.Vue&&window.Vue.use(Sa);var Pa=o(566),ja=o.n(Pa);window.Popper=o(981).default;try{window.$=window.jQuery=o(755),o(734)}catch(t){}var Ia=document.head.querySelector('meta[name="csrf-token"]');Ur.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",Ia&&(Ur.defaults.headers.common["X-CSRF-TOKEN"]=Ia.content),ep.use(Ea),ep.prototype.$http=Ur.create(),window.Horizon.basePath="/"+window.Horizon.path;var Fa=window.Horizon.basePath+"/";""!==window.Horizon.path&&"/"!==window.Horizon.path||(Fa="/",window.Horizon.basePath="");var Ha=new Ea({routes:Vr,mode:"history",base:Fa});ep.component("vue-json-pretty",ja()),ep.component("alert",o(682).Z),ep.mixin(oc),ep.directive("tooltip",(function(t,e){$(t).tooltip({title:e.value,placement:e.arg,trigger:"hover"})})),new ep({el:"#horizon",router:Ha,data:function(){return{alert:{type:null,autoClose:0,message:"",confirmationProceed:null,confirmationCancel:null},autoLoadsNewEntries:"1"===localStorage.autoLoadsNewEntries}}})},742:(t,e)=>{"use strict";e.byteLength=function(t){var e=c(t),o=e[0],p=e[1];return 3*(o+p)/4-p},e.toByteArray=function(t){var e,o,n=c(t),M=n[0],z=n[1],r=new b(function(t,e,o){return 3*(e+o)/4-o}(0,M,z)),i=0,a=z>0?M-4:M;for(o=0;o>16&255,r[i++]=e>>8&255,r[i++]=255&e;2===z&&(e=p[t.charCodeAt(o)]<<2|p[t.charCodeAt(o+1)]>>4,r[i++]=255&e);1===z&&(e=p[t.charCodeAt(o)]<<10|p[t.charCodeAt(o+1)]<<4|p[t.charCodeAt(o+2)]>>2,r[i++]=e>>8&255,r[i++]=255&e);return r},e.fromByteArray=function(t){for(var e,p=t.length,b=p%3,n=[],M=16383,z=0,c=p-b;zc?c:z+M));1===b?(e=t[p-1],n.push(o[e>>2]+o[e<<4&63]+"==")):2===b&&(e=(t[p-2]<<8)+t[p-1],n.push(o[e>>10]+o[e>>4&63]+o[e<<2&63]+"="));return n.join("")};for(var o=[],p=[],b="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,z=n.length;M0)throw new Error("Invalid string. Length must be a multiple of 4");var o=t.indexOf("=");return-1===o&&(o=e),[o,o===e?0:4-o%4]}function r(t,e,p){for(var b,n,M=[],z=e;z>18&63]+o[n>>12&63]+o[n>>6&63]+o[63&n]);return M.join("")}p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63},734:function(t,e,o){!function(t,e,o){"use strict";function p(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var b=p(e),n=p(o);function M(t,e){for(var o=0;o=M)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};f.jQueryDetection(),u();var q="alert",h="4.6.2",W="bs.alert",m="."+W,g=".data-api",v=b.default.fn[q],R="alert",y="fade",B="show",L="close"+m,X="closed"+m,_="click"+m+g,N='[data-dismiss="alert"]',w=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){b.default.removeData(this._element,W),this._element=null},e._getRootElement=function(t){var e=f.getSelectorFromElement(t),o=!1;return e&&(o=document.querySelector(e)),o||(o=b.default(t).closest("."+R)[0]),o},e._triggerCloseEvent=function(t){var e=b.default.Event(L);return b.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(b.default(t).removeClass(B),b.default(t).hasClass(y)){var o=f.getTransitionDurationFromElement(t);b.default(t).one(f.TRANSITION_END,(function(o){return e._destroyElement(t,o)})).emulateTransitionEnd(o)}else this._destroyElement(t)},e._destroyElement=function(t){b.default(t).detach().trigger(X).remove()},t._jQueryInterface=function(e){return this.each((function(){var o=b.default(this),p=o.data(W);p||(p=new t(this),o.data(W,p)),"close"===e&&p[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},z(t,null,[{key:"VERSION",get:function(){return h}}]),t}();b.default(document).on(_,N,w._handleDismiss(new w)),b.default.fn[q]=w._jQueryInterface,b.default.fn[q].Constructor=w,b.default.fn[q].noConflict=function(){return b.default.fn[q]=v,w._jQueryInterface};var x="button",T="4.6.2",C="bs.button",S="."+C,k=".data-api",E=b.default.fn[x],D="active",P="btn",j="focus",I="click"+S+k,F="focus"+S+k+" blur"+S+k,H="load"+S+k,U='[data-toggle^="button"]',V='[data-toggle="buttons"]',$='[data-toggle="button"]',Y='[data-toggle="buttons"] .btn',G='input:not([type="hidden"])',J=".active",K=".btn",Q=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,o=b.default(this._element).closest(V)[0];if(o){var p=this._element.querySelector(G);if(p){if("radio"===p.type)if(p.checked&&this._element.classList.contains(D))t=!1;else{var n=o.querySelector(J);n&&b.default(n).removeClass(D)}t&&("checkbox"!==p.type&&"radio"!==p.type||(p.checked=!this._element.classList.contains(D)),this.shouldAvoidTriggerChange||b.default(p).trigger("change")),p.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(D)),t&&b.default(this._element).toggleClass(D))},e.dispose=function(){b.default.removeData(this._element,C),this._element=null},t._jQueryInterface=function(e,o){return this.each((function(){var p=b.default(this),n=p.data(C);n||(n=new t(this),p.data(C,n)),n.shouldAvoidTriggerChange=o,"toggle"===e&&n[e]()}))},z(t,null,[{key:"VERSION",get:function(){return T}}]),t}();b.default(document).on(I,U,(function(t){var e=t.target,o=e;if(b.default(e).hasClass(P)||(e=b.default(e).closest(K)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var p=e.querySelector(G);if(p&&(p.hasAttribute("disabled")||p.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==o.tagName&&"LABEL"===e.tagName||Q._jQueryInterface.call(b.default(e),"toggle","INPUT"===o.tagName)}})).on(F,U,(function(t){var e=b.default(t.target).closest(K)[0];b.default(e).toggleClass(j,/^focus(in)?$/.test(t.type))})),b.default(window).on(H,(function(){for(var t=[].slice.call(document.querySelectorAll(Y)),e=0,o=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(ut)},e.nextWhenVisible=function(){var t=b.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(ft)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(Et)&&(f.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(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))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(Ct);var o=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)b.default(this._element).one(mt,(function(){return e.to(t)}));else{if(o===t)return this.pause(),void this.cycle();var p=t>o?ut:ft;this._slide(p,this._items[t])}},e.dispose=function(){b.default(this._element).off(ot),b.default.removeData(this._element,et),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=c({},It,t),f.typeCheckConfig(Z,t,Ft),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=ct)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&b.default(this._element).on(gt,(function(e){return t._keydown(e)})),"hover"===this._config.pause&&b.default(this._element).on(vt,(function(e){return t.pause(e)})).on(Rt,(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&Ht[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},o=function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX},p=function(e){t._pointerEvent&&Ht[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),zt+t._config.interval))};b.default(this._element.querySelectorAll(kt)).on(Nt,(function(t){return t.preventDefault()})),this._pointerEvent?(b.default(this._element).on(Xt,(function(t){return e(t)})),b.default(this._element).on(_t,(function(t){return p(t)})),this._element.classList.add(At)):(b.default(this._element).on(yt,(function(t){return e(t)})),b.default(this._element).on(Bt,(function(t){return o(t)})),b.default(this._element).on(Lt,(function(t){return p(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case nt:t.preventDefault(),this.prev();break;case Mt:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(St)):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var o=t===ut,p=t===ft,b=this._getItemIndex(e),n=this._items.length-1;if((p&&0===b||o&&b===n)&&!this._config.wrap)return e;var M=(b+(t===ft?-1:1))%this._items.length;return-1===M?this._items[this._items.length-1]:this._items[M]},e._triggerSlideEvent=function(t,e){var o=this._getItemIndex(t),p=this._getItemIndex(this._element.querySelector(Ct)),n=b.default.Event(Wt,{relatedTarget:t,direction:e,from:p,to:o});return b.default(this._element).trigger(n),n},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(Tt));b.default(e).removeClass(it);var o=this._indicatorsElement.children[this._getItemIndex(t)];o&&b.default(o).addClass(it)}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(Ct);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var o,p,n,M=this,z=this._element.querySelector(Ct),c=this._getItemIndex(z),r=e||z&&this._getItemByDirection(t,z),i=this._getItemIndex(r),a=Boolean(this._interval);if(t===ut?(o=st,p=lt,n=qt):(o=Ot,p=dt,n=ht),r&&b.default(r).hasClass(it))this._isSliding=!1;else if(!this._triggerSlideEvent(r,n).isDefaultPrevented()&&z&&r){this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(r),this._activeElement=r;var O=b.default.Event(mt,{relatedTarget:r,direction:n,from:c,to:i});if(b.default(this._element).hasClass(at)){b.default(r).addClass(p),f.reflow(r),b.default(z).addClass(o),b.default(r).addClass(o);var s=f.getTransitionDurationFromElement(z);b.default(z).one(f.TRANSITION_END,(function(){b.default(r).removeClass(o+" "+p).addClass(it),b.default(z).removeClass(it+" "+p+" "+o),M._isSliding=!1,setTimeout((function(){return b.default(M._element).trigger(O)}),0)})).emulateTransitionEnd(s)}else b.default(z).removeClass(it),b.default(r).addClass(it),this._isSliding=!1,b.default(this._element).trigger(O);a&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var o=b.default(this).data(et),p=c({},It,b.default(this).data());"object"==typeof e&&(p=c({},p,e));var n="string"==typeof e?e:p.slide;if(o||(o=new t(this,p),b.default(this).data(et,o)),"number"==typeof e)o.to(e);else if("string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n]()}else p.interval&&p.ride&&(o.pause(),o.cycle())}))},t._dataApiClickHandler=function(e){var o=f.getSelectorFromElement(this);if(o){var p=b.default(o)[0];if(p&&b.default(p).hasClass(rt)){var n=c({},b.default(p).data(),b.default(this).data()),M=this.getAttribute("data-slide-to");M&&(n.interval=!1),t._jQueryInterface.call(b.default(p),n),M&&b.default(p).data(et).to(M),e.preventDefault()}}},z(t,null,[{key:"VERSION",get:function(){return tt}},{key:"Default",get:function(){return It}}]),t}();b.default(document).on(xt,Pt,Ut._dataApiClickHandler),b.default(window).on(wt,(function(){for(var t=[].slice.call(document.querySelectorAll(jt)),e=0,o=t.length;e0&&(this._selector=M,this._triggerArray.push(n))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){b.default(this._element).hasClass(Qt)?this.hide():this.show()},e.show=function(){var e,o,p=this;if(!(this._isTransitioning||b.default(this._element).hasClass(Qt)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(re)).filter((function(t){return"string"==typeof p._config.parent?t.getAttribute("data-parent")===p._config.parent:t.classList.contains(Zt)}))).length&&(e=null),e&&(o=b.default(e).not(this._selector).data(Yt))&&o._isTransitioning))){var n=b.default.Event(be);if(b.default(this._element).trigger(n),!n.isDefaultPrevented()){e&&(t._jQueryInterface.call(b.default(e).not(this._selector),"hide"),o||b.default(e).data(Yt,null));var M=this._getDimension();b.default(this._element).removeClass(Zt).addClass(te),this._element.style[M]=0,this._triggerArray.length&&b.default(this._triggerArray).removeClass(ee).attr("aria-expanded",!0),this.setTransitioning(!0);var z=function(){b.default(p._element).removeClass(te).addClass(Zt+" "+Qt),p._element.style[M]="",p.setTransitioning(!1),b.default(p._element).trigger(ne)},c="scroll"+(M[0].toUpperCase()+M.slice(1)),r=f.getTransitionDurationFromElement(this._element);b.default(this._element).one(f.TRANSITION_END,z).emulateTransitionEnd(r),this._element.style[M]=this._element[c]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&b.default(this._element).hasClass(Qt)){var e=b.default.Event(Me);if(b.default(this._element).trigger(e),!e.isDefaultPrevented()){var o=this._getDimension();this._element.style[o]=this._element.getBoundingClientRect()[o]+"px",f.reflow(this._element),b.default(this._element).addClass(te).removeClass(Zt+" "+Qt);var p=this._triggerArray.length;if(p>0)for(var n=0;n0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=c({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),c({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var o=b.default(this).data(Ae);if(o||(o=new t(this,"object"==typeof e?e:null),b.default(this).data(Ae,o)),"string"==typeof e){if(void 0===o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},t._clearMenus=function(e){if(!e||e.which!==Re&&("keyup"!==e.type||e.which===me))for(var o=[].slice.call(document.querySelectorAll(Ie)),p=0,n=o.length;p0&&M--,e.which===ve&&Mdocument.documentElement.clientHeight;o||(this._element.style.overflowY="hidden"),this._element.classList.add(Ao);var p=f.getTransitionDurationFromElement(this._dialog);b.default(this._element).off(f.TRANSITION_END),b.default(this._element).one(f.TRANSITION_END,(function(){t._element.classList.remove(Ao),o||b.default(t._element).one(f.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,p)})).emulateTransitionEnd(p),this._element.focus()}},e._showElement=function(t){var e=this,o=b.default(this._element).hasClass(so),p=this._dialog?this._dialog.querySelector(_o):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"),b.default(this._dialog).hasClass(ro)&&p?p.scrollTop=0:this._element.scrollTop=0,o&&f.reflow(this._element),b.default(this._element).addClass(lo),this._config.focus&&this._enforceFocus();var n=b.default.Event(Wo,{relatedTarget:t}),M=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,b.default(e._element).trigger(n)};if(o){var z=f.getTransitionDurationFromElement(this._dialog);b.default(this._dialog).one(f.TRANSITION_END,M).emulateTransitionEnd(z)}else M()},e._enforceFocus=function(){var t=this;b.default(document).off(mo).on(mo,(function(e){document!==e.target&&t._element!==e.target&&0===b.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?b.default(this._element).on(Ro,(function(e){t._config.keyboard&&e.which===co?(e.preventDefault(),t.hide()):t._config.keyboard||e.which!==co||t._triggerBackdropTransition()})):this._isShown||b.default(this._element).off(Ro)},e._setResizeEvent=function(){var t=this;this._isShown?b.default(window).on(go,(function(e){return t.handleUpdate(e)})):b.default(window).off(go)},e._hideModal=function(){var t=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(){b.default(document.body).removeClass(Oo),t._resetAdjustments(),t._resetScrollbar(),b.default(t._element).trigger(qo)}))},e._removeBackdrop=function(){this._backdrop&&(b.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,o=b.default(this._element).hasClass(so)?so:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ao,o&&this._backdrop.classList.add(o),b.default(this._backdrop).appendTo(document.body),b.default(this._element).on(vo,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),o&&f.reflow(this._backdrop),b.default(this._backdrop).addClass(lo),!t)return;if(!o)return void t();var p=f.getTransitionDurationFromElement(this._backdrop);b.default(this._backdrop).one(f.TRANSITION_END,t).emulateTransitionEnd(p)}else if(!this._isShown&&this._backdrop){b.default(this._backdrop).removeClass(lo);var n=function(){e._removeBackdrop(),t&&t()};if(b.default(this._element).hasClass(so)){var M=f.getTransitionDurationFromElement(this._backdrop);b.default(this._backdrop).one(f.TRANSITION_END,n).emulateTransitionEnd(M)}else n()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.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:Do,popperConfig:null},ip={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},ap={HIDE:"hide"+$o,HIDDEN:"hidden"+$o,SHOW:"show"+$o,SHOWN:"shown"+$o,INSERTED:"inserted"+$o,CLICK:"click"+$o,FOCUSIN:"focusin"+$o,FOCUSOUT:"focusout"+$o,MOUSEENTER:"mouseenter"+$o,MOUSELEAVE:"mouseleave"+$o},Op=function(){function t(t,e){if(void 0===n.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=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,o=b.default(t.currentTarget).data(e);o||(o=new this.constructor(t.currentTarget,this._getDelegateConfig()),b.default(t.currentTarget).data(e,o)),o._activeTrigger.click=!o._activeTrigger.click,o._isWithActiveTrigger()?o._enter(null,o):o._leave(null,o)}else{if(b.default(this.getTipElement()).hasClass(Zo))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),b.default.removeData(this.element,this.constructor.DATA_KEY),b.default(this.element).off(this.constructor.EVENT_KEY),b.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&b.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},e.show=function(){var t=this;if("none"===b.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=b.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){b.default(this.element).trigger(e);var o=f.findShadowRoot(this.element),p=b.default.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!p)return;var M=this.getTipElement(),z=f.getUID(this.constructor.NAME);M.setAttribute("id",z),this.element.setAttribute("aria-describedby",z),this.setContent(),this.config.animation&&b.default(M).addClass(Qo);var c="function"==typeof this.config.placement?this.config.placement.call(this,M,this.element):this.config.placement,r=this._getAttachment(c);this.addAttachmentClass(r);var i=this._getContainer();b.default(M).data(this.constructor.DATA_KEY,this),b.default.contains(this.element.ownerDocument.documentElement,this.tip)||b.default(M).appendTo(i),b.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n.default(this.element,M,this._getPopperConfig(r)),b.default(M).addClass(Zo),b.default(M).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&b.default(document.body).children().on("mouseover",null,b.default.noop);var a=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,b.default(t.element).trigger(t.constructor.Event.SHOWN),e===ep&&t._leave(null,t)};if(b.default(this.tip).hasClass(Qo)){var O=f.getTransitionDurationFromElement(this.tip);b.default(this.tip).one(f.TRANSITION_END,a).emulateTransitionEnd(O)}else a()}},e.hide=function(t){var e=this,o=this.getTipElement(),p=b.default.Event(this.constructor.Event.HIDE),n=function(){e._hoverState!==tp&&o.parentNode&&o.parentNode.removeChild(o),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),b.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(b.default(this.element).trigger(p),!p.isDefaultPrevented()){if(b.default(o).removeClass(Zo),"ontouchstart"in document.documentElement&&b.default(document.body).children().off("mouseover",null,b.default.noop),this._activeTrigger[Mp]=!1,this._activeTrigger[np]=!1,this._activeTrigger[bp]=!1,b.default(this.tip).hasClass(Qo)){var M=f.getTransitionDurationFromElement(o);b.default(o).one(f.TRANSITION_END,n).emulateTransitionEnd(M)}else n();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){b.default(this.getTipElement()).addClass(Go+"-"+t)},e.getTipElement=function(){return this.tip=this.tip||b.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(b.default(t.querySelectorAll(op)),this.getTitle()),b.default(t).removeClass(Qo+" "+Zo)},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Fo(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?b.default(e).parent().is(t)||t.empty().append(e):t.text(b.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return c({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:pp},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=c({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:f.isElement(this.config.container)?b.default(this.config.container):b.default(document).find(this.config.container)},e._getAttachment=function(t){return cp[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)b.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if(e!==zp){var o=e===bp?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,p=e===bp?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;b.default(t.element).on(o,t.config.selector,(function(e){return t._enter(e)})).on(p,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},b.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=c({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var o=this.constructor.DATA_KEY;(e=e||b.default(t.currentTarget).data(o))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),b.default(t.currentTarget).data(o,e)),t&&(e._activeTrigger["focusin"===t.type?np:bp]=!0),b.default(e.getTipElement()).hasClass(Zo)||e._hoverState===tp?e._hoverState=tp:(clearTimeout(e._timeout),e._hoverState=tp,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===tp&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var o=this.constructor.DATA_KEY;(e=e||b.default(t.currentTarget).data(o))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),b.default(t.currentTarget).data(o,e)),t&&(e._activeTrigger["focusout"===t.type?np:bp]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=ep,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===ep&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=b.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Ko.indexOf(t)&&delete e[t]})),"number"==typeof(t=c({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),f.typeCheckConfig(Ho,t,this.constructor.DefaultType),t.sanitize&&(t.template=Fo(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=b.default(this.getTipElement()),e=t.attr("class").match(Jo);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(b.default(t).removeClass(Qo),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var o=b.default(this),p=o.data(Vo),n="object"==typeof e&&e;if((p||!/dispose|hide/.test(e))&&(p||(p=new t(this,n),o.data(Vo,p)),"string"==typeof e)){if(void 0===p[e])throw new TypeError('No method named "'+e+'"');p[e]()}}))},z(t,null,[{key:"VERSION",get:function(){return Uo}},{key:"Default",get:function(){return rp}},{key:"NAME",get:function(){return Ho}},{key:"DATA_KEY",get:function(){return Vo}},{key:"Event",get:function(){return ap}},{key:"EVENT_KEY",get:function(){return $o}},{key:"DefaultType",get:function(){return ip}}]),t}();b.default.fn[Ho]=Op._jQueryInterface,b.default.fn[Ho].Constructor=Op,b.default.fn[Ho].noConflict=function(){return b.default.fn[Ho]=Yo,Op._jQueryInterface};var sp="popover",lp="4.6.2",dp="bs.popover",Ap="."+dp,up=b.default.fn[sp],fp="bs-popover",qp=new RegExp("(^|\\s)"+fp+"\\S+","g"),hp="fade",Wp="show",mp=".popover-header",gp=".popover-body",vp=c({},Op.Default,{placement:"right",trigger:"click",content:"",template:''}),Rp=c({},Op.DefaultType,{content:"(string|element|function)"}),yp={HIDE:"hide"+Ap,HIDDEN:"hidden"+Ap,SHOW:"show"+Ap,SHOWN:"shown"+Ap,INSERTED:"inserted"+Ap,CLICK:"click"+Ap,FOCUSIN:"focusin"+Ap,FOCUSOUT:"focusout"+Ap,MOUSEENTER:"mouseenter"+Ap,MOUSELEAVE:"mouseleave"+Ap},Bp=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var o=e.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){b.default(this.getTipElement()).addClass(fp+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||b.default(this.config.template)[0],this.tip},o.setContent=function(){var t=b.default(this.getTipElement());this.setElementContent(t.find(mp),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(gp),e),t.removeClass(hp+" "+Wp)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=b.default(this.getTipElement()),e=t.attr("class").match(qp);null!==e&&e.length>0&&t.removeClass(e.join(""))},e._jQueryInterface=function(t){return this.each((function(){var o=b.default(this).data(dp),p="object"==typeof t?t:null;if((o||!/dispose|hide/.test(t))&&(o||(o=new e(this,p),b.default(this).data(dp,o)),"string"==typeof t)){if(void 0===o[t])throw new TypeError('No method named "'+t+'"');o[t]()}}))},z(e,null,[{key:"VERSION",get:function(){return lp}},{key:"Default",get:function(){return vp}},{key:"NAME",get:function(){return sp}},{key:"DATA_KEY",get:function(){return dp}},{key:"Event",get:function(){return yp}},{key:"EVENT_KEY",get:function(){return Ap}},{key:"DefaultType",get:function(){return Rp}}]),e}(Op);b.default.fn[sp]=Bp._jQueryInterface,b.default.fn[sp].Constructor=Bp,b.default.fn[sp].noConflict=function(){return b.default.fn[sp]=up,Bp._jQueryInterface};var Lp="scrollspy",Xp="4.6.2",_p="bs.scrollspy",Np="."+_p,wp=".data-api",xp=b.default.fn[Lp],Tp="dropdown-item",Cp="active",Sp="activate"+Np,kp="scroll"+Np,Ep="load"+Np+wp,Dp="offset",Pp="position",jp='[data-spy="scroll"]',Ip=".nav, .list-group",Fp=".nav-link",Hp=".nav-item",Up=".list-group-item",Vp=".dropdown",$p=".dropdown-item",Yp=".dropdown-toggle",Gp={offset:10,method:"auto",target:""},Jp={offset:"number",method:"string",target:"(string|element)"},Kp=function(){function t(t,e){var o=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+Fp+","+this._config.target+" "+Up+","+this._config.target+" "+$p,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,b.default(this._scrollElement).on(kp,(function(t){return o._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?Dp:Pp,o="auto"===this._config.method?e:this._config.method,p=o===Pp?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,n=f.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var M=e.getBoundingClientRect();if(M.width||M.height)return[b.default(e)[o]().top+p,n]}return null})).filter(Boolean).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){b.default.removeData(this._element,_p),b.default(this._scrollElement).off(Np),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=c({},Gp,"object"==typeof t&&t?t:{})).target&&f.isElement(t.target)){var e=b.default(t.target).attr("id");e||(e=f.getUID(Lp),b.default(t.target).attr("id",e)),t.target="#"+e}return f.typeCheckConfig(Lp,t,Jp),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),o=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=o){var p=this._targets[this._targets.length-1];this._activeTarget!==p&&this._activate(p)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var b=this._offsets.length;b--;)this._activeTarget!==this._targets[b]&&t>=this._offsets[b]&&(void 0===this._offsets[b+1]||t{"use strict";var p=o(742),b=o(645),n=o(826);function M(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function z(t,e){if(M()=M())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M().toString(16)+" bytes");return 0|t}function l(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var o=t.length;if(0===o)return 0;for(var p=!1;;)switch(e){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return I(t).length;default:if(p)return j(t).length;e=(""+e).toLowerCase(),p=!0}}function d(t,e,o){var p=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return _(this,e,o);case"utf8":case"utf-8":return y(this,e,o);case"ascii":return L(this,e,o);case"latin1":case"binary":return X(this,e,o);case"base64":return R(this,e,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,o);default:if(p)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),p=!0}}function A(t,e,o){var p=t[e];t[e]=t[o],t[o]=p}function u(t,e,o,p,b){if(0===t.length)return-1;if("string"==typeof o?(p=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=b?0:t.length-1),o<0&&(o=t.length+o),o>=t.length){if(b)return-1;o=t.length-1}else if(o<0){if(!b)return-1;o=0}if("string"==typeof e&&(e=c.from(e,p)),c.isBuffer(e))return 0===e.length?-1:f(t,e,o,p,b);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?b?Uint8Array.prototype.indexOf.call(t,e,o):Uint8Array.prototype.lastIndexOf.call(t,e,o):f(t,[e],o,p,b);throw new TypeError("val must be string, number or Buffer")}function f(t,e,o,p,b){var n,M=1,z=t.length,c=e.length;if(void 0!==p&&("ucs2"===(p=String(p).toLowerCase())||"ucs-2"===p||"utf16le"===p||"utf-16le"===p)){if(t.length<2||e.length<2)return-1;M=2,z/=2,c/=2,o/=2}function r(t,e){return 1===M?t[e]:t.readUInt16BE(e*M)}if(b){var i=-1;for(n=o;nz&&(o=z-c),n=o;n>=0;n--){for(var a=!0,O=0;Ob&&(p=b):p=b;var n=e.length;if(n%2!=0)throw new TypeError("Invalid hex string");p>n/2&&(p=n/2);for(var M=0;M>8,b=o%256,n.push(b),n.push(p);return n}(e,t.length-o),t,o,p)}function R(t,e,o){return 0===e&&o===t.length?p.fromByteArray(t):p.fromByteArray(t.slice(e,o))}function y(t,e,o){o=Math.min(t.length,o);for(var p=[],b=e;b239?4:r>223?3:r>191?2:1;if(b+a<=o)switch(a){case 1:r<128&&(i=r);break;case 2:128==(192&(n=t[b+1]))&&(c=(31&r)<<6|63&n)>127&&(i=c);break;case 3:n=t[b+1],M=t[b+2],128==(192&n)&&128==(192&M)&&(c=(15&r)<<12|(63&n)<<6|63&M)>2047&&(c<55296||c>57343)&&(i=c);break;case 4:n=t[b+1],M=t[b+2],z=t[b+3],128==(192&n)&&128==(192&M)&&128==(192&z)&&(c=(15&r)<<18|(63&n)<<12|(63&M)<<6|63&z)>65535&&c<1114112&&(i=c)}null===i?(i=65533,a=1):i>65535&&(i-=65536,p.push(i>>>10&1023|55296),i=56320|1023&i),p.push(i),b+=a}return function(t){var e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);var o="",p=0;for(;p0&&(t=this.toString("hex",0,o).match(/.{2}/g).join(" "),this.length>o&&(t+=" ... ")),""},c.prototype.compare=function(t,e,o,p,b){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===o&&(o=t?t.length:0),void 0===p&&(p=0),void 0===b&&(b=this.length),e<0||o>t.length||p<0||b>this.length)throw new RangeError("out of range index");if(p>=b&&e>=o)return 0;if(p>=b)return-1;if(e>=o)return 1;if(this===t)return 0;for(var n=(b>>>=0)-(p>>>=0),M=(o>>>=0)-(e>>>=0),z=Math.min(n,M),r=this.slice(p,b),i=t.slice(e,o),a=0;ab)&&(o=b),t.length>0&&(o<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");p||(p="utf8");for(var n=!1;;)switch(p){case"hex":return q(this,t,e,o);case"utf8":case"utf-8":return h(this,t,e,o);case"ascii":return W(this,t,e,o);case"latin1":case"binary":return m(this,t,e,o);case"base64":return g(this,t,e,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,t,e,o);default:if(n)throw new TypeError("Unknown encoding: "+p);p=(""+p).toLowerCase(),n=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function L(t,e,o){var p="";o=Math.min(t.length,o);for(var b=e;bp)&&(o=p);for(var b="",n=e;no)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,o,p,b,n){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>b||et.length)throw new RangeError("Index out of range")}function T(t,e,o,p){e<0&&(e=65535+e+1);for(var b=0,n=Math.min(t.length-o,2);b>>8*(p?b:1-b)}function C(t,e,o,p){e<0&&(e=4294967295+e+1);for(var b=0,n=Math.min(t.length-o,4);b>>8*(p?b:3-b)&255}function S(t,e,o,p,b,n){if(o+p>t.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function k(t,e,o,p,n){return n||S(t,0,o,4),b.write(t,e,o,p,23,4),o+4}function E(t,e,o,p,n){return n||S(t,0,o,8),b.write(t,e,o,p,52,8),o+8}c.prototype.slice=function(t,e){var o,p=this.length;if((t=~~t)<0?(t+=p)<0&&(t=0):t>p&&(t=p),(e=void 0===e?p:~~e)<0?(e+=p)<0&&(e=0):e>p&&(e=p),e0&&(b*=256);)p+=this[t+--e]*b;return p},c.prototype.readUInt8=function(t,e){return e||w(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||w(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||w(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,o){t|=0,e|=0,o||w(t,e,this.length);for(var p=this[t],b=1,n=0;++n=(b*=128)&&(p-=Math.pow(2,8*e)),p},c.prototype.readIntBE=function(t,e,o){t|=0,e|=0,o||w(t,e,this.length);for(var p=e,b=1,n=this[t+--p];p>0&&(b*=256);)n+=this[t+--p]*b;return n>=(b*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readInt8=function(t,e){return e||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||w(t,2,this.length);var o=this[t]|this[t+1]<<8;return 32768&o?4294901760|o:o},c.prototype.readInt16BE=function(t,e){e||w(t,2,this.length);var o=this[t+1]|this[t]<<8;return 32768&o?4294901760|o:o},c.prototype.readInt32LE=function(t,e){return e||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||w(t,4,this.length),b.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||w(t,4,this.length),b.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||w(t,8,this.length),b.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||w(t,8,this.length),b.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,o,p){(t=+t,e|=0,o|=0,p)||x(this,t,e,o,Math.pow(2,8*o)-1,0);var b=1,n=0;for(this[e]=255&t;++n=0&&(n*=256);)this[e+b]=t/n&255;return e+o},c.prototype.writeUInt8=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):C(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,o,p){if(t=+t,e|=0,!p){var b=Math.pow(2,8*o-1);x(this,t,e,o,b-1,-b)}var n=0,M=1,z=0;for(this[e]=255&t;++n>0)-z&255;return e+o},c.prototype.writeIntBE=function(t,e,o,p){if(t=+t,e|=0,!p){var b=Math.pow(2,8*o-1);x(this,t,e,o,b-1,-b)}var n=o-1,M=1,z=0;for(this[e+n]=255&t;--n>=0&&(M*=256);)t<0&&0===z&&0!==this[e+n+1]&&(z=1),this[e+n]=(t/M>>0)-z&255;return e+o},c.prototype.writeInt8=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):C(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,o){return t=+t,e|=0,o||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,o){return k(this,t,e,!0,o)},c.prototype.writeFloatBE=function(t,e,o){return k(this,t,e,!1,o)},c.prototype.writeDoubleLE=function(t,e,o){return E(this,t,e,!0,o)},c.prototype.writeDoubleBE=function(t,e,o){return E(this,t,e,!1,o)},c.prototype.copy=function(t,e,o,p){if(o||(o=0),p||0===p||(p=this.length),e>=t.length&&(e=t.length),e||(e=0),p>0&&p=this.length)throw new RangeError("sourceStart out of bounds");if(p<0)throw new RangeError("sourceEnd out of bounds");p>this.length&&(p=this.length),t.length-e=0;--b)t[b+e]=this[b+o];else if(n<1e3||!c.TYPED_ARRAY_SUPPORT)for(b=0;b>>=0,o=void 0===o?this.length:o>>>0,t||(t=0),"number"==typeof t)for(n=e;n55295&&o<57344){if(!b){if(o>56319){(e-=3)>-1&&n.push(239,191,189);continue}if(M+1===p){(e-=3)>-1&&n.push(239,191,189);continue}b=o;continue}if(o<56320){(e-=3)>-1&&n.push(239,191,189),b=o;continue}o=65536+(b-55296<<10|o-56320)}else b&&(e-=3)>-1&&n.push(239,191,189);if(b=null,o<128){if((e-=1)<0)break;n.push(o)}else if(o<2048){if((e-=2)<0)break;n.push(o>>6|192,63&o|128)}else if(o<65536){if((e-=3)<0)break;n.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;n.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return n}function I(t){return p.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,o,p){for(var b=0;b=e.length||b>=t.length);++b)e[b+o]=t[b];return b}},757:function(t,e,o){t.exports=function(t){"use strict";function e(t,e){return t(e={exports:{}},e.exports),e.exports}function o(t){return t&&t.default||t}t=t&&t.hasOwnProperty("default")?t.default:t;var p={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]},b=e((function(t){var e={};for(var o in p)p.hasOwnProperty(o)&&(e[p[o]]=o);var b=t.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 n in b)if(b.hasOwnProperty(n)){if(!("channels"in b[n]))throw new Error("missing channels property: "+n);if(!("labels"in b[n]))throw new Error("missing channel labels property: "+n);if(b[n].labels.length!==b[n].channels)throw new Error("channel and label counts mismatch: "+n);var M=b[n].channels,z=b[n].labels;delete b[n].channels,delete b[n].labels,Object.defineProperty(b[n],"channels",{value:M}),Object.defineProperty(b[n],"labels",{value:z})}function c(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}b.rgb.hsl=function(t){var e,o,p=t[0]/255,b=t[1]/255,n=t[2]/255,M=Math.min(p,b,n),z=Math.max(p,b,n),c=z-M;return z===M?e=0:p===z?e=(b-n)/c:b===z?e=2+(n-p)/c:n===z&&(e=4+(p-b)/c),(e=Math.min(60*e,360))<0&&(e+=360),o=(M+z)/2,[e,100*(z===M?0:o<=.5?c/(z+M):c/(2-z-M)),100*o]},b.rgb.hsv=function(t){var e,o,p,b,n,M=t[0]/255,z=t[1]/255,c=t[2]/255,r=Math.max(M,z,c),i=r-Math.min(M,z,c),a=function(t){return(r-t)/6/i+.5};return 0===i?b=n=0:(n=i/r,e=a(M),o=a(z),p=a(c),M===r?b=p-o:z===r?b=1/3+e-p:c===r&&(b=2/3+o-e),b<0?b+=1:b>1&&(b-=1)),[360*b,100*n,100*r]},b.rgb.hwb=function(t){var e=t[0],o=t[1],p=t[2];return[b.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(o,p))*100,100*(p=1-1/255*Math.max(e,Math.max(o,p)))]},b.rgb.cmyk=function(t){var e,o=t[0]/255,p=t[1]/255,b=t[2]/255;return[100*((1-o-(e=Math.min(1-o,1-p,1-b)))/(1-e)||0),100*((1-p-e)/(1-e)||0),100*((1-b-e)/(1-e)||0),100*e]},b.rgb.keyword=function(t){var o=e[t];if(o)return o;var b,n=1/0;for(var M in p)if(p.hasOwnProperty(M)){var z=c(t,p[M]);z.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92)+.1805*(p=p>.04045?Math.pow((p+.055)/1.055,2.4):p/12.92)),100*(.2126*e+.7152*o+.0722*p),100*(.0193*e+.1192*o+.9505*p)]},b.rgb.lab=function(t){var e=b.rgb.xyz(t),o=e[0],p=e[1],n=e[2];return p/=100,n/=108.883,o=(o/=95.047)>.008856?Math.pow(o,1/3):7.787*o+16/116,[116*(p=p>.008856?Math.pow(p,1/3):7.787*p+16/116)-16,500*(o-p),200*(p-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},b.hsl.rgb=function(t){var e,o,p,b,n,M=t[0]/360,z=t[1]/100,c=t[2]/100;if(0===z)return[n=255*c,n,n];e=2*c-(o=c<.5?c*(1+z):c+z-c*z),b=[0,0,0];for(var r=0;r<3;r++)(p=M+1/3*-(r-1))<0&&p++,p>1&&p--,n=6*p<1?e+6*(o-e)*p:2*p<1?o:3*p<2?e+(o-e)*(2/3-p)*6:e,b[r]=255*n;return b},b.hsl.hsv=function(t){var e=t[0],o=t[1]/100,p=t[2]/100,b=o,n=Math.max(p,.01);return o*=(p*=2)<=1?p:2-p,b*=n<=1?n:2-n,[e,100*(0===p?2*b/(n+b):2*o/(p+o)),(p+o)/2*100]},b.hsv.rgb=function(t){var e=t[0]/60,o=t[1]/100,p=t[2]/100,b=Math.floor(e)%6,n=e-Math.floor(e),M=255*p*(1-o),z=255*p*(1-o*n),c=255*p*(1-o*(1-n));switch(p*=255,b){case 0:return[p,c,M];case 1:return[z,p,M];case 2:return[M,p,c];case 3:return[M,z,p];case 4:return[c,M,p];case 5:return[p,M,z]}},b.hsv.hsl=function(t){var e,o,p,b=t[0],n=t[1]/100,M=t[2]/100,z=Math.max(M,.01);return p=(2-n)*M,o=n*z,[b,100*(o=(o/=(e=(2-n)*z)<=1?e:2-e)||0),100*(p/=2)]},b.hwb.rgb=function(t){var e,o,p,b,n,M,z,c=t[0]/360,r=t[1]/100,i=t[2]/100,a=r+i;switch(a>1&&(r/=a,i/=a),p=6*c-(e=Math.floor(6*c)),0!=(1&e)&&(p=1-p),b=r+p*((o=1-i)-r),e){default:case 6:case 0:n=o,M=b,z=r;break;case 1:n=b,M=o,z=r;break;case 2:n=r,M=o,z=b;break;case 3:n=r,M=b,z=o;break;case 4:n=b,M=r,z=o;break;case 5:n=o,M=r,z=b}return[255*n,255*M,255*z]},b.cmyk.rgb=function(t){var e=t[0]/100,o=t[1]/100,p=t[2]/100,b=t[3]/100;return[255*(1-Math.min(1,e*(1-b)+b)),255*(1-Math.min(1,o*(1-b)+b)),255*(1-Math.min(1,p*(1-b)+b))]},b.xyz.rgb=function(t){var e,o,p,b=t[0]/100,n=t[1]/100,M=t[2]/100;return o=-.9689*b+1.8758*n+.0415*M,p=.0557*b+-.204*n+1.057*M,e=(e=3.2406*b+-1.5372*n+-.4986*M)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:12.92*o,p=p>.0031308?1.055*Math.pow(p,1/2.4)-.055:12.92*p,[255*(e=Math.min(Math.max(0,e),1)),255*(o=Math.min(Math.max(0,o),1)),255*(p=Math.min(Math.max(0,p),1))]},b.xyz.lab=function(t){var e=t[0],o=t[1],p=t[2];return o/=100,p/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116)-16,500*(e-o),200*(o-(p=p>.008856?Math.pow(p,1/3):7.787*p+16/116))]},b.lab.xyz=function(t){var e,o,p,b=t[0];e=t[1]/500+(o=(b+16)/116),p=o-t[2]/200;var n=Math.pow(o,3),M=Math.pow(e,3),z=Math.pow(p,3);return o=n>.008856?n:(o-16/116)/7.787,e=M>.008856?M:(e-16/116)/7.787,p=z>.008856?z:(p-16/116)/7.787,[e*=95.047,o*=100,p*=108.883]},b.lab.lch=function(t){var e,o=t[0],p=t[1],b=t[2];return(e=360*Math.atan2(b,p)/2/Math.PI)<0&&(e+=360),[o,Math.sqrt(p*p+b*b),e]},b.lch.lab=function(t){var e,o=t[0],p=t[1];return e=t[2]/360*2*Math.PI,[o,p*Math.cos(e),p*Math.sin(e)]},b.rgb.ansi16=function(t){var e=t[0],o=t[1],p=t[2],n=1 in arguments?arguments[1]:b.rgb.hsv(t)[2];if(0===(n=Math.round(n/50)))return 30;var M=30+(Math.round(p/255)<<2|Math.round(o/255)<<1|Math.round(e/255));return 2===n&&(M+=60),M},b.hsv.ansi16=function(t){return b.rgb.ansi16(b.hsv.rgb(t),t[2])},b.rgb.ansi256=function(t){var e=t[0],o=t[1],p=t[2];return e===o&&o===p?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(o/255*5)+Math.round(p/255*5)},b.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var o=.5*(1+~~(t>50));return[(1&e)*o*255,(e>>1&1)*o*255,(e>>2&1)*o*255]},b.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var o;return t-=16,[Math.floor(t/36)/5*255,Math.floor((o=t%36)/6)/5*255,o%6/5*255]},b.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},b.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var o=e[0];3===e[0].length&&(o=o.split("").map((function(t){return t+t})).join(""));var p=parseInt(o,16);return[p>>16&255,p>>8&255,255&p]},b.rgb.hcg=function(t){var e,o=t[0]/255,p=t[1]/255,b=t[2]/255,n=Math.max(Math.max(o,p),b),M=Math.min(Math.min(o,p),b),z=n-M;return e=z<=0?0:n===o?(p-b)/z%6:n===p?2+(b-o)/z:4+(o-p)/z+4,e/=6,[360*(e%=1),100*z,100*(z<1?M/(1-z):0)]},b.hsl.hcg=function(t){var e=t[1]/100,o=t[2]/100,p=1,b=0;return(p=o<.5?2*e*o:2*e*(1-o))<1&&(b=(o-.5*p)/(1-p)),[t[0],100*p,100*b]},b.hsv.hcg=function(t){var e=t[1]/100,o=t[2]/100,p=e*o,b=0;return p<1&&(b=(o-p)/(1-p)),[t[0],100*p,100*b]},b.hcg.rgb=function(t){var e=t[0]/360,o=t[1]/100,p=t[2]/100;if(0===o)return[255*p,255*p,255*p];var b=[0,0,0],n=e%1*6,M=n%1,z=1-M,c=0;switch(Math.floor(n)){case 0:b[0]=1,b[1]=M,b[2]=0;break;case 1:b[0]=z,b[1]=1,b[2]=0;break;case 2:b[0]=0,b[1]=1,b[2]=M;break;case 3:b[0]=0,b[1]=z,b[2]=1;break;case 4:b[0]=M,b[1]=0,b[2]=1;break;default:b[0]=1,b[1]=0,b[2]=z}return c=(1-o)*p,[255*(o*b[0]+c),255*(o*b[1]+c),255*(o*b[2]+c)]},b.hcg.hsv=function(t){var e=t[1]/100,o=e+t[2]/100*(1-e),p=0;return o>0&&(p=e/o),[t[0],100*p,100*o]},b.hcg.hsl=function(t){var e=t[1]/100,o=t[2]/100*(1-e)+.5*e,p=0;return o>0&&o<.5?p=e/(2*o):o>=.5&&o<1&&(p=e/(2*(1-o))),[t[0],100*p,100*o]},b.hcg.hwb=function(t){var e=t[1]/100,o=e+t[2]/100*(1-e);return[t[0],100*(o-e),100*(1-o)]},b.hwb.hcg=function(t){var e=t[1]/100,o=1-t[2]/100,p=o-e,b=0;return p<1&&(b=(o-p)/(1-p)),[t[0],100*p,100*b]},b.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},b.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},b.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},b.gray.hsl=b.gray.hsv=function(t){return[0,0,t[0]]},b.gray.hwb=function(t){return[0,100,t[0]]},b.gray.cmyk=function(t){return[0,0,0,t[0]]},b.gray.lab=function(t){return[t[0],0,0]},b.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),o=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(o.length)+o},b.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function n(){for(var t={},e=Object.keys(b),o=e.length,p=0;p1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}function O(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var o=t(e);if("object"==typeof o)for(var p=o.length,b=0;b=0&&e<1?w(Math.round(255*e)):"")}function g(t,e){return e<1||t[3]&&t[3]<1?v(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function v(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function R(t,e){return e<1||t[3]&&t[3]<1?y(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"}function y(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function B(t,e){return e<1||t[3]&&t[3]<1?L(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function L(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function X(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function _(t){return x[t.slice(0,3)]}function N(t,e,o){return Math.min(Math.max(e,t),o)}function w(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var x={};for(var T in l)x[l[T]]=T;var C=function(t){return t instanceof C?t:this instanceof C?(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 t?(e=d.getRgba(t))?this.setValues("rgb",e):(e=d.getHsla(t))?this.setValues("hsl",e):(e=d.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new C(t);var e};C.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 t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return d.hexString(this.values.rgb)},rgbString:function(){return d.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return d.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return d.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return d.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return d.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return d.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return d.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],o=0;oo?(e+.05)/(o+.05):(o+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,o=(e[0]+t)%360;return e[0]=o<0?360+o:o,this.setValues("hsl",e),this},mix:function(t,e){var o=this,p=t,b=void 0===e?.5:e,n=2*b-1,M=o.alpha()-p.alpha(),z=((n*M==-1?n:(n+M)/(1+n*M))+1)/2,c=1-z;return this.rgb(z*o.red()+c*p.red(),z*o.green()+c*p.green(),z*o.blue()+c*p.blue()).alpha(o.alpha()*b+p.alpha()*(1-b))},toJSON:function(){return this.rgb()},clone:function(){var t,e,o=new C,p=this.values,b=o.values;for(var n in p)p.hasOwnProperty(n)&&(t=p[n],"[object Array]"===(e={}.toString.call(t))?b[n]=t.slice(0):"[object Number]"===e&&(b[n]=t));return o}},C.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},C.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},C.prototype.getValues=function(t){for(var e=this.values,o={},p=0;p=0;b--)e.call(o,t[b],b);else for(b=0;b=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,o=0,p=1;return 0===t?0:1===t?1:(o||(o=.3),p<1?(p=1,e=o/4):e=o/(2*Math.PI)*Math.asin(1/p),-p*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/o))},easeOutElastic:function(t){var e=1.70158,o=0,p=1;return 0===t?0:1===t?1:(o||(o=.3),p<1?(p=1,e=o/4):e=o/(2*Math.PI)*Math.asin(1/p),p*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/o)+1)},easeInOutElastic:function(t){var e=1.70158,o=0,p=1;return 0===t?0:2==(t/=.5)?1:(o||(o=.45),p<1?(p=1,e=o/4):e=o/(2*Math.PI)*Math.asin(1/p),t<1?p*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/o)*-.5:p*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/o)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-j.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*j.easeInBounce(2*t):.5*j.easeOutBounce(2*t-1)+.5}},I={effects:j};P.easingEffects=j;var F=Math.PI,H=F/180,U=2*F,V=F/2,$=F/4,Y=2*F/3,G={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,o,p,b,n){if(n){var M=Math.min(n,b/2,p/2),z=e+M,c=o+M,r=e+p-M,i=o+b-M;t.moveTo(e,c),ze.left-o&&t.xe.top-o&&t.y0&&t.requestAnimationFrame()},advance:function(){for(var t,e,o,p,b=this.animations,n=0;n=o?(zt.callback(t.onAnimationComplete,[t],e),e.animating=!1,b.splice(n,1)):++n}},qt=zt.options.resolve,ht=["push","pop","shift","splice","unshift"];function Wt(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),ht.forEach((function(e){var o="onData"+e.charAt(0).toUpperCase()+e.slice(1),p=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),b=p.apply(this,e);return zt.each(t._chartjs.listeners,(function(t){"function"==typeof t[o]&&t[o].apply(t,e)})),b}})})))}function mt(t,e){var o=t._chartjs;if(o){var p=o.listeners,b=p.indexOf(e);-1!==b&&p.splice(b,1),p.length>0||(ht.forEach((function(e){delete t[e]})),delete t._chartjs)}}var gt=function(t,e){this.initialize(t,e)};zt.extend(gt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var o=this;o.chart=t,o.index=e,o.linkScales(),o.addElements(),o._type=o.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),o=t.chart,p=o.scales,b=t.getDataset(),n=o.options.scales;null!==e.xAxisID&&e.xAxisID in p&&!b.xAxisID||(e.xAxisID=b.xAxisID||n.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in p&&!b.yAxisID||(e.yAxisID=b.yAxisID||n.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_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&&mt(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,o=e.dataElementType;return o&&new o({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,o=this,p=o.getMeta(),b=o.getDataset().data||[],n=p.data;for(t=0,e=b.length;tp&&t.insertElements(p,b-p)},insertElements:function(t,e){for(var o=0;ob?(n=b/e.innerRadius,t.arc(M,z,e.innerRadius-b,p+n,o-n,!0)):t.arc(M,z,b,p+Math.PI/2,o-Math.PI/2),t.closePath(),t.clip()}function Bt(t,e,o,p){var b,n=o.endAngle;for(p&&(o.endAngle=o.startAngle+Rt,yt(t,o),o.endAngle=n,o.endAngle===o.startAngle&&o.fullCircles&&(o.endAngle+=Rt,o.fullCircles--)),t.beginPath(),t.arc(o.x,o.y,o.innerRadius,o.startAngle+Rt,o.startAngle,!0),b=0;bz;)b-=Rt;for(;b=M&&b<=z,r=n>=o.innerRadius&&n<=o.outerRadius;return c&&r}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,o=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*o,y:t.y+Math.sin(e)*o}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,o=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*o,y:t.y+Math.sin(e)*o}},draw:function(){var t,e=this._chart.ctx,o=this._view,p="inner"===o.borderAlign?.33:0,b={x:o.x,y:o.y,innerRadius:o.innerRadius,outerRadius:Math.max(o.outerRadius-p,0),pixelMargin:p,startAngle:o.startAngle,endAngle:o.endAngle,fullCircles:Math.floor(o.circumference/Rt)};if(e.save(),e.fillStyle=o.backgroundColor,e.strokeStyle=o.borderColor,b.fullCircles){for(b.endAngle=b.startAngle+Rt,e.beginPath(),e.arc(b.x,b.y,b.outerRadius,b.startAngle,b.endAngle),e.arc(b.x,b.y,b.innerRadius,b.endAngle,b.startAngle,!0),e.closePath(),t=0;tt.x&&(e=jt(e,"left","right")):t.baseo?o:p,r:c.right||b<0?0:b>e?e:b,b:c.bottom||n<0?0:n>o?o:n,l:c.left||M<0?0:M>e?e:M}}function Ht(t){var e=Pt(t),o=e.right-e.left,p=e.bottom-e.top,b=Ft(t,o/2,p/2);return{outer:{x:e.left,y:e.top,w:o,h:p},inner:{x:e.left+b.l,y:e.top+b.t,w:o-b.l-b.r,h:p-b.t-b.b}}}function Ut(t,e,o){var p=null===e,b=null===o,n=!(!t||p&&b)&&Pt(t);return n&&(p||e>=n.left&&e<=n.right)&&(b||o>=n.top&&o<=n.bottom)}Q._set("global",{elements:{rectangle:{backgroundColor:Et,borderColor:Et,borderSkipped:"bottom",borderWidth:0}}});var Vt=dt.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,o=Ht(e),p=o.outer,b=o.inner;t.fillStyle=e.backgroundColor,t.fillRect(p.x,p.y,p.w,p.h),p.w===b.w&&p.h===b.h||(t.save(),t.beginPath(),t.rect(p.x,p.y,p.w,p.h),t.clip(),t.fillStyle=e.borderColor,t.rect(b.x,b.y,b.w,b.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Ut(this._view,t,e)},inLabelRange:function(t,e){var o=this._view;return Dt(o)?Ut(o,t,null):Ut(o,null,e)},inXRange:function(t){return Ut(this._view,t,null)},inYRange:function(t){return Ut(this._view,null,t)},getCenterPoint:function(){var t,e,o=this._view;return Dt(o)?(t=o.x,e=(o.y+o.base)/2):(t=(o.x+o.base)/2,e=o.y),{x:t,y:e}},getArea:function(){var t=this._view;return Dt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),$t={},Yt=Xt,Gt=wt,Jt=kt,Kt=Vt;$t.Arc=Yt,$t.Line=Gt,$t.Point=Jt,$t.Rectangle=Kt;var Qt=zt._deprecated,Zt=zt.valueOrDefault;function te(t,e){var o,p,b,n,M=t._length;for(b=1,n=e.length;b0?Math.min(M,Math.abs(p-o)):M,o=p;return M}function ee(t,e,o){var p,b,n=o.barThickness,M=e.stackCount,z=e.pixels[t],c=zt.isNullOrUndef(n)?te(e.scale,e.pixels):-1;return zt.isNullOrUndef(n)?(p=c*o.categoryPercentage,b=o.barPercentage):(p=n*M,b=1),{chunk:p/M,ratio:b,start:z-p/2}}function oe(t,e,o){var p,b=e.pixels,n=b[t],M=t>0?b[t-1]:null,z=t=0&&A.min>=0?A.min:A.max,W=void 0===A.start?A.end:A.max>=0&&A.min>=0?A.max-A.min:A.min-A.max,m=d.length;if(f||void 0===f&&void 0!==q)for(p=0;p=0&&r.max>=0?r.max:r.min,(A.min<0&&n<0||A.max>=0&&n>0)&&(h+=n));return M=O.getPixelForValue(h),c=(z=O.getPixelForValue(h+W))-M,void 0!==u&&Math.abs(c)=0&&!s||W<0&&s?M-u:M+u),{size:c,base:M,head:z,center:z+c/2}},calculateBarIndexPixels:function(t,e,o,p){var b=this,n="flex"===p.barThickness?oe(e,o,p):ee(e,o,p),M=b.getStackIndex(t,b.getMeta().stack),z=n.start+n.chunk*M+n.chunk/2,c=Math.min(Zt(p.maxBarThickness,1/0),n.chunk*n.ratio);return{base:z-c/2,head:z+c/2,center:z,size:c}},draw:function(){var t=this,e=t.chart,o=t._getValueScale(),p=t.getMeta().data,b=t.getDataset(),n=p.length,M=0;for(zt.canvas.clipArea(e.ctx,e.chartArea);M=ce?-re:f<-ce?re:0)+A,h=Math.cos(f),W=Math.sin(f),m=Math.cos(q),g=Math.sin(q),v=f<=0&&q>=0||q>=re,R=f<=ie&&q>=ie||q>=re+ie,y=f<=-ie&&q>=-ie||q>=ce+ie,B=f===-ce||q>=ce?-1:Math.min(h,h*d,m,m*d),L=y?-1:Math.min(W,W*d,g,g*d),X=v?1:Math.max(h,h*d,m,m*d),_=R?1:Math.max(W,W*d,g,g*d);r=(X-B)/2,i=(_-L)/2,a=-(X+B)/2,O=-(_+L)/2}for(p=0,b=l.length;p0&&!isNaN(t)?re*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,o,p,b,n,M,z,c,r=this,i=0,a=r.chart;if(!t)for(e=0,o=a.data.datasets.length;e(i=z>i?z:i)?c:i);return i},setHoverStyle:function(t){var e=t._model,o=t._options,p=zt.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=ze(o.hoverBackgroundColor,p(o.backgroundColor)),e.borderColor=ze(o.hoverBorderColor,p(o.borderColor)),e.borderWidth=ze(o.hoverBorderWidth,o.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,o=0;o0&&de(r[t-1]._model,c)&&(o.controlPointPreviousX=i(o.controlPointPreviousX,c.left,c.right),o.controlPointPreviousY=i(o.controlPointPreviousY,c.top,c.bottom)),t0&&(n=t.getDatasetMeta(n[0]._datasetIndex).data),n},"x-axis":function(t,e){return Ne(t,e,{intersect:!1})},point:function(t,e){return Le(t,ye(e,t))},nearest:function(t,e,o){var p=ye(e,t);o.axis=o.axis||"xy";var b=_e(o.axis);return Xe(t,p,o.intersect,b)},x:function(t,e,o){var p=ye(e,t),b=[],n=!1;return Be(t,(function(t){t.inXRange(p.x)&&b.push(t),t.inRange(p.x,p.y)&&(n=!0)})),o.intersect&&!n&&(b=[]),b},y:function(t,e,o){var p=ye(e,t),b=[],n=!1;return Be(t,(function(t){t.inYRange(p.y)&&b.push(t),t.inRange(p.x,p.y)&&(n=!0)})),o.intersect&&!n&&(b=[]),b}}},xe=zt.extend;function Te(t,e){return zt.where(t,(function(t){return t.pos===e}))}function Ce(t,e){return t.sort((function(t,o){var p=e?o:t,b=e?t:o;return p.weight===b.weight?p.index-b.index:p.weight-b.weight}))}function Se(t){var e,o,p,b=[];for(e=0,o=(t||[]).length;e 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",Ye=o(Object.freeze({__proto__:null,default:$e})),Ge="$chartjs",Je="chartjs-",Ke=Je+"size-monitor",Qe=Je+"render-monitor",Ze=Je+"render-animation",to=["animationstart","webkitAnimationStart"],eo={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function oo(t,e){var o=zt.getStyle(t,e),p=o&&o.match(/^(\d+)(\.\d+)?px$/);return p?Number(p[1]):void 0}function po(t,e){var o=t.style,p=t.getAttribute("height"),b=t.getAttribute("width");if(t[Ge]={initial:{height:p,width:b,style:{display:o.display,height:o.height,width:o.width}}},o.display=o.display||"block",null===b||""===b){var n=oo(t,"width");void 0!==n&&(t.width=n)}if(null===p||""===p)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var M=oo(t,"height");void 0!==n&&(t.height=M)}return t}var bo=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}(),no=!!bo&&{passive:!0};function Mo(t,e,o){t.addEventListener(e,o,no)}function zo(t,e,o){t.removeEventListener(e,o,no)}function co(t,e,o,p,b){return{type:t,chart:e,native:b||null,x:void 0!==o?o:null,y:void 0!==p?p:null}}function ro(t,e){var o=eo[t.type]||t.type,p=zt.getRelativePosition(t,e);return co(o,e,p.x,p.y,t)}function io(t,e){var o=!1,p=[];return function(){p=Array.prototype.slice.call(arguments),e=e||this,o||(o=!0,zt.requestAnimFrame.call(window,(function(){o=!1,t.apply(e,p)})))}}function ao(t){var e=document.createElement("div");return e.className=t||"",e}function Oo(t){var e=1e6,o=ao(Ke),p=ao(Ke+"-expand"),b=ao(Ke+"-shrink");p.appendChild(ao()),b.appendChild(ao()),o.appendChild(p),o.appendChild(b),o._reset=function(){p.scrollLeft=e,p.scrollTop=e,b.scrollLeft=e,b.scrollTop=e};var n=function(){o._reset(),t()};return Mo(p,"scroll",n.bind(p,"expand")),Mo(b,"scroll",n.bind(b,"shrink")),o}function so(t,e){var o=t[Ge]||(t[Ge]={}),p=o.renderProxy=function(t){t.animationName===Ze&&e()};zt.each(to,(function(e){Mo(t,e,p)})),o.reflow=!!t.offsetParent,t.classList.add(Qe)}function lo(t){var e=t[Ge]||{},o=e.renderProxy;o&&(zt.each(to,(function(e){zo(t,e,o)})),delete e.renderProxy),t.classList.remove(Qe)}function Ao(t,e,o){var p=t[Ge]||(t[Ge]={}),b=p.resizer=Oo(io((function(){if(p.resizer){var b=o.options.maintainAspectRatio&&t.parentNode,n=b?b.clientWidth:0;e(co("resize",o)),b&&b.clientWidth0){var n=t[0];n.label?o=n.label:n.xLabel?o=n.xLabel:b>0&&n.index-1?t.split("\n"):t}function Xo(t){var e=t._xScale,o=t._yScale||t._scale,p=t._index,b=t._datasetIndex,n=t._chart.getDatasetMeta(b).controller,M=n._getIndexScale(),z=n._getValueScale();return{xLabel:e?e.getLabelForIndex(p,b):"",yLabel:o?o.getLabelForIndex(p,b):"",label:M?""+M.getLabelForIndex(p,b):"",value:z?""+z.getLabelForIndex(p,b):"",index:p,datasetIndex:b,x:t._model.x,y:t._model.y}}function _o(t){var e=Q.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:vo(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:vo(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:vo(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:vo(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:vo(t.titleFontStyle,e.defaultFontStyle),titleFontSize:vo(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:vo(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:vo(t.footerFontStyle,e.defaultFontStyle),footerFontSize:vo(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function No(t,e){var o=t._chart.ctx,p=2*e.yPadding,b=0,n=e.body,M=n.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);M+=e.beforeBody.length+e.afterBody.length;var z=e.title.length,c=e.footer.length,r=e.titleFontSize,i=e.bodyFontSize,a=e.footerFontSize;p+=z*r,p+=z?(z-1)*e.titleSpacing:0,p+=z?e.titleMarginBottom:0,p+=M*i,p+=M?(M-1)*e.bodySpacing:0,p+=c?e.footerMarginTop:0,p+=c*a,p+=c?(c-1)*e.footerSpacing:0;var O=0,s=function(t){b=Math.max(b,o.measureText(t).width+O)};return o.font=zt.fontString(r,e._titleFontStyle,e._titleFontFamily),zt.each(e.title,s),o.font=zt.fontString(i,e._bodyFontStyle,e._bodyFontFamily),zt.each(e.beforeBody.concat(e.afterBody),s),O=e.displayColors?i+2:0,zt.each(n,(function(t){zt.each(t.before,s),zt.each(t.lines,s),zt.each(t.after,s)})),O=0,o.font=zt.fontString(a,e._footerFontStyle,e._footerFontFamily),zt.each(e.footer,s),{width:b+=2*e.xPadding,height:p}}function wo(t,e){var o,p,b,n,M,z=t._model,c=t._chart,r=t._chart.chartArea,i="center",a="center";z.yc.height-e.height&&(a="bottom");var O=(r.left+r.right)/2,s=(r.top+r.bottom)/2;"center"===a?(o=function(t){return t<=O},p=function(t){return t>O}):(o=function(t){return t<=e.width/2},p=function(t){return t>=c.width-e.width/2}),b=function(t){return t+e.width+z.caretSize+z.caretPadding>c.width},n=function(t){return t-e.width-z.caretSize-z.caretPadding<0},M=function(t){return t<=s?"top":"bottom"},o(z.x)?(i="left",b(z.x)&&(i="center",a=M(z.y))):p(z.x)&&(i="right",n(z.x)&&(i="center",a=M(z.y)));var l=t._options;return{xAlign:l.xAlign?l.xAlign:i,yAlign:l.yAlign?l.yAlign:a}}function xo(t,e,o,p){var b=t.x,n=t.y,M=t.caretSize,z=t.caretPadding,c=t.cornerRadius,r=o.xAlign,i=o.yAlign,a=M+z,O=c+z;return"right"===r?b-=e.width:"center"===r&&((b-=e.width/2)+e.width>p.width&&(b=p.width-e.width),b<0&&(b=0)),"top"===i?n+=a:n-="bottom"===i?e.height+a:e.height/2,"center"===i?"left"===r?b+=a:"right"===r&&(b-=a):"left"===r?b-=O:"right"===r&&(b+=O),{x:b,y:n}}function To(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Co(t){return Bo([],Lo(t))}var So=dt.extend({initialize:function(){this._model=_o(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,o=e.beforeTitle.apply(t,arguments),p=e.title.apply(t,arguments),b=e.afterTitle.apply(t,arguments),n=[];return n=Bo(n,Lo(o)),n=Bo(n,Lo(p)),n=Bo(n,Lo(b))},getBeforeBody:function(){return Co(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var o=this,p=o._options.callbacks,b=[];return zt.each(t,(function(t){var n={before:[],lines:[],after:[]};Bo(n.before,Lo(p.beforeLabel.call(o,t,e))),Bo(n.lines,p.label.call(o,t,e)),Bo(n.after,Lo(p.afterLabel.call(o,t,e))),b.push(n)})),b},getAfterBody:function(){return Co(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,o=e.beforeFooter.apply(t,arguments),p=e.footer.apply(t,arguments),b=e.afterFooter.apply(t,arguments),n=[];return n=Bo(n,Lo(o)),n=Bo(n,Lo(p)),n=Bo(n,Lo(b))},update:function(t){var e,o,p=this,b=p._options,n=p._model,M=p._model=_o(b),z=p._active,c=p._data,r={xAlign:n.xAlign,yAlign:n.yAlign},i={x:n.x,y:n.y},a={width:n.width,height:n.height},O={x:n.caretX,y:n.caretY};if(z.length){M.opacity=1;var s=[],l=[];O=yo[b.position].call(p,z,p._eventPosition);var d=[];for(e=0,o=z.length;e0&&o.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var o={width:e.width,height:e.height},p={x:e.x,y:e.y},b=Math.abs(e.opacity<.001)?0:e.opacity,n=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&n&&(t.save(),t.globalAlpha=b,this.drawBackground(p,e,t,o),p.y+=e.yPadding,zt.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(p,e,t),this.drawBody(p,e,t),this.drawFooter(p,e,t),zt.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e=this,o=e._options,p=!1;return e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:(e._active=e._chart.getElementsAtEventForMode(t,o.mode,o),o.reverse&&e._active.reverse()),(p=!zt.arrayEquals(e._active,e._lastActive))&&(e._lastActive=e._active,(o.enabled||o.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),p}}),ko=yo,Eo=So;Eo.positioners=ko;var Do=zt.valueOrDefault;function Po(){return zt.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,o,p){if("xAxes"===t||"yAxes"===t){var b,n,M,z=o[t].length;for(e[t]||(e[t]=[]),b=0;b=e[t].length&&e[t].push({}),!e[t][b].type||M.type&&M.type!==e[t][b].type?zt.merge(e[t][b],[go.getScaleDefaults(n),M]):zt.merge(e[t][b],M)}else zt._merger(t,e,o,p)}})}function jo(){return zt.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,o,p){var b=e[t]||Object.create(null),n=o[t];"scales"===t?e[t]=Po(b,n):"scale"===t?e[t]=zt.merge(b,[go.getScaleDefaults(n.type),n]):zt._merger(t,e,o,p)}})}function Io(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=jo(Q.global,Q[t.type],t.options||{}),t}function Fo(t){var e=t.options;zt.each(t.scales,(function(e){Ue.removeBox(t,e)})),e=jo(Q.global,Q[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ho(t,e,o){var p,b=function(t){return t.id===p};do{p=e+o++}while(zt.findIndex(t,b)>=0);return p}function Uo(t){return"top"===t||"bottom"===t}function Vo(t,e){return function(o,p){return o[t]===p[t]?o[e]-p[e]:o[t]-p[t]}}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 $o=function(t,e){return this.construct(t,e),this};zt.extend($o.prototype,{construct:function(t,e){var o=this;e=Io(e);var p=Wo.acquireContext(t,e),b=p&&p.canvas,n=b&&b.height,M=b&&b.width;o.id=zt.uid(),o.ctx=p,o.canvas=b,o.config=e,o.width=M,o.height=n,o.aspectRatio=n?M/n:null,o.options=e.options,o._bufferedRender=!1,o._layers=[],o.chart=o,o.controller=o,$o.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),p&&b&&(o.initialize(),o.update())},initialize:function(){var t=this;return mo.notify(t,"beforeInit"),zt.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),mo.notify(t,"afterInit"),t},clear:function(){return zt.canvas.clear(this),this},stop:function(){return ft.cancelAnimation(this),this},resize:function(t){var e=this,o=e.options,p=e.canvas,b=o.maintainAspectRatio&&e.aspectRatio||null,n=Math.max(0,Math.floor(zt.getMaximumWidth(p))),M=Math.max(0,Math.floor(b?n/b:zt.getMaximumHeight(p)));if((e.width!==n||e.height!==M)&&(p.width=e.width=n,p.height=e.height=M,p.style.width=n+"px",p.style.height=M+"px",zt.retinaScale(e,o.devicePixelRatio),!t)){var z={width:n,height:M};mo.notify(e,"resize",[z]),o.onResize&&o.onResize(e,z),e.stop(),e.update({duration:o.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},o=t.scale;zt.each(e.xAxes,(function(t,o){t.id||(t.id=Ho(e.xAxes,"x-axis-",o))})),zt.each(e.yAxes,(function(t,o){t.id||(t.id=Ho(e.yAxes,"y-axis-",o))})),o&&(o.id=o.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,o=t.scales||{},p=[],b=Object.keys(o).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(p=p.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&p.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),zt.each(p,(function(e){var p=e.options,n=p.id,M=Do(p.type,e.dtype);Uo(p.position)!==Uo(e.dposition)&&(p.position=e.dposition),b[n]=!0;var z=null;if(n in o&&o[n].type===M)(z=o[n]).options=p,z.ctx=t.ctx,z.chart=t;else{var c=go.getScaleConstructor(M);if(!c)return;z=new c({id:n,type:M,options:p,ctx:t.ctx,chart:t}),o[z.id]=z}z.mergeTicksOptions(),e.isDefault&&(t.scale=z)})),zt.each(b,(function(t,e){t||delete o[e]})),t.scales=o,go.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,o=this,p=[],b=o.data.datasets;for(t=0,e=b.length;t=0;--o)p.drawDataset(e[o],t);mo.notify(p,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var o=this,p={meta:t,index:t.index,easingValue:e};!1!==mo.notify(o,"beforeDatasetDraw",[p])&&(t.controller.draw(e),mo.notify(o,"afterDatasetDraw",[p]))},_drawTooltip:function(t){var e=this,o=e.tooltip,p={tooltip:o,easingValue:t};!1!==mo.notify(e,"beforeTooltipDraw",[p])&&(o.draw(),mo.notify(e,"afterTooltipDraw",[p]))},getElementAtEvent:function(t){return we.modes.single(this,t)},getElementsAtEvent:function(t){return we.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return we.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,o){var p=we.modes[e];return"function"==typeof p?p(this,t,o):[]},getDatasetAtEvent:function(t){return we.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,o=e.data.datasets[t];o._meta||(o._meta={});var p=o._meta[e.id];return p||(p=o._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:o.order||0,index:t}),p},getVisibleDatasetCount:function(){for(var t=0,e=0,o=this.data.datasets.length;e=0;p--){var b=t[p];if(e(b))return b}},zt.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},zt.almostEquals=function(t,e,o){return Math.abs(t-e)=t},zt.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},zt.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},zt.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},zt.toRadians=function(t){return t*(Math.PI/180)},zt.toDegrees=function(t){return t*(180/Math.PI)},zt._decimalPlaces=function(t){if(zt.isFinite(t)){for(var e=1,o=0;Math.round(t*e)/e!==t;)e*=10,o++;return o}},zt.getAngleFromPoint=function(t,e){var o=e.x-t.x,p=e.y-t.y,b=Math.sqrt(o*o+p*p),n=Math.atan2(p,o);return n<-.5*Math.PI&&(n+=2*Math.PI),{angle:n,distance:b}},zt.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},zt.aliasPixel=function(t){return t%2==0?0:.5},zt._alignPixel=function(t,e,o){var p=t.currentDevicePixelRatio,b=o/2;return Math.round((e-b)*p)/p+b},zt.splineCurve=function(t,e,o,p){var b=t.skip?e:t,n=e,M=o.skip?e:o,z=Math.sqrt(Math.pow(n.x-b.x,2)+Math.pow(n.y-b.y,2)),c=Math.sqrt(Math.pow(M.x-n.x,2)+Math.pow(M.y-n.y,2)),r=z/(z+c),i=c/(z+c),a=p*(r=isNaN(r)?0:r),O=p*(i=isNaN(i)?0:i);return{previous:{x:n.x-a*(M.x-b.x),y:n.y-a*(M.y-b.y)},next:{x:n.x+O*(M.x-b.x),y:n.y+O*(M.y-b.y)}}},zt.EPSILON=Number.EPSILON||1e-14,zt.splineCurveMonotone=function(t){var e,o,p,b,n,M,z,c,r,i=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),a=i.length;for(e=0;e0?i[e-1]:null,(b=e0?i[e-1]:null,b=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},zt.previousItem=function(t,e,o){return o?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},zt.niceNum=function(t,e){var o=Math.floor(zt.log10(t)),p=t/Math.pow(10,o);return(e?p<1.5?1:p<3?2:p<7?5:10:p<=1?1:p<=2?2:p<=5?5:10)*Math.pow(10,o)},zt.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},zt.getRelativePosition=function(t,e){var o,p,b=t.originalEvent||t,n=t.target||t.srcElement,M=n.getBoundingClientRect(),z=b.touches;z&&z.length>0?(o=z[0].clientX,p=z[0].clientY):(o=b.clientX,p=b.clientY);var c=parseFloat(zt.getStyle(n,"padding-left")),r=parseFloat(zt.getStyle(n,"padding-top")),i=parseFloat(zt.getStyle(n,"padding-right")),a=parseFloat(zt.getStyle(n,"padding-bottom")),O=M.right-M.left-c-i,s=M.bottom-M.top-r-a;return{x:o=Math.round((o-M.left-c)/O*n.width/e.currentDevicePixelRatio),y:p=Math.round((p-M.top-r)/s*n.height/e.currentDevicePixelRatio)}},zt.getConstraintWidth=function(t){return o(t,"max-width","clientWidth")},zt.getConstraintHeight=function(t){return o(t,"max-height","clientHeight")},zt._calculatePadding=function(t,e,o){return(e=zt.getStyle(t,e)).indexOf("%")>-1?o*parseInt(e,10)/100:parseInt(e,10)},zt._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},zt.getMaximumWidth=function(t){var e=zt._getParentNode(t);if(!e)return t.clientWidth;var o=e.clientWidth,p=o-zt._calculatePadding(e,"padding-left",o)-zt._calculatePadding(e,"padding-right",o),b=zt.getConstraintWidth(t);return isNaN(b)?p:Math.min(p,b)},zt.getMaximumHeight=function(t){var e=zt._getParentNode(t);if(!e)return t.clientHeight;var o=e.clientHeight,p=o-zt._calculatePadding(e,"padding-top",o)-zt._calculatePadding(e,"padding-bottom",o),b=zt.getConstraintHeight(t);return isNaN(b)?p:Math.min(p,b)},zt.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},zt.retinaScale=function(t,e){var o=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==o){var p=t.canvas,b=t.height,n=t.width;p.height=b*o,p.width=n*o,t.ctx.scale(o,o),p.style.height||p.style.width||(p.style.height=b+"px",p.style.width=n+"px")}},zt.fontString=function(t,e,o){return e+" "+t+"px "+o},zt.longestText=function(t,e,o,p){var b=(p=p||{}).data=p.data||{},n=p.garbageCollect=p.garbageCollect||[];p.font!==e&&(b=p.data={},n=p.garbageCollect=[],p.font=e),t.font=e;var M,z,c,r,i,a=0,O=o.length;for(M=0;Mo.length){for(M=0;Mp&&(p=n),p},zt.numberOfLabelLines=function(t){var e=1;return zt.each(t,(function(t){zt.isArray(t)&&t.length>e&&(e=t.length)})),e},zt.color=S?function(t){return t instanceof CanvasGradient&&(t=Q.global.defaultColor),S(t)}:function(t){return t},zt.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:zt.color(t).saturate(.5).darken(.1).rgbString()}};function Jo(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Ko(t){this.options=t||{}}zt.extend(Ko.prototype,{formats:Jo,parse:Jo,format:Jo,add:Jo,diff:Jo,startOf:Jo,endOf:Jo,_create:function(t){return t}}),Ko.override=function(t){zt.extend(Ko.prototype,t)};var Qo={_date:Ko},Zo={formatters:{values:function(t){return zt.isArray(t)?t:""+t},linear:function(t,e,o){var p=o.length>3?o[2]-o[1]:o[1]-o[0];Math.abs(p)>1&&t!==Math.floor(t)&&(p=t-Math.floor(t));var b=zt.log10(Math.abs(p)),n="";if(0!==t)if(Math.max(Math.abs(o[0]),Math.abs(o[o.length-1]))<1e-4){var M=zt.log10(Math.abs(t)),z=Math.floor(M)-Math.floor(b);z=Math.max(Math.min(z,20),0),n=t.toExponential(z)}else{var c=-1*Math.floor(b);c=Math.max(Math.min(c,20),0),n=t.toFixed(c)}else n="0";return n},logarithmic:function(t,e,o){var p=t/Math.pow(10,Math.floor(zt.log10(t)));return 0===t?"0":1===p||2===p||5===p||0===e||e===o.length-1?t.toExponential():""}}},tp=zt.isArray,ep=zt.isNullOrUndef,op=zt.valueOrDefault,pp=zt.valueAtIndexOrDefault;function bp(t,e){for(var o=[],p=t.length/e,b=0,n=t.length;bc+r)))return M}function Mp(t,e){zt.each(t,(function(t){var o,p=t.gc,b=p.length/2;if(b>e){for(o=0;or)return n;return Math.max(r,1)}function dp(t){var e,o,p=[];for(e=0,o=t.length;e=O||i<=1||!z.isHorizontal()?z.labelRotation=a:(e=(t=z._getLabelSizes()).widest.width,o=t.highest.height-t.highest.offset,p=Math.min(z.maxWidth,z.chart.width-e),e+6>(b=c.offset?z.maxWidth/i:p/(i-1))&&(b=p/(i-(c.offset?.5:1)),n=z.maxHeight-cp(c.gridLines)-r.padding-rp(c.scaleLabel),M=Math.sqrt(e*e+o*o),s=zt.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/b,1)),Math.asin(Math.min(n/M,1))-Math.asin(o/M))),s=Math.max(a,Math.min(O,s))),z.labelRotation=s)},afterCalculateTickRotation:function(){zt.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){zt.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},o=t.chart,p=t.options,b=p.ticks,n=p.scaleLabel,M=p.gridLines,z=t._isVisible(),c="bottom"===p.position,r=t.isHorizontal();if(r?e.width=t.maxWidth:z&&(e.width=cp(M)+rp(n)),r?z&&(e.height=cp(M)+rp(n)):e.height=t.maxHeight,b.display&&z){var i=ap(b),a=t._getLabelSizes(),O=a.first,s=a.last,l=a.widest,d=a.highest,A=.4*i.minor.lineHeight,u=b.padding;if(r){var f=0!==t.labelRotation,q=zt.toRadians(t.labelRotation),h=Math.cos(q),W=Math.sin(q),m=W*l.width+h*(d.height-(f?d.offset:0))+(f?0:A);e.height=Math.min(t.maxHeight,e.height+m+u);var g,v,R=t.getPixelForTick(0)-t.left,y=t.right-t.getPixelForTick(t.getTicks().length-1);f?(g=c?h*O.width+W*O.offset:W*(O.height-O.offset),v=c?W*(s.height-s.offset):h*s.width+W*s.offset):(g=O.width/2,v=s.width/2),t.paddingLeft=Math.max((g-R)*t.width/(t.width-R),0)+3,t.paddingRight=Math.max((v-y)*t.width/(t.width-y),0)+3}else{var B=b.mirror?0:l.width+u+A;e.width=Math.min(t.maxWidth,e.width+B),t.paddingTop=O.height/2,t.paddingBottom=s.height/2}}t.handleMargins(),r?(t.width=t._length=o.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=o.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){zt.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ep(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,o,p,b=this;for(b.ticks=t.map((function(t){return t.value})),b.beforeTickToLabelConversion(),e=b.convertTicksToLabels(t)||b.ticks,b.afterTickToLabelConversion(),o=0,p=t.length;op-1?null:e.getPixelForDecimal(t*b+(o?b/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,o=t.max;return t.beginAtZero?0:e<0&&o<0?o:e>0&&o>0?e:0},_autoSkip:function(t){var e,o,p,b,n=this,M=n.options.ticks,z=n._length,c=M.maxTicksLimit||z/n._tickSize()+1,r=M.major.enabled?dp(t):[],i=r.length,a=r[0],O=r[i-1];if(i>c)return Ap(t,r,i/c),Op(t);if(p=lp(r,t,z,c),i>0){for(e=0,o=i-1;e1?(O-a)/(i-1):null,up(t,p,zt.isNullOrUndef(b)?0:a-b,a),up(t,p,O,zt.isNullOrUndef(b)?t.length:O+b),Op(t)}return up(t,p),Op(t)},_tickSize:function(){var t=this,e=t.options.ticks,o=zt.toRadians(t.labelRotation),p=Math.abs(Math.cos(o)),b=Math.abs(Math.sin(o)),n=t._getLabelSizes(),M=e.autoSkipPadding||0,z=n?n.widest.width+M:0,c=n?n.highest.height+M:0;return t.isHorizontal()?c*p>z*b?z/p:c/b:c*b=0&&(M=t),void 0!==n&&(t=o.indexOf(n))>=0&&(z=t),e.minIndex=M,e.maxIndex=z,e.min=o[M],e.max=o[z]},buildTicks:function(){var t=this,e=t._getLabels(),o=t.minIndex,p=t.maxIndex;t.ticks=0===o&&p===e.length-1?e:e.slice(o,p+1)},getLabelForIndex:function(t,e){var o=this,p=o.chart;return p.getDatasetMeta(e).controller._getValueScaleId()===o.id?o.getRightValue(p.data.datasets[e].data[t]):o._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,o=t.ticks;qp.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),o&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(o.length-(e?0:1),1))},getPixelForValue:function(t,e,o){var p,b,n,M=this;return hp(e)||hp(o)||(t=M.chart.data.datasets[o].data[e]),hp(t)||(p=M.isHorizontal()?t.x:t.y),(void 0!==p||void 0!==t&&isNaN(e))&&(b=M._getLabels(),t=zt.valueOrDefault(p,t),e=-1!==(n=b.indexOf(t))?n:e,isNaN(e)&&(e=t)),M.getPixelForDecimal((e-M._startValue)/M._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,o=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(o,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),gp=Wp;mp._defaults=gp;var vp=zt.noop,Rp=zt.isNullOrUndef;function yp(t,e){var o,p,b,n,M=[],z=1e-14,c=t.stepSize,r=c||1,i=t.maxTicks-1,a=t.min,O=t.max,s=t.precision,l=e.min,d=e.max,A=zt.niceNum((d-l)/i/r)*r;if(Ai&&(A=zt.niceNum(n*A/i/r)*r),c||Rp(s)?o=Math.pow(10,zt._decimalPlaces(A)):(o=Math.pow(10,s),A=Math.ceil(A*o)/o),p=Math.floor(l/A)*A,b=Math.ceil(d/A)*A,c&&(!Rp(a)&&zt.almostWhole(a/A,A/1e3)&&(p=a),!Rp(O)&&zt.almostWhole(O/A,A/1e3)&&(b=O)),n=(b-p)/A,n=zt.almostEquals(n,Math.round(n),A/1e3)?Math.round(n):Math.ceil(n),p=Math.round(p*o)/o,b=Math.round(b*o)/o,M.push(Rp(a)?p:a);for(var u=1;u0&&p>0&&(t.min=0)}var b=void 0!==e.min||void 0!==e.suggestedMin,n=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),b!==n&&t.min>=t.max&&(b?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,o=e.options.ticks,p=o.stepSize,b=o.maxTicksLimit;return p?t=Math.ceil(e.max/p)-Math.floor(e.min/p)+1:(t=e._computeTickLimit(),b=b||11),b&&(t=Math.min(b,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:vp,buildTicks:function(){var t=this,e=t.options.ticks,o=t.getTickLimit(),p={maxTicks:o=Math.max(2,o),min:e.min,max:e.max,precision:e.precision,stepSize:zt.valueOrDefault(e.fixedStepSize,e.stepSize)},b=t.ticks=yp(p,t);t.handleDirectionalChanges(),t.max=zt.max(b),t.min=zt.min(b),e.reverse?(b.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),qp.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,o=e.getTicks(),p=e.min,b=e.max;qp.prototype._configure.call(e),e.options.offset&&o.length&&(p-=t=(b-p)/Math.max(o.length-1,1)/2,b+=t),e._startValue=p,e._endValue=b,e._valueRange=b-p}}),Lp={position:"left",ticks:{callback:Zo.formatters.linear}},Xp=0,_p=1;function Np(t,e,o){var p=[o.type,void 0===e&&void 0===o.stack?o.index:"",o.stack].join(".");return void 0===t[p]&&(t[p]={pos:[],neg:[]}),t[p]}function wp(t,e,o,p){var b,n,M=t.options,z=Np(e,M.stacked,o),c=z.pos,r=z.neg,i=p.length;for(b=0;be.length-1?null:this.getPixelForValue(e[t])}}),Cp=Lp;Tp._defaults=Cp;var Sp=zt.valueOrDefault,kp=zt.math.log10;function Ep(t,e){var o,p,b=[],n=Sp(t.min,Math.pow(10,Math.floor(kp(e.min)))),M=Math.floor(kp(e.max)),z=Math.ceil(e.max/Math.pow(10,M));0===n?(o=Math.floor(kp(e.minNotZero)),p=Math.floor(e.minNotZero/Math.pow(10,o)),b.push(n),n=p*Math.pow(10,o)):(o=Math.floor(kp(n)),p=Math.floor(n/Math.pow(10,o)));var c=o<0?Math.pow(10,Math.abs(o)):1;do{b.push(n),10==++p&&(p=1,c=++o>=0?1:c),n=Math.round(p*Math.pow(10,o)*c)/c}while(o=0?t:e}var jp=qp.extend({determineDataLimits:function(){var t,e,o,p,b,n,M=this,z=M.options,c=M.chart,r=c.data.datasets,i=M.isHorizontal();function a(t){return i?t.xAxisID===M.id:t.yAxisID===M.id}M.min=Number.POSITIVE_INFINITY,M.max=Number.NEGATIVE_INFINITY,M.minNotZero=Number.POSITIVE_INFINITY;var O=z.stacked;if(void 0===O)for(t=0;t0){var e=zt.min(t),o=zt.max(t);M.min=Math.min(M.min,e),M.max=Math.max(M.max,o)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(kp(t.max))):t.minNotZero=o)},buildTicks:function(){var t=this,e=t.options.ticks,o=!t.isHorizontal(),p={min:Pp(e.min),max:Pp(e.max)},b=t.ticks=Ep(p,t);t.max=zt.max(b),t.min=zt.min(b),e.reverse?(o=!o,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o&&b.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),qp.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(kp(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,o=0;qp.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),o=Sp(t.options.ticks.fontSize,Q.global.defaultFontSize)/t._length),t._startValue=kp(e),t._valueOffset=o,t._valueRange=(kp(t.max)-kp(e))/(1-o)},getPixelForValue:function(t){var e=this,o=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(o=(kp(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(o)},getValueForPixel:function(t){var e=this,o=e.getDecimalForPixel(t);return 0===o&&0===e.min?0:Math.pow(10,e._startValue+(o-e._valueOffset)*e._valueRange)}}),Ip=Dp;jp._defaults=Ip;var Fp=zt.valueOrDefault,Hp=zt.valueAtIndexOrDefault,Up=zt.options.resolve,Vp={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:Zo.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function $p(t){var e=t.ticks;return e.display&&t.display?Fp(e.fontSize,Q.global.defaultFontSize)+2*e.backdropPaddingY:0}function Yp(t,e,o){return zt.isArray(o)?{w:zt.longestText(t,t.font,o),h:o.length*e}:{w:t.measureText(o).width,h:e}}function Gp(t,e,o,p,b){return t===p||t===b?{start:e-o/2,end:e+o/2}:tb?{start:e-o,end:e}:{start:e,end:e+o}}function Jp(t){var e,o,p,b=zt.options._parseFont(t.options.pointLabels),n={l:0,r:t.width,t:0,b:t.height-t.paddingTop},M={};t.ctx.font=b.string,t._pointLabelSizes=[];var z=t.chart.data.labels.length;for(e=0;en.r&&(n.r=i.end,M.r=c),a.startn.b&&(n.b=a.end,M.b=c)}t.setReductions(t.drawingArea,n,M)}function Kp(t){return 0===t||180===t?"center":t<180?"left":"right"}function Qp(t,e,o,p){var b,n,M=o.y+p/2;if(zt.isArray(e))for(b=0,n=e.length;b270||t<90)&&(o.y-=e.h)}function tb(t){var e=t.ctx,o=t.options,p=o.pointLabels,b=$p(o),n=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max),M=zt.options._parseFont(p);e.save(),e.font=M.string,e.textBaseline="middle";for(var z=t.chart.data.labels.length-1;z>=0;z--){var c=0===z?b/2:0,r=t.getPointPosition(z,n+c+5),i=Hp(p.fontColor,z,Q.global.defaultFontColor);e.fillStyle=i;var a=t.getIndexAngle(z),O=zt.toDegrees(a);e.textAlign=Kp(O),Zp(O,t._pointLabelSizes[z],r),Qp(e,t.pointLabels[z],r,M.lineHeight)}e.restore()}function eb(t,e,o,p){var b,n=t.ctx,M=e.circular,z=t.chart.data.labels.length,c=Hp(e.color,p-1),r=Hp(e.lineWidth,p-1);if((M||z)&&c&&r){if(n.save(),n.strokeStyle=c,n.lineWidth=r,n.setLineDash&&(n.setLineDash(e.borderDash||[]),n.lineDashOffset=e.borderDashOffset||0),n.beginPath(),M)n.arc(t.xCenter,t.yCenter,o,0,2*Math.PI);else{b=t.getPointPosition(0,o),n.moveTo(b.x,b.y);for(var i=1;i0&&p>0?o:0)},_drawGrid:function(){var t,e,o,p=this,b=p.ctx,n=p.options,M=n.gridLines,z=n.angleLines,c=Fp(z.lineWidth,M.lineWidth),r=Fp(z.color,M.color);if(n.pointLabels.display&&tb(p),M.display&&zt.each(p.ticks,(function(t,o){0!==o&&(e=p.getDistanceFromCenterForValue(p.ticksAsNumbers[o]),eb(p,M,e,o))})),z.display&&c&&r){for(b.save(),b.lineWidth=c,b.strokeStyle=r,b.setLineDash&&(b.setLineDash(Up([z.borderDash,M.borderDash,[]])),b.lineDashOffset=Up([z.borderDashOffset,M.borderDashOffset,0])),t=p.chart.data.labels.length-1;t>=0;t--)e=p.getDistanceFromCenterForValue(n.ticks.reverse?p.min:p.max),o=p.getPointPosition(t,e),b.beginPath(),b.moveTo(p.xCenter,p.yCenter),b.lineTo(o.x,o.y),b.stroke();b.restore()}},_drawLabels:function(){var t=this,e=t.ctx,o=t.options.ticks;if(o.display){var p,b,n=t.getIndexAngle(0),M=zt.options._parseFont(o),z=Fp(o.fontColor,Q.global.defaultFontColor);e.save(),e.font=M.string,e.translate(t.xCenter,t.yCenter),e.rotate(n),e.textAlign="center",e.textBaseline="middle",zt.each(t.ticks,(function(n,c){(0!==c||o.reverse)&&(p=t.getDistanceFromCenterForValue(t.ticksAsNumbers[c]),o.showLabelBackdrop&&(b=e.measureText(n).width,e.fillStyle=o.backdropColor,e.fillRect(-b/2-o.backdropPaddingX,-p-M.size/2-o.backdropPaddingY,b+2*o.backdropPaddingX,M.size+2*o.backdropPaddingY)),e.fillStyle=z,e.fillText(n,0,-p))})),e.restore()}},_drawTitle:zt.noop}),bb=Vp;pb._defaults=bb;var nb=zt._deprecated,Mb=zt.options.resolve,zb=zt.valueOrDefault,cb=Number.MIN_SAFE_INTEGER||-9007199254740991,rb=Number.MAX_SAFE_INTEGER||9007199254740991,ib={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}},ab=Object.keys(ib);function Ob(t,e){return t-e}function sb(t){var e,o,p,b={},n=[];for(e=0,o=t.length;ee&&z=0&&M<=z;){if(b=t[(p=M+z>>1)-1]||null,n=t[p],!b)return{lo:null,hi:n};if(n[e]o))return{lo:b,hi:n};z=p-1}}return{lo:n,hi:null}}function fb(t,e,o,p){var b=ub(t,e,o),n=b.lo?b.hi?b.lo:t[t.length-2]:t[0],M=b.lo?b.hi?b.hi:t[t.length-1]:t[1],z=M[e]-n[e],c=z?(o-n[e])/z:0,r=(M[p]-n[p])*c;return n[p]+r}function qb(t,e){var o=t._adapter,p=t.options.time,b=p.parser,n=b||p.format,M=e;return"function"==typeof b&&(M=b(M)),zt.isFinite(M)||(M="string"==typeof n?o.parse(M,n):o.parse(M)),null!==M?+M:(b||"function"!=typeof n||(M=n(e),zt.isFinite(M)||(M=o.parse(M))),M)}function hb(t,e){if(zt.isNullOrUndef(e))return null;var o=t.options.time,p=qb(t,t.getRightValue(e));return null===p||o.round&&(p=+t._adapter.startOf(p,o.round)),p}function Wb(t,e,o,p){var b,n,M,z=ab.length;for(b=ab.indexOf(t);b=ab.indexOf(o);n--)if(M=ab[n],ib[M].common&&t._adapter.diff(b,p,M)>=e-1)return M;return ab[o?ab.indexOf(o):0]}function gb(t){for(var e=ab.indexOf(t)+1,o=ab.length;e1e5*r)throw e+" and "+o+" are too far apart with stepSize of "+r+" "+c;for(b=a;b=0&&(e[n].major=!0);return e}function Bb(t,e,o){var p,b,n=[],M={},z=e.length;for(p=0;p1?sb(l).sort(Ob):l.sort(Ob),O=Math.min(O,l[0]),s=Math.max(s,l[l.length-1])),O=hb(z,lb(i))||O,s=hb(z,db(i))||s,O=O===rb?+r.startOf(Date.now(),a):O,s=s===cb?+r.endOf(Date.now(),a)+1:s,z.min=Math.min(O,s),z.max=Math.max(O+1,s),z._table=[],z._timestamps={data:l,datasets:d,labels:A}},buildTicks:function(){var t,e,o,p=this,b=p.min,n=p.max,M=p.options,z=M.ticks,c=M.time,r=p._timestamps,i=[],a=p.getLabelCapacity(b),O=z.source,s=M.distribution;for(r="data"===O||"auto"===O&&"series"===s?r.data:"labels"===O?r.labels:vb(p,b,n,a),"ticks"===M.bounds&&r.length&&(b=r[0],n=r[r.length-1]),b=hb(p,lb(M))||b,n=hb(p,db(M))||n,t=0,e=r.length;t=b&&o<=n&&i.push(o);return p.min=b,p.max=n,p._unit=c.unit||(z.autoSkip?Wb(c.minUnit,p.min,p.max,a):mb(p,i.length,c.minUnit,p.min,p.max)),p._majorUnit=z.major.enabled&&"year"!==p._unit?gb(p._unit):void 0,p._table=Ab(p._timestamps.data,b,n,s),p._offsets=Rb(p._table,i,b,n,M),z.reverse&&i.reverse(),Bb(p,i,p._majorUnit)},getLabelForIndex:function(t,e){var o=this,p=o._adapter,b=o.chart.data,n=o.options.time,M=b.labels&&t=0&&t0?z:1}}),_b=Lb;Xb._defaults=_b;var Nb={category:mp,linear:Tp,logarithmic:jp,radialLinear:pb,time:Xb},wb={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"};Qo._date.override("function"==typeof t?{_id:"moment",formats:function(){return wb},parse:function(e,o){return"string"==typeof e&&"string"==typeof o?e=t(e,o):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,o){return t(e).format(o)},add:function(e,o,p){return t(e).add(o,p).valueOf()},diff:function(e,o,p){return t(e).diff(t(o),p)},startOf:function(e,o,p){return e=t(e),"isoWeek"===o?e.isoWeekday(p).valueOf():e.startOf(o).valueOf()},endOf:function(e,o){return t(e).endOf(o).valueOf()},_create:function(e){return t(e)}}:{}),Q._set("global",{plugins:{filler:{propagate:!0}}});var xb={dataset:function(t){var e=t.fill,o=t.chart,p=o.getDatasetMeta(e),b=p&&o.isDatasetVisible(e)&&p.dataset._children||[],n=b.length||0;return n?function(t,e){return e=o)&&p;switch(n){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return n;default:return!1}}function Cb(t){var e,o=t.el._model||{},p=t.el._scale||{},b=t.fill,n=null;if(isFinite(b))return null;if("start"===b?n=void 0===o.scaleBottom?p.bottom:o.scaleBottom:"end"===b?n=void 0===o.scaleTop?p.top:o.scaleTop:void 0!==o.scaleZero?n=o.scaleZero:p.getBasePixel&&(n=p.getBasePixel()),null!=n){if(void 0!==n.x&&void 0!==n.y)return n;if(zt.isFinite(n))return{x:(e=p.isHorizontal())?n:null,y:e?null:n}}return null}function Sb(t){var e,o,p,b,n,M=t.el._scale,z=M.options,c=M.chart.data.labels.length,r=t.fill,i=[];if(!c)return null;for(e=z.ticks.reverse?M.max:M.min,o=z.ticks.reverse?M.min:M.max,p=M.getPointPositionForValue(0,e),b=0;b0;--n)zt.canvas.lineTo(t,o[n],o[n-1],!0);else for(M=o[0].cx,z=o[0].cy,c=Math.sqrt(Math.pow(o[0].x-M,2)+Math.pow(o[0].y-z,2)),n=b-1;n>0;--n)t.arc(M,z,c,o[n].angle,o[n-1].angle,!0)}}function Ib(t,e,o,p,b,n){var M,z,c,r,i,a,O,s,l=e.length,d=p.spanGaps,A=[],u=[],f=0,q=0;for(t.beginPath(),M=0,z=l;M=0;--o)(e=c[o].$filler)&&e.visible&&(b=(p=e.el)._view,n=p._children||[],M=e.mapper,z=b.backgroundColor||Q.global.defaultColor,M&&z&&n.length&&(zt.canvas.clipArea(r,t.chartArea),Ib(r,n,M,b,z,p._loop),zt.canvas.unclipArea(r)))}},Hb=zt.rtl.getRtlAdapter,Ub=zt.noop,Vb=zt.valueOrDefault;function $b(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}Q._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var o=e.datasetIndex,p=this.chart,b=p.getDatasetMeta(o);b.hidden=null===b.hidden?!p.data.datasets[o].hidden:null,p.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,o=t.options.legend||{},p=o.labels&&o.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(o){var b=o.controller.getStyle(p?0:void 0);return{text:e[o.index].label,fillStyle:b.backgroundColor,hidden:!t.isDatasetVisible(o.index),lineCap:b.borderCapStyle,lineDash:b.borderDash,lineDashOffset:b.borderDashOffset,lineJoin:b.borderJoinStyle,lineWidth:b.borderWidth,strokeStyle:b.borderColor,pointStyle:b.pointStyle,rotation:b.rotation,datasetIndex:o.index}}),this)}}},legendCallback:function(t){var e,o,p,b=document.createElement("ul"),n=t.data.datasets;for(b.setAttribute("class",t.id+"-legend"),e=0,o=n.length;ec.width)&&(a+=M+o.padding,i[i.length-(e>0?0:1)]=0),z[e]={left:0,top:0,width:p,height:M},i[i.length-1]+=p+o.padding})),c.height+=a}else{var O=o.padding,s=t.columnWidths=[],l=t.columnHeights=[],d=o.padding,A=0,u=0;zt.each(t.legendItems,(function(t,e){var p=$b(o,M)+M/2+b.measureText(t.text).width;e>0&&u+M+2*O>c.height&&(d+=A+o.padding,s.push(A),l.push(u),A=0,u=0),A=Math.max(A,p),u+=M+O,z[e]={left:0,top:0,width:p,height:M}})),d+=A,s.push(A),l.push(u),c.width+=d}t.width=c.width,t.height=c.height}else t.width=c.width=t.height=c.height=0},afterFit:Ub,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,o=e.labels,p=Q.global,b=p.defaultColor,n=p.elements.line,M=t.height,z=t.columnHeights,c=t.width,r=t.lineWidths;if(e.display){var i,a=Hb(e.rtl,t.left,t.minSize.width),O=t.ctx,s=Vb(o.fontColor,p.defaultFontColor),l=zt.options._parseFont(o),d=l.size;O.textAlign=a.textAlign("left"),O.textBaseline="middle",O.lineWidth=.5,O.strokeStyle=s,O.fillStyle=s,O.font=l.string;var A=$b(o,d),u=t.legendHitBoxes,f=function(t,e,p){if(!(isNaN(A)||A<=0)){O.save();var M=Vb(p.lineWidth,n.borderWidth);if(O.fillStyle=Vb(p.fillStyle,b),O.lineCap=Vb(p.lineCap,n.borderCapStyle),O.lineDashOffset=Vb(p.lineDashOffset,n.borderDashOffset),O.lineJoin=Vb(p.lineJoin,n.borderJoinStyle),O.lineWidth=M,O.strokeStyle=Vb(p.strokeStyle,b),O.setLineDash&&O.setLineDash(Vb(p.lineDash,n.borderDash)),o&&o.usePointStyle){var z=A*Math.SQRT2/2,c=a.xPlus(t,A/2),r=e+d/2;zt.canvas.drawPoint(O,p.pointStyle,z,c,r,p.rotation)}else O.fillRect(a.leftForLtr(t,A),e,A,d),0!==M&&O.strokeRect(a.leftForLtr(t,A),e,A,d);O.restore()}},q=function(t,e,o,p){var b=d/2,n=a.xPlus(t,A+b),M=e+b;O.fillText(o.text,n,M),o.hidden&&(O.beginPath(),O.lineWidth=2,O.moveTo(n,M),O.lineTo(a.xPlus(n,p),M),O.stroke())},h=function(t,p){switch(e.align){case"start":return o.padding;case"end":return t-p;default:return(t-p+o.padding)/2}},W=t.isHorizontal();i=W?{x:t.left+h(c,r[0]),y:t.top+o.padding,line:0}:{x:t.left+o.padding,y:t.top+h(M,z[0]),line:0},zt.rtl.overrideTextDirection(t.ctx,e.textDirection);var m=d+o.padding;zt.each(t.legendItems,(function(e,p){var b=O.measureText(e.text).width,n=A+d/2+b,s=i.x,l=i.y;a.setWidth(t.minSize.width),W?p>0&&s+n+o.padding>t.left+t.minSize.width&&(l=i.y+=m,i.line++,s=i.x=t.left+h(c,r[i.line])):p>0&&l+m>t.top+t.minSize.height&&(s=i.x=s+t.columnWidths[i.line]+o.padding,i.line++,l=i.y=t.top+h(M,z[i.line]));var g=a.x(s);f(g,l,e),u[p].left=a.leftForLtr(g,u[p].width),u[p].top=l,q(g,l,e,b),W?i.x+=n+o.padding:i.y+=m})),zt.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var o,p,b,n=this;if(t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom)for(b=n.legendHitBoxes,o=0;o=(p=b[o]).left&&t<=p.left+p.width&&e>=p.top&&e<=p.top+p.height)return n.legendItems[o];return null},handleEvent:function(t){var e,o=this,p=o.options,b="mouseup"===t.type?"click":t.type;if("mousemove"===b){if(!p.onHover&&!p.onLeave)return}else{if("click"!==b)return;if(!p.onClick)return}e=o._getLegendItemAt(t.x,t.y),"click"===b?e&&p.onClick&&p.onClick.call(o,t.native,e):(p.onLeave&&e!==o._hoveredItem&&(o._hoveredItem&&p.onLeave.call(o,t.native,o._hoveredItem),o._hoveredItem=e),p.onHover&&e&&p.onHover.call(o,t.native,e))}});function Gb(t,e){var o=new Yb({ctx:t.ctx,options:e,chart:t});Ue.configure(t,o,e),Ue.addBox(t,o),t.legend=o}var Jb={id:"legend",_element:Yb,beforeInit:function(t){var e=t.options.legend;e&&Gb(t,e)},beforeUpdate:function(t){var e=t.options.legend,o=t.legend;e?(zt.mergeIf(e,Q.global.legend),o?(Ue.configure(t,o,e),o.options=e):Gb(t,e)):o&&(Ue.removeBox(t,o),delete t.legend)},afterEvent:function(t,e){var o=t.legend;o&&o.handleEvent(e)}},Kb=zt.noop;Q._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Qb=dt.extend({initialize:function(t){var e=this;zt.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:Kb,update:function(t,e,o){var p=this;return p.beforeUpdate(),p.maxWidth=t,p.maxHeight=e,p.margins=o,p.beforeSetDimensions(),p.setDimensions(),p.afterSetDimensions(),p.beforeBuildLabels(),p.buildLabels(),p.afterBuildLabels(),p.beforeFit(),p.fit(),p.afterFit(),p.afterUpdate(),p.minSize},afterUpdate:Kb,beforeSetDimensions:Kb,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Kb,beforeBuildLabels:Kb,buildLabels:Kb,afterBuildLabels:Kb,beforeFit:Kb,fit:function(){var t,e=this,o=e.options,p=e.minSize={},b=e.isHorizontal();o.display?(t=(zt.isArray(o.text)?o.text.length:1)*zt.options._parseFont(o).lineHeight+2*o.padding,e.width=p.width=b?e.maxWidth:t,e.height=p.height=b?t:e.maxHeight):e.width=p.width=e.height=p.height=0},afterFit:Kb,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,o=t.options;if(o.display){var p,b,n,M=zt.options._parseFont(o),z=M.lineHeight,c=z/2+o.padding,r=0,i=t.top,a=t.left,O=t.bottom,s=t.right;e.fillStyle=zt.valueOrDefault(o.fontColor,Q.global.defaultFontColor),e.font=M.string,t.isHorizontal()?(b=a+(s-a)/2,n=i+c,p=s-a):(b="left"===o.position?a+c:s-c,n=i+(O-i)/2,p=O-i,r=Math.PI*("left"===o.position?-.5:.5)),e.save(),e.translate(b,n),e.rotate(r),e.textAlign="center",e.textBaseline="middle";var l=o.text;if(zt.isArray(l))for(var d=0,A=0;A{e.read=function(t,e,o,p,b){var n,M,z=8*b-p-1,c=(1<>1,i=-7,a=o?b-1:0,O=o?-1:1,s=t[e+a];for(a+=O,n=s&(1<<-i)-1,s>>=-i,i+=z;i>0;n=256*n+t[e+a],a+=O,i-=8);for(M=n&(1<<-i)-1,n>>=-i,i+=p;i>0;M=256*M+t[e+a],a+=O,i-=8);if(0===n)n=1-r;else{if(n===c)return M?NaN:1/0*(s?-1:1);M+=Math.pow(2,p),n-=r}return(s?-1:1)*M*Math.pow(2,n-p)},e.write=function(t,e,o,p,b,n){var M,z,c,r=8*n-b-1,i=(1<>1,O=23===b?Math.pow(2,-24)-Math.pow(2,-77):0,s=p?0:n-1,l=p?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(z=isNaN(e)?1:0,M=i):(M=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-M))<1&&(M--,c*=2),(e+=M+a>=1?O/c:O*Math.pow(2,1-a))*c>=2&&(M++,c/=2),M+a>=i?(z=0,M=i):M+a>=1?(z=(e*c-1)*Math.pow(2,b),M+=a):(z=e*Math.pow(2,a-1)*Math.pow(2,b),M=0));b>=8;t[o+s]=255&z,s+=l,z/=256,b-=8);for(M=M<0;t[o+s]=255&M,s+=l,M/=256,r-=8);t[o+s-l]|=128*d}},826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},755:function(t,e){var o;!function(e,o){"use strict";"object"==typeof t.exports?t.exports=e.document?o(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return o(t)}:o(e)}("undefined"!=typeof window?window:this,(function(p,b){"use strict";var n=[],M=Object.getPrototypeOf,z=n.slice,c=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},r=n.push,i=n.indexOf,a={},O=a.toString,s=a.hasOwnProperty,l=s.toString,d=l.call(Object),A={},u=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},f=function(t){return null!=t&&t===t.window},q=p.document,h={type:!0,src:!0,nonce:!0,noModule:!0};function W(t,e,o){var p,b,n=(o=o||q).createElement("script");if(n.text=t,e)for(p in h)(b=e[p]||e.getAttribute&&e.getAttribute(p))&&n.setAttribute(p,b);o.head.appendChild(n).parentNode.removeChild(n)}function m(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?a[O.call(t)]||"object":typeof t}var g="3.6.1",v=function(t,e){return new v.fn.init(t,e)};function R(t){var e=!!t&&"length"in t&&t.length,o=m(t);return!u(t)&&!f(t)&&("array"===o||0===e||"number"==typeof e&&e>0&&e-1 in t)}v.fn=v.prototype={jquery:g,constructor:v,length:0,toArray:function(){return z.call(this)},get:function(t){return null==t?z.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=v.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return v.each(this,t)},map:function(t){return this.pushStack(v.map(this,(function(e,o){return t.call(e,o,e)})))},slice:function(){return this.pushStack(z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(v.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(v.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,o=+t+(t<0?e:0);return this.pushStack(o>=0&&o+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),U=new RegExp(k+"|>"),V=new RegExp(P),$=new RegExp("^"+E+"$"),Y={ID:new RegExp("^#("+E+")"),CLASS:new RegExp("^\\.("+E+")"),TAG:new RegExp("^("+E+"|[*])"),ATTR:new RegExp("^"+D),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("^(?:"+S+")$","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")},G=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ot=function(t,e){var o="0x"+t.slice(1)-65536;return e||(o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,1023&o|56320))},pt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,bt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},nt=function(){O()},Mt=ht((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{x.apply(_=T.call(W.childNodes),W.childNodes),_[W.childNodes.length].nodeType}catch(t){x={apply:_.length?function(t,e){w.apply(t,T.call(e))}:function(t,e){for(var o=t.length,p=0;t[o++]=e[p++];);t.length=o-1}}}function zt(t,e,p,b){var n,z,r,i,a,l,u,f=e&&e.ownerDocument,W=e?e.nodeType:9;if(p=p||[],"string"!=typeof t||!t||1!==W&&9!==W&&11!==W)return p;if(!b&&(O(e),e=e||s,d)){if(11!==W&&(a=Z.exec(t)))if(n=a[1]){if(9===W){if(!(r=e.getElementById(n)))return p;if(r.id===n)return p.push(r),p}else if(f&&(r=f.getElementById(n))&&q(e,r)&&r.id===n)return p.push(r),p}else{if(a[2])return x.apply(p,e.getElementsByTagName(t)),p;if((n=a[3])&&o.getElementsByClassName&&e.getElementsByClassName)return x.apply(p,e.getElementsByClassName(n)),p}if(o.qsa&&!B[t+" "]&&(!A||!A.test(t))&&(1!==W||"object"!==e.nodeName.toLowerCase())){if(u=t,f=e,1===W&&(U.test(t)||H.test(t))){for((f=tt.test(t)&&ut(e.parentNode)||e)===e&&o.scope||((i=e.getAttribute("id"))?i=i.replace(pt,bt):e.setAttribute("id",i=h)),z=(l=M(t)).length;z--;)l[z]=(i?"#"+i:":scope")+" "+qt(l[z]);u=l.join(",")}try{return x.apply(p,f.querySelectorAll(u)),p}catch(e){B(t,!0)}finally{i===h&&e.removeAttribute("id")}}}return c(t.replace(I,"$1"),e,p,b)}function ct(){var t=[];return function e(o,b){return t.push(o+" ")>p.cacheLength&&delete e[t.shift()],e[o+" "]=b}}function rt(t){return t[h]=!0,t}function it(t){var e=s.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function at(t,e){for(var o=t.split("|"),b=o.length;b--;)p.attrHandle[o[b]]=e}function Ot(t,e){var o=e&&t,p=o&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(p)return p;if(o)for(;o=o.nextSibling;)if(o===e)return-1;return t?1:-1}function st(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function lt(t){return function(e){var o=e.nodeName.toLowerCase();return("input"===o||"button"===o)&&e.type===t}}function dt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Mt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function At(t){return rt((function(e){return e=+e,rt((function(o,p){for(var b,n=t([],o.length,e),M=n.length;M--;)o[b=n[M]]&&(o[b]=!(p[b]=o[b]))}))}))}function ut(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in o=zt.support={},n=zt.isXML=function(t){var e=t&&t.namespaceURI,o=t&&(t.ownerDocument||t).documentElement;return!G.test(e||o&&o.nodeName||"HTML")},O=zt.setDocument=function(t){var e,b,M=t?t.ownerDocument||t:W;return M!=s&&9===M.nodeType&&M.documentElement?(l=(s=M).documentElement,d=!n(s),W!=s&&(b=s.defaultView)&&b.top!==b&&(b.addEventListener?b.addEventListener("unload",nt,!1):b.attachEvent&&b.attachEvent("onunload",nt)),o.scope=it((function(t){return l.appendChild(t).appendChild(s.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),o.attributes=it((function(t){return t.className="i",!t.getAttribute("className")})),o.getElementsByTagName=it((function(t){return t.appendChild(s.createComment("")),!t.getElementsByTagName("*").length})),o.getElementsByClassName=Q.test(s.getElementsByClassName),o.getById=it((function(t){return l.appendChild(t).id=h,!s.getElementsByName||!s.getElementsByName(h).length})),o.getById?(p.filter.ID=function(t){var e=t.replace(et,ot);return function(t){return t.getAttribute("id")===e}},p.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var o=e.getElementById(t);return o?[o]:[]}}):(p.filter.ID=function(t){var e=t.replace(et,ot);return function(t){var o=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return o&&o.value===e}},p.find.ID=function(t,e){if(void 0!==e.getElementById&&d){var o,p,b,n=e.getElementById(t);if(n){if((o=n.getAttributeNode("id"))&&o.value===t)return[n];for(b=e.getElementsByName(t),p=0;n=b[p++];)if((o=n.getAttributeNode("id"))&&o.value===t)return[n]}return[]}}),p.find.TAG=o.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):o.qsa?e.querySelectorAll(t):void 0}:function(t,e){var o,p=[],b=0,n=e.getElementsByTagName(t);if("*"===t){for(;o=n[b++];)1===o.nodeType&&p.push(o);return p}return n},p.find.CLASS=o.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&d)return e.getElementsByClassName(t)},u=[],A=[],(o.qsa=Q.test(s.querySelectorAll))&&(it((function(t){var e;l.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&A.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||A.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+S+")"),t.querySelectorAll("[id~="+h+"-]").length||A.push("~="),(e=s.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||A.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||A.push(":checked"),t.querySelectorAll("a#"+h+"+*").length||A.push(".#.+[+~]"),t.querySelectorAll("\\\f"),A.push("[\\r\\n\\f]")})),it((function(t){t.innerHTML="";var e=s.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&A.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&A.push(":enabled",":disabled"),l.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&A.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),A.push(",.*:")}))),(o.matchesSelector=Q.test(f=l.matches||l.webkitMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector||l.msMatchesSelector))&&it((function(t){o.disconnectedMatch=f.call(t,"*"),f.call(t,"[s!='']:x"),u.push("!=",P)})),A=A.length&&new RegExp(A.join("|")),u=u.length&&new RegExp(u.join("|")),e=Q.test(l.compareDocumentPosition),q=e||Q.test(l.contains)?function(t,e){var o=9===t.nodeType?t.documentElement:t,p=e&&e.parentNode;return t===p||!(!p||1!==p.nodeType||!(o.contains?o.contains(p):t.compareDocumentPosition&&16&t.compareDocumentPosition(p)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},L=e?function(t,e){if(t===e)return a=!0,0;var p=!t.compareDocumentPosition-!e.compareDocumentPosition;return p||(1&(p=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!o.sortDetached&&e.compareDocumentPosition(t)===p?t==s||t.ownerDocument==W&&q(W,t)?-1:e==s||e.ownerDocument==W&&q(W,e)?1:i?C(i,t)-C(i,e):0:4&p?-1:1)}:function(t,e){if(t===e)return a=!0,0;var o,p=0,b=t.parentNode,n=e.parentNode,M=[t],z=[e];if(!b||!n)return t==s?-1:e==s?1:b?-1:n?1:i?C(i,t)-C(i,e):0;if(b===n)return Ot(t,e);for(o=t;o=o.parentNode;)M.unshift(o);for(o=e;o=o.parentNode;)z.unshift(o);for(;M[p]===z[p];)p++;return p?Ot(M[p],z[p]):M[p]==W?-1:z[p]==W?1:0},s):s},zt.matches=function(t,e){return zt(t,null,null,e)},zt.matchesSelector=function(t,e){if(O(t),o.matchesSelector&&d&&!B[e+" "]&&(!u||!u.test(e))&&(!A||!A.test(e)))try{var p=f.call(t,e);if(p||o.disconnectedMatch||t.document&&11!==t.document.nodeType)return p}catch(t){B(e,!0)}return zt(e,s,null,[t]).length>0},zt.contains=function(t,e){return(t.ownerDocument||t)!=s&&O(t),q(t,e)},zt.attr=function(t,e){(t.ownerDocument||t)!=s&&O(t);var b=p.attrHandle[e.toLowerCase()],n=b&&X.call(p.attrHandle,e.toLowerCase())?b(t,e,!d):void 0;return void 0!==n?n:o.attributes||!d?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},zt.escape=function(t){return(t+"").replace(pt,bt)},zt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},zt.uniqueSort=function(t){var e,p=[],b=0,n=0;if(a=!o.detectDuplicates,i=!o.sortStable&&t.slice(0),t.sort(L),a){for(;e=t[n++];)e===t[n]&&(b=p.push(n));for(;b--;)t.splice(p[b],1)}return i=null,t},b=zt.getText=function(t){var e,o="",p=0,n=t.nodeType;if(n){if(1===n||9===n||11===n){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)o+=b(t)}else if(3===n||4===n)return t.nodeValue}else for(;e=t[p++];)o+=b(e);return o},p=zt.selectors={cacheLength:50,createPseudo:rt,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,ot),t[3]=(t[3]||t[4]||t[5]||"").replace(et,ot),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||zt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&zt.error(t[0]),t},PSEUDO:function(t){var e,o=!t[6]&&t[2];return Y.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":o&&V.test(o)&&(e=M(o,!0))&&(e=o.indexOf(")",o.length-e)-o.length)&&(t[0]=t[0].slice(0,e),t[2]=o.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,ot).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=v[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+k+"|$)"))&&v(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,o){return function(p){var b=zt.attr(p,t);return null==b?"!="===e:!e||(b+="","="===e?b===o:"!="===e?b!==o:"^="===e?o&&0===b.indexOf(o):"*="===e?o&&b.indexOf(o)>-1:"$="===e?o&&b.slice(-o.length)===o:"~="===e?(" "+b.replace(j," ")+" ").indexOf(o)>-1:"|="===e&&(b===o||b.slice(0,o.length+1)===o+"-"))}},CHILD:function(t,e,o,p,b){var n="nth"!==t.slice(0,3),M="last"!==t.slice(-4),z="of-type"===e;return 1===p&&0===b?function(t){return!!t.parentNode}:function(e,o,c){var r,i,a,O,s,l,d=n!==M?"nextSibling":"previousSibling",A=e.parentNode,u=z&&e.nodeName.toLowerCase(),f=!c&&!z,q=!1;if(A){if(n){for(;d;){for(O=e;O=O[d];)if(z?O.nodeName.toLowerCase()===u:1===O.nodeType)return!1;l=d="only"===t&&!l&&"nextSibling"}return!0}if(l=[M?A.firstChild:A.lastChild],M&&f){for(q=(s=(r=(i=(a=(O=A)[h]||(O[h]={}))[O.uniqueID]||(a[O.uniqueID]={}))[t]||[])[0]===m&&r[1])&&r[2],O=s&&A.childNodes[s];O=++s&&O&&O[d]||(q=s=0)||l.pop();)if(1===O.nodeType&&++q&&O===e){i[t]=[m,s,q];break}}else if(f&&(q=s=(r=(i=(a=(O=e)[h]||(O[h]={}))[O.uniqueID]||(a[O.uniqueID]={}))[t]||[])[0]===m&&r[1]),!1===q)for(;(O=++s&&O&&O[d]||(q=s=0)||l.pop())&&((z?O.nodeName.toLowerCase()!==u:1!==O.nodeType)||!++q||(f&&((i=(a=O[h]||(O[h]={}))[O.uniqueID]||(a[O.uniqueID]={}))[t]=[m,q]),O!==e)););return(q-=b)===p||q%p==0&&q/p>=0}}},PSEUDO:function(t,e){var o,b=p.pseudos[t]||p.setFilters[t.toLowerCase()]||zt.error("unsupported pseudo: "+t);return b[h]?b(e):b.length>1?(o=[t,t,"",e],p.setFilters.hasOwnProperty(t.toLowerCase())?rt((function(t,o){for(var p,n=b(t,e),M=n.length;M--;)t[p=C(t,n[M])]=!(o[p]=n[M])})):function(t){return b(t,0,o)}):b}},pseudos:{not:rt((function(t){var e=[],o=[],p=z(t.replace(I,"$1"));return p[h]?rt((function(t,e,o,b){for(var n,M=p(t,null,b,[]),z=t.length;z--;)(n=M[z])&&(t[z]=!(e[z]=n))})):function(t,b,n){return e[0]=t,p(e,null,n,o),e[0]=null,!o.pop()}})),has:rt((function(t){return function(e){return zt(t,e).length>0}})),contains:rt((function(t){return t=t.replace(et,ot),function(e){return(e.textContent||b(e)).indexOf(t)>-1}})),lang:rt((function(t){return $.test(t||"")||zt.error("unsupported lang: "+t),t=t.replace(et,ot).toLowerCase(),function(e){var o;do{if(o=d?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(o=o.toLowerCase())===t||0===o.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var o=t.location&&t.location.hash;return o&&o.slice(1)===e.id},root:function(t){return t===l},focus:function(t){return t===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:dt(!1),disabled:dt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!p.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return J.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:At((function(){return[0]})),last:At((function(t,e){return[e-1]})),eq:At((function(t,e,o){return[o<0?o+e:o]})),even:At((function(t,e){for(var o=0;oe?e:o;--p>=0;)t.push(p);return t})),gt:At((function(t,e,o){for(var p=o<0?o+e:o;++p1?function(e,o,p){for(var b=t.length;b--;)if(!t[b](e,o,p))return!1;return!0}:t[0]}function mt(t,e,o,p,b){for(var n,M=[],z=0,c=t.length,r=null!=e;z-1&&(n[r]=!(M[r]=a))}}else u=mt(u===M?u.splice(l,u.length):u),b?b(null,M,u,c):x.apply(M,u)}))}function vt(t){for(var e,o,b,n=t.length,M=p.relative[t[0].type],z=M||p.relative[" "],c=M?1:0,i=ht((function(t){return t===e}),z,!0),a=ht((function(t){return C(e,t)>-1}),z,!0),O=[function(t,o,p){var b=!M&&(p||o!==r)||((e=o).nodeType?i(t,o,p):a(t,o,p));return e=null,b}];c1&&Wt(O),c>1&&qt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(I,"$1"),o,c0,b=t.length>0,n=function(n,M,z,c,i){var a,l,A,u=0,f="0",q=n&&[],h=[],W=r,g=n||b&&p.find.TAG("*",i),v=m+=null==W?1:Math.random()||.1,R=g.length;for(i&&(r=M==s||M||i);f!==R&&null!=(a=g[f]);f++){if(b&&a){for(l=0,M||a.ownerDocument==s||(O(a),z=!d);A=t[l++];)if(A(a,M||s,z)){c.push(a);break}i&&(m=v)}o&&((a=!A&&a)&&u--,n&&q.push(a))}if(u+=f,o&&f!==u){for(l=0;A=e[l++];)A(q,h,M,z);if(n){if(u>0)for(;f--;)q[f]||h[f]||(h[f]=N.call(c));h=mt(h)}x.apply(c,h),i&&!n&&h.length>0&&u+e.length>1&&zt.uniqueSort(c)}return i&&(m=v,r=W),q};return o?rt(n):n}(n,b)),z.selector=t}return z},c=zt.select=function(t,e,o,b){var n,c,r,i,a,O="function"==typeof t&&t,s=!b&&M(t=O.selector||t);if(o=o||[],1===s.length){if((c=s[0]=s[0].slice(0)).length>2&&"ID"===(r=c[0]).type&&9===e.nodeType&&d&&p.relative[c[1].type]){if(!(e=(p.find.ID(r.matches[0].replace(et,ot),e)||[])[0]))return o;O&&(e=e.parentNode),t=t.slice(c.shift().value.length)}for(n=Y.needsContext.test(t)?0:c.length;n--&&(r=c[n],!p.relative[i=r.type]);)if((a=p.find[i])&&(b=a(r.matches[0].replace(et,ot),tt.test(c[0].type)&&ut(e.parentNode)||e))){if(c.splice(n,1),!(t=b.length&&qt(c)))return x.apply(o,b),o;break}}return(O||z(t,s))(b,e,!d,o,!e||tt.test(t)&&ut(e.parentNode)||e),o},o.sortStable=h.split("").sort(L).join("")===h,o.detectDuplicates=!!a,O(),o.sortDetached=it((function(t){return 1&t.compareDocumentPosition(s.createElement("fieldset"))})),it((function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")}))||at("type|href|height|width",(function(t,e,o){if(!o)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),o.attributes&&it((function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||at("value",(function(t,e,o){if(!o&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),it((function(t){return null==t.getAttribute("disabled")}))||at(S,(function(t,e,o){var p;if(!o)return!0===t[e]?e.toLowerCase():(p=t.getAttributeNode(e))&&p.specified?p.value:null})),zt}(p);v.find=y,v.expr=y.selectors,v.expr[":"]=v.expr.pseudos,v.uniqueSort=v.unique=y.uniqueSort,v.text=y.getText,v.isXMLDoc=y.isXML,v.contains=y.contains,v.escapeSelector=y.escape;var B=function(t,e,o){for(var p=[],b=void 0!==o;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(b&&v(t).is(o))break;p.push(t)}return p},L=function(t,e){for(var o=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&o.push(t);return o},X=v.expr.match.needsContext;function _(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function w(t,e,o){return u(e)?v.grep(t,(function(t,p){return!!e.call(t,p,t)!==o})):e.nodeType?v.grep(t,(function(t){return t===e!==o})):"string"!=typeof e?v.grep(t,(function(t){return i.call(e,t)>-1!==o})):v.filter(e,t,o)}v.filter=function(t,e,o){var p=e[0];return o&&(t=":not("+t+")"),1===e.length&&1===p.nodeType?v.find.matchesSelector(p,t)?[p]:[]:v.find.matches(t,v.grep(e,(function(t){return 1===t.nodeType})))},v.fn.extend({find:function(t){var e,o,p=this.length,b=this;if("string"!=typeof t)return this.pushStack(v(t).filter((function(){for(e=0;e1?v.uniqueSort(o):o},filter:function(t){return this.pushStack(w(this,t||[],!1))},not:function(t){return this.pushStack(w(this,t||[],!0))},is:function(t){return!!w(this,"string"==typeof t&&X.test(t)?v(t):t||[],!1).length}});var x,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(v.fn.init=function(t,e,o){var p,b;if(!t)return this;if(o=o||x,"string"==typeof t){if(!(p="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:T.exec(t))||!p[1]&&e)return!e||e.jquery?(e||o).find(t):this.constructor(e).find(t);if(p[1]){if(e=e instanceof v?e[0]:e,v.merge(this,v.parseHTML(p[1],e&&e.nodeType?e.ownerDocument||e:q,!0)),N.test(p[1])&&v.isPlainObject(e))for(p in e)u(this[p])?this[p](e[p]):this.attr(p,e[p]);return this}return(b=q.getElementById(p[2]))&&(this[0]=b,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):u(t)?void 0!==o.ready?o.ready(t):t(v):v.makeArray(t,this)}).prototype=v.fn,x=v(q);var C=/^(?:parents|prev(?:Until|All))/,S={children:!0,contents:!0,next:!0,prev:!0};function k(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}v.fn.extend({has:function(t){var e=v(t,this),o=e.length;return this.filter((function(){for(var t=0;t-1:1===o.nodeType&&v.find.matchesSelector(o,t))){n.push(o);break}return this.pushStack(n.length>1?v.uniqueSort(n):n)},index:function(t){return t?"string"==typeof t?i.call(v(t),this[0]):i.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(v.uniqueSort(v.merge(this.get(),v(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),v.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return B(t,"parentNode")},parentsUntil:function(t,e,o){return B(t,"parentNode",o)},next:function(t){return k(t,"nextSibling")},prev:function(t){return k(t,"previousSibling")},nextAll:function(t){return B(t,"nextSibling")},prevAll:function(t){return B(t,"previousSibling")},nextUntil:function(t,e,o){return B(t,"nextSibling",o)},prevUntil:function(t,e,o){return B(t,"previousSibling",o)},siblings:function(t){return L((t.parentNode||{}).firstChild,t)},children:function(t){return L(t.firstChild)},contents:function(t){return null!=t.contentDocument&&M(t.contentDocument)?t.contentDocument:(_(t,"template")&&(t=t.content||t),v.merge([],t.childNodes))}},(function(t,e){v.fn[t]=function(o,p){var b=v.map(this,e,o);return"Until"!==t.slice(-5)&&(p=o),p&&"string"==typeof p&&(b=v.filter(p,b)),this.length>1&&(S[t]||v.uniqueSort(b),C.test(t)&&b.reverse()),this.pushStack(b)}}));var E=/[^\x20\t\r\n\f]+/g;function D(t){return t}function P(t){throw t}function j(t,e,o,p){var b;try{t&&u(b=t.promise)?b.call(t).done(e).fail(o):t&&u(b=t.then)?b.call(t,e,o):e.apply(void 0,[t].slice(p))}catch(t){o.apply(void 0,[t])}}v.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return v.each(t.match(E)||[],(function(t,o){e[o]=!0})),e}(t):v.extend({},t);var e,o,p,b,n=[],M=[],z=-1,c=function(){for(b=b||t.once,p=e=!0;M.length;z=-1)for(o=M.shift();++z-1;)n.splice(o,1),o<=z&&z--})),this},has:function(t){return t?v.inArray(t,n)>-1:n.length>0},empty:function(){return n&&(n=[]),this},disable:function(){return b=M=[],n=o="",this},disabled:function(){return!n},lock:function(){return b=M=[],o||e||(n=o=""),this},locked:function(){return!!b},fireWith:function(t,o){return b||(o=[t,(o=o||[]).slice?o.slice():o],M.push(o),e||c()),this},fire:function(){return r.fireWith(this,arguments),this},fired:function(){return!!p}};return r},v.extend({Deferred:function(t){var e=[["notify","progress",v.Callbacks("memory"),v.Callbacks("memory"),2],["resolve","done",v.Callbacks("once memory"),v.Callbacks("once memory"),0,"resolved"],["reject","fail",v.Callbacks("once memory"),v.Callbacks("once memory"),1,"rejected"]],o="pending",b={state:function(){return o},always:function(){return n.done(arguments).fail(arguments),this},catch:function(t){return b.then(null,t)},pipe:function(){var t=arguments;return v.Deferred((function(o){v.each(e,(function(e,p){var b=u(t[p[4]])&&t[p[4]];n[p[1]]((function(){var t=b&&b.apply(this,arguments);t&&u(t.promise)?t.promise().progress(o.notify).done(o.resolve).fail(o.reject):o[p[0]+"With"](this,b?[t]:arguments)}))})),t=null})).promise()},then:function(t,o,b){var n=0;function M(t,e,o,b){return function(){var z=this,c=arguments,r=function(){var p,r;if(!(t=n&&(o!==P&&(z=void 0,c=[p]),e.rejectWith(z,c))}};t?i():(v.Deferred.getStackHook&&(i.stackTrace=v.Deferred.getStackHook()),p.setTimeout(i))}}return v.Deferred((function(p){e[0][3].add(M(0,p,u(b)?b:D,p.notifyWith)),e[1][3].add(M(0,p,u(t)?t:D)),e[2][3].add(M(0,p,u(o)?o:P))})).promise()},promise:function(t){return null!=t?v.extend(t,b):b}},n={};return v.each(e,(function(t,p){var M=p[2],z=p[5];b[p[1]]=M.add,z&&M.add((function(){o=z}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),M.add(p[3].fire),n[p[0]]=function(){return n[p[0]+"With"](this===n?void 0:this,arguments),this},n[p[0]+"With"]=M.fireWith})),b.promise(n),t&&t.call(n,n),n},when:function(t){var e=arguments.length,o=e,p=Array(o),b=z.call(arguments),n=v.Deferred(),M=function(t){return function(o){p[t]=this,b[t]=arguments.length>1?z.call(arguments):o,--e||n.resolveWith(p,b)}};if(e<=1&&(j(t,n.done(M(o)).resolve,n.reject,!e),"pending"===n.state()||u(b[o]&&b[o].then)))return n.then();for(;o--;)j(b[o],M(o),n.reject);return n.promise()}});var I=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;v.Deferred.exceptionHook=function(t,e){p.console&&p.console.warn&&t&&I.test(t.name)&&p.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},v.readyException=function(t){p.setTimeout((function(){throw t}))};var F=v.Deferred();function H(){q.removeEventListener("DOMContentLoaded",H),p.removeEventListener("load",H),v.ready()}v.fn.ready=function(t){return F.then(t).catch((function(t){v.readyException(t)})),this},v.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--v.readyWait:v.isReady)||(v.isReady=!0,!0!==t&&--v.readyWait>0||F.resolveWith(q,[v]))}}),v.ready.then=F.then,"complete"===q.readyState||"loading"!==q.readyState&&!q.documentElement.doScroll?p.setTimeout(v.ready):(q.addEventListener("DOMContentLoaded",H),p.addEventListener("load",H));var U=function(t,e,o,p,b,n,M){var z=0,c=t.length,r=null==o;if("object"===m(o))for(z in b=!0,o)U(t,e,z,o[z],!0,n,M);else if(void 0!==p&&(b=!0,u(p)||(M=!0),r&&(M?(e.call(t,p),e=null):(r=e,e=function(t,e,o){return r.call(v(t),o)})),e))for(;z1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),v.extend({queue:function(t,e,o){var p;if(t)return e=(e||"fx")+"queue",p=Q.get(t,e),o&&(!p||Array.isArray(o)?p=Q.access(t,e,v.makeArray(o)):p.push(o)),p||[]},dequeue:function(t,e){e=e||"fx";var o=v.queue(t,e),p=o.length,b=o.shift(),n=v._queueHooks(t,e);"inprogress"===b&&(b=o.shift(),p--),b&&("fx"===e&&o.unshift("inprogress"),delete n.stop,b.call(t,(function(){v.dequeue(t,e)}),n)),!p&&n&&n.empty.fire()},_queueHooks:function(t,e){var o=e+"queueHooks";return Q.get(t,o)||Q.access(t,o,{empty:v.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",o])}))})}}),v.fn.extend({queue:function(t,e){var o=2;return"string"!=typeof t&&(e=t,t="fx",o--),arguments.length\x20\t\r\n\f]*)/i,ft=/^$|^module$|\/(?:java|ecma)script/i;lt=q.createDocumentFragment().appendChild(q.createElement("div")),(dt=q.createElement("input")).setAttribute("type","radio"),dt.setAttribute("checked","checked"),dt.setAttribute("name","t"),lt.appendChild(dt),A.checkClone=lt.cloneNode(!0).cloneNode(!0).lastChild.checked,lt.innerHTML="",A.noCloneChecked=!!lt.cloneNode(!0).lastChild.defaultValue,lt.innerHTML="",A.option=!!lt.lastChild;var qt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ht(t,e){var o;return o=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&_(t,e)?v.merge([t],o):o}function Wt(t,e){for(var o=0,p=t.length;o",""]);var mt=/<|&#?\w+;/;function gt(t,e,o,p,b){for(var n,M,z,c,r,i,a=e.createDocumentFragment(),O=[],s=0,l=t.length;s-1)b&&b.push(n);else if(r=zt(n),M=ht(a.appendChild(n),"script"),r&&Wt(M),o)for(i=0;n=M[i++];)ft.test(n.type||"")&&o.push(n);return a}var vt=/^([^.]*)(?:\.(.+)|)/;function Rt(){return!0}function yt(){return!1}function Bt(t,e){return t===function(){try{return q.activeElement}catch(t){}}()==("focus"===e)}function Lt(t,e,o,p,b,n){var M,z;if("object"==typeof e){for(z in"string"!=typeof o&&(p=p||o,o=void 0),e)Lt(t,z,o,p,e[z],n);return t}if(null==p&&null==b?(b=o,p=o=void 0):null==b&&("string"==typeof o?(b=p,p=void 0):(b=p,p=o,o=void 0)),!1===b)b=yt;else if(!b)return t;return 1===n&&(M=b,b=function(t){return v().off(t),M.apply(this,arguments)},b.guid=M.guid||(M.guid=v.guid++)),t.each((function(){v.event.add(this,e,b,p,o)}))}function Xt(t,e,o){o?(Q.set(t,e,!1),v.event.add(t,e,{namespace:!1,handler:function(t){var p,b,n=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(n.length)(v.event.special[e]||{}).delegateType&&t.stopPropagation();else if(n=z.call(arguments),Q.set(this,e,n),p=o(this,e),this[e](),n!==(b=Q.get(this,e))||p?Q.set(this,e,!1):b={},n!==b)return t.stopImmediatePropagation(),t.preventDefault(),b&&b.value}else n.length&&(Q.set(this,e,{value:v.event.trigger(v.extend(n[0],v.Event.prototype),n.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&v.event.add(t,e,Rt)}v.event={global:{},add:function(t,e,o,p,b){var n,M,z,c,r,i,a,O,s,l,d,A=Q.get(t);if(J(t))for(o.handler&&(o=(n=o).handler,b=n.selector),b&&v.find.matchesSelector(Mt,b),o.guid||(o.guid=v.guid++),(c=A.events)||(c=A.events=Object.create(null)),(M=A.handle)||(M=A.handle=function(e){return void 0!==v&&v.event.triggered!==e.type?v.event.dispatch.apply(t,arguments):void 0}),r=(e=(e||"").match(E)||[""]).length;r--;)s=d=(z=vt.exec(e[r])||[])[1],l=(z[2]||"").split(".").sort(),s&&(a=v.event.special[s]||{},s=(b?a.delegateType:a.bindType)||s,a=v.event.special[s]||{},i=v.extend({type:s,origType:d,data:p,handler:o,guid:o.guid,selector:b,needsContext:b&&v.expr.match.needsContext.test(b),namespace:l.join(".")},n),(O=c[s])||((O=c[s]=[]).delegateCount=0,a.setup&&!1!==a.setup.call(t,p,l,M)||t.addEventListener&&t.addEventListener(s,M)),a.add&&(a.add.call(t,i),i.handler.guid||(i.handler.guid=o.guid)),b?O.splice(O.delegateCount++,0,i):O.push(i),v.event.global[s]=!0)},remove:function(t,e,o,p,b){var n,M,z,c,r,i,a,O,s,l,d,A=Q.hasData(t)&&Q.get(t);if(A&&(c=A.events)){for(r=(e=(e||"").match(E)||[""]).length;r--;)if(s=d=(z=vt.exec(e[r])||[])[1],l=(z[2]||"").split(".").sort(),s){for(a=v.event.special[s]||{},O=c[s=(p?a.delegateType:a.bindType)||s]||[],z=z[2]&&new RegExp("(^|\\.)"+l.join("\\.(?:.*\\.|)")+"(\\.|$)"),M=n=O.length;n--;)i=O[n],!b&&d!==i.origType||o&&o.guid!==i.guid||z&&!z.test(i.namespace)||p&&p!==i.selector&&("**"!==p||!i.selector)||(O.splice(n,1),i.selector&&O.delegateCount--,a.remove&&a.remove.call(t,i));M&&!O.length&&(a.teardown&&!1!==a.teardown.call(t,l,A.handle)||v.removeEvent(t,s,A.handle),delete c[s])}else for(s in c)v.event.remove(t,s+e[r],o,p,!0);v.isEmptyObject(c)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,o,p,b,n,M,z=new Array(arguments.length),c=v.event.fix(t),r=(Q.get(this,"events")||Object.create(null))[c.type]||[],i=v.event.special[c.type]||{};for(z[0]=c,e=1;e=1))for(;r!==this;r=r.parentNode||this)if(1===r.nodeType&&("click"!==t.type||!0!==r.disabled)){for(n=[],M={},o=0;o-1:v.find(b,this,null,[r]).length),M[b]&&n.push(p);n.length&&z.push({elem:r,handlers:n})}return r=this,c\s*$/g;function xt(t,e){return _(t,"table")&&_(11!==e.nodeType?e:e.firstChild,"tr")&&v(t).children("tbody")[0]||t}function Tt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ct(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function St(t,e){var o,p,b,n,M,z;if(1===e.nodeType){if(Q.hasData(t)&&(z=Q.get(t).events))for(b in Q.remove(e,"handle events"),z)for(o=0,p=z[b].length;o1&&"string"==typeof l&&!A.checkClone&&Nt.test(l))return t.each((function(b){var n=t.eq(b);d&&(e[0]=l.call(this,b,n.html())),Et(n,e,o,p)}));if(O&&(n=(b=gt(e,t[0].ownerDocument,!1,t,p)).firstChild,1===b.childNodes.length&&(b=n),n||p)){for(z=(M=v.map(ht(b,"script"),Tt)).length;a0&&Wt(M,!c&&ht(t,"script")),z},cleanData:function(t){for(var e,o,p,b=v.event.special,n=0;void 0!==(o=t[n]);n++)if(J(o)){if(e=o[Q.expando]){if(e.events)for(p in e.events)b[p]?v.event.remove(o,p):v.removeEvent(o,p,e.handle);o[Q.expando]=void 0}o[Z.expando]&&(o[Z.expando]=void 0)}}}),v.fn.extend({detach:function(t){return Dt(this,t,!0)},remove:function(t){return Dt(this,t)},text:function(t){return U(this,(function(t){return void 0===t?v.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Et(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||xt(this,t).appendChild(t)}))},prepend:function(){return Et(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=xt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Et(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Et(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(v.cleanData(ht(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return v.clone(this,t,e)}))},html:function(t){return U(this,(function(t){var e=this[0]||{},o=0,p=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!_t.test(t)&&!qt[(ut.exec(t)||["",""])[1].toLowerCase()]){t=v.htmlPrefilter(t);try{for(;o=0&&(c+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-n-c-z-.5))||0),c}function pe(t,e,o){var p=It(t),b=(!A.boxSizingReliable()||o)&&"border-box"===v.css(t,"boxSizing",!1,p),n=b,M=Vt(t,e,p),z="offset"+e[0].toUpperCase()+e.slice(1);if(Pt.test(M)){if(!o)return M;M="auto"}return(!A.boxSizingReliable()&&b||!A.reliableTrDimensions()&&_(t,"tr")||"auto"===M||!parseFloat(M)&&"inline"===v.css(t,"display",!1,p))&&t.getClientRects().length&&(b="border-box"===v.css(t,"boxSizing",!1,p),(n=z in t)&&(M=t[z])),(M=parseFloat(M)||0)+oe(t,e,o||(b?"border":"content"),n,p,M)+"px"}function be(t,e,o,p,b){return new be.prototype.init(t,e,o,p,b)}v.extend({cssHooks:{opacity:{get:function(t,e){if(e){var o=Vt(t,"opacity");return""===o?"1":o}}}},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(t,e,o,p){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var b,n,M,z=G(e),c=jt.test(e),r=t.style;if(c||(e=Kt(z)),M=v.cssHooks[e]||v.cssHooks[z],void 0===o)return M&&"get"in M&&void 0!==(b=M.get(t,!1,p))?b:r[e];"string"===(n=typeof o)&&(b=bt.exec(o))&&b[1]&&(o=it(t,e,b),n="number"),null!=o&&o==o&&("number"!==n||c||(o+=b&&b[3]||(v.cssNumber[z]?"":"px")),A.clearCloneStyle||""!==o||0!==e.indexOf("background")||(r[e]="inherit"),M&&"set"in M&&void 0===(o=M.set(t,o,p))||(c?r.setProperty(e,o):r[e]=o))}},css:function(t,e,o,p){var b,n,M,z=G(e);return jt.test(e)||(e=Kt(z)),(M=v.cssHooks[e]||v.cssHooks[z])&&"get"in M&&(b=M.get(t,!0,o)),void 0===b&&(b=Vt(t,e,p)),"normal"===b&&e in te&&(b=te[e]),""===o||o?(n=parseFloat(b),!0===o||isFinite(n)?n||0:b):b}}),v.each(["height","width"],(function(t,e){v.cssHooks[e]={get:function(t,o,p){if(o)return!Qt.test(v.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?pe(t,e,p):Ft(t,Zt,(function(){return pe(t,e,p)}))},set:function(t,o,p){var b,n=It(t),M=!A.scrollboxSize()&&"absolute"===n.position,z=(M||p)&&"border-box"===v.css(t,"boxSizing",!1,n),c=p?oe(t,e,p,z,n):0;return z&&M&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(n[e])-oe(t,e,"border",!1,n)-.5)),c&&(b=bt.exec(o))&&"px"!==(b[3]||"px")&&(t.style[e]=o,o=v.css(t,e)),ee(0,o,c)}}})),v.cssHooks.marginLeft=$t(A.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Vt(t,"marginLeft"))||t.getBoundingClientRect().left-Ft(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),v.each({margin:"",padding:"",border:"Width"},(function(t,e){v.cssHooks[t+e]={expand:function(o){for(var p=0,b={},n="string"==typeof o?o.split(" "):[o];p<4;p++)b[t+nt[p]+e]=n[p]||n[p-2]||n[0];return b}},"margin"!==t&&(v.cssHooks[t+e].set=ee)})),v.fn.extend({css:function(t,e){return U(this,(function(t,e,o){var p,b,n={},M=0;if(Array.isArray(e)){for(p=It(t),b=e.length;M1)}}),v.Tween=be,be.prototype={constructor:be,init:function(t,e,o,p,b,n){this.elem=t,this.prop=o,this.easing=b||v.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=p,this.unit=n||(v.cssNumber[o]?"":"px")},cur:function(){var t=be.propHooks[this.prop];return t&&t.get?t.get(this):be.propHooks._default.get(this)},run:function(t){var e,o=be.propHooks[this.prop];return this.options.duration?this.pos=e=v.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),o&&o.set?o.set(this):be.propHooks._default.set(this),this}},be.prototype.init.prototype=be.prototype,be.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=v.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){v.fx.step[t.prop]?v.fx.step[t.prop](t):1!==t.elem.nodeType||!v.cssHooks[t.prop]&&null==t.elem.style[Kt(t.prop)]?t.elem[t.prop]=t.now:v.style(t.elem,t.prop,t.now+t.unit)}}},be.propHooks.scrollTop=be.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},v.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},v.fx=be.prototype.init,v.fx.step={};var ne,Me,ze=/^(?:toggle|show|hide)$/,ce=/queueHooks$/;function re(){Me&&(!1===q.hidden&&p.requestAnimationFrame?p.requestAnimationFrame(re):p.setTimeout(re,v.fx.interval),v.fx.tick())}function ie(){return p.setTimeout((function(){ne=void 0})),ne=Date.now()}function ae(t,e){var o,p=0,b={height:t};for(e=e?1:0;p<4;p+=2-e)b["margin"+(o=nt[p])]=b["padding"+o]=t;return e&&(b.opacity=b.width=t),b}function Oe(t,e,o){for(var p,b=(se.tweeners[e]||[]).concat(se.tweeners["*"]),n=0,M=b.length;n1)},removeAttr:function(t){return this.each((function(){v.removeAttr(this,t)}))}}),v.extend({attr:function(t,e,o){var p,b,n=t.nodeType;if(3!==n&&8!==n&&2!==n)return void 0===t.getAttribute?v.prop(t,e,o):(1===n&&v.isXMLDoc(t)||(b=v.attrHooks[e.toLowerCase()]||(v.expr.match.bool.test(e)?le:void 0)),void 0!==o?null===o?void v.removeAttr(t,e):b&&"set"in b&&void 0!==(p=b.set(t,o,e))?p:(t.setAttribute(e,o+""),o):b&&"get"in b&&null!==(p=b.get(t,e))?p:null==(p=v.find.attr(t,e))?void 0:p)},attrHooks:{type:{set:function(t,e){if(!A.radioValue&&"radio"===e&&_(t,"input")){var o=t.value;return t.setAttribute("type",e),o&&(t.value=o),e}}}},removeAttr:function(t,e){var o,p=0,b=e&&e.match(E);if(b&&1===t.nodeType)for(;o=b[p++];)t.removeAttribute(o)}}),le={set:function(t,e,o){return!1===e?v.removeAttr(t,o):t.setAttribute(o,o),o}},v.each(v.expr.match.bool.source.match(/\w+/g),(function(t,e){var o=de[e]||v.find.attr;de[e]=function(t,e,p){var b,n,M=e.toLowerCase();return p||(n=de[M],de[M]=b,b=null!=o(t,e,p)?M:null,de[M]=n),b}}));var Ae=/^(?:input|select|textarea|button)$/i,ue=/^(?:a|area)$/i;function fe(t){return(t.match(E)||[]).join(" ")}function qe(t){return t.getAttribute&&t.getAttribute("class")||""}function he(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(E)||[]}v.fn.extend({prop:function(t,e){return U(this,v.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[v.propFix[t]||t]}))}}),v.extend({prop:function(t,e,o){var p,b,n=t.nodeType;if(3!==n&&8!==n&&2!==n)return 1===n&&v.isXMLDoc(t)||(e=v.propFix[e]||e,b=v.propHooks[e]),void 0!==o?b&&"set"in b&&void 0!==(p=b.set(t,o,e))?p:t[e]=o:b&&"get"in b&&null!==(p=b.get(t,e))?p:t[e]},propHooks:{tabIndex:{get:function(t){var e=v.find.attr(t,"tabindex");return e?parseInt(e,10):Ae.test(t.nodeName)||ue.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),A.optSelected||(v.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),v.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){v.propFix[this.toLowerCase()]=this})),v.fn.extend({addClass:function(t){var e,o,p,b,n,M;return u(t)?this.each((function(e){v(this).addClass(t.call(this,e,qe(this)))})):(e=he(t)).length?this.each((function(){if(p=qe(this),o=1===this.nodeType&&" "+fe(p)+" "){for(n=0;n-1;)o=o.replace(" "+b+" "," ");M=fe(o),p!==M&&this.setAttribute("class",M)}})):this:this.attr("class","")},toggleClass:function(t,e){var o,p,b,n,M=typeof t,z="string"===M||Array.isArray(t);return u(t)?this.each((function(o){v(this).toggleClass(t.call(this,o,qe(this),e),e)})):"boolean"==typeof e&&z?e?this.addClass(t):this.removeClass(t):(o=he(t),this.each((function(){if(z)for(n=v(this),b=0;b-1)return!0;return!1}});var We=/\r/g;v.fn.extend({val:function(t){var e,o,p,b=this[0];return arguments.length?(p=u(t),this.each((function(o){var b;1===this.nodeType&&(null==(b=p?t.call(this,o,v(this).val()):t)?b="":"number"==typeof b?b+="":Array.isArray(b)&&(b=v.map(b,(function(t){return null==t?"":t+""}))),(e=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,b,"value")||(this.value=b))}))):b?(e=v.valHooks[b.type]||v.valHooks[b.nodeName.toLowerCase()])&&"get"in e&&void 0!==(o=e.get(b,"value"))?o:"string"==typeof(o=b.value)?o.replace(We,""):null==o?"":o:void 0}}),v.extend({valHooks:{option:{get:function(t){var e=v.find.attr(t,"value");return null!=e?e:fe(v.text(t))}},select:{get:function(t){var e,o,p,b=t.options,n=t.selectedIndex,M="select-one"===t.type,z=M?null:[],c=M?n+1:b.length;for(p=n<0?c:M?n:0;p-1)&&(o=!0);return o||(t.selectedIndex=-1),n}}}}),v.each(["radio","checkbox"],(function(){v.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=v.inArray(v(t).val(),e)>-1}},A.checkOn||(v.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),A.focusin="onfocusin"in p;var me=/^(?:focusinfocus|focusoutblur)$/,ge=function(t){t.stopPropagation()};v.extend(v.event,{trigger:function(t,e,o,b){var n,M,z,c,r,i,a,O,l=[o||q],d=s.call(t,"type")?t.type:t,A=s.call(t,"namespace")?t.namespace.split("."):[];if(M=O=z=o=o||q,3!==o.nodeType&&8!==o.nodeType&&!me.test(d+v.event.triggered)&&(d.indexOf(".")>-1&&(A=d.split("."),d=A.shift(),A.sort()),r=d.indexOf(":")<0&&"on"+d,(t=t[v.expando]?t:new v.Event(d,"object"==typeof t&&t)).isTrigger=b?2:3,t.namespace=A.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+A.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=o),e=null==e?[t]:v.makeArray(e,[t]),a=v.event.special[d]||{},b||!a.trigger||!1!==a.trigger.apply(o,e))){if(!b&&!a.noBubble&&!f(o)){for(c=a.delegateType||d,me.test(c+d)||(M=M.parentNode);M;M=M.parentNode)l.push(M),z=M;z===(o.ownerDocument||q)&&l.push(z.defaultView||z.parentWindow||p)}for(n=0;(M=l[n++])&&!t.isPropagationStopped();)O=M,t.type=n>1?c:a.bindType||d,(i=(Q.get(M,"events")||Object.create(null))[t.type]&&Q.get(M,"handle"))&&i.apply(M,e),(i=r&&M[r])&&i.apply&&J(M)&&(t.result=i.apply(M,e),!1===t.result&&t.preventDefault());return t.type=d,b||t.isDefaultPrevented()||a._default&&!1!==a._default.apply(l.pop(),e)||!J(o)||r&&u(o[d])&&!f(o)&&((z=o[r])&&(o[r]=null),v.event.triggered=d,t.isPropagationStopped()&&O.addEventListener(d,ge),o[d](),t.isPropagationStopped()&&O.removeEventListener(d,ge),v.event.triggered=void 0,z&&(o[r]=z)),t.result}},simulate:function(t,e,o){var p=v.extend(new v.Event,o,{type:t,isSimulated:!0});v.event.trigger(p,null,e)}}),v.fn.extend({trigger:function(t,e){return this.each((function(){v.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var o=this[0];if(o)return v.event.trigger(t,e,o,!0)}}),A.focusin||v.each({focus:"focusin",blur:"focusout"},(function(t,e){var o=function(t){v.event.simulate(e,t.target,v.event.fix(t))};v.event.special[e]={setup:function(){var p=this.ownerDocument||this.document||this,b=Q.access(p,e);b||p.addEventListener(t,o,!0),Q.access(p,e,(b||0)+1)},teardown:function(){var p=this.ownerDocument||this.document||this,b=Q.access(p,e)-1;b?Q.access(p,e,b):(p.removeEventListener(t,o,!0),Q.remove(p,e))}}}));var ve=p.location,Re={guid:Date.now()},ye=/\?/;v.parseXML=function(t){var e,o;if(!t||"string"!=typeof t)return null;try{e=(new p.DOMParser).parseFromString(t,"text/xml")}catch(t){}return o=e&&e.getElementsByTagName("parsererror")[0],e&&!o||v.error("Invalid XML: "+(o?v.map(o.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Be=/\[\]$/,Le=/\r?\n/g,Xe=/^(?:submit|button|image|reset|file)$/i,_e=/^(?:input|select|textarea|keygen)/i;function Ne(t,e,o,p){var b;if(Array.isArray(e))v.each(e,(function(e,b){o||Be.test(t)?p(t,b):Ne(t+"["+("object"==typeof b&&null!=b?e:"")+"]",b,o,p)}));else if(o||"object"!==m(e))p(t,e);else for(b in e)Ne(t+"["+b+"]",e[b],o,p)}v.param=function(t,e){var o,p=[],b=function(t,e){var o=u(e)?e():e;p[p.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==o?"":o)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!v.isPlainObject(t))v.each(t,(function(){b(this.name,this.value)}));else for(o in t)Ne(o,t[o],e,b);return p.join("&")},v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=v.prop(this,"elements");return t?v.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!v(this).is(":disabled")&&_e.test(this.nodeName)&&!Xe.test(t)&&(this.checked||!At.test(t))})).map((function(t,e){var o=v(this).val();return null==o?null:Array.isArray(o)?v.map(o,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:o.replace(Le,"\r\n")}})).get()}});var we=/%20/g,xe=/#.*$/,Te=/([?&])_=[^&]*/,Ce=/^(.*?):[ \t]*([^\r\n]*)$/gm,Se=/^(?:GET|HEAD)$/,ke=/^\/\//,Ee={},De={},Pe="*/".concat("*"),je=q.createElement("a");function Ie(t){return function(e,o){"string"!=typeof e&&(o=e,e="*");var p,b=0,n=e.toLowerCase().match(E)||[];if(u(o))for(;p=n[b++];)"+"===p[0]?(p=p.slice(1)||"*",(t[p]=t[p]||[]).unshift(o)):(t[p]=t[p]||[]).push(o)}}function Fe(t,e,o,p){var b={},n=t===De;function M(z){var c;return b[z]=!0,v.each(t[z]||[],(function(t,z){var r=z(e,o,p);return"string"!=typeof r||n||b[r]?n?!(c=r):void 0:(e.dataTypes.unshift(r),M(r),!1)})),c}return M(e.dataTypes[0])||!b["*"]&&M("*")}function He(t,e){var o,p,b=v.ajaxSettings.flatOptions||{};for(o in e)void 0!==e[o]&&((b[o]?t:p||(p={}))[o]=e[o]);return p&&v.extend(!0,t,p),t}je.href=ve.href,v.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ve.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ve.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pe,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":v.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?He(He(t,v.ajaxSettings),e):He(v.ajaxSettings,t)},ajaxPrefilter:Ie(Ee),ajaxTransport:Ie(De),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var o,b,n,M,z,c,r,i,a,O,s=v.ajaxSetup({},e),l=s.context||s,d=s.context&&(l.nodeType||l.jquery)?v(l):v.event,A=v.Deferred(),u=v.Callbacks("once memory"),f=s.statusCode||{},h={},W={},m="canceled",g={readyState:0,getResponseHeader:function(t){var e;if(r){if(!M)for(M={};e=Ce.exec(n);)M[e[1].toLowerCase()+" "]=(M[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=M[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return r?n:null},setRequestHeader:function(t,e){return null==r&&(t=W[t.toLowerCase()]=W[t.toLowerCase()]||t,h[t]=e),this},overrideMimeType:function(t){return null==r&&(s.mimeType=t),this},statusCode:function(t){var e;if(t)if(r)g.always(t[g.status]);else for(e in t)f[e]=[f[e],t[e]];return this},abort:function(t){var e=t||m;return o&&o.abort(e),R(0,e),this}};if(A.promise(g),s.url=((t||s.url||ve.href)+"").replace(ke,ve.protocol+"//"),s.type=e.method||e.type||s.method||s.type,s.dataTypes=(s.dataType||"*").toLowerCase().match(E)||[""],null==s.crossDomain){c=q.createElement("a");try{c.href=s.url,c.href=c.href,s.crossDomain=je.protocol+"//"+je.host!=c.protocol+"//"+c.host}catch(t){s.crossDomain=!0}}if(s.data&&s.processData&&"string"!=typeof s.data&&(s.data=v.param(s.data,s.traditional)),Fe(Ee,s,e,g),r)return g;for(a in(i=v.event&&s.global)&&0==v.active++&&v.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!Se.test(s.type),b=s.url.replace(xe,""),s.hasContent?s.data&&s.processData&&0===(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&(s.data=s.data.replace(we,"+")):(O=s.url.slice(b.length),s.data&&(s.processData||"string"==typeof s.data)&&(b+=(ye.test(b)?"&":"?")+s.data,delete s.data),!1===s.cache&&(b=b.replace(Te,"$1"),O=(ye.test(b)?"&":"?")+"_="+Re.guid+++O),s.url=b+O),s.ifModified&&(v.lastModified[b]&&g.setRequestHeader("If-Modified-Since",v.lastModified[b]),v.etag[b]&&g.setRequestHeader("If-None-Match",v.etag[b])),(s.data&&s.hasContent&&!1!==s.contentType||e.contentType)&&g.setRequestHeader("Content-Type",s.contentType),g.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+Pe+"; q=0.01":""):s.accepts["*"]),s.headers)g.setRequestHeader(a,s.headers[a]);if(s.beforeSend&&(!1===s.beforeSend.call(l,g,s)||r))return g.abort();if(m="abort",u.add(s.complete),g.done(s.success),g.fail(s.error),o=Fe(De,s,e,g)){if(g.readyState=1,i&&d.trigger("ajaxSend",[g,s]),r)return g;s.async&&s.timeout>0&&(z=p.setTimeout((function(){g.abort("timeout")}),s.timeout));try{r=!1,o.send(h,R)}catch(t){if(r)throw t;R(-1,t)}}else R(-1,"No Transport");function R(t,e,M,c){var a,O,q,h,W,m=e;r||(r=!0,z&&p.clearTimeout(z),o=void 0,n=c||"",g.readyState=t>0?4:0,a=t>=200&&t<300||304===t,M&&(h=function(t,e,o){for(var p,b,n,M,z=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),void 0===p&&(p=t.mimeType||e.getResponseHeader("Content-Type"));if(p)for(b in z)if(z[b]&&z[b].test(p)){c.unshift(b);break}if(c[0]in o)n=c[0];else{for(b in o){if(!c[0]||t.converters[b+" "+c[0]]){n=b;break}M||(M=b)}n=n||M}if(n)return n!==c[0]&&c.unshift(n),o[n]}(s,g,M)),!a&&v.inArray("script",s.dataTypes)>-1&&v.inArray("json",s.dataTypes)<0&&(s.converters["text script"]=function(){}),h=function(t,e,o,p){var b,n,M,z,c,r={},i=t.dataTypes.slice();if(i[1])for(M in t.converters)r[M.toLowerCase()]=t.converters[M];for(n=i.shift();n;)if(t.responseFields[n]&&(o[t.responseFields[n]]=e),!c&&p&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),c=n,n=i.shift())if("*"===n)n=c;else if("*"!==c&&c!==n){if(!(M=r[c+" "+n]||r["* "+n]))for(b in r)if((z=b.split(" "))[1]===n&&(M=r[c+" "+z[0]]||r["* "+z[0]])){!0===M?M=r[b]:!0!==r[b]&&(n=z[0],i.unshift(z[1]));break}if(!0!==M)if(M&&t.throws)e=M(e);else try{e=M(e)}catch(t){return{state:"parsererror",error:M?t:"No conversion from "+c+" to "+n}}}return{state:"success",data:e}}(s,h,g,a),a?(s.ifModified&&((W=g.getResponseHeader("Last-Modified"))&&(v.lastModified[b]=W),(W=g.getResponseHeader("etag"))&&(v.etag[b]=W)),204===t||"HEAD"===s.type?m="nocontent":304===t?m="notmodified":(m=h.state,O=h.data,a=!(q=h.error))):(q=m,!t&&m||(m="error",t<0&&(t=0))),g.status=t,g.statusText=(e||m)+"",a?A.resolveWith(l,[O,m,g]):A.rejectWith(l,[g,m,q]),g.statusCode(f),f=void 0,i&&d.trigger(a?"ajaxSuccess":"ajaxError",[g,s,a?O:q]),u.fireWith(l,[g,m]),i&&(d.trigger("ajaxComplete",[g,s]),--v.active||v.event.trigger("ajaxStop")))}return g},getJSON:function(t,e,o){return v.get(t,e,o,"json")},getScript:function(t,e){return v.get(t,void 0,e,"script")}}),v.each(["get","post"],(function(t,e){v[e]=function(t,o,p,b){return u(o)&&(b=b||p,p=o,o=void 0),v.ajax(v.extend({url:t,type:e,dataType:b,data:o,success:p},v.isPlainObject(t)&&t))}})),v.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),v._evalUrl=function(t,e,o){return v.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){v.globalEval(t,e,o)}})},v.fn.extend({wrapAll:function(t){var e;return this[0]&&(u(t)&&(t=t.call(this[0])),e=v(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return u(t)?this.each((function(e){v(this).wrapInner(t.call(this,e))})):this.each((function(){var e=v(this),o=e.contents();o.length?o.wrapAll(t):e.append(t)}))},wrap:function(t){var e=u(t);return this.each((function(o){v(this).wrapAll(e?t.call(this,o):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){v(this).replaceWith(this.childNodes)})),this}}),v.expr.pseudos.hidden=function(t){return!v.expr.pseudos.visible(t)},v.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},v.ajaxSettings.xhr=function(){try{return new p.XMLHttpRequest}catch(t){}};var Ue={0:200,1223:204},Ve=v.ajaxSettings.xhr();A.cors=!!Ve&&"withCredentials"in Ve,A.ajax=Ve=!!Ve,v.ajaxTransport((function(t){var e,o;if(A.cors||Ve&&!t.crossDomain)return{send:function(b,n){var M,z=t.xhr();if(z.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(M in t.xhrFields)z[M]=t.xhrFields[M];for(M in t.mimeType&&z.overrideMimeType&&z.overrideMimeType(t.mimeType),t.crossDomain||b["X-Requested-With"]||(b["X-Requested-With"]="XMLHttpRequest"),b)z.setRequestHeader(M,b[M]);e=function(t){return function(){e&&(e=o=z.onload=z.onerror=z.onabort=z.ontimeout=z.onreadystatechange=null,"abort"===t?z.abort():"error"===t?"number"!=typeof z.status?n(0,"error"):n(z.status,z.statusText):n(Ue[z.status]||z.status,z.statusText,"text"!==(z.responseType||"text")||"string"!=typeof z.responseText?{binary:z.response}:{text:z.responseText},z.getAllResponseHeaders()))}},z.onload=e(),o=z.onerror=z.ontimeout=e("error"),void 0!==z.onabort?z.onabort=o:z.onreadystatechange=function(){4===z.readyState&&p.setTimeout((function(){e&&o()}))},e=e("abort");try{z.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),v.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return v.globalEval(t),t}}}),v.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),v.ajaxTransport("script",(function(t){var e,o;if(t.crossDomain||t.scriptAttrs)return{send:function(p,b){e=v(" @endauth - diff --git a/resources/views/components/magic-bar.blade.php b/resources/views/components/magic-bar.blade.php index 8b675d8d4..ab99c437f 100644 --- a/resources/views/components/magic-bar.blade.php +++ b/resources/views/components/magic-bar.blade.php @@ -1,4 +1,4 @@ -
+
{{-- Main --}}