diff --git a/app/Classes/Ldap.php b/app/Classes/Ldap.php index ee15dcd32..f5cfa8b97 100644 --- a/app/Classes/Ldap.php +++ b/app/Classes/Ldap.php @@ -3,7 +3,6 @@ namespace App\Classes; use Exception; -use ReturnTypeWillChange; use Throwable; /** diff --git a/app/Http/Controllers/API/ExtensionController.php b/app/Http/Controllers/API/ExtensionController.php index 737fa2573..23bcf42b1 100644 --- a/app/Http/Controllers/API/ExtensionController.php +++ b/app/Http/Controllers/API/ExtensionController.php @@ -14,6 +14,7 @@ use App\Models\UserSettings; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; +use GuzzleHttp\Psr7\MimeType; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Http\Response; @@ -318,4 +319,29 @@ private function checkPermissions($extension) } } } + + /** + * Get files from extensions public folder + * + * @return BinaryFileResponse|void + */ + public function publicFolder() + { + $basePath = + '/liman/extensions/' . strtolower((string) extension()->name) . '/public/'; + + $targetPath = $basePath . explode('public/', (string) url()->current(), 2)[1]; + + if (realpath($targetPath) != $targetPath) { + abort(404); + } + + if (is_file($targetPath)) { + return response()->download($targetPath, null, [ + 'Content-Type' => MimeType::fromExtension(pathinfo($targetPath, PATHINFO_EXTENSION)), + ]); + } else { + abort(404); + } + } } diff --git a/app/Http/Controllers/API/SearchController.php b/app/Http/Controllers/API/SearchController.php index d420bab59..b189a4253 100644 --- a/app/Http/Controllers/API/SearchController.php +++ b/app/Http/Controllers/API/SearchController.php @@ -27,7 +27,7 @@ public function search(Request $request) // Get constant searchables if (user()->isAdmin()) { - foreach (config('liman.new_search.admin') as $constant) { + foreach (config('liman.search.admin') as $constant) { if (isset($constant['children'])) { foreach ($constant['children'] as $child) { if (! isset($searchable[$constant['name']])) { @@ -46,7 +46,7 @@ public function search(Request $request) } } - foreach (config('liman.new_search.user') as $constant) { + foreach (config('liman.search.user') as $constant) { if (isset($constant['children'])) { foreach ($constant['children'] as $child) { if (! isset($searchable[$constant['name']])) { @@ -64,7 +64,7 @@ public function search(Request $request) } } - foreach (config('liman.new_search.common') as $constant) { + foreach (config('liman.search.common') as $constant) { if (isset($constant['children'])) { foreach ($constant['children'] as $child) { if (! isset($searchable[$constant['name']])) { diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php deleted file mode 100644 index 74a72dd73..000000000 --- a/app/Http/Controllers/Auth/LoginController.php +++ /dev/null @@ -1,214 +0,0 @@ -middleware(['guest', 'web'])->except(['logout', 'keycloak-auth', 'keycloak-callback']); - } - - /** - * Return captcha image - * - * @return string - */ - public function captcha() - { - return captcha_img(); - } - - /** - * Determines what to do when authentication is successfull - * - * @param Request $request - * @param $user - * @return RedirectResponse|void - */ - public function authenticated(Request $request, $user) - { - $user->update([ - 'last_login_at' => Carbon::now()->toDateTimeString(), - 'last_login_ip' => $request->ip(), - ]); - - system_log(7, 'LOGIN_SUCCESS'); - } - - /** - * Event that fired when someone is trying to login - * - * @param Request $request - * @return bool - */ - public function attemptLogin(Request $request) - { - $credentials = (object) $this->credentials($request); - - $flag = $this->guard()->attempt( - $this->credentials($request), - (bool) $request->remember - ); - - Event::listen('login_attempt_success', function ($data) use (&$flag) { - $this->guard()->login($data, (bool) request()->remember); - $flag = true; - }); - - if (! $flag) { - event('login_attempt', $credentials); - } - - return $flag; - } - - /** - * Redirect to keycloak - * - * @return void - */ - public function redirectToKeycloak() - { - if (env('KEYCLOAK_ACTIVE', false) == false) { - return; - } - - return Socialite::driver('keycloak')->redirect(); - } - - /** - * Keycloak login checks - * - * @param Request $request - * @return Application|RedirectResponse|Redirector|void - */ - public function retrieveFromKeycloak(Request $request) - { - if (env('KEYCLOAK_ACTIVE', false) == false) { - return; - } - - $remote = Socialite::driver('keycloak') - ->setHttpClient(new Client(['verify' => false])) - ->stateless() - ->user(); - - $user = User::updateOrCreate( - [ - 'id' => $remote->id - ], - [ - 'id' => $remote->id, - 'username' => $remote->nickname, - 'email' => $remote->email, - 'auth_type' => 'keycloak', - 'forceChange' => false, - 'name' => $remote->name, - 'password' => Hash::make(Str::random(16)), - 'last_login_at' => Carbon::now()->toDateTimeString(), - 'last_login_ip' => $request->ip(), - ] - ); - - system_log(7, 'LOGIN_SUCCESS'); - - Oauth2Token::updateOrCreate([ - "user_id" => $remote->getId(), - "token_type" => $remote->accessTokenResponseBody['token_type'] - ], [ - "user_id" => $remote->getId(), - "token_type" => $remote->accessTokenResponseBody['token_type'], - "access_token" => $remote->accessTokenResponseBody['access_token'], - "refresh_token" => $remote->accessTokenResponseBody['refresh_token'], - "expires_in" => (int) $remote->accessTokenResponseBody['expires_in'], - "refresh_expires_in" => (int) $remote->accessTokenResponseBody['refresh_expires_in'], - ]); - - Auth::loginUsingId($remote->getId()); - - return redirect('/'); - } - - /** - * Validate login requests - * - * @param Request $request - * @return void - */ - protected function validateLogin(Request $request) - { - $request->request->add([ - $this->username() => $request->liman_email_aciklab, - 'password' => $request->liman_password_divergent, - ]); - if (env('EXTENSION_DEVELOPER_MODE')) { - $request->validate([ - $this->username() => 'required|string', - 'password' => 'required|string', - ]); - } else { - $request->validate([ - $this->username() => 'required|string', - 'password' => 'required|string', - 'captcha' => 'required|captcha', - ]); - } - } - - /** - * Send failed login response - * - * @param Request $request - * @throws ValidationException - */ - protected function sendFailedLoginResponse(Request $request) - { - $credentials = (object) $this->credentials($request); - system_log(5, "LOGIN_FAILED", ["email" => $credentials->email]); - - return redirect()->route('login')->withErrors([ - "messages" => [ - $this->username() => [trans('auth.failed')], - ] - ]); - } -} diff --git a/app/Http/Controllers/Auth/LogoutController.php b/app/Http/Controllers/Auth/LogoutController.php deleted file mode 100644 index ad81bb9db..000000000 --- a/app/Http/Controllers/Auth/LogoutController.php +++ /dev/null @@ -1,47 +0,0 @@ -user()->auth_type; - $user_id = auth()->user()->id; - - Auth::guard()->logout(); - - request() - ->session() - ->invalidate(); - - request() - ->session() - ->regenerateToken(); - - if ($user_type == 'keycloak') { - Oauth2Token::where('user_id', $user_id)->delete(); - - return redirect(Socialite::driver('keycloak')->getLogoutUrl()); - } - return redirect(route('login')); - } -} diff --git a/app/Http/Controllers/Auth/_routes.php b/app/Http/Controllers/Auth/_routes.php deleted file mode 100644 index cffca15aa..000000000 --- a/app/Http/Controllers/Auth/_routes.php +++ /dev/null @@ -1,31 +0,0 @@ -name('captcha'); -Route::get('/giris', 'Auth\LoginController@showLoginForm')->name('login'); -Route::post('/giris', 'Auth\LoginController@login'); -Route::post('/cikis', 'Auth\LogoutController@logout') - ->name('logout') - ->middleware('auth'); -Route::get('/keycloak/auth', 'Auth\LoginController@redirectToKeycloak') - ->name('keycloak-auth'); - Route::get('/keycloak/callback', 'Auth\LoginController@retrieveFromKeycloak') - ->name('keycloak-callback'); - -Route::group(['middleware' => ['auth', 'google2fa']], function() { - Route::post('/2fa', function () { - return redirect(route('home')); - }) - ->name('2fa'); - Route::get('/2fa/register', 'UserController@setGoogleSecret') - ->name('registerGoogleAuth'); - Route::post('/2fa/setSecret', function() { - User::find(auth()->user()->id)->update([ - 'google2fa_secret' => request('_secret') - ]); - - return redirect(route('home')); - }) - ->name('set_google_secret'); -}); \ No newline at end of file diff --git a/app/Http/Controllers/Certificate/MainController.php b/app/Http/Controllers/Certificate/MainController.php deleted file mode 100644 index eea4c4625..000000000 --- a/app/Http/Controllers/Certificate/MainController.php +++ /dev/null @@ -1,175 +0,0 @@ - strtolower((string) request('server_hostname')), - 'origin' => request('origin'), - ])->exists() - ) { - return respond( - 'Bu sunucu ve port için sertifika zaten eklenmiş.', - 201 - ); - } - - [$flag, $message] = retrieveCertificate( - strtolower((string) request('server_hostname')), - request('origin') - ); - - if (! $flag) { - return respond( - $message, - 201 - ); - } - - // Create Certificate Object. - $certificate = Certificate::create([ - 'server_hostname' => strtolower((string) request('server_hostname')), - 'origin' => request('origin'), - ]); - - $certificate->addToSystem('/tmp/' . request('path')); - - // TODO: Add notification for new notification system. - - return respond('Sertifika Başarıyla Eklendi!', 200); - } - - /** - * Delete certificate - * - * @return JsonResponse|Response - */ - public function removeCert() - { - $certificate = Certificate::where( - 'id', - request('certificate_id') - )->first(); - if (! $certificate) { - abort(504, 'Sertifika bulunamadı'); - } - - $certificate->removeFromSystem(); - - $certificate->delete(); - - return respond('Sertifika Başarıyla Silindi!', 200); - } - - /** - * Get certificate details for determined server - * - * @param Request $request - * @return JsonResponse|Response - */ - public function getCertificateInfo(Request $request) - { - $certificateFile = Command::runLiman('cat /usr/local/share/ca-certificates/liman-{:ipAddress}_{:port}.crt', [ - 'ipAddress' => $request->hostname, - 'port' => $request->port, - ]); - - $certinfo = openssl_x509_parse($certificateFile); - $certinfo['subjectKeyIdentifier'] = array_key_exists( - 'subjectKeyIdentifier', - $certinfo['extensions'] - ) - ? $certinfo['extensions']['subjectKeyIdentifier'] - : ''; - $certinfo['authorityKeyIdentifier'] = array_key_exists( - 'authorityKeyIdentifier', - $certinfo['extensions'] - ) - ? substr((string) $certinfo['extensions']['authorityKeyIdentifier'], 6) - : ''; - $certinfo['validFrom_time_t'] = Carbon::createFromTimestamp( - $certinfo['validFrom_time_t'] - )->format('H:i d/m/Y'); - $certinfo['validTo_time_t'] = Carbon::createFromTimestamp( - $certinfo['validTo_time_t'] - )->format('H:i d/m/Y'); - unset($certinfo['extensions']); - - return respond($certinfo); - } - - /** - * Retrieve certificate from remote end - * - * @return JsonResponse|Response - */ - public function requestCert() - { - validate([ - 'hostname' => 'required', - 'port' => 'required|numeric|min:1|max:65537', - ]); - - [$flag, $message] = retrieveCertificate( - request('hostname'), - request('port') - ); - if ($flag) { - return respond($message, 200); - } else { - return respond($message, 201); - } - } - - /** - * Renew certificate for server - * - * @return JsonResponse|Response - */ - public function updateCert() - { - $certificate = Certificate::where( - 'id', - request('certificate_id') - )->first(); - if (! $certificate) { - return respond('Sertifika bulunamadı', 201); - } - [$flag, $message] = retrieveCertificate( - $certificate->server_hostname, - $certificate->origin - ); - if (! $flag) { - return respond($message, 201); - } - - $certificate->removeFromSystem(); - - $certificate->addToSystem('/tmp/' . $message['path']); - - return respond('Sertifika Başarıyla Güncellendi!'); - } -} diff --git a/app/Http/Controllers/Certificate/_routes.php b/app/Http/Controllers/Certificate/_routes.php deleted file mode 100644 index 16364d62d..000000000 --- a/app/Http/Controllers/Certificate/_routes.php +++ /dev/null @@ -1,32 +0,0 @@ -group(function () { - // Certificate Add View - Route::view('/ayarlar/sertifika', 'settings.certificate') - ->name('certificate_add_page'); - - // Add Certificate - Route::post('/sunucu/sertifikaOnayi', 'Certificate\MainController@verifyCert') - ->name('verify_certificate'); - - // Delete Certificate - Route::post('/sunucu/sertifikaSil', 'Certificate\MainController@removeCert') - ->name('remove_certificate'); - - // Update Certificate - Route::post( - '/sunucu/sertifikaGuncelle', - 'Certificate\MainController@updateCert' - ) - ->name('update_certificate'); - - // Retrieve Certificate - Route::post('/ayarlar/sertifikaTalep', 'Certificate\MainController@requestCert') - ->name('certificate_request'); - - Route::post('/ayarlar/sertifikaBilgi', 'Certificate\MainController@getCertificateInfo') - ->name('certificate_info'); - - Route::get('/ayarlar/sertifikaDetay', 'Certificate\MainController@one') - ->name('certificate_one'); -}); diff --git a/app/Http/Controllers/Extension/MainController.php b/app/Http/Controllers/Extension/MainController.php deleted file mode 100644 index 159eed17b..000000000 --- a/app/Http/Controllers/Extension/MainController.php +++ /dev/null @@ -1,470 +0,0 @@ -extensions() as $extension) { - $extensions[$extension->id] = $extension->display_name; - } - return $extensions; - } - - /** - * Download extension from Liman - * - * @return BinaryFileResponse - */ - public function download() - { - // Generate Extension Folder Path - $path = '/liman/extensions/' . strtolower((string) extension()->name); - $tempPath = '/tmp/' . Str::random() . '.zip'; - - // Zip the current extension - Command::runLiman('cd @{:path} && zip -r @{:tempPath} .', [ - 'path' => $path, - 'tempPath' => $tempPath, - ]); - - system_log(6, 'EXTENSION_DOWNLOAD', [ - 'extension_id' => extension()->id, - ]); - - // Return zip as download and delete it after sent. - return response() - ->download( - $tempPath, - extension()->name . '-' . extension()->version . '.lmne' - ) - ->deleteFileAfterSend(); - } - - /** - * Upload an extension to Liman systsem - * - * @throws Exception - * @throws GuzzleException - */ - public function upload() - { - validate([ - 'extension' => 'required|max:5000000', - ]); - - $verify = false; - $zipFile = request()->file('extension'); - if ( - endsWith( - request() - ->file('extension') - ->getClientOriginalName(), - '.signed' - ) - ) { - $verify = Command::runLiman( - 'gpg --verify --status-fd 1 @{:extension} | grep GOODSIG || echo 0', - ['extension' => request()->file('extension')->path()] - ); - if (! (bool) $verify) { - return respond('Eklenti dosyanız doğrulanamadı.', 201); - } - $decrypt = Command::runLiman( - "gpg --status-fd 1 -d -o '/tmp/{:originalName}' @{:extension} | grep FAILURE > /dev/null && echo 0 || echo 1", - [ - 'originalName' => 'ext-' . basename((string) request()->file('extension')->path()), - 'extension' => request()->file('extension')->path(), - ] - ); - if (! (bool) $decrypt) { - return respond( - 'Eklenti dosyası doğrulanırken bir hata oluştu!.', - 201 - ); - } - $zipFile = - '/tmp/ext-' . - basename( - (string) request()->file('extension')->path() - ); - } else { - if (! request()->has('force')) { - return respond( - 'Bu eklenti imzalanmamış bir eklenti, yine de kurmak istediğinize emin misiniz?', - 203 - ); - } - } - [$error, $new] = $this->setupNewExtension($zipFile, $verify); - - if ($error) { - return $error; - } - - system_log(3, 'EXTENSION_UPLOAD_SUCCESS', [ - 'extension_id' => $new->id, - ]); - - return respond('Eklenti Başarıyla yüklendi.', 200); - } - - /** - * Setup new extension - * - * This function handles extension setup steps (setting perms etc.) - * - * @param $zipFile - * @param $verify - * @return array - * @throws GuzzleException - */ - public function setupNewExtension($zipFile, $verify = false) - { - // Initialize Zip Archive Object to use it later. - $zip = new ZipArchive(); - - // Try to open zip file. - if (! $zip->open($zipFile)) { - system_log(7, 'EXTENSION_UPLOAD_FAILED_CORRUPTED'); - - return [respond('Eklenti Dosyası Açılamıyor.', 201), null]; - } - - // Determine a random tmp folder to extract files - $path = '/tmp/' . Str::random(); - // Extract Zip to the Temp Folder. - try { - $zip->extractTo($path); - } catch (\Exception) { - return [respond('Eklenti Dosyası Açılamıyor.', 201), null]; - } - - if (count(scandir($path)) == 3) { - $path = $path . '/' . scandir($path)[2]; - } - - // Now that we have everything, let's extract database. - $file = file_get_contents($path . '/db.json'); - - $json = json_decode($file, true); - - preg_match('/[A-Za-z-]+/', (string) $json['name'], $output); - if (empty($output) || $output[0] != $json['name']) { - return [respond('Eklenti isminde yalnızca harflere izin verilmektedir.', 201), null]; - } - - if ( - array_key_exists('supportedLiman', $json) && - getVersionCode() < intval($json['supportedLiman']) - ) { - return [ - respond( - __("Bu eklentiyi yükleyebilmek için Liman'ı güncellemelisiniz, gerekli minimum liman sürüm kodu") . ' ' . - intval($json['supportedLiman']), - 201 - ), - null, - ]; - } - - if ($verify) { - $json['issuer'] = explode(' ', (string) $verify, 4)[3]; - } else { - $json['issuer'] = ''; - } - - // Check If Extension Already Exists. - $extension = Extension::where('name', $json['name'])->first(); - - if ($extension) { - if ($extension->version == $json['version']) { - system_log(7, 'EXTENSION_UPLOAD_FAILED_ALREADY_INSTALLED'); - - return [respond('Eklentinin bu sürümü zaten yüklü', 201), null]; - } - } - - // Create extension object and fill values. - if ($extension) { - $new = $extension; - } else { - $new = new Extension(); - } - unset($json['issuer']); - unset($json['status']); - unset($json['order']); - $new->fill($json); - $new->status = '1'; - $new->save(); - - if (array_key_exists('dependencies', $json) && $json['dependencies'] != '') { - rootSystem()->installPackages($json['dependencies']); - } - - $system = rootSystem(); - - $system->userAdd($new->id); - - $passPath = '/liman/keys' . DIRECTORY_SEPARATOR . $new->id; - - Command::runSystem('chmod 760 @{:path}', [ - 'path' => $passPath, - ]); - - file_put_contents($passPath, Str::random(32)); - - $extension_folder = '/liman/extensions/' . strtolower((string) $json['name']); - - Command::runLiman('mkdir -p @{:extension_folder}', [ - 'extension_folder' => $extension_folder, - ]); - - Command::runLiman('cp -r {:path}/* {:extension_folder}/.', [ - 'extension_folder' => $extension_folder, - 'path' => $path, - ]); - $system->fixExtensionPermissions($new->id, $new->name); - - return [null, $new]; - } - - /** - * Create new extension on Liman - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function newExtension() - { - $name = trim((string) request('name')); - $folder = '/liman/extensions/' . strtolower($name); - - preg_match('/[A-Za-z-]+/', (string) request('name'), $output); - if (empty($output) || $output[0] != $name) { - return respond( - 'Eklenti isminde yalnızca harflere izin verilmektedir.', - 201 - ); - } - - if (Extension::where('name', request('name'))->exists()) { - return respond('Bu isimle zaten bir eklenti var.', 201); - } - - if (! in_array(request('template'), array_keys((array) fetchExtensionTemplates()->templates))) { - return respond('Lütfen geçerli bir tip seçiniz.', 201); - } - - $template = request('template'); - $template_folder = storage_path('extension_templates/' . $template . '/'); - Command::runLiman('cp -r @{:template_folder} @{:folder}', [ - 'template_folder' => $template_folder, - 'folder' => $folder, - ]); - - foreach (glob("$folder/*.json") as $file) { - $content = file_get_contents($file); - $content = str_replace([ - '', - '', - '', - '', - ], [ - request('name'), - auth()->user()->name, - trim(file_get_contents(storage_path('VERSION'))), - auth()->user()->email, - ], $content); - file_put_contents($file, $content); - } - - $json = json_decode(file_get_contents("$folder/db.json")); - $ext = Extension::create([ - 'name' => request('name'), - 'version' => '0.0.1', - 'icon' => '', - 'service' => '', - 'language' => $json->language, - ]); - - $system = rootSystem(); - - $system->userAdd($ext->id); - - $passPath = '/liman/keys' . DIRECTORY_SEPARATOR . $ext->id; - - Command::runSystem('chmod 760 @{:path}', [ - 'path' => $passPath, - ]); - - file_put_contents($passPath, Str::random(32)); - - request()->request->add(['server' => 'none']); - request()->request->add(['extension_id' => $ext->id]); - - $system->fixExtensionPermissions($ext->id, $ext->name); - - system_log(6, 'EXTENSION_CREATE', [ - 'extension_id' => $ext->id, - ]); - - return respond(route('extension_one', $ext->id), 300); - } - - /** - * TODO: REMOVE DEPRECATED - * Update extension order - * - * @return JsonResponse|Response - */ - public function updateExtOrders() - { - foreach (json_decode((string) request('data')) as $extension) { - Extension::where('id', $extension->id)->update([ - 'order' => $extension->order, - ]); - } - - return respond('Sıralamalar güncellendi', 200); - } - - /** - * Get extension access logs - * - * You can request this function from a remote API with an access token - * Needed form values: - * - extension_id (*) - * - query - * - page - * - log_user_id - * - count - * - liman-token - * - * @return JsonResponse|Response - */ - public function accessLogs() - { - if (! Permission::can(user()->id, 'liman', 'id', 'view_logs')) { - return respond( - 'Eklenti Günlük Kayıtlarını görüntülemek için yetkiniz yok', - 201 - ); - } - - $page = request('page') * 10; - $query = request('query') ? request('query') : ''; - $count = intval( - Command::runLiman( - 'cat /liman/logs/liman_new.log | grep @{:user_id} | grep @{:extension_id} | grep @{:query} | grep -v "recover middleware catch" | wc -l', - [ - 'query' => $query, - 'user_id' => strlen(request('log_user_id')) > 5 ? request('log_user_id') : '', - 'extension_id' => request('extension_id'), - ] - ) - ); - $head = $page > $count ? $count % 10 : 10; - $data = Command::runLiman( - 'cat /liman/logs/liman_new.log | grep @{:user_id} | grep @{:extension_id} | grep @{:query} | grep -v "recover middleware catch" | tail -{:page} | head -{:head} | tac', - [ - 'query' => $query, - 'page' => $page, - 'head' => $head, - 'user_id' => strlen(request('log_user_id')) > 5 ? request('log_user_id') : '', - 'extension_id' => request('extension_id'), - ] - ); - $clean = []; - - $knownUsers = []; - $knownExtensions = []; - - if ($data == '') { - return response()->json([ - 'current_page' => request('page'), - 'count' => request('count'), - 'total_records' => $count, - 'records' => [], - ]); - } - - foreach (explode("\n", (string) $data) as $row) { - $row = json_decode($row); - - if (isset($row->request_details->extension_id)) { - if (! isset($knownExtensions[$row->request_details->extension_id])) { - - $extension = Extension::find($row->request_details->extension_id); - if ($extension) { - $knownExtensions[$row->request_details->extension_id] = - $extension->display_name; - } else { - $knownExtensions[$row->request_details->extension_id] = - $row->request_details->extension_id; - } - } - $row->extension_id = $knownExtensions[$row->request_details->extension_id]; - } else { - $row->extension_id = __('Komut'); - } - - if (! isset($knownUsers[$row->user_id])) { - $user = User::find($row->user_id); - if ($user) { - $knownUsers[$row->user_id] = $user->name; - } else { - $knownUsers[$row->user_id] = $row->user_id; - } - } - - $row->user_id = $knownUsers[$row->user_id]; - - if (isset($row->request_details->lmntargetFunction)) { - $row->view = $row->request_details->lmntargetFunction; - - if (isset($row->request_details->lmntargetFunction) && $row->request_details->lmntargetFunction == '') { - if ($row->lmn_level == 'high_level' && isset($row->request_details->title)) { - $row->view = base64_decode($row->request_details->title); - } - } - } else { - $row->view = __('Komut'); - } - - array_push($clean, $row); - } - - return response()->json([ - 'current_page' => request('page'), - 'count' => request('count'), - 'total_records' => $count, - 'records' => $clean, - ]); - } -} diff --git a/app/Http/Controllers/Extension/OneController.php b/app/Http/Controllers/Extension/OneController.php deleted file mode 100644 index a7c4930e4..000000000 --- a/app/Http/Controllers/Extension/OneController.php +++ /dev/null @@ -1,350 +0,0 @@ -name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - foreach ($extension['database'] as $key) { - if ( - $key['type'] == 'password' && - request($key['variable']) != - request($key['variable'] . '_confirmation') - ) { - return redirect( - route('extension_server_settings_page', [ - 'extension_id' => extension()->id, - 'server_id' => server()->id, - ]) - ) - ->withInput() - ->withErrors([ - 'message' => __('Parola alanları uyuşmuyor!'), - ]); - } - } - - foreach ($extension['database'] as $key) { - $opts = [ - 'server_id' => server()->id, - 'name' => $key['variable'], - ]; - - if (!isset($key['global']) || $key['global'] === false) { - $opts['user_id'] = user()->id; - } - - $row = DB::table('user_settings')->where($opts); - $variable = request($key['variable']); - if ($variable) { - if ($row->exists()) { - $encKey = env('APP_KEY') . user()->id . server()->id; - if ($row->first()->user_id != user()->id && !user()->isAdmin()) { - return redirect( - route('extension_server_settings_page', [ - 'extension_id' => extension()->id, - 'server_id' => server()->id, - ]) - ) - ->withInput() - ->withErrors([ - 'message' => __('Bu ayar sadece eklentiyi kuran kişi tarafından değiştirilebilir.'), - ]); - } - $row->update([ - 'user_id' => user()->id, - 'server_id' => server()->id, - 'value' => AES256::encrypt($variable, $encKey), - 'updated_at' => Carbon::now(), - ]); - } else { - $encKey = env('APP_KEY') . user()->id . server()->id; - DB::table('user_settings')->insert([ - 'id' => Str::uuid(), - 'server_id' => server()->id, - 'user_id' => user()->id, - 'name' => $key['variable'], - 'value' => AES256::encrypt($variable, $encKey), - 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now(), - ]); - } - } - } - - //Check Verification - if ( - array_key_exists('verification', $extension) && - $extension['verification'] != null && - $extension['verification'] != '' - ) { - $client = new Client(['verify' => false]); - $result = ''; - try { - $res = $client->request('POST', env('RENDER_ENGINE_ADDRESS', 'https://127.0.0.1:2806'), [ - 'form_params' => [ - 'lmntargetFunction' => $extension['verification'], - 'extension_id' => extension()->id, - 'server_id' => server()->id, - 'token' => Token::create(user()->id), - ], - 'timeout' => 5, - ]); - $output = (string) $res->getBody(); - if (isJson($output)) { - $message = json_decode($output); - if (isset($message->message)) { - $result = $message->message; - } - } else { - $result = $output; - } - } catch (\Exception) { - $result = __('Doğrulama başarısız, girdiğiniz bilgileri kontrol edin.'); - } - if (trim((string) $result) != 'ok') { - return redirect( - route('extension_server_settings_page', [ - 'extension_id' => extension()->id, - 'server_id' => server()->id, - ]) - ) - ->withInput() - ->withErrors([ - 'message' => $result, - ]); - } - } - system_log(7, 'EXTENSION_SETTINGS_UPDATE', [ - 'extension_id' => extension()->id, - 'server_id' => server()->id, - ]); - - return redirect( - route('extension_server', [ - 'extension_id' => extension()->id, - 'server_id' => server()->id - ]) - ); - } - - /** - * Return extension settings page - * - * @return JsonResponse|Response - * @throws \Exception - */ - public function serverSettingsPage() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - system_log(7, 'EXTENSION_SETTINGS_PAGE', [ - 'extension_id' => extension()->id, - ]); - $similar = []; - $globalVars = []; - $flag = server()->key(); - foreach ($extension['database'] as $key => $item) { - if ( - ($flag != null && $item['variable'] == 'clientUsername') || - ($flag != null && $item['variable'] == 'clientPassword') - ) { - unset($extension['database'][$key]); - } - - $opts = [ - 'server_id' => server()->id, - 'name' => $item['variable'], - ]; - - if (!isset($item['global']) || $item['global'] === false) { - $opts['user_id'] = user()->id; - } - - $obj = DB::table('user_settings') - ->where($opts) - ->first(); - if ($obj) { - if (array_key_exists('user_id', $opts)) { - $key = env('APP_KEY') . user()->id . server()->id; - } else { - $key = env('APP_KEY') . $obj->user_id . server()->id; - if ($obj->user_id != user()->id) { - array_push($globalVars, $item['variable']); - } - } - - $similar[$item['variable']] = AES256::decrypt( - $obj->value, - $key - ); - } - } - - return magicView('extension_pages.setup', [ - 'extension' => $extension, - 'similar' => $similar, - 'extensionDb' => extensionDb(), - 'globalVars' => $globalVars, - ]); - } - - /** - * Force enable extension - * - * @return JsonResponse|Response - */ - public function forceEnableExtension() - { - $flag = extension()->update([ - 'status' => '1', - ]); - - if ($flag) { - return respond('Eklenti başarıyla aktifleştirildi!'); - } else { - return respond('Eklenti aktifleştirilirken bir hata oluştu!', 201); - } - } - - /** - * Force dependency install - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function forceDepInstall() - { - $file = file_get_contents('/liman/extensions/' . strtolower((string) extension()->name) . '/db.json'); - $json = json_decode($file, true); - if (json_last_error() != JSON_ERROR_NONE) { - return respond('Eklenti dosyası okunurken bir hata oluştu!', 201); - } - - if (array_key_exists('dependencies', $json) && $json['dependencies'] != '') { - rootSystem()->installPackages($json['dependencies']); - - return respond('İşlem başlatıldı!'); - } else { - return respond('Bu eklentinin hiçbir bağımlılığı yok!', 201); - } - } - - /** - * Delete extension from file system - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function remove() - { - $ext_name = extension()->name; - try { - Command::runLiman( - "rm -rf '/liman/extensions/{:extension}'", - [ - 'extension' => strtolower((string) extension()->name), - ] - ); - } catch (\Exception) { - } - - try { - rootSystem()->userRemove(extension()->id); - extension()->delete(); - } catch (\Exception) { - } - - if (is_file(storage_path('extension_updates'))) { - $json = json_decode(file_get_contents(storage_path('extension_updates')), true); - for ($i = 0; $i < count($json); $i++) { - if ($json[$i]['name'] == $ext_name) { - unset($json[$i]); - } - } - file_put_contents(storage_path('extension_updates'), json_encode($json)); - } - - try { - $query = Permission::where('value', $ext_name) - ->where('type', 'function') - ->where('key', 'name') - ->delete(); - } catch (\Exception) { - } - - system_log(3, 'EXTENSION_REMOVE'); - - return respond('Eklenti Başarıyla Silindi'); - } - - /** - * Get files from extensions public folder - * - * @return BinaryFileResponse|void - */ - public function publicFolder() - { - $basePath = - '/liman/extensions/' . strtolower((string) extension()->name) . '/public/'; - - $targetPath = $basePath . explode('public/', (string) url()->current(), 2)[1]; - - if (realpath($targetPath) != $targetPath) { - abort(404); - } - - if (is_file($targetPath)) { - return response()->download($targetPath, null, [ - 'Content-Type' => MimeType::fromExtension(pathinfo($targetPath, PATHINFO_EXTENSION)), - ]); - } else { - abort(404); - } - } -} diff --git a/app/Http/Controllers/Extension/Sandbox/MainController.php b/app/Http/Controllers/Extension/Sandbox/MainController.php deleted file mode 100644 index d3149a3d7..000000000 --- a/app/Http/Controllers/Extension/Sandbox/MainController.php +++ /dev/null @@ -1,278 +0,0 @@ -middleware(function ($request, $next) { - $this->initializeClass(); - - return $next($request); - }); - } - - /** - * Constructive events for extension - * - * @return void - */ - public function initializeClass() - { - $this->extension = getExtensionJson(extension()->name); - - $this->checkForMissingSettings(); - - $this->checkPermissions(); - } - - /** - * Check if existing settings is valid for extension - * - * @return void - */ - private function checkForMissingSettings() - { - $key = ServerKey::where([ - 'server_id' => server()->id, - 'user_id' => user()->id, - ])->first(); - $extra = []; - if ($key) { - $extra = ['clientUsername', 'clientPassword']; - } - foreach ($this->extension['database'] as $setting) { - if (isset($setting['required']) && $setting['required'] === false) { - continue; - } - $opts = [ - 'server_id' => server()->id, - 'name' => $setting['variable'], - ]; - - if (! isset($setting['global']) || $setting['global'] === false) { - $opts['user_id'] = user()->id; - } - - if ( - ! in_array($setting['variable'], $extra) && - ! UserSettings::where($opts)->exists() - ) { - system_log(7, 'EXTENSION_MISSING_SETTINGS', [ - 'extension_id' => extension()->id, - ]); - redirect_now( - route('extension_server_settings_page', [ - 'server_id' => server()->id, - 'extension_id' => extension()->id, - ]) - ); - } - } - } - - /** - * Control if user is eligible to use this extension - * - * @return bool - */ - private function checkPermissions(): bool - { - if ( - ! Permission::can( - auth()->id(), - 'function', - 'name', - strtolower((string) extension()->name), - request('function_name') - ) - ) { - system_log(7, 'EXTENSION_NO_PERMISSION', [ - 'extension_id' => extension()->id, - 'target_name' => request('function_name'), - ]); - $function = request('function_name'); - $extensionJson = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - $functions = collect([]); - - if (array_key_exists('functions', $extensionJson)) { - $functions = collect($extensionJson['functions']); - } - - $isActive = 'false'; - $functionOptions = $functions - ->where('name', request('function_name')) - ->first(); - if ($functionOptions) { - $isActive = $functionOptions['isActive']; - } - if ( - $isActive == 'true' && - ! Permission::can( - user()->id, - 'function', - 'name', - strtolower((string) extension()->name), - $function - ) - ) { - abort(403, $function . ' için yetkiniz yok.'); - } - } - - return true; - } - - /** - * Calls extension from render engine - * - * This function renders extension files in a isolated space from Liman. - * This wrapper handles necessary events to run an extension. - * - * @return Application|Factory|View|JsonResponse|Response|never - * @throws GuzzleException - */ - public function API() - { - if (extension()->status == '0') { - return respond( - __('Eklenti şu an güncelleniyor, lütfen birazdan tekrar deneyin.'), - 201 - ); - } - - if (extension()->require_key == 'true' && server()->key() == null) { - return respond( - __('Bu eklentiyi kullanabilmek için bir anahtara ihtiyacınız var, lütfen kasa üzerinden bir anahtar ekleyin.'), - 403 - ); - } - - $page = request('target_function') - ? request('target_function') - : 'index'; - $view = 'extension_pages.server'; - - $token = Token::create(user()->id); - - $dbJson = getExtensionJson(extension()->name); - if (isset($dbJson['preload']) && $dbJson['preload']) { - $client = new Client(['verify' => false]); - try { - $res = $client->request('POST', env('RENDER_ENGINE_ADDRESS', 'https://127.0.0.1:2806'), [ - 'form_params' => [ - 'lmntargetFunction' => $page, - 'extension_id' => extension()->id, - 'server_id' => server()->id, - 'token' => $token, - ], - 'timeout' => 30, - ]); - $output = (string) $res->getBody(); - - $isJson = isJson($output, true); - if ($isJson && isset($isJson->status) && $isJson->status != 200) { - return respond( - $isJson->message, - $isJson->status, - ); - } - } catch (\Exception $e) { - if (env('APP_DEBUG', false)) { - return abort( - 504, - __('Liman render service is not working or crashed. ') . $e->getMessage(), - ); - } else { - return abort( - 504, - __('Liman render service is not working or crashed.'), - ); - } - } - } - - return view($view, [ - 'auth_token' => $token, - 'tokens' => user() - ->accessTokens() - ->get() - ->toArray(), - 'last' => $this->getNavigationServers(), - 'extContent' => isset($output) ? $output : null, - ]); - } - - /** - * Get navigation servers - * - * @return array - */ - private function getNavigationServers() - { - $serverObjects = Server::getAll(); - foreach ($serverObjects as $server) { - $cleanExtensions[$server->id . ':' . $server->name] = $server - ->extensions() - ->pluck('display_name', 'id') - ->toArray(); - } - if (empty($cleanExtensions)) { - $cleanExtensions[server()->id . ':' . server()->name] = server() - ->extensions() - ->pluck('display_name', 'id') - ->toArray(); - } - - $last = []; - - foreach ($cleanExtensions as $serverobj => $extensions) { - [$server_id, $server_name] = explode(':', $serverobj); - foreach ($extensions as $extension_id => $extension_name) { - $prefix = $extension_id . ':' . $extension_name; - $current = array_key_exists($prefix, $last) - ? $last[$prefix] - : []; - array_push($current, [ - 'id' => $server_id, - 'name' => $server_name, - ]); - $last[$prefix] = $current; - } - } - - return $last; - } -} diff --git a/app/Http/Controllers/Extension/SettingsController.php b/app/Http/Controllers/Extension/SettingsController.php deleted file mode 100755 index 23d9033d3..000000000 --- a/app/Http/Controllers/Extension/SettingsController.php +++ /dev/null @@ -1,684 +0,0 @@ -map(function ($item) { - if (! $item['issuer']) { - $item['issuer'] = __('Güvenli olmayan üretici!'); - } - - return $item; - }); - - return magicView('extension_pages.manager', [ - 'updateAvailable' => $updateAvailable, - 'extensions' => $extensions, - ]); - } - - /** - * Add license to extension - * - * @return JsonResponse|Response - */ - public function addLicense() - { - if (extension()->license_type != 'golang_standard') { - License::updateOrCreate( - ['extension_id' => extension()->id], - ['data' => request('license')] - ); - - return respond('Lisans Eklendi'); - } - - $server = extension()->servers()->first(); - - if (! $server) { - return respond('Lisans Eklenemiyor!', 201); - } - - $output = callExtensionFunction( - extension(), - $server, - [ - 'endpoint' => 'license', - 'type' => 'post', - 'data' => json_encode([ - 'license' => request('license'), - ]), - ] - ); - - $licenseType = new GolangLicense($output); - if ($licenseType->getValid()) { - License::updateOrCreate( - ['extension_id' => extension()->id], - ['data' => request('license')] - ); - - return respond('Lisans Eklendi'); - } - - return respond('Lisans Eklenemiyor!', 201); - } - - /** - * Get settings for extension - * - * @return JsonResponse|Response - */ - public function settings_one() - { - system_log(7, 'EXTENSION_SETTINGS_PAGE', [ - 'extension_id' => extension()->id, - ]); - if (extension()->language == null) { - extension()->update([ - 'language' => 'php', - ]); - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - $extension['language'] = 'php'; - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - } - // Return view with required parameters. - return magicView('extension_pages.one', [ - 'extension' => getExtensionJson(extension()->name), - ]); - } - - /** - * Update extension settings - * - * @return JsonResponse|Response - */ - public function update() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - if (request('type') == 'general') { - extension()->update(request()->only([ - 'display_name', - 'icon', - 'support', - 'version', - 'service', - 'require_key', - 'sslPorts', - 'supportedLiman', - ])); - $extension['display_name'] = request('display_name'); - $extension['icon'] = request('icon'); - $extension['service'] = request('service'); - $extension['version'] = request('version'); - $extension['require_key'] = request('require_key'); - $extension['verification'] = request('verification'); - $extension['dependencies'] = request('dependencies'); - $extension['sslPorts'] = request('sslPorts'); - $extension['supportedLiman'] = request('supportedLiman'); - } else { - $values = $extension[request('table')]; - foreach ($values as $key => $value) { - if ($value['name'] == request('name_old')) { - switch (request('table')) { - case 'database': - $values[$key]['variable'] = request('variable'); - $values[$key]['type'] = request('type'); - $values[$key]['name'] = request('name'); - $values[$key]['required'] = request('required') - ? true - : false; - $values[$key]['global'] = request('global') - ? true - : false; - $values[$key]['writable'] = request('writable') - ? true - : false; - break; - } - break; - } - } - $extension[request('table')] = $values; - } - if (array_key_exists('version_code', $extension)) { - $extension['version_code'] = intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - system_log(7, 'EXTENSION_SETTINGS_UPDATE', [ - 'extension_id' => extension()->_id, - 'settings_type' => request('table'), - ]); - - return respond('Güncellendi.', 200); - } - - /** - * Add extension settings - * - * @return JsonResponse|Response - */ - public function add() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - $values = $extension[request('table')]; - switch (request('table')) { - case 'database': - array_push($values, [ - 'variable' => request('variable'), - 'type' => request('type'), - 'name' => request('name'), - 'required' => request('required') ? true : false, - 'global' => request('global') ? true : false, - 'writable' => request('writable') ? true : false, - ]); - break; - } - $extension[request('table')] = $values; - - if (array_key_exists('version_code', $extension)) { - $extension['version_code'] = intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - system_log(7, 'EXTENSION_SETTINGS_ADD', [ - 'extension_id' => extension()->id, - 'settings_type' => request('table'), - ]); - - return respond('Eklendi', 200); - } - - /** - * Remove extension setting - * - * @return JsonResponse|Response - */ - public function remove() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - $values = $extension[request('table')]; - foreach ($values as $key => $value) { - if ($value['name'] == request('name')) { - unset($values[$key]); - break; - } - } - - $extension[request('table')] = $values; - - if (array_key_exists('version_code', $extension)) { - $extension['version_code'] = intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - system_log(7, 'EXTENSION_SETTINGS_REMOVE', [ - 'extension_id' => extension()->id, - 'settings_type' => request('table'), - ]); - - return respond('Sayfa Silindi.', 200); - } - - /** - * Get function parameters - * - * @return JsonResponse|Response - */ - public function getFunctionParameters() - { - $function_name = request('function_name'); - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - $function = collect($extension['functions']) - ->where('name', $function_name) - ->first(); - $parameters = isset($function['parameters']) - ? $function['parameters'] - : []; - - return magicView('table', [ - 'value' => $parameters, - 'title' => ['Parametre Adı', 'Değişken Adı', 'Tipi'], - 'display' => ['name', 'variable', 'type'], - 'menu' => [ - 'Sil' => [ - 'target' => 'deleteFunctionParameters', - 'icon' => 'fa-trash', - ], - ], - ]); - } - - /** - * Add function parameter - * - * @return JsonResponse|Response - */ - public function addFunctionParameter() - { - $function_name = request('function_name'); - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - if (isset($extension['functions'])) { - foreach ($extension['functions'] as $key => $function) { - if ($function['name'] == $function_name) { - $extension['functions'][$key]['parameters'] = isset( - $extension['functions'][$key]['parameters'] - ) - ? $extension['functions'][$key]['parameters'] - : []; - array_push($extension['functions'][$key]['parameters'], [ - 'variable' => request('variable'), - 'type' => request('type'), - 'name' => request('name'), - ]); - - if (array_key_exists('version_code', $extension)) { - $extension['version_code'] = - intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - return respond('Parametre başarıyla eklendi!'); - } - break; - } - } - - return respond('Fonksiyon bulunamadı!', 201); - } - - /** - * Delete function parameters - * - * @return JsonResponse|Response - */ - public function deleteFunctionParameters() - { - $function_name = request('function_name'); - $parameter_variable = request('parameter_variable'); - - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - if (isset($extension['functions'])) { - foreach ($extension['functions'] as $key => $function) { - if ($function['name'] == $function_name) { - if (isset($function['parameters'])) { - foreach ( - $function['parameters'] - as $parameter_key => $parameter - ) { - if ($parameter['variable'] == $parameter_variable) { - unset( - $extension['functions'][$key]['parameters'][$parameter_key] - ); - if ( - array_key_exists('version_code', $extension) - ) { - $extension['version_code'] = - intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - return respond('Parametre başarıyla silindi!'); - } - } - - return respond('Parametre bulunamadı!', 201); - } - } - break; - } - } - - return respond('Fonksiyon bulunamadı!', 201); - } - - /** - * Add function - * - * @return JsonResponse|Response - */ - public function addFunction() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - $functions = []; - - if (array_key_exists('functions', $extension)) { - $functions = $extension['functions']; - } - - array_push($functions, [ - 'name' => request('name'), - 'description' => request('description'), - 'isActive' => request()->has('isActive') ? 'true' : 'false', - 'displayLog' => request()->has('displayLog') ? 'true' : 'false', - ]); - - $extensionSQL = extension(); - if (request()->has('displayLog')) { - if ($extensionSQL->displays == null) { - $extensionSQL->update([ - 'displays' => [request('name')], - ]); - } else { - $current = $extensionSQL->displays; - array_push($current, request('name')); - $extensionSQL->update([ - 'displays' => $current, - ]); - } - } - - $extension['functions'] = $functions; - if (array_key_exists('version_code', $extension)) { - $extension['version_code'] = intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - system_log(7, 'EXTENSION_SETTINGS_ADD_FUNCTION', [ - 'extension_id' => extension()->id, - 'function' => request('name'), - ]); - - return respond('Fonksiyon Eklendi.', 200); - } - - /** - * Update function - * - * @return JsonResponse|Response - */ - public function updateFunction() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - $functions = []; - - if (array_key_exists('functions', $extension)) { - $functions = $extension['functions']; - } - - if (empty($functions)) { - return respond('Bir hata oluştu!', 201); - } - - for ($i = 0; $i < count($functions); $i++) { - if (request('old') == $functions[$i]['name']) { - $functions[$i] = [ - 'name' => request('name'), - 'description' => request('description'), - 'isActive' => request()->has('isActive') ? 'true' : 'false', - 'displayLog' => request()->has('displayLog') - ? 'true' - : 'false', - ]; - } - } - - $extensionSQL = extension(); - if ($extensionSQL->displays != null) { - $current = $extensionSQL->displays; - if (request()->has('displayLog')) { - if (! in_array(request('name'), $current)) { - array_push($current, request('name')); - } - } else { - if (in_array(request('name'), $current)) { - unset($current[array_search(request('name'), $current)]); - } - } - if (empty($current)) { - $current = null; - } - extension()->update([ - 'displays' => $current, - ]); - } - - $extension['functions'] = $functions; - if (array_key_exists('version_code', $extension)) { - $extension['version_code'] = intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - system_log(7, 'EXTENSION_SETTINGS_UPDATE_FUNCTION', [ - 'extension_id' => extension()->id, - 'function' => request('name'), - ]); - - return respond('Fonksiyon güncellendi.', 200); - } - - /** - * Remove function - * - * @return JsonResponse|Response - */ - public function removeFunction() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - - $functions = []; - - if (array_key_exists('functions', $extension)) { - $functions = $extension['functions']; - } - - if (empty($functions)) { - return respond('Bir hata oluştu!', 201); - } - - for ($i = 0; $i < count($functions); $i++) { - if (request('name') == $functions[$i]['name']) { - unset($functions[$i]); - } - } - - $extension['functions'] = $functions; - if (array_key_exists('version_code', $extension)) { - $extension['version_code'] = intval($extension['version_code']) + 1; - } else { - $extension['version_code'] = 1; - } - file_put_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json', - json_encode($extension, JSON_PRETTY_PRINT) - ); - - system_log(7, 'EXTENSION_SETTINGS_REMOVE_FUNCTION', [ - 'extension_id' => extension()->id, - 'function' => request('name'), - ]); - - return respond('Fonksiyon Silindi.', 200); - } - - /** - * Get extension updates - * - * @return JsonResponse|Response - */ - public function getExtensionUpdates() - { - return respond( - array_values(json_decode(file_get_contents(storage_path('extension_updates')), true)) - ); - } -} diff --git a/app/Http/Controllers/Extension/_routes.php b/app/Http/Controllers/Extension/_routes.php deleted file mode 100644 index 8cde3ca83..000000000 --- a/app/Http/Controllers/Extension/_routes.php +++ /dev/null @@ -1,150 +0,0 @@ -name('extension_server') - ->middleware(['server', 'extension']); - -// Extension Management Route -Route::post('/extension/run/{unique_code}', 'Extension\OneController@route') - ->name('extension_api') - ->middleware(['server_api', 'extension']); - -// Extensions List Route -Route::get('/eklentiler', 'Extension\SettingsController@settings_all') - ->name('extensions_settings') - ->middleware('admin'); - -Route::post( - '/eklentiler_api', - 'Extension\SettingsController@allServersApi' -)->name('extensions_api'); - -Route::post( - '/ayarlar/eklenti/zorlaBagimlilikKur', - 'Extension\OneController@forceDepInstall' -)->name('extension_force_dep_install')->middleware('admin'); - -Route::post( - '/ayarlar/eklenti/zorlaAktiflestir', - 'Extension\OneController@forceEnableExtension' -)->name('extension_force_enable')->middleware('admin'); - -// Extension Details Route -Route::get( - '/eklentiler/{extension_id}', - 'Extension\SettingsController@settings_one' -)->name('extension_one'); - -// Extension Server Setting Page -Route::get( - '/ayarlar/{extension_id}/{server_id}', - 'Extension\OneController@serverSettingsPage' -) - ->name('extension_server_settings_page') - ->middleware(['server', 'extension']); - -Route::post( - '/ayarlar/eklentiGuncellemeleri', - 'Extension\SettingsController@getExtensionUpdates' -) - ->name('get_extension_updates') - ->middleware('admin'); - -Route::post( - '/ayarlar/eklentiGuncelle', - 'Extension\MainController@autoUpdateExtension' -) - ->name('update_extension_auto') - ->middleware('admin'); - -// Extension Server Settings -Route::post( - '/ayarlar/{extension_id}/{server_id}', - 'Extension\OneController@serverSettings' -) - ->name('extension_server_settings') - ->middleware(['server', 'extension']); - -// Extension Upload Page -Route::post('/yukle/eklenti/', 'Extension\MainController@upload') - ->name('extension_upload') - ->middleware('admin'); - -Route::post( - '/eklenti/accessLogs', - 'Extension\MainController@accessLogs' -)->name('extension_access_logs'); - -Route::post( - '/eklentiler', - 'Extension\MainController@extensions' -)->name('widget_get_extensions'); - -// Extension Upload Page -Route::post('/ayarlar/eklentilisans', 'Extension\SettingsController@addLicense') - ->name('add_extension_license') - ->middleware('admin'); - -Route::post( - '/ayarlar/eklenti', - 'Extension\SettingsController@saveSettings' -)->name('save_settings'); - -// Extension Remove Page -Route::post('/eklenti/sil', 'Extension\OneController@remove') - ->name('extension_remove') - ->middleware('admin'); - -Route::post( - '/eklenti/update_ext_orders', - 'Extension\MainController@updateExtOrders' -) - ->name('update_ext_orders') - ->middleware('admin'); - -Route::post( - '/eklenti/fonksiyonEkle', - 'Extension\SettingsController@addFunction' -) - ->name('extension_add_function') - ->middleware('admin'); - -Route::post( - '/eklenti/fonksiyonDuzenle', - 'Extension\SettingsController@updateFunction' -) - ->name('extension_update_function') - ->middleware('admin'); - -Route::post( - '/eklenti/fonksiyonParametreleri', - 'Extension\SettingsController@getFunctionParameters' -) - ->name('extension_function_parameters') - ->middleware('admin'); - -Route::post( - '/eklenti/fonksiyonParametreleri/sil', - 'Extension\SettingsController@deleteFunctionParameters' -) - ->name('extension_remove_function_parameters') - ->middleware('admin'); - -Route::post( - '/eklenti/fonksiyonParametreleri/ekle', - 'Extension\SettingsController@addFunctionParameter' -) - ->name('extension_add_function_parameters') - ->middleware('admin'); - -Route::post( - '/eklenti/fonksiyonSil', - 'Extension\SettingsController@removeFunction' -) - ->name('extension_remove_function') - ->middleware('admin'); - diff --git a/app/Http/Controllers/HASync/MainController.php b/app/Http/Controllers/HASync/MainController.php index 2a15f94e5..93cd5d82d 100644 --- a/app/Http/Controllers/HASync/MainController.php +++ b/app/Http/Controllers/HASync/MainController.php @@ -4,7 +4,6 @@ use App\Http\Controllers\Controller; use App\Models\Extension; -use App\Models\Module; use App\System\Command; use GuzzleHttp\Exception\GuzzleException; use Illuminate\Http\JsonResponse; @@ -71,54 +70,4 @@ public function downloadExtension() ) ->deleteFileAfterSend(); } - - /** - * Module list existing on system - * - * @return JsonResponse - */ - public function moduleList() - { - $modules = Module::all(); - - $list = []; - foreach ($modules as $module) { - $list[] = [ - "id" => $module->id, - "name" => $module->name, - "updated_at" => $module->updated_at->toDateTimeString(), - "download_path" => route("ha_download_module", [ - "module_name" => $module->name - ]), - ]; - } - - return response()->json($list); - } - - /** - * Returns module zip file - * - * @return BinaryFileResponse - */ - public function downloadModule() - { - // Generate Module Folder Path - $path = '/liman/modules/' . (string) request('module_name'); - $tempPath = '/tmp/' . Str::random() . '.zip'; - - // Zip the current module - Command::runLiman('cd @{:path} && zip -r @{:tempPath} .', [ - 'path' => $path, - 'tempPath' => $tempPath, - ]); - - // Return zip as download and delete it after sent. - return response() - ->download( - $tempPath, - Str::uuid() . '.zip' - ) - ->deleteFileAfterSend(); - } } diff --git a/app/Http/Controllers/HASync/_routes.php b/app/Http/Controllers/HASync/_routes.php index 27864ee94..97e1b5332 100644 --- a/app/Http/Controllers/HASync/_routes.php +++ b/app/Http/Controllers/HASync/_routes.php @@ -4,7 +4,5 @@ ->middleware(["block_except_limans", "api"]) ->group(function () { Route::get("/extension_list", "HASync\MainController@extensionList")->name("ha_extension_list"); - Route::get("/module_list", "HASync\MainController@moduleList")->name("ha_module_list"); Route::get("/download_extension/{extension_name}", "HASync\MainController@downloadExtension")->name("ha_download_ext"); - Route::get("/download_module/{module_name}", "HASync\MainController@downloadModule")->name("ha_download_module"); }); \ No newline at end of file diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php deleted file mode 100644 index 175cadbe3..000000000 --- a/app/Http/Controllers/HomeController.php +++ /dev/null @@ -1,185 +0,0 @@ -middleware('auth'); - } - - /** - * Creates Liman dashboard - * - * @return JsonResponse|Response - */ - public function index() - { - system_log(7, 'HOMEPAGE'); - - return magicView('index', [ - 'token' => Token::create(user()->id), - 'server_count' => Server::all()->count(), - 'extension_count' => Extension::all()->count(), - 'user_count' => User::all()->count(), - 'version' => getVersion() . ' - ' . getVersionCode(), - ]); - } - - /** - * Get liman server stats - * - * @return Application|ResponseFactory|Response - */ - public function getLimanStats() - { - $cores = str_replace("cpu cores\t: ", "", trim(explode("\n", Command::runLiman("cat /proc/cpuinfo | grep 'cpu cores'"))[0])); - $cpuUsage = shell_exec( - "ps -eo %cpu --no-headers | grep -v 0.0 | awk '{s+=$1} END {print s/NR*10}'" - ); - $cpuUsage = round($cpuUsage, 2); - $ramUsage = shell_exec("free -t | awk 'NR == 2 {printf($3/$2*100)}'"); - $ramUsage = round($ramUsage, 2); - $ioPercent = (float) shell_exec( - "iostat -d | tail -n +4 | head -n -1 | awk '{s+=$2} END {print s}'" - ); - - $firstDown = $this->calculateNetworkBytes(); - $firstUp = $this->calculateNetworkBytes(false); - sleep(1); - $secondDown = $this->calculateNetworkBytes(); - $secondUp = $this->calculateNetworkBytes(false); - - $totalCpu = round($cpuUsage / $cores, 2); - - return response([ - 'cpu' => $totalCpu > 100 ? 100 : $totalCpu, - 'ram' => $ramUsage > 100 ? 100 : $ramUsage, - 'io' => $ioPercent > 100 ? 100 : round($ioPercent, 2), - 'network' => [ - 'download' => round(($secondDown - $firstDown) / 1024 / 2, 2), - 'upload' => round(($secondUp - $firstUp) / 1024 / 2, 2), - ] - ]); - } - - /** - * Calculates network bytes - * - * @param $download - * @return int|string - */ - private function calculateNetworkBytes($download = true) - { - $text = $download ? 'rx_bytes' : 'tx_bytes'; - if ($text == 'rx_bytes' || $text == 'tx_bytes') { - $count = 0; - $raw = trim(shell_exec("cat /sys/class/net/*/statistics/$text")); - - foreach (explode("\n", trim($raw)) as $data) { - $count += intval($data); - } - - return $count; - } else { - return 'Invalid data'; - } - } - - /** - * Sets locale for user - * - * @return Application|ResponseFactory|RedirectResponse|Response - */ - public function setLocale() - { - system_log(7, 'SET_LOCALE'); - $languages = getLanguages(); - if ( - request()->has('locale') && - in_array(request('locale'), $languages) - ) { - \Session::put('locale', request('locale')); - auth()->user()->update([ - 'locale' => request('locale'), - ]); - - return redirect()->back(); - } else { - return response('Language not found', 404); - } - } - - /** - * Get server uptime status - * - * @param $count - * @return array - */ - public function getServerStatus($count = 6) - { - $servers = Server::orderBy('updated_at', 'DESC')->limit($count)->get(); - $data = []; - - foreach ($servers as $server) { - $status = @fsockopen( - $server->ip_address, - $server->control_port, - $errno, - $errstr, - 1); - - try { - if ($status) { - if ($server->isWindows() && $server->canRunCommand()) { - preg_match('/\d+/', (string) $server->getUptime(), $output); - $uptime = $output[0]; - } elseif ($server->canRunCommand()) { - $uptime = $server->getUptime(); - } else { - $uptime = ''; - } - - if ($uptime != '') { - $uptime = \Carbon\Carbon::parse($uptime)->diffForHumans(); - } - } else { - $uptime = ' '; - } - } catch (\Throwable) { - $uptime = ' '; - } - - array_push($data, [ - 'id' => $server->id, - 'icon' => $server->isLinux() ? 'fa-linux' : 'fa-windows', - 'name' => $server->name, - 'uptime' => (bool) $uptime ? $uptime : null, - 'badge_class' => (bool) $status ? 'badge-success' : 'badge-danger', - 'status' => (bool) $status, - ]); - } - - return $data; - } -} diff --git a/app/Http/Controllers/LogController.php b/app/Http/Controllers/LogController.php deleted file mode 100644 index 091ce9e0b..000000000 --- a/app/Http/Controllers/LogController.php +++ /dev/null @@ -1,12 +0,0 @@ -map(function ($module) { - $module->enabled_text = $module->enabled - ? 'Aktif' - : 'İzin Verilmemiş'; - }); - - return magicView('modules.index', [ - 'modules' => $modules, - ]); - } - - /** - * Enable or disable module - * - * @return JsonResponse|Response - */ - public function modifyModuleStatus() - { - $module = Module::findOrFail(request('module_id'))->first(); - - $flag = $module->update([ - 'enabled' => request('moduleStatus') == 'true' ? true : false, - ]); - - if ($flag) { - return respond('Modül güncellendi.'); - } else { - return respond(__('Bir hata oluştu. ') . $flag, 201); - } - } - - /** - * Returns module settings - * - * @return JsonResponse|Response - */ - public function getModuleSettings() - { - $module = Module::findOrFail(request('module_id'))->first(); - - $template = file_get_contents( - '/liman/modules/' . $module->name . '/template.json' - ); - $template = json_decode($template, true); - if (json_last_error() != JSON_ERROR_NONE) { - return respond('Modul ayarlari okunamiyor.', 201); - } - - $inputs = $template['settings']; - - $view = view('inputs', [ - 'inputs' => $inputs, - ])->render(); - - $data = []; - - $settingsPath = '/liman/modules/' . $module->name . '/settings.json'; - if (is_file($settingsPath)) { - $data = file_get_contents($settingsPath); - $data = json_decode($data, true); - if (json_last_error() == JSON_ERROR_NONE) { - $data = $data['variables']; - } - } - - return respond([ - 'view' => $view, - 'data' => $data, - ]); - } - - /** - * Save module settings - * - * @return JsonResponse|Response - */ - public function saveModuleSettings() - { - $module = Module::findOrFail(request('module_id'))->first(); - - $filePath = '/liman/modules/' . $module->name . '/settings.json'; - $data = [ - 'variables' => [], - ]; - - if (is_file($filePath)) { - $dataJson = file_get_contents($filePath); - $dataJson = json_decode($dataJson, true); - if (json_last_error() == JSON_ERROR_NONE) { - $data = $dataJson; - } - } - - foreach (request()->all() as $key => $value) { - if (substr((string) $key, 0, 4) == 'mod-') { - $data['variables'][substr((string) $key, 4)] = $value; - } - } - - $flag = file_put_contents( - $filePath, - json_encode($data, JSON_PRETTY_PRINT) - ); - - if ($flag) { - return respond('Ayarlar başarıyla kaydedildi.'); - } else { - return respond('Ayarlar kaydedilemedi!', 201); - } - } -} diff --git a/app/Http/Controllers/Module/_routes.php b/app/Http/Controllers/Module/_routes.php deleted file mode 100644 index e8e5b4568..000000000 --- a/app/Http/Controllers/Module/_routes.php +++ /dev/null @@ -1,3 +0,0 @@ -name('modules_index'); diff --git a/app/Http/Controllers/Notification/ExternalNotificationController.php b/app/Http/Controllers/Notification/ExternalNotificationController.php deleted file mode 100644 index 4164e931f..000000000 --- a/app/Http/Controllers/Notification/ExternalNotificationController.php +++ /dev/null @@ -1,99 +0,0 @@ -delete()) { - return respond('Başarıyla Silindi!'); - } else { - return respond('Silinemedi!', 201); - } - } - - public function renew() - { - $obj = ExternalNotification::find(request('id')); - if (!$obj) { - return respond('Bu istemci bulunamadı!', 201); - } - $token = (string) Str::uuid(); - if ( - $obj->update([ - 'token' => $token, - ]) - ) { - return respond(__('Token başarıyla yenilendi!') . "\n$token"); - } - } - - public function edit() - { - $obj = ExternalNotification::find(request('id')); - if (!$obj) { - return respond('Bu istemci bulunamadı!', 201); - } - if ($obj->update(request()->all())) { - return respond('İstemci Güncellendi!'); - } else { - return respond('İstemci Güncellenemedi!', 201); - } - } - - /** - * Accept external notification from an external service - * - * @param Request $request - * @return JsonResponse - */ - public function accept(Request $request) - { - // TODO: Develop new notification system - } - - public function create() - { - validate([ - 'name' => 'required|max:32', - 'ip' => 'required|max:20', - ]); - - $token = (string) Str::uuid(); - if ( - ExternalNotification::updateOrCreate( - ['name' => request('name')], - request() - ->merge(['token' => $token]) - ->all() - ) - ) { - return respond(__('Token Oluşturuldu! ') . $token); - } else { - return respond('Token Oluşturulamadı!', 201); - } - } -} diff --git a/app/Http/Controllers/Notification/_routes.php b/app/Http/Controllers/Notification/_routes.php deleted file mode 100644 index f78c38133..000000000 --- a/app/Http/Controllers/Notification/_routes.php +++ /dev/null @@ -1,29 +0,0 @@ -name('add_notification_channel') - ->middleware('admin'); - -Route::post( - '/ayar/bildirimKanali/duzenle', - 'Notification\ExternalNotificationController@edit' -) - ->name('edit_notification_channel') - ->middleware('admin'); - -Route::post( - '/ayar/bildirimKanali/sil', - 'Notification\ExternalNotificationController@revoke' -) - ->name('revoke_notification_channel') - ->middleware('admin'); - -Route::post( - '/ayar/bildirimKanali/yenile', - 'Notification\ExternalNotificationController@renew' -) - ->name('renew_notification_channel') - ->middleware('admin'); diff --git a/app/Http/Controllers/Roles/RoleController.php b/app/Http/Controllers/Roles/RoleController.php deleted file mode 100644 index 3ce575a7d..000000000 --- a/app/Http/Controllers/Roles/RoleController.php +++ /dev/null @@ -1,364 +0,0 @@ -id); - - return magicView('settings.role', [ - 'role' => $role, - 'servers' => Server::find( - $role->permissions - ->where('type', 'server') - ->pluck('value') - ->toArray() - ), - 'extensions' => Extension::find( - $role->permissions - ->where('type', 'extension') - ->pluck('value') - ->toArray() - ), - 'limanPermissions' => $limanPermissions, - 'variablesPermissions' => $role->permissions->where('type', 'variable'), - ]); - } - - /** - * Get role list - * - * @return JsonResponse|Response - */ - public function list() - { - return magicView('table', [ - 'value' => Role::all(), - 'title' => ['Rol Grubu Adı', '*hidden*'], - 'display' => ['name', 'id:role_id'], - 'menu' => [ - 'Yeniden Adlandır' => [ - 'target' => 'editRole', - 'icon' => ' context-menu-icon-edit', - ], - 'Sil' => [ - 'target' => 'deleteRole', - 'icon' => ' context-menu-icon-delete', - ], - ], - 'onclick' => 'roleDetails', - ]); - } - - - /** - * Create new role - * - * @return JsonResponse|Response - */ - public function add() - { - validate([ - 'name' => ['required', 'string', 'max:255', 'unique:roles'], - ]); - - $role = Role::create([ - 'name' => request('name'), - ]); - - return respond('Rol grubu başarıyla eklendi.'); - } - - /** - * Rename role - * - * @return JsonResponse|Response - */ - public function rename() - { - $count = Role::where('id', request('role_id'))->update([ - 'name' => request('name'), - ]); - - if ($count) { - return respond('Rol grubu başarıyla düzenlendi.'); - } else { - return respond('Rol grubu düzenlenemedi!', 201); - } - } - - /** - * Delete role - * - * @return JsonResponse|Response - */ - public function remove() - { - Permission::where('morph_id', request('role_id'))->delete(); - - RoleUser::where('role_id', request('role_id'))->delete(); - - RoleMapping::where('role_id', request('role_id'))->delete(); - - Role::where('id', request('role_id'))->delete(); - - return respond('Rol grubu başarıyla silindi.'); - } - - /** - * Assign users to role - * - * @return JsonResponse|Response - */ - public function addRoleUsers() - { - foreach (json_decode((string) request('users')) as $user) { - RoleUser::firstOrCreate([ - 'user_id' => User::where('email', $user)->first()->id, - 'role_id' => request('role_id'), - ]); - } - - return respond(__('Grup üyeleri başarıyla eklendi.'), 200); - } - - - /** - * Assign roles to user - * - * @return JsonResponse|Response - */ - public function addRolesToUser() - { - foreach (json_decode((string) request('ids')) as $role) { - RoleUser::firstOrCreate([ - 'user_id' => request('user_id'), - 'role_id' => $role, - ]); - } - - return respond(__('Rol grupları kullanıcıya başarıyla eklendi.'), 200); - } - - - /** - * Unassign roles from user - * - * @return JsonResponse|Response - */ - public function removeRolesToUser() - { - $ids = json_decode((string) request('ids')); - if (count($ids) == 0) { - return respond(__('Rol grubu silinemedi.'), 201); - } - - RoleUser::whereIn('role_id', $ids) - ->where([ - 'user_id' => request('user_id'), - ]) - ->delete(); - - return respond(__('Rol grupları başarıyla silindi.'), 200); - } - - - /** - * Unassign users from role - * - * @return JsonResponse|Response - */ - public function removeRoleUsers() - { - RoleUser::whereIn('user_id', json_decode((string) request('users'))) - ->where([ - 'role_id' => request('role_id'), - ]) - ->delete(); - - return respond(__('Grup üyeleri başarıyla silindi.'), 200); - } - - - /** - * Get role permission list - * - * @return JsonResponse|Response - */ - public function getList() - { - $role = Role::find(request('role_id')); - $data = []; - $title = []; - $display = []; - switch (request('type')) { - case 'server': - $data = Server::whereNotIn( - 'id', - $role->permissions - ->where('type', 'server') - ->pluck('value') - ->toArray() - )->get(); - $title = ['*hidden*', 'İsim', 'Türü', 'İp Adresi']; - $display = ['id:id', 'name', 'type', 'ip_address']; - break; - case 'extension': - $data = Extension::whereNotIn( - 'id', - $role->permissions - ->where('type', 'extension') - ->pluck('value') - ->toArray() - )->get(); - $title = ['*hidden*', 'İsim']; - $display = ['id:id', 'name']; - break; - case 'liman': - $usedPermissions = Permission::where([ - 'type' => 'liman', - 'morph_id' => request('role_id'), - ]) - ->get() - ->groupBy('value'); - - $data = [ - [ - 'id' => 'view_logs', - 'name' => 'Sunucu Günlük Kayıtlarını Görüntüleme', - ], - [ - 'id' => 'add_server', - 'name' => 'Sunucu Ekleme', - ], - [ - 'id' => 'server_services', - 'name' => 'Sunucu Servislerini Görüntüleme', - ], - [ - 'id' => 'server_details', - 'name' => 'Sunucu Detaylarını Görüntüleme', - ], - [ - 'id' => 'update_server', - 'name' => 'Sunucu Detaylarını Güncelleme', - ], - ]; - - foreach ($usedPermissions as $permission => $values) { - foreach ($data as $k => $v) { - if ($v['id'] == $permission) { - unset($data[$k]); - } - } - } - - $title = ['*hidden*', 'İsim']; - $display = ['id:id', 'name']; - break; - default: - abort(504, 'Tip Bulunamadı'); - } - - return magicView('table', [ - 'value' => $data, - 'title' => $title, - 'display' => $display, - ]); - } - - /** - * Add permission to role - * - * @return JsonResponse|Response - */ - public function addList() - { - foreach (json_decode((string) request('ids'), true) as $id) { - Permission::grant( - request('role_id'), - request('type'), - 'id', - $id, - null, - 'roles' - ); - } - - return respond(__('Başarılı'), 200); - } - - /** - * Remove permission from role - * - * @return JsonResponse|Response - */ - public function removeFromList() - { - foreach (json_decode((string) request('ids'), true) as $id) { - Permission::revoke(request('role_id'), request('type'), 'id', $id); - } - - return respond(__('Başarılı'), 200); - } - - /** - * Add function permissions to role - * - * @return JsonResponse|Response - */ - public function addFunctionPermissions() - { - foreach (explode(',', (string) request('functions')) as $function) { - Permission::grant( - request('role_id'), - 'function', - 'name', - strtolower((string) extension()->name), - $function, - 'roles' - ); - } - - return respond(__('Başarılı'), 200); - } - - /** - * Remove function permission from role - * - * @return JsonResponse|Response - */ - public function removeFunctionPermissions() - { - foreach (explode(',', (string) request('functions')) as $function) { - Permission::find($function)->delete(); - } - - return respond(__('Başarılı'), 200); - } -} diff --git a/app/Http/Controllers/Roles/RoleMappingController.php b/app/Http/Controllers/Roles/RoleMappingController.php deleted file mode 100644 index 998aa3873..000000000 --- a/app/Http/Controllers/Roles/RoleMappingController.php +++ /dev/null @@ -1,53 +0,0 @@ - ['required', 'string'], - 'role_id' => ['required', 'exists:roles,id'], - ]); - - RoleMapping::create([ - 'dn' => request('dn'), - 'role_id' => request('role_id'), - 'group_id' => md5((string) request('dn')), - ]); - - return respond('Rol eşleştirmesi başarıyla eklendi.'); - } - - /** - * Remove role mapping - * - * @return JsonResponse|Response - */ - public function delete() - { - validate([ - 'role_mapping_id' => ['required', 'exists:role_mappings,id'], - ]); - - RoleMapping::find(request('role_mapping_id'))->delete(); - - return respond('Rol eşleştirmesi başarıyla silindi.'); - } -} diff --git a/app/Http/Controllers/Roles/_routes.php b/app/Http/Controllers/Roles/_routes.php deleted file mode 100644 index 145e42673..000000000 --- a/app/Http/Controllers/Roles/_routes.php +++ /dev/null @@ -1,71 +0,0 @@ -name('role_add') - ->middleware('admin'); - -Route::post('/rol/rename', 'Roles\RoleController@rename') - ->name('role_rename') - ->middleware('admin'); - -Route::post('/rol/sil', 'Roles\RoleController@remove') - ->name('role_remove') - ->middleware('admin'); - -Route::post('/rol/liste', 'Roles\RoleController@list') - ->name('role_list') - ->middleware('admin'); - -Route::get('/rol/{role}', 'Roles\RoleController@one') - ->name('role_one') - ->middleware('admin'); - -Route::post('/rol/kullanici_ekle', 'Roles\RoleController@addRoleUsers') - ->name('add_role_users') - ->middleware('admin'); - -Route::post('/rol/rol_ekle', 'Roles\RoleController@addRolesToUser') - ->name('add_roles_to_user') - ->middleware('admin'); - -Route::post('/rol/rol_sil', 'Roles\RoleController@removeRolesToUser') - ->name('remove_roles_to_user') - ->middleware('admin'); - -Route::post('/rol/kullanici_sil', 'Roles\RoleController@removeRoleUsers') - ->name('remove_role_users') - ->middleware('admin'); - -Route::post('/rol/yetki_listesi', 'Roles\RoleController@getList') - ->name('role_permission_list') - ->middleware('admin'); - -Route::post('/rol/yetki_listesi/ekle', 'Roles\RoleController@addList') - ->name('add_role_permission_list') - ->middleware('admin'); - -Route::post('/rol/yetki_listesi/sil', 'Roles\RoleController@removeFromList') - ->name('remove_role_permission_list') - ->middleware('admin'); - -Route::post( - '/rol/yetki_listesi/fonksiyon_ekle', - 'Roles\RoleController@addFunctionPermissions' -) - ->name('add_role_function') - ->middleware('admin'); - -Route::post( - '/rol/yetki_listesi/fonksiyon_sil', - 'Roles\RoleController@removeFunctionPermissions' -) - ->name('remove_role_function') - ->middleware('admin'); - -Route::post('/rol/eslestirme_ekle', 'Roles\RoleMappingController@add') - ->name('add_role_mapping') - ->middleware('admin'); - -Route::post('/rol/eslestirme_sil', 'Roles\RoleMappingController@delete') - ->name('delete_role_mapping') - ->middleware('admin'); diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php deleted file mode 100644 index 8d395a46e..000000000 --- a/app/Http/Controllers/SearchController.php +++ /dev/null @@ -1,85 +0,0 @@ -isAdmin()) { - foreach (config('liman.admin_searchable') as $constant) { - $constant['name'] = __($constant['name']); - array_push($searchable, $constant); - } - } - - foreach (config('liman.user_searchable') as $constant) { - $constant['name'] = __($constant['name']); - array_push($searchable, $constant); - } - - // Server searching - $servers = Server::select('id', 'name')->get() - ->filter(function ($server) { - return Permission::can(user()->id, 'server', 'id', $server->id); - }); - foreach ($servers as $server) { - if (Permission::can(user()->id, 'liman', 'id', 'server_details')) { - array_push($searchable, [ - 'name' => $server->name, - 'url' => route('server_one', $server->id), - ]); - } - - // Extension searching - $extensions = $server->extensions(); - - foreach ($extensions as $extension) { - if (! empty($extension->display_name)) { - array_push($searchable, [ - 'name' => $server->name . ' / ' . $extension->display_name, - 'url' => route('extension_server', [$extension->id, $server->id]), - ]); - continue; - } - array_push($searchable, [ - 'name' => $server->name . ' / ' . $extension->name, - 'url' => route('extension_server', [$extension->id, $server->id]), - ]); - } - } - - $results = []; - $search_query = $request->search_query; - - // Searching inside the searchable array - foreach ($searchable as $search_item) { - if (str_contains(strtolower((string) $search_item['name']), strtolower((string) $search_query))) { - array_push($results, $search_item); - } - } - - return response()->json($results); - } -} diff --git a/app/Http/Controllers/Server/AddController.php b/app/Http/Controllers/Server/AddController.php deleted file mode 100644 index e33182e78..000000000 --- a/app/Http/Controllers/Server/AddController.php +++ /dev/null @@ -1,145 +0,0 @@ -id, 'liman', 'id', 'add_server')) { - return respond('Bu işlemi yapmak için yetkiniz yok!', 201); - } - - // Check if name is already in use. - if ( - Server::where([ - 'user_id' => auth()->id(), - 'name' => request('name'), - ])->exists() - ) { - return respond('Bu sunucu ismiyle bir sunucu zaten var.', 201); - } - - if (strlen((string) request('name')) > 24) { - return respond('Lütfen daha kısa bir sunucu adı girin.', 201); - } - - // Create object with parameters. - $this->server = new Server(); - $this->server->fill(request()->all()); - $this->server->user_id = auth()->id(); - $this->server->shared_key = request()->shared == 'true' ? 1 : 0; - if (request('type') == null) { - $this->server->type = 'none'; - } - request('key_port') - ? ($this->server->key_port = request('key_port')) - : null; - - // Check if Server is online or not. - if (! $this->server->isAlive()) { - return respond('Sunucuyla bağlantı kurulamadı.', 406); - } - $this->server->save(); - - // Send notifications - // TODO: Add notification for server add. - - // Add Server to request object to use it later. - request()->request->add(['server' => $this->server]); - - if (request('type')) { - $encKey = env('APP_KEY') . user()->id . server()->id; - $data = [ - 'clientUsername' => AES256::encrypt( - request('username'), - $encKey - ), - 'clientPassword' => AES256::encrypt( - request('password'), - $encKey - ), - ]; - $data['key_port'] = request('key_port'); - - ServerKey::updateOrCreate( - ['server_id' => server()->id, 'user_id' => user()->id], - ['type' => request('type'), 'data' => json_encode($data)] - ); - } - - return $this->grantPermissions(); - } - - /** - * Grant server certificate - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - private function grantPermissions() - { - Permission::grant(user()->id, 'server', 'id', $this->server->id); - - // SSL Control - if (in_array($this->server->control_port, knownPorts())) { - $cert = Certificate::where([ - 'server_hostname' => $this->server->ip_address, - 'origin' => $this->server->control_port, - ])->first(); - if (! $cert) { - [$flag, $message] = retrieveCertificate( - request('ip_address'), - request('control_port') - ); - if ($flag) { - $flag2 = addCertificate( - request('ip_address'), - request('control_port'), - $message['path'] - ); - // TODO: New certificate notification - } - if (! $flag || ! $flag2) { - $this->server->enabled = false; - $this->server->save(); - // TODO: New certificate notification - - return respond( - __('Bu sunucu ilk defa eklendiğinden dolayı bağlantı sertifikası yönetici onayına sunulmuştur. Bu sürede sunucuya erişemezsiniz.'), - 202 - ); - } - } - } - - return respond(route('server_one', $this->server->id), 300); - } -} diff --git a/app/Http/Controllers/Server/MainController.php b/app/Http/Controllers/Server/MainController.php deleted file mode 100644 index 43f9a933d..000000000 --- a/app/Http/Controllers/Server/MainController.php +++ /dev/null @@ -1,110 +0,0 @@ -wantsJson()) { - return response()->json(servers()); - } else { - return view('server.index'); - } - } - - /** - * Retrieve a server - * - * @return JsonResponse - */ - public function oneData() - { - return response()->json(server()); - } - - /** - * Check if server is active - * - * @return JsonResponse|Response - */ - public function checkAccess() - { - if (request('port') == -1) { - return respond('Sunucuya başarıyla erişim sağlandı.', 200); - } - $status = @fsockopen( - request('hostname'), - request('port'), - $errno, - $errstr, - intval(config('liman.server_connection_timeout')) / 1000 - ); - if (is_resource($status)) { - return respond('Sunucuya başarıyla erişim sağlandı.', 200); - } else { - return respond('Sunucuya erişim sağlanamadı.', 201); - } - } - - /** - * Check if server name is valid - * - * @return JsonResponse|Response - */ - public function verifyName() - { - if (strlen((string) request('server_name')) > 24) { - return respond('Lütfen daha kısa bir sunucu adı girin.', 201); - } - if (! Server::where('name', request('server_name'))->exists()) { - return respond('İsim Onaylandı.', 200); - } else { - return respond('Bu isimde zaten bir sunucu var.', 201); - } - } - - /** - * Check if server key is valid - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function verifyKey() - { - $connector = new GenericConnector(); - $output = $connector->verify( - request('ip_address'), - request('username'), - request('password'), - request('port'), - request('key_type') - ); - - if ($output == 'ok') { - return respond('Anahtarınız doğrulandı!'); - } else { - return respond('Anahtarınız doğrulanamadı!', 201); - } - } -} diff --git a/app/Http/Controllers/Server/OneController.php b/app/Http/Controllers/Server/OneController.php deleted file mode 100644 index 543d9c7a0..000000000 --- a/app/Http/Controllers/Server/OneController.php +++ /dev/null @@ -1,1787 +0,0 @@ -id, 'liman', 'id', 'server_details')) { - return respond('Bu işlemi yapmak için yetkiniz yok!', 201); - } - - try { - if ($server->isWindows()) { - preg_match('/\d+/', (string) $server->getUptime(), $output); - $uptime = $output[0]; - } else { - $uptime = $server->getUptime(); - } - $uptime = Carbon::parse($uptime)->diffForHumans(); - } catch (\Throwable) { - $uptime = __('Uptime parse edemiyorum.'); - } - - $outputs = [ - 'hostname' => $server->getHostname(), - 'version' => $server->getVersion(), - 'nofservices' => $server->getNoOfServices(), - 'nofprocesses' => $server->getNoOfProcesses(), - 'uptime' => $uptime, - ]; - - if ($server->canRunCommand()) { - $outputs['user'] = Command::run('whoami'); - } - - $input_extensions = []; - $available_extensions = $this->availableExtensions(); - - foreach ($available_extensions as $extension) { - $arr = []; - if (isset($extension->install)) { - foreach ($extension->install as $key => $parameter) { - $arr[$parameter['name']] = $key . ':' . $parameter['type']; - } - } - $arr[$extension->display_name . ':' . $extension->id] = - 'extension_id:hidden'; - $input_extensions[] = [ - 'name' => $extension->display_name, - 'id' => $extension->id, - ]; - } - - return view('server.one.main', [ - 'server' => $server, - 'favorite' => $server->isFavorite(), - 'outputs' => $outputs, - 'installed_extensions' => $this->installedExtensions(), - 'available_extensions' => $available_extensions, - 'input_extensions' => $input_extensions, - ]); - } - - /** - * Get available extensions - * - * @return mixed - */ - private function availableExtensions() - { - return Extension::getAll()->whereNotIn( - 'id', - DB::table('server_extensions') - ->where([ - 'server_id' => server()->id, - ]) - ->pluck('extension_id') - ->toArray() - ); - } - - /** - * Get extensions that used by server - * - * @return Collection - */ - private function installedExtensions() - { - return server()->extensions(); - } - - /** - * Delete server from Liman - * - * @return JsonResponse|Response - */ - public function remove() - { - // Check if authenticated user is owner or admin. - if ( - server()->user_id != auth()->id() && - ! auth() - ->user() - ->isAdmin() - ) { - // Throw error - return respond('Yalnızca kendi sunucunuzu silebilirsiniz.', 202); - } - $server = server(); - // Delete the Server Object. - server()->delete(); - // TODO: Add notification for delete server - - // Redirect user to servers home page. - return respond(route('servers'), 300); - } - - /** - * DEPRECATED - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function serviceCheck() - { - if (is_numeric(extension()->service)) { - if (extension()->service == -1) { - $flag = true; - } else { - $status = @fsockopen( - server()->ip_address, - extension()->service, - $errno, - $errstr, - intval(config('liman.server_connection_timeout')) / 1000 - ); - $flag = is_resource($status); - } - } else { - $flag = server()->isRunning(extension()->service); - } - // Return the button class name ~ color to update client. - if ($flag) { - return respond('btn-success'); - } else { - return respond('btn-danger'); - } - } - - /** - * Service operations on server - * - * @return array - * @throws GuzzleException - */ - public function service() - { - // Retrieve Service name from extension. - $service = Extension::where( - 'name', - 'like', - request('extension') - )->first()->service; - - $output = Command::runSudo('systemctl @{:action} @{:service}', [ - 'action' => request('action'), - 'service' => $service, - ]); - - return [ - 'result' => 200, - 'data' => $output, - ]; - } - - /** - * Enable extension on server - * - * @return JsonResponse|Response - */ - public function enableExtension() - { - if ( - ! auth()->user()->id == server()->user_id && - ! auth() - ->user() - ->isAdmin() - ) { - return respond( - 'Bu islemi yalnizca sunucu sahibi ya da bir yonetici yapabilir.' - ); - } - $extensions = json_decode((string) request('extensions')); - - foreach ($extensions as $extension) { - $data = [ - 'server_id' => server()->id, - 'extension_id' => $extension, - ]; - if ( - DB::table('server_extensions') - ->where($data) - ->doesntExist() - ) { - $data['id'] = Str::uuid(); - DB::table('server_extensions')->insert($data); - } - } - - return respond('Eklenti başarıyla eklendi.'); - } - - /** - * Update server object - * - * @return array|JsonResponse|Response - */ - public function update() - { - validate([ - 'name' => 'required', - 'control_port' => 'required|numeric|min:1|max:65537', - 'ip_address' => 'required|ip', - ]); - - if (! Permission::can(user()->id, 'liman', 'id', 'update_server')) { - return respond('Bu işlemi yapmak için yetkiniz yok!', 201); - } - - if (strlen((string) request('name')) > 24) { - return respond('Lütfen daha kısa bir sunucu adı girin.', 201); - } - - $params = [ - 'name' => request('name'), - 'control_port' => request('control_port'), - 'ip_address' => request('ip_address'), - ]; - - if (user()->isAdmin()) { - $params['shared_key'] = request('shared') == 'on' ? 1 : 0; - } - - $output = Server::where(['id' => server()->id])->update($params); - - return [ - 'result' => 200, - 'data' => $output, - ]; - } - - /** - * DEPRECATED - * - * @return void - */ - public function terminal() - { - } - - /** - * Upload file to server - * - * @return JsonResponse|Response - * @throws \Throwable - */ - public function upload() - { - // Store file in /tmp directory. - request() - ->file('file') - ->move( - '/tmp/', - request() - ->file('file') - ->getClientOriginalName() - ); - - // Send file to the server. - server()->putFile( - '/tmp/' . - request() - ->file('file') - ->getClientOriginalName(), - \request('path') - ); - - // Build query to check if file exists in server to validate. - $query = - '(ls @{:path} >> /dev/null 2>&1 && echo 1) || echo 0'; - - $flag = Command::runSudo($query, [ - 'path' => request('path'), - ], false); - - // Respond according to the flag. - if ($flag == '1') { - return respond('Dosya başarıyla yüklendi.'); - } - - return respond('Dosya yüklenemedi.', 201); - } - - /** - * Download file from servers tmp dir - * - * @return BinaryFileResponse - * @throws GuzzleException - * @throws GuzzleException - */ - public function download() - { - // Generate random file name - $file = Str::random(); - server()->getFile(request('path'), '/tmp/' . $file); - - // Extract file name from path. - $file_name = explode('/', (string) request('path')); - - // Send file to the user then delete it. - return response() - ->download('/tmp/' . $file, $file_name[count($file_name) - 1]) - ->deleteFileAfterSend(); - } - - /** - * Toggle favorite mode - * - * @return JsonResponse|Response - */ - public function favorite() - { - $current = DB::table('user_favorites') - ->where([ - 'user_id' => auth()->user()->id, - 'server_id' => server()->id, - ]) - ->first(); - - if ($current && request('action') != 'true') { - DB::table('user_favorites') - ->where([ - 'user_id' => auth()->user()->id, - 'server_id' => server()->id, - ]) - ->delete(); - } elseif (! $current) { - DB::table('user_favorites')->insert([ - 'server_id' => server()->id, - 'user_id' => auth()->user()->id, - ]); - } - - return respond('Düzenlendi.', 200); - } - - /** - * Get server stats - * - * @return array|int[] - * @throws GuzzleException - * @throws GuzzleException - */ - public function stats() - { - if (server()->isLinux()) { - $cpuPercent = server()->run( - "ps -eo %cpu --no-headers | grep -v 0.0 | awk '{s+=$1} END {print s/NR*10}'" - ); - $ramPercent = server()->run( - "free | grep Mem | awk '{print $3/$2 * 100.0}'" - ); - $ioPercent = (float) server()->run( - "iostat -d | tail -n +4 | head -n -1 | awk '{s+=$2} END {print s}'" - ); - $firstDown = $this->calculateNetworkBytes(); - $firstUp = $this->calculateNetworkBytes(false); - sleep(1); - $secondDown = $this->calculateNetworkBytes(); - $secondUp = $this->calculateNetworkBytes(false); - - return [ - 'cpu' => round((float) $cpuPercent, 2), - 'ram' => round((float) $ramPercent, 2), - 'io' => round((float) $ioPercent, 2), - 'network' => [ - 'download' => round(($secondDown - $firstDown) / 1024 / 2, 2), - 'upload' => round(($secondUp - $firstUp) / 1024 / 2, 2), - ] - ]; - } - - return [ - 'disk' => 0, - 'ram' => 0, - 'cpu' => 0, - 'time' => 0, - ]; - } - - /** - * Calculate network flow as bytes - * - * @param $download - * @return int - * @throws GuzzleException - */ - private function calculateNetworkBytes($download = true) - { - $text = $download ? 'rx_bytes' : 'tx_bytes'; - $count = 0; - $raw = Command::runSudo('cat /sys/class/net/*/statistics/:text:', [ - 'text' => $text, - ]); - foreach (explode("\n", trim((string) $raw)) as $data) { - $count += intval($data); - } - - return $count; - } - - /** - * Get top memory processes - * - * @return Application|Factory|View - * @throws GuzzleException - * @throws GuzzleException - */ - public function topMemoryProcesses() - { - $output = trim( - server()->run( - "ps -eo pid,%mem,user,cmd --sort=-%mem --no-headers | head -n 5 | awk '{print $1\"*-*\"$2\"*-*\"$3\"*-*\"$4}'" - ) - ); - - return view('table', [ - 'value' => $this->parsePsOutput($output), - 'title' => [__('Kullanıcı'), __('İşlem'), '%'], - 'display' => ['user', 'cmd', 'percent'], - ]); - } - - /** - * Parse ps-aux output - * - * @param $output - * @return array - */ - private function parsePsOutput($output) - { - $data = []; - foreach (explode("\n", (string) $output) as $row) { - $row = explode('*-*', $row); - $row[3] = str_replace('\\', '/', $row[3]); - $fetch = explode('/', $row[3]); - $data[] = [ - 'pid' => $row[0], - 'percent' => $row[1], - 'user' => $row[2], - 'cmd' => end($fetch), - ]; - } - - return $data; - } - - /** - * Top CPU using processes - * - * @return Application|Factory|View - * @throws GuzzleException - * @throws GuzzleException - */ - public function topCpuProcesses() - { - $output = trim( - server()->run( - "ps -eo pid,%cpu,user,cmd --sort=-%cpu --no-headers | head -n 5 | awk '{print $1\"*-*\"$2\"*-*\"$3\"*-*\"$4}'" - ) - ); - - return view('table', [ - 'value' => $this->parsePsOutput($output), - 'title' => [__('Kullanıcı'), __('İşlem'), '%'], - 'display' => ['user', 'cmd', 'percent'], - ]); - } - - /** - * Top disk usage - * - * @return Application|Factory|View - * @throws GuzzleException - * @throws GuzzleException - */ - public function topDiskUsage() - { - $output = trim( - server()->run( - "df --output=pcent,source,size,used -hl -x squashfs -x tmpfs -x devtmpfs | sed -n '1!p' | head -n 5 | sort -hr | awk '{print $1\"*-*\"$2\"*-*\"$3\"*-*\"$4}'" - ) - ); - - return view('table', [ - 'value' => $this->parseDfOutput($output), - 'title' => [__('Disk'), __('Boyut'), __('Dolu'), '%'], - 'display' => ['source', 'size', 'used', 'percent'], - ]); - } - - /** - * Parse df-h output - * - * @param $output - * @return array - */ - private function parseDfOutput($output) - { - $data = []; - foreach (explode("\n", (string) $output) as $row) { - $row = explode('*-*', $row); - $row[1] = str_replace('\\', '/', $row[1]); - $fetch = explode('/', $row[1]); - $data[] = [ - 'percent' => $row[0], - 'source' => end($fetch), - 'size' => $row[2], - 'used' => $row[3], - ]; - } - - return $data; - } - - /** - * Get local users on system - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function getLocalUsers() - { - if (server()->isLinux()) { - $output = server()->run( - "cut -d: -f1,3 /etc/passwd | egrep ':[0-9]{4}$' | cut -d: -f1" - ); - $output = trim($output); - if (empty($output)) { - $users = []; - } else { - $output = explode("\n", $output); - foreach ($output as $user) { - $users[] = [ - 'user' => $user, - ]; - } - } - } - - if (server()->isWindows() && server()->canRunCommand()) { - $output = server()->run( - 'Get-LocalUser | Where { $_.Enabled -eq $True} | Select-Object Name' - ); - $output = trim($output); - if (empty($output)) { - $users = []; - } else { - $output = explode("\r\n", $output); - foreach ($output as $key => $user) { - if ($key == 0 || $key == 1) { - continue; - } - $users[] = [ - 'user' => $user, - ]; - } - } - } - - return magicView('table', [ - 'value' => $users, - 'title' => ['Kullanıcı Adı'], - 'display' => ['user'], - ]); - } - - /** - * Create local user on server - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function addLocalUser() - { - $user_name = request('user_name'); - $user_password = request('user_password'); - $user_password_confirmation = request('user_password_confirmation'); - if ($user_password !== $user_password_confirmation) { - return respond('Şifreler uyuşmuyor!', 201); - } - $output = Command::runSudo('useradd --no-user-group -p $(openssl passwd -1 {:user_password}) {:user_name} -s "/bin/bash" &> /dev/null && echo 1 || echo 0', [ - 'user_password' => $user_password, - 'user_name' => $user_name, - ]); - if ($output == '0') { - return respond('Kullanıcı eklenemedi!', 201); - } - - return respond('Kullanıcı başarıyla eklendi!', 200); - } - - /** - * Get local groups - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function getLocalGroups() - { - if (server()->isLinux()) { - $output = server()->run("getent group | cut -d ':' -f1"); - $output = trim($output); - if (empty($output)) { - $groups = []; - } else { - $output = explode("\n", $output); - foreach ($output as $group) { - $groups[] = [ - 'group' => $group, - ]; - } - $groups = array_reverse($groups); - } - - return magicView('table', [ - 'value' => $groups, - 'title' => ['Grup Adı'], - 'display' => ['group'], - 'onclick' => 'localGroupDetails', - ]); - } - - if (server()->isWindows() && server()->canRunCommand()) { - $output = server()->run( - 'Get-LocalGroup | Select-Object Name' - ); - $output = trim($output); - if (empty($output)) { - $groups = []; - } else { - $output = explode("\r\n", $output); - foreach ($output as $key => $group) { - if ($key == 0 || $key == 1) { - continue; - } - $groups[] = [ - 'group' => $group, - ]; - } - } - - return magicView('table', [ - 'value' => $groups, - 'title' => ['Grup Adı'], - 'display' => ['group'], - ]); - } - } - - /** - * Get local group details - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function getLocalGroupDetails() - { - $group = request('group'); - $output = Command::runSudo("getent group @{:group} | cut -d ':' -f4", [ - 'group' => $group, - ]); - - $users = []; - if (! empty($output)) { - $users = array_map(function ($value) { - return ['name' => $value]; - }, explode(',', (string) $output)); - } - - return magicView('table', [ - 'value' => $users, - 'title' => ['Kullanıcı Adı'], - 'display' => ['name'], - ]); - } - - /** - * Create local group on server - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function addLocalGroup() - { - $group_name = request('group_name'); - $output = Command::runSudo('groupadd @{:group_name} &> /dev/null && echo 1 || echo 0', [ - 'group_name' => $group_name, - ]); - if ($output == '0') { - return respond('Grup eklenemedi!', 201); - } - - return respond('Grup başarıyla eklendi!', 200); - } - - /** - * Add user to group - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function addLocalGroupUser() - { - $group = request('group'); - $user = request('user'); - $output = Command::runSudo('usermod -a -G @{:group} @{:user} &> /dev/null && echo 1 || echo 0', [ - 'group' => $group, - 'user' => $user, - ]); - if ($output != '1') { - return respond('Kullanıcı gruba eklenemedi!', 201); - } - - return respond('Kullanıcı gruba başarıyla eklendi!'); - } - - /** - * Get sudoers list - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function getSudoers() - { - $output = trim( - server()->run( - sudo() . - "cat /etc/sudoers /etc/sudoers.d/* | grep -v '^#\|^Defaults' | sed '/^$/d' | awk '{ print $1 \"*-*\" $2 \" \" $3 }'" - ) - ); - - $sudoers = []; - if (! empty($output)) { - $sudoers = array_map(function ($value) { - $fetch = explode('*-*', $value); - - return ['name' => $fetch[0], 'access' => $fetch[1]]; - }, explode("\n", $output)); - } - - return magicView('table', [ - 'value' => $sudoers, - 'title' => ['İsim', 'Yetki'], - 'display' => ['name', 'access'], - 'menu' => [ - 'Sil' => [ - 'target' => 'deleteSudoers', - 'icon' => 'fa-trash', - ], - ], - ]); - } - - /** - * Create sudoer on server - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function addSudoers() - { - $name = request('name'); - $name = str_replace(' ', '\\x20', (string) $name); - $checkFile = Command::runSudo("[ -f '/etc/sudoers.d/{:name}' ] && echo 1 || echo 0", [ - 'name' => $name, - ]); - if ($checkFile == '1') { - return respond('Bu isimde bir kullanıcı zaten ekli!', 201); - } - $output = Command::runSudo( - 'echo "{:name} ALL=(ALL:ALL) ALL" | sudo -p "liman-pass-sudo" tee /etc/sudoers.d/{:name} &> /dev/null && echo 1 || echo 0', - [ - 'name' => $name, - ] - ); - if ($output == '0') { - return respond('Tam yetkili kullanıcı eklenemedi!', 201); - } - - return respond('Tam yetkili kullanıcı başarıyla eklendi!', 200); - } - - /** - * Delete sudoer - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function deleteSudoers() - { - $name = request('name'); - $name = str_replace(' ', '\\x20', (string) $name); - $output = Command::runSudo( - 'bash -c "if [ -f \"/etc/sudoers.d/{:name}\" ]; then rm /etc/sudoers.d/{:name} && echo 1 || echo 0; else echo 0; fi"', - [ - 'name' => $name, - ] - ); - if ($output == '0') { - return respond('Tam yetkili kullanıcı silinemedi!', 201); - } - - return respond('Tam yetkili kullanıcı başarıyla silindi!', 200); - } - - /** - * Retrieve service list that exist on server - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function serviceList() - { - if (! Permission::can(user()->id, 'liman', 'id', 'server_services')) { - return respond('Bu işlemi yapmak için yetkiniz yok!', 201); - } - $services = []; - if (server()->isLinux()) { - $raw = server()->run( - "systemctl list-units --all | grep service | awk '{print $1 \":\"$2\" \"$3\" \"$4\":\"$5\" \"$6\" \"$7\" \"$8\" \"$9\" \"$10}'", - false - ); - foreach (explode("\n", $raw) as &$package) { - if ($package == '') { - continue; - } - if (str_contains($package, '●')) { - $package = explode('●:', $package)[1]; - } - $row = explode(':', trim($package)); - try { - array_push($services, [ - 'name' => strlen($row[0]) > 50 ? substr($row[0], 0, 50) . '...' : $row[0], - 'description' => strlen($row[2]) > 60 ? substr($row[2], 0, 60) . '...' : $row[2], - 'status' => $row[1], - ]); - } catch (Exception) { - } - } - } else { - $rawServices = server()->run( - "(Get-WmiObject win32_service | select Name, DisplayName, State, StartMode) -replace '\s\s+',':'" - ); - $services = []; - foreach (explode('}', $rawServices) as $service) { - $row = explode(';', substr($service, 2)); - if ($row[0] == '') { - continue; - } - try { - array_push($services, [ - 'name' => trim(explode('=', $row[0])[1]), - 'description' => trim(explode('=', $row[1])[1]), - 'status' => trim(explode('=', $row[2])[1]), - ]); - } catch (Exception) { - } - } - } - - return magicView('table', [ - 'id' => 'servicesTable', - 'value' => $services, - 'title' => ['Servis Adı', 'Açıklama', 'Durumu'], - 'display' => ['name', 'description', 'status'], - 'menu' => [ - 'Detaylar' => [ - 'target' => 'statusService', - 'icon' => 'fa-info-circle', - ], - 'Başlat' => [ - 'target' => 'startService', - 'icon' => 'fa-play', - ], - 'Durdur' => [ - 'target' => 'stopService', - 'icon' => 'fa-stop', - ], - 'Yeniden Başlat' => [ - 'target' => 'restartService', - 'icon' => 'fa-sync-alt', - ], - ], - ]); - } - - /** - * Returns server access logs - * - * You can use API calls on this endpoint - * Parameters - * - page Page number. - * - count How much records will be retrieved. - * - query Search query (OPTIONAL) - * - server_id Server Id - * - * @return JsonResponse|Response - */ - public function accessLogs() - { - if (! Permission::can(user()->id, 'liman', 'id', 'view_logs')) { - return respond( - 'Sunucu Günlük Kayıtlarını görüntülemek için yetkiniz yok', - 201 - ); - } - - $page = request('page') * 10; - $query = request('query') ? request('query') : ''; - $count = intval( - Command::runLiman( - 'cat /liman/logs/liman_new.log | grep @{:user_id} | grep @{:server_id} | grep @{:query} | grep -v "recover middleware catch" | wc -l', - [ - 'query' => $query, - 'user_id' => strlen(request('log_user_id')) > 5 ? request('log_user_id') : '', - 'server_id' => request('server_id'), - ] - ) - ); - $head = $page > $count ? $count % 10 : 10; - $data = Command::runLiman( - 'cat /liman/logs/liman_new.log | grep @{:user_id} | grep @{:server_id} | grep @{:query} | grep -v "recover middleware catch" | tail -{:page} | head -{:head} | tac', - [ - 'query' => $query, - 'page' => $page, - 'head' => $head, - 'user_id' => strlen(request('log_user_id')) > 5 ? request('log_user_id') : '', - 'server_id' => request('server_id'), - ] - ); - $clean = []; - - $knownUsers = []; - $knownExtensions = []; - - if ($data == '') { - return response()->json([ - 'current_page' => request('page'), - 'count' => request('count'), - 'total_records' => $count, - 'records' => [], - ]); - } - - foreach (explode("\n", (string) $data) as $row) { - $row = json_decode($row); - - if (isset($row->request_details->extension_id)) { - if (! isset($knownExtensions[$row->request_details->extension_id])) { - - $extension = Extension::find($row->request_details->extension_id); - if ($extension) { - $knownExtensions[$row->request_details->extension_id] = - $extension->display_name; - } else { - $knownExtensions[$row->request_details->extension_id] = - $row->request_details->extension_id; - } - } - $row->extension_id = $knownExtensions[$row->request_details->extension_id]; - } else { - $row->extension_id = __('Komut'); - } - - if (! isset($knownUsers[$row->user_id])) { - $user = User::find($row->user_id); - if ($user) { - $knownUsers[$row->user_id] = $user->name; - } else { - $knownUsers[$row->user_id] = $row->user_id; - } - } - - $row->user_id = $knownUsers[$row->user_id]; - - if (isset($row->request_details->lmntargetFunction)) { - $row->view = $row->request_details->lmntargetFunction; - - if (isset($row->request_details->lmntargetFunction) && $row->request_details->lmntargetFunction == '') { - if ($row->lmn_level == 'high_level' && isset($row->request_details->title)) { - $row->view = base64_decode($row->request_details->title); - } - } - } else { - $row->view = __('Komut'); - } - - array_push($clean, $row); - } - - return response()->json([ - 'current_page' => request('page'), - 'count' => request('count'), - 'total_records' => $count, - 'records' => $clean, - ]); - } - - /** - * Retrieves access logs to frontend - * - * @return JsonResponse|Response - */ - public function getLogs() - { - if (! Permission::can(user()->id, 'liman', 'id', 'view_logs')) { - return respond( - 'Sunucu Günlük Kayıtlarını görüntülemek için yetkiniz yok', - 403 - ); - } - - $page = request('page') * 10; - $query = request('query') ? request('query') : ''; - $server_id = request('server_id'); - $count = intval( - Command::runLiman( - 'cat /liman/logs/liman_new.log | grep @{:user_id} | grep @{:extension_id} | grep -i @{:query} | grep -v "recover middleware catch" | grep @{:server_id} | wc -l', - [ - 'query' => $query, - 'server_id' => $server_id, - 'user_id' => strlen(request('log_user_id')) > 5 ? request('log_user_id') : '', - 'extension_id' => strlen(request('log_extension_id')) > 5 ? request('log_extension_id') : '', - ] - ) - ); - $head = $page > $count ? $count % 10 : 10; - $data = Command::runLiman( - 'cat /liman/logs/liman_new.log | grep @{:user_id} | grep @{:extension_id} | grep -i @{:query} | grep @{:server_id} | grep -v "recover middleware catch" | tail -{:page} | head -{:head} | tac', - [ - 'query' => $query, - 'server_id' => $server_id, - 'page' => $page, - 'head' => $head, - 'user_id' => strlen(request('log_user_id')) > 5 ? request('log_user_id') : '', - 'extension_id' => strlen(request('log_extension_id')) > 5 ? request('log_extension_id') : '', - ] - ); - $clean = []; - - $knownUsers = []; - $knownExtensions = []; - - if ($data == '') { - return respond([ - 'table' => __('Bu aramaya göre bir sonuç bulunamadı.'), - ]); - } - - foreach (explode("\n", (string) $data) as $row) { - $row = json_decode($row); - $row->ts = Carbon::parse($row->ts)->isoFormat('LLL'); - - if (isset($row->request_details->extension_id)) { - if (! isset($knownExtensions[$row->request_details->extension_id])) { - - $extension = Extension::find($row->request_details->extension_id); - if ($extension) { - $knownExtensions[$row->request_details->extension_id] = - $extension->display_name; - } else { - $knownExtensions[$row->request_details->extension_id] = - $row->request_details->extension_id; - } - } - $row->extension_id = $knownExtensions[$row->request_details->extension_id]; - } else { - $row->extension_id = __('Komut'); - } - - if (! isset($knownUsers[$row->user_id])) { - $user = User::find($row->user_id); - if ($user) { - $knownUsers[$row->user_id] = $user->name; - } else { - $knownUsers[$row->user_id] = $row->user_id; - } - } - - $row->user_id = $knownUsers[$row->user_id]; - - if (isset($row->request_details->lmntargetFunction)) { - $row->view = $row->request_details->lmntargetFunction; - - if (isset($row->request_details->lmntargetFunction) && $row->request_details->lmntargetFunction == '') { - if ($row->lmn_level == 'high_level' && isset($row->request_details->title)) { - $row->view = base64_decode($row->request_details->title); - } - } - } else { - $row->view = __('Komut'); - } - $row->request_details = null; - - array_push($clean, $row); - } - - $table = view('table', [ - 'value' => (array) $clean, - 'startingNumber' => (intval(request('page')) - 1) * 10, - 'title' => [ - 'Eklenti', - 'Fonksiyon', - 'Kullanıcı', - 'İşlem Tarihi', - '*hidden*', - ], - 'display' => [ - 'extension_id', - 'view', - 'user_id', - 'ts', - 'log_id:id', - ], - 'onclick' => 'getLogDetails', - ])->render(); - - $pagination = view('pagination', [ - 'current' => request('page') ? intval(request('page')) : 1, - 'count' => floor($count / 10) + 1, - 'total_count' => $count, - 'onclick' => 'getLogs', - ])->render(); - - return respond([ - 'table' => $table . $pagination, - ]); - } - - /** - * Shows log detail modal - * - * @return JsonResponse|Response - */ - public function getLogDetails() - { - $query = request('log_id'); - $data = Command::runLiman('grep @{:query} /liman/logs/liman_new.log', [ - 'query' => $query, - ]); - if ($data == '') { - return respond(__('Bu loga ait detay bulunamadı'), 201); - } - $data = explode("\n", (string) $data); - $logs = []; - foreach ($data as $k_ => $row) { - $row = mb_convert_encoding($row, 'UTF-8', 'auto'); - $row = json_decode($row); - foreach ($row as $k => &$v) { - if ($k == 'level' || $k == 'log_id') { - continue; - } - - if ($k == 'ts') { - $v = Carbon::parse($v)->isoFormat('LLLL'); - } - - if ($row->lmn_level == 'high_level' && $k == 'request_details') { - foreach ($row->request_details as $key => $val) { - if ($key == 'level' || $key == 'log_id' || $key == 'token') { - continue; - } - - if ($key == 'title' || $key == 'message') { - $val = base64_decode((string) $val); - } - - array_push($logs, [ - 'title' => __($key), - 'message' => $val, - ]); - } - - continue; - } - - if ($row->lmn_level != 'high_level' && $k == 'request_details' && $k != 'token') { - array_push($logs, [ - 'title' => __($k), - 'message' => json_encode($v, JSON_PRETTY_PRINT), - ]); - - continue; - } - - array_push($logs, [ - 'title' => __($k), - 'message' => $v, - ]); - } - if ($k_ < count($data) - 1) { - array_push($logs, [ - 'title' => '---------------------', - 'message' => 'Log seperator' - ]); - } - } - - return respond($logs); - } - - /** - * Install package to server - * - * @return string - * @throws GuzzleException - * @throws GuzzleException - */ - public function installPackage() - { - if (server()->isLinux()) { - $package = request('package_name'); - $pkgman = server()->run( - "which apt >/dev/null 2>&1 && echo apt || echo rpm" - ); - if ($pkgman == "apt") { - $raw = Command::runSudo( - 'nohup bash -c "DEBIAN_FRONTEND=noninteractive apt install @{:package} -qqy >"/tmp/{:packageBase}.txt" 2>&1 & disown && echo $!"', - [ - 'packageBase' => basename((string) $package), - 'package' => $package, - ] - ); - } else { - $raw = Command::runSudo( - 'nohup bash -c "yum install @{:package} -y >"/tmp/{:packageBase}.txt" 2>&1 & disown && echo $!"', - [ - 'packageBase' => basename((string) $package), - 'package' => $package, - ] - ); - } - - system_log(7, 'Paket Güncelleme', [ - 'package_name' => request('package_name'), - ]); - } else { - $raw = ''; - } - - return $raw; - } - - /** - * Check package install is going on - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function checkPackage() - { - $mode = request('mode') ? request('mode') : 'update'; - $pkgman = server()->run( - "which apt >/dev/null 2>&1 && echo apt || echo rpm" - ); - $output = trim( - server()->run( - "ps aux | grep \"apt \|dpkg \|rpm \|yum \" | grep -v grep 2>/dev/null 1>/dev/null && echo '1' || echo '0'" - ) - ); - $command_output = Command::runSudo('cat "/tmp/{:packageBase}.txt" | base64 ', [ - 'packageBase' => basename((string) request('package_name')), - ]); - $command_output = base64_decode((string) $command_output); - Command::runSudo('truncate -s 0 "/tmp/{:packageBase}.txt"', [ - 'packageBase' => basename((string) request('package_name')), - ]); - if ($output === '0') { - if ($pkgman == "apt") { - $list_method = $mode == 'install' ? '--installed' : '--upgradable'; - } else { - $list_method = $mode == 'install' ? 'installed' : 'upgrades'; - } - $package = request('package_name'); - if (endsWith($package, '.deb')) { - $package = Command::runSudo('dpkg -I @{:package} | grep Package: | cut -d\':\' -f2 | tr -d \'[:space:]\'', [ - 'package' => $package, - ]); - } - if (endsWith($package, '.rpm')) { - $package = Command::runSudo('rpm -qip @{:package} 2>/dev/null | grep "Name" | cut -d\':\' -f2 | tr -d \'[:space:]\'', [ - 'package' => $package, - ]); - } - if ($pkgman == "apt") { - $package = Command::runSudo( - 'apt list ' . - $list_method . - ' 2>/dev/null | grep ' . - '@{:package}' . - ' && echo 1 || echo 0', - [ - 'package' => $package, - ] - ); - } else { - $package = Command::runSudo( - 'yum list ' . - $list_method . - ' 2>/dev/null | grep ' . - '@{:package}' . - ' && echo 1 || echo 0', - [ - 'package' => $package, - ] - ); - } - - if ( - ($mode == 'update' && $output == '0') || - ($mode == 'install' && $output == '0') - ) { - system_log(7, 'Paket Güncelleme Başarılı', [ - 'package_name' => request('package_name'), - ]); - - return respond([ - 'status' => __(':package_name işlemi tamamlandı.', [ - 'package_name' => request('package_name'), - ]), - 'output' => trim($command_output), - ]); - } else { - system_log(7, 'Paket Güncelleme Başarısız', [ - 'package_name' => request('package_name'), - ]); - - return respond([ - 'status' => __(':package_name paketi kurulamadı.', [ - 'package_name' => request('package_name'), - ]), - 'output' => trim($command_output), - ]); - } - } else { - return respond( - [ - 'status' => __( - ':package_name paketinin kurulum işlemi henüz bitmedi.', - ['package_name' => request('package_name')] - ), - 'output' => trim($command_output), - ], - 400 - ); - } - - return $output; - } - - /** - * Upload deb/rpm file - * - * @return JsonResponse|Response - * @throws \Throwable - */ - public function uploadDebFile() - { - $allowed = ["deb", "rpm"]; - if (! in_array(pathinfo(request('filePath'), PATHINFO_EXTENSION), $allowed, true)) { - return respond('Gönderdiğiniz dosya türü desteklenmemektedir.', 403); - } - - if (server()->isLinux()) { - $filePath = request('filePath'); - if (! $filePath) { - return respond('Dosya yolu zorunludur.', 403); - } - server()->putFile($filePath, '/tmp/' . basename((string) $filePath)); - unlink($filePath); - - return respond('/tmp/' . basename((string) $filePath), 200); - } else { - return respond('Bu sunucuya deb paketi kuramazsınız.', 403); - } - } - - /** - * Retrieve server updates - * - * @return array|void - * @throws GuzzleException - * @throws GuzzleException - */ - public function updateList() - { - $pkgman = server()->run( - "which apt >/dev/null 2>&1 && echo apt || echo rpm" - ); - - if ($pkgman == "apt") { - $updates = []; - $raw = server()->run( - sudo() . - 'apt-get -qq update 2> /dev/null > /dev/null; ' . - sudo() . - "apt list --upgradable 2>/dev/null | sed '1,1d'" - ); - foreach (explode("\n", $raw) as $package) { - if ($package == '' || str_contains($package, 'List')) { - continue; - } - $row = explode(' ', $package, 4); - try { - array_push($updates, [ - 'name' => $row[0], - 'version' => $row[1], - 'type' => $row[2], - 'status' => $row[3], - ]); - } catch (\Exception) { - } - } - - return [ - 'count' => count($updates), - 'list' => $updates, - 'table' => view('table', [ - 'id' => 'updateListTable', - 'value' => $updates, - 'title' => ['Paket Adı', 'Versiyon', 'Tip', 'Durumu'], - 'display' => ['name', 'version', 'type', 'status'], - 'menu' => [ - 'Güncelle' => [ - 'target' => 'updateSinglePackage', - 'icon' => 'fa-sync', - ], - ], - ])->render(), - ]; - } - - if ($pkgman == "rpm") { - $updates = []; - $raw = server()->run( - sudo() . - "yum list upgrades --exclude=*.src 2>/dev/null | awk {'print $1 \" \" $2 \" \" $3'} | sed '1,3d'" - ); - foreach (explode("\n", $raw) as $package) { - if ($package == '' || str_contains($package, 'List')) { - continue; - } - $row = explode(' ', $package, 4); - try { - array_push($updates, [ - 'name' => $row[0], - 'version' => $row[1], - 'type' => $row[2], - ]); - } catch (\Exception) { - } - } - - return [ - 'count' => count($updates), - 'list' => $updates, - 'table' => view('table', [ - 'id' => 'updateListTable', - 'value' => $updates, - 'title' => ['Paket Adı', 'Versiyon', 'Repo'], - 'display' => ['name', 'version', 'type'], - 'menu' => [ - 'Güncelle' => [ - 'target' => 'updateSinglePackage', - 'icon' => 'fa-sync', - ], - ], - ])->render(), - ]; - } - } - - /** - * Retrieve installed package list - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function packageList() - { - $pkgman = server()->run( - "which apt >/dev/null 2>&1 && echo apt || echo rpm" - ); - - if ($pkgman == "apt") { - $raw = server()->run( - sudo() . "apt list --installed 2>/dev/null | sed '1,1d'", - false - ); - $packages = []; - foreach (explode("\n", $raw) as $package) { - if ($package == '') { - continue; - } - $row = explode(' ', $package); - try { - array_push($packages, [ - 'name' => $row[0], - 'version' => $row[1], - 'type' => $row[2], - 'status' => $row[3], - ]); - } catch (Exception) { - } - } - - return magicView('table', [ - 'value' => $packages, - 'title' => ['Paket Adı', 'Versiyon', 'Tip', 'Durumu'], - 'display' => ['name', 'version', 'type', 'status'], - ]); - } else { - $raw = server()->run( - sudo() . "yum list --installed 2>/dev/null | awk {'print $1 \" \" $2 \" \" $3'} | sed '1,1d'", - false - ); - $packages = []; - foreach (explode("\n", $raw) as $package) { - if ($package == '') { - continue; - } - $row = explode(' ', $package); - try { - array_push($packages, [ - 'name' => $row[0], - 'version' => $row[1], - 'type' => $row[2], - ]); - } catch (Exception) { - } - } - - return magicView('table', [ - 'value' => $packages, - 'title' => ['Paket Adı', 'Versiyon', 'Paket Lokasyonu'], - 'display' => ['name', 'version', 'type'], - ]); - } - } - - /** - * Unassign extension from server - * - * @return JsonResponse|Response - */ - public function removeExtension() - { - if ( - server()->user_id != auth()->user()->id && - ! auth() - ->user() - ->isAdmin() - ) { - return respond( - 'Yalnızca sunucu sahibi ya da yönetici bir eklentiyi silebilir.', - 201 - ); - } - - foreach (json_decode((string) request('extensions')) as $key => $value) { - DB::table('server_extensions') - ->where([ - 'server_id' => server()->id, - 'extension_id' => $value, - ]) - ->delete(); - } - - return respond('Eklentiler Başarıyla Silindi'); - } - - /** - * Start service - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function startService() - { - if (server()->isLinux()) { - $command = sudo() . 'systemctl start @{:name}'; - } else { - $command = 'Start-Service @{:name}'; - } - Command::run($command, [ - 'name' => request('name'), - ]); - - return respond('Servis Baslatildi', 200); - } - - /** - * Stop service - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function stopService() - { - if (server()->isLinux()) { - $command = sudo() . 'systemctl stop @{:name}'; - } else { - $command = 'Stop-Service @{:name}'; - } - Command::run($command, [ - 'name' => request('name'), - ]); - - return respond('Servis Durduruldu', 200); - } - - /** - * Restart service - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function restartService() - { - if (server()->isLinux()) { - $command = sudo() . 'systemctl restart @{:name}'; - } else { - $command = 'Restart-Service @{:name}'; - } - Command::run($command, [ - 'name' => request('name'), - ]); - - return respond('Servis Yeniden Başlatıldı', 200); - } - - /** - * Get status of service - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function statusService() - { - if (server()->isLinux()) { - $command = sudo() . 'systemctl status @{:name}'; - } else { - return respond( - 'Windows Sunucularda yalnızca servis durumu görüntülenmektedir.', - 201 - ); - } - $output = Command::run($command, [ - 'name' => request('name'), - ]); - - return respond($output, 200); - } - - /** - * Get open ports on server - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function getOpenPorts() - { - if (server()->os != 'linux') { - return respond('Bu sunucuda portları kontrol edemezsiniz!', 201); - } - - $output = trim( - server()->run( - sudo() . - "lsof -i -P -n | grep -v '\-'| awk -F' ' '{print $1,$3,$5,$8,$9}' | sed 1,1d" - ) - ); - - if (empty($output)) { - return respond( - view( - 'alert', - [ - 'type' => 'info', - 'title' => 'Bilgilendirme', - 'message' => 'Açık portları görüntüleyebilmek için sunucunuza lsof paketini kurmanız gerekmektedir.', - ] - )->render() . - "', - 201 - ); - } - - $arr = []; - foreach (explode("\n", $output) as $line) { - $row = explode(' ', $line); - array_push($arr, [ - 'name' => $row[0], - 'username' => $row[1], - 'ip_type' => $row[2], - 'packet_type' => $row[3], - 'port' => $row[4], - ]); - } - - return respond( - view('table', [ - 'id' => 'openPortsTable', - 'value' => $arr, - 'title' => [ - 'Program Adı', - 'Kullanıcı', - 'İp Türü', - 'Paket Türü', - 'Port', - ], - 'display' => [ - 'name', - 'username', - 'ip_type', - 'packet_type', - 'port', - ], - ])->render() - ); - } -} diff --git a/app/Http/Controllers/Server/_routes.php b/app/Http/Controllers/Server/_routes.php deleted file mode 100644 index a60c9c8ff..000000000 --- a/app/Http/Controllers/Server/_routes.php +++ /dev/null @@ -1,233 +0,0 @@ -name('servers'); - -//Server IP Route -Route::get('/sunucuDetayi/{server_id}', 'Server\MainController@oneData')->name('server_get_ip'); - -// Add Server Route - -Route::post('/sunucu/ekle', 'Server\AddController@main') - ->name('server_add') - ->middleware('parameters:name,ip_address,control_port'); - -// Server Update Route - -Route::post('/sunucu/guncelle', 'Server\OneController@update') - ->name('server_update') - ->middleware('parameters:server_id,name,control_port'); - -Route::post('/sunucu/erisimKontrolu', 'Server\MainController@checkAccess') - ->name('server_check_access') - ->middleware('parameters:hostname,port'); - -Route::post('/sunucu/isimKontrol', 'Server\MainController@verifyName') - ->name('server_verify_name') - ->middleware('parameters:server_name'); - -Route::post('/sunucu/anahtarKontrol', 'Server\MainController@verifyKey')->name( - 'server_verify_key' -); - -// Remove Server Route - -Route::post('/sunucu/sil', 'Server\OneController@remove') - ->name('server_remove') - ->middleware('parameters:server_id'); - -// Remove Server Permission - -Route::post('/sunucu/yetkial', 'Server\OneController@revoke') - ->name('server_revoke_permission') - ->middleware('parameters:user_id,server_id'); - -Route::group(['middleware' => ['server']], function () { - // Single Server Details Route - - Route::get('/sunucular/{server_id}', 'Server\OneController@one')->name( - 'server_one' - ); - - // Server' Service Status Route - Route::post('/sunucu/kontrol', 'Server\OneController@serviceCheck')->name( - 'server_check' - ); - - // Server Hostname Update - - Route::post('/sunucu/hostname', 'Server\OneController@hostname') - ->name('server_hostname') - ->middleware('parameters:hostname'); - - // Server Service Run,Stop,Enable,Disable Route - - Route::post('/sunucu/servis', 'Server\OneController@service') - ->name('server_service') - ->middleware('parameters:extension_id,action'); - - // Server Extension Installation Route - - Route::post( - '/sunucu/eklenti', - 'Server\OneController@enableExtension' - )->name('server_extension'); - - // Server File Upload Route - - Route::post('/sunucu/yukle', 'Server\OneController@upload') - ->name('server_upload') - ->middleware('parameters:file,path'); - - // Server Download File Route - - Route::get('/sunucu/indir', 'Server\OneController@download') - ->name('server_download') - ->middleware('parameters:path'); - - // Server Permission Grant Route - - //Route::post('/sunucu/yetkilendir', 'Server\OneController@grant')->name('server_grant_permission')->middleware('parameters:server_id,email'); - - Route::post('/sunucu/favori', 'Server\OneController@favorite') - ->name('server_favorite') - ->middleware('parameters:server_id,action'); - - Route::post('/sunucu/durum', 'Server\OneController@stats')->name( - 'server_stats' - ); - - Route::post( - '/sunucu/bellek_durum', - 'Server\OneController@topMemoryProcesses' - )->name('top_memory_processes'); - - Route::post( - '/sunucu/islemci_durum', - 'Server\OneController@topCpuProcesses' - )->name('top_cpu_processes'); - - Route::post( - '/sunucu/disk_durum', - 'Server\OneController@topDiskUsage' - )->name('top_disk_usage'); - - Route::post('/sunucu/servis/', 'Server\OneController@serviceList')->name( - 'server_service_list' - ); - - Route::post( - '/sunucu/yetkili_kullanicilar/', - 'Server\OneController@getSudoers' - )->name('server_sudoers_list'); - - Route::post( - '/sunucu/yetkili_kullanicilar/ekle', - 'Server\OneController@addSudoers' - )->name('server_add_sudoers'); - - Route::post( - '/sunucu/yetkili_kullanicilar/sil', - 'Server\OneController@deleteSudoers' - )->name('server_delete_sudoers'); - - Route::post( - '/sunucu/yerel_kullanicilar/', - 'Server\OneController@getLocalUsers' - )->name('server_local_user_list'); - - Route::post( - '/sunucu/yerel_kullanicilar/ekle', - 'Server\OneController@addLocalUser' - )->name('server_add_local_user'); - - Route::post( - '/sunucu/yerel_gruplar/', - 'Server\OneController@getLocalGroups' - )->name('server_local_group_list'); - - Route::post( - '/sunucu/yerel_gruplar/ekle', - 'Server\OneController@addLocalGroup' - )->name('server_add_local_group'); - - Route::post( - '/sunucu/yerel_gruplar/kullanicilar', - 'Server\OneController@getLocalGroupDetails' - )->name('server_local_group_users_list'); - - Route::post( - '/sunucu/yerel_gruplar/kullanicilar/ekle', - 'Server\OneController@addLocalGroupUser' - )->name('server_add_local_group_user'); - - Route::post( - '/sunucu/guncellemeler/', - 'Server\OneController@updateList' - )->name('server_update_list'); - - Route::post( - '/sunucu/guncellemeler/paket_yukle', - 'Server\OneController@installPackage' - )->name('server_install_package'); - - Route::post( - '/sunucu/guncellemeler/paket_kontrol', - 'Server\OneController@checkPackage' - )->name('server_check_package'); - - Route::post( - '/sunucu/guncellemeler/deb_yukle', - 'Server\OneController@uploadDebFile' - )->name('server_upload_deb'); - - Route::post( - '/sunucu/gunluk_kayitlari', - 'Server\OneController@getLogs' - )->name('server_get_logs'); - - Route::post( - '/sunucu/accessLogs', - 'Server\OneController@accessLogs' - )->name('server_access_logs'); - - Route::post( - '/sunucu/gunluk_kayitlari_detay', - 'Server\OneController@getLogDetails' - )->name('server_get_log_details'); - - Route::post('/sunucu/paketler', 'Server\OneController@packageList')->name( - 'server_package_list' - ); - - Route::post( - '/sunucu/eklentiSil', - 'Server\OneController@removeExtension' - )->name('server_extension_remove'); - - Route::post( - '/sunucu/servis/baslat', - 'Server\OneController@startService' - )->name('server_start_service'); - - Route::post( - '/sunucu/servis/durdur', - 'Server\OneController@stopService' - )->name('server_stop_service'); - - Route::post( - '/sunucu/servis/yenidenBaslat', - 'Server\OneController@restartService' - )->name('server_restart_service'); - - Route::post( - '/sunucu/servis/durum', - 'Server\OneController@statusService' - )->name('server_service_status'); - - Route::post( - '/sunucu/acikPortlar', - 'Server\OneController@getOpenPorts' - )->name('server_get_open_ports'); -}); diff --git a/app/Http/Controllers/Settings/MainController.php b/app/Http/Controllers/Settings/MainController.php deleted file mode 100755 index 107b16288..000000000 --- a/app/Http/Controllers/Settings/MainController.php +++ /dev/null @@ -1,930 +0,0 @@ -middleware('admin'); - } - - /** - * Return setting index view - * - * @return Application|Factory|View - */ - public function index() - { - $updateAvailable = is_file(storage_path('extension_updates')); - - $extensions = Extension::get()->map(function ($extension) { - if ($extension->license_type != 'golang_standard') { - $extension->valid = "-"; - $extension->expires = "-"; - return $extension; - } - - $server = $extension->servers()->first(); - if (! $server) { - return $extension; - } - - $output = callExtensionFunction( - $extension, - $server, - [ - 'endpoint' => 'license', - 'type' => 'get', - ] - ); - - $license = new GolangLicense($output); - $extension->valid = $license->getOwner() !== '' ? ($license->getValid() ? "Geçerli" : "Geçersiz") : "Girilmemiş"; - $extension->expires = $license->getOwner() !== '' ? $license->getFormattedTimestamp() : "-"; - - return $extension; - }); - - return view('settings.index', [ - 'users' => User::all(), - 'updateAvailable' => $updateAvailable, - 'extensions' => $extensions, - ]); - } - - /** - * Get Liman tweaks data - * - * @return JsonResponse|Response - */ - public function getLimanTweaks() - { - return respond([ - 'APP_DEBUG' => env('APP_DEBUG') ? 'true' : 'false', - 'BRAND_NAME' => env('BRAND_NAME'), - 'APP_NOTIFICATION_EMAIL' => env('APP_NOTIFICATION_EMAIL'), - 'NEW_LOG_LEVEL' => env('NEW_LOG_LEVEL'), - 'APP_URL' => env('APP_URL'), - 'MAIL_ENABLED' => env('MAIL_ENABLED') ? 'true' : 'false', - 'MAIL_HOST' => env('MAIL_HOST'), - 'MAIL_PORT' => env('MAIL_PORT'), - 'MAIL_USERNAME' => env('MAIL_USERNAME'), - 'MAIL_ENCRYPTION' => env('MAIL_ENCRYPTION'), - 'EXTENSION_DEVELOPER_MODE' => env('EXTENSION_DEVELOPER_MODE') ? 'true' : 'false', - 'APP_LANG' => env('APP_LANG', 'tr'), - 'OTP_ENABLED' => env('OTP_ENABLED', false) ? 'true' : 'false', - 'LDAP_IGNORE_CERT' => env('LDAP_IGNORE_CERT') ? 'true' : 'false', - 'EXTENSION_TIMEOUT' => env('EXTENSION_TIMEOUT', 30), - 'KEYCLOAK_ACTIVE' => env('KEYCLOAK_ACTIVE') ? 'true' : 'false', - 'KEYCLOAK_CLIENT_ID' => env('KEYCLOAK_CLIENT_ID'), - 'KEYCLOAK_REDIRECT_URI' => env('KEYCLOAK_REDIRECT_URI'), - 'KEYCLOAK_BASE_URL' => env('KEYCLOAK_BASE_URL'), - 'KEYCLOAK_REALM' => env('KEYCLOAK_REALM'), - ]); - } - - /** - * Set liman tweaks - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function setLimanTweaks() - { - validate([ - 'EXTENSION_TIMEOUT' => 'required|numeric|min:30', - 'BRAND_NAME' => 'max:60', - 'APP_NOTIFICATION_EMAIL' => 'email|max:120' - ]); - - auth()->user()->update([ - "locale" => request('APP_LANG') - ]); - \Session::put('locale', request('APP_LANG')); - - $flag = setEnv([ - 'APP_DEBUG' => request('APP_DEBUG'), - 'BRAND_NAME' => '"' . request('BRAND_NAME') . '"', - 'APP_NOTIFICATION_EMAIL' => request('APP_NOTIFICATION_EMAIL'), - 'NEW_LOG_LEVEL' => request('NEW_LOG_LEVEL'), - 'APP_URL' => request('APP_URL'), - 'MAIL_ENABLED' => request('MAIL_ENABLED'), - 'MAIL_HOST' => request('MAIL_HOST'), - 'MAIL_PORT' => request('MAIL_PORT'), - 'MAIL_USERNAME' => request('MAIL_USERNAME'), - 'MAIL_ENCRYPTION' => request('MAIL_ENCRYPTION'), - 'EXTENSION_DEVELOPER_MODE' => request('EXTENSION_DEVELOPER_MODE'), - 'APP_LANG' => request('APP_LANG'), - 'OTP_ENABLED' => request('OTP_ENABLED'), - 'LDAP_IGNORE_CERT' => request('LDAP_IGNORE_CERT'), - 'EXTENSION_TIMEOUT' => request('EXTENSION_TIMEOUT'), - 'KEYCLOAK_ACTIVE' => request('KEYCLOAK_ACTIVE'), - 'KEYCLOAK_CLIENT_ID' => request('KEYCLOAK_CLIENT_ID'), - 'KEYCLOAK_REDIRECT_URI' => request('KEYCLOAK_REDIRECT_URI'), - 'KEYCLOAK_BASE_URL' => request('KEYCLOAK_BASE_URL'), - 'KEYCLOAK_REALM' => request('KEYCLOAK_REALM'), - ]); - - if (request()->has('MAIL_PASSWORD')) { - $flag = setEnv([ - 'MAIL_PASSWORD' => request('MAIL_PASSWORD'), - ]); - } - - if (request()->has('KEYCLOAK_CLIENT_SECRET')) { - $flag = setEnv([ - 'KEYCLOAK_CLIENT_SECRET' => request('KEYCLOAK_CLIENT_SECRET'), - ]); - } - - if ($flag) { - Command::runSystem('systemctl restart liman-render'); - - return respond('Ayarlar başarıyla kaydedildi!'); - } else { - return respond('Ayarlar kaydedilemedi!', 201); - } - } - - /** - * Test mail settings - * - * @return JsonResponse|Response - */ - public function testMailSettings() - { - $flag = setEnv([ - 'MAIL_ENABLED' => request('MAIL_ENABLED'), - 'MAIL_HOST' => request('MAIL_HOST'), - 'MAIL_PORT' => request('MAIL_PORT'), - 'MAIL_USERNAME' => request('MAIL_USERNAME'), - 'MAIL_ENCRYPTION' => request('MAIL_ENCRYPTION'), - ]); - - if (request()->has('MAIL_PASSWORD')) { - $flag = setEnv([ - 'MAIL_PASSWORD' => request('MAIL_PASSWORD'), - ]); - } - - if (! $flag) { - return respond('Mail ayarları kaydedilemedi!', 201); - } - - try { - Mail::to(request('MAIL_USERNAME'))->send( - new \App\Mail\TestMail('Test Mail', __('Liman MYS test mail gönderimi.')) - ); - } catch (\Throwable) { - return respond('Mail gönderimi başarısız oldu!', 201); - } - - return respond('Mail ayarları geçerlidir.'); - } - - /** - * Retrieve system settings - * - * @param User $user - * @return Application|Factory|View - */ - public function one(User $user) - { - return view('settings.one', [ - 'user' => $user, - 'servers' => Server::find( - $user->permissions - ->where('type', 'server') - ->pluck('value') - ->toArray() - ), - 'extensions' => Extension::find( - $user->permissions - ->where('type', 'extension') - ->pluck('value') - ->toArray() - ), - ]); - } - - /** - * Get user list - * - * @return Application|Factory|View - */ - public function getUserList() - { - return view('table', [ - 'value' => \App\User::all(), - 'title' => ['İsim Soyisim', 'Kullanıcı Adı', 'Email', '*hidden*'], - 'display' => ['name', 'username', 'email', 'id:user_id'], - 'menu' => [ - 'Parolayı Sıfırla' => [ - 'target' => 'passwordReset', - 'icon' => 'fa-lock', - ], - 'Sil' => [ - 'target' => 'delete', - 'icon' => ' context-menu-icon-delete', - ], - ], - 'onclick' => 'userDetails', - ]); - } - - /** - * Get simple user list - * - * @return Application|Factory|View - */ - public function getSimpleUserList() - { - return view('table', [ - 'value' => \App\User::all(), - 'title' => ['İsim Soyisim', 'Kullanıcı Adı', 'Email', '*hidden*'], - 'display' => ['name', 'username', 'email', 'id:user_id'], - 'onclick' => 'userDetails', - ]); - } - - /** - * Permission list - * - * @return Application|Factory|View - */ - public function getList() - { - $user = User::find(request('user_id')); - $data = []; - $title = []; - $display = []; - switch (request('type')) { - case 'server': - $data = Server::whereNotIn( - 'id', - $user->permissions - ->where('type', 'server') - ->pluck('value') - ->toArray() - )->get(); - $title = ['*hidden*', 'İsim', 'Türü', 'İp Adresi']; - $display = ['id:id', 'name', 'type', 'ip_address']; - break; - case 'extension': - $data = Extension::whereNotIn( - 'id', - $user->permissions - ->where('type', 'extension') - ->pluck('value') - ->toArray() - )->get(); - $title = ['*hidden*', 'İsim']; - $display = ['id:id', 'display_name']; - break; - case 'role': - $data = Role::whereNotIn( - 'id', - $user->roles->pluck('id')->toArray() - )->get(); - $title = ['*hidden*', 'İsim']; - $display = ['id:id', 'name']; - break; - case 'liman': - $usedPermissions = Permission::where([ - 'type' => 'liman', - 'morph_id' => request('user_id'), - ]) - ->get() - ->groupBy('value'); - - $data = [ - [ - 'id' => 'view_logs', - 'name' => __('Sunucu Günlük Kayıtlarını Görüntüleme'), - ], - [ - 'id' => 'add_server', - 'name' => __('Sunucu Ekleme'), - ], - [ - 'id' => 'server_services', - 'name' => __('Sunucu Servislerini Görüntüleme'), - ], - [ - 'id' => 'server_details', - 'name' => __('Sunucu Detaylarını Görüntüleme'), - ], - [ - 'id' => 'update_server', - 'name' => __('Sunucu Detaylarını Güncelleme'), - ], - ]; - - foreach ($usedPermissions as $permission => $values) { - foreach ($data as $k => $v) { - if ($v['id'] == $permission) { - unset($data[$k]); - } - } - } - - $title = ['*hidden*', 'İsim']; - $display = ['id:id', 'name']; - break; - default: - abort(504, 'Tip Bulunamadı'); - } - - return view('table', [ - 'value' => (object) $data, - 'title' => $title, - 'display' => $display, - ]); - } - - /** - * Retrieve all roles - * - * @return Application|Factory|View - */ - public function allRoles() - { - $data = []; - - $permissionData = - Permission::with('morph') - ->get()->each(function ($row) { - $row->details = $row->getRelatedObject(); - if ($row->morph_type == 'roles') { - $row->users = $row->morph->users()->get(); - } - }); - - foreach ($permissionData as $row) { - if ($row->details['value'] == '-' || $row->details['type'] == '-') { - continue; - } - - $insert = [ - 'id' => $row->morph->id, - 'morph_type' => $row->morph_type, - 'perm_type' => $row->details['type'], - 'perm_value' => $row->details['value'], - ]; - - if ($row->morph_type == 'users') { - $data[] = array_merge($insert, [ - 'username' => $row->morph->name, - 'role_name' => __('Rol yok'), - ]); - } elseif ($row->morph_type == 'roles') { - foreach ($row->users as $user) { - $data[] = array_merge($insert, [ - 'username' => $user->name, - 'role_name' => $row->morph->name, - ]); - } - } - } - - return view('table', [ - 'value' => $data, - 'title' => ['*hidden*', '*hidden*', 'Kullanıcı Adı', 'Rol Adı', 'İzin Tipi', 'İzin Değeri'], - 'display' => ['id:id', 'morph_type:morph_type', 'username', 'role_name', 'perm_type', 'perm_value'], - 'onclick' => 'goToRoleItem', - ]); - } - - /** - * Permission grant view - * - * @return JsonResponse|Response - */ - public function addList() - { - $arr = []; - foreach (json_decode((string) request('ids'), true) as $id) { - array_push($arr, $id); - Permission::grant(request('user_id'), request('type'), 'id', $id); - } - $arr['type'] = request('type'); - $arr['target_user_id'] = request('user_id'); - system_log(7, 'PERMISSION_GRANT', $arr); - - return respond(__('Başarılı'), 200); - } - - /** - * Revoke permission - * - * @return JsonResponse|Response - */ - public function removeFromList() - { - $arr = []; - $flag = false; - $ids = json_decode((string) request('ids'), true); - - if ($ids == []) { - return respond('Lütfen bir seçim yapın', 201); - } - - foreach ($ids as $id) { - $flag = Permission::revoke( - request('user_id'), - request('type'), - 'id', - $id - ); - } - array_push($arr, $id); - $arr['type'] = request('type'); - $arr['target_user_id'] = request('user_id'); - system_log(7, 'PERMISSION_REVOKE', $arr); - if ($flag) { - return respond(__('Başarılı'), 200); - } else { - return respond(__('Yetki(ler) silinemedi'), 201); - } - } - - /** - * Add variable - * - * @return JsonResponse|Response - */ - public function addVariable() - { - if (Permission::grant( - request('object_id'), - 'variable', - request('key'), - request('value'), - null, - request('object_type') - )) { - return respond('Veri başarıyla eklendi!'); - } else { - return respond('Veri eklenemedi!', 201); - } - } - - /** - * Remove variable - * - * @return JsonResponse|Response - */ - public function removeVariable() - { - $flag = false; - if (request('variables') == "") { - return respond('Veri(ler) silinemedi!', 201); - } - - foreach (explode(',', (string) request('variables')) as $id) { - $flag = Permission::find($id)->delete(); - } - - if ($flag) { - return respond('Veri(ler) başarıyla silindi!'); - } - - return respond('Veri(ler) silinemedi!', 201); - } - - /** - * Get extension functions as of human readable format - * - * @return Application|Factory|View - */ - public function getExtensionFunctions() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) extension()->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - $functions = array_key_exists('functions', $extension) - ? $extension['functions'] - : []; - $lang = session('locale'); - $file = - '/liman/extensions/' . - strtolower((string) extension()->name) . - '/lang/' . - $lang . - '.json'; - - //Translate Items. - $cleanFunctions = []; - if (is_file($file)) { - $json = json_decode(file_get_contents($file), true); - for ($i = 0; $i < count($functions); $i++) { - if ( - array_key_exists('isActive', $functions[$i]) && - $functions[$i]['isActive'] == 'false' - ) { - continue; - } - $description = array_key_exists( - $functions[$i]['description'], - $json - ) - ? $json[$functions[$i]['description']] - : $functions[$i]['description']; - array_push($cleanFunctions, [ - 'name' => $functions[$i]['name'], - 'description' => $description, - ]); - } - } - - return view('table', [ - 'value' => $cleanFunctions, - 'title' => ['*hidden*', 'Açıklama'], - 'display' => ['name:name', 'description'], - ]); - } - - /** - * Add permission to extension function - * - * @return JsonResponse|Response - */ - public function addFunctionPermissions() - { - foreach (explode(',', (string) request('functions')) as $function) { - Permission::grant( - request('user_id'), - 'function', - 'name', - strtolower((string) extension()->name), - $function - ); - } - - return respond(__('Başarılı'), 200); - } - - /** - * @return JsonResponse|Response - */ - public function removeFunctionPermissions() - { - foreach (explode(',', (string) request('functions')) as $function) { - Permission::find($function)->delete(); - } - - return respond(__('Başarılı'), 200); - } - - /** - * Check health status - * - * @return JsonResponse|Response - */ - public function health() - { - return respond(checkHealth(), 200); - } - - /** - * Save LDAP configuration - * - * @return JsonResponse|Response - * @throws GuzzleException - * @throws GuzzleException - */ - public function saveLDAPConf() - { - $cert = Certificate::where([ - 'server_hostname' => request('ldapAddress'), - 'origin' => 636, - ])->first(); - if (! $cert) { - [$flag, $message] = retrieveCertificate( - request('ldapAddress'), - 636 - ); - if ($flag) { - addCertificate(request('ldapAddress'), 636, $message['path']); - // TODO: New certificate notification - } - } - if (! setBaseDn(request('ldapAddress'))) { - return respond('Sunucuya bağlanırken bir hata oluştu!', 201); - } - setEnv([ - 'LDAP_HOST' => request('ldapAddress'), - 'LDAP_GUID_COLUMN' => request('ldapObjectGUID'), - 'LDAP_STATUS' => request('ldapStatus'), - 'LDAP_MAIL_COLUMN' => request('ldapMail'), - ]); - - return respond(__('Kaydedildi!'), 200); - } - - /** - * Get permission data - * - * @return JsonResponse|Response - */ - public function getPermisssionData() - { - $extension = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) request('extension_name')) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - $function = collect($extension['functions']) - ->where('name', request('function_name')) - ->first(); - - if (! $function) { - return respond('Fonksiyon bulunamadı!', 201); - } - - $parameters = isset($function['parameters']) - ? $function['parameters'] - : null; - if (! $parameters) { - return respond('Fonksiyon parametresi bulunamadı!', 201); - } - - $data = PermissionData::where('permission_id', request('id'))->first(); - $data = $data ? json_decode((string) $data->data) : (object) []; - foreach ($parameters as $key => $parameter) { - $parameters[$key]['value'] = isset($data->{$parameter['variable']}) - ? $data->{$parameter['variable']} - : ''; - } - - $parameters = collect(cleanArray($parameters)); - $inputs = view('inputs', [ - 'inputs' => $parameters->mapWithKeys(function ($item) { - return [ - $item['name'] => $item['variable'] . ':' . $item['type'], - ]; - }), - ])->render(); - - return respond([ - 'data' => $parameters, - 'inputs' => $inputs, - ]); - } - - /** - * Write permission data - * - * @return JsonResponse|Response - */ - public function writePermisssionData() - { - $data = PermissionData::where('permission_id', request('id'))->first(); - if ($data) { - $data->update([ - 'data' => request('data'), - ]); - - return respond('Başarıyla eklendi!'); - } - - PermissionData::create([ - 'data' => request('data'), - 'permission_id' => request('id'), - ]); - - return respond('Başarıyla eklendi!'); - } - - /** - * Set log forwarding - * - * This function utilizes Rsyslog integration on system - * - * @return JsonResponse|Response - */ - public function setLogForwarding() - { - $flag = request()->validate([ - 'type' => 'required|in:tcp,udp', - 'targetHostname' => 'required|min:3', - 'targetPort' => 'required|numeric|between:1,65535' - ]); - if (! $flag) { - return respond('Girdiğiniz veriler geçerli değil!', 201); - } - - $template = '$ModLoad imfile -$InputFileName /liman/logs/liman.log -$InputFileTag liman_log: -$InputFileStateFile liman_log -$InputFileFacility local7 -$InputRunFileMonitor - -$InputFileName /liman/logs/liman_new.log -$InputFileTag engine_log: -$InputFileStateFile engine_log -$InputFileFacility local7 -$InputRunFileMonitor - -local7.liman_log -local7.engine_log '; - - $template = str_replace( - '', - (request('type') == 'tcp' ? '@@' : '@') . - request('targetHostname') . - ':' . - request('targetPort'), - $template - ); - - - - Command::runSystem("echo ':text:' > /etc/rsyslog.d/liman.conf", [ - 'text' => $template, - ]); - - shell_exec('sudo systemctl restart rsyslog'); - - return respond('Başarıyla kaydedildi!'); - } - - /** - * Get Rsyslog settings - * - * @return JsonResponse|Response - */ - public function getLogSystem() - { - $status = - trim(shell_exec('systemctl is-active rsyslog.service')) == 'active' - ? true - : false; - - $data = trim( - shell_exec( - "cat /etc/rsyslog.d/liman.conf | grep 'InputFilePollInterval' | cut -d' ' -f2" - ) - ); - $interval = $data == '' ? '10' : $data; - - $ip_address = ''; - $port = ''; - - $data = trim(shell_exec("cat /etc/rsyslog.d/liman.conf | grep '@@**'")); - if ($data != '') { - $arr = explode('@@', $data); - $ip_port = explode(':', $arr[1]); - $ip_address = $ip_port[0]; - $port = $ip_port[1]; - } - - return respond([ - 'status' => $status, - 'ip_address' => $ip_address != '' ? $ip_address : '', - 'port' => $port != '' ? $port : '514', - 'interval' => $interval != '' ? $interval : '10', - ]); - } - - /** - * Get DNS information on Liman - * - * @return JsonResponse|Response - */ - public function getDNSServers() - { - $data = `grep nameserver /etc/resolv.conf | grep -v "#" | grep nameserver`; - $arr = explode("\n", (string) $data); - $arr = array_filter($arr); - $clean = []; - foreach ($arr as $ip) { - if ($ip == '') { - continue; - } - $foo = explode(' ', trim($ip)); - if (count($foo) == 1) { - continue; - } - array_push($clean, $foo[1]); - } - - return respond($clean); - } - - /** - * Set DNS settings on Liman - * - * @return JsonResponse|Response - * @throws GuzzleException - */ - public function setDNSServers() - { - validate([ - 'dns1' => 'required|ip' - ]); - - if (strlen(request('dns2')) > 2) { - validate([ - 'dns2' => 'ip' - ]); - } - - if (strlen(request('dns3')) > 2) { - validate([ - 'dns3' => 'ip' - ]); - } - - $system = rootSystem(); - $flag = $system->dnsUpdate( - request('dns1'), - request('dns2'), - request('dns3') - ); - if ($flag) { - return respond('DNS Ayarları güncellendi!'); - } else { - return respond('DNS Ayarları güncellenemedi!', 201); - } - } - - /** - * Upload a logo to login screen - * - * @param Request $request - * @return JsonResponse|Response - */ - public function uploadLoginLogo(Request $request) - { - try { - request()->validate([ - 'photo' => 'mimes:jpeg,png|max:4096|required', - ]); - } catch (\Throwable) { - return respond('Dosya yükleme başarısız!', 201); - } - - $uploadedFile = $request->file('photo'); - $filename = time() . $uploadedFile->getClientOriginalName(); - - try { - Storage::disk('local')->putFileAs( - 'public/files/', - $uploadedFile, - $filename - ); - } catch (\Throwable) { - return respond('Dosya yükleme başarısız!', 201); - } - - setEnv(['BRANDING' => '/storage/files/' . $filename]); - - return respond('Dosya yükleme başarılı!', 200); - } -} diff --git a/app/Http/Controllers/Settings/_routes.php b/app/Http/Controllers/Settings/_routes.php deleted file mode 100644 index b5f464c6e..000000000 --- a/app/Http/Controllers/Settings/_routes.php +++ /dev/null @@ -1,127 +0,0 @@ -name('settings') - ->middleware('admin'); - -Route::get('/ayarlar/{user}', 'Settings\MainController@one') - ->name('settings_one') - ->middleware('admin'); - -Route::post('/ayarlar/liste', 'Settings\MainController@getList') - ->name('settings_get_list') - ->middleware('admin'); - -Route::post('/ayarlar/all_roles', 'Settings\MainController@allRoles') - ->name('all_roles') - ->middleware('admin'); - -Route::post('/ayar/yetki/ekle', 'Settings\MainController@addList') - ->name('settings_add_to_list') - ->middleware('admin'); - -Route::post('/ayar/yetki/veriOku', 'Settings\MainController@getPermisssionData') - ->name('get_permission_data') - ->middleware('admin'); - -Route::post( - '/ayar/yetki/veriYaz', - 'Settings\MainController@writePermisssionData' -) - ->name('write_permission_data') - ->middleware('admin'); - -Route::post('/ayar/yetki/sil', 'Settings\MainController@removeFromList') - ->name('settings_remove_from_list') - ->middleware('admin'); - -Route::post('/ayar/log/kaydet', 'Settings\MainController@setLogForwarding') - ->name('set_log_forwarding') - ->middleware('admin'); - -Route::post('/ayar/log/oku', 'Settings\MainController@getLogSystem') - ->name('get_log_system') - ->middleware('admin'); - -Route::view('/ayar/sunucu', 'settings.server') - ->middleware('admin') - ->name('settings_server'); - -Route::post('/yetki/veriEkle', 'Settings\MainController@addVariable') - ->name('permission_add_variable') - ->middleware('admin'); - -Route::post('/yetki/veriSil', 'Settings\MainController@removeVariable') - ->name('permission_remove_variable') - ->middleware('admin'); - -Route::post( - '/ayar/eklenti/fonksiyonlar', - 'Settings\MainController@getExtensionFunctions' -) - ->middleware('admin') - ->name('extension_function_list'); - -Route::post( - '/ayar/eklenti/fonksiyonlar/ekle', - 'Settings\MainController@addFunctionPermissions' -) - ->middleware('admin') - ->name('extension_function_add'); - -Route::post( - '/ayar/eklenti/fonksiyonlar/sil', - 'Settings\MainController@removeFunctionPermissions' -) - ->middleware('admin') - ->name('extension_function_remove'); - -Route::post('/ayar/ldap', 'Settings\MainController@saveLDAPConf') - ->middleware('admin') - ->name('save_ldap_conf'); - -Route::post('/ayarlar/saglik', 'Settings\MainController@health') - ->middleware('admin') - ->name('health_check'); - -Route::post('/kullaniciGetir', 'Settings\MainController@getUserList') - ->middleware('admin') - ->name('get_user_list_admin'); - -Route::post('/kullaniciGetirBasit', 'Settings\MainController@getSimpleUserList') - ->middleware('admin') - ->name('get_user_list_admin_simple'); - -Route::view('/sifreDegistir', 'user.password') - ->middleware('auth') - ->name('password_change'); - -Route::post('/sifreDegistir', 'UserController@forcePasswordChange') - ->middleware('auth') - ->name('password_change_save'); - -Route::post('/dnsOku', 'Settings\MainController@getDNSServers') - ->middleware('admin') - ->name('get_liman_dns_servers'); - -Route::post('/inceAyarlar/oku', 'Settings\MainController@getLimanTweaks') - ->middleware('admin') - ->name('get_liman_tweaks'); - -Route::post('/inceAyarlar/yaz', 'Settings\MainController@setLimanTweaks') - ->middleware('admin') - ->name('set_liman_tweaks'); - -Route::post('/dnsYaz', 'Settings\MainController@setDNSServers') - ->middleware('admin') - ->name('set_liman_dns_servers'); - -Route::post('/uploadLoginLogo', 'Settings\MainController@uploadLoginLogo') - ->middleware('admin') - ->name('upload_login_logo'); - -Route::post('/testMailSettings', 'Settings\MainController@testMailSettings') - ->middleware('admin') - ->name('test_mail_settings'); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php deleted file mode 100644 index a3dfbfa25..000000000 --- a/app/Http/Controllers/UserController.php +++ /dev/null @@ -1,585 +0,0 @@ -request->add(['email' => strtolower((string) request('email'))]); - - validate([ - 'name' => ['required', 'string', 'max:255'], - 'username' => ['nullable', 'string', 'max:255'], - 'email' => [ - 'required', - 'string', - 'email', - 'max:255', - 'unique:users', - ], - ]); - - // Generate Password - do { - $pool = str_shuffle( - 'abcdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ234567890!$@%^&!$%^&' - ); - $password = substr($pool, 0, 10); - } while ( - ! preg_match( - "/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\!\[\]\(\)\{\}\#\?\%\&\*\+\,\-\.\/\:\;\<\=\>\@\^\_\`\~]).{10,}$/", - $password - ) - ); - - $data = [ - 'name' => request('name'), - 'email' => strtolower((string) request('email')), - 'password' => Hash::make($password), - 'status' => request('type') == 'administrator' ? '1' : '0', - 'forceChange' => true, - ]; - - if (request('username')) { - $data['username'] = request('username'); - } - - // Create And Fill User Data - $user = User::create($data); - - // Respond - return respond( - __('Kullanıcı Başarıyla Eklendi. Parola : ') . $password, - 200 - ); - } - - /** - * Reset password of user - * - * @return JsonResponse|Response - */ - public function passwordReset() - { - $user = User::find(request('user_id')); - - if ($user->auth_type == 'ldap' || $user->auth_type == 'keycloak') { - return respond('Bu kullanıcı tipinin şifresi sıfırlanamaz', 201); - } - - // Generate Password - do { - $pool = str_shuffle( - 'abcdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ234567890!$@%^&!$%^&' - ); - $password = substr($pool, 0, 10); - } while ( - ! preg_match( - "/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\!\[\]\(\)\{\}\#\?\%\&\*\+\,\-\.\/\:\;\<\=\>\@\^\_\`\~]).{10,}$/", - $password - ) - ); - - $user->update([ - 'password' => Hash::make($password), - 'forceChange' => true, - ]); - - return respond(__('Yeni Parola: ') . $password, 200); - } - - /** - * User password change - * - * @return JsonResponse|Response - */ - public function selfUpdate() - { - if (user()->auth_type == 'ldap' || user()->auth_type == 'keycloak') { - return respond( - 'Bu kullanıcı tipinin bilgileri değiştirilemez!', - 201 - ); - } - - if ( - ! auth()->attempt([ - 'email' => user()->email, - 'password' => request('old_password'), - ]) - ) { - return respond('Eski Parolanız geçerli değil.', 201); - } - - validate([ - 'name' => 'required|string|max:255', - ]); - - if (! empty(request()->password)) { - validate([ - 'password' => [ - 'string', - 'min:10', - 'max:32', - 'confirmed', - 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\!\[\]\(\)\{\}\#\?\%\&\*\+\,\-\.\/\:\;\<\=\>\@\^\_\`\~]).{10,}$/', - ], - ], [ - 'password.regex' => 'Yeni parolanız en az 10 karakter uzunluğunda olmalı ve en az 1 sayı,özel karakter ve büyük harf içermelidir.', - ]); - - auth() - ->user() - ->update([ - 'name' => request('name'), - 'password' => Hash::make(request('password')), - ]); - - auth()->logout(); - session()->flush(); - - return respond( - 'Kullanıcı Başarıyla Güncellendi, lütfen tekrar giriş yapın.', - 200 - ); - } - - auth() - ->user() - ->update([ - 'name' => request('name'), - ]); - - return respond('Kullanıcı Başarıyla Güncellendi', 200); - } - - /** - * Admin update user - * - * @return JsonResponse|Response - */ - public function adminUpdate() - { - $validations = [ - 'name' => ['required', 'string', 'max:255'], - 'username' => ['nullable', 'string', 'max:255'], - 'email' => ['required', 'email'], - ]; - $user = User::where('id', request('user_id'))->first(); - - if ($user->auth_type == 'ldap' || $user->auth_type == 'keycloak') { - unset($validations['name']); - unset($validations['username']); - } - - validate($validations); - - $data = [ - 'name' => request('name'), - 'email' => request('email'), - 'status' => request('status'), - ]; - - if (request('username')) { - $data['username'] = request('username'); - } - - if ($user->auth_type == 'ldap' || $user->auth_type == 'keycloak') { - unset($data['name']); - unset($data['username']); - } - - $user->update($data); - - return respond('Kullanıcı Güncellendi.', 200); - } - - /** - * Delete vault key - * - * @return JsonResponse|Response - */ - public function removeSetting() - { - if (request('type') == 'key') { - $first = ServerKey::find(request('id')); - } else { - $first = UserSettings::find(request('id')); - } - - if (! $first) { - return respond('Ayar bulunamadi', 201); - } - if ( - $first->name == 'clientUsername' || - $first->name == 'clientPassword' - ) { - $server = Server::find($first->server_id); - - if ($server) { - $ip_address = 'cn_' . str_replace('.', '_', (string) $server->server_id); - if (session($ip_address)) { - session()->remove($ip_address); - } - } - } - - $flag = $first->delete(); - - if ($flag) { - return respond('Başarıyla silindi', 200); - } else { - return respond('Silinemedi', 201); - } - } - - /** - * Remove user from system - * - * @return JsonResponse|Response - */ - public function remove() - { - // Delete Permissions - Permission::where('morph_id', request('user_id'))->delete(); - - //Delete user roles - RoleUser::where('user_id', request('user_id'))->delete(); - - // Delete User - User::where('id', request('user_id'))->delete(); - - // Respond - return respond('Kullanıcı Başarıyla Silindi!', 200); - } - - /** - * Create a new key inside of vault - * - * @return JsonResponse|Response - * @throws \Exception - */ - public function createSetting() - { - $user_id = user()->id; - if (request('user_id') != "" && user()->isAdmin()) { - $user_id = request('user_id'); - } - - $key = env('APP_KEY') . $user_id . request('server_id'); - $encrypted = AES256::encrypt(request('setting_value'), $key); - - $ok = UserSettings::updateOrCreate([ - 'server_id' => request('server_id'), - 'user_id' => $user_id, - 'name' => request('setting_name'), - ], [ - 'value' => $encrypted - ]); - - if ($ok) { - return respond("Başarılı"); - } else { - return respond("Eklenirken hata oluştu.", 201); - } - } - - /** - * Update a key from vault - * - * @return JsonResponse|Response - * @throws \Exception - */ - public function updateSetting() - { - $setting = UserSettings::where('id', request('setting_id'))->first(); - if (! $setting) { - return respond('Ayar bulunamadı!', 201); - } - - if (!user()->isAdmin() && user()->id != $setting->user_id) { - return respond('Güncellenemedi', 201); - } - - if ( - $setting->name == 'clientUsername' || - $setting->name == 'clientPassword' - ) { - $server = Server::find($setting->server_id); - - if ($server) { - $ip_address = 'cn_' . str_replace('.', '_', (string) $server->server_id); - if (session($ip_address)) { - session()->remove($ip_address); - } - } - } - - $key = env('APP_KEY') . $setting->user_id . $setting->server_id; - $encrypted = AES256::encrypt(request('new_value'), $key); - - $flag = $setting->update([ - 'value' => $encrypted, - ]); - if ($flag) { - return respond('Başarıyla Güncellendi', 200); - } else { - return respond('Güncellenemedi', 201); - } - } - - /** - * Reset user password - * - * @return RedirectResponse - */ - public function forcePasswordChange() - { - if ( - ! auth()->attempt([ - 'email' => user()->email, - 'password' => request('old_password'), - ]) - ) { - return redirect() - ->route('password_change') - ->withErrors([ - 'message' => 'Mevcut parolanız geçerli değil.', - ]); - } - - if (request('old_password') == request('password')) { - return redirect() - ->route('password_change') - ->withErrors([ - 'message' => 'Yeni parolanız mevcut parolanıza eşit olamaz.', - ]); - } - - $flag = Validator::make(request()->all(), [ - 'password' => [ - 'required', - 'string', - 'min:10', - 'max:32', - 'confirmed', - 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\!\[\]\(\)\{\}\#\?\%\&\*\+\,\-\.\/\:\;\<\=\>\@\^\_\`\~]).{10,}$/', - ], - ]); - - try { - $flag->validate(); - } catch (\Exception) { - return redirect() - ->route('password_change') - ->withErrors([ - 'message' => 'Yeni parolanız en az 10 karakter uzunluğunda olmalı ve en az 1 sayı,özel karakter ve büyük harf içermelidir.', - ]); - } - - auth() - ->user() - ->update([ - 'password' => Hash::make(request('password')), - 'forceChange' => false, - ]); - - return redirect()->route('home'); - } - - /** - * Retrieve user vault keys - * - * @return JsonResponse|Response - */ - public function userKeyList() - { - if (request('user_id') != "") { - if (!user()->isAdmin()) { - return respond("Bu işlemi yapmak için yönetici olmalısınız!", 403); - } - - $settings = UserSettings::where('user_id', request('user_id'))->get(); - } else { - $settings = UserSettings::where('user_id', user()->id)->get(); - } - - // Retrieve User servers that has permission. - $servers = servers(); - - foreach ($settings as $setting) { - $server = $servers->find($setting->server_id); - $setting->server_name = $server - ? $server->name - : __('Sunucu Silinmiş.'); - $setting->type = 'setting'; - } - - $keys = user()->keys; - - foreach ($keys as $key) { - $server = $servers->find($key->server_id); - $key->server_name = $server - ? $server->name - : __('Sunucu Silinmiş.'); - $key->name = 'Sunucu Anahtarı'; - $key->type = 'key'; - } - - return magicView('keys.index', [ - 'settings' => json_decode( - json_encode( - array_merge($settings->toArray(), $keys->toArray()) - ), - true - ), - 'users' => user()->isAdmin() ? User::all() : [], - 'selected_user' => request('user_id') != "" ? request('user_id') : user()->id - ]); - } - - /** - * Create a key inside of vault - * - * @return JsonResponse|Response - * @throws \Exception - */ - public function addKey() - { - $user_id = user()->id; - if (request('user_id') != "" && user()->isAdmin()) { - $user_id = request('user_id'); - } - - $encKey = env('APP_KEY') . $user_id . server()->id; - UserSettings::where([ - 'server_id' => server()->id, - 'user_id' => $user_id, - 'name' => 'clientUsername', - ])->delete(); - UserSettings::where([ - 'server_id' => server()->id, - 'user_id' => $user_id, - 'name' => 'clientPassword', - ])->delete(); - - $data = [ - 'clientUsername' => AES256::encrypt(request('username'), $encKey), - 'clientPassword' => AES256::encrypt(request('password'), $encKey), - 'key_port' => request('key_port'), - ]; - - ServerKey::updateOrCreate( - ['server_id' => server()->id, 'user_id' => $user_id], - ['type' => request('type'), 'data' => json_encode($data)] - ); - - Server::where(['id' => server()->id])->update( - ['shared_key' => request()->shared == 'true' ? 1 : 0] - ); - - return respond('Başarıyla eklendi.'); - } - - /** - * Get access tokens - * - * @return JsonResponse|Response - */ - public function myAccessTokens() - { - return magicView('user.keys', [ - 'access_tokens' => user() - ->accessTokens() - ->get(), - ]); - } - - /** - * Create access tokens - * - * @return JsonResponse|Response - */ - public function createAccessToken() - { - $token = Str::random(64); - AccessToken::create([ - 'user_id' => user()->id, - 'name' => request('name'), - 'token' => $token, - 'ip_range' => request('ip_range'), - ]); - - return respond('Anahtar Başarıyla Oluşturuldu.'); - } - - /** - * Revoke access tokens - * - * @return JsonResponse|Response - */ - public function revokeAccessToken() - { - $token = AccessToken::find(request('token_id')); - if (! $token || $token->user_id != user()->id) { - return respond('Anahtar Bulunamadı!', 201); - } - $token->delete(); - - return respond('Anahtar Başarıyla Silindi'); - } - - /** - * Set users google secret - * - * @return Application|Factory|View|RedirectResponse|Redirector - */ - public function setGoogleSecret() - { - if (! env('OTP_ENABLED', false)) { - return redirect(route('home')); - } - - $google2fa = app('pragmarx.google2fa'); - - $secret = $google2fa->generateSecretKey(); - - $QR_Image = $google2fa->getQRCodeInline( - "Liman", - auth()->user()->email, - $secret - ); - - return view('google2fa.register', ['QR_Image' => $QR_Image, 'secret' => $secret]); - } -} diff --git a/app/Http/Helpers.php b/app/Http/Helpers.php index c3232f20e..72e7843a3 100755 --- a/app/Http/Helpers.php +++ b/app/Http/Helpers.php @@ -274,64 +274,6 @@ function users() } } -if (! function_exists('registerModuleRoutes')) { - /** - * Register module routes - * - * @return void - */ - function registerModuleRoutes() - { - $files = searchModuleFiles('routes.php'); - foreach ($files as $file) { - require_once $file . '/routes.php'; - } - } -} - -if (! function_exists('registerModuleListeners')) { - /** - * Register module listeners - * - * @return void - */ - function registerModuleListeners() - { - $files = searchModuleFiles('listeners.php'); - foreach ($files as $file) { - require_once $file . '/listeners.php'; - } - } -} - -if (! function_exists('searchModuleFiles')) { - /** - * Search module files - * - * @param $type - * @return array - */ - function searchModuleFiles($type) - { - $command = 'find /liman/modules/ -name @{:type}'; - - $output = Command::runLiman($command, [ - 'type' => $type, - ]); - if ($output == '') { - return []; - } - - $data = explode("\n", (string) $output); - $arr = []; - foreach ($data as $file) { - array_push($arr, dirname($file)); - } - - return $arr; - } -} - if (! function_exists('getLimanPermissions')) { /** * Get liman permission list @@ -363,105 +305,6 @@ function getLimanPermissions($user_id) } } -if (! function_exists('settingsModuleViews')) { - /** - * Return setting module views and render it in settings page - * - * @return string - */ - function settingsModuleViews() - { - $str = ''; - foreach (searchModuleFiles('settings.blade.php') as $file) { - $blade = new Blade( - [realpath(base_path('resources/views/components')), $file], - '/tmp' - ); - $str .= $blade->render('settings'); - } - - return $str; - } -} - -if (! function_exists('renderModuleView')) { - /** - * Return render module view layout - * - * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View - */ - function renderModuleView($module, $page, $params = []) - { - $blade = new Blade('/liman/modules/' . $module . '/views/', '/tmp'); - $str = $blade->render($page, $params); - - return view('modules.layout', [ - 'name' => $module, - 'html' => $str, - ]); - } -} - -$sidebarModuleLinks = null; -if (! function_exists('sidebarModuleLinks')) { - /** - * Returns module links - * - * @return array - */ - function sidebarModuleLinks() - { - global $sidebarModuleLinks; - if ($sidebarModuleLinks != null) { - return $sidebarModuleLinks; - } - $array = []; - foreach (searchModuleFiles('sidebar.json') as $file) { - $filePath = $file . '/sidebar.json'; - $data = file_get_contents($filePath); - $json = json_decode($data, true); - if (json_last_error() != JSON_ERROR_NONE) { - continue; - } - foreach ($json as $a) { - array_push($array, $a); - } - } - $sidebarModuleLinks = $array; - - return $array; - } -} - -if (! function_exists('settingsModuleButtons')) { - /** - * Returns html view of modules - * - * @return string - */ - function settingsModuleButtons() - { - $str = ''; - foreach (searchModuleFiles('settings.blade.php') as $file) { - $foo = substr((string) $file, 15); - $name = substr($foo, 0, strpos($foo, '/')); - $hrefName = $name; - if (is_numeric($name[0])) { - $hrefName = 'l-' . $name; - } - - $str .= - '"; - } - - return $str; - } -} - if (! function_exists('getLimanHostname')) { /** * Get liman server hostname @@ -474,51 +317,6 @@ function getLimanHostname(): string } } -if (! function_exists('serverModuleViews')) { - /** - * Get server modules - * - * @return string - */ - function serverModuleViews() - { - $str = ''; - foreach (searchModuleFiles('server.blade.php') as $file) { - $blade = new Blade( - [realpath(base_path('resources/views/components')), $file], - '/tmp' - ); - $str .= $blade->render('server'); - } - - return $str; - } -} - -if (! function_exists('serverModuleButtons')) { - /** - * Get server module html views - * - * @return string - */ - function serverModuleButtons() - { - $str = ''; - foreach (searchModuleFiles('server.blade.php') as $file) { - $foo = substr((string) $file, 15); - $name = substr($foo, 0, strpos($foo, '/')); - $str .= - '"; - } - - return $str; - } -} - if (! function_exists('getVersion')) { /** * Get version of liman @@ -778,19 +576,6 @@ function user() } } -if (! function_exists('sandbox')) { - /** - * Get sandbox instance - * - * @param $id - * @return App\Sandboxes\Sandbox - */ - function sandbox($id): \App\Sandboxes\Sandbox - { - return new App\Sandboxes\PHPSandbox(); - } -} - if (! function_exists('magicView')) { /** * Returns view or json within the scope of request @@ -1143,7 +928,6 @@ function checkHealth() 'logs' => '0700', 'sandbox' => '0755', 'server' => '0700', - 'modules' => '0700', 'packages' => '0700', 'hashes' => '0700', ]; diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 1fb0d262e..76b508829 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -25,10 +25,8 @@ class Kernel extends HttpKernel Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, - \App\Http\Middleware\TouchServer::class, \App\Http\Middleware\APILogin::class, \Illuminate\Session\Middleware\AuthenticateSession::class, - \App\Http\Middleware\Language::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, \App\Http\Middleware\ForcePasswordChange::class, @@ -47,9 +45,7 @@ class Kernel extends HttpKernel 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'parameters' => \App\Http\Middleware\Parameters::class, 'server' => \App\Http\Middleware\Server::class, - 'server_api' => \App\Http\Middleware\ServerApi::class, 'permissions' => \App\Http\Middleware\PermissionManager::class, 'admin' => \App\Http\Middleware\Admin::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, diff --git a/app/Http/Middleware/Language.php b/app/Http/Middleware/Language.php deleted file mode 100644 index 5bac7b29c..000000000 --- a/app/Http/Middleware/Language.php +++ /dev/null @@ -1,38 +0,0 @@ -setLocale(session('locale')); - } else { - if (auth()->check()) { - $locale = auth()->user()->locale ? auth()->user()->locale : env('APP_LANG', 'tr'); - app()->setLocale($locale); - \Session::put('locale', $locale); - } else { - app()->setLocale(env('APP_LANG', 'tr')); - } - } - - // Forward request to next target. - return $next($request); - } -} diff --git a/app/Http/Middleware/Parameters.php b/app/Http/Middleware/Parameters.php deleted file mode 100644 index 9492d10a7..000000000 --- a/app/Http/Middleware/Parameters.php +++ /dev/null @@ -1,34 +0,0 @@ -has($parameter) || ! strlen((string) request($parameter))) { - // If found something that is missing, abort the process and warn user. - return respond('Eksik Parametre > ' . $parameter, 403); - } - } - // Forward request to next target. - return $next($request); - } -} diff --git a/app/Http/Middleware/ServerApi.php b/app/Http/Middleware/ServerApi.php deleted file mode 100644 index 690973b7d..000000000 --- a/app/Http/Middleware/ServerApi.php +++ /dev/null @@ -1,41 +0,0 @@ -ip_address, - server()->control_port, - $errno, - $errstr, - intval(config('liman.server_connection_timeout')) / 1000 - ); - if (is_resource($status) || server()->control_port == -1) { - return $next($request); - } else { - return respond( - __(':server_name isimli sunucuya erişim sağlanamadı!', [ - 'server_name' => server()->name . '(' . server()->ip_address . ')', - ]), - 201 - ); - } - } -} diff --git a/app/Http/Middleware/SessionTimeout.php b/app/Http/Middleware/SessionTimeout.php deleted file mode 100644 index bb5390c7e..000000000 --- a/app/Http/Middleware/SessionTimeout.php +++ /dev/null @@ -1,112 +0,0 @@ -session = $session; - $this->redirectUrl = route('login'); - $this->sessionLabel = 'warning'; - $this->lifetime = config('session.lifetime'); - $this->exclude = ['user_notifications', 'server_check']; - } - - /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @return mixed - */ - public function handle($request, Closure $next) - { - if (! Auth::check()) { - $this->session->forget('lastActivityTime'); - - return $next($request); - } - if (! $this->session->has('lastActivityTime')) { - $this->session->put('lastActivityTime', time()); - } elseif ( - time() - $this->session->get('lastActivityTime') > - $this->getTimeOut() - ) { - $this->session->forget('lastActivityTime'); - Auth::logout(); - $message = __( - ':timeout dakika boyunca aktif olmadığınız için oturumunuz sonlandırıldı.', - ['timeout' => $this->getTimeOut() / 60] - ); - if ($request->wantsJson()) { - $this->session->flash($this->getSessionLabel(), $message); - - return respond($this->getRedirectUrl(), 300); - } else { - return redirect($this->getRedirectUrl())->with([ - $this->getSessionLabel() => $message, - ]); - } - } - if (! in_array($request->route()->getName(), $this->exclude)) { - $this->session->put('lastActivityTime', time()); - } - - return $next($request); - } - - /** - * Get timeout from laravel default's session lifetime, if it's not set/empty, set timeout to 15 minutes - * - * @return int - */ - private function getTimeOut() - { - return $this->lifetime * 60 ?: $this->timeout; - } - - /** - * Get Session label from env file - * - * @return string - */ - private function getSessionLabel() - { - return env('SESSION_LABEL') ?: $this->sessionLabel; - } - - /** - * Get redirect url from env file - * - * @return string - */ - private function getRedirectUrl() - { - return env('SESSION_TIMEOUT_REDIRECTURL') ?: $this->redirectUrl; - } -} diff --git a/app/Http/Middleware/TouchServer.php b/app/Http/Middleware/TouchServer.php deleted file mode 100644 index 123987249..000000000 --- a/app/Http/Middleware/TouchServer.php +++ /dev/null @@ -1,42 +0,0 @@ -server_id && auth()->check()) { - if ( - ($request->session()->get('last_touched') - && $request->server_id != $request->session()->get('last_touched')) - || ! $request->session()->get('last_touched') - ) { - try { - \App\Models\Server::where('id', $request->server_id)->firstOrFail()->touch(); - $request->session()->put('last_touched', $request->server_id); - } catch (\Throwable) { - return $next($request); - } - } - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/TusAuthenticated.php b/app/Http/Middleware/TusAuthenticated.php index 0073cf4d6..ec8f1933e 100644 --- a/app/Http/Middleware/TusAuthenticated.php +++ b/app/Http/Middleware/TusAuthenticated.php @@ -35,18 +35,12 @@ public function handle(Request $request, Response $response) } if (! $token) { - throw new UnauthorizedHttpException(response()->json([ - 'status' => 'error', - 'message' => 'Extension-Token header is missing.', - ], 401)); + throw new UnauthorizedHttpException('Extension-Token header is missing.'); } $obj = Token::where('token', $token)->first(); if (! $obj) { - throw new UnauthorizedHttpException(response()->json([ - 'status' => 'error', - 'message' => 'Extension-Token is invalid.', - ], 401)); + throw new UnauthorizedHttpException('Extension-Token is invalid.'); } Log::info('Extension-Token is valid. User ip: ' . request()->ip); diff --git a/app/Jobs/ExtensionDependenciesJob.php b/app/Jobs/ExtensionDependenciesJob.php deleted file mode 100644 index ff68cf392..000000000 --- a/app/Jobs/ExtensionDependenciesJob.php +++ /dev/null @@ -1,69 +0,0 @@ -extension->update([ - 'status' => '0', - ]); - } - - /** - * Execute the job. - * - * @return void - * @throws GuzzleException - * @throws GuzzleException - */ - public function handle() - { - $package = $this->dependencies; - $tmp = '/tmp/' . str_random(16); - $installCommand = "if [ -z '\$(find /var/cache/apt/pkgcache.bin -mmin -60)' ]; then sudo apt-get update; fi;DEBIAN_FRONTEND=noninteractive sudo apt-get install -o Dpkg::Use-Pty=0 -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' @{:package} -qqy --force-yes > @{:tmp} 2>&1"; - Command::runSystem($installCommand, [ - 'package' => $package, - 'tmp' => $tmp, - ]); - $checkCommand = "dpkg --get-selections | grep -v deinstall | awk '{print $1}' | grep -xE @{:package}"; - $installed = Command::runSystem($checkCommand, [ - 'package' => str_replace(' ', '|', (string) $package), - ]); - $dep = explode(' ', (string) $this->dependencies); - sort($dep); - $installed = explode("\n", trim((string) $installed)); - sort($installed); - - if ($dep == $installed) { - $this->extension->update([ - 'status' => '1', - ]); - $this->extension->save(); - - // TODO: Extension dependency installation success notification - } else { - // TODO: Extension dependency installation failed notification - } - } -} diff --git a/app/Jobs/HighAvailabilitySyncer.php b/app/Jobs/HighAvailabilitySyncer.php index 76b8f2b10..6dfbf8f44 100644 --- a/app/Jobs/HighAvailabilitySyncer.php +++ b/app/Jobs/HighAvailabilitySyncer.php @@ -5,7 +5,6 @@ use App\Models\Liman; use App\Models\SystemSettings; use App\System\Command; -use Carbon\Carbon; use Exception; use GuzzleHttp\Client; use GuzzleHttp\Exception\GuzzleException; @@ -14,7 +13,6 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Str; use ZipArchive; @@ -71,14 +69,6 @@ public function handle() foreach ($information['update_extensions'] as $extension) { $this->updateExtension($extension); } - - foreach ($information['missing_modules'] as $module) { - $this->installModule($module); - } - - foreach ($information['update_modules'] as $module) { - $this->updateModule($module); - } } receiveSystemSettings(); @@ -137,13 +127,10 @@ private function fetchUpdateInformation($ip) ]); $extensionListResponse = $client->request('GET', 'https://' . $ip . '/hasync/extension_list'); - $moduleListResponse = $client->request('GET', 'https://' . $ip . '/hasync/module_list'); - $extensionList = json_decode($extensionListResponse->getBody()->getContents()); - $moduleList = json_decode($moduleListResponse->getBody()->getContents()); - $missingExtensionList = []; $needsToBeUpdated = []; + foreach ($extensionList as $extension) { $path = '/liman/extensions/' . $extension->name; @@ -166,30 +153,9 @@ private function fetchUpdateInformation($ip) } } - $missingModuleList = []; - $moduleNeedsToBeUpdated = []; - foreach ($moduleList as $module) { - $path = '/liman/modules/' . $module->name; - - // Determine if module does exist - if (!is_dir($path)) { - $missingModuleList[] = $module; - continue; - } - - // If module is up to date - $updatedAt = Carbon::parse($module->updated_at)->getTimestamp(); - if ($updatedAt > filemtime($path)) { - $moduleNeedsToBeUpdated[] = $module; - continue; - } - } - return [ "missing_extensions" => $missingExtensionList, - "update_extensions" => $needsToBeUpdated, - "missing_modules" => $missingModuleList, - "update_modules" => $moduleNeedsToBeUpdated + "update_extensions" => $needsToBeUpdated ]; } @@ -353,110 +319,4 @@ private function updateExtension($extension) $system->installPackages($json['dependencies']); } } - - /** - * Install not existing module - * - * @param $module - * @throws GuzzleException - * @return void - */ - private function installModule($module) - { - $module = (array) $module; - - // Download module and put to the folder - $file = $this->downloadFile($module['download_path']); - - if (!$file || !is_file($file)) { - throw new Exception("file could not be downloaded"); - } - - $zip = new ZipArchive(); - - if (!$zip->open($file)) { - throw new Exception("downloaded zip file cannot be opened"); - } - - $path = '/tmp/' . Str::random(); - try { - $zip->extractTo($path); - } catch (\Exception) { - throw new Exception("error when extracting zip file"); - } - - $module_folder = '/liman/modules/' . (string) $module['name']; - - Command::runLiman('mkdir -p @{:module_folder}', [ - 'module_folder' => $module_folder, - ]); - - Command::runLiman('cp -r {:path}/* {:module_folder}/.', [ - 'module_folder' => $module_folder, - 'path' => $path, - ]); - - Command::runSystem('rm -rf @{:file}', [ - 'file' => $path - ]); - - Artisan::call("module:add " . $module['name']); - - Command::runSystem('rm -rf @{:file}', [ - 'file' => $file - ]); - } - - /** - * Update old module - * - * @param $module - * @throws GuzzleException - * @return void - */ - private function updateModule($module) - { - $module = (array) $module; - - // Download module and put to the folder - $file = $this->downloadFile($module['download_path']); - - if (!$file || !is_file($file)) { - throw new Exception("file could not be downloaded"); - } - - $zip = new ZipArchive(); - - if (!$zip->open($file)) { - throw new Exception("downloaded zip file cannot be opened"); - } - - $path = '/tmp/' . Str::random(); - try { - $zip->extractTo($path); - } catch (\Exception) { - throw new Exception("error when extracting zip file"); - } - - $module_folder = '/liman/modules/' . (string) $module['name']; - - Command::runLiman('mkdir -p @{:module_folder}', [ - 'module_folder' => $module_folder, - ]); - - Command::runLiman('cp -r {:path}/* {:module_folder}/.', [ - 'module_folder' => $module_folder, - 'path' => $path, - ]); - - Command::runSystem('rm -rf @{:file}', [ - 'file' => $path - ]); - - Artisan::call("module:add " . $module['name']); - - Command::runSystem('rm -rf @{:file}', [ - 'file' => $file - ]); - } } diff --git a/app/Models/Module.php b/app/Models/Module.php deleted file mode 100644 index 38e790355..000000000 --- a/app/Models/Module.php +++ /dev/null @@ -1,17 +0,0 @@ - user()->id, - 'extension_id' => extension()->id, - 'remote_host' => $remote_host, - 'remote_port' => $remote_port, - ]); - } - - /** - * Set new tunnel token - * - * @param $token - * @param $local_port - * @param $remote_host - * @param $remote_port - * @return mixed - */ - public static function set($token, $local_port, $remote_host, $remote_port) - { - if ($token == null) { - abort(504, 'Tünel açılırken bir hata oluştu.'); - } - //Delete Old Ones - TunnelToken::where([ - 'user_id' => user()->id, - 'extension_id' => extension()->id, - 'remote_host' => $remote_host, - 'remote_port' => $remote_port, - ])->delete(); - - return TunnelToken::create([ - 'user_id' => user()->id, - 'extension_id' => extension()->id, - 'remote_host' => $remote_host, - 'remote_port' => $remote_port, - 'token' => $token, - 'local_port' => $local_port, - ]); - } - - /** - * Revoke tunnel token - * - * @param $token - * @return mixed - */ - public static function remove($token) - { - return TunnelToken::where([ - 'user_id' => user()->id, - 'extension_id' => extension()->id, - 'token' => $token, - ])->delete(); - } -} diff --git a/app/Models/UserMonitors.php b/app/Models/UserMonitors.php deleted file mode 100644 index c4a21f23d..000000000 --- a/app/Models/UserMonitors.php +++ /dev/null @@ -1,19 +0,0 @@ -with('USER_FAVORITES', user()->favorites()); - $view->with('SERVERS', \App\Models\Server::orderBy('updated_at', 'DESC') - ->limit(env('NAV_SERVER_COUNT', 20))->get() - ->filter(function ($server) { - return Permission::can(user()->id, 'server', 'id', $server->id); - }) - ->filter(function ($server) { - return ! (bool) user()->favorites()->where('id', $server->id)->first(); - }) - ); - }); - Carbon::setLocale(app()->getLocale()); - Notification::observe(NotificationObserver::class); User::observe(UserObserver::class); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 3c0e5ea05..b1499bbda 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -29,9 +29,5 @@ class AuthServiceProvider extends ServiceProvider public function boot() { $this->registerPolicies(); - - Gate::define('viewWebSocketsDashboard', function ($user = null): bool { - return true; - }); } } diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index c642d2501..86b771253 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -5,8 +5,6 @@ use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use SocialiteProviders\Keycloak\KeycloakExtendSocialite; -use SocialiteProviders\Manager\SocialiteWasCalled; /** * Event Service Provider @@ -23,10 +21,7 @@ class EventServiceProvider extends ServiceProvider protected $listen = [ Registered::class => [ SendEmailVerificationNotification::class - ], - SocialiteWasCalled::class => [ - KeycloakExtendSocialite::class . '@handle', - ], + ] ]; /** @@ -37,7 +32,6 @@ class EventServiceProvider extends ServiceProvider public function boot() { parent::boot(); - registerModuleListeners(); } /** @@ -57,6 +51,6 @@ public function shouldDiscoverEvents(): bool */ protected function discoverEventsWithin() { - return ['/liman/modules/']; + return []; } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index ee9a60e3c..2594980e6 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -43,10 +43,6 @@ public function map() $this->mapApiRoutes(); $this->mapWebRoutes(); - - if (env('EXTENSION_DEVELOPER_MODE', false)) { - $this->mapExtensionDeveloperRoutes(); - } } /** diff --git a/app/Sandboxes/PHPSandbox.php b/app/Sandboxes/PHPSandbox.php deleted file mode 100644 index 1d4919306..000000000 --- a/app/Sandboxes/PHPSandbox.php +++ /dev/null @@ -1,225 +0,0 @@ -server = $server ? $server : server(); - $this->extension = $extension ? $extension : extension(); - $this->user = $user ? $user : user(); - $this->request = $request - ? $request - : request()->except([ - 'permissions', - 'extension', - 'server', - 'script', - 'server_id', - ]); - } - - /** - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * @param $logId - * @return void - */ - public function setLogId($logId) - { - $this->logId = $logId; - } - - /** - * @return string - */ - public function getFileExtension() - { - return $this->fileExtension; - } - - /** - * @param $function - * @param $extensionDb - * @return string - * @throws \Exception - */ - public function command($function, $extensionDb = null) - { - $combinerFile = $this->path; - - $settings = UserSettings::where([ - 'user_id' => $this->user->id, - 'server_id' => $this->server->id, - ]); - if ($extensionDb == null) { - $extensionDb = []; - foreach ($settings->get() as $setting) { - $key = - env('APP_KEY') . - $this->user->id . - $this->server->id; - $extensionDb[$setting->name] = AES256::decrypt($setting->value, $key); - } - - $extensionDb = json_encode($extensionDb); - } - - $request = json_encode($this->request); - - $apiRoute = route('extension_server', [ - 'extension_id' => $this->extension->id, - 'server_id' => $this->server->id, - ]); - - $navigationRoute = route('extension_server', [ - 'server_id' => $this->server->id, - 'extension_id' => $this->extension->id, - ]); - - $token = Token::create($this->user->id); - - if (! $this->user->isAdmin()) { - $extensionJson = json_decode( - file_get_contents( - '/liman/extensions/' . - strtolower((string) $this->extension->name) . - DIRECTORY_SEPARATOR . - 'db.json' - ), - true - ); - $permissions = []; - if (array_key_exists('functions', $extensionJson)) { - foreach ($extensionJson['functions'] as $item) { - if ( - Permission::can( - $this->user->id, - 'function', - 'name', - strtolower((string) $this->extension->name), - $item['name'] - ) || - $item['isActive'] != 'true' - ) { - array_push($permissions, $item['name']); - } - } - } - $permissions = json_encode($permissions); - } else { - $permissions = 'admin'; - } - - $userData = [ - 'id' => $this->user->id, - 'name' => $this->user->name, - 'email' => $this->user->email, - ]; - - $functionsPath = - '/liman/extensions/' . - strtolower((string) $this->extension->name) . - '/views/functions.php'; - - $publicPath = route('extension_public_folder', [ - 'extension_id' => $this->extension->id, - 'path' => '', - ]); - - $isAjax = request()->wantsJson() ? true : false; - $array = [ - $functionsPath, - $function, - $this->server->toArray(), - $this->extension->toArray(), - $extensionDb, - $request, - $apiRoute, - $navigationRoute, - $token, - $permissions, - // session('locale'), - // json_encode($userData), - $publicPath, - // $isAjax, - $this->logId, - ]; - - $encrypted = openssl_encrypt( - Str::random() . base64_encode(json_encode($array)), - 'aes-256-cfb8', - shell_exec( - 'cat ' . - '/liman/keys' . - DIRECTORY_SEPARATOR . - $this->extension->id - ), - 0, - Str::random() - ); - - $keyPath = '/liman/keys' . DIRECTORY_SEPARATOR . $this->extension->id; - - $soPath = - '/liman/extensions/' . - strtolower((string) $this->extension->name) . - '/liman.so'; - - $extra = is_file($soPath) ? "-dextension=$soPath " : ''; - - return 'sudo runuser ' . - cleanDash($this->extension->id) . - " -c 'timeout 30 /usr/bin/php $extra-d display_errors=on $combinerFile $keyPath $encrypted'"; - } - - /** - * @return string[] - */ - public function getInitialFiles() - { - return ['index.blade.php', 'functions.php']; - } -} diff --git a/app/Sandboxes/Sandbox.php b/app/Sandboxes/Sandbox.php deleted file mode 100644 index 27f7a6c34..000000000 --- a/app/Sandboxes/Sandbox.php +++ /dev/null @@ -1,50 +0,0 @@ -=7.1||>=8.0" - }, - "require-dev": { - "ext-simplexml": "*", - "friendsofphp/php-cs-fixer": "^2.17", - "mockery/mockery": "^1.3.3", - "phpstan/phpstan": "^0.12.42", - "phpunit/phpunit": "^7.5||9.5" - }, - "suggest": { - "ext-simplexml": "For decoding XML-based responses." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev", - "dev-develop": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "League\\OAuth1\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Corlett", - "email": "bencorlett@me.com", - "homepage": "http://www.webcomm.com.au", - "role": "Developer" - } - ], - "description": "OAuth 1.0 Client Library", - "keywords": [ - "Authentication", - "SSO", - "authorization", - "bitbucket", - "identity", - "idp", - "oauth", - "oauth1", - "single sign on", - "trello", - "tumblr", - "twitter" - ], - "support": { - "issues": "https://github.com/thephpleague/oauth1-client/issues", - "source": "https://github.com/thephpleague/oauth1-client/tree/v1.10.1" - }, - "time": "2022-04-15T14:02:14+00:00" - }, { "name": "limanmys/php-smb", "version": "3.5.1", @@ -6143,130 +5931,6 @@ }, "time": "2018-05-29T20:21:04+00:00" }, - { - "name": "socialiteproviders/keycloak", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/SocialiteProviders/Keycloak.git", - "reference": "87d13f8a411a6f8f5010ecbaff9aedd4494863e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/SocialiteProviders/Keycloak/zipball/87d13f8a411a6f8f5010ecbaff9aedd4494863e4", - "reference": "87d13f8a411a6f8f5010ecbaff9aedd4494863e4", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0", - "socialiteproviders/manager": "~4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "SocialiteProviders\\Keycloak\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oleg Kuchumov", - "email": "voenniy@gmail.com" - } - ], - "description": "Keycloak OAuth2 Provider for Laravel Socialite", - "keywords": [ - "keycloak", - "laravel", - "oauth", - "provider", - "socialite" - ], - "support": { - "docs": "https://socialiteproviders.com/keycloak", - "issues": "https://github.com/socialiteproviders/providers/issues", - "source": "https://github.com/socialiteproviders/providers" - }, - "time": "2023-04-10T05:50:49+00:00" - }, - { - "name": "socialiteproviders/manager", - "version": "v4.4.0", - "source": { - "type": "git", - "url": "https://github.com/SocialiteProviders/Manager.git", - "reference": "df5e45b53d918ec3d689f014d98a6c838b98ed96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/df5e45b53d918ec3d689f014d98a6c838b98ed96", - "reference": "df5e45b53d918ec3d689f014d98a6c838b98ed96", - "shasum": "" - }, - "require": { - "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", - "laravel/socialite": "~5.0", - "php": "^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^6.0 || ^9.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "SocialiteProviders\\Manager\\ServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "SocialiteProviders\\Manager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andy Wendt", - "email": "andy@awendt.com" - }, - { - "name": "Anton Komarev", - "email": "a.komarev@cybercog.su" - }, - { - "name": "Miguel Piedrafita", - "email": "soy@miguelpiedrafita.com" - }, - { - "name": "atymic", - "email": "atymicq@gmail.com", - "homepage": "https://atymic.dev" - } - ], - "description": "Easily add new or override built-in providers in Laravel Socialite.", - "homepage": "https://socialiteproviders.com", - "keywords": [ - "laravel", - "manager", - "oauth", - "providers", - "socialite" - ], - "support": { - "issues": "https://github.com/socialiteproviders/manager/issues", - "source": "https://github.com/socialiteproviders/manager" - }, - "time": "2023-08-27T23:46:34+00:00" - }, { "name": "symfony/console", "version": "v6.3.4", @@ -6785,16 +6449,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844" + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/cac1556fdfdf6719668181974104e6fcfa60e844", - "reference": "cac1556fdfdf6719668181974104e6fcfa60e844", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957", + "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957", "shasum": "" }, "require": { @@ -6842,7 +6506,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.4" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.5" }, "funding": [ { @@ -6858,7 +6522,7 @@ "type": "tidelift" } ], - "time": "2023-08-22T08:20:46+00:00" + "time": "2023-09-04T21:33:54+00:00" }, { "name": "symfony/http-kernel", @@ -7055,16 +6719,16 @@ }, { "name": "symfony/mime", - "version": "v6.3.3", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98" + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", - "reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", + "url": "https://api.github.com/repos/symfony/mime/zipball/d5179eedf1cb2946dbd760475ebf05c251ef6a6e", + "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e", "shasum": "" }, "require": { @@ -7119,7 +6783,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.3.3" + "source": "https://github.com/symfony/mime/tree/v6.3.5" }, "funding": [ { @@ -7135,7 +6799,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2023-09-29T06:59:36+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/config/app.php b/config/app.php index 1c5352af5..d8b496a76 100644 --- a/config/app.php +++ b/config/app.php @@ -171,7 +171,6 @@ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\TusServiceProvider::class, - \SocialiteProviders\Manager\ServiceProvider::class, Tymon\JWTAuth\Providers\LaravelServiceProvider::class, App\Providers\BroadcastServiceProvider::class, ], diff --git a/config/database.php b/config/database.php index df64f701a..8cd18e14b 100644 --- a/config/database.php +++ b/config/database.php @@ -82,6 +82,7 @@ 'prefix' => '', 'prefix_indexes' => true, ], + 'mongodb' => [ 'driver' => 'mongodb', 'host' => env('DB_HOST', 'localhost'), diff --git a/config/hooks.php b/config/hooks.php deleted file mode 100644 index 94c871a94..000000000 --- a/config/hooks.php +++ /dev/null @@ -1,84 +0,0 @@ - [ - 'login_attempt', - 'login_successful', - 'login_failed', - 'logout_attempt', - 'logout_successful', - 'server_key_verify', - 'server_key_add', - 'server_add_attempt', - 'server_add_successful', - 'server_update', - 'server_delete', - 'server_extension_add', - 'server_extension_remove', - 'extension_upload_attempt', - 'extension_upload_successful', - 'extension_delete_attempt', - 'extension_delete_successful', - 'user_add_attempt', - 'user_add_successful', - 'user_delete_attempt', - 'user_delete_successful', - 'user_password_reset_attempt', - 'user_password_reset_successful', - 'role_group_add_attempt', - 'role_group_add_successful', - 'user_to_role_group_attempt', - 'user_to_role_group_successful', - 'delete_user_from_role_group_attempt', - 'delete_user_from_role_group_successful', - 'role_group_extension_grant_attempt', - 'role_group_extension_grant_successful', - 'role_group_extension_revoke_attempt', - 'role_group_extension_revoke_successful', - 'role_group_server_grant_attempt', - 'role_group_server_grant_successful', - 'role_group_server_revoke_attempt', - 'role_group_server_revoke_successful', - 'role_group_function_grant_attempt', - 'role_group_function_grant_successful', - 'role_group_function_revoke_attempt', - 'role_group_function_revoke_successful', - 'certificate_add_attempt', - 'certificate_add_successful', - 'certificate_renew_attempt', - 'certificate_renew_successful', - 'certificate_revoke_attempt', - 'certificate_revoke_successful', - 'health_problem', - 'new_liman_update', - 'wallet_cache_clear_attempt', - 'wallet_cache_clear_successful', - 'wallet_new_key_add_attempt', - 'wallet_new_key_add_successful', - 'wallet_setting_add_attempt', - 'wallet_setting_add_successful', - 'wallet_setting_update_attempt', - 'wallet_setting_update_successful', - 'wallet_setting_delete_attempt', - 'wallet_setting_delete_successful', - ], - - 'listeners' => [ - 'user_create', - 'user_update', - 'user_delete', - 'server_add', - 'server_update', - 'server_delete', - 'server_extension_add', - 'server_extension_remove', - 'extension_add', - 'extension_remove', - 'certificate_add', - 'certificate_remove', - ], - - // Hooks execute timeout - 'timeout' => 5, -]; diff --git a/config/liman.php b/config/liman.php index 4dfa1b4d2..8f6762dea 100644 --- a/config/liman.php +++ b/config/liman.php @@ -3,67 +3,7 @@ return [ 'server_connection_timeout' => 5000, //ms 'wizard_max_steps' => 4, - 'admin_searchable' => [ - [ - 'name' => 'Sistem Ayarları', - 'url' => '/ayarlar', - ], - [ - 'name' => 'Kullanıcı Ayarları', - 'url' => '/ayarlar#users', - ], - [ - 'name' => 'Sistem Ayarları / Eklentiler', - 'url' => '/ayarlar#extensions', - ], - [ - 'name' => 'Sistem Ayarları / Rol Grupları', - 'url' => '/ayarlar#roles', - ], - [ - 'name' => 'Sistem Ayarları / Sertifikalar', - 'url' => '/ayarlar#certificates', - ], - [ - 'name' => 'Sistem Ayarları / Sağlık Durumu', - 'url' => '/ayarlar#health', - ], - [ - 'name' => 'Sistem Ayarları / DNS', - 'url' => '/ayarlar#dnsSettings', - ], - [ - 'name' => 'Sistem Ayarları / Mail Ayarları', - 'url' => '/ayarlar#mailSettings', - ], - [ - 'name' => 'Sistem Ayarları / İnce Ayarlar', - 'url' => '/ayarlar#limanTweaks', - ], - [ - 'name' => 'Yetki Talepleri', - 'url' => '/talepler', - ], - ], - 'user_searchable' => [ - [ - 'name' => 'Kullanıcı Profili', - 'url' => '/profil', - ], - [ - 'name' => 'Kasa', - 'url' => '/kasa', - ], - [ - 'name' => 'Erişim Anahtarları', - 'url' => '/profil/anahtarlarim', - ], - [ - 'name' => 'Yetki Talebi', - 'url' => '/taleplerim', - ], - ], - 'new_search' => [ + 'search' => [ 'admin' => [ [ 'name' => 'Sistem Ayarları', diff --git a/database/migrations/2019_11_01_131054_create_tmp_sessions_table.php b/database/migrations/2019_11_01_131054_create_tmp_sessions_table.php deleted file mode 100644 index f412f6ca3..000000000 --- a/database/migrations/2019_11_01_131054_create_tmp_sessions_table.php +++ /dev/null @@ -1,34 +0,0 @@ -bigIncrements('id'); - $table->string('session_id'); - $table->string('key'); - $table->text('value'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('tmp_sessions'); - } -} diff --git a/database/migrations/2020_01_27_163215_create_tunnel_tokens_table.php b/database/migrations/2020_01_27_163215_create_tunnel_tokens_table.php deleted file mode 100644 index 073afe17b..000000000 --- a/database/migrations/2020_01_27_163215_create_tunnel_tokens_table.php +++ /dev/null @@ -1,47 +0,0 @@ -uuid('id')->primary(); - $table->string('token'); - $table->string('remote_host'); - $table->string('remote_port', 5); - $table->string('local_port', 5); - $table->uuid('user_id'); - $table - ->foreign('user_id') - ->references('id') - ->on('users') - ->onDelete('cascade'); - $table->uuid('extension_id'); - $table - ->foreign('extension_id') - ->references('id') - ->on('extensions') - ->onDelete('cascade'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('tunnel_tokens'); - } -} diff --git a/database/migrations/2020_11_30_184635_create_replications_table.php b/database/migrations/2020_11_30_184635_create_replications_table.php deleted file mode 100644 index e9f97bfb2..000000000 --- a/database/migrations/2020_11_30_184635_create_replications_table.php +++ /dev/null @@ -1,37 +0,0 @@ -uuid('id'); - $table->uuid('liman_id'); - $table->string('key'); - $table->integer('status')->default(0); - $table->string('output', 9999); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('replications'); - } -} diff --git a/database/migrations/2020_12_03_112312_create_monitor_servers_table.php b/database/migrations/2020_12_03_112312_create_monitor_servers_table.php deleted file mode 100644 index 5c6739392..000000000 --- a/database/migrations/2020_12_03_112312_create_monitor_servers_table.php +++ /dev/null @@ -1,37 +0,0 @@ -uuid('id')->primary(); - $table->string('ip_address'); - $table->integer('port'); - $table->boolean('online'); - $table->timestamp('last_checked'); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('monitor_servers'); - } -} diff --git a/database/migrations/2020_12_03_113317_create_user_monitors_table.php b/database/migrations/2020_12_03_113317_create_user_monitors_table.php deleted file mode 100644 index d68108107..000000000 --- a/database/migrations/2020_12_03_113317_create_user_monitors_table.php +++ /dev/null @@ -1,36 +0,0 @@ -uuid('id')->primary(); - $table->string('name'); - $table->uuid('server_monitor_id'); - $table->string('user_id'); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('user_monitors'); - } -} diff --git a/public/css/auth.css b/public/css/auth.css deleted file mode 100644 index f7a4718f2..000000000 --- a/public/css/auth.css +++ /dev/null @@ -1,146 +0,0 @@ -*,::after,::before{box-sizing:border-box;} -body{margin:0;} -body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji';} -button,input{font-family:inherit;font-size:100%;line-height:1.15;margin:0;} -button{text-transform:none;} -[type=submit],button{-webkit-appearance:button;} -::-moz-focus-inner{border-style:none;padding:0;} -:-moz-focusring{outline:1px dotted ButtonText;} -h2,p{margin:0;} -button{background-color:transparent;background-image:none;} -button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color;} -body{font-family:inherit;line-height:inherit;} -*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb;} -img{border-style:solid;} -input::placeholder{opacity:1;color:#9ca3af;} -button{cursor:pointer;} -h2{font-size:inherit;font-weight:inherit;} -a{color:inherit;text-decoration:inherit;} -button,input{padding:0;line-height:inherit;color:inherit;} -img,svg{display:block;vertical-align:middle;} -img{max-width:100%;height:auto;} -*{--tw-shadow:0 0 #0000;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59, 130, 246, 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;} -[type=email],[type=password]{-webkit-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding-top:.5rem;padding-right:.75rem;padding-bottom:.5rem;padding-left:.75rem;font-size:1rem;line-height:1.5rem;} -[type=email]:focus,[type=password]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);border-color:#2563eb;} -input::placeholder{color:#6b7280;opacity:1;} -[type=checkbox]{-webkit-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;} -[type=checkbox]{border-radius:0;} -[type=checkbox]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);} -[type=checkbox]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat;} -[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");} -[type=checkbox]:checked:focus,[type=checkbox]:checked:hover{border-color:transparent;background-color:currentColor;} -.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;} -.relative{position:relative;} -.absolute{position:absolute;} -.inset-y-0{top:0;bottom:0;} -.left-0{left:0;} -.mx-auto{margin-left:auto;margin-right:auto;} -.mt-2{margin-top:.5rem;} -.mt-6{margin-top:1.5rem;} -.ml-2{margin-left:.5rem;} -.mt-8{margin-top:2rem;} -.block{display:block;} -.flex{display:flex;} -.h-5{height:1.25rem;} -.h-4{height:1rem;} -.h-12{height:3rem;} -.min-h-screen{min-height:100vh;} -.w-full{width:100%;} -.w-5{width:1.25rem;} -.w-auto{width:auto;} -.w-4{width:1rem;} -.max-w-md{max-width:28rem;} -.appearance-none{-webkit-appearance:none;appearance:none;} -.items-center{align-items:center;} -.justify-center{justify-content:center;} -.justify-between{justify-content:space-between;} -.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse));} -.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse));} -.-space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(-1px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(-1px * var(--tw-space-y-reverse));} -.overflow-hidden{overflow:hidden;} -.rounded-md{border-radius:.375rem;} -.rounded{border-radius:.25rem;} -.rounded-none{border-radius:0;} -.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem;} -.rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem;} -.border{border-width:1px;} -.border-gray-300{--tw-border-opacity:1;border-color:rgba(209,213,219,var(--tw-border-opacity));} -.border-transparent{border-color:transparent;} -.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(249,250,251,var(--tw-bg-opacity));} -.bg-indigo-600{--tw-bg-opacity:1;background-color:rgba(79,70,229,var(--tw-bg-opacity));} -.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity));} -.px-3{padding-left:.75rem;padding-right:.75rem;} -.py-2{padding-top:.5rem;padding-bottom:.5rem;} -.py-12{padding-top:3rem;padding-bottom:3rem;} -.px-4{padding-left:1rem;padding-right:1rem;} -.pl-3{padding-left:.75rem;} -.text-center{text-align:center;} -.font-sans{font-family:Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";} -.text-sm{font-size:.875rem;line-height:1.25rem;} -.text-3xl{font-size:1.875rem;line-height:2.25rem;} -.font-medium{font-weight:500;} -.font-extrabold{font-weight:800;} -.text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity));} -.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity));} -.text-indigo-600{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity));} -.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity));} -.text-indigo-500{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity));} -.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;} -.placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgba(107,114,128,var(--tw-placeholder-opacity));} -.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);} -.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgba(67,56,202,var(--tw-bg-opacity));} -.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity));} -.focus\:z-10:focus{z-index:10;} -.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgba(99,102,241,var(--tw-border-opacity));} -.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px;} -.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);} -.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(99, 102, 241, var(--tw-ring-opacity));} -.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;} -.group:hover .group-hover\:text-indigo-400{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity));} -@media (min-width:640px){ -.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem;} -.sm\:text-sm{font-size:.875rem;line-height:1.25rem;} -} -@media (min-width:1024px){ -.lg\:px-8{padding-left:2rem;padding-right:2rem;} -} - -.auth-bg { - background-image: url('../images/auth-bg.jpg'); - background-size: cover; -} - -#captcha { - width: 151px; - height: 38px; -} - -#captcha > img { - border-radius: 0.25rem; - border: 1px rgba(209,213,219,1) solid; - height: 38px; - margin: 0 14px; -} - -#captcha_field { - max-width: 52%; -} - -@media only screen and (max-width: 750px) { - #captcha_field { - max-width: 48%; - } -} - -@media only screen and (max-width: 695px) { - #captcha_field { - max-width: 45%; - } -} - -#captcha_field:focus { - outline: 2px solid transparent; - outline-offset: 2px; - border: 1px rgba(99, 102, 241, 1) solid!important; - z-index: 10; -} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 6618b9d54..000000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/images/aciklab-dikey.svg b/public/images/aciklab-dikey.svg deleted file mode 100644 index 56e793a22..000000000 --- a/public/images/aciklab-dikey.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/aciklab-footer.svg b/public/images/aciklab-footer.svg deleted file mode 100644 index 5e1fdca7a..000000000 --- a/public/images/aciklab-footer.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/aciklab-yatay.svg b/public/images/aciklab-yatay.svg deleted file mode 100644 index 8bf341cbd..000000000 --- a/public/images/aciklab-yatay.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/auth-bg.jpg b/public/images/auth-bg.jpg deleted file mode 100644 index d3217d9e0..000000000 Binary files a/public/images/auth-bg.jpg and /dev/null differ diff --git a/public/images/limanlogo.svg b/public/images/limanlogo.svg deleted file mode 100644 index e4f200faf..000000000 --- a/public/images/limanlogo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/no-icon.jpg b/public/images/no-icon.jpg deleted file mode 100644 index 54e2dea16..000000000 Binary files a/public/images/no-icon.jpg and /dev/null differ diff --git a/public/js/gsap.min.js b/public/js/gsap.min.js deleted file mode 100644 index 78ff87254..000000000 --- a/public/js/gsap.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * GSAP 3.1.1 - * https://greensock.com - * - * @license Copyright 2020, GreenSock. All rights reserved. - * Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership. - * @author: Jack Doyle, jack@greensock.com - */ - -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t){return"string"==typeof t}function o(t){return"function"==typeof t}function p(t){return"number"==typeof t}function q(t){return void 0===t}function r(t){return"object"==typeof t}function s(t){return!1!==t}function t(){return"undefined"!=typeof window}function u(t){return o(t)||n(t)}function J(t){return(l=_t(t,at))&&ne}function K(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")}function L(t,e){return!e&&console.warn(t)}function M(t,e){return t&&(at[t]=e)&&l&&(l[t]=e)||at}function N(){return 0}function X(t){var e,n,i=t[0];if(r(i)||o(i)||(t=[t]),!(e=(i._gsap||{}).harness)){for(n=pt.length;n--&&!pt[n].targetTest(i););e=pt[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new Et(t[n],e)))||t.splice(n,1);return t}function Y(t){return t._gsap||X(yt(t))[0]._gsap}function Z(t,e){var r=t[e];return o(r)?t[e]():q(r)&&t.getAttribute(e)||r}function $(t,e){return(t=t.split(",")).forEach(e)||t}function _(t){return Math.round(1e4*t)/1e4}function aa(t,e){for(var r=e.length,n=0;t.indexOf(e[n])<0&&++na;)s=s._prev;s?(e._next=s._next,s._next=e):(e._next=t[r],t[r]=e),e._next?e._next._prev=e:t[n]=e,e._prev=s,e.parent=t}(t,e,"_first","_last",t._sort?"_start":0),(t._recent=e)._time||!e._dur&&e._initted){var n=(t.rawTime()-e._start)*e._ts;(!e._dur||gt(0,e.totalDuration(),n)-e._tTime>B)&&e.render(n,!0)}if(qa(t),t._dp&&t._time>=t._dur&&t._ts&&t._dur=F?s.endTime(!1):t._dur;return n(e)&&(isNaN(e)||e in a)?"<"===(r=e.charAt(0))||">"===r?("<"===r?s._start:s.endTime(0<=s._repeat))+(parseFloat(e.substr(1))||0):(r=e.indexOf("="))<0?(e in a||(a[e]=o),a[e]):(i=+(e.charAt(r-1)+e.substr(r+1)),1(i=Math.abs(i))&&(a=n,o=i);return a}function _a(t){return pa(t),t.progress()<1&&wt(t,"onInterrupt"),t}function eb(t,e,r){return(6*(t=t<0?t+1:1>16,t>>8&Tt,t&Tt]:0:xt.black;if(!d){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),xt[t])d=xt[t];else if("#"===t.charAt(0))4===t.length&&(t="#"+(r=t.charAt(1))+r+(n=t.charAt(2))+n+(i=t.charAt(3))+i),d=[(t=parseInt(t.substr(1),16))>>16,t>>8&Tt,t&Tt];else if("hsl"===t.substr(0,3))if(d=f=t.match(H),e){if(~t.indexOf("="))return t.match(tt)}else a=+d[0]%360/360,s=d[1]/100,r=2*(o=d[2]/100)-(n=o<=.5?o*(s+1):o+s-o*s),3=n&&ee)return n;n=n._next}else for(n=t._last;n&&n._start>=r;){if(!n._dur&&"isPause"===n.data&&n._start=i._start)&&i._ts&&h!==i){if(i.parent!==this)return this.render(t,e,r);if(i.render(0=this.totalDuration()||!y&&this._ts<0)&&(f!==this._start&&Math.abs(l)===Math.abs(this._ts)||(!t&&v||!(t&&0=n&&(a instanceof jt?e&&i.push(a):(r&&i.push(a),t&&i.push.apply(i,a.getChildren(!0,e,r)))),a=a._next;return i},t.getById=function getById(t){for(var e=this.getChildren(1,1,1),r=e.length;r--;)if(e[r].vars.id===t)return e[r]},t.remove=function remove(t){return n(t)?this.removeLabel(t):o(t)?this.killTweensOf(t):(oa(this,t),t===this._recent&&(this._recent=this._last),qa(this))},t.totalTime=function totalTime(t,e){return arguments.length?(this._forcing=1,this.parent||this._dp||!this._ts||(this._start=Ct.time-(0=r&&(i._start+=t),i=i._next;if(e)for(n in a)a[n]>=r&&(a[n]+=t);return qa(this)},t.invalidate=function invalidate(){var t=this._first;for(this._lock=0;t;)t.invalidate(),t=t._next;return i.prototype.invalidate.call(this)},t.clear=function clear(t){void 0===t&&(t=!0);for(var e,r=this._first;r;)e=r._next,this.remove(r),r=e;return this._time=this._tTime=0,t&&(this.labels={}),qa(this)},t.totalDuration=function totalDuration(t){var e,r,n=0,i=this,a=i._last,s=F,o=i._repeat,u=o*i._rDelay||0,h=o<0;if(arguments.length)return h?i:i.timeScale(i.totalDuration()/t);if(i._dirty){for(;a;)e=a._prev,a._dirty&&a.totalDuration(),a._start>s&&i._sort&&a._ts&&!i._lock?(i._lock=1,wa(i,a,a._start-a._delay),i._lock=0):s=a._start,a._start<0&&a._ts&&(n-=a._start,(!i.parent&&!i._dp||i.parent&&i.parent.smoothChildTiming)&&(i._start+=a._start/i._ts,i._time-=a._start,i._tTime-=a._start),i.shiftChildren(-a._start,!1,-1e20),s=0),n<(r=a._end=a._start+a._tDur/Math.abs(a._ts||a._pauseTS||B))&&a._ts&&(n=_(r)),a=e;i._dur=i===E&&i._time>n?i._time:Math.min(F,n),i._tDur=h&&(i._dur||u)?1e12:Math.min(F,n*(o+1)+u),i._end=i._start+(i._tDur/Math.abs(i._ts||i._pauseTS||B)||0),i._dirty=0}return i._tDur},Timeline.updateRoot=function updateRoot(t){if(E._ts&&(da(E,va(t,E)),d=Ct.frame),Ct.frame>=ft){ft+=j.autoSleep||120;var e=E._first;if((!e||!e._ts)&&j.autoSleep&&Ct._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ct.sleep()}}},Timeline}(zt);ga(Bt.prototype,{_lock:0,_hasPause:0,_forcing:0});function Eb(t,e,i,a,s,u){var h,l,f,p;if(ht[t]&&!1!==(h=new ht[t]).init(s,h.rawVars?e[t]:function _processVars(t,e,i,a,s){if(o(t)&&(t=Yt(t,s,e,i,a)),!r(t)||t.style&&t.nodeType||G(t))return n(t)?Yt(t,s,e,i,a):t;var u,h={};for(u in t)h[u]=Yt(t[u],s,e,i,a);return h}(e[t],a,s,u,i),i,a,u)&&(i._pt=l=new ee(i._pt,s,t,0,1,h.render,h,0,h.priority),i!==c))for(f=i._ptLookup[i._targets.indexOf(s)],p=h._props.length;p--;)f[h._props[p]]=l;return h}var Lt,It=function _addPropTween(t,e,r,i,a,s,u,h,l){o(i)&&(i=i(a||0,t,s));var f,p=t[e],d="get"!==r?r:o(p)?l?t[e.indexOf("set")||!o(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():p,_=o(p)?l?$t:Vt:Ut;if(n(i)&&(~i.indexOf("random(")&&(i=Wa(i)),"="===i.charAt(1)&&(i=parseFloat(d)+parseFloat(i.substr(2))*("-"===i.charAt(0)?-1:1)+(Fa(d)||0))),d!==i)return isNaN(d+i)?(p||e in t||K(e,i),function _addComplexStringPropTween(t,e,r,n,i,a,s){var o,u,h,l,f,p,d,_,c=new ee(this._pt,t,e,0,1,Gt,null,i),m=0,g=0;for(c.b=r,c.e=n,r+="",(d=~(n+="").indexOf("random("))&&(n=Wa(n)),a&&(a(_=[r,n],t,e),r=_[0],n=_[1]),u=r.match(et)||[];o=et.exec(n);)l=o[0],f=n.substring(m,o.index),h?h=(h+1)%5:"rgba("===f.substr(-5)&&(h=1),l!==u[g++]&&(p=parseFloat(u[g-1])||0,c._pt={_next:c._pt,p:f||1===g?f:",",s:p,c:"="===l.charAt(1)?parseFloat(l.substr(2))*("-"===l.charAt(0)?-1:1):parseFloat(l)-p,m:h&&h<4?Math.round:0},m=et.lastIndex);return c.c=m")});else{if(l=k.length,_=b?Ma(b):N,r(b))for(f in b)~qt.indexOf(f)&&((c=c||{})[f]=b[f]);for(o=0;o=t._tDur||e<0)&&t.ratio===s&&(t.ratio&&pa(t,1),r||(wt(t,t.ratio?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}}(this,t,e,r);return this},t.targets=function targets(){return this._targets},t.invalidate=function invalidate(){return this._pt=this._op=this._startAt=this._onUpdate=this._act=this._lazy=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),O.prototype.invalidate.call(this)},t.kill=function kill(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e)&&(this._lazy=0,this.parent))return _a(this);if(this.timeline)return this.timeline.killTweensOf(t,e,Lt&&!0!==Lt.vars.overwrite),this;var r,i,a,s,o,u,h,l=this._targets,f=t?yt(t):l,p=this._ptLookup,d=this._pt;if((!e||"all"===e)&&function _arraysMatch(t,e){for(var r=t.length,n=r===e.length;n&&r--&&t[r]===e[r];);return r<0}(l,f))return _a(this);for(r=this._op=this._op||[],"all"!==e&&(n(e)&&(o={},$(e,function(t){return o[t]=1}),e=o),e=function _addAliasesToVars(t,e){var r,n,i,a,s=t[0]?Y(t[0]).harness:0,o=s&&s.aliases;if(!o)return e;for(n in r=_t({},e),o)if(n in r)for(i=(a=o[n].split(",")).length;i--;)r[a[i]]=r[n];return r}(l,e)),h=l.length;h--;)if(~f.indexOf(l[h]))for(o in i=p[h],"all"===e?(r[h]=e,s=i,a={}):(a=r[h]=r[h]||{},s=e),s)(u=i&&i[o])&&("kill"in u.d&&!0!==u.d.kill(o)||oa(this,u,"_pt"),delete i[o]),"all"!==a&&(a[o]=1);return this._initted&&!this._pt&&d&&_a(this),this},Tween.to=function to(t,e,r){return new Tween(t,e,r)},Tween.from=function from(t,e){return new Tween(t,ba(arguments,1))},Tween.delayedCall=function delayedCall(t,e,r,n){return new Tween(e,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:e,onReverseComplete:e,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:n})},Tween.fromTo=function fromTo(t,e,r){return new Tween(t,ba(arguments,2))},Tween.set=function set(t,e){return e.duration=0,e.repeatDelay||(e.repeat=0),new Tween(t,e)},Tween.killTweensOf=function killTweensOf(t,e,r){return E.killTweensOf(t,e,r)},Tween}(zt);ga(jt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),$("staggerTo,staggerFrom,staggerFromTo",function(r){jt[r]=function(){var t=new Bt,e=vt.call(arguments,0);return e.splice("staggerFromTo"===r?5:4,0,0),t[r].apply(t,e)}});function Pb(t,e,r){return t.setAttribute(e,r)}function Xb(t,e,r,n){n.mSet(t,e,n.m.call(n.tween,r,n.mt),n)}var Ut=function _setterPlain(t,e,r){return t[e]=r},Vt=function _setterFunc(t,e,r){return t[e](r)},$t=function _setterFuncWithParam(t,e,r,n){return t[e](n.fp,r)},Wt=function _getSetter(t,e){return o(t[e])?Vt:q(t[e])&&t.setAttribute?Pb:Ut},Qt=function _renderPlain(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4,e)},Zt=function _renderBoolean(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},Gt=function _renderComplexString(t,e){var r=e._pt,n="";if(!t&&e.b)n=e.b;else if(1===t&&e.e)n=e.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*t):Math.round(1e4*(r.s+r.c*t))/1e4)+n,r=r._next;n+=e.c}e.set(e.t,e.p,n,e)},Jt=function _renderPropTweens(t,e){for(var r=e._pt;r;)r.r(t,r.d),r=r._next},Ht=function _addPluginModifier(t,e,r,n){for(var i,a=this._pt;a;)i=a._next,a.p===n&&a.modifier(t,e,r),a=i},Kt=function _killPropTweensOf(t){for(var e,r,n=this._pt;n;)r=n._next,n.p===t&&!n.op||n.op===t?oa(this,n,"_pt"):n.dep||(e=1),n=r;return!e},te=function _sortPropTweensByPriority(t){for(var e,r,n,i,a=t._pt;a;){for(e=a._next,r=n;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:i)?a._prev._next=a:n=a,(a._next=r)?r._prev=a:i=a,a=e}t._pt=n},ee=(PropTween.prototype.modifier=function modifier(t,e,r){this.mSet=this.mSet||this.set,this.set=Xb,this.m=t,this.mt=r,this.tween=e},PropTween);function PropTween(t,e,r,n,i,a,s,o,u){this.t=e,this.s=n,this.c=i,this.p=r,this.r=a||Qt,this.d=s||this,this.set=o||Ut,this.pr=u||0,(this._next=t)&&(t._prev=this)}$(dt+",parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert",function(t){st[t]=1,"on"===t.substr(0,2)&&(st[t+"Params"]=1)}),at.TweenMax=at.TweenLite=jt,at.TimelineLite=at.TimelineMax=Bt,E=new Bt({sortChildren:!1,defaults:z,autoRemoveChildren:!0,id:"root"}),j.stringFilter=jb;var re={registerPlugin:function registerPlugin(){for(var t=arguments.length,e=new Array(t),r=0;r+~]|"+N+")"+N+"*"),V=new RegExp(N+"|>"),X=new RegExp(B),U=new RegExp("^"+R+"$"),q={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+N+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){u()},at=xt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(P=L.call(w.childNodes),w.childNodes),P[w.childNodes.length].nodeType}catch(e){O={apply:P.length?function(t,e){M.apply(t,L.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function st(t,e,i,r){var o,s,c,d,h,p,v,y=e&&e.ownerDocument,w=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return i;if(!r&&(u(e),e=e||f,g)){if(11!==w&&(h=J.exec(t)))if(o=h[1]){if(9===w){if(!(c=e.getElementById(o)))return i;if(c.id===o)return i.push(c),i}else if(y&&(c=y.getElementById(o))&&b(e,c)&&c.id===o)return i.push(c),i}else{if(h[2])return O.apply(i,e.getElementsByTagName(t)),i;if((o=h[3])&&n.getElementsByClassName&&e.getElementsByClassName)return O.apply(i,e.getElementsByClassName(o)),i}if(n.qsa&&!T[t+" "]&&(!m||!m.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===w&&(V.test(t)||$.test(t))){for((y=tt.test(t)&&vt(e.parentNode)||e)===e&&n.scope||((d=e.getAttribute("id"))?d=d.replace(it,rt):e.setAttribute("id",d=x)),s=(p=a(t)).length;s--;)p[s]=(d?"#"+d:":scope")+" "+bt(p[s]);v=p.join(",")}try{if(n.cssSupportsSelector&&!CSS.supports("selector(:is("+v+"))"))throw new Error;return O.apply(i,y.querySelectorAll(v)),i}catch(e){T(t,!0)}finally{d===x&&e.removeAttribute("id")}}}return l(t.replace(Y,"$1"),e,i,r)}function lt(){var t=[];return function e(n,r){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function ct(t){return t[x]=!0,t}function dt(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ht(t,e){for(var n=t.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=e}function ut(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function gt(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&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ct((function(e){return e=+e,ct((function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!G.test(e||n&&n.nodeName||"HTML")},u=st.setDocument=function(t){var e,r,a=t?t.ownerDocument||t:w;return a!=f&&9===a.nodeType&&a.documentElement&&(p=(f=a).documentElement,g=!o(f),w!=f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ot,!1):r.attachEvent&&r.attachEvent("onunload",ot)),n.scope=dt((function(t){return p.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.cssSupportsSelector=dt((function(){return CSS.supports("selector(*)")&&f.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")})),n.attributes=dt((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=dt((function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(f.getElementsByClassName),n.getById=dt((function(t){return p.appendChild(t).id=x,!f.getElementsByName||!f.getElementsByName(x).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(n.qsa=Q.test(f.querySelectorAll))&&(dt((function(t){var e;p.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+N+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+N+"*(?:value|"+F+")"),t.querySelectorAll("[id~="+x+"-]").length||m.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||m.push("\\["+N+"*name"+N+"*="+N+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]"),t.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),dt((function(t){t.innerHTML="";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+N+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=Q.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&dt((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",B)})),n.cssSupportsSelector||m.push(":has"),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=Q.test(p.compareDocumentPosition),b=e||Q.test(p.contains)?function(t,e){var n=9===t.nodeType&&t.documentElement||t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},D=e?function(t,e){if(t===e)return h=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==f||t.ownerDocument==w&&b(w,t)?-1:e==f||e.ownerDocument==w&&b(w,e)?1:d?j(d,t)-j(d,e):0:4&i?-1:1)}:function(t,e){if(t===e)return h=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!r||!o)return t==f?-1:e==f?1:r?-1:o?1:d?j(d,t)-j(d,e):0;if(r===o)return ut(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?ut(a[i],s[i]):a[i]==w?-1:s[i]==w?1:0}),f},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(u(t),n.matchesSelector&&g&&!T[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){T(e,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===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]||st.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]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return q.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&X.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=S[t+" "];return e||(e=new RegExp("(^|"+N+")"+t+"("+N+"|$)"))&&S(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=st.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(t,e,n){return p(e)?w.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?w.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?w.grep(t,(function(t){return-1)[^>]*|#([\w-]+))$/;(w.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||P,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:E.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof w?e[0]:e,w.merge(this,w.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:m,!0)),D.test(i[1])&&w.isPlainObject(e))for(i in e)p(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=m.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):p(t)?void 0!==n.ready?n.ready(t):t(w):w.makeArray(t,this)}).prototype=w.fn,P=w(m);var M=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function L(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}w.fn.extend({has:function(t){var e=w(t,this),n=e.length;return this.filter((function(){for(var t=0;t\x20\t\r\n\f]*)/i,pt=/^$|^module$|\/(?:java|ecma)script/i;dt=m.createDocumentFragment().appendChild(m.createElement("div")),(ht=m.createElement("input")).setAttribute("type","radio"),ht.setAttribute("checked","checked"),ht.setAttribute("name","t"),dt.appendChild(ht),f.checkClone=dt.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.innerHTML="",f.noCloneChecked=!!dt.cloneNode(!0).lastChild.defaultValue,dt.innerHTML="",f.option=!!dt.lastChild;var gt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function mt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?w.merge([t],n):n}function vt(t,e){for(var n=0,i=t.length;n",""]);var yt=/<|&#?\w+;/;function bt(t,e,n,i,r){for(var o,a,s,l,c,d,h=e.createDocumentFragment(),u=[],f=0,p=t.length;f\s*$/g;function It(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Pt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Et(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Mt(t,e){var n,i,r,o,a,s;if(1===e.nodeType){if(G.hasData(t)&&(s=G.get(t).events))for(r in G.remove(e,"handle events"),s)for(n=0,i=s[r].length;n").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ve,Xe=[],Ue=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Xe.pop()||w.expando+"_"+ke.guid++;return this[t]=!0,t}}),w.ajaxPrefilter("json jsonp",(function(e,n,i){var r,o,a,s=!1!==e.jsonp&&(Ue.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ue.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=p(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Ue,"$1"+r):!1!==e.jsonp&&(e.url+=(Se.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||w.error(r+" was not called"),a[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){a=arguments},i.always((function(){void 0===o?w(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=n.jsonpCallback,Xe.push(r)),a&&p(o)&&o(a[0]),a=o=void 0})),"script"})),f.createHTMLDocument=((Ve=m.implementation.createHTMLDocument("").body).innerHTML="
",2===Ve.childNodes.length),w.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(f.createHTMLDocument?((i=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(i)):e=m),o=!n&&[],(r=D.exec(t))?[e.createElement(r[1])]:(r=bt([t],e,o),o&&o.length&&w(o).remove(),w.merge([],r.childNodes)));var i,r,o},w.fn.load=function(t,e,n){var i,r,o,a=this,s=t.indexOf(" ");return-1").append(w.parseHTML(t)).find(i):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},w.expr.pseudos.animated=function(t){return w.grep(w.timers,(function(e){return t===e.elem})).length},w.offset={setOffset:function(t,e,n){var i,r,o,a,s,l,c=w.css(t,"position"),d=w(t),h={};"static"===c&&(t.style.position="relative"),s=d.offset(),o=w.css(t,"top"),l=w.css(t,"left"),("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(a=(i=d.position()).top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),p(e)&&(e=e.call(t,n,w.extend({},s))),null!=e.top&&(h.top=e.top-s.top+a),null!=e.left&&(h.left=e.left-s.left+r),"using"in e?e.using.call(t,h):d.css(h)}},w.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){w.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],r={top:0,left:0};if("fixed"===w.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===w.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((r=w(t).offset()).top+=w.css(t,"borderTopWidth",!0),r.left+=w.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-w.css(i,"marginTop",!0),left:e.left-r.left-w.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===w.css(t,"position");)t=t.offsetParent;return t||it}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;w.fn[t]=function(i){return Y(this,(function(t,i,r){var o;if(g(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):t[i]=r}),t,i,arguments.length)}})),w.each(["top","left"],(function(t,e){w.cssHooks[e]=Wt(f.pixelPosition,(function(t,n){if(n)return n=Yt(t,e),jt.test(n)?w(t).position()[e]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(t,e){w.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){w.fn[i]=function(r,o){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===o?"margin":"border");return Y(this,(function(e,n,r){var o;return g(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?w.css(e,n,s):w.style(e,n,r,s)}),e,a?r:void 0,a)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){w.fn[e]=function(t){return this.on(e,t)}})),w.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){w.fn[e]=function(t,n){return 0>>0,i=0;i0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var R=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,H=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},z={};function Y(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(z[t]=r),e&&(z[e[0]]=function(){return N(r.apply(this,arguments),e[1],e[2])}),n&&(z[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=$(e,t.localeData()),B[e]=B[e]||function(t){var e,n,i,r=t.match(R);for(e=0,n=r.length;e=0&&H.test(t);)t=t.replace(H,i),H.lastIndex=0,n-=1;return t}var V=/\d/,X=/\d\d/,U=/\d{3}/,q=/\d{4}/,G=/[+-]?\d{6}/,K=/\d\d?/,Z=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,J=/\d{1,3}/,tt=/\d{1,4}/,et=/[+-]?\d{1,6}/,nt=/\d+/,it=/[+-]?\d+/,rt=/Z|[+-]\d\d:?\d\d/gi,ot=/Z|[+-]\d\d(?::?\d\d)?/gi,at=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,st={};function lt(t,e,n){st[t]=D(e)?e:function(t,i){return t&&n?n:e}}function ct(t,e){return c(st,t)?st[t](e._strict,e._locale):new RegExp(dt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,i,r){return e||n||i||r}))))}function dt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ht={};function ut(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),a(e)&&(i=function(t,n){n[e]=w(t)}),n=0;n68?1900:2e3)};var At,Tt=Dt("FullYear",!0);function Dt(t,e){return function(i){return null!=i?(Pt(this,t,i),n.updateOffset(this,e),this):It(this,t)}}function It(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Pt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&Ct(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Et(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function Et(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,i=(e%(n=12)+n)%n;return t+=(e-i)/12,1===i?Ct(t)?29:28:31-i%7%2}At=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e=0?(s=new Date(t+400,e,n,i,r,o,a),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,r,o,a),s}function Yt(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Wt(t,e,n){var i=7+e-n;return-((7+Yt(t,0,i).getUTCDay()-e)%7)+i-1}function $t(t,e,n,i,r){var o,a,s=1+7*(e-1)+(7+n-i)%7+Wt(t,i,r);return s<=0?a=St(o=t-1)+s:s>St(t)?(o=t+1,a=s-St(t)):(o=t,a=s),{year:o,dayOfYear:a}}function Vt(t,e,n){var i,r,o=Wt(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?i=a+Xt(r=t.year()-1,e,n):a>Xt(t.year(),e,n)?(i=a-Xt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=a),{week:i,year:r}}function Xt(t,e,n){var i=Wt(t,e,n),r=Wt(t+1,e,n);return(St(t)-i+r)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),F("week",5),F("isoWeek",5),lt("w",K),lt("ww",K,X),lt("W",K),lt("WW",K,X),ft(["w","ww","W","WW"],(function(t,e,n,i){e[i.substr(0,1)]=w(t)}));function Ut(t,e){return t.slice(e,7).concat(t.slice(0,e))}Y("d",0,"do","day"),Y("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),Y("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),Y("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),ft(["dd","ddd","dddd"],(function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:u(n).invalidWeekday=t})),ft(["d","e","E"],(function(t,e,n,i){e[i]=w(t)}));var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Gt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Kt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Zt(t,e,n){var i,r,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=h([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(r=At.call(this._weekdaysParse,a))?r:null:"ddd"===e?-1!==(r=At.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=At.call(this._minWeekdaysParse,a))?r:null:"dddd"===e?-1!==(r=At.call(this._weekdaysParse,a))||-1!==(r=At.call(this._shortWeekdaysParse,a))||-1!==(r=At.call(this._minWeekdaysParse,a))?r:null:"ddd"===e?-1!==(r=At.call(this._shortWeekdaysParse,a))||-1!==(r=At.call(this._weekdaysParse,a))||-1!==(r=At.call(this._minWeekdaysParse,a))?r:null:-1!==(r=At.call(this._minWeekdaysParse,a))||-1!==(r=At.call(this._weekdaysParse,a))||-1!==(r=At.call(this._shortWeekdaysParse,a))?r:null}var Qt=at;var Jt=at;var te=at;function ee(){function t(t,e){return e.length-t.length}var e,n,i,r,o,a=[],s=[],l=[],c=[];for(e=0;e<7;e++)n=h([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(i),s.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(a.sort(t),s.sort(t),l.sort(t),c.sort(t),e=0;e<7;e++)s[e]=dt(s[e]),l[e]=dt(l[e]),c[e]=dt(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function ne(){return this.hours()%12||12}function ie(t,e){Y(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function re(t,e){return e._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,ne),Y("k",["kk",2],0,(function(){return this.hours()||24})),Y("hmm",0,0,(function(){return""+ne.apply(this)+N(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+ne.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),ie("a",!0),ie("A",!1),M("hour","h"),F("hour",13),lt("a",re),lt("A",re),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,X),lt("hh",K,X),lt("kk",K,X),lt("hmm",Z),lt("hmmss",Q),lt("Hmm",Z),lt("Hmmss",Q),ut(["H","HH"],yt),ut(["k","kk"],(function(t,e,n){var i=w(t);e[yt]=24===i?0:i})),ut(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),ut(["h","hh"],(function(t,e,n){e[yt]=w(t),u(n).bigHour=!0})),ut("hmm",(function(t,e,n){var i=t.length-2;e[yt]=w(t.substr(0,i)),e[bt]=w(t.substr(i)),u(n).bigHour=!0})),ut("hmmss",(function(t,e,n){var i=t.length-4,r=t.length-2;e[yt]=w(t.substr(0,i)),e[bt]=w(t.substr(i,2)),e[xt]=w(t.substr(r)),u(n).bigHour=!0})),ut("Hmm",(function(t,e,n){var i=t.length-2;e[yt]=w(t.substr(0,i)),e[bt]=w(t.substr(i))})),ut("Hmmss",(function(t,e,n){var i=t.length-4,r=t.length-2;e[yt]=w(t.substr(0,i)),e[bt]=w(t.substr(i,2)),e[xt]=w(t.substr(r))}));var oe,ae=Dt("Hours",!0),se={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ot,monthsShort:Lt,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:Kt,weekdaysShort:Gt,meridiemParse:/[ap]\.?m?\.?/i},le={},ce={};function de(t){return t?t.toLowerCase().replace("_","-"):t}function he(t){var e=null;if(!le[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=oe._abbr,require("./locale/"+t),ue(e)}catch(t){}return le[t]}function ue(t,e){var n;return t&&((n=o(e)?pe(t):fe(t,e))?oe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),oe._abbr}function fe(t,e){if(null!==e){var n,i=se;if(e.abbr=t,null!=le[t])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=le[t]._config;else if(null!=e.parentLocale)if(null!=le[e.parentLocale])i=le[e.parentLocale]._config;else{if(null==(n=he(e.parentLocale)))return ce[e.parentLocale]||(ce[e.parentLocale]=[]),ce[e.parentLocale].push({name:t,config:e}),null;i=n._config}return le[t]=new P(I(i,e)),ce[t]&&ce[t].forEach((function(t){fe(t.name,t.config)})),ue(t),le[t]}return delete le[t],null}function pe(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return oe;if(!i(t)){if(e=he(t))return e;t=[t]}return function(t){for(var e,n,i,r,o=0;o0;){if(i=he(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&_(r,n,!0)>=e-1)break;e--}o++}return oe}(t)}function ge(t){var e,n=t._a;return n&&-2===u(t).overflow&&(e=n[mt]<0||n[mt]>11?mt:n[vt]<1||n[vt]>Et(n[gt],n[mt])?vt:n[yt]<0||n[yt]>24||24===n[yt]&&(0!==n[bt]||0!==n[xt]||0!==n[wt])?yt:n[bt]<0||n[bt]>59?bt:n[xt]<0||n[xt]>59?xt:n[wt]<0||n[wt]>999?wt:-1,u(t)._overflowDayOfYear&&(evt)&&(e=vt),u(t)._overflowWeeks&&-1===e&&(e=_t),u(t)._overflowWeekday&&-1===e&&(e=kt),u(t).overflow=e),t}function me(t,e,n){return null!=t?t:null!=e?e:n}function ve(t){var e,i,r,o,a,s=[];if(!t._d){for(r=function(t){var e=new Date(n.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[vt]&&null==t._a[mt]&&function(t){var e,n,i,r,o,a,s,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)o=1,a=4,n=me(e.GG,t._a[gt],Vt(Me(),1,4).year),i=me(e.W,1),((r=me(e.E,1))<1||r>7)&&(l=!0);else{o=t._locale._week.dow,a=t._locale._week.doy;var c=Vt(Me(),o,a);n=me(e.gg,t._a[gt],c.year),i=me(e.w,c.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}i<1||i>Xt(n,o,a)?u(t)._overflowWeeks=!0:null!=l?u(t)._overflowWeekday=!0:(s=$t(n,i,r,o,a),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(a=me(t._a[gt],r[gt]),(t._dayOfYear>St(a)||0===t._dayOfYear)&&(u(t)._overflowDayOfYear=!0),i=Yt(a,0,t._dayOfYear),t._a[mt]=i.getUTCMonth(),t._a[vt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[yt]&&0===t._a[bt]&&0===t._a[xt]&&0===t._a[wt]&&(t._nextDay=!0,t._a[yt]=0),t._d=(t._useUTC?Yt:zt).apply(null,s),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[yt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(u(t).weekdayMismatch=!0)}}var ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,be=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xe=/Z|[+-]\d\d(?::?\d\d)?/,we=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_e=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ke=/^\/?Date\((\-?\d+)/i;function Se(t){var e,n,i,r,o,a,s=t._i,l=ye.exec(s)||be.exec(s);if(l){for(u(t).iso=!0,e=0,n=we.length;e0&&u(t).unusedInput.push(a),s=s.slice(s.indexOf(i)+i.length),c+=i.length),z[o]?(i?u(t).empty=!1:u(t).unusedTokens.push(o),pt(o,i,t)):t._strict&&!i&&u(t).unusedTokens.push(o);u(t).charsLeftOver=l-c,s.length>0&&u(t).unusedInput.push(s),t._a[yt]<=12&&!0===u(t).bigHour&&t._a[yt]>0&&(u(t).bigHour=void 0),u(t).parsedDateParts=t._a.slice(0),u(t).meridiem=t._meridiem,t._a[yt]=function(t,e,n){var i;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}(t._locale,t._a[yt],t._meridiem),ve(t),ge(t)}else De(t);else Se(t)}function Pe(t){var e=t._i,c=t._f;return t._locale=t._locale||pe(t._l),null===e||void 0===c&&""===e?p({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),b(e)?new y(ge(e)):(s(e)?t._d=e:i(c)?function(t){var e,n,i,r,o;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rthis?this:t:p()}));function je(t,e){var n,r;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Me();for(n=e[0],r=1;r=0?new Date(t+400,e,n)-cn:new Date(t,e,n).valueOf()}function un(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-cn:Date.UTC(t,e,n)}function fn(t,e){Y(0,[t,t.length],0,e)}function pn(t,e,n,i,r){var o;return null==t?Vt(this,i,r).year:(e>(o=Xt(t,i,r))&&(e=o),gn.call(this,t,e,n,i,r))}function gn(t,e,n,i,r){var o=$t(t,e,n,i,r),a=Yt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),fn("gggg","weekYear"),fn("ggggg","weekYear"),fn("GGGG","isoWeekYear"),fn("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),lt("G",it),lt("g",it),lt("GG",K,X),lt("gg",K,X),lt("GGGG",tt,q),lt("gggg",tt,q),lt("GGGGG",et,G),lt("ggggg",et,G),ft(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,i){e[i.substr(0,2)]=w(t)})),ft(["gg","GG"],(function(t,e,i,r){e[r]=n.parseTwoDigitYear(t)})),Y("Q",0,"Qo","quarter"),M("quarter","Q"),F("quarter",7),lt("Q",V),ut("Q",(function(t,e){e[mt]=3*(w(t)-1)})),Y("D",["DD",2],"Do","date"),M("date","D"),F("date",9),lt("D",K),lt("DD",K,X),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),ut(["D","DD"],vt),ut("Do",(function(t,e){e[vt]=w(t.match(K)[0])}));var mn=Dt("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),F("dayOfYear",4),lt("DDD",J),lt("DDDD",U),ut(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=w(t)})),Y("m",["mm",2],0,"minute"),M("minute","m"),F("minute",14),lt("m",K),lt("mm",K,X),ut(["m","mm"],bt);var vn=Dt("Minutes",!1);Y("s",["ss",2],0,"second"),M("second","s"),F("second",15),lt("s",K),lt("ss",K,X),ut(["s","ss"],xt);var yn,bn=Dt("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),M("millisecond","ms"),F("millisecond",16),lt("S",J,V),lt("SS",J,X),lt("SSS",J,U),yn="SSSS";yn.length<=9;yn+="S")lt(yn,nt);function xn(t,e){e[wt]=w(1e3*("0."+t))}for(yn="S";yn.length<=9;yn+="S")ut(yn,xn);var wn=Dt("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var _n=y.prototype;function kn(t){return t}_n.add=Je,_n.calendar=function(t,e){var i=t||Me(),r=We(i,this).startOf("day"),o=n.calendarFormat(this,r)||"sameElse",a=e&&(D(e[o])?e[o].call(this,i):e[o]);return this.format(a||this.localeData().calendar(o,this,Me(i)))},_n.clone=function(){return new y(this)},_n.diff=function(t,e,n){var i,r,o;if(!this.isValid())return NaN;if(!(i=We(t,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),e=O(e)){case"year":o=en(this,i)/12;break;case"month":o=en(this,i);break;case"quarter":o=en(this,i)/3;break;case"second":o=(this-i)/1e3;break;case"minute":o=(this-i)/6e4;break;case"hour":o=(this-i)/36e5;break;case"day":o=(this-i-r)/864e5;break;case"week":o=(this-i-r)/6048e5;break;default:o=this-i}return n?o:x(o)},_n.endOf=function(t){var e;if(void 0===(t=O(t))||"millisecond"===t||!this.isValid())return this;var i=this._isUTC?un:hn;switch(t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=ln-dn(e+(this._isUTC?0:this.utcOffset()*sn),ln)-1;break;case"minute":e=this._d.valueOf(),e+=sn-dn(e,sn)-1;break;case"second":e=this._d.valueOf(),e+=an-dn(e,an)-1}return this._d.setTime(e),n.updateOffset(this,!0),this},_n.format=function(t){t||(t=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},_n.from=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Me(t).isValid())?qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},_n.fromNow=function(t){return this.from(Me(),t)},_n.to=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||Me(t).isValid())?qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},_n.toNow=function(t){return this.to(Me(),t)},_n.get=function(t){return D(this[t=O(t)])?this[t]():this},_n.invalidAt=function(){return u(this).overflow},_n.isAfter=function(t,e){var n=b(t)?t:Me(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=O(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},_n.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+r)},_n.toJSON=function(){return this.isValid()?this.toISOString():null},_n.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_n.unix=function(){return Math.floor(this.valueOf()/1e3)},_n.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_n.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_n.year=Tt,_n.isLeapYear=function(){return Ct(this.year())},_n.weekYear=function(t){return pn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},_n.isoWeekYear=function(t){return pn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},_n.quarter=_n.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},_n.month=Nt,_n.daysInMonth=function(){return Et(this.year(),this.month())},_n.week=_n.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},_n.isoWeek=_n.isoWeeks=function(t){var e=Vt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},_n.weeksInYear=function(){var t=this.localeData()._week;return Xt(this.year(),t.dow,t.doy)},_n.isoWeeksInYear=function(){return Xt(this.year(),1,4)},_n.date=mn,_n.day=_n.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},_n.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},_n.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},_n.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},_n.hour=_n.hours=ae,_n.minute=_n.minutes=vn,_n.second=_n.seconds=bn,_n.millisecond=_n.milliseconds=wn,_n.utcOffset=function(t,e,i){var r,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ye(ot,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(r=$e(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==t&&(!e||this._changeInProgress?Qe(this,qe(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:$e(this)},_n.utc=function(t){return this.utcOffset(0,t)},_n.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract($e(this),"m")),this},_n.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ye(rt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},_n.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Me(t).utcOffset():0,(this.utcOffset()-t)%60==0)},_n.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_n.isLocal=function(){return!!this.isValid()&&!this._isUTC},_n.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_n.isUtc=Ve,_n.isUTC=Ve,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=S("dates accessor is deprecated. Use date instead.",mn),_n.months=S("months accessor is deprecated. Use month instead",Nt),_n.years=S("years accessor is deprecated. Use year instead",Tt),_n.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),_n.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=Pe(t))._a){var e=t._isUTC?h(t._a):Me(t._a);this._isDSTShifted=this.isValid()&&_(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var Sn=P.prototype;function Cn(t,e,n,i){var r=pe(),o=h().set(i,e);return r[n](o,t)}function An(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return Cn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Cn(t,i,n,"month");return r}function Tn(t,e,n,i){"boolean"==typeof t?(a(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,a(e)&&(n=e,e=void 0),e=e||"");var r,o=pe(),s=t?o._week.dow:0;if(null!=n)return Cn(e,(n+s)%7,i,"day");var l=[];for(r=0;r<7;r++)l[r]=Cn(e,(r+s)%7,i,"day");return l}Sn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return D(i)?i.call(e,n):i},Sn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},Sn.invalidDate=function(){return this._invalidDate},Sn.ordinal=function(t){return this._ordinal.replace("%d",t)},Sn.preparse=kn,Sn.postformat=kn,Sn.relativeTime=function(t,e,n,i){var r=this._relativeTime[n];return D(r)?r(t,e,n,i):r.replace(/%d/i,t)},Sn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return D(n)?n(e):n.replace(/%s/i,e)},Sn.set=function(t){var e,n;for(n in t)D(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Sn.months=function(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Mt).test(e)?"format":"standalone"][t.month()]:i(this._months)?this._months:this._months.standalone},Sn.monthsShort=function(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Mt.test(e)?"format":"standalone"][t.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Sn.monthsParse=function(t,e,n){var i,r,o;if(this._monthsParseExact)return jt.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=h([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},Sn.monthsRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||Bt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ht),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},Sn.monthsShortRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||Bt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Rt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},Sn.week=function(t){return Vt(t,this._week.dow,this._week.doy).week},Sn.firstDayOfYear=function(){return this._week.doy},Sn.firstDayOfWeek=function(){return this._week.dow},Sn.weekdays=function(t,e){var n=i(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ut(n,this._week.dow):t?n[t.day()]:n},Sn.weekdaysMin=function(t){return!0===t?Ut(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},Sn.weekdaysShort=function(t){return!0===t?Ut(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},Sn.weekdaysParse=function(t,e,n){var i,r,o;if(this._weekdaysParseExact)return Zt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=h([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},Sn.weekdaysRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ee.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Qt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},Sn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ee.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Jt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Sn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ee.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=te),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Sn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},Sn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},ue("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),n.lang=S("moment.lang is deprecated. Use moment.locale instead.",ue),n.langData=S("moment.langData is deprecated. Use moment.localeData instead.",pe);var Dn=Math.abs;function In(t,e,n,i){var r=qe(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function Pn(t){return t<0?Math.floor(t):Math.ceil(t)}function En(t){return 4800*t/146097}function Mn(t){return 146097*t/4800}function On(t){return function(){return this.as(t)}}var Ln=On("ms"),jn=On("s"),Fn=On("m"),Nn=On("h"),Rn=On("d"),Hn=On("w"),Bn=On("M"),zn=On("Q"),Yn=On("y");function Wn(t){return function(){return this.isValid()?this._data[t]:NaN}}var $n=Wn("milliseconds"),Vn=Wn("seconds"),Xn=Wn("minutes"),Un=Wn("hours"),qn=Wn("days"),Gn=Wn("months"),Kn=Wn("years");var Zn=Math.round,Qn={ss:44,s:45,m:45,h:22,d:26,M:11};function Jn(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}var ti=Math.abs;function ei(t){return(t>0)-(t<0)||+t}function ni(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=ti(this._milliseconds)/1e3,i=ti(this._days),r=ti(this._months);t=x(n/60),e=x(t/60),n%=60,t%=60;var o=x(r/12),a=r%=12,s=i,l=e,c=t,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var u=h<0?"-":"",f=ei(this._months)!==ei(h)?"-":"",p=ei(this._days)!==ei(h)?"-":"",g=ei(this._milliseconds)!==ei(h)?"-":"";return u+"P"+(o?f+o+"Y":"")+(a?f+a+"M":"")+(s?p+s+"D":"")+(l||c||d?"T":"")+(l?g+l+"H":"")+(c?g+c+"M":"")+(d?g+d+"S":"")}var ii=Ne.prototype;return ii.isValid=function(){return this._isValid},ii.abs=function(){var t=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),t.milliseconds=Dn(t.milliseconds),t.seconds=Dn(t.seconds),t.minutes=Dn(t.minutes),t.hours=Dn(t.hours),t.months=Dn(t.months),t.years=Dn(t.years),this},ii.add=function(t,e){return In(this,t,e,1)},ii.subtract=function(t,e){return In(this,t,e,-1)},ii.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=O(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+En(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Mn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},ii.asMilliseconds=Ln,ii.asSeconds=jn,ii.asMinutes=Fn,ii.asHours=Nn,ii.asDays=Rn,ii.asWeeks=Hn,ii.asMonths=Bn,ii.asQuarters=zn,ii.asYears=Yn,ii.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},ii._bubble=function(){var t,e,n,i,r,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Pn(Mn(s)+a),a=0,s=0),l.milliseconds=o%1e3,t=x(o/1e3),l.seconds=t%60,e=x(t/60),l.minutes=e%60,n=x(e/60),l.hours=n%24,a+=x(n/24),s+=r=x(En(a)),a-=Pn(Mn(r)),i=x(s/12),s%=12,l.days=a,l.months=s,l.years=i,this},ii.clone=function(){return qe(this)},ii.get=function(t){return t=O(t),this.isValid()?this[t+"s"]():NaN},ii.milliseconds=$n,ii.seconds=Vn,ii.minutes=Xn,ii.hours=Un,ii.days=qn,ii.weeks=function(){return x(this.days()/7)},ii.months=Gn,ii.years=Kn,ii.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var i=qe(t).abs(),r=Zn(i.as("s")),o=Zn(i.as("m")),a=Zn(i.as("h")),s=Zn(i.as("d")),l=Zn(i.as("M")),c=Zn(i.as("y")),d=r<=Qn.ss&&["s",r]||r0,d[4]=n,Jn.apply(null,d)}(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)},ii.toISOString=ni,ii.toString=ni,ii.toJSON=ni,ii.locale=nn,ii.localeData=on,ii.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ni),ii.lang=rn,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),lt("x",it),lt("X",/[+-]?\d+(\.\d{1,3})?/),ut("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),ut("x",(function(t,e,n){n._d=new Date(w(t))})),n.version="2.24.0",t=Me,n.fn=_n,n.min=function(){return je("isBefore",[].slice.call(arguments,0))},n.max=function(){return je("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=h,n.unix=function(t){return Me(1e3*t)},n.months=function(t,e){return An(t,e,"months")},n.isDate=s,n.locale=ue,n.invalid=p,n.duration=qe,n.isMoment=b,n.weekdays=function(t,e,n){return Tn(t,e,n,"weekdays")},n.parseZone=function(){return Me.apply(null,arguments).parseZone()},n.localeData=pe,n.isDuration=Re,n.monthsShort=function(t,e){return An(t,e,"monthsShort")},n.weekdaysMin=function(t,e,n){return Tn(t,e,n,"weekdaysMin")},n.defineLocale=fe,n.updateLocale=function(t,e){if(null!=e){var n,i,r=se;null!=(i=he(t))&&(r=i._config),(n=new P(e=I(r,e))).parentLocale=le[t],le[t]=n,ue(t)}else null!=le[t]&&(null!=le[t].parentLocale?le[t]=le[t].parentLocale:null!=le[t]&&delete le[t]);return le[t]},n.locales=function(){return C(le)},n.weekdaysShort=function(t,e,n){return Tn(t,e,n,"weekdaysShort")},n.normalizeUnits=O,n.relativeTimeRounding=function(t){return void 0===t?Zn:"function"==typeof t&&(Zn=t,!0)},n.relativeTimeThreshold=function(t,e){return void 0!==Qn[t]&&(void 0===e?Qn[t]:(Qn[t]=e,"s"===t&&(Qn.ss=e-1),!0))},n.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},n.prototype=_n,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Split=e()}(this,(function(){"use strict";var t="undefined"!=typeof window?window:null,e=null===t,n=e?void 0:t.document,i=function(){return!1},r=e?"calc":["","-webkit-","-moz-","-o-"].filter((function(t){var e=n.createElement("div");return e.style.cssText="width:"+t+"calc(9px)",!!e.style.length})).shift()+"calc",o=function(t){return"string"==typeof t||t instanceof String},a=function(t){if(o(t)){var e=n.querySelector(t);if(!e)throw new Error("Selector "+t+" did not match a DOM element");return e}return t},s=function(t,e,n){var i=t[e];return void 0!==i?i:n},l=function(t,e,n,i){if(e){if("end"===i)return 0;if("center"===i)return t/2}else if(n){if("start"===i)return 0;if("center"===i)return t/2}return t},c=function(t,e){var i=n.createElement("div");return i.className="gutter gutter-"+e,i},d=function(t,e,n){var i={};return o(e)?i[t]=e:i[t]=r+"("+e+"% - "+n+"px)",i},h=function(t,e){var n;return(n={})[t]=e+"px",n};return function(r,o){if(void 0===o&&(o={}),e)return{};var u,f,p,g,m,v,y=r;Array.from&&(y=Array.from(y));var b=a(y[0]).parentNode,x=getComputedStyle?getComputedStyle(b):null,w=x?x.flexDirection:null,_=s(o,"sizes")||y.map((function(){return 100/y.length})),k=s(o,"minSize",100),S=Array.isArray(k)?k:y.map((function(){return k})),C=s(o,"expandToMin",!1),A=s(o,"gutterSize",10),T=s(o,"gutterAlign","center"),D=s(o,"snapOffset",30),I=s(o,"dragInterval",1),P=s(o,"direction","horizontal"),E=s(o,"cursor","horizontal"===P?"col-resize":"row-resize"),M=s(o,"gutter",c),O=s(o,"elementStyle",d),L=s(o,"gutterStyle",h);function j(t,e,n,i){var r=O(u,e,n,i);Object.keys(r).forEach((function(e){t.style[e]=r[e]}))}function F(){return v.map((function(t){return t.size}))}function N(t){return"touches"in t?t.touches[0][f]:t[f]}function R(t){var e=v[this.a],n=v[this.b],i=e.size+n.size;e.size=t/this.size*i,n.size=i-t/this.size*i,j(e.element,e.size,this._b,e.i),j(n.element,n.size,this._c,n.i)}function H(t){var e,n=v[this.a],r=v[this.b];this.dragging&&(e=N(t)-this.start+(this._b-this.dragOffset),I>1&&(e=Math.round(e/I)*I),e<=n.minSize+D+this._b?e=n.minSize+this._b:e>=this.size-(r.minSize+D+this._c)&&(e=this.size-(r.minSize+this._c)),R.call(this,e),s(o,"onDrag",i)())}function B(){var t=v[this.a].element,e=v[this.b].element,n=t.getBoundingClientRect(),i=e.getBoundingClientRect();this.size=n[u]+i[u]+this._b+this._c,this.start=n[p],this.end=n[g]}function z(t){var e=function(t){if(!getComputedStyle)return null;var e=getComputedStyle(t);if(!e)return null;var n=t[m];return 0===n?null:n-="horizontal"===P?parseFloat(e.paddingLeft)+parseFloat(e.paddingRight):parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)}(b);if(null===e)return t;if(S.reduce((function(t,e){return t+e}),0)>e)return t;var n=0,i=[],r=t.map((function(r,o){var a=e*r/100,s=l(A,0===o,o===t.length-1,T),c=S[o]+s;return a0&&i[r]-n>0){var a=Math.min(n,i[r]-n);n-=a,o=t-a}return o/e*100}))}function Y(){var e=v[this.a].element,r=v[this.b].element;this.dragging&&s(o,"onDragEnd",i)(F()),this.dragging=!1,t.removeEventListener("mouseup",this.stop),t.removeEventListener("touchend",this.stop),t.removeEventListener("touchcancel",this.stop),t.removeEventListener("mousemove",this.move),t.removeEventListener("touchmove",this.move),this.stop=null,this.move=null,e.removeEventListener("selectstart",i),e.removeEventListener("dragstart",i),r.removeEventListener("selectstart",i),r.removeEventListener("dragstart",i),e.style.userSelect="",e.style.webkitUserSelect="",e.style.MozUserSelect="",e.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",this.gutter.style.cursor="",this.parent.style.cursor="",n.body.style.cursor=""}function W(e){if(!("button"in e)||0===e.button){var r=v[this.a].element,a=v[this.b].element;this.dragging||s(o,"onDragStart",i)(F()),e.preventDefault(),this.dragging=!0,this.move=H.bind(this),this.stop=Y.bind(this),t.addEventListener("mouseup",this.stop),t.addEventListener("touchend",this.stop),t.addEventListener("touchcancel",this.stop),t.addEventListener("mousemove",this.move),t.addEventListener("touchmove",this.move),r.addEventListener("selectstart",i),r.addEventListener("dragstart",i),a.addEventListener("selectstart",i),a.addEventListener("dragstart",i),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.MozUserSelect="none",a.style.pointerEvents="none",this.gutter.style.cursor=E,this.parent.style.cursor=E,n.body.style.cursor=E,B.call(this),this.dragOffset=N(e)-this.end}}"horizontal"===P?(u="width",f="clientX",p="left",g="right",m="clientWidth"):"vertical"===P&&(u="height",f="clientY",p="top",g="bottom",m="clientHeight"),_=z(_);var $=[];function V(t){var e=t.i===$.length,n=e?$[t.i-1]:$[t.i];B.call(n);var i=e?n.size-t.minSize-n._c:t.minSize+n._b;R.call(n,i)}return(v=y.map((function(t,e){var n,i={element:a(t),size:_[e],minSize:S[e],i:e};if(e>0&&((n={a:e-1,b:e,dragging:!1,direction:P,parent:b})._b=l(A,e-1==0,!1,T),n._c=l(A,!1,e===y.length-1,T),"row-reverse"===w||"column-reverse"===w)){var r=n.a;n.a=n.b,n.b=r}if(e>0){var o=M(e,P,i.element);!function(t,e,n){var i=L(u,e,n);Object.keys(i).forEach((function(e){t.style[e]=i[e]}))}(o,A,e),n._a=W.bind(n),o.addEventListener("mousedown",n._a),o.addEventListener("touchstart",n._a),b.insertBefore(o,i.element),n.gutter=o}return j(i.element,i.size,l(A,0===e,e===y.length-1,T),e),e>0&&$.push(n),i}))).forEach((function(t){var e=t.element.getBoundingClientRect()[u];e0){var i=$[n-1],r=v[i.a],o=v[i.b];r.size=e[n-1],o.size=t,j(r.element,r.size,i._b,r.i),j(o.element,o.size,i._c,o.i)}}))},getSizes:F,collapse:function(t){V(v[t])},destroy:function(t,e){$.forEach((function(n){if(!0!==e?n.parent.removeChild(n.gutter):(n.gutter.removeEventListener("mousedown",n._a),n.gutter.removeEventListener("touchstart",n._a)),!0!==t){var i=O(u,n.a.size,n._b);Object.keys(i).forEach((function(t){v[n.a].element.style[t]="",v[n.b].element.style[t]=""}))}}))},parent:b,pairs:$}}})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t=t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)e(this._element).one(M.SLID,(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var r=i=n.clientWidth&&i>=n.clientHeight})),d=0l[t]&&!e.escapeWithReference&&(i=Math.min(d[n],l[t]-("right"===t?d.width:d.height))),vt({},n,i)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";d=yt({},d,h[e](t))})),t.offsets.popper=d,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,r=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]o(i[s])&&(t.offsets.popper[l]=o(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!Rt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",d=l?"Top":"Left",h=d.toLowerCase(),u=l?"left":"top",f=l?"bottom":"right",p=At(i)[c];s[f]-pa[f]&&(t.offsets.popper[h]+=s[h]+p-a[f]),t.offsets.popper=bt(t.offsets.popper);var g=s[h]+s[c]/2-p/2,m=it(t.instance.popper),v=parseFloat(m["margin"+d],10),y=parseFloat(m["border"+d+"Width"],10),b=g-t.offsets.popper[h]-v-y;return b=Math.max(Math.min(a[c]-p,b),0),t.arrowElement=i,t.offsets.arrow=(vt(n={},h,Math.round(b)),vt(n,u,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(Et(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=kt(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],r=Tt(i),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case"flip":a=[i,r];break;case"clockwise":a=zt(i);break;case"counterclockwise":a=zt(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],r=Tt(i);var c,d=t.offsets.popper,h=t.offsets.reference,u=Math.floor,f="left"===i&&u(d.right)>u(h.left)||"right"===i&&u(d.left)u(h.top)||"bottom"===i&&u(d.top)u(n.right),m=u(d.top)u(n.bottom),y="left"===i&&p||"right"===i&&g||"top"===i&&m||"bottom"===i&&v,b=-1!==["top","bottom"].indexOf(i),x=!!e.flipVariations&&(b&&"start"===o&&p||b&&"end"===o&&g||!b&&"start"===o&&m||!b&&"end"===o&&v);(f||y||x)&&(t.flipped=!0,(f||y)&&(i=a[l+1]),x&&(o="end"===(c=o)?"start":"start"===c?"end":c),t.placement=i+(o?"-"+o:""),t.offsets.popper=yt({},t.offsets.popper,Dt(t.instance.popper,t.offsets.reference,t.placement)),t=Pt(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,r=i.popper,o=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=o[n]-(s?r[a?"width":"height"]:0),t.placement=Tt(e),t.offsets.popper=bt(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Rt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=It(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.rightdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},Me="show",Oe="out",Le={HIDE:"hide"+Se,HIDDEN:"hidden"+Se,SHOW:"show"+Se,SHOWN:"shown"+Se,INSERTED:"inserted"+Se,CLICK:"click"+Se,FOCUSIN:"focusin"+Se,FOCUSOUT:"focusout"+Se,MOUSEENTER:"mouseenter"+Se,MOUSELEAVE:"mouseleave"+Se},je="fade",Fe="show",Ne="hover",Re="focus",He=function(){function t(t,e){if(void 0===Wt)throw new TypeError("Bootstrap's tooltips require Popper.js (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 n=t.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(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},n.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var n=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(n);var i=a.findShadowRoot(this.element),r=e.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!r)return;var o=this.getTipElement(),s=a.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&e(o).addClass(je);var l="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,c=this._getAttachment(l);this.addAttachmentClass(c);var d=this._getContainer();e(o).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(o).appendTo(d),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Wt(this.element,o,{placement:c,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}}),e(o).addClass(Fe),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var h=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),n===Oe&&t._leave(null,t)};if(e(this.tip).hasClass(je)){var u=a.getTransitionDurationFromElement(this.tip);e(this.tip).one(a.TRANSITION_END,h).emulateTransitionEnd(u)}else h()}},n.hide=function(t){var n=this,i=this.getTipElement(),r=e.Event(this.constructor.Event.HIDE),o=function(){n._hoverState!==Me&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(r),!r.isDefaultPrevented()){if(e(i).removeClass(Fe),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger[Re]=!1,this._activeTrigger[Ne]=!1,e(this.tip).hasClass(je)){var s=a.getTransitionDurationFromElement(i);e(i).one(a.TRANSITION_END,o).emulateTransitionEnd(s)}else o();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(t){e(this.getTipElement()).addClass(Ae+"-"+t)},n.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},n.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass(je+" "+Fe)},n.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=we(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},n.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},n._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},n._getContainer=function(){return!1===this.config.container?document.body:a.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},n._getAttachment=function(t){return Pe[t.toUpperCase()]},n._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i=n===Ne?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,r=n===Ne?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(r,t.config.selector,(function(e){return t._leave(e)}))}})),e(this.element).closest(".modal").on("hide.bs.modal",(function(){t.element&&t.hide()})),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._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",""))},n._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?Re:Ne]=!0),e(n.getTipElement()).hasClass(Fe)||n._hoverState===Me?n._hoverState=Me:(clearTimeout(n._timeout),n._hoverState=Me,n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){n._hoverState===Me&&n.show()}),n.config.delay.show):n.show())},n._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?Re:Ne]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=Oe,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){n._hoverState===Oe&&n.hide()}),n.config.delay.hide):n.hide())},n._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},n._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==De.indexOf(t)&&delete n[t]})),"number"==typeof(t=r({},this.constructor.Default,n,"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()),a.typeCheckConfig(_e,t,this.constructor.DefaultType),t.sanitize&&(t.template=we(t.template,t.whiteList,t.sanitizeFn)),t},n._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},n._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Te);null!==n&&n.length&&t.removeClass(n.join(""))},n._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},n._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(je),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data(ke),r="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,r),e(this).data(ke,i)),"string"==typeof n)){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Ee}},{key:"NAME",get:function(){return _e}},{key:"DATA_KEY",get:function(){return ke}},{key:"Event",get:function(){return Le}},{key:"EVENT_KEY",get:function(){return Se}},{key:"DefaultType",get:function(){return Ie}}]),t}();e.fn[_e]=He._jQueryInterface,e.fn[_e].Constructor=He,e.fn[_e].noConflict=function(){return e.fn[_e]=Ce,He._jQueryInterface};var Be="popover",ze="bs.popover",Ye="."+ze,We=e.fn[Be],$e="bs-popover",Ve=new RegExp("(^|\\s)"+$e+"\\S+","g"),Xe=r({},He.Default,{placement:"right",trigger:"click",content:"",template:''}),Ue=r({},He.DefaultType,{content:"(string|element|function)"}),qe={HIDE:"hide"+Ye,HIDDEN:"hidden"+Ye,SHOW:"show"+Ye,SHOWN:"shown"+Ye,INSERTED:"inserted"+Ye,CLICK:"click"+Ye,FOCUSIN:"focusin"+Ye,FOCUSOUT:"focusout"+Ye,MOUSEENTER:"mouseenter"+Ye,MOUSELEAVE:"mouseleave"+Ye},Ge=function(t){var n,r;function o(){return t.apply(this,arguments)||this}r=t,(n=o).prototype=Object.create(r.prototype),(n.prototype.constructor=n).__proto__=r;var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){e(this.getTipElement()).addClass($e+"-"+t)},a.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},a.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Ve);null!==n&&0=this._offsets[r]&&(void 0===this._offsets[r+1]||t li > .active",bn=function(){function t(t){this._element=t}var n=t.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(pn)||e(this._element).hasClass("disabled"))){var n,i,r=e(this._element).closest(".nav, .list-group")[0],o=a.getSelectorFromElement(this._element);if(r){var s="UL"===r.nodeName||"OL"===r.nodeName?yn:vn;i=(i=e.makeArray(e(r).find(s)))[i.length-1]}var l=e.Event(fn.HIDE,{relatedTarget:this._element}),c=e.Event(fn.SHOW,{relatedTarget:i});if(i&&e(i).trigger(l),e(this._element).trigger(c),!c.isDefaultPrevented()&&!l.isDefaultPrevented()){o&&(n=document.querySelector(o)),this._activate(this._element,r);var d=function(){var n=e.Event(fn.HIDDEN,{relatedTarget:t._element}),r=e.Event(fn.SHOWN,{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(r)};n?this._activate(n,n.parentNode,d):d()}}},n.dispose=function(){e.removeData(this._element,dn),this._element=null},n._activate=function(t,n,i){var r=this,o=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(vn):e(n).find(yn))[0],s=i&&o&&e(o).hasClass(gn),l=function(){return r._transitionComplete(t,o,i)};if(o&&s){var c=a.getTransitionDurationFromElement(o);e(o).removeClass(mn).one(a.TRANSITION_END,l).emulateTransitionEnd(c)}else l()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass(pn);var r=e(n.parentNode).find("> .dropdown-menu .active")[0];r&&e(r).removeClass(pn),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass(pn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),a.reflow(t),t.classList.contains(gn)&&t.classList.add(mn),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var o=e(t).closest(".dropdown")[0];if(o){var s=[].slice.call(o.querySelectorAll(".dropdown-toggle"));e(s).addClass(pn)}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),r=i.data(dn);if(r||(r=new t(this),i.data(dn,r)),"string"==typeof n){if(void 0===r[n])throw new TypeError('No method named "'+n+'"');r[n]()}}))},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),t}();e(document).on(fn.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),bn._jQueryInterface.call(e(this),"show")})),e.fn.tab=bn._jQueryInterface,e.fn.tab.Constructor=bn,e.fn.tab.noConflict=function(){return e.fn.tab=un,bn._jQueryInterface};var xn="toast",wn="bs.toast",_n="."+wn,kn=e.fn[xn],Sn={CLICK_DISMISS:"click.dismiss"+_n,HIDE:"hide"+_n,HIDDEN:"hidden"+_n,SHOW:"show"+_n,SHOWN:"shown"+_n},Cn="hide",An="show",Tn="showing",Dn={animation:"boolean",autohide:"boolean",delay:"number"},In={animation:!0,autohide:!0,delay:500},Pn=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this;e(this._element).trigger(Sn.SHOW),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove(Tn),t._element.classList.add(An),e(t._element).trigger(Sn.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove(Cn),this._element.classList.add(Tn),this._config.animation){var i=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},n.hide=function(t){var n=this;this._element.classList.contains(An)&&(e(this._element).trigger(Sn.HIDE),t?this._close():this._timeout=setTimeout((function(){n._close()}),this._config.delay))},n.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(An)&&this._element.classList.remove(An),e(this._element).off(Sn.CLICK_DISMISS),e.removeData(this._element,wn),this._element=null,this._config=null},n._getConfig=function(t){return t=r({},In,e(this._element).data(),"object"==typeof t&&t?t:{}),a.typeCheckConfig(xn,t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on(Sn.CLICK_DISMISS,'[data-dismiss="toast"]',(function(){return t.hide(!0)}))},n._close=function(){var t=this,n=function(){t._element.classList.add(Cn),e(t._element).trigger(Sn.HIDDEN)};if(this._element.classList.remove(An),this._config.animation){var i=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),r=i.data(wn);if(r||(r=new t(this,"object"==typeof n&&n),i.data(wn,r)),"string"==typeof n){if(void 0===r[n])throw new TypeError('No method named "'+n+'"');r[n](this)}}))},i(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return Dn}},{key:"Default",get:function(){return In}}]),t}();e.fn[xn]=Pn._jQueryInterface,e.fn[xn].Constructor=Pn,e.fn[xn].noConflict=function(){return e.fn[xn]=kn,Pn._jQueryInterface},function(){if(void 0===e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=a,t.Alert=u,t.Button=_,t.Carousel=F,t.Collapse=K,t.Dropdown=re,t.Modal=ve,t.Popover=Ge,t.Scrollspy=cn,t.Tab=bn,t.Toast=Pn,t.Tooltip=He,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).bsCustomFileInput=e()}(this,(function(){"use strict";var t='.custom-file input[type="file"]',e=".custom-file-label",n="form",i="input",r=function(t){var n="",i=t.parentNode.querySelector(e);return i&&(n=i.innerHTML),n},o=function(t){if(t.childNodes.length>0)for(var e=[].slice.call(t.childNodes),n=0;nthis._bufferOffset&&(this._buffer=this._buffer.slice(t-this._bufferOffset),this._bufferOffset=t);var n=0===u(this._buffer);return this._done&&n?null:this._buffer.slice(0,e-t)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),t}();function u(t){return void 0===t?0:void 0!==t.size?t.size:t.length}},{"./isCordova":2,"./isReactNative":3,"./readAsByteArray":4,"./uriToBlob":8}],7:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));r.originalRequest=i,r.causingError=n;var o=t.message;return null!=n&&(o+=", caused by "+n.toString()),null!=i&&(o+=", originated from request (response code: "+i.status+", response text: "+i.responseText+")"),r.message=o,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Error),e}();n.default=i},{}],10:[function(t,e,n){"use strict";var i,r=t("./upload"),o=(i=r)&&i.__esModule?i:{default:i},a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(t("./node/storage"));var s=o.default.defaultOptions,l={Upload:o.default,canStoreURLs:a.canStoreURLs,defaultOptions:s};if("undefined"!=typeof window){var c=window,d=c.XMLHttpRequest,h=c.Blob;l.isSupported=d&&h&&"function"==typeof h.prototype.slice}else l.isSupported=!0,l.FileStorage=a.FileStorage;e.exports=l},{"./node/storage":7,"./upload":11}],11:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;ne._offsetBeforeRetry&&(e._retryAttempt=0);var n=!0;"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(n=!1);var o=t.originalRequest?t.originalRequest.status:0,a=!f(o,400)||409===o||423===o;if(e._retryAttemptthis._size)&&!this.options.uploadLengthDeferred&&(i=this._size),this._source.slice(n,i,(function(n,i,r){n?e._emitError(n):(e.options.uploadLengthDeferred&&r&&(e._size=e._offset+(i&&i.size?i.size:0),t.setRequestHeader("Upload-Length",e._size)),null===i?t.send():(t.send(i),e._emitProgress(e._offset,e._size)))}))}},{key:"_handleUploadResponse",value:function(t){var e=this,n=parseInt(t.getResponseHeader("Upload-Offset"),10);if(isNaN(n))this._emitXhrError(t,new Error("tus: invalid or missing offset value"));else{if(this._emitProgress(n,this._size),this._emitChunkComplete(n-this._offset,n,this._size),this._offset=n,n==this._size)return this.options.removeFingerprintOnSuccess&&this.options.resume&&this._storage.removeItem(this._fingerprint,(function(t){t&&e._emitError(t)})),this._emitSuccess(),void this._source.close();this._startUpload()}}}],[{key:"terminate",value:function(t,e,n){if("function"!=typeof e&&"function"!=typeof n)throw new Error("tus: a callback function must be specified");"function"==typeof e&&(n=e,e={});var i=(0,s.newRequest)();i.open("DELETE",t,!0),i.onload=function(){204===i.status?n():n(new r.default(new Error("tus: unexpected response while terminating upload"),null,i))},i.onerror=function(t){n(new r.default(t,new Error("tus: failed to terminate upload"),i))},p(i,e),i.send(null)}}]),t}();function f(t,e){return t>=e&&t>>6)+fromCharCode(128|63&e):fromCharCode(224|e>>>12&15)+fromCharCode(128|e>>>6&63)+fromCharCode(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return fromCharCode(240|e>>>18&7)+fromCharCode(128|e>>>12&63)+fromCharCode(128|e>>>6&63)+fromCharCode(128|63&e)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(t){return t.replace(re_utob,cb_utob)},cb_encode=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),e>=2?"=":b64chars.charAt(n>>>6&63),e>=1?"=":b64chars.charAt(63&n)].join("")},btoa=global.btoa?function(t){return global.btoa(t)}:function(t){return t.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(t){return(t.constructor===buffer.constructor?t:buffer.from(t)).toString("base64")}:function(t){return(t.constructor===buffer.constructor?t:new buffer(t)).toString("base64")}:function(t){return btoa(utob(t))},encode=function(t,e){return e?_encode(String(t)).replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,""):_encode(String(t))},encodeURI=function(t){return encode(t,!0)},re_btou=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),cb_btou=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return fromCharCode(55296+(e>>>10))+fromCharCode(56320+(1023&e));case 3:return fromCharCode((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return fromCharCode((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},btou=function(t){return t.replace(re_btou,cb_btou)},cb_decode=function(t){var e=t.length,n=e%4,i=(e>0?b64tab[t.charAt(0)]<<18:0)|(e>1?b64tab[t.charAt(1)]<<12:0)|(e>2?b64tab[t.charAt(2)]<<6:0)|(e>3?b64tab[t.charAt(3)]:0),r=[fromCharCode(i>>>16),fromCharCode(i>>>8&255),fromCharCode(255&i)];return r.length-=[0,0,2,1][n],r.join("")},atob=global.atob?function(t){return global.atob(t)}:function(t){return t.replace(/[\s\S]{1,4}/g,cb_decode)},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(t){return(t.constructor===buffer.constructor?t:buffer.from(t,"base64")).toString()}:function(t){return(t.constructor===buffer.constructor?t:new buffer(t,"base64")).toString()}:function(t){return btou(atob(t))},decode=function(t){return _decode(String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var t=global.Base64;return global.Base64=_Base64,t};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum((function(){return decode(this)}))),Object.defineProperty(String.prototype,"toBase64",noEnum((function(t){return encode(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",noEnum((function(){return encode(this,!0)})))}}return global.Meteor&&(Base64=global.Base64),void 0!==module&&module.exports?module.exports.Base64=global.Base64:"function"==typeof define&&define.amd&&define([],(function(){return global.Base64})),{Base64:global.Base64}}))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty;function r(t){return decodeURIComponent(t.replace(/\+/g," "))}n.stringify=function(t,e){e=e||"";var n=[];for(var r in"string"!=typeof e&&(e="?"),t)i.call(t,r)&&n.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return n.length?e+n.join("&"):""},n.parse=function(t){for(var e,n=/([^=?&]+)=?([^&]*)/g,i={};e=n.exec(t);){var o=r(e[1]),a=r(e[2]);o in i||(i[o]=a)}return i}},{}],15:[function(t,e,n){"use strict";e.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},{}],16:[function(t,e,n){(function(n){"use strict";var i=t("requires-port"),r=t("querystringify"),o=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function c(t){var e,i=n&&n.location||{},r={},o=typeof(t=t||i);if("blob:"===t.protocol)r=new h(unescape(t.pathname),{});else if("string"===o)for(e in r=new h(t,{}),l)delete r[e];else if("object"===o){for(e in t)e in l||(r[e]=t[e]);void 0===r.slashes&&(r.slashes=a.test(t.href))}return r}function d(t){var e=o.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function h(t,e,n){if(!(this instanceof h))return new h(t,e,n);var o,a,l,u,f,p,g=s.slice(),m=typeof e,v=this,y=0;for("object"!==m&&"string"!==m&&(n=e,e=null),n&&"function"!=typeof n&&(n=r.parse),e=c(e),o=!(a=d(t||"")).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,a.slashes||(g[3]=[/(.*)/,"pathname"]);ya&&(i.top-=l),i.top<0&&(i.top=0),i.left+c>s&&(i.left-=c),i.left<0&&(i.left=0),t.$menu.css(i)}else t.determinePosition.call(this,t.$menu)},positionSubmenu:function(e){if(void 0!==e)if(t.ui&&t.ui.position)e.css("display","block").position({my:"left top-5",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var n={top:-9,left:this.outerWidth()-5};e.css(n)}},zIndex:1,animation:{duration:50,show:"slideDown",hide:"slideUp"},events:{preShow:t.noop,show:t.noop,hide:t.noop,activated:t.noop},callback:null,items:{}},d={timer:null,pageX:null,pageY:null},h={abortevent:function(t){t.preventDefault(),t.stopImmediatePropagation()},contextmenu:function(e){var i=t(this);if(!1!==e.data.events.preShow(i,e)&&("right"===e.data.trigger&&(e.preventDefault(),e.stopImmediatePropagation()),!("right"!==e.data.trigger&&"demand"!==e.data.trigger&&e.originalEvent||!(void 0===e.mouseButton||!e.data||"left"===e.data.trigger&&0===e.mouseButton||"right"===e.data.trigger&&2===e.mouseButton)||i.hasClass("context-menu-active")||i.hasClass("context-menu-disabled")))){if(n=i,e.data.build){var r=e.data.build(n,e);if(!1===r)return;if(e.data=t.extend(!0,{},c,e.data,r||{}),!e.data.items||t.isEmptyObject(e.data.items))throw window.console&&(console.error||console.log).call(console,"No items specified to show in contextMenu"),new Error("No Items specified");e.data.$trigger=n,u.create(e.data)}u.show.call(i,e.data,e.pageX,e.pageY)}},click:function(e){e.preventDefault(),e.stopImmediatePropagation(),t(this).trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))},mousedown:function(e){var i=t(this);n&&n.length&&!n.is(i)&&n.data("contextMenu").$menu.trigger("contextmenu:hide"),2===e.button&&(n=i.data("contextMenuActive",!0))},mouseup:function(e){var i=t(this);i.data("contextMenuActive")&&n&&n.length&&n.is(i)&&!i.hasClass("context-menu-disabled")&&(e.preventDefault(),e.stopImmediatePropagation(),n=i,i.trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))),i.removeData("contextMenuActive")},mouseenter:function(e){var i=t(this),r=t(e.relatedTarget),o=t(document);r.is(".context-menu-list")||r.closest(".context-menu-list").length||n&&n.length||(d.pageX=e.pageX,d.pageY=e.pageY,d.data=e.data,o.on("mousemove.contextMenuShow",h.mousemove),d.timer=setTimeout((function(){d.timer=null,o.off("mousemove.contextMenuShow"),n=i,i.trigger(t.Event("contextmenu",{data:d.data,pageX:d.pageX,pageY:d.pageY}))}),e.data.delay))},mousemove:function(t){d.pageX=t.pageX,d.pageY=t.pageY},mouseleave:function(e){var n=t(e.relatedTarget);if(!n.is(".context-menu-list")&&!n.closest(".context-menu-list").length){try{clearTimeout(d.timer)}catch(e){}d.timer=null}},layerClick:function(e){var n,i,o=t(this).data("contextMenuRoot"),a=e.button,s=e.pageX,l=e.pageY,c=void 0===s;e.preventDefault(),setTimeout((function(){if(c)null!=o&&null!==o.$menu&&void 0!==o.$menu&&o.$menu.trigger("contextmenu:hide");else{var d,h="left"===o.trigger&&0===a||"right"===o.trigger&&2===a;if(document.elementFromPoint&&o.$layer){if(o.$layer.hide(),(n=document.elementFromPoint(s-r.scrollLeft(),l-r.scrollTop())).isContentEditable){var u=document.createRange(),f=window.getSelection();u.selectNode(n),u.collapse(!0),f.removeAllRanges(),f.addRange(u)}t(n).trigger(e),o.$layer.show()}if(o.hideOnSecondTrigger&&h&&null!==o.$menu&&void 0!==o.$menu)o.$menu.trigger("contextmenu:hide");else{if(o.reposition&&h)if(document.elementFromPoint){if(o.$trigger.is(n))return void o.position.call(o.$trigger,o,s,l)}else if(i=o.$trigger.offset(),d=t(window),i.top+=d.scrollTop(),i.top<=e.pageY&&(i.left+=d.scrollLeft(),i.left<=e.pageX&&(i.bottom=i.top+o.$trigger.outerHeight(),i.bottom>=e.pageY&&(i.right=i.left+o.$trigger.outerWidth(),i.right>=e.pageX))))return void o.position.call(o.$trigger,o,s,l);n&&h&&o.$trigger.one("contextmenu:hidden",(function(){t(n).contextMenu({x:s,y:l,button:a})})),null!=o&&null!==o.$menu&&void 0!==o.$menu&&o.$menu.trigger("contextmenu:hide")}}}),50)},keyStop:function(t,e){e.isInput||t.preventDefault(),t.stopPropagation()},key:function(t){var e={};n&&(e=n.data("contextMenu")||{}),void 0===e.zIndex&&(e.zIndex=0);var i=0,r=function(t){""!==t.style.zIndex?i=t.style.zIndex:null!==t.offsetParent&&void 0!==t.offsetParent?r(t.offsetParent):null!==t.parentElement&&void 0!==t.parentElement&&r(t.parentElement)};if(r(t.target),!(e.$menu&&parseInt(i,10)>parseInt(e.$menu.css("zIndex"),10))){switch(t.keyCode){case 9:case 38:if(h.keyStop(t,e),e.isInput){if(9===t.keyCode&&t.shiftKey)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("prevcommand"));if(38===t.keyCode&&"checkbox"===e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault()}else if(9!==t.keyCode||t.shiftKey)return void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("prevcommand"));break;case 40:if(h.keyStop(t,e),!e.isInput)return void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("nextcommand"));if(9===t.keyCode)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("nextcommand"));if(40===t.keyCode&&"checkbox"===e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault();break;case 37:if(h.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;if(!e.$selected.parent().hasClass("context-menu-root")){var o=e.$selected.parent().parent();return e.$selected.trigger("contextmenu:blur"),void(e.$selected=o)}break;case 39:if(h.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;var a=e.$selected.data("contextMenu")||{};if(a.$menu&&e.$selected.hasClass("context-menu-submenu"))return e.$selected=null,a.$selected=null,void a.$menu.trigger("nextcommand");break;case 35:case 36:return e.$selected&&e.$selected.find("input, textarea, select").length?void 0:((e.$selected&&e.$selected.parent()||e.$menu).children(":not(."+e.classNames.disabled+", ."+e.classNames.notSelectable+")")[36===t.keyCode?"first":"last"]().trigger("contextmenu:focus"),void t.preventDefault());case 13:if(h.keyStop(t,e),e.isInput){if(e.$selected&&!e.$selected.is("textarea, select"))return void t.preventDefault();break}return void(void 0!==e.$selected&&null!==e.$selected&&e.$selected.trigger("mouseup"));case 32:case 33:case 34:return void h.keyStop(t,e);case 27:return h.keyStop(t,e),void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("contextmenu:hide"));default:var s=String.fromCharCode(t.keyCode).toUpperCase();if(e.accesskeys&&e.accesskeys[s])return void e.accesskeys[s].$node.trigger(e.accesskeys[s].$menu?"contextmenu:focus":"mouseup")}t.stopPropagation(),void 0!==e.$selected&&null!==e.$selected&&e.$selected.trigger(t)}},prevItem:function(e){e.stopPropagation();var n=t(this).data("contextMenu")||{},i=t(this).data("contextMenuRoot")||{};if(n.$selected){var r=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=r}for(var o=n.$menu.children(),a=n.$selected&&n.$selected.prev().length?n.$selected.prev():o.last(),s=a;a.hasClass(i.classNames.disabled)||a.hasClass(i.classNames.notSelectable)||a.is(":hidden");)if((a=a.prev().length?a.prev():o.last()).is(s))return;n.$selected&&h.itemMouseleave.call(n.$selected.get(0),e),h.itemMouseenter.call(a.get(0),e);var l=a.find("input, textarea, select");l.length&&l.focus()},nextItem:function(e){e.stopPropagation();var n=t(this).data("contextMenu")||{},i=t(this).data("contextMenuRoot")||{};if(n.$selected){var r=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=r}for(var o=n.$menu.children(),a=n.$selected&&n.$selected.next().length?n.$selected.next():o.first(),s=a;a.hasClass(i.classNames.disabled)||a.hasClass(i.classNames.notSelectable)||a.is(":hidden");)if((a=a.next().length?a.next():o.first()).is(s))return;n.$selected&&h.itemMouseleave.call(n.$selected.get(0),e),h.itemMouseenter.call(a.get(0),e);var l=a.find("input, textarea, select");l.length&&l.focus()},focusInput:function(){var e=t(this).closest(".context-menu-item"),n=e.data(),i=n.contextMenu,r=n.contextMenuRoot;r.$selected=i.$selected=e,r.isInput=i.isInput=!0},blurInput:function(){var e=t(this).closest(".context-menu-item").data(),n=e.contextMenu;e.contextMenuRoot.isInput=n.isInput=!1},menuMouseenter:function(){t(this).data().contextMenuRoot.hovering=!0},menuMouseleave:function(e){var n=t(this).data().contextMenuRoot;n.$layer&&n.$layer.is(e.relatedTarget)&&(n.hovering=!1)},itemMouseenter:function(e){var n=t(this),i=n.data(),r=i.contextMenu,o=i.contextMenuRoot;o.hovering=!0,e&&o.$layer&&o.$layer.is(e.relatedTarget)&&(e.preventDefault(),e.stopImmediatePropagation()),(r.$menu?r:o).$menu.children("."+o.classNames.hover).trigger("contextmenu:blur").children(".hover").trigger("contextmenu:blur"),n.hasClass(o.classNames.disabled)||n.hasClass(o.classNames.notSelectable)?r.$selected=null:n.trigger("contextmenu:focus")},itemMouseleave:function(e){var n=t(this),i=n.data(),r=i.contextMenu,o=i.contextMenuRoot;if(o!==r&&o.$layer&&o.$layer.is(e.relatedTarget))return void 0!==o.$selected&&null!==o.$selected&&o.$selected.trigger("contextmenu:blur"),e.preventDefault(),e.stopImmediatePropagation(),void(o.$selected=r.$selected=r.$node);r&&r.$menu&&r.$menu.hasClass("context-menu-visible")||n.trigger("contextmenu:blur")},itemClick:function(e){var n,i=t(this),r=i.data(),o=r.contextMenu,a=r.contextMenuRoot,s=r.contextMenuKey;if(!(!o.items[s]||i.is("."+a.classNames.disabled+", .context-menu-separator, ."+a.classNames.notSelectable)||i.is(".context-menu-submenu")&&!1===a.selectableSubMenu)){if(e.preventDefault(),e.stopImmediatePropagation(),t.isFunction(o.callbacks[s])&&Object.prototype.hasOwnProperty.call(o.callbacks,s))n=o.callbacks[s];else{if(!t.isFunction(a.callback))return;n=a.callback}!1!==n.call(a.$trigger,s,a,e)?a.$menu.trigger("contextmenu:hide"):a.$menu.parent().length&&u.update.call(a.$trigger,a)}},inputClick:function(t){t.stopImmediatePropagation()},hideMenu:function(e,n){var i=t(this).data("contextMenuRoot");u.hide.call(i.$trigger,i,n&&n.force)},focusItem:function(e){e.stopPropagation();var n=t(this),i=n.data(),r=i.contextMenu,o=i.contextMenuRoot;n.hasClass(o.classNames.disabled)||n.hasClass(o.classNames.notSelectable)||(n.addClass([o.classNames.hover,o.classNames.visible].join(" ")).parent().find(".context-menu-item").not(n).removeClass(o.classNames.visible).filter("."+o.classNames.hover).trigger("contextmenu:blur"),r.$selected=o.$selected=n,r&&r.$node&&r.$node.hasClass("context-menu-submenu")&&r.$node.addClass(o.classNames.hover),r.$node&&o.positionSubmenu.call(r.$node,r.$menu))},blurItem:function(e){e.stopPropagation();var n=t(this),i=n.data(),r=i.contextMenu,o=i.contextMenuRoot;r.autoHide&&n.removeClass(o.classNames.visible),n.removeClass(o.classNames.hover),r.$selected=null}},u={show:function(e,i,r){var o=t(this),a={};if(t("#context-menu-layer").trigger("mousedown"),e.$trigger=o,!1!==e.events.show.call(o,e))if(!1!==u.update.call(o,e)){if(e.position.call(o,e,i,r),e.zIndex){var s=e.zIndex;"function"==typeof e.zIndex&&(s=e.zIndex.call(o,e)),a.zIndex=function(t){for(var e=0,n=t;e=Math.max(e,parseInt(n.css("z-index"),10)||0),(n=n.parent())&&n.length&&!("html body".indexOf(n.prop("nodeName").toLowerCase())>-1););return e}(o)+s}u.layer.call(e.$menu,e,a.zIndex),e.$menu.find("ul").css("zIndex",a.zIndex+1),e.$menu.css(a)[e.animation.show](e.animation.duration,(function(){o.trigger("contextmenu:visible"),u.activated(e),e.events.activated(e)})),o.data("contextMenu",e).addClass("context-menu-active"),t(document).off("keydown.contextMenu").on("keydown.contextMenu",h.key),e.autoHide&&t(document).on("mousemove.contextMenuAutoHide",(function(t){var n=o.offset();n.right=n.left+o.outerWidth(),n.bottom=n.top+o.outerHeight(),!e.$layer||e.hovering||t.pageX>=n.left&&t.pageX<=n.right&&t.pageY>=n.top&&t.pageY<=n.bottom||setTimeout((function(){e.hovering||null===e.$menu||void 0===e.$menu||e.$menu.trigger("contextmenu:hide")}),50)}))}else n=null;else n=null},hide:function(e,i){var r=t(this);if(e||(e=r.data("contextMenu")||{}),i||!e.events||!1!==e.events.hide.call(r,e)){if(r.removeData("contextMenu").removeClass("context-menu-active"),e.$layer){setTimeout((o=e.$layer,function(){o.remove()}),10);try{delete e.$layer}catch(t){e.$layer=null}}var o;n=null,e.$menu.find("."+e.classNames.hover).trigger("contextmenu:blur"),e.$selected=null,e.$menu.find("."+e.classNames.visible).removeClass(e.classNames.visible),t(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),e.$menu&&e.$menu[e.animation.hide](e.animation.duration,(function(){e.build&&(e.$menu.remove(),t.each(e,(function(t){switch(t){case"ns":case"selector":case"build":case"trigger":return!0;default:e[t]=void 0;try{delete e[t]}catch(t){}return!0}}))),setTimeout((function(){r.trigger("contextmenu:hidden")}),10)}))}},create:function(e,n){function i(e){var n=t("");if(e._accesskey)e._beforeAccesskey&&n.append(document.createTextNode(e._beforeAccesskey)),t("").addClass("context-menu-accesskey").text(e._accesskey).appendTo(n),e._afterAccesskey&&n.append(document.createTextNode(e._afterAccesskey));else if(e.isHtmlName){if(void 0!==e.accesskey)throw new Error("accesskeys are not compatible with HTML names and cannot be used together in the same item");n.html(e.name)}else n.text(e.name);return n}void 0===n&&(n=e),e.$menu=t('
    ').addClass(e.className||"").data({contextMenu:e,contextMenuRoot:n}),e.dataAttr&&t.each(e.dataAttr,(function(t,n){e.$menu.attr("data-"+e.key,n)})),t.each(["callbacks","commands","inputs"],(function(t,i){e[i]={},n[i]||(n[i]={})})),n.accesskeys||(n.accesskeys={}),t.each(e.items,(function(r,o){var a=t('
  • ').addClass(o.className||""),s=null,c=null;if(a.on("click",t.noop),"string"!=typeof o&&"cm_separator"!==o.type||(o={type:"cm_seperator"}),o.$node=a.data({contextMenu:e,contextMenuRoot:n,contextMenuKey:r}),void 0!==o.accesskey)for(var d,f=function(t){for(var e,n=t.split(/\s+/),i=[],r=0;e=n[r];r++)e=e.charAt(0).toUpperCase(),i.push(e);return i}(o.accesskey),p=0;d=f[p];p++)if(!n.accesskeys[d]){n.accesskeys[d]=o;var g=o.name.match(new RegExp("^(.*?)("+d+")(.*)$","i"));g&&(o._beforeAccesskey=g[1],o._accesskey=g[2],o._afterAccesskey=g[3]);break}if(o.type&&l[o.type])l[o.type].call(a,o,e,n),t.each([e,n],(function(n,i){i.commands[r]=o,!t.isFunction(o.callback)||void 0!==i.callbacks[r]&&void 0!==e.type||(i.callbacks[r]=o.callback)}));else{switch("cm_seperator"===o.type?a.addClass("context-menu-separator "+n.classNames.notSelectable):"html"===o.type?a.addClass("context-menu-html "+n.classNames.notSelectable):"sub"!==o.type&&o.type?(s=t("").appendTo(a),i(o).appendTo(s),a.addClass("context-menu-input"),e.hasTypes=!0,t.each([e,n],(function(t,e){e.commands[r]=o,e.inputs[r]=o}))):o.items&&(o.type="sub"),o.type){case"cm_seperator":break;case"text":c=t('').attr("name","context-menu-input-"+r).val(o.value||"").appendTo(s);break;case"textarea":c=t('').attr("name","context-menu-input-"+r).val(o.value||"").appendTo(s),o.height&&c.height(o.height);break;case"checkbox":c=t('').attr("name","context-menu-input-"+r).val(o.value||"").prop("checked",!!o.selected).prependTo(s);break;case"radio":c=t('').attr("name","context-menu-input-"+o.radio).val(o.value||"").prop("checked",!!o.selected).prependTo(s);break;case"select":c=t('').attr("name","context-menu-input-"+r).appendTo(s),o.options&&(t.each(o.options,(function(e,n){t("").val(e).text(n).appendTo(c)})),c.val(o.selected));break;case"sub":i(o).appendTo(a),o.appendTo=o.$node,a.data("contextMenu",o).addClass("context-menu-submenu"),o.callback=null,"function"==typeof o.items.then?u.processPromises(o,n,o.items):u.create(o,n);break;case"html":t(o.html).appendTo(a);break;default:t.each([e,n],(function(n,i){i.commands[r]=o,!t.isFunction(o.callback)||void 0!==i.callbacks[r]&&void 0!==e.type||(i.callbacks[r]=o.callback)})),i(o).appendTo(a)}o.type&&"sub"!==o.type&&"html"!==o.type&&"cm_seperator"!==o.type&&(c.on("focus",h.focusInput).on("blur",h.blurInput),o.events&&c.on(o.events,e)),o.icon&&(t.isFunction(o.icon)?o._icon=o.icon.call(this,this,a,r,o):"string"!=typeof o.icon||"fab "!==o.icon.substring(0,4)&&"fas "!==o.icon.substring(0,4)&&"fad "!==o.icon.substring(0,4)&&"far "!==o.icon.substring(0,4)&&"fal "!==o.icon.substring(0,4)?"string"==typeof o.icon&&"fa-"===o.icon.substring(0,3)?o._icon=n.classNames.icon+" "+n.classNames.icon+"--fa fa "+o.icon:o._icon=n.classNames.icon+" "+n.classNames.icon+"-"+o.icon:(a.addClass(n.classNames.icon+" "+n.classNames.icon+"--fa5"),o._icon=t('')),"string"==typeof o._icon?a.addClass(o._icon):a.prepend(o._icon))}o.$input=c,o.$label=s,a.appendTo(e.$menu),!e.hasTypes&&t.support.eventSelectstart&&a.on("selectstart.disableTextSelect",h.abortevent)})),e.$node||e.$menu.css("display","none").addClass("context-menu-root"),e.$menu.appendTo(e.appendTo||document.body)},resize:function(e,n){var i;e.css({position:"absolute",display:"block"}),e.data("width",(i=e.get(0)).getBoundingClientRect?Math.ceil(i.getBoundingClientRect().width):e.outerWidth()+1),e.css({position:"static",minWidth:"0px",maxWidth:"100000px"}),e.find("> li > ul").each((function(){u.resize(t(this),!0)})),n||e.find("ul").addBack().css({position:"",display:"",minWidth:"",maxWidth:""}).outerWidth((function(){return t(this).data("width")}))},update:function(e,n){var i=this;void 0===n&&(n=e,u.resize(e.$menu));var r=!1;return e.$menu.children().each((function(){var o,a=t(this),s=a.data("contextMenuKey"),l=e.items[s],c=t.isFunction(l.disabled)&&l.disabled.call(i,s,n)||!0===l.disabled;if((o=t.isFunction(l.visible)?l.visible.call(i,s,n):void 0===l.visible||!0===l.visible)&&(r=!0),a[o?"show":"hide"](),a[c?"addClass":"removeClass"](n.classNames.disabled),t.isFunction(l.icon)){a.removeClass(l._icon);var d=l.icon.call(this,i,a,s,l);"string"==typeof d?a.addClass(d):a.prepend(d)}if(l.type)switch(a.find("input, select, textarea").prop("disabled",c),l.type){case"text":case"textarea":l.$input.val(l.value||"");break;case"checkbox":case"radio":l.$input.val(l.value||"").prop("checked",!!l.selected);break;case"select":l.$input.val((0===l.selected?"0":l.selected)||"")}l.$menu&&(u.update.call(i,l,n)&&(r=!0))})),r},layer:function(e,n){var i=e.$layer=t('
    ').css({height:r.height(),width:r.width(),display:"block",position:"fixed","z-index":n,top:0,left:0,opacity:0,filter:"alpha(opacity=0)","background-color":"#000"}).data("contextMenuRoot",e).insertBefore(this).on("contextmenu",h.abortevent).on("mousedown",h.layerClick);return void 0===document.body.style.maxWidth&&i.css({position:"absolute",height:t(document).height()}),i},processPromises:function(t,e,n){function i(t,e,n){void 0===n?(n={error:{name:"No items and no error item",icon:"context-menu-icon context-menu-icon-quit"}},window.console&&(console.error||console.log).call(console,'When you reject a promise, provide an "items" object, equal to normal sub-menu items')):"string"==typeof n&&(n={error:{name:n}}),r(t,e,n)}function r(t,e,n){void 0!==e.$menu&&e.$menu.is(":visible")&&(t.$node.removeClass(e.classNames.iconLoadingClass),t.items=n,u.create(t,e,!0),u.update(t,e),e.positionSubmenu.call(t.$node,t.$menu))}t.$node.addClass(e.classNames.iconLoadingClass),n.then(function(t,e,n){void 0===n&&i(void 0),r(t,e,n)}.bind(this,t,e),i.bind(this,t,e))},activated:function(e){var n=e.$menu,i=n.offset(),r=t(window).height(),o=t(window).scrollTop(),a=n.height();a>r?n.css({height:r+"px","overflow-x":"hidden","overflow-y":"auto",top:o+"px"}):(i.topo+r)&&n.css({top:o+"px"})}};function f(e){return e.id&&t('label[for="'+e.id+'"]').val()||e.name}function p(e,n,i){return i||(i=0),n.each((function(){var n,r,o=t(this),a=this,s=this.nodeName.toLowerCase();switch("label"===s&&o.find("input, textarea, select").length&&(n=o.text(),s=(a=(o=o.children().first()).get(0)).nodeName.toLowerCase()),s){case"menu":r={name:o.attr("label"),items:{}},i=p(r.items,o.children(),i);break;case"a":case"button":r={name:o.text(),disabled:!!o.attr("disabled"),callback:function(){o.get(0).click()}};break;case"menuitem":case"command":switch(o.attr("type")){case void 0:case"command":case"menuitem":r={name:o.attr("label"),disabled:!!o.attr("disabled"),icon:o.attr("icon"),callback:function(){o.get(0).click()}};break;case"checkbox":r={type:"checkbox",disabled:!!o.attr("disabled"),name:o.attr("label"),selected:!!o.attr("checked")};break;case"radio":r={type:"radio",disabled:!!o.attr("disabled"),name:o.attr("label"),radio:o.attr("radiogroup"),value:o.attr("id"),selected:!!o.attr("checked")};break;default:r=void 0}break;case"hr":r="-------";break;case"input":switch(o.attr("type")){case"text":r={type:"text",name:n||f(a),disabled:!!o.attr("disabled"),value:o.val()};break;case"checkbox":r={type:"checkbox",name:n||f(a),disabled:!!o.attr("disabled"),selected:!!o.attr("checked")};break;case"radio":r={type:"radio",name:n||f(a),disabled:!!o.attr("disabled"),radio:!!o.attr("name"),value:o.val(),selected:!!o.attr("checked")};break;default:r=void 0}break;case"select":r={type:"select",name:n||f(a),disabled:!!o.attr("disabled"),selected:o.val(),options:{}},o.children().each((function(){r.options[this.value]=t(this).text()}));break;case"textarea":r={type:"textarea",name:n||f(a),disabled:!!o.attr("disabled"),value:o.val()};break;case"label":break;default:r={type:"html",html:o.clone(!0)}}r&&(i++,e["key"+i]=r)})),i}t.fn.contextMenu=function(e){var n=this,i=e;if(this.length>0)if(void 0===e)this.first().trigger("contextmenu");else if(void 0!==e.x&&void 0!==e.y)this.first().trigger(t.Event("contextmenu",{pageX:e.x,pageY:e.y,mouseButton:e.button}));else if("hide"===e){var r=this.first().data("contextMenu")?this.first().data("contextMenu").$menu:null;r&&r.trigger("contextmenu:hide")}else"destroy"===e?t.contextMenu("destroy",{context:this}):t.isPlainObject(e)?(e.context=this,t.contextMenu("create",e)):e?this.removeClass("context-menu-disabled"):e||this.addClass("context-menu-disabled");else t.each(s,(function(){this.selector===n.selector&&(i.data=this,t.extend(i.data,{trigger:"demand"}))})),h.contextmenu.call(i.target,i);return this},t.contextMenu=function(e,n){"string"!=typeof e&&(n=e,e="create"),"string"==typeof n?n={selector:n}:void 0===n&&(n={});var r=t.extend(!0,{},c,n||{}),l=t(document),d=l,f=!1;switch(r.context&&r.context.length?(d=t(r.context).first(),r.context=d.get(0),f=!t(r.context).is(document)):r.context=document,e){case"update":if(f)u.update(d);else for(var p in s)s.hasOwnProperty(p)&&u.update(s[p]);break;case"create":if(!r.selector)throw new Error("No selector specified");if(r.selector.match(/.context-menu-(list|item|input)($|\s)/))throw new Error('Cannot bind to selector "'+r.selector+'" as it contains a reserved className');if(!r.build&&(!r.items||t.isEmptyObject(r.items)))throw new Error("No Items specified");if(o++,r.ns=".contextMenu"+o,f||(a[r.selector]=r.ns),s[r.ns]=r,r.trigger||(r.trigger="right"),!i){var g="click"===r.itemClickEvent?"click.contextMenu":"mouseup.contextMenu",m={"contextmenu:focus.contextMenu":h.focusItem,"contextmenu:blur.contextMenu":h.blurItem,"contextmenu.contextMenu":h.abortevent,"mouseenter.contextMenu":h.itemMouseenter,"mouseleave.contextMenu":h.itemMouseleave};m[g]=h.itemClick,l.on({"contextmenu:hide.contextMenu":h.hideMenu,"prevcommand.contextMenu":h.prevItem,"nextcommand.contextMenu":h.nextItem,"contextmenu.contextMenu":h.abortevent,"mouseenter.contextMenu":h.menuMouseenter,"mouseleave.contextMenu":h.menuMouseleave},".context-menu-list").on("mouseup.contextMenu",".context-menu-input",h.inputClick).on(m,".context-menu-item"),i=!0}switch(d.on("contextmenu"+r.ns,r.selector,r,h.contextmenu),f&&d.on("remove"+r.ns,(function(){t(this).contextMenu("destroy")})),r.trigger){case"hover":d.on("mouseenter"+r.ns,r.selector,r,h.mouseenter).on("mouseleave"+r.ns,r.selector,r,h.mouseleave);break;case"left":d.on("click"+r.ns,r.selector,r,h.click);break;case"touchstart":d.on("touchstart"+r.ns,r.selector,r,h.click)}r.build||u.create(r);break;case"destroy":var v;if(f){var y=r.context;t.each(s,(function(e,n){if(!n)return!0;if(!t(y).is(n.selector))return!0;(v=t(".context-menu-list").filter(":visible")).length&&v.data().contextMenuRoot.$trigger.is(t(n.context).find(n.selector))&&v.trigger("contextmenu:hide",{force:!0});try{s[n.ns].$menu&&s[n.ns].$menu.remove(),delete s[n.ns]}catch(t){s[n.ns]=null}return t(n.context).off(n.ns),!0}))}else if(r.selector){if(a[r.selector]){(v=t(".context-menu-list").filter(":visible")).length&&v.data().contextMenuRoot.$trigger.is(r.selector)&&v.trigger("contextmenu:hide",{force:!0});try{s[a[r.selector]].$menu&&s[a[r.selector]].$menu.remove(),delete s[a[r.selector]]}catch(t){s[a[r.selector]]=null}l.off(a[r.selector])}}else l.off(".contextMenu .contextMenuAutoHide"),t.each(s,(function(e,n){t(n.context).off(n.ns)})),a={},s={},o=0,i=!1,t("#context-menu-layer, .context-menu-list").remove();break;case"html5":(!t.support.htmlCommand&&!t.support.htmlMenuitem||"boolean"==typeof n&&n)&&t('menu[type="context"]').each((function(){this.id&&t.contextMenu({selector:"[contextmenu="+this.id+"]",items:t.contextMenu.fromMenu(this)})})).css("display","none");break;default:throw new Error('Unknown operation "'+e+'"')}return this},t.contextMenu.setInputValues=function(e,n){void 0===n&&(n={}),t.each(e.inputs,(function(t,e){switch(e.type){case"text":case"textarea":e.value=n[t]||"";break;case"checkbox":e.selected=!!n[t];break;case"radio":e.selected=(n[e.radio]||"")===e.value;break;case"select":e.selected=n[t]||""}}))},t.contextMenu.getInputValues=function(e,n){return void 0===n&&(n={}),t.each(e.inputs,(function(t,e){switch(e.type){case"text":case"textarea":case"select":n[t]=e.$input.val();break;case"checkbox":n[t]=e.$input.prop("checked");break;case"radio":e.$input.prop("checked")&&(n[e.radio]=e.value)}})),n},t.contextMenu.fromMenu=function(e){var n={};return p(n,t(e).children()),n},t.contextMenu.defaults=c,t.contextMenu.types=l,t.contextMenu.handle=h,t.contextMenu.op=u,t.contextMenu.menus=s})),"undefined"==typeof jQuery)throw new Error("Tempus Dominus Bootstrap4's requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4's JavaScript.");if(function(t){var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Tempus Dominus Bootstrap4's requires at least jQuery v3.0.0 but less than v4.0.0")}(),"undefined"==typeof moment)throw new Error("Tempus Dominus Bootstrap4's requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4's JavaScript.");var version=moment.version.split(".");if(version[0]<=2&&version[1]<17||version[0]>=3)throw new Error("Tempus Dominus Bootstrap4's requires at least moment.js v2.17.0 but less than v3.0.0");!function(){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(){function t(t,e){for(var n=0;n1){for(var r=0;r1)throw new TypeError("isEnabled expects a single character string parameter");switch(t){case"y":return-1!==this.actualFormat.indexOf("Y");case"M":return-1!==this.actualFormat.indexOf("M");case"d":return-1!==this.actualFormat.toLowerCase().indexOf("d");case"h":case"H":return-1!==this.actualFormat.toLowerCase().indexOf("h");case"m":return-1!==this.actualFormat.indexOf("m");case"s":return-1!==this.actualFormat.indexOf("s");case"a":case"A":return-1!==this.actualFormat.toLowerCase().indexOf("a");default:return!1}},v.prototype._hasTime=function(){return this._isEnabled("h")||this._isEnabled("m")||this._isEnabled("s")},v.prototype._hasDate=function(){return this._isEnabled("y")||this._isEnabled("M")||this._isEnabled("d")},v.prototype._dataToOptions=function(){var e=this._element.data(),n={};return e.dateOptions&&e.dateOptions instanceof Object&&(n=t.extend(!0,n,e.dateOptions)),t.each(this._options,(function(t){var i="date"+t.charAt(0).toUpperCase()+t.slice(1);void 0!==e[i]?n[t]=e[i]:delete n[t]})),n},v.prototype._notifyEvent=function(t){t.type===v.Event.CHANGE&&t.date&&t.date.isSame(t.oldDate)||!t.date&&!t.oldDate||this._element.trigger(t)},v.prototype._viewUpdate=function(t){"y"===t&&(t="YYYY"),this._notifyEvent({type:v.Event.UPDATE,change:t,viewDate:this._viewDate.clone()})},v.prototype._showMode=function(t){this.widget&&(t&&(this.currentViewMode=Math.max(this.MinViewModeNumber,Math.min(3,this.currentViewMode+t))),this.widget.find(".datepicker > div").hide().filter(".datepicker-"+h[this.currentViewMode].CLASS_NAME).show())},v.prototype._isInDisabledDates=function(t){return!0===this._options.disabledDates[t.format("YYYY-MM-DD")]},v.prototype._isInEnabledDates=function(t){return!0===this._options.enabledDates[t.format("YYYY-MM-DD")]},v.prototype._isInDisabledHours=function(t){return!0===this._options.disabledHours[t.format("H")]},v.prototype._isInEnabledHours=function(t){return!0===this._options.enabledHours[t.format("H")]},v.prototype._isValid=function(e,n){if(!e.isValid())return!1;if(this._options.disabledDates&&"d"===n&&this._isInDisabledDates(e))return!1;if(this._options.enabledDates&&"d"===n&&!this._isInEnabledDates(e))return!1;if(this._options.minDate&&e.isBefore(this._options.minDate,n))return!1;if(this._options.maxDate&&e.isAfter(this._options.maxDate,n))return!1;if(this._options.daysOfWeekDisabled&&"d"===n&&-1!==this._options.daysOfWeekDisabled.indexOf(e.day()))return!1;if(this._options.disabledHours&&("h"===n||"m"===n||"s"===n)&&this._isInDisabledHours(e))return!1;if(this._options.enabledHours&&("h"===n||"m"===n||"s"===n)&&!this._isInEnabledHours(e))return!1;if(this._options.disabledTimeIntervals&&("h"===n||"m"===n||"s"===n)){var i=!1;if(t.each(this._options.disabledTimeIntervals,(function(){if(e.isBetween(this[0],this[1]))return i=!0,!1})),i)return!1}return!0},v.prototype._parseInputDate=function(t){return void 0===this._options.parseInputDate?i.isMoment(t)||(t=this.getMoment(t)):t=this._options.parseInputDate(t),t},v.prototype._keydown=function(t){var e=null,n=void 0,i=void 0,r=void 0,o=void 0,a=[],s={},l=t.which;for(n in p[l]="p",p)p.hasOwnProperty(n)&&"p"===p[n]&&(a.push(n),parseInt(n,10)!==l&&(s[n]=!0));for(n in this._options.keyBinds)if(this._options.keyBinds.hasOwnProperty(n)&&"function"==typeof this._options.keyBinds[n]&&(r=n.split(" ")).length===a.length&&u[l]===r[r.length-1]){for(o=!0,i=r.length-2;i>=0;i--)if(!(u[r[i]]in s)){o=!1;break}if(o){e=this._options.keyBinds[n];break}}e&&e.call(this)&&(t.stopPropagation(),t.preventDefault())},v.prototype._keyup=function(t){p[t.which]="r",g[t.which]&&(g[t.which]=!1,t.stopPropagation(),t.preventDefault())},v.prototype._indexGivenDates=function(e){var n={},i=this;return t.each(e,(function(){var t=i._parseInputDate(this);t.isValid()&&(n[t.format("YYYY-MM-DD")]=!0)})),!!Object.keys(n).length&&n},v.prototype._indexGivenHours=function(e){var n={};return t.each(e,(function(){n[this]=!0})),!!Object.keys(n).length&&n},v.prototype._initFormatting=function(){var t=this._options.format||"L LT",e=this;this.actualFormat=t.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,(function(t){return e._dates[0].localeData().longDateFormat(t)||t})),this.parseFormats=this._options.extraFormats?this._options.extraFormats.slice():[],this.parseFormats.indexOf(t)<0&&this.parseFormats.indexOf(this.actualFormat)<0&&this.parseFormats.push(this.actualFormat),this.use24Hours=this.actualFormat.toLowerCase().indexOf("a")<1&&this.actualFormat.replace(/\[.*?]/g,"").indexOf("h")<1,this._isEnabled("y")&&(this.MinViewModeNumber=2),this._isEnabled("M")&&(this.MinViewModeNumber=1),this._isEnabled("d")&&(this.MinViewModeNumber=0),this.currentViewMode=Math.max(this.MinViewModeNumber,this.currentViewMode),this.unset||this._setValue(this._dates[0],0)},v.prototype._getLastPickedDate=function(){return this._dates[this._getLastPickedDateIndex()]},v.prototype._getLastPickedDateIndex=function(){return this._dates.length-1},v.prototype.getMoment=function(t){var e=void 0;return e=null==t?i():this._hasTimeZone()?i.tz(t,this.parseFormats,this._options.locale,this._options.useStrict,this._options.timeZone):i(t,this.parseFormats,this._options.locale,this._options.useStrict),this._hasTimeZone()&&e.tz(this._options.timeZone),e},v.prototype.toggle=function(){return this.widget?this.hide():this.show()},v.prototype.ignoreReadonly=function(t){if(0===arguments.length)return this._options.ignoreReadonly;if("boolean"!=typeof t)throw new TypeError("ignoreReadonly () expects a boolean parameter");this._options.ignoreReadonly=t},v.prototype.options=function(e){if(0===arguments.length)return t.extend(!0,{},this._options);if(!(e instanceof Object))throw new TypeError("options() this.options parameter should be an object");t.extend(!0,this._options,e);var n=this;t.each(this._options,(function(t,e){void 0!==n[t]&&n[t](e)}))},v.prototype.date=function(t,e){if(e=e||0,0===arguments.length)return this.unset?null:this._options.allowMultidate?this._dates.join(this._options.multidateSeparator):this._dates[e].clone();if(!(null===t||"string"==typeof t||i.isMoment(t)||t instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");this._setValue(null===t?null:this._parseInputDate(t),e)},v.prototype.format=function(t){if(0===arguments.length)return this._options.format;if("string"!=typeof t&&("boolean"!=typeof t||!1!==t))throw new TypeError("format() expects a string or boolean:false parameter "+t);this._options.format=t,this.actualFormat&&this._initFormatting()},v.prototype.timeZone=function(t){if(0===arguments.length)return this._options.timeZone;if("string"!=typeof t)throw new TypeError("newZone() expects a string parameter");this._options.timeZone=t},v.prototype.dayViewHeaderFormat=function(t){if(0===arguments.length)return this._options.dayViewHeaderFormat;if("string"!=typeof t)throw new TypeError("dayViewHeaderFormat() expects a string parameter");this._options.dayViewHeaderFormat=t},v.prototype.extraFormats=function(t){if(0===arguments.length)return this._options.extraFormats;if(!1!==t&&!(t instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");this._options.extraFormats=t,this.parseFormats&&this._initFormatting()},v.prototype.disabledDates=function(e){if(0===arguments.length)return this._options.disabledDates?t.extend({},this._options.disabledDates):this._options.disabledDates;if(!e)return this._options.disabledDates=!1,this._update(),!0;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");this._options.disabledDates=this._indexGivenDates(e),this._options.enabledDates=!1,this._update()},v.prototype.enabledDates=function(e){if(0===arguments.length)return this._options.enabledDates?t.extend({},this._options.enabledDates):this._options.enabledDates;if(!e)return this._options.enabledDates=!1,this._update(),!0;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");this._options.enabledDates=this._indexGivenDates(e),this._options.disabledDates=!1,this._update()},v.prototype.daysOfWeekDisabled=function(t){if(0===arguments.length)return this._options.daysOfWeekDisabled.splice(0);if("boolean"==typeof t&&!t)return this._options.daysOfWeekDisabled=!1,this._update(),!0;if(!(t instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(this._options.daysOfWeekDisabled=t.reduce((function(t,e){return(e=parseInt(e,10))>6||e<0||isNaN(e)||-1===t.indexOf(e)&&t.push(e),t}),[]).sort(),this._options.useCurrent&&!this._options.keepInvalid)for(var e=0;e1)throw new TypeError("multidateSeparator expects a single character string parameter");this._options.multidateSeparator=t},e(v,null,[{key:"NAME",get:function(){return r}},{key:"DATA_KEY",get:function(){return o}},{key:"EVENT_KEY",get:function(){return a}},{key:"DATA_API_KEY",get:function(){return s}},{key:"DatePickerModes",get:function(){return h}},{key:"ViewModes",get:function(){return f}},{key:"Event",get:function(){return d}},{key:"Selector",get:function(){return l}},{key:"Default",get:function(){return m},set:function(t){m=t}},{key:"ClassName",get:function(){return c}}]),v}();return v}(jQuery,moment);!function(e){var r=e.fn[i.NAME],o=["top","bottom","auto"],a=["left","right","auto"],s=["default","top","bottom"],l=function(t){var n=t.data("target"),r=void 0;return n||(n=t.attr("href")||"",n=/^#[a-z]/i.test(n)?n:null),0===(r=e(n)).length||r.data(i.DATA_KEY)||e.extend({},r.data(),e(this).data()),r},c=function(r){function l(t,e){n(this,l);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,r.call(this,t,e));return i._init(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(l,r),l.prototype._init=function(){if(this._element.hasClass("input-group")){var t=this._element.find(".datepickerbutton");0===t.length?this.component=this._element.find('[data-toggle="datetimepicker"]'):this.component=t}},l.prototype._getDatePickerTemplate=function(){var t=e("").append(e("").append(e("").addClass("prev").attr("data-action","previous").append(e("").addClass(this._options.icons.previous))).append(e("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",this._options.calendarWeeks?"6":"5")).append(e("").addClass("next").attr("data-action","next").append(e("").addClass(this._options.icons.next)))),n=e("").append(e("").append(e("").attr("colspan",this._options.calendarWeeks?"8":"7")));return[e("
    ").addClass("datepicker-days").append(e("").addClass("table table-sm").append(t).append(e(""))),e("
    ").addClass("datepicker-months").append(e("
    ").addClass("table-condensed").append(t.clone()).append(n.clone())),e("
    ").addClass("datepicker-years").append(e("
    ").addClass("table-condensed").append(t.clone()).append(n.clone())),e("
    ").addClass("datepicker-decades").append(e("
    ").addClass("table-condensed").append(t.clone()).append(n.clone()))]},l.prototype._getTimePickerMainTemplate=function(){var t=e(""),n=e(""),i=e("");return this._isEnabled("h")&&(t.append(e("").append(e("").append(e("").append(e("").append(e("
    ").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(e("").addClass(this._options.icons.up)))),n.append(e("").append(e("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:this._options.tooltips.pickHour}).attr("data-action","showHours"))),i.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(e("").addClass(this._options.icons.down))))),this._isEnabled("m")&&(this._isEnabled("h")&&(t.append(e("").addClass("separator")),n.append(e("").addClass("separator").html(":")),i.append(e("").addClass("separator"))),t.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(e("").addClass(this._options.icons.up)))),n.append(e("").append(e("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:this._options.tooltips.pickMinute}).attr("data-action","showMinutes"))),i.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(e("").addClass(this._options.icons.down))))),this._isEnabled("s")&&(this._isEnabled("m")&&(t.append(e("").addClass("separator")),n.append(e("").addClass("separator").html(":")),i.append(e("").addClass("separator"))),t.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(e("").addClass(this._options.icons.up)))),n.append(e("").append(e("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:this._options.tooltips.pickSecond}).attr("data-action","showSeconds"))),i.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(e("").addClass(this._options.icons.down))))),this.use24Hours||(t.append(e("").addClass("separator")),n.append(e("").append(e("").addClass("separator"))),e("
    ").addClass("timepicker-picker").append(e("").addClass("table-condensed").append([t,n,i]))},l.prototype._getTimePickerTemplate=function(){var t=e("
    ").addClass("timepicker-hours").append(e("
    ").addClass("table-condensed")),n=e("
    ").addClass("timepicker-minutes").append(e("
    ").addClass("table-condensed")),i=e("
    ").addClass("timepicker-seconds").append(e("
    ").addClass("table-condensed")),r=[this._getTimePickerMainTemplate()];return this._isEnabled("h")&&r.push(t),this._isEnabled("m")&&r.push(n),this._isEnabled("s")&&r.push(i),r},l.prototype._getToolbar=function(){var t=[];if(this._options.buttons.showToday&&t.push(e("").insertAfter(r)),A.nTBody=o[0],0===(r=_.children("tfoot")).length&&0").appendTo(_)),0===r.length||0===r.children().length?_.addClass(T.sNoFooter):0/g,Zt=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Qt=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,Jt=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,te=function(t){return!t||!0===t||"-"===t},ee=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},ne=function(t,e){return qt[e]||(qt[e]=new RegExp(ve(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(qt[e],"."):t},ie=function(t,e,n){var i="string"==typeof t;return!!te(t)||(e&&i&&(t=ne(t,e)),n&&i&&(t=t.replace(Jt,"")),!isNaN(parseFloat(t))&&isFinite(t))},re=function(t,e,n){return!!te(t)||((te(t)||"string"==typeof t)&&!!ie(t.replace(Kt,""),e,n)||null)},oe=function(t,e,n){var r=[],o=0,a=t.length;if(n!==i)for(;ot.length))for(var e=t.slice().sort(),n=e[0],i=1,r=e.length;i")[0],be=ye.textContent!==i,xe=/<.*?>/g,we=Ut.util.throttle,_e=[],ke=Array.prototype,Se=function(e,n){if(!(this instanceof Se))return new Se(e,n);var i=[],r=function(e){(e=function(e){var n,i=Ut.settings,r=t.map(i,(function(t,e){return t.nTable}));if(!e)return[];if(e.nTable&&e.oApi)return[e];if(e.nodeName&&"table"===e.nodeName.toLowerCase()){var o=t.inArray(e,r);return-1!==o?[i[o]]:null}return e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?n=t(e):e instanceof t&&(n=e),n?n.map((function(e){return-1!==(o=t.inArray(this,r))?i[o]:null})).toArray():void 0)}(e))&&i.push.apply(i,e)};if(Array.isArray(e))for(var o=0,a=e.length;ot?new Se(e[t],this[t]):null},filter:function(t){var e=[];if(ke.filter)e=ke.filter.call(this,t,this);else for(var n=0,i=this.length;n").addClass(i),t("td",r).addClass(i).html(n)[0].colSpan=m(e),o.push(r[0]))};a(i,r),n._details&&n._details.detach(),n._details=t(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(r[0],r[0].aoData[this[0]],e,n),this)})),Vt(["row().child.show()","row().child().show()"],(function(t){return Oe(this,!0),this})),Vt(["row().child.hide()","row().child().hide()"],(function(){return Oe(this,!1),this})),Vt(["row().child.remove()","row().child().remove()"],(function(){return Me(this),this})),Vt("row().child.isShown()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]]._detailsShow||!1}));var je=/^([^:]+):(name|visIdx|visible)$/,Fe=function(t,e,n,i,r){n=[],i=0;for(var o=r.length;i(s=parseInt(c[1],10))){var d=t.map(r,(function(t,e){return t.bVisible?e:null}));return[d[d.length+s]]}return[p(e,s)];case"name":return t.map(o,(function(t,e){return t===c[1]?e:null}));default:return[]}return n.nodeName&&n._DT_CellIndex?[n._DT_CellIndex.column]:(s=t(a).filter(n).map((function(){return t.inArray(this,a)})).toArray()).length||!n.nodeName?s:(s=t(n).closest("*[data-dt-column]")).length?[s.data("dt-column")]:[]}),e,i)}(i,e,n)}),1);return r.selector.cols=e,r.selector.opts=n,r})),Xt("columns().header()","column().header()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTh}),1)})),Xt("columns().footer()","column().footer()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTf}),1)})),Xt("columns().data()","column().data()",(function(){return this.iterator("column-rows",Fe,1)})),Xt("columns().dataSrc()","column().dataSrc()",(function(){return this.iterator("column",(function(t,e){return t.aoColumns[e].mData}),1)})),Xt("columns().cache()","column().cache()",(function(t){return this.iterator("column-rows",(function(e,n,i,r,o){return ae(e.aoData,o,"search"===t?"_aFilterData":"_aSortData",n)}),1)})),Xt("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(t,e,n,i,r){return ae(t.aoData,r,"anCells",e)}),1)})),Xt("columns().visible()","column().visible()",(function(e,n){var r=this,o=this.iterator("column",(function(n,r){if(e===i)return n.aoColumns[r].bVisible;var o,a=n.aoColumns,s=a[r],l=n.aoData;if(e!==i&&s.bVisible!==e){if(e){var c=t.inArray(!0,oe(a,"bVisible"),r+1);for(a=0,o=l.length;an;return!0},Ut.isDataTable=Ut.fnIsDataTable=function(e){var n=t(e).get(0),i=!1;return e instanceof Ut.Api||(t.each(Ut.settings,(function(e,r){e=r.nScrollHead?t("table",r.nScrollHead)[0]:null;var o=r.nScrollFoot?t("table",r.nScrollFoot)[0]:null;r.nTable!==n&&e!==n&&o!==n||(i=!0)})),i)},Ut.tables=Ut.fnTables=function(e){var n=!1;t.isPlainObject(e)&&(n=e.api,e=e.visible);var i=t.map(Ut.settings,(function(n){if(!e||e&&t(n.nTable).is(":visible"))return n.nTable}));return n?new Se(i):i},Ut.camelToHungarian=o,Vt("$()",(function(e,n){return n=this.rows(n).nodes(),n=t(n),t([].concat(n.filter(e).toArray(),n.find(e).toArray()))})),t.each(["on","one","off"],(function(e,n){Vt(n+"()",(function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),(function(t){return t.match(/\.dt\b/)?t:t+".dt"})).join(" ");var i=t(this.tables().nodes());return i[n].apply(i,e),this}))})),Vt("clear()",(function(){return this.iterator("table",(function(t){A(t)}))})),Vt("settings()",(function(){return new Se(this.context,this.context)})),Vt("init()",(function(){var t=this.context;return t.length?t[0].oInit:null})),Vt("data()",(function(){return this.iterator("table",(function(t){return oe(t.aoData,"_aData")})).flatten()})),Vt("destroy()",(function(n){return n=n||!1,this.iterator("table",(function(i){var r=i.oClasses,o=i.nTable,a=i.nTBody,s=i.nTHead,l=i.nTFoot,c=t(o);a=t(a);var d,h=t(i.nTableWrapper),u=t.map(i.aoData,(function(t){return t.nTr}));i.bDestroying=!0,Lt(i,"aoDestroyCallback","destroy",[i]),n||new Se(i).columns().visible(!0),h.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+i.sInstance),o!=s.parentNode&&(c.children("thead").detach(),c.append(s)),l&&o!=l.parentNode&&(c.children("tfoot").detach(),c.append(l)),i.aaSorting=[],i.aaSortingFixed=[],kt(i),t(u).removeClass(i.asStripeClasses.join(" ")),t("th, td",s).removeClass(r.sSortable+" "+r.sSortableAsc+" "+r.sSortableDesc+" "+r.sSortableNone),a.children().detach(),a.append(u),s=i.nTableWrapper.parentNode,c[l=n?"remove":"detach"](),h[l](),!n&&s&&(s.insertBefore(o,i.nTableReinsertBefore),c.css("width",i.sDestroyWidth).removeClass(r.sTable),(d=i.asDestroyStripes.length)&&a.children().each((function(e){t(this).addClass(i.asDestroyStripes[e%d])}))),-1!==(r=t.inArray(i,Ut.settings))&&Ut.settings.splice(r,1)}))})),t.each(["column","row","cell"],(function(t,e){Vt(e+"s().every()",(function(t){var n=this.selector.opts,r=this;return this.iterator(e,(function(o,a,s,l,c){t.call(r[e](a,"cell"===e?s:n,"cell"===e?n:i),a,s,l,c)}))}))})),Vt("i18n()",(function(e,n,r){var o=this.context[0];return(e=ge(e)(o.oLanguage))===i&&(e=n),r!==i&&t.isPlainObject(e)&&(e=e[r]!==i?e[r]:e._),e.replace("%d",r)})),Ut.version="1.12.1",Ut.settings=[],Ut.models={},Ut.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,return:!1},Ut.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},Ut.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Ut.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},Ut.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},r(Ut.defaults),Ut.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},r(Ut.defaults.column),Ut.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:i,oAjaxData:i,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Nt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Nt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,n=e+t,i=this.aiDisplay.length,r=this.oFeatures,o=r.bPaginate;return r.bServerSide?!1===o||-1===t?e+i:Math.min(e+t,this._iRecordsDisplay):!o||n>i||-1===t?i:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},Ut.ext=$t={buttons:{},classes:{},builder:"bs4/dt-1.12.1/b-2.2.3/b-colvis-2.2.3/b-html5-2.2.3/b-print-2.2.3/cr-1.5.6/r-2.3.0/rr-1.2.8/sp-2.0.2/sl-1.4.0",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Ut.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Ut.version},t.extend($t,{afnFiltering:$t.search,aTypes:$t.type.detect,ofnSearch:$t.type.search,oSort:$t.type.order,afnSortData:$t.order,aoFeatures:$t.feature,oApi:$t.internal,oStdClasses:$t.classes,oPagination:$t.pager}),t.extend(Ut.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ne=Ut.ext.pager;t.extend(Ne,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[Rt(t,e)]},simple_numbers:function(t,e){return["previous",Rt(t,e),"next"]},full_numbers:function(t,e){return["first","previous",Rt(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",Rt(t,e),"last"]},_numbers:Rt,numbers_length:7}),t.extend(!0,Ut.ext.renderer,{pageButton:{_:function(e,r,o,a,s,l){var c,d,h=e.oClasses,u=e.oLanguage.oPaginate,f=e.oLanguage.oAria.paginate||{},p=0,g=function(n,i){var r,a=h.sPageButtonDisabled,m=function(t){st(e,t.data.action,!0)},v=0;for(r=i.length;v").appendTo(n);g(b,y)}else{switch(c=null,d=y,b=e.iTabIndex,y){case"ellipsis":n.append('');break;case"first":c=u.sFirst,0===s&&(b=-1,d+=" "+a);break;case"previous":c=u.sPrevious,0===s&&(b=-1,d+=" "+a);break;case"next":c=u.sNext,0!==l&&s!==l-1||(b=-1,d+=" "+a);break;case"last":c=u.sLast,0!==l&&s!==l-1||(b=-1,d+=" "+a);break;default:c=e.fnFormatNumber(y+1),d=s===y?h.sPageButtonActive:""}null!==c&&(Mt(b=t("",{class:h.sPageButton+" "+d,"aria-controls":e.sTableId,"aria-label":f[y],"data-dt-idx":p,tabindex:b,id:0===o&&"string"==typeof y?e.sTableId+"_"+y:null}).html(c).appendTo(n),{action:y},m),p++)}}};try{var m=t(r).find(n.activeElement).data("dt-idx")}catch(t){}g(t(r).empty(),a),m!==i&&t(r).find("[data-dt-idx="+m+"]").trigger("focus")}}}),t.extend(Ut.ext.type.detect,[function(t,e){return e=e.oLanguage.sDecimal,ie(t,e)?"num"+e:null},function(t,e){return(!t||t instanceof Date||Zt.test(t))&&(null!==(e=Date.parse(t))&&!isNaN(e)||te(t))?"date":null},function(t,e){return e=e.oLanguage.sDecimal,ie(t,e,!0)?"num-fmt"+e:null},function(t,e){return e=e.oLanguage.sDecimal,re(t,e)?"html-num"+e:null},function(t,e){return e=e.oLanguage.sDecimal,re(t,e,!0)?"html-num-fmt"+e:null},function(t,e){return te(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(Ut.ext.type.search,{html:function(t){return te(t)?t:"string"==typeof t?t.replace(Gt," ").replace(Kt,""):""},string:function(t){return te(t)?t:"string"==typeof t?t.replace(Gt," "):t}});var Re=function(t,e,n,i){return 0===t||t&&"-"!==t?(e&&(t=ne(t,e)),t.replace&&(n&&(t=t.replace(n,"")),i&&(t=t.replace(i,""))),1*t):-1/0};t.extend($t.type.order,{"date-pre":function(t){return t=Date.parse(t),isNaN(t)?-1/0:t},"html-pre":function(t){return te(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return te(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return te?1:0},"string-desc":function(t,e){return te?-1:0}}),Ht(""),t.extend(!0,Ut.ext.renderer,{header:{_:function(e,n,i,r){t(e.nTable).on("order.dt.DT",(function(t,o,a,s){e===o&&(t=i.idx,n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==s[t]?r.sSortAsc:"desc"==s[t]?r.sSortDesc:i.sSortingClass))}))},jqueryui:function(e,n,i,r){t("
    ").addClass(r.sSortJUIWrapper).append(n.contents()).append(t("").addClass(r.sSortIcon+" "+i.sSortingClassJUI)).appendTo(n),t(e.nTable).on("order.dt.DT",(function(t,o,a,s){e===o&&(t=i.idx,n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==s[t]?r.sSortAsc:"desc"==s[t]?r.sSortDesc:i.sSortingClass),n.find("span."+r.sSortIcon).removeClass(r.sSortJUIAsc+" "+r.sSortJUIDesc+" "+r.sSortJUI+" "+r.sSortJUIAscAllowed+" "+r.sSortJUIDescAllowed).addClass("asc"==s[t]?r.sSortJUIAsc:"desc"==s[t]?r.sSortJUIDesc:i.sSortingClassJUI))}))}}});var He=function(t){return Array.isArray(t)&&(t=t.join(",")),"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):t},Be=!1,ze=",",Ye=".";if(Intl)try{for(var We=(new Intl.NumberFormat).formatToParts(100000.1),$e=0;$ei?"-":"",s=parseFloat(i);return isNaN(s)?He(i):(s=s.toFixed(n),i=Math.abs(s),s=parseInt(i,10),i=n?e+(i-s).toFixed(n).substring(2):"",0===s&&0===parseFloat(i)&&(a=""),a+(r||"")+s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+i+(o||""))}}},text:function(){return{display:He,filter:He}}},t.extend(Ut.ext.internal,{_fnExternApiFunc:Wt,_fnBuildAjax:H,_fnAjaxUpdate:B,_fnAjaxParameters:z,_fnAjaxUpdateDraw:Y,_fnAjaxDataSrc:W,_fnAddColumn:h,_fnColumnOptions:u,_fnAdjustColumnSizing:f,_fnVisibleToColumnIndex:p,_fnColumnIndexToVisible:g,_fnVisbleColumns:m,_fnGetColumns:v,_fnColumnTypes:y,_fnApplyColumnDefs:b,_fnHungarianMap:r,_fnCamelToHungarian:o,_fnLanguageCompat:a,_fnBrowserDetect:c,_fnAddData:x,_fnAddTr:w,_fnNodeToDataIndex:function(t,e){return e._DT_RowIndex!==i?e._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,n,i){return t.inArray(i,e.aoData[n].anCells)},_fnGetCellData:_,_fnSetCellData:k,_fnSplitObjNotation:S,_fnGetObjectDataFn:ge,_fnSetObjectDataFn:me,_fnGetDataMaster:C,_fnClearTable:A,_fnDeleteIndex:T,_fnInvalidate:D,_fnGetRowElements:I,_fnCreateTr:P,_fnBuildHead:M,_fnDrawHead:O,_fnDraw:L,_fnReDraw:j,_fnAddOptionsHtml:F,_fnDetectHeader:N,_fnGetUniqueThs:R,_fnFeatureHtmlFilter:$,_fnFilterComplete:V,_fnFilterCustom:X,_fnFilterColumn:U,_fnFilter:q,_fnFilterCreateSearch:G,_fnEscapeRegex:ve,_fnFilterData:K,_fnFeatureHtmlInfo:J,_fnUpdateInfo:tt,_fnInfoMacros:et,_fnInitialise:nt,_fnInitComplete:it,_fnLengthChange:rt,_fnFeatureHtmlLength:ot,_fnFeatureHtmlPaginate:at,_fnPageChange:st,_fnFeatureHtmlProcessing:lt,_fnProcessingDisplay:ct,_fnFeatureHtmlTable:dt,_fnScrollDraw:ht,_fnApplyToChildren:ut,_fnCalculateColumnWidths:ft,_fnThrottle:we,_fnConvertToWidth:pt,_fnGetWidestNode:gt,_fnGetMaxLenString:mt,_fnStringToCss:vt,_fnSortFlatten:yt,_fnSort:bt,_fnSortAria:xt,_fnSortListener:wt,_fnSortAttachListener:_t,_fnSortingClasses:kt,_fnSortData:St,_fnSaveState:Ct,_fnLoadState:At,_fnImplementState:Tt,_fnSettingsFromNode:Dt,_fnLog:It,_fnMap:Pt,_fnBindAction:Mt,_fnCallbackReg:Ot,_fnCallbackFire:Lt,_fnLengthOverflow:jt,_fnRenderer:Ft,_fnDataSource:Nt,_fnRowAttributes:E,_fnExtend:Et,_fnCalculateEnd:function(){}}),t.fn.dataTable=Ut,Ut.$=t,t.fn.dataTableSettings=Ut.settings,t.fn.dataTableExt=Ut.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(Ut,(function(e,n){t.fn.DataTable[e]=n})),Ut}));var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(t,e,n){t instanceof String&&(t=String(t));for(var i=t.length,r=0;r<'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),t.extend(r.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),r.ext.renderer.pageButton.bootstrap=function(e,o,a,s,l,c){var d,h,u=new r.Api(e),f=e.oClasses,p=e.oLanguage.oPaginate,g=e.oLanguage.oAria.paginate||{},m=0,v=function(n,i){var r,o=function(e){e.preventDefault(),t(e.currentTarget).hasClass("disabled")||u.page()==e.data.action||u.page(e.data.action).draw("page")},s=0;for(r=i.length;s",{class:f.sPageButton+" "+h,id:0===a&&"string"==typeof y?e.sTableId+"_"+y:null}).append(t("",{href:"#","aria-controls":e.sTableId,"aria-label":g[y],"data-dt-idx":m,tabindex:e.iTabIndex,class:"page-link"}).html(d)).appendTo(n);e.oApi._fnBindAction(b,{action:y},o),m++}}}};try{var y=t(o).find(n.activeElement).data("dt-idx")}catch(t){}v(t(o).empty().html('
      ').children("ul"),s),y!==i&&t(o).find("[data-dt-idx="+y+"]").trigger("focus")},r})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,n){return e||(e=window),n&&n.fn.dataTable||(n=require("datatables.net")(e,n).$),t(n,e,e.document)}:t(jQuery,window,document)}((function(t,e,n,i){function r(e,n,i){t.fn.animate?e.stop().fadeIn(n,i):(e.css("display","block"),i&&i.call(e))}function o(e,n,i){t.fn.animate?e.stop().fadeOut(n,i):(e.css("display","none"),i&&i.call(e))}function a(t,e){return t=new l.Api(t),e=e||(t.init().buttons||l.defaults.buttons),new u(t,e).container()}var s,l=t.fn.dataTable,c=0,d=0,h=l.ext.buttons,u=function(e,n){if(!(this instanceof u))return function(t){return new u(t,e).container()};void 0===n&&(n={}),!0===n&&(n={}),Array.isArray(n)&&(n={buttons:n}),this.c=t.extend(!0,{},u.defaults,n),n.buttons&&(this.c.buttons=n.buttons),this.s={dt:new l.Api(e),buttons:[],listenKeys:"",namespace:"dtb"+c++},this.dom={container:t("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)},this._constructor()};t.extend(u.prototype,{action:function(t,e){return t=this._nodeToButton(t),e===i?t.conf.action:(t.conf.action=e,this)},active:function(e,n){var r=this._nodeToButton(e);return e=this.c.dom.button.active,r=t(r.node),n===i?r.hasClass(e):(r.toggleClass(e,n===i||n),this)},add:function(t,e,n){var r=this.s.buttons;if("string"==typeof e){e=e.split("-");var o=this.s;r=0;for(var a=e.length-1;r"),f.conf._collection=f.collection,f.conf.split)for(var p=0;p'+this.c.dom.splitDropdown.text+""));this._expandButton(f.buttons,f.conf.buttons,f.conf.split,!n,n,s,f.conf)}f.conf.parent=l,u.init&&u.init.call(c.button(f.node),c,t(f.node),u)}}}},_buildButton:function(e,n,r,o){var a=this.c.dom.button,s=this.c.dom.buttonLiner,l=this.c.dom.collection,c=this.c.dom.splitCollection,u=this.c.dom.splitDropdownButton,f=this.s.dt,p=function(t){return"function"==typeof t?t(f,m,e):t};if(e.spacer){var g=t("").addClass("dt-button-spacer "+e.style+" "+a.spacerClass).html(p(e.text));return{conf:e,node:g,inserter:g,buttons:[],inCollection:n,isSplit:r,inSplit:o,collection:null}}if(!r&&o&&c?a=u:!r&&n&&l.button&&(a=l.button),!r&&o&&c.buttonLiner?s=c.buttonLiner:!r&&n&&l.buttonLiner&&(s=l.buttonLiner),e.available&&!e.available(f,e)&&!e.hasOwnProperty("html"))return!1;if(e.hasOwnProperty("html"))var m=t(e.html);else{var v=function(e,n,i,r){r.action.call(n.button(i),e,n,i,r),t(n.table().node()).triggerHandler("buttons-action.dt",[n.button(i),n,i,r])};l=e.tag||a.tag;var y=e.clickBlurs===i||e.clickBlurs;m=t("<"+l+"/>").addClass(a.className).addClass(o?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",(function(t){t.preventDefault(),!m.hasClass(a.disabled)&&e.action&&v(t,f,m,e),y&&m.trigger("blur")})).on("keypress.dtb",(function(t){13===t.keyCode&&(t.preventDefault(),!m.hasClass(a.disabled)&&e.action&&v(t,f,m,e))})),"a"===l.toLowerCase()&&m.attr("href","#"),"button"===l.toLowerCase()&&m.attr("type","button"),s.tag?(l=t("<"+s.tag+"/>").html(p(e.text)).addClass(s.className),"a"===s.tag.toLowerCase()&&l.attr("href","#"),m.append(l)):m.html(p(e.text)),!1===e.enabled&&m.addClass(a.disabled),e.className&&m.addClass(e.className),e.titleAttr&&m.attr("title",p(e.titleAttr)),e.attr&&m.attr(e.attr),e.namespace||(e.namespace=".dt-button-"+d++),e.config!==i&&e.config.split&&(e.split=e.config.split)}if(s=(s=this.c.dom.buttonContainer)&&s.tag?t("<"+s.tag+"/>").addClass(s.className).append(m):m,this._addKey(e),this.c.buttonCreated&&(s=this.c.buttonCreated(e,s)),r){(g=t("
      ").addClass(this.c.dom.splitWrapper.className)).append(m);var b=t.extend(e,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,closeButton:!1,attr:{"aria-haspopup":"dialog","aria-expanded":!1},align:this.c.dom.splitDropdown.align,splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(b);var x=function(e,n,i,r){h.split.action.call(n.button(t("div.dt-btn-split-wrapper")[0]),e,n,i,r),t(n.table().node()).triggerHandler("buttons-action.dt",[n.button(i),n,i,r]),i.attr("aria-expanded",!0)},w=t('").on("click.dtb",(function(t){t.preventDefault(),t.stopPropagation(),w.hasClass(a.disabled)||x(t,f,w,b),y&&w.trigger("blur")})).on("keypress.dtb",(function(t){13===t.keyCode&&(t.preventDefault(),w.hasClass(a.disabled)||x(t,f,w,b))}));0===e.split.length&&w.addClass("dtb-hide-drop"),g.append(w).attr(b.attr)}return{conf:e,node:r?g.get(0):m.get(0),inserter:r?g:s,buttons:[],inCollection:n,isSplit:r,inSplit:o,collection:null}},_nodeToButton:function(t,e){e||(e=this.s.buttons);for(var n=0,i=e.length;n").addClass("dt-button-collection").addClass(d.collectionLayout).addClass(d.splitAlignClass).addClass(l).css("display","none").attr({"aria-modal":!0,role:"dialog"});i=t(i).addClass(d.contentClassName).attr("role","menu").appendTo(p),h.attr("aria-expanded","true"),h.parents("body")[0]!==n.body&&(h=n.body.lastChild),d.popoverTitle?p.prepend('
      '+d.popoverTitle+"
      "):d.collectionTitle&&p.prepend('
      '+d.collectionTitle+"
      "),d.closeButton&&p.prepend('
      x
      ').addClass("dtb-collection-closeable"),r(p.insertAfter(h),d.fade),s=t(a.table().container());var g=p.css("position");if("container"!==d.span&&"dt-container"!==d.align||(h=h.parent(),p.css("width",s.width())),"absolute"===g){var m=t(h[0].offsetParent);s=h.position(),l=h.offset();var v=m.offset(),y=m.position(),b=e.getComputedStyle(m[0]);v.height=m.outerHeight(),v.width=m.width()+parseFloat(b.paddingLeft),v.right=v.left+v.width,v.bottom=v.top+v.height,m=s.top+h.outerHeight();var x=s.left;p.css({top:m,left:x}),b=e.getComputedStyle(p[0]);var w=p.offset();w.height=p.outerHeight(),w.width=p.outerWidth(),w.right=w.left+w.width,w.bottom=w.top+w.height,w.marginTop=parseFloat(b.marginTop),w.marginBottom=parseFloat(b.marginBottom),d.dropup&&(m=s.top-w.height-w.marginTop-w.marginBottom),("button-right"===d.align||p.hasClass(d.rightAlignClassName))&&(x=s.left-w.width+h.outerWidth()),"dt-container"!==d.align&&"container"!==d.align||(xv.width&&(x=v.width-w.width)),y.left+x+w.width>t(e).width()&&(x=t(e).width()-w.width-y.left),0>l.left+x&&(x=-l.left),y.top+m+w.height>t(e).height()+t(e).scrollTop()&&(m=s.top-w.height-w.marginTop-w.marginBottom),y.top+mn&&(i=n),p.css("marginTop",-1*i)})(),t(e).on("resize.dtb-collection",(function(){g()}));d.background&&u.background(!0,d.backgroundClassName,d.fade,d.backgroundHost||h),t("div.dt-button-background").on("click.dtb-collection",(function(){})),d.autoClose&&setTimeout((function(){a.on("buttons-action.b-internal",(function(t,e,n,i){i[0]!==h[0]&&f()}))}),0),t(p).trigger("buttons-popover.dt"),a.on("destroy",f),setTimeout((function(){c=!1,t("body").on("click.dtb-collection",(function(e){if(!c){var n=t.fn.addBack?"addBack":"andSelf",r=t(e.target).parent()[0];(!t(e.target).parents()[n]().filter(i).length&&!t(r).hasClass("dt-buttons")||t(e.target).hasClass("dt-button-background"))&&f()}})).on("keyup.dtb-collection",(function(t){27===t.keyCode&&f()})).on("keydown.dtb-collection",(function(e){var r=t("a, button",i),o=n.activeElement;9===e.keyCode&&(-1===r.index(o)?(r.first().focus(),e.preventDefault()):e.shiftKey?o===r[0]&&(r.last().focus(),e.preventDefault()):o===r.last()[0]&&(r.first().focus(),e.preventDefault()))}))}),0)}}}),u.background=function(e,a,s,l){s===i&&(s=400),l||(l=n.body),e?r(t("
      ").addClass(a).css("display","none").insertAfter(l),s):o(t("div."+a),s,(function(){t(this).removeClass(a).remove()}))},u.instanceSelector=function(e,n){if(e===i||null===e)return t.map(n,(function(t){return t.inst}));var r=[],o=t.map(n,(function(t){return t.name})),a=function(e){if(Array.isArray(e))for(var i=0,s=e.length;i)<[^<]*)*<\/script>/gi,"")).replace(//g,""),e&&!e.stripHtml||(t=t.replace(/<[^>]*>/g,"")),e&&!e.trim||(t=t.replace(/^\s+|\s+$/g,"")),e&&!e.stripNewlines||(t=t.replace(/\n/g," ")),e&&!e.decodeEntities||(g.innerHTML=t,t=g.value)),t},u.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled",spacerClass:""},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper"},splitDropdown:{tag:"button",text:"▼",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div",className:"dt-button-split-collection"}}},u.version="2.2.3",t.extend(h,{collection:{text:function(t){return t.i18n("buttons.collection","Collection")},className:"buttons-collection",closeButton:!1,init:function(t,e,n){e.attr("aria-expanded",!1)},action:function(e,n,i,r){r._collection.parents("body").length?this.popover(!1,r):this.popover(r._collection,r),"keypress"===e.type&&t("a, button",r._collection).eq(0).focus()},attr:{"aria-haspopup":"dialog"}},split:{text:function(t){return t.i18n("buttons.split","Split")},className:"buttons-split",closeButton:!1,init:function(t,e,n){return e.attr("aria-expanded",!1)},action:function(t,e,n,i){this.popover(i._collection,i)},attr:{"aria-haspopup":"dialog"}},copy:function(t,e){if(h.copyHtml5)return"copyHtml5"},csv:function(t,e){if(h.csvHtml5&&h.csvHtml5.available(t,e))return"csvHtml5"},excel:function(t,e){if(h.excelHtml5&&h.excelHtml5.available(t,e))return"excelHtml5"},pdf:function(t,e){if(h.pdfHtml5&&h.pdfHtml5.available(t,e))return"pdfHtml5"},pageLength:function(e){e=e.settings()[0].aLengthMenu;var n=[],i=[];if(Array.isArray(e[0]))n=e[0],i=e[1];else for(var r=0;r"+e+"":"",r(t('
      ').html(e).append(t("
      ")["string"==typeof n?"html":"append"](n)).css("display","none").appendTo("body")),a!==i&&0!==a&&(s=setTimeout((function(){l.buttons.info(!1)}),a)),this.on("destroy.btn-info",(function(){l.buttons.info(!1)})),this)})),l.Api.register("buttons.exportData()",(function(t){if(this.context.length)return m(new l.Api(this.context[0]),t)})),l.Api.register("buttons.exportInfo()",(function(e){e||(e={});var n=e,r="*"===n.filename&&"*"!==n.title&&n.title!==i&&null!==n.title&&""!==n.title?n.title:n.filename;return"function"==typeof r&&(r=r()),r===i||null===r?r=null:(-1!==r.indexOf("*")&&(r=r.replace("*",t("head > title").text()).trim()),r=r.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(n=f(n.extension))||(n=""),r+=n),{filename:r,title:n=null===(n=f(e.title))?null:-1!==n.indexOf("*")?n.replace("*",t("head > title").text()||"Exported data"):n,messageTop:p(this,e.message||e.messageTop,"top"),messageBottom:p(this,e.messageBottom,"bottom")}}));var f=function(t){return null===t||t===i?null:"function"==typeof t?t():t},p=function(e,n,i){return null===(n=f(n))?null:(e=t("caption",e.table().container()).eq(0),"*"===n?e.css("caption-side")!==i?null:e.length?e.text():"":n)},g=t("\n
      \n
      \n
      \n \n \n
      \n
      \n
      \n
      \n').replace(/(^|\n)\s*/g,""),lt=function(t,e){if(t.innerHTML="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},ct=function(){if(J())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function dt(t,e,n){E(t,n["showC"+e.substring(1)+"Button"],"inline-block"),t.innerHTML=n[e+"ButtonText"],t.setAttribute("aria-label",n[e+"ButtonAriaLabel"]),t.className=_[e],m(t,n.customClass,e+"Button"),it(t,n[e+"ButtonClass"])}function ht(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var ut={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},ft=["input","file","range","select","radio","checkbox","textarea"],pt=function(t){if(!vt[t.input])return h('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));I(vt[t.input](t))},gt=function(t,e){var n=C(z(),t);if(n)for(var i in function(t){for(var e=0;e=e.progressSteps.length&&y("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((function(t,r){var o=function(t){var e=document.createElement("li");return it(e,_["progress-step"]),e.innerHTML=t,e}(t);if(n.appendChild(o),r===i&&it(o,_["active-progress-step"]),r!==e.progressSteps.length-1){var a=function(t){var e=document.createElement("li");return it(e,_["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(t);n.appendChild(a)}}))}function bt(t,e){!function(t,e){var n=N();D(n,"width",e.width),D(n,"padding",e.padding),e.background&&(n.style.background=e.background),n.className=_.popup,e.toast?(it([document.documentElement,document.body],_["toast-shown"]),it(n,_.toast)):it(n,_.modal),m(n,e.customClass,"popup"),"string"==typeof e.customClass&&it(n,e.customClass),T(n,_.noanimation,!e.animation)}(0,e),function(t,e){var n=L();n&&(function(t,e){"string"==typeof e?t.style.background=e:e||it([document.documentElement,document.body],_["no-backdrop"])}(n,e.backdrop),!e.backdrop&&e.allowOutsideClick&&y('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in _?it(t,_[e]):(y('The "position" parameter is not valid, defaulting to "center"'),it(t,_.center))}(n,e.position),function(t,e){if(e&&"string"==typeof e){var n="grow-"+e;n in _&&it(t,_[n])}}(n,e.grow),m(n,e.customClass,"container"),e.customContainerClass&&it(n,e.customContainerClass))}(0,e),function(t,e){m(q(),e.customClass,"header"),yt(0,e),function(t,e){var n=ut.innerParams.get(t);if(n&&e.type===n.type&&H())m(H(),e.customClass,"icon");else if(xt(),e.type)if(wt(),-1!==Object.keys(k).indexOf(e.type)){var i=j(".".concat(_.icon,".").concat(k[e.type]));I(i),m(i,e.customClass,"icon"),T(i,"swal2-animate-".concat(e.type,"-icon"),e.animation)}else h('Unknown type! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.type,'"'))}(t,e),function(t,e){var n=Y();if(!e.imageUrl)return P(n);I(n),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),D(n,"width",e.imageWidth),D(n,"height",e.imageHeight),n.className=_.image,m(n,e.customClass,"image"),e.imageClass&&it(n,e.imageClass)}(0,e),function(t,e){var n=B();E(n,e.title||e.titleText),e.title&&et(e.title,n),e.titleText&&(n.innerText=e.titleText),m(n,e.customClass,"title")}(0,e),function(t,e){var n=K();n.innerHTML=e.closeButtonHtml,m(n,e.customClass,"closeButton"),E(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)}(0,e)}(t,e),function(t,e){var n=z().querySelector("#"+_.content);e.html?(et(e.html,n),I(n,"block")):e.text?(n.textContent=e.text,I(n,"block")):P(n),function(t,e){var n=z(),i=ut.innerParams.get(t),r=!i||e.input!==i.input;ft.forEach((function(t){var i=_[t],o=ot(n,i);gt(t,e.inputAttributes),mt(o,i,e),r&&P(o)})),e.input&&r&&pt(e)}(t,e),m(z(),e.customClass,"content")}(t,e),function(t,e){var n=U(),i=V(),r=X();e.showConfirmButton||e.showCancelButton?I(n):P(n),m(n,e.customClass,"actions"),dt(i,"confirm",e),dt(r,"cancel",e),e.buttonsStyling?function(t,e,n){it([t,e],_.styled),n.confirmButtonColor&&(t.style.backgroundColor=n.confirmButtonColor),n.cancelButtonColor&&(e.style.backgroundColor=n.cancelButtonColor);var i=window.getComputedStyle(t).getPropertyValue("background-color");t.style.borderLeftColor=i,t.style.borderRightColor=i}(i,r,e):(rt([i,r],_.styled),i.style.backgroundColor=i.style.borderLeftColor=i.style.borderRightColor="",r.style.backgroundColor=r.style.borderLeftColor=r.style.borderRightColor="")}(0,e),function(t,e){var n=G();E(n,e.footer),e.footer&&et(e.footer,n),m(n,e.customClass,"footer")}(0,e)}vt.text=vt.email=vt.password=vt.number=vt.tel=vt.url=function(e){var n=ot(z(),_.input);return"string"==typeof e.inputValue||"number"==typeof e.inputValue?n.value=e.inputValue:f(e.inputValue)||y('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(t(e.inputValue),'"')),ht(n,e),n.type=e.input,n},vt.file=function(t){var e=ot(z(),_.file);return ht(e,t),e.type=t.input,e},vt.range=function(t){var e=ot(z(),_.range),n=e.querySelector("input"),i=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,i.value=t.inputValue,e},vt.select=function(t){var e=ot(z(),_.select);if(e.innerHTML="",t.inputPlaceholder){var n=document.createElement("option");n.innerHTML=t.inputPlaceholder,n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return e},vt.radio=function(){var t=ot(z(),_.radio);return t.innerHTML="",t},vt.checkbox=function(t){var e=ot(z(),_.checkbox),n=C(z(),"checkbox");return n.type="checkbox",n.value=1,n.id=_.checkbox,n.checked=Boolean(t.inputValue),e.querySelector("span").innerHTML=t.inputPlaceholder,e},vt.textarea=function(t){var e=ot(z(),_.textarea);return e.value=t.inputValue,ht(e,t),e};var xt=function(){for(var t=R(),e=0;e")),function(t){if(function(){var t=L();t&&(t.parentNode.removeChild(t),rt([document.documentElement,document.body],[_["no-backdrop"],_["toast-shown"],_["has-column"]]))}(),J())h("SweetAlert2 requires document to initialize");else{var e=document.createElement("div");e.className=_.container,e.innerHTML=st;var n=function(t){return"string"==typeof t?document.querySelector(t):t}(t.target);n.appendChild(e),function(t){var e=N();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&it(L(),_.rtl)}(n),function(){var t=z(),e=ot(t,_.input),n=ot(t,_.file),i=t.querySelector(".".concat(_.range," input")),r=t.querySelector(".".concat(_.range," output")),o=ot(t,_.select),a=t.querySelector(".".concat(_.checkbox," input")),s=ot(t,_.textarea);e.oninput=tt,n.onchange=tt,o.onchange=tt,a.onchange=tt,s.oninput=tt,i.oninput=function(t){tt(t),r.value=i.value},i.onchange=function(t){tt(t),i.nextSibling.value=i.value}}()}}(t)}function Xt(t,e){t.removeEventListener(ct,Xt),e.style.overflowY="auto"}var Ut,qt=function(t,e){!function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!g(document.body,_.iosfix)){var t=document.body.scrollTop;document.body.style.top=-1*t+"px",it(document.body,_.iosfix),function(){var t,e=L();e.ontouchstart=function(n){t=n.target===e||!function(t){return!!(t.scrollHeight>t.clientHeight)}(e)&&"INPUT"!==n.target.tagName},e.ontouchmove=function(e){t&&(e.preventDefault(),e.stopPropagation())}}()}}(),"undefined"!=typeof window&&Ot()&&(Lt(),window.addEventListener("resize",Lt)),d(document.body.children).forEach((function(t){t===L()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,L())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})),e&&(null===S.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(S.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=S.previousBodyPadding+function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var t=document.createElement("div");t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}()+"px")),setTimeout((function(){t.scrollTop=0}))},Gt={select:function(t,e,n){var i=ot(t,_.select);e.forEach((function(t){var e=t[0],r=t[1],o=document.createElement("option");o.value=e,o.innerHTML=r,n.inputValue.toString()===e.toString()&&(o.selected=!0),i.appendChild(o)})),i.focus()},radio:function(t,e,n){var i=ot(t,_.radio);e.forEach((function(t){var e=t[0],r=t[1],o=document.createElement("input"),a=document.createElement("label");o.type="radio",o.name=_.radio,o.value=e,n.inputValue.toString()===e.toString()&&(o.checked=!0);var s=document.createElement("span");s.innerHTML=r,s.className=_.label,a.appendChild(o),a.appendChild(s),i.appendChild(a)}));var r=i.querySelectorAll("input");r.length&&r[0].focus()}},Kt=Object.freeze({hideLoading:Mt,disableLoading:Mt,getInput:function(t){var e=ut.innerParams.get(t||this),n=ut.domCache.get(t||this);return n?C(n.content,e.input):null},close:Nt,closePopup:Nt,closeModal:Nt,closeToast:Nt,enableButtons:function(){zt(this,["confirmButton","cancelButton"],!1)},disableButtons:function(){zt(this,["confirmButton","cancelButton"],!0)},enableConfirmButton:function(){u("Swal.disableConfirmButton()","Swal.getConfirmButton().removeAttribute('disabled')"),zt(this,["confirmButton"],!1)},disableConfirmButton:function(){u("Swal.enableConfirmButton()","Swal.getConfirmButton().setAttribute('disabled', '')"),zt(this,["confirmButton"],!0)},enableInput:function(){return Yt(this.getInput(),!1)},disableInput:function(){return Yt(this.getInput(),!0)},showValidationMessage:function(t){var e=ut.domCache.get(this);e.validationMessage.innerHTML=t;var n=window.getComputedStyle(e.popup);e.validationMessage.style.marginLeft="-".concat(n.getPropertyValue("padding-left")),e.validationMessage.style.marginRight="-".concat(n.getPropertyValue("padding-right")),I(e.validationMessage);var i=this.getInput();i&&(i.setAttribute("aria-invalid",!0),i.setAttribute("aria-describedBy",_["validation-message"]),A(i),it(i,_.inputerror))},resetValidationMessage:function(){var t=ut.domCache.get(this);t.validationMessage&&P(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),rt(e,_.inputerror))},getProgressSteps:function(){return u("Swal.getProgressSteps()","const swalInstance = Swal.fire({progressSteps: ['1', '2', '3']}); const progressSteps = swalInstance.params.progressSteps"),ut.innerParams.get(this).progressSteps},setProgressSteps:function(t){u("Swal.setProgressSteps()","Swal.update()");var e=r({},ut.innerParams.get(this),{progressSteps:t});yt(0,e),ut.innerParams.set(this,e)},showProgressSteps:function(){I(ut.domCache.get(this).progressSteps)},hideProgressSteps:function(){P(ut.domCache.get(this).progressSteps)},_main:function(e){var n=this;!function(t){for(var e in t)kt(r=e)||y('Unknown parameter "'.concat(r,'"')),t.toast&&(i=e,-1!==Pt.indexOf(i)&&y('The parameter "'.concat(i,'" is incompatible with toasts'))),St(n=void 0)&&u(n,St(n));var n,i,r}(e),N()&&At.swalCloseEventFinishedCallback&&(At.swalCloseEventFinishedCallback(),delete At.swalCloseEventFinishedCallback),At.deferDisposalTimer&&(clearTimeout(At.deferDisposalTimer),delete At.deferDisposalTimer);var i=r({},Tt,e);Vt(i),Object.freeze(i),At.timeout&&(At.timeout.stop(),delete At.timeout),clearTimeout(At.restoreFocusTimeout);var o={popup:N(),container:L(),content:z(),actions:U(),confirmButton:V(),cancelButton:X(),closeButton:K(),validationMessage:$(),progressSteps:W()};ut.domCache.set(this,o),bt(this,i),ut.innerParams.set(this,i);var a=this.constructor;return new Promise((function(e){function r(t){n.closePopup({value:t})}function s(t){n.closePopup({dismiss:t})}jt.swalPromiseResolve.set(n,e),i.timer&&(At.timeout=new Wt((function(){s("timer"),delete At.timeout}),i.timer)),i.input&&setTimeout((function(){var t=n.getInput();t&&A(t)}),0);for(var l=function(t){i.showLoaderOnConfirm&&a.showLoading(),i.preConfirm?(n.resetValidationMessage(),Promise.resolve().then((function(){return i.preConfirm(t,i.validationMessage)})).then((function(e){M(o.validationMessage)||!1===e?n.hideLoading():r(void 0===e?t:e)}))):r(t)},c=function(t){var e=t.target,r=o.confirmButton,c=o.cancelButton,d=r&&(r===e||r.contains(e)),h=c&&(c===e||c.contains(e));if("click"===t.type)if(d)if(n.disableButtons(),i.input){var u=function(){var t=n.getInput();if(!t)return null;switch(i.input){case"checkbox":return t.checked?1:0;case"radio":return t.checked?t.value:null;case"file":return t.files.length?t.files[0]:null;default:return i.inputAutoTrim?t.value.trim():t.value}}();i.inputValidator?(n.disableInput(),Promise.resolve().then((function(){return i.inputValidator(u,i.validationMessage)})).then((function(t){n.enableButtons(),n.enableInput(),t?n.showValidationMessage(t):l(u)}))):n.getInput().checkValidity()?l(u):(n.enableButtons(),n.showValidationMessage(i.validationMessage))}else l(!0);else h&&(n.disableButtons(),s(a.DismissReason.cancel))},d=o.popup.querySelectorAll("button"),u=0;un?(e+.05)/(n+.05):(n+.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,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,r=void 0===e?.5:e,o=2*r-1,a=n.alpha()-i.alpha(),s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return this.rgb(s*n.red()+l*i.red(),s*n.green()+l*i.green(),s*n.blue()+l*i.blue()).alpha(n.alpha()*r+i.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new o,i=this.values,r=n.values;for(var a in i)i.hasOwnProperty(a)&&(t=i[a],"[object Array]"===(e={}.toString.call(t))?r[a]=t.slice(0):"[object Number]"===e?r[a]=t:console.error("unexpected color value:",t));return n}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]}function d(t){var e=c(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function h(t){var e,n,i,r,o,a=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[o=255*l,o,o];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),r=[0,0,0];for(var c=0;c<3;c++)(i=a+1/3*-(c-1))<0&&i++,i>1&&i--,o=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,r[c]=255*o;return r}function u(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),a=255*i*(1-n),s=255*i*(1-n*o),l=255*i*(1-n*(1-o));i*=255;switch(r){case 0:return[i,l,a];case 1:return[s,i,a];case 2:return[a,i,l];case 3:return[a,s,i];case 4:return[l,a,i];case 5:return[i,a,s]}}function f(t){var e,n,i,o,a=t[0]/360,s=t[1]/100,l=t[2]/100,c=s+l;switch(c>1&&(s/=c,l/=c),i=6*a-(e=Math.floor(6*a)),0!=(1&e)&&(i=1-i),o=s+i*((n=1-l)-s),e){default:case 6:case 0:r=n,g=o,b=s;break;case 1:r=o,g=n,b=s;break;case 2:r=s,g=n,b=o;break;case 3:r=s,g=o,b=n;break;case 4:r=o,g=s,b=n;break;case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]}function m(t){var e,n,i,r=t[0]/100,o=t[1]/100,a=t[2]/100;return n=-.9689*r+1.8758*o+.0415*a,i=.0557*r+-.204*o+1.057*a,e=(e=3.2406*r+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]}function v(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function y(t){var e,n,i,r,o=t[0],a=t[1],s=t[2];return o<=8?r=(n=100*o/903.3)/100*7.787+16/116:(n=100*Math.pow((o+16)/116,3),r=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(a/500+r-16/116)/7.787:95.047*Math.pow(a/500+r,3),n,i=i/108.883<=.008859?i=108.883*(r-s/200-16/116)/7.787:108.883*Math.pow(r-s/200,3)]}function x(t){var e,n=t[0],i=t[1],r=t[2];return(e=360*Math.atan2(r,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+r*r),e]}function w(t){return m(y(t))}function _(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]}function k(t){return S[t]}e.exports={rgb2hsl:i,rgb2hsv:o,rgb2hwb:a,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:c,rgb2lab:d,rgb2lch:function(t){return x(d(t))},hsl2rgb:h,hsl2hsv:function(t){var e=t[0],n=t[1]/100,i=t[2]/100;if(0===i)return[0,0,0];return[e,100*(2*(n*=(i*=2)<=1?i:2-i)/(i+n)),100*((i+n)/2)]},hsl2hwb:function(t){return a(h(t))},hsl2cmyk:function(t){return s(h(t))},hsl2keyword:function(t){return l(h(t))},hsv2rgb:u,hsv2hsl:function(t){var e,n,i=t[0],r=t[1]/100,o=t[2]/100;return e=r*o,[i,100*(e=(e/=(n=(2-r)*o)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return a(u(t))},hsv2cmyk:function(t){return s(u(t))},hsv2keyword:function(t){return l(u(t))},hwb2rgb:f,hwb2hsl:function(t){return i(f(t))},hwb2hsv:function(t){return o(f(t))},hwb2cmyk:function(t){return s(f(t))},hwb2keyword:function(t){return l(f(t))},cmyk2rgb:p,cmyk2hsl:function(t){return i(p(t))},cmyk2hsv:function(t){return o(p(t))},cmyk2hwb:function(t){return a(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:k,keyword2hsl:function(t){return i(k(t))},keyword2hsv:function(t){return o(k(t))},keyword2hwb:function(t){return a(k(t))},keyword2cmyk:function(t){return s(k(t))},keyword2lab:function(t){return d(k(t))},keyword2xyz:function(t){return c(k(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return x(v(t))},lab2xyz:y,lab2rgb:w,lab2lch:x,lch2lab:_,lch2xyz:function(t){return y(_(t))},lch2rgb:function(t){return w(_(t))}};var S={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]},C={};for(var A in S)C[JSON.stringify(S[A])]=A},{}],5:[function(t,e,n){var i=t(4),r=function(){return new c};for(var o in i){r[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(o);var a=/(\w+)2(\w+)/.exec(o),s=a[1],l=a[2];(r[s]=r[s]||{})[l]=r[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=i[t](e);if("string"==typeof n||void 0===n)return n;for(var r=0;r0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index=0&&r>0)&&(m+=r));return o=h.getPixelForValue(m),{size:s=((a=h.getPixelForValue(m+f))-o)/2,base:o,head:a,center:a+s/2}},calculateBarIndexPixels:function(t,e,n){var i,r,a,s,l,c=n.scale.options,d=this.getStackIndex(t),h=n.pixels,u=h[e],f=h.length,p=n.start,g=n.end;return 1===f?(i=u>p?u-p:g-u,r=u0&&(i=(u-h[e-1])/2,e===f-1&&(r=i)),e');var n=t.data,i=n.datasets,r=n.labels;if(i.length)for(var o=0;o'),r[o]&&e.push(r[o]),e.push("");return e.push("
    "),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var r=t.getDatasetMeta(0),a=e.datasets[0],s=r.data[i],l=s&&s.custom||{},c=o.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:c(a.backgroundColor,i,d.backgroundColor),strokeStyle:l.borderColor?l.borderColor:c(a.borderColor,i,d.borderColor),lineWidth:l.borderWidth?l.borderWidth:c(a.borderWidth,i,d.borderWidth),hidden:isNaN(a.data[i])||r.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,r,o=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,m={x:Math.cos(p),y:Math.sin(p)},v={x:Math.cos(g),y:Math.sin(g)},y=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,b=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,x=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,w=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,_=u/100,k={x:x?-1:Math.min(m.x*(m.x<0?1:_),v.x*(v.x<0?1:_)),y:w?-1:Math.min(m.y*(m.y<0?1:_),v.y*(v.y<0?1:_))},S={x:y?1:Math.max(m.x*(m.x>0?1:_),v.x*(v.x>0?1:_)),y:b?1:Math.max(m.y*(m.y>0?1:_),v.y*(v.y>0?1:_))},C={width:.5*(S.x-k.x),height:.5*(S.y-k.y)};c=Math.min(s/C.width,l/C.height),d={x:-.5*(S.x+k.x),y:-.5*(S.y+k.y)}}n.borderWidth=e.getMaxBorderWidth(h.data),n.outerRadius=Math.max((c-n.borderWidth)/2,0),n.innerRadius=Math.max(u?n.outerRadius/100*u:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=d.x*n.outerRadius,n.offsetY=d.y*n.outerRadius,h.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),o.each(h.data,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,r=i.chart,a=r.chartArea,s=r.options,l=s.animation,c=(a.left+a.right)/2,d=(a.top+a.bottom)/2,h=s.rotation,u=s.rotation,f=i.getDataset(),p=n&&l.animateRotate||t.hidden?0:i.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=n&&l.animateScale?0:i.innerRadius,m=n&&l.animateScale?0:i.outerRadius,v=o.valueAtIndexOrDefault;o.extend(t,{_datasetIndex:i.index,_index:e,_model:{x:c+r.offsetX,y:d+r.offsetY,startAngle:h,endAngle:u,circumference:p,outerRadius:m,innerRadius:g,label:v(f.label,e,r.data.labels[e])}});var y=t._model;this.removeHoverStyle(t),n&&l.animateRotate||(y.startAngle=0===e?s.rotation:i.getMeta().data[e-1]._model.endAngle,y.endAngle=y.startAngle+y.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return o.each(n.data,(function(n,r){t=e.data[r],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,i=0,r=this.index,o=t.length,a=0;a(i=e>i?e:i)?n:i;return i}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var i=t(25),r=t(40),o=t(45);i._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return o.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:r.Line,dataElementType:r.Point,update:function(t){var n,i,r,a=this,s=a.getMeta(),l=s.dataset,c=s.data||[],d=a.chart.options,h=d.elements.line,u=a.getScaleForId(s.yAxisID),f=a.getDataset(),p=e(f,d);for(p&&(r=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=u,l._datasetIndex=a.index,l._children=c,l._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:r.tension?r.tension:o.valueOrDefault(f.lineTension,h.tension),backgroundColor:r.backgroundColor?r.backgroundColor:f.backgroundColor||h.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:f.borderWidth||h.borderWidth,borderColor:r.borderColor?r.borderColor:f.borderColor||h.borderColor,borderCapStyle:r.borderCapStyle?r.borderCapStyle:f.borderCapStyle||h.borderCapStyle,borderDash:r.borderDash?r.borderDash:f.borderDash||h.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:f.borderDashOffset||h.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:f.borderJoinStyle||h.borderJoinStyle,fill:r.fill?r.fill:void 0!==f.fill?f.fill:h.fill,steppedLine:r.steppedLine?r.steppedLine:o.valueOrDefault(f.steppedLine,h.stepped),cubicInterpolationMode:r.cubicInterpolationMode?r.cubicInterpolationMode:o.valueOrDefault(f.cubicInterpolationMode,h.cubicInterpolationMode)},l.pivot()),n=0,i=c.length;n');var n=t.data,i=n.datasets,r=n.labels;if(i.length)for(var o=0;o'),r[o]&&e.push(r[o]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var r=t.getDatasetMeta(0),a=e.datasets[0],s=r.data[i].custom||{},l=o.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(a.backgroundColor,i,c.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(a.borderColor,i,c.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(a.borderWidth,i,c.borderWidth),hidden:isNaN(a.data[i])||r.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,r,o=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var i=t(25),r=t(40),o=t(45);i._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:r.Line,dataElementType:r.Point,linkScales:o.noop,update:function(t){var e=this,n=e.getMeta(),i=n.dataset,r=n.data,a=i.custom||{},s=e.getDataset(),l=e.chart.options.elements.line,c=e.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),o.extend(n.dataset,{_datasetIndex:e.index,_scale:c,_children:r,_loop:!0,_model:{tension:a.tension?a.tension:o.valueOrDefault(s.lineTension,l.tension),backgroundColor:a.backgroundColor?a.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:s.borderWidth||l.borderWidth,borderColor:a.borderColor?a.borderColor:s.borderColor||l.borderColor,fill:a.fill?a.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:a.borderCapStyle?a.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:a.borderDash?a.borderDash:s.borderDash||l.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle}}),n.dataset.pivot(),o.each(r,(function(n,i){e.updateElement(n,i,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var i=this,r=t.custom||{},a=i.getDataset(),s=i.chart.scale,l=i.chart.options.elements.point,c=s.getPointPositionForValue(e,a.data[e]);void 0!==a.radius&&void 0===a.pointRadius&&(a.pointRadius=a.radius),void 0!==a.hitRadius&&void 0===a.pointHitRadius&&(a.pointHitRadius=a.hitRadius),o.extend(t,{_datasetIndex:i.index,_index:e,_scale:s,_model:{x:n?s.xCenter:c.x,y:n?s.yCenter:c.y,tension:r.tension?r.tension:o.valueOrDefault(a.lineTension,i.chart.options.elements.line.tension),radius:r.radius?r.radius:o.valueAtIndexOrDefault(a.pointRadius,e,l.radius),backgroundColor:r.backgroundColor?r.backgroundColor:o.valueAtIndexOrDefault(a.pointBackgroundColor,e,l.backgroundColor),borderColor:r.borderColor?r.borderColor:o.valueAtIndexOrDefault(a.pointBorderColor,e,l.borderColor),borderWidth:r.borderWidth?r.borderWidth:o.valueAtIndexOrDefault(a.pointBorderWidth,e,l.borderWidth),pointStyle:r.pointStyle?r.pointStyle:o.valueAtIndexOrDefault(a.pointStyle,e,l.pointStyle),hitRadius:r.hitRadius?r.hitRadius:o.valueAtIndexOrDefault(a.pointHitRadius,e,l.hitRadius)}}),t._model.skip=r.skip?r.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();o.each(e.data,(function(n,i){var r=n._model,a=o.splineCurve(o.previousItem(e.data,i,!0)._model,r,o.nextItem(e.data,i,!0)._model,r.tension);r.controlPointPreviousX=Math.max(Math.min(a.previous.x,t.right),t.left),r.controlPointPreviousY=Math.max(Math.min(a.previous.y,t.bottom),t.top),r.controlPointNextX=Math.max(Math.min(a.next.x,t.right),t.left),r.controlPointNextY=Math.max(Math.min(a.next.y,t.bottom),t.top),n.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,r=t._model;r.radius=n.hoverRadius?n.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),r.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,o.getHoverColor(r.backgroundColor)),r.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,i,o.getHoverColor(r.borderColor)),r.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,r.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,r=t._model,a=this.chart.options.elements.point;r.radius=n.radius?n.radius:o.valueAtIndexOrDefault(e.pointRadius,i,a.radius),r.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,i,a.backgroundColor),r.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,i,a.borderColor),r.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(e.pointBorderWidth,i,a.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45);i._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=r.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,n,i){var r,o,a=this.animations;for(e.chart=t,i||(t.animating=!0),r=0,o=a.length;r1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var i=Date.now();t.dropFrames+=(i-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,i=this.animations,r=0;r=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(r,1)):++r}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var i=t(25),r=t(45),o=t(28),a=t(48);e.exports=function(t){var e=t.plugins;function n(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},r.extend(t.prototype,{construct:function(e,n){var o=this;n=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=r.configMerge(i.global,i[t.type],t.options||{}),t}(n);var s=a.acquireContext(e,n),l=s&&s.canvas,c=l&&l.height,d=l&&l.width;o.id=r.uid(),o.ctx=s,o.canvas=l,o.config=n,o.width=d,o.height=c,o.aspectRatio=c?d/c:null,o.options=n.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),s&&l?(o.initialize(),o.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return e.notify(t,"beforeInit"),r.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),e.notify(t,"afterInit"),t},clear:function(){return r.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var n=this,i=n.options,o=n.canvas,a=i.maintainAspectRatio&&n.aspectRatio||null,s=Math.max(0,Math.floor(r.getMaximumWidth(o))),l=Math.max(0,Math.floor(a?s/a:r.getMaximumHeight(o)));if((n.width!==s||n.height!==l)&&(o.width=n.width=s,o.height=n.height=l,o.style.width=s+"px",o.style.height=l+"px",r.retinaScale(n,i.devicePixelRatio),!t)){var c={width:s,height:l};e.notify(n,"resize",[c]),n.options.onResize&&n.options.onResize(n,c),n.stop(),n.update(n.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;r.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),r.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,i=e.options,o=e.scales={},a=[];i.scales&&(a=a.concat((i.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(i.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),i.scale&&a.push({options:i.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),r.each(a,(function(i){var a=i.options,s=r.valueOrDefault(a.type,i.dtype),l=t.scaleService.getScaleConstructor(s);if(l){n(a.position)!==n(i.dposition)&&(a.position=i.dposition);var c=new l({id:a.id,options:a,ctx:e.ctx,chart:e});o[c.id]=c,c.mergeTicksOptions(),i.isDefault&&(e.scale=c)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];return r.each(e.data.datasets,(function(r,o){var a=e.getDatasetMeta(o),s=r.type||e.config.type;if(a.type&&a.type!==s&&(e.destroyDatasetMeta(o),a=e.getDatasetMeta(o)),a.type=s,n.push(a.type),a.controller)a.controller.updateIndex(o);else{var l=t.controllers[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(e,o),i.push(a.controller)}}),e),i},resetElements:function(){var t=this;r.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var n,i,o=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),(i=(n=o).options).scale?n.scale.options=i.scale:i.scales&&i.scales.xAxes.concat(i.scales.yAxes).forEach((function(t){n.scales[t.id].options=t})),n.tooltip._options=i.tooltips,!1!==e.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var a=o.buildOrUpdateControllers();r.each(o.data.datasets,(function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()}),o),o.updateLayout(),r.each(a,(function(t){t.reset()})),o.updateDatasets(),e.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:o.render(t)}},updateLayout:function(){var n=this;!1!==e.notify(n,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),e.notify(n,"afterScaleUpdate"),e.notify(n,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==e.notify(t,"beforeDatasetsUpdate")){for(var n=0,i=t.data.datasets.length;n=0;--i)n.isDatasetVisible(i)&&n.drawDataset(i,t);e.notify(n,"afterDatasetsDraw",[t])}},drawDataset:function(t,n){var i=this,r=i.getDatasetMeta(t),o={meta:r,index:t,easingValue:n};!1!==e.notify(i,"beforeDatasetDraw",[o])&&(r.controller.draw(n),e.notify(i,"afterDatasetDraw",[o]))},getElementAtEvent:function(t){return o.modes.single(this,t)},getElementsAtEvent:function(t){return o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=o.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return o.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e0||(e.forEach((function(e){delete t[e]})),delete t._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},i.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=n.yAxisID||t.chart.options.scales.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]},reset:function(){this.update(!0)},destroy:function(){this._data&&n(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,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),r=n.getDataset().data||[],o=i.data;for(t=0,e=r.length;ti&&t.insertElements(i,r-i)},insertElements:function(t,e){for(var n=0;n=n[e].length&&n[e].push({}),!n[e][a].type||l.type&&l.type!==n[e][a].type?o.merge(n[e][a],[t.scaleService.getScaleDefaults(s),l]):o.merge(n[e][a],l)}else o._merger(e,n,i,r)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return o.each(t,(function(t){e(t)&&n.push(t)})),n},o.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,r=t.length;i=0;i--){var r=t[i];if(e(r))return r}},o.inherits=function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=o.inherits,t&&o.extend(n.prototype,t),n.__super__=e.prototype,n},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,n){return Math.abs(t-e)t},o.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,n,i){var r=t.skip?e:t,o=e,a=n.skip?e:n,s=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),c=s/(s+l),d=l/(s+l),h=i*(c=isNaN(c)?0:c),u=i*(d=isNaN(d)?0:d);return{previous:{x:o.x-h*(a.x-r.x),y:o.y-h*(a.y-r.y)},next:{x:o.x+u*(a.x-r.x),y:o.y+u*(a.y-r.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,n,i,r,a,s,l,c,d,h=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),u=h.length;for(e=0;e0?h[e-1]:null,(r=e0?h[e-1]:null,r=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var n=Math.floor(o.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},o.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)},o.getRelativePosition=function(t,e){var n,i,r=t.originalEvent||t,a=t.currentTarget||t.srcElement,s=a.getBoundingClientRect(),l=r.touches;l&&l.length>0?(n=l[0].clientX,i=l[0].clientY):(n=r.clientX,i=r.clientY);var c=parseFloat(o.getStyle(a,"padding-left")),d=parseFloat(o.getStyle(a,"padding-top")),h=parseFloat(o.getStyle(a,"padding-right")),u=parseFloat(o.getStyle(a,"padding-bottom")),f=s.right-s.left-c-h,p=s.bottom-s.top-d-u;return{x:n=Math.round((n-s.left-c)/f*a.width/e.currentDevicePixelRatio),y:i=Math.round((i-s.top-d)/p*a.height/e.currentDevicePixelRatio)}},o.getConstraintWidth=function(t){return a(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return a(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(o.getStyle(e,"padding-left"),10),i=parseInt(o.getStyle(e,"padding-right"),10),r=e.clientWidth-n-i,a=o.getConstraintWidth(t);return isNaN(a)?r:Math.min(r,a)},o.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(o.getStyle(e,"padding-top"),10),i=parseInt(o.getStyle(e,"padding-bottom"),10),r=e.clientHeight-n-i,a=o.getConstraintHeight(t);return isNaN(a)?r:Math.min(r,a)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var i=t.canvas,r=t.height,o=t.width;i.height=r*n,i.width=o*n,t.ctx.scale(n,n),i.style.height=r+"px",i.style.width=o+"px"}},o.fontString=function(t,e,n){return e+" "+t+"px "+n},o.longestText=function(t,e,n,i){var r=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},a=i.garbageCollect=[],i.font=e),t.font=e;var s=0;o.each(n,(function(e){null!=e&&!0!==o.isArray(e)?s=o.measureText(t,r,a,s,e):o.isArray(e)&&o.each(e,(function(e){null==e||o.isArray(e)||(s=o.measureText(t,r,a,s,e))}))}));var l=a.length/2;if(l>n.length){for(var c=0;ci&&(i=o),i},o.numberOfLabelLines=function(t){var e=1;return o.each(t,(function(t){o.isArray(t)&&t.length>e&&(e=t.length)})),e},o.color=i?function(t){return t instanceof CanvasGradient&&(t=r.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";var i=t(45);function r(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function o(t,e){var n,i,r,o,a;for(i=0,o=t.data.datasets.length;i0&&(c=t.getDatasetMeta(c[0]._datasetIndex).data),c},"x-axis":function(t,e){return c(t,e,{intersect:!0})},point:function(t,e){return a(t,r(e,t))},nearest:function(t,e,n){var i=r(e,t);n.axis=n.axis||"xy";var o=l(n.axis),a=s(t,i,n.intersect,o);return a.length>1&&a.sort((function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n})),a.slice(0,1)},x:function(t,e,n){var i=r(e,t),a=[],s=!1;return o(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(a=[]),a},y:function(t,e,n){var i=r(e,t),a=[],s=!1;return o(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(a=[]),a}}}},{45:45}],29:[function(t,e,n){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,n){"use strict";var i=t(45);e.exports=function(t){function e(t,e){return i.where(t,(function(t){return t.position===e}))}function n(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var i=e?n:t,r=e?t:n;return i.weight===r.weight?i._tmpIndex_-r._tmpIndex_:i.weight-r.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,r=["fullWidth","position","weight"],o=r.length,a=0;au&&lt.maxHeight){l--;break}l++,h=c*d}t.labelRotation=l},afterCalculateTickRotation:function(){o.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){o.callback(this.options.beforeFit,[this])},fit:function(){var t=this,i=t.minSize={width:0,height:0},r=s(t._ticks),l=t.options,c=l.ticks,d=l.scaleLabel,h=l.gridLines,u=l.display,f=t.isHorizontal(),p=n(c),g=l.gridLines.tickMarkLength;if(i.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:u&&h.drawTicks?g:0,i.height=f?u&&h.drawTicks?g:0:t.maxHeight,d.display&&u){var m=a(d)+o.options.toPadding(d.padding).height;f?i.height+=m:i.width+=m}if(c.display&&u){var v=o.longestText(t.ctx,p.font,r,t.longestTextCache),y=o.numberOfLabelLines(r),b=.5*p.size,x=t.options.ticks.padding;if(f){t.longestLabelWidth=v;var w=o.toRadians(t.labelRotation),_=Math.cos(w),k=Math.sin(w)*v+p.size*y+b*(y-1)+b;i.height=Math.min(t.maxHeight,i.height+k+x),t.ctx.font=p.font;var S=e(t.ctx,r[0],p.font),C=e(t.ctx,r[r.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===l.position?_*S+3:_*b+3,t.paddingRight="bottom"===l.position?_*b+3:_*C+3):(t.paddingLeft=S/2+3,t.paddingRight=C/2+3)}else c.mirror?v=0:v+=x+b,i.width=Math.min(t.maxWidth,i.width+v),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=i.width,t.height=i.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){o.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(o.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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},getLabelForIndex:o.noop,getPixelForValue:o.noop,getValueForPixel:o.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),r=i*t+e.paddingLeft;n&&(r+=i/2);var o=e.left+Math.round(r);return o+=e.isFullWidth()?e.margins.left:0}var a=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(a/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,i,r,a=this,s=a.isHorizontal(),l=a.options.ticks.minor,c=t.length,d=o.toRadians(a.labelRotation),h=Math.cos(d),u=a.longestLabelWidth*h,f=[];for(l.maxTicksLimit&&(r=l.maxTicksLimit),s&&(e=!1,(u+l.autoSkipPadding)*c>a.width-(a.paddingLeft+a.paddingRight)&&(e=1+Math.floor((u+l.autoSkipPadding)*c/(a.width-(a.paddingLeft+a.paddingRight)))),r&&c>r&&(e=Math.max(e,Math.floor(c/r)))),n=0;n1&&n%e>0||n%e==0&&n+e>=c)&&n!==c-1||o.isNullOrUndef(i.label))&&delete i.label,f.push(i);return f},draw:function(t){var e=this,r=e.options;if(r.display){var s=e.ctx,c=i.global,d=r.ticks.minor,h=r.ticks.major||d,u=r.gridLines,f=r.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),m=d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=o.valueOrDefault(d.fontColor,c.defaultFontColor),y=n(d),b=o.valueOrDefault(h.fontColor,c.defaultFontColor),x=n(h),w=u.drawTicks?u.tickMarkLength:0,_=o.valueOrDefault(f.fontColor,c.defaultFontColor),k=n(f),S=o.options.toPadding(f.padding),C=o.toRadians(e.labelRotation),A=[],T="right"===r.position?e.left:e.right-w,D="right"===r.position?e.left+w:e.right,I="bottom"===r.position?e.top:e.bottom-w,P="bottom"===r.position?e.top+w:e.bottom;if(o.each(m,(function(n,i){if(void 0!==n.label){var a,s,h,f,v,y,b,x,_,k,S,E,M,O,L=n.label;i===e.zeroLineIndex&&r.offset===u.offsetGridLines?(a=u.zeroLineWidth,s=u.zeroLineColor,h=u.zeroLineBorderDash,f=u.zeroLineBorderDashOffset):(a=o.valueAtIndexOrDefault(u.lineWidth,i),s=o.valueAtIndexOrDefault(u.color,i),h=o.valueOrDefault(u.borderDash,c.borderDash),f=o.valueOrDefault(u.borderDashOffset,c.borderDashOffset));var j="middle",F="middle",N=d.padding;if(g){var R=w+N;"bottom"===r.position?(F=p?"middle":"top",j=p?"right":"center",O=e.top+R):(F=p?"middle":"bottom",j=p?"left":"center",O=e.bottom-R);var H=l(e,i,u.offsetGridLines&&m.length>1);H1);Y0)n=t.stepSize;else{var o=i.niceNum(e.max-e.min,!1);n=i.niceNum(o/(t.maxTicks-1),!0)}var a=Math.floor(e.min/n)*n,s=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&i.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(a=t.min,s=t.max);var l=(s-a)/n;l=i.almostEquals(l,Math.round(l),n/1e3)?Math.round(l):Math.ceil(l),r.push(void 0!==t.min?t.min:a);for(var c=1;c3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var o=i.log10(Math.abs(r)),a="";if(0!==t){var s=-1*Math.floor(o);s=Math.max(Math.min(s,20),0),a=t.toFixed(s)}else a="0";return a},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(i.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45);i._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:o.noop,title:function(t,e){var n="",i=e.labels,r=i?i.length:0;if(t.length>0){var o=t[0];o.xLabel?n=o.xLabel:r>0&&o.indexl.height-e.height&&(h="bottom");var u=(c.left+c.right)/2,f=(c.top+c.bottom)/2;"center"===h?(n=function(t){return t<=u},i=function(t){return t>u}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width>l.width},o=function(t){return t-e.width<0},a=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",r(s.x)&&(d="center",h=a(s.y))):i(s.x)&&(d="right",o(s.x)&&(d="center",h=a(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:d,yAlign:p.yAlign?p.yAlign:h}}(this,b),y=function(t,e,n){var i=t.x,r=t.y,o=t.caretSize,a=t.caretPadding,s=t.cornerRadius,l=n.xAlign,c=n.yAlign,d=o+a,h=s+a;return"right"===l?i-=e.width:"center"===l&&(i-=e.width/2),"top"===c?r+=d:r-="bottom"===c?e.height+d:e.height/2,"center"===c?"left"===l?i+=d:"right"===l&&(i-=d):"left"===l?i-=h:"right"===l&&(i+=h),{x:i,y:r}}(p,b,v)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=y.x,p.y=y.y,p.width=b.width,p.height=b.height,p.caretX=x.x,p.caretY=x.y,h._model=p,e&&u.custom&&u.custom.call(h,p),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,r=this.getCaretPosition(t,e,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var i,r,o,a,s,l,c=n.caretSize,d=n.cornerRadius,h=n.xAlign,u=n.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===u)s=p+m/2,"left"===h?(r=(i=f)-c,o=i,a=s+c,l=s-c):(r=(i=f+g)+c,o=i,a=s-c,l=s+c);else if("left"===h?(i=(r=f+d+c)-c,o=r+c):"right"===h?(i=(r=f+g-d-c)-c,o=r+c):(i=(r=f+g/2)-c,o=r+c),"top"===u)s=(a=p)-c,l=a;else{s=(a=p+m)+c,l=a;var v=o;o=i,i=v}return{x1:i,x2:r,x3:o,y1:a,y2:s,y3:l}},drawTitle:function(t,n,i,r){var a=n.title;if(a.length){i.textAlign=n._titleAlign,i.textBaseline="top";var s,l,c=n.titleFontSize,d=n.titleSpacing;for(i.fillStyle=e(n.titleFontColor,r),i.font=o.fontString(c,n._titleFontStyle,n._titleFontFamily),s=0,l=a.length;s0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(i,e,t,n,r),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,r),this.drawBody(i,e,t,r),this.drawFooter(i,e,t,r))}},handleEvent:function(t){var e=this,n=e._options,i=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(i=!o.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var r=e._model;e.update(!0),e.pivot(),i|=r.x!==e._model.x||r.y!==e._model.y}return i}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,i=0,r=0,o=0;for(e=0,n=t.length;el;)r-=2*Math.PI;for(;r=s&&r<=l,d=a>=n.innerRadius&&a<=n.outerRadius;return c&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},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,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45),a=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:a.defaultColor,borderWidth:3,borderColor:a.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=r.extend({draw:function(){var t,e,n,i,r=this,s=r._view,l=r._chart.ctx,c=s.spanGaps,d=r._children.slice(),h=a.elements.line,u=-1;for(r._loop&&d.length&&d.push(d[0]),l.save(),l.lineCap=s.borderCapStyle||h.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||h.borderDash),l.lineDashOffset=s.borderDashOffset||h.borderDashOffset,l.lineJoin=s.borderJoinStyle||h.borderJoinStyle,l.lineWidth=s.borderWidth||h.borderWidth,l.strokeStyle=s.borderColor||a.defaultColor,l.beginPath(),u=-1,t=0;tt?1:-1,o=1,a=l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,n=l.y,r=1,o=(i=l.base)>n?1:-1,a=l.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(t-e),Math.abs(n-i)),h=(c=c>d?d:c)/2,u=t+("left"!==a?h*r:0),f=e+("right"!==a?-h*r:0),p=n+("top"!==a?h*o:0),g=i+("bottom"!==a?-h*o:0);u!==f&&(n=p,i=g),p!==g&&(t=u,e=f)}s.beginPath(),s.fillStyle=l.backgroundColor,s.strokeStyle=l.borderColor,s.lineWidth=c;var m=[[t,i],[t,n],[e,n],[e,i]],v=["bottom","left","top","right"].indexOf(a,0);function y(t){return m[(v+t)%4]}-1===v&&(v=0);var b=y(0);s.moveTo(b[0],b[1]);for(var x=1;x<4;x++)b=y(x),s.lineTo(b[0],b[1]);s.fill(),c&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var i=a(this);n=t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var i=a(n);return o(n)?t>=i.left&&t<=i.right:e>=i.top&&e<=i.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return o(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";var i=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,r,o){if(o){var a=Math.min(o,i/2),s=Math.min(o,r/2);t.moveTo(e+a,n),t.lineTo(e+i-a,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+r-s),t.quadraticCurveTo(e+i,n+r,e+i-a,n+r),t.lineTo(e+a,n+r),t.quadraticCurveTo(e,n+r,e,n+r-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+a,n)}else t.rect(e,n,i,r)},drawPoint:function(t,e,n,i,r){var o,a,s,l,c,d;if("object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,r,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(a=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-a/2,r+c/3),t.lineTo(i+a/2,r+c/3),t.lineTo(i,r-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-d,r-d,2*d,2*d),t.strokeRect(i-d,r-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,u=i-h,f=r-h,p=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,u,f,p,p,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-d,r),t.lineTo(i,r+d),t.lineTo(i+d,r),t.lineTo(i,r-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,r+n),t.lineTo(i,r-n),t.moveTo(i-n,r),t.lineTo(i+n,r),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,l=Math.sin(Math.PI/4)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i-s,r+l),t.lineTo(i+s,r-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,r+n),t.lineTo(i,r-n),t.moveTo(i-n,r),t.lineTo(i+n,r),s=Math.cos(Math.PI/4)*n,l=Math.sin(Math.PI/4)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i-s,r+l),t.lineTo(i+s,r-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,r),t.lineTo(i+n,r),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,r),t.lineTo(i+n,r),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,r-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i,r={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return r.valueOrDefault(r.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var o,a,s;if(r.isArray(t))if(a=t.length,i)for(o=a-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;o=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,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.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-r.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*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};e.exports={effects:r},i.easingEffects=r},{42:42}],44:[function(t,e,n){"use strict";var i=t(42);e.exports={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,r,o;return i.isObject(t)?(e=+t.top||0,n=+t.right||0,r=+t.bottom||0,o=+t.left||0):e=n=r=o=+t||0,{top:e,right:n,bottom:r,left:o,height:e+r,width:o+n}},resolve:function(t,e,n){var r,o,a;for(r=0,o=t.length;r
    ';var a=e.childNodes[0],s=e.childNodes[1];e._reset=function(){a.scrollLeft=i,a.scrollTop=i,s.scrollLeft=i,s.scrollTop=i};var l=function(){e._reset(),t()};return u(a,"scroll",l.bind(a,"expand")),u(s,"scroll",l.bind(s,"shrink")),e}((c=function(){if(g.resizer)return e(p("resize",n))},h=!1,f=[],function(){f=Array.prototype.slice.call(arguments),d=d||this,h||(h=!0,i.requestAnimFrame.call(window,(function(){h=!1,c.apply(d,f)})))}));!function(t,e){var n=(t[r]||(t[r]={})).renderProxy=function(t){t.animationName===s&&e()};i.each(l,(function(e){u(t,e,n)})),t.classList.add(a)}(t,(function(){if(g.resizer){var e=t.parentNode;e&&e!==m.parentNode&&e.insertBefore(m,e.firstChild),m._reset()}}))}function m(t){var e=t[r]||{},n=e.resizer;delete e.resizer,function(t){var e=t[r]||{},n=e.renderProxy;n&&(i.each(l,(function(e){f(t,e,n)})),delete e.renderProxy),t.classList.remove(a)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n,i="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+s+"{"+i+"}@keyframes "+s+"{"+i+"}."+a+"{-webkit-animation:"+s+" 0.001s;animation:"+s+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){var n=t.style,i=t.getAttribute("height"),o=t.getAttribute("width");if(t[r]={initial:{height:i,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var a=d(t,"width");void 0!==a&&(t.width=a)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=d(t,"height");void 0!==a&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[r]){var n=e[r].initial;["height","width"].forEach((function(t){var r=n[t];i.isNullOrUndef(r)?e.removeAttribute(t):e.setAttribute(t,r)})),i.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[r]}},addEventListener:function(t,e,n){var o=t.canvas;if("resize"!==e){var a=n[r]||(n[r]={}),s=(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=c[t.type]||t.type,r=i.getRelativePosition(t,e);return p(n,e,r.x,r.y,t)}(e,t))};u(o,e,s)}else g(o,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var o=((n[r]||{}).proxies||{})[t.id+"_"+e];o&&f(i,e,o)}else m(i)}},i.addEvent=u,i.removeEvent=f},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),r=t(46),o=t(47),a=o._enabled?o:r;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var i=t(25),r=t(40),o=t(45);i._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){var t={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),r=i&&n.isDatasetVisible(e)&&i.dataset._children||[],o=r.length||0;return o?function(t,e){return e=n)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function n(t){var e,n=t.el._model||{},i=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?o=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:i.getBasePosition?o=i.getBasePosition():i.getBasePixel&&(o=i.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return{x:(e=i.isHorizontal())?o:null,y:e?null:o}}return null}function a(t,e,n){var i,r=t[e].fill,o=[e];if(!n)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!isFinite(r))return r;if(!(i=t[r]))return!1;if(i.visible)return r;o.push(r),r=i.fill}return!1}function s(e){var n=e.fill,i="dataset";return!1===n?null:(isFinite(n)||(i="boundary"),t[i](e))}function l(t){return t&&!t.skip}function c(t,e,n,i,r){var a;if(i&&r){for(t.moveTo(e[0].x,e[0].y),a=1;a0;--a)o.canvas.lineTo(t,n[a],n[a-1],!0)}}return{id:"filler",afterDatasetsUpdate:function(t,i){var o,l,c,d,h=(t.data.datasets||[]).length,u=i.propagate,f=[];for(l=0;l');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){var e=t.layoutService,n=o.noop;function a(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function s(n,i){var r=new t.Legend({ctx:n.ctx,options:i,chart:n});e.configure(n,r,i),e.addBox(n,r),n.legend=r}return t.Legend=r.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:n,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:n,beforeSetDimensions:n,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:n,beforeBuildLabels:n,buildLabels:function(){var t=this,e=t.options.labels||{},n=o.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:n,beforeFit:n,fit:function(){var t=this,e=t.options,n=e.labels,r=e.display,s=t.ctx,l=i.global,c=o.valueOrDefault,d=c(n.fontSize,l.defaultFontSize),h=c(n.fontStyle,l.defaultFontStyle),u=c(n.fontFamily,l.defaultFontFamily),f=o.fontString(d,h,u),p=t.legendHitBoxes=[],g=t.minSize,m=t.isHorizontal();if(m?(g.width=t.maxWidth,g.height=r?10:0):(g.width=r?10:0,g.height=t.maxHeight),r)if(s.font=f,m){var v=t.lineWidths=[0],y=t.legendItems.length?d+n.padding:0;s.textAlign="left",s.textBaseline="top",o.each(t.legendItems,(function(e,i){var r=a(n,d)+d/2+s.measureText(e.text).width;v[v.length-1]+r+n.padding>=t.width&&(y+=d+n.padding,v[v.length]=t.left),p[i]={left:0,top:0,width:r,height:d},v[v.length-1]+=r+n.padding})),g.height+=y}else{var b=n.padding,x=t.columnWidths=[],w=n.padding,_=0,k=0,S=d+b;o.each(t.legendItems,(function(t,e){var i=a(n,d)+d/2+s.measureText(t.text).width;k+S>g.height&&(w+=_+n.padding,x.push(_),_=0,k=0),_=Math.max(_,i),k+=S,p[e]={left:0,top:0,width:i,height:d}})),w+=_,x.push(_),g.width+=w}t.width=g.width,t.height=g.height},afterFit:n,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=i.global,s=r.elements.line,l=t.width,c=t.lineWidths;if(e.display){var d,h=t.ctx,u=o.valueOrDefault,f=u(n.fontColor,r.defaultFontColor),p=u(n.fontSize,r.defaultFontSize),g=u(n.fontStyle,r.defaultFontStyle),m=u(n.fontFamily,r.defaultFontFamily),v=o.fontString(p,g,m);h.textAlign="left",h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=v;var y=a(n,p),b=t.legendHitBoxes,x=t.isHorizontal();d=x?{x:t.left+(l-c[0])/2,y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+n.padding,line:0};var w=p+n.padding;o.each(t.legendItems,(function(i,a){var f=h.measureText(i.text).width,g=y+p/2+f,m=d.x,v=d.y;x?m+g>=l&&(v=d.y+=w,d.line++,m=d.x=t.left+(l-c[d.line])/2):v+w>t.bottom&&(m=d.x=m+t.columnWidths[d.line]+n.padding,v=d.y=t.top+n.padding,d.line++),function(t,n,i){if(!(isNaN(y)||y<=0)){h.save(),h.fillStyle=u(i.fillStyle,r.defaultColor),h.lineCap=u(i.lineCap,s.borderCapStyle),h.lineDashOffset=u(i.lineDashOffset,s.borderDashOffset),h.lineJoin=u(i.lineJoin,s.borderJoinStyle),h.lineWidth=u(i.lineWidth,s.borderWidth),h.strokeStyle=u(i.strokeStyle,r.defaultColor);var a=0===u(i.lineWidth,s.borderWidth);if(h.setLineDash&&h.setLineDash(u(i.lineDash,s.borderDash)),e.labels&&e.labels.usePointStyle){var l=p*Math.SQRT2/2,c=l/Math.SQRT2,d=t+c,f=n+c;o.canvas.drawPoint(h,i.pointStyle,l,d,f)}else a||h.strokeRect(t,n,y,p),h.fillRect(t,n,y,p);h.restore()}}(m,v,i),b[a].left=m,b[a].top=v,function(t,e,n,i){var r=p/2,o=y+r+t,a=e+r;h.fillText(n.text,o,a),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(o,a),h.lineTo(o+i,a),h.stroke())}(m,v,i,f),x?d.x+=g+n.padding:d.y+=w}))}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,r=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var o=t.x,a=t.y;if(o>=e.left&&o<=e.right&&a>=e.top&&a<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=c.left&&o<=c.left+c.width&&a>=c.top&&a<=c.top+c.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),r=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),r=!0;break}}}return r}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&s(t,e)},beforeUpdate:function(t){var n=t.options.legend,r=t.legend;n?(o.mergeIf(n,i.global.legend),r?(e.configure(t,r,n),r.options=n):s(t,n)):r&&(e.removeBox(t,r),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var i=t(25),r=t(26),o=t(45);i._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){var e=t.layoutService,n=o.noop;function a(n,i){var r=new t.Title({ctx:n.ctx,options:i,chart:n});e.configure(n,r,i),e.addBox(n,r),n.titleBlock=r}return t.Title=r.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:n,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:n,beforeSetDimensions:n,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:n,beforeBuildLabels:n,buildLabels:n,afterBuildLabels:n,beforeFit:n,fit:function(){var t=this,e=o.valueOrDefault,n=t.options,r=n.display,a=e(n.fontSize,i.global.defaultFontSize),s=t.minSize,l=o.isArray(n.text)?n.text.length:1,c=o.options.toLineHeight(n.lineHeight,a),d=r?l*c+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=d):(s.width=d,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:n,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=o.valueOrDefault,r=t.options,a=i.global;if(r.display){var s,l,c,d=n(r.fontSize,a.defaultFontSize),h=n(r.fontStyle,a.defaultFontStyle),u=n(r.fontFamily,a.defaultFontFamily),f=o.fontString(d,h,u),p=o.options.toLineHeight(r.lineHeight,d),g=p/2+r.padding,m=0,v=t.top,y=t.left,b=t.bottom,x=t.right;e.fillStyle=n(r.fontColor,a.defaultFontColor),e.font=f,t.isHorizontal()?(l=y+(x-y)/2,c=v+g,s=x-y):(l="left"===r.position?y+g:x-g,c=v+(b-v)/2,s=b-v,m=Math.PI*("left"===r.position?-.5:.5)),e.save(),e.translate(l,c),e.rotate(m),e.textAlign="center",e.textBaseline="middle";var w=r.text;if(o.isArray(w))for(var _=0,k=0;kt.max)&&(t.max=i))}))}));t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var o=r.valueOrDefault(n.fontSize,i.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.height/(2*o)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,n=this,i=n.start,r=+n.getRightValue(t),o=n.end-i;return n.isHorizontal()?(e=n.left+n.width/o*(r-i),Math.round(e)):(e=n.bottom-n.height/o*(r-i),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),i=n?e.width:e.height,r=(n?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*r},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var i=t(45),r=t(34);e.exports=function(t){var e=i.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=i.sign(t.min),r=i.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,a=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)),o!==a&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=r.generators.linear(o,t);t.handleDirectionalChanges(),t.max=i.max(a),t.min=i.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var i=t(45),r=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:r.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){var t=this,e=t.options,n=e.ticks,r=t.chart,o=r.data.datasets,a=i.valueOrDefault,s=t.isHorizontal();function l(e){return s?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var c=e.stacked;if(void 0===c&&i.each(o,(function(t,e){if(!c){var n=r.getDatasetMeta(e);r.isDatasetVisible(e)&&l(n)&&void 0!==n.stack&&(c=!0)}})),e.stacked||c){var d={};i.each(o,(function(n,o){var a=r.getDatasetMeta(o),s=[a.type,void 0===e.stacked&&void 0===a.stack?o:"",a.stack].join(".");r.isDatasetVisible(o)&&l(a)&&(void 0===d[s]&&(d[s]=[]),i.each(n.data,(function(n,i){var r=d[s],o=+t.getRightValue(n);isNaN(o)||a.data[i].hidden||(r[i]=r[i]||0,e.relativePoints?r[i]=100:r[i]+=o)})))})),i.each(d,(function(e){var n=i.min(e),r=i.max(e);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?r:Math.max(t.max,r)}))}else i.each(o,(function(e,n){var o=r.getDatasetMeta(n);r.isDatasetVisible(n)&&l(o)&&i.each(e.data,(function(e,n){var i=+t.getRightValue(e);isNaN(i)||o.data[n].hidden||((null===t.min||it.max)&&(t.max=i),0!==i&&(null===t.minNotZero||ir?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function c(t){return 0===t||180===t?"center":t<180?"left":"right"}function d(t,e,n,i){if(r.isArray(e))for(var o=n.y,a=1.5*i,s=0;s270||t<90)&&(n.y-=e.h)}function u(t){return r.isNumber(t)?t:0}var f=t.LinearScaleBase.extend({setDimensions:function(){var t=this,n=t.options,i=n.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var o=r.min([t.height,t.width]),a=r.valueOrDefault(i.fontSize,e.defaultFontSize);t.drawingArea=n.display?o/2-(a/2+i.backdropPaddingY):o/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;r.each(e.data.datasets,(function(o,a){if(e.isDatasetVisible(a)){var s=e.getDatasetMeta(a);r.each(o.data,(function(e,r){var o=+t.getRightValue(e);isNaN(o)||s.data[r].hidden||(n=Math.min(o,n),i=Math.max(o,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,n=r.valueOrDefault(t.fontSize,e.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*n)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,n,i,o=s(t),c=Math.min(t.height/2,t.width/2),d={r:t.width,l:0,t:t.height,b:0},h={};t.ctx.font=o.font,t._pointLabelSizes=[];var u,f,p,g=a(t);for(e=0;ed.r&&(d.r=y.end,h.r=m),b.startd.b&&(d.b=b.end,h.b=m)}t.setReductions(c,d,h)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,n){var i=this,r=e.l/Math.sin(n.l),o=Math.max(e.r-i.width,0)/Math.sin(n.r),a=-e.t/Math.cos(n.t),s=-Math.max(e.b-i.height,0)/Math.cos(n.b);r=u(r),o=u(o),a=u(a),s=u(s),i.drawingArea=Math.min(Math.round(t-(r+o)/2),Math.round(t-(a+s)/2)),i.setCenterPoint(r,o,a,s)},setCenterPoint:function(t,e,n,i){var r=this,o=r.width-e-r.drawingArea,a=t+r.drawingArea,s=n+r.drawingArea,l=r.height-i-r.drawingArea;r.xCenter=Math.round((a+o)/2+r.left),r.yCenter=Math.round((s+l)/2+r.top)},getIndexAngle:function(t){return t*(2*Math.PI/a(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,i=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+n.xCenter,y:Math.round(Math.sin(i)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,n=t.options,i=n.gridLines,o=n.ticks,l=r.valueOrDefault;if(n.display){var u=t.ctx,f=this.getIndexAngle(0),p=l(o.fontSize,e.defaultFontSize),g=l(o.fontStyle,e.defaultFontStyle),m=l(o.fontFamily,e.defaultFontFamily),v=r.fontString(p,g,m);r.each(t.ticks,(function(n,s){if(s>0||o.reverse){var c=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(i.display&&0!==s&&function(t,e,n,i){var o=t.ctx;if(o.strokeStyle=r.valueAtIndexOrDefault(e.color,i-1),o.lineWidth=r.valueAtIndexOrDefault(e.lineWidth,i-1),t.options.gridLines.circular)o.beginPath(),o.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),o.closePath(),o.stroke();else{var s=a(t);if(0===s)return;o.beginPath();var l=t.getPointPosition(0,n);o.moveTo(l.x,l.y);for(var c=1;c=0;g--){if(l.display){var m=t.getPointPosition(g,f);n.beginPath(),n.moveTo(t.xCenter,t.yCenter),n.lineTo(m.x,m.y),n.stroke(),n.closePath()}if(u.display){var v=t.getPointPosition(g,f+5),y=i(u.fontColor,e.defaultFontColor);n.font=p.font,n.fillStyle=y;var b=t.getIndexAngle(g),x=r.toDegrees(b);n.textAlign=c(x),h(x,t._pointLabelSizes[g],v),d(n,t.pointLabels[g]||"",v,p.size)}}}(t)}}});t.scaleService.registerScaleType("radialLinear",f,n)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";var i=t(1);i="function"==typeof i?i:window.moment;var r=t(25),o=t(45),a=Number.MIN_SAFE_INTEGER||-9007199254740991,s=Number.MAX_SAFE_INTEGER||9007199254740991,l={millisecond:{major:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{major:!0,size:1e3,steps:[1,2,5,10,30]},minute:{major:!0,size:6e4,steps:[1,2,5,10,30]},hour:{major:!0,size:36e5,steps:[1,2,3,6,12]},day:{major:!0,size:864e5,steps:[1,2,5]},week:{major:!1,size:6048e5,steps:[1,2,3,4]},month:{major:!0,size:2628e6,steps:[1,2,3]},quarter:{major:!1,size:7884e6,steps:[1,2,3,4]},year:{major:!0,size:3154e7}},c=Object.keys(l);function d(t,e){return t-e}function h(t){var e,n,i,r={},o=[];for(e=0,n=t.length;e=0&&a<=s;){if(r=t[(i=a+s>>1)-1]||null,o=t[i],!r)return{lo:null,hi:o};if(o[e]n))return{lo:r,hi:o};s=i-1}}return{lo:o,hi:null}}(t,e,n),o=r.lo?r.hi?r.lo:t[t.length-2]:t[0],a=r.lo?r.hi?r.hi:t[t.length-1]:t[1],s=a[e]-o[e],l=s?(n-o[e])/s:0,c=(a[i]-o[i])*l;return o[i]+c}function f(t,e){var n=e.parser,r=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof r?i(t,r):(t instanceof i||(t=i(t)),t.isValid()?t:"function"==typeof r?r(t):t)}function p(t,e){if(o.isNullOrUndef(t))return null;var n=e.options.time,i=f(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function g(t,e,n,r,a,s){var c,d=s.time,h=o.valueOrDefault(d.stepSize,d.unitStepSize),u="week"===n&&d.isoWeekday,f=s.ticks.major.enabled,p=l[n],g=i(t),m=i(e),v=[];for(h||(h=function(t,e,n,i){var r,o,a,s=e-t,c=l[n],d=c.size,h=c.steps;if(!h)return Math.ceil(s/((i||1)*d));for(r=0,o=h.length;r=o&&n<=a&&x.push(n);return r.min=o,r.max=a,r._unit=v,r._majorUnit=y,r._minorFormat=f[v],r._majorFormat=f[y],r._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var r,o,a,s,l,c=[],d=[e];for(r=0,o=t.length;re&&s1?e[1]:i,a=e[0],s=(u(t,"time",o,"pos")-u(t,"time",a,"pos"))/2),r.time.max||(o=e[e.length-1],a=e.length>1?e[e.length-2]:n,l=(u(t,"time",o,"pos")-u(t,"time",a,"pos"))/2)),{left:s,right:l}}(r._table,x,o,a,d),function(t,e){var n,r,o,a,s=[];for(n=0,r=t.length;n=0&&tt.length)&&(e=t.length);for(var n=0,i=new Array(e);n>16,a=n>>8&255,s=255&n;return"#"+(16777216+65536*(Math.round((i-o)*r)+o)+256*(Math.round((i-a)*r)+a)+(Math.round((i-s)*r)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,n){return t.isColorHex(n)?this.shadeHexColor(e,n):this.shadeRGBColor(e,n)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===n(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,n=[];for(e=0;ee.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var n=t.replace("#","");n=n.match(new RegExp("(.{"+n.length/3+"})","g"));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"x",n=t.toString().slice();return n.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,n){if(n>=t.length)for(var i=n-t.length+1;i--;)t.push(void 0);return t.splice(n,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t.style.key=e[n])}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var i=t.indexOf("Edge/");return i>0&&parseInt(t.substring(i+5,t.indexOf(".",i)),10)}}]),t}(),g=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return o(t,[{key:"setEasingFunctions",value:function(){var t;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":t="-";break;case"easein":t="<";break;case"easeout":t=">";break;case"easeinout":default:t="<>";break;case"swing":t=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1};break;case"bounce":t=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};break;case"elastic":t=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=t}}},{key:"animateLine",value:function(t,e,n,i){t.attr(e).animate(i).attr(n)}},{key:"animateMarker",value:function(t,e,n,i,r,o){e||(e=0),t.attr({r:e,width:e,height:e}).animate(i,r).attr({r:n,width:n.width,height:n.height}).afterAll((function(){o()}))}},{key:"animateCircle",value:function(t,e,n,i,r){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(i,r).attr({r:n.r,cx:n.cx,cy:n.cy})}},{key:"animateRect",value:function(t,e,n,i,r){t.attr(e).animate(i).attr(n).afterAll((function(){return r()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,n=t.realIndex,i=t.j,r=t.fill,o=t.pathFrom,a=t.pathTo,s=t.speed,l=t.delay,c=this.w,d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(d=0),this.morphSVG(e,n,i,"line"!==c.config.chart.type||c.globals.comboCharts?r:"stroke",o,a,s,l*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){t.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,n,i,r,o,a,s){var l=this,c=this.w;r||(r=t.attr("pathFrom")),o||(o=t.attr("pathTo"));var d=function(t){return"radar"===c.config.chart.type&&(a=1),"M 0 ".concat(c.globals.gridHeight)};(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),(!o||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=d()),c.globals.shouldAnimate||(a=1),t.plot(r).animate(1,c.globals.easing,s).plot(r).animate(a,c.globals.easing,s).plot(o).afterAll((function(){p.isNumber(n)?n===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}(),m=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"getDefaultFilter",value:function(t,e){var n=this.w;t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==n.config.states.normal.filter?this.applyFilter(t,e,n.config.states.normal.filter.type,n.config.states.normal.filter.value):n.config.chart.dropShadow.enabled&&this.dropShadow(t,n.config.chart.dropShadow,e)}},{key:"addNormalFilter",value:function(t,e){var n=this.w;n.config.chart.dropShadow.enabled&&!t.node.classList.contains("apexcharts-marker")&&this.dropShadow(t,n.config.chart.dropShadow,e)}},{key:"addLightenFilter",value:function(t,e,n){var i=this,r=this.w,o=n.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var n=r.config.chart.dropShadow;(n.enabled?i.addShadow(t,e,n):t).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:o}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"addDarkenFilter",value:function(t,e,n){var i=this,r=this.w,o=n.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var n=r.config.chart.dropShadow;(n.enabled?i.addShadow(t,e,n):t).componentTransfer({rgb:{type:"linear",slope:o}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"applyFilter",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(n){case"none":this.addNormalFilter(t,e);break;case"lighten":this.addLightenFilter(t,e,{intensity:i});break;case"darken":this.addDarkenFilter(t,e,{intensity:i})}}},{key:"addShadow",value:function(t,e,n){var i=n.blur,r=n.top,o=n.left,a=n.color,s=n.opacity,l=t.flood(Array.isArray(a)?a[e]:a,s).composite(t.sourceAlpha,"in").offset(o,r).gaussianBlur(i).merge(t.source);return t.blend(t.source,l)}},{key:"dropShadow",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=e.top,r=e.left,o=e.blur,a=e.color,s=e.opacity,l=e.noUserSpaceOnUse,c=this.w;return t.unfilter(!0),p.isIE()&&"radialBar"===c.config.chart.type||(a=Array.isArray(a)?a[n]:a,t.filter((function(t){var e;e=p.isSafari()||p.isFirefox()||p.isIE()?t.flood(a,s).composite(t.sourceAlpha,"in").offset(r,i).gaussianBlur(o):t.flood(a,s).composite(t.sourceAlpha,"in").offset(r,i).gaussianBlur(o).merge(t.source),t.blend(t.source,e)})),l||t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)),t}},{key:"setSelectionFilter",value:function(t,e,n){var i=this.w;if(void 0!==i.globals.selectedDataPoints[e]&&i.globals.selectedDataPoints[e].indexOf(n)>-1){t.node.setAttribute("selected",!0);var r=i.config.states.active.filter;"none"!==r&&this.applyFilter(t,e,r.type,r.value)}}},{key:"_scaleFilterSize",value:function(t){!function(e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),v=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawLine",value:function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:n,y2:i,stroke:r,"stroke-dasharray":o,"stroke-width":a,"stroke-linecap":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:t,y:e,width:n>0?n:0,height:i>0?i:0,rx:r,ry:r,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",o),d}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":n})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var n=this.w.globals.dom.Paper.circle(2*t);return null!==e&&n.attr(e),n}},{key:"drawPath",value:function(t){var e=t.d,n=void 0===e?"":e,i=t.stroke,r=void 0===i?"#a8a8a8":i,o=t.strokeWidth,a=void 0===o?1:o,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,d=t.strokeOpacity,h=void 0===d?1:d,u=t.classes,f=t.strokeLinecap,p=void 0===f?null:f,g=t.strokeDashArray,m=void 0===g?0:g,v=this.w;return null===p&&(p=v.config.stroke.lineCap),(n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n="M 0 ".concat(v.globals.gridHeight)),v.globals.dom.Paper.path(n).attr({fill:s,"fill-opacity":c,stroke:r,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":m,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;return null===n?i=["L",t,e].join(" "):"H"===n?i=["H",t].join(" "):"V"===n&&(i=["V",e].join(" ")),i}},{key:"curve",value:function(t,e,n,i,r,o){return["C",t,e,n,i,r,o].join(" ")}},{key:"quadraticCurve",value:function(t,e,n,i){return["Q",t,e,n,i].join(" ")}},{key:"arc",value:function(t,e,n,i,r,o,a){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,n,i,r,o,a].join(" ")}},{key:"renderPaths",value:function(t){var n,i=t.j,r=t.realIndex,o=t.pathFrom,a=t.pathTo,s=t.stroke,l=t.strokeWidth,c=t.strokeLinecap,d=t.fill,h=t.animationDelay,u=t.initialSpeed,f=t.dataChangeSpeed,p=t.className,v=t.shouldClipToGrid,y=void 0===v||v,b=t.bindEventsOnPaths,x=void 0===b||b,w=t.drawShadow,_=void 0===w||w,k=this.w,S=new m(this.ctx),C=new g(this.ctx),A=this.w.config.chart.animations.enabled,T=A&&this.w.config.chart.animations.dynamicAnimation.enabled,D=!!(A&&!k.globals.resized||T&&k.globals.dataChanged&&k.globals.shouldAnimate);D?n=o:(n=a,k.globals.animationEnded=!0);var I,P=k.config.stroke.dashArray;I=Array.isArray(P)?P[r]:k.config.stroke.dashArray;var E=this.drawPath({d:n,stroke:s,strokeWidth:l,fill:d,fillOpacity:1,classes:p,strokeLinecap:c,strokeDashArray:I});if(E.attr("index",r),y&&E.attr({"clip-path":"url(#gridRectMask".concat(k.globals.cuid,")")}),"none"!==k.config.states.normal.filter.type)S.getDefaultFilter(E,r);else if(k.config.chart.dropShadow.enabled&&_&&(!k.config.chart.dropShadow.enabledOnSeries||k.config.chart.dropShadow.enabledOnSeries&&-1!==k.config.chart.dropShadow.enabledOnSeries.indexOf(r))){var M=k.config.chart.dropShadow;S.dropShadow(E,M,r)}x&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:a,pathFrom:o});var O={el:E,j:i,realIndex:r,pathFrom:o,pathTo:a,fill:d,strokeWidth:l,delay:h};return!A||k.globals.resized||k.globals.dataChanged?!k.globals.resized&&k.globals.dataChanged||C.showDelayedElements():C.animatePathsGradually(e(e({},O),{},{speed:u})),k.globals.dataChanged&&T&&D&&C.animatePathsGradually(e(e({},O),{},{speed:f})),E}},{key:"drawPattern",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=this.w.globals.dom.Paper.pattern(e,n,(function(o){"horizontalLines"===t?o.line(0,0,n,0).stroke({color:i,width:r+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:r+1}):"slantedLines"===t?o.line(0,0,e,n).stroke({color:i,width:r}):"squares"===t?o.rect(e,n).fill("none").stroke({color:i,width:r}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:r})}));return o}},{key:"drawGradient",value:function(t,e,n,i,r){var o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;e.length<9&&0===e.indexOf("#")&&(e=p.hexToRgba(e,i)),n.length<9&&0===n.indexOf("#")&&(n=p.hexToRgba(n,r));var h=0,u=1,f=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,u=void 0!==s[1]?s[1]/100:1,f=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var m=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"polarArea"!==d.config.chart.type&&"bubble"!==d.config.chart.type);if(o=null===l||0===l.length?d.globals.dom.Paper.gradient(m?"radial":"linear",(function(t){t.at(h,e,i),t.at(u,n,r),t.at(f,n,r),null!==g&&t.at(g,e,i)})):d.globals.dom.Paper.gradient(m?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.at(e.offset/100,e.color,e.opacity)}))})),m){var v=d.globals.gridWidth/2,y=d.globals.gridHeight/2;"bubble"!==d.config.chart.type?o.attr({gradientUnits:"userSpaceOnUse",cx:v,cy:y,r:a}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?o.from(0,0).to(0,1):"diagonal"===t?o.from(0,0).to(1,1):"horizontal"===t?o.from(0,1).to(1,1):"diagonal2"===t&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,n=t.maxWidth,i=t.fontSize,r=t.fontFamily,o=this.getTextRects(e,i,r),a=o.width/e.length,s=Math.floor(n/a);return n-1){var s=n.globals.selectedDataPoints[r].indexOf(o);n.globals.selectedDataPoints[r].splice(s,1)}}else{if(!n.config.states.active.allowMultipleDataPointsSelection&&n.globals.selectedDataPoints.length>0){n.globals.selectedDataPoints=[];var l=n.globals.dom.Paper.select(".apexcharts-series path").members,c=n.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,d=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),i.getDefaultFilter(t,r)}))};d(l),d(c)}t.node.setAttribute("selected","true"),a="true",void 0===n.globals.selectedDataPoints[r]&&(n.globals.selectedDataPoints[r]=[]),n.globals.selectedDataPoints[r].push(o)}if("true"===a){var h=n.config.states.active.filter;if("none"!==h)i.applyFilter(t,r,h.type,h.value);else if("none"!==n.config.states.hover.filter&&!n.globals.isTouchDevice){var u=n.config.states.hover.filter;i.applyFilter(t,r,u.type,u.value)}}else"none"!==n.config.states.active.filter.type&&("none"===n.config.states.hover.filter.type||n.globals.isTouchDevice?i.getDefaultFilter(t,r):(u=n.config.states.hover.filter,i.applyFilter(t,r,u.type,u.value)));"function"==typeof n.config.chart.events.dataPointSelection&&n.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:n}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:n.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:n}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,n,i){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:n,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),o.globals.dom.Paper.add(a);var s=a.bbox();return r||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,n){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=n/1.1)){for(var i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=n/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"getStackedSeriesTotals",value:function(){var t=this.w,e=[];if(0===t.globals.series.length)return e;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"isSeriesNull",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,n){return t===n[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,n=t.slice();return e.config.xaxis.convertedCatToNumeric&&(n=t.map((function(t,n){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),n}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(e+=t.config.markers.hover.sizeOffset+1),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var n=0;if(Array.isArray(t))for(var i=0;it&&n.globals.seriesX[r][a]0&&(e=!0),{comboBarCount:n,comboCharts:e}}},{key:"extendArrayProps",value:function(t,e,n){return e.yaxis&&(e=t.extendYAxis(e,n)),e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),e.annotations.xaxis&&(e=t.extendXAxisAnnotations(e)),e.annotations.points&&(e=t.extendPointAnnotations(e))),e}}]),t}(),b=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return o(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.w;if("vertical"===t.label.orientation){var i=null!==e?e:0,r=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(null!==r){var o=r.getBoundingClientRect();r.setAttribute("x",parseFloat(r.getAttribute("x"))-o.height+4),"top"===t.label.position?r.setAttribute("y",parseFloat(r.getAttribute("y"))+o.width):r.setAttribute("y",parseFloat(r.getAttribute("y"))-o.width);var a=this.annoCtx.graphics.rotateAroundCenter(r),s=a.x,l=a.y;r.setAttribute("transform","rotate(-90 ".concat(s," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var n=this.w;if(!t||void 0===e.label.text||void 0!==e.label.text&&!String(e.label.text).trim())return null;var i=n.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),r=t.getBoundingClientRect(),o=e.label.style.padding.left,a=e.label.style.padding.right,s=e.label.style.padding.top,l=e.label.style.padding.bottom;"vertical"===e.label.orientation&&(s=e.label.style.padding.left,l=e.label.style.padding.right,o=e.label.style.padding.top,a=e.label.style.padding.bottom);var c=r.left-i.left-o,d=r.top-i.top-s,h=this.annoCtx.graphics.drawRect(c-n.globals.barPadForNumericAxis,d,r.width+o+a,r.height+s+l,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&h.node.classList.add(e.id),h}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,n=function(n,i,r){var o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(i,"']"));if(o){var a=o.parentNode,s=t.addBackgroundToAnno(o,n);s&&(a.insertBefore(s.node,o),n.label.mouseEnter&&s.node.addEventListener("mouseenter",n.label.mouseEnter.bind(t,n)),n.label.mouseLeave&&s.node.addEventListener("mouseleave",n.label.mouseLeave.bind(t,n)))}};e.config.annotations.xaxis.map((function(t,e){n(t,e,"xaxis")})),e.config.annotations.yaxis.map((function(t,e){n(t,e,"yaxis")})),e.config.annotations.points.map((function(t,e){n(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var n,i="y1"===t?e.y:e.y2,r=this.w;if(this.annoCtx.invertAxis){var o=r.globals.labels.indexOf(i);r.config.xaxis.convertedCatToNumeric&&(o=r.globals.categoryLabels.indexOf(i));var a=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(o+1)+")");a&&(n=parseFloat(a.getAttribute("y")))}else{var s;s=r.config.yaxis[e.yAxisIndex].logarithmic?(i=new y(this.annoCtx.ctx).getLogVal(i,e.yAxisIndex))/r.globals.yLogRatio[e.yAxisIndex]:(i-r.globals.minYArr[e.yAxisIndex])/(r.globals.yRange[e.yAxisIndex]/r.globals.gridHeight),n=r.globals.gridHeight-s,r.config.yaxis[e.yAxisIndex]&&r.config.yaxis[e.yAxisIndex].reversed&&(n=s)}return n}},{key:"getX1X2",value:function(t,e){var n=this.w,i=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,r=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,o=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,a=(e.x-i)/(o/n.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(a=(r-e.x)/(o/n.globals.gridWidth)),"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||n.globals.dataFormatXNumeric||(a=this.getStringX(e.x));var s=(e.x2-i)/(o/n.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(s=(r-e.x2)/(o/n.globals.gridWidth)),"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||n.globals.dataFormatXNumeric||(s=this.getStringX(e.x2)),"x1"===t?a:s}},{key:"getStringX",value:function(t){var e=this.w,n=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var i=e.globals.labels.indexOf(t),r=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(i+1)+")");return r&&(n=parseFloat(r.getAttribute("x"))),n}}]),t}(),x=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new b(this.annoCtx)}return o(t,[{key:"addXaxisAnnotation",value:function(t,e,n){var i,r=this.w,o=this.helpers.getX1X2("x1",t),a=t.label.text,s=t.strokeDashArray;if(p.isNumber(o)){if(null===t.x2||void 0===t.x2){var l=this.annoCtx.graphics.drawLine(o+t.offsetX,0+t.offsetY,o+t.offsetX,r.globals.gridHeight+t.offsetY,t.borderColor,s,t.borderWidth);e.appendChild(l.node),t.id&&l.node.classList.add(t.id)}else{if((i=this.helpers.getX1X2("x2",t))a){var c=a;a=i,i=c}var d=this.annoCtx.graphics.drawRect(0+t.offsetX,i+t.offsetY,this._getYAxisAnnotationWidth(t),a-i,0,t.fillColor,t.opacity,1,t.borderColor,o);d.node.classList.add("apexcharts-annotation-rect"),d.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")")),e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}var h="right"===t.label.position?r.globals.gridWidth:0,u=this.annoCtx.graphics.drawText({x:h+t.label.offsetX,y:(null!=i?i:a)+t.label.offsetY-3,text:s,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});u.attr({rel:n}),e.appendChild(u.node)}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.map((function(e,i){t.addYaxisAnnotation(e,n.node,i)})),n}}]),t}(),_=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new b(this.annoCtx)}return o(t,[{key:"addPointAnnotation",value:function(t,e,n){this.w;var i=this.helpers.getX1X2("x1",t),r=this.helpers.getY1Y2("y1",t);if(p.isNumber(i)){var o={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},a=this.annoCtx.graphics.drawMarker(i+t.marker.offsetX,r+t.marker.offsetY,o);e.appendChild(a.node);var s=t.label.text?t.label.text:"",l=this.annoCtx.graphics.drawText({x:i+t.label.offsetX,y:r+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:s,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(l.attr({rel:n}),e.appendChild(l.node),t.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});c.attr({transform:"translate(".concat(i+t.customSVG.offsetX,", ").concat(r+t.customSVG.offsetY,")")}),c.node.innerHTML=t.customSVG.SVG,e.appendChild(c.node)}if(t.image.path){var d=t.image.width?t.image.width:20,h=t.image.height?t.image.height:20;a=this.annoCtx.addImage({x:i+t.image.offsetX-d/2,y:r+t.image.offsetY-h/2,width:d,height:h,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&a.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&a.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t))}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,n=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,i){t.addPointAnnotation(e,n.node,i)})),n}}]),t}(),k={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},S=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:0,mouseEnter:void 0,mouseLeave:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return o(t,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[k],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(t){return new Date(t).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),C=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new v(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new b(this),this.xAxisAnnotations=new x(this),this.yAxisAnnotations=new w(this),this.pointsAnnotations=new _(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return o(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),r=t.config.chart.animations.enabled,o=[e,n,i],a=[n.node,e.node,i.node],s=0;s<3;s++)t.globals.dom.elGraphical.add(o[s]),!r||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&a[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,n){t.addImage(e,n)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,n){t.addText(e,n)}))}},{key:"addXaxisAnnotation",value:function(t,e,n){this.xAxisAnnotations.addXaxisAnnotation(t,e,n)}},{key:"addYaxisAnnotation",value:function(t,e,n){this.yAxisAnnotations.addYaxisAnnotation(t,e,n)}},{key:"addPointAnnotation",value:function(t,e,n){this.pointsAnnotations.addPointAnnotation(t,e,n)}},{key:"addText",value:function(t,e){var n=t.x,i=t.y,r=t.text,o=t.textAnchor,a=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,d=t.cssClass,h=t.backgroundColor,u=t.borderWidth,f=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,m=t.appendTo,v=void 0===m?".apexcharts-annotations":m,y=t.paddingLeft,b=void 0===y?4:y,x=t.paddingRight,w=void 0===x?4:x,_=t.paddingBottom,k=void 0===_?2:_,S=t.paddingTop,C=void 0===S?2:S,A=this.w,T=this.graphics.drawText({x:n,y:i,text:r,textAnchor:o||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||A.config.chart.fontFamily,foreColor:a||A.config.chart.foreColor,cssClass:d}),D=A.globals.dom.baseEl.querySelector(v);D&&D.appendChild(T.node);var I=T.bbox();if(r){var P=this.graphics.drawRect(I.x-b,I.y-C,I.width+b+w,I.height+k+C,p,h||"transparent",1,u,g,f);D.insertBefore(P.node,T.node)}}},{key:"addImage",value:function(t,e){var n=this.w,i=t.path,r=t.x,o=void 0===r?0:r,a=t.y,s=void 0===a?0:a,l=t.width,c=void 0===l?20:l,d=t.height,h=void 0===d?20:d,u=t.appendTo,f=void 0===u?".apexcharts-annotations":u,p=n.globals.dom.Paper.image(i);p.size(c,h).move(o,s);var g=n.globals.dom.baseEl.querySelector(f);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,n){return this.addAnnotationExternal({params:t,pushToMemory:e,context:n,type:"xaxis",contextMethod:n.addXaxisAnnotation}),n}},{key:"addYaxisAnnotationExternal",value:function(t,e,n){return this.addAnnotationExternal({params:t,pushToMemory:e,context:n,type:"yaxis",contextMethod:n.addYaxisAnnotation}),n}},{key:"addPointAnnotationExternal",value:function(t,e,n){return void 0===this.invertAxis&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:n,type:"point",contextMethod:n.addPointAnnotation}),n}},{key:"addAnnotationExternal",value:function(t){var e=t.params,n=t.pushToMemory,i=t.context,r=t.type,o=t.contextMethod,a=i,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations")),c=l.childNodes.length+1,d=new S,h=Object.assign({},"xaxis"===r?d.xAxisAnnotation:"yaxis"===r?d.yAxisAnnotation:d.pointAnnotation),u=p.extend(h,e);switch(r){case"xaxis":this.addXaxisAnnotation(u,l,c);break;case"yaxis":this.addYaxisAnnotation(u,l,c);break;case"point":this.addPointAnnotation(u,l,c)}var f=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(f,u);return g&&l.insertBefore(g.node,f),n&&s.globals.memory.methodsToExec.push({context:a,id:u.id?u.id:p.randomId(),method:o,label:"addAnnotation",params:e}),i}},{key:"clearAnnotations",value:function(t){var e=t.w,n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");e.globals.memory.methodsToExec.map((function(t,n){"addText"!==t.label&&"addAnnotation"!==t.label||e.globals.memory.methodsToExec.splice(n,1)})),n=p.listToArray(n),Array.prototype.forEach.call(n,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var n=t.w,i=n.globals.dom.baseEl.querySelectorAll(".".concat(e));i&&(n.globals.memory.methodsToExec.map((function(t,i){t.id===e&&n.globals.memory.methodsToExec.splice(i,1)})),Array.prototype.forEach.call(i,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),A=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return o(t,[{key:"clippedImgArea",value:function(t){var e=this.w,n=e.config,i=parseInt(e.globals.gridWidth,10),r=parseInt(e.globals.gridHeight,10),o=i>r?i:r,a=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==n.fill.image.width&&void 0!==n.fill.image.height?(s=n.fill.image.width+1,l=n.fill.image.height):(s=o+1,l=o):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");v.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var d=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",a),v.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),d.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w;return("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||"heatmap"===e.config.chart.type||"treemap"===e.config.chart.type?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var n,i,r,o=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var a=this.getFillColors()[this.seriesIndex];void 0!==e.globals.seriesColors[this.seriesIndex]&&(a=e.globals.seriesColors[this.seriesIndex]),"function"==typeof a&&(a=a({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:e}));var s=this.getFillType(this.seriesIndex),l=Array.isArray(o.fill.opacity)?o.fill.opacity[this.seriesIndex]:o.fill.opacity;t.color&&(a=t.color);var c=a;if(-1===a.indexOf("rgb")?a.length<9&&(c=p.hexToRgba(a,l)):a.indexOf("rgba")>-1&&(l=p.getOpacityFromRGBA(a)),t.opacity&&(l=t.opacity),"pattern"===s&&(i=this.handlePatternFill(i,a,l,c)),"gradient"===s&&(r=this.handleGradientFill(a,l,this.seriesIndex)),"image"===s){var d=o.fill.image.src,h=t.patternID?t.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(d)?t.seriesNumber-1&&(d=p.getOpacityFromRGBA(c));var h=void 0===r.fill.gradient.opacityTo?e:Array.isArray(r.fill.gradient.opacityTo)?r.fill.gradient.opacityTo[n]:r.fill.gradient.opacityTo;if(void 0===r.fill.gradient.gradientToColors||0===r.fill.gradient.gradientToColors.length)i="dark"===r.fill.gradient.shade?s.shadeColor(-1*parseFloat(r.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?p.rgb2hex(t):t):s.shadeColor(parseFloat(r.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?p.rgb2hex(t):t);else if(r.fill.gradient.gradientToColors[o.seriesNumber]){var u=r.fill.gradient.gradientToColors[o.seriesNumber];i=u,u.indexOf("rgba")>-1&&(h=p.getOpacityFromRGBA(u))}else i=t;if(r.fill.gradient.inverseColors){var f=c;c=i,i=f}return c.indexOf("rgb")>-1&&(c=p.rgb2hex(c)),i.indexOf("rgb")>-1&&(i=p.rgb2hex(i)),a.drawGradient(l,c,i,d,h,o.size,r.fill.gradient.stops,r.fill.gradient.colorStops,n)}}]),t}(),T=function(){function t(e,n){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],a=this.w,s=e,l=t,c=null,d=new v(this.ctx),h=a.config.markers.discrete&&a.config.markers.discrete.length;if((a.globals.markers.size[e]>0||o||h)&&(c=d.group({class:o||h?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(l.x))for(var u=0;u0:a.config.markers.size>0)||o||h){p.isNumber(l.y[u])?g+=" w".concat(p.randomId()):g="apexcharts-nullpoint";var y=this.getMarkerConfig({cssClass:g,seriesIndex:e,dataPointIndex:f});a.config.series[s].data[f]&&(a.config.series[s].data[f].fillColor&&(y.pointFillColor=a.config.series[s].data[f].fillColor),a.config.series[s].data[f].strokeColor&&(y.pointStrokeColor=a.config.series[s].data[f].strokeColor)),i&&(y.pSize=i),(r=d.drawMarker(l.x[u],l.y[u],y)).attr("rel",f),r.attr("j",f),r.attr("index",e),r.node.setAttribute("default-marker-size",y.pSize),new m(this.ctx).setSelectionFilter(r,e,f),this.addEvents(r),c&&c.add(r)}else void 0===a.globals.pointsArray[e]&&(a.globals.pointsArray[e]=[]),a.globals.pointsArray[e].push([l.x[u],l.y[u]])}return c}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,n=t.seriesIndex,i=t.dataPointIndex,r=void 0===i?null:i,o=t.finishRadius,a=void 0===o?null:o,s=this.w,l=this.getMarkerStyle(n),c=s.globals.markers.size[n],d=s.config.markers;return null!==r&&d.discrete.length&&d.discrete.map((function(t){t.seriesIndex===n&&t.dataPointIndex===r&&(l.pointStrokeColor=t.strokeColor,l.pointFillColor=t.fillColor,c=t.size,l.pointShape=t.shape)})),{pSize:null===a?c:a,pRadius:d.radius,width:Array.isArray(d.width)?d.width[n]:d.width,height:Array.isArray(d.height)?d.height[n]:d.height,pointStrokeWidth:Array.isArray(d.strokeWidth)?d.strokeWidth[n]:d.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(d.shape)?d.shape[n]:d.shape),class:e,pointStrokeOpacity:Array.isArray(d.strokeOpacity)?d.strokeOpacity[n]:d.strokeOpacity,pointStrokeDashArray:Array.isArray(d.strokeDashArray)?d.strokeDashArray[n]:d.strokeDashArray,pointFillOpacity:Array.isArray(d.fillOpacity)?d.fillOpacity[n]:d.fillOpacity,seriesIndex:n}}},{key:"addEvents",value:function(t){var e=this.w,n=new v(this.ctx);t.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",n.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",n.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,n=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(n)?n[t]:n}}}]),t}(),D=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return o(t,[{key:"draw",value:function(t,e,n){var i=this.w,r=new v(this.ctx),o=n.realIndex,a=n.pointsPos,s=n.zRatio,l=n.elParent,c=r.group({class:"apexcharts-series-markers apexcharts-series-".concat(i.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(i.globals.cuid,")")),Array.isArray(a.x))for(var d=0;dg.maxBubbleRadius&&(p=g.maxBubbleRadius)}i.config.chart.animations.enabled||(f=p);var m=a.x[d],y=a.y[d];if(f=f||0,null!==y&&void 0!==i.globals.series[o][h]||(u=!1),u){var b=this.drawPoint(m,y,f,p,o,h,e);c.add(b)}l.add(c)}}},{key:"drawPoint",value:function(t,e,n,i,r,o,a){var s=this.w,l=r,c=new g(this.ctx),d=new m(this.ctx),h=new A(this.ctx),u=new T(this.ctx),f=new v(this.ctx),p=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:o,finishRadius:"bubble"===s.config.chart.type||s.globals.comboCharts&&s.config.series[r]&&"bubble"===s.config.series[r].type?i:null});i=p.pSize;var y,b=h.fillPath({seriesNumber:r,dataPointIndex:o,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:s.globals.series[r][a]});if("circle"===p.shape?y=f.drawCircle(n):"square"!==p.shape&&"rect"!==p.shape||(y=f.drawRect(0,0,p.width-p.pointStrokeWidth/2,p.height-p.pointStrokeWidth/2,p.pRadius)),s.config.series[l].data[o]&&s.config.series[l].data[o].fillColor&&(b=s.config.series[l].data[o].fillColor),y.attr({x:t-p.width/2-p.pointStrokeWidth/2,y:e-p.height/2-p.pointStrokeWidth/2,cx:t,cy:e,fill:b,"fill-opacity":p.pointFillOpacity,stroke:p.pointStrokeColor,r:i,"stroke-width":p.pointStrokeWidth,"stroke-dasharray":p.pointStrokeDashArray,"stroke-opacity":p.pointStrokeOpacity}),s.config.chart.dropShadow.enabled){var x=s.config.chart.dropShadow;d.dropShadow(y,x,r)}if(!this.initialAnim||s.globals.dataChanged||s.globals.resized)s.globals.animationEnded=!0;else{var w=s.config.chart.animations.speed;c.animateMarker(y,0,"circle"===p.shape?i:{width:p.width,height:p.height},w,s.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(y)}),100)}))}if(s.globals.dataChanged&&"circle"===p.shape)if(this.dynamicAnim){var _,k,S,C,D=s.config.chart.animations.dynamicAnimation.speed;null!=(C=s.globals.previousPaths[r]&&s.globals.previousPaths[r][a])&&(_=C.x,k=C.y,S=void 0!==C.r?C.r:i);for(var I=0;Is.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[i]&&(s.globals.dataLabelsRects[i]=[]),s.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:h});var u=s.globals.dataLabelsRects[i].length-2,f=void 0!==s.globals.lastDrawnDataLabelsIndexes[i]?s.globals.lastDrawnDataLabelsIndexes[i][s.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==s.globals.dataLabelsRects[i][u]){var p=s.globals.dataLabelsRects[i][f];(t>p.x+p.width+2||e>p.y+p.height+2||t+d4&&void 0!==arguments[4]?arguments[4]:2,o=this.w,a=new v(this.ctx),s=o.config.dataLabels,l=0,c=0,d=n,h=null;if(!s.enabled||!Array.isArray(t.x))return h;h=a.group({class:"apexcharts-data-labels"});for(var u=0;ue.globals.gridWidth+g.textRects.width+10)&&(s="");var y=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(y=e.globals.dataLabels.style.colors[a]),"function"==typeof y&&(y=y({series:e.globals.series,seriesIndex:o,dataPointIndex:a,w:e})),u&&(y=u);var b=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(b=0,x=0),g.drawnextLabel){var w=n.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+b,y:r+x,foreColor:y,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"});if(w.attr({class:"apexcharts-datalabel",cx:i,cy:r}),h.dropShadow.enabled){var _=h.dropShadow;new m(this.ctx).dropShadow(w,_)}d.add(w),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(a)}}}},{key:"addBackgroundToDataLabel",value:function(t,e){var n=this.w,i=n.config.dataLabels.background,r=i.padding,o=i.padding/2,a=e.width,s=e.height,l=new v(this.ctx).drawRect(e.x-r,e.y-o/2,a+2*r,s+o,i.borderRadius,"transparent"===n.config.chart.background?"#fff":n.config.chart.background,i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new m(this.ctx).dropShadow(l,i.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),n=0;nn.globals.gridHeight&&(d=n.globals.gridHeight-u)),{bcx:a,bcy:o,dataLabelsX:e,dataLabelsY:d}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,n=t.x,i=t.i,r=t.j,o=t.bcy,a=t.barHeight,s=t.barWidth,l=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,h=t.barDataLabelsConfig,u=t.offX,f=t.offY,p=e.globals.gridHeight/e.globals.dataPoints;s=Math.abs(s);var g=o-(this.barCtx.isRangeBar?0:p)+a/2+l.height/2+f-3,m=this.barCtx.series[i][r]<0,v=n;switch(this.barCtx.isReversed&&(v=n+s-(m?2*s:0),n=e.globals.gridWidth-s),h.position){case"center":c=m?v+s/2-u:Math.max(l.width/2,v-s/2)+u;break;case"bottom":c=m?v+s-d-Math.round(l.width/2)-u:v-s+d+Math.round(l.width/2)+u;break;case"top":c=m?v-d+Math.round(l.width/2)-u:v-d-Math.round(l.width/2)+u}return e.config.chart.stacked||(c<0?c=c+l.width+d:c+l.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-l.width-d)),{bcx:n,bcy:o,dataLabelsX:c,dataLabelsY:g}}},{key:"drawCalculatedDataLabels",value:function(t){var n=t.x,i=t.y,r=t.val,o=t.i,a=t.j,s=t.textRects,l=t.barHeight,c=t.barWidth,d=t.dataLabelsConfig,h=this.w,u="rotate(0)";"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(n,", ").concat(i,")"));var f=new I(this.barCtx.ctx),p=new v(this.barCtx.ctx),g=d.formatter,m=null,y=h.globals.collapsedSeriesIndices.indexOf(o)>-1;if(d.enabled&&!y){m=p.group({class:"apexcharts-data-labels",transform:u});var b="";void 0!==r&&(b=g(r,{seriesIndex:o,dataPointIndex:a,w:h}));var x=h.globals.series[o][a]<0,w=h.config.plotOptions.bar.dataLabels.position;"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&("top"===w&&(d.textAnchor=x?"end":"start"),"center"===w&&(d.textAnchor="middle"),"bottom"===w&&(d.textAnchor=x?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&cMath.abs(c)&&(b=""):s.height/1.6>Math.abs(l)&&(b=""));var _=e({},d);this.barCtx.isHorizontal&&r<0&&("start"===d.textAnchor?_.textAnchor="end":"end"===d.textAnchor&&(_.textAnchor="start")),f.plotDataLabelsText({x:n,y:i,text:b,i:o,j:a,parent:m,dataLabelsConfig:_,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}}]),t}(),E=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return o(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(t){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(p.escapeString(t),"']"))}},{key:"isSeriesHidden",value:function(t){var e=this.getSeriesByName(t),n=parseInt(e.getAttribute("data:realIndex"),10);return{isHidden:e.classList.contains("apexcharts-series-collapsed"),realIndex:n}}},{key:"addCollapsedClassToSeries",value:function(t,e){var n=this.w;function i(n){for(var i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w,r=p.clone(i.globals.initialSeries);i.globals.previousPaths=[],n?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),i.config.series=r,t&&(e&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(r,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,n=0;n-1&&(t[n].data=[]);return t}},{key:"toggleSeriesOnHover",value:function(t,e){var n=this.w;e||(e=t.target);var i=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===t.type){var r=parseInt(e.getAttribute("rel"),10)-1,o=null,a=null;n.globals.axisCharts||"radialBar"===n.config.chart.type?n.globals.axisCharts?(o=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"']")),a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(r,"']"))):o=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"']")):o=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"'] path"));for(var s=0;s=t.from&&i<=t.to&&r[e].classList.remove(n.legendInactiveClass)}}(i.config.plotOptions.heatmap.colorScale.ranges[a])}else"mouseout"===t.type&&o("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=this.w,i=0;if(n.config.series.length>1)for(var r=n.config.series.map((function(e,i){var r=!1;return t&&(r="bar"===n.config.series[i].type||"column"===n.config.series[i].type),e.data&&e.data.length>0&&!r?i:-1})),o="asc"===e?0:r.length-1;"asc"===e?o=0;"asc"===e?o++:o--)if(-1!==r[o]){i=r[o];break}return i}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,n,i){for(var r=e[n].childNodes,o={type:i,paths:[],realIndex:e[n].getAttribute("data:realIndex")},a=0;a0)for(var i=function(e){for(var n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),i=[],r=function(t){var e=function(e){return n[t].getAttribute(e)},r={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};i.push({rect:r,color:n[t].getAttribute("color")})},o=0;o0)for(var i=0;i0?t:[]}))}}]),t}(),M=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return o(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var n=0;n0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[n].length),e.globals.isXNumeric)for(var i=0;ie.globals.minX&&e.globals.seriesX[n][i]0&&(i=l.globals.minXDiff/h),(o=i/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),t=l.globals.padHorizontal+(i-o*this.barCtx.seriesLen)/2}return{x:t,y:e,yDivision:n,xDivision:i,barHeight:r,barWidth:o,zeroH:a,zeroW:s}}},{key:"getPathFillColor",value:function(t,e,n,i){var r=this.w,o=new A(this.barCtx.ctx),a=null,s=this.barCtx.barOptions.distributed?n:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(i){t[e][n]>=i.from&&t[e][n]<=i.to&&(a=i.color)})),r.config.series[e].data[n]&&r.config.series[e].data[n].fillColor&&(a=r.config.series[e].data[n].fillColor),o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:i,dataPointIndex:n,color:a,value:t[e][n]})}},{key:"getStrokeWidth",value:function(t,e,n){var i=0,r=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),i}},{key:"barBackground",value:function(t){var e=t.j,n=t.i,i=t.x1,r=t.x2,o=t.y1,a=t.y2,s=t.elSeries,l=this.w,c=new v(this.barCtx.ctx),d=new E(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===n){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],u=c.drawRect(void 0!==i?i:0,void 0!==o?o:0,void 0!==r?r:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e=t.barWidth,n=t.barXPosition,i=t.yRatio,r=t.y1,o=t.y2,a=t.strokeWidth,s=t.series,l=t.realIndex,c=t.i,d=t.j,h=t.w,u=new v(this.barCtx.ctx);(a=Array.isArray(a)?a[l]:a)||(a=0);var f={barWidth:e,strokeWidth:a,yRatio:i,barXPosition:n,y1:r,y2:o},p=this.getRoundedBars(h,f,s,c,d),g=n,m=n+e,y=u.move(g,r),b=u.move(g,r),x=u.line(m-a,r);return h.globals.previousPaths.length>0&&(b=this.barCtx.getPreviousPath(l,d,!1)),y=y+u.line(g,p.y2)+p.pathWithRadius+u.line(m-a,p.y2)+x+x+"z",b=b+u.line(g,r)+x+x+x+x+x+u.line(g,r),h.config.chart.stacked&&(this.barCtx.yArrj.push(p.y2),this.barCtx.yArrjF.push(Math.abs(r-p.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[c][d])),{pathTo:y,pathFrom:b}}},{key:"getBarpaths",value:function(t){var e=t.barYPosition,n=t.barHeight,i=t.x1,r=t.x2,o=t.strokeWidth,a=t.series,s=t.realIndex,l=t.i,c=t.j,d=t.w,h=new v(this.barCtx.ctx);(o=Array.isArray(o)?o[s]:o)||(o=0);var u={barHeight:n,strokeWidth:o,barYPosition:e,x2:r,x1:i},f=this.getRoundedBars(d,u,a,l,c),p=h.move(i,e),g=h.move(i,e);d.globals.previousPaths.length>0&&(g=this.barCtx.getPreviousPath(s,c,!1));var m=e,y=e+n,b=h.line(i,y-o);return p=p+h.line(f.x2,m)+f.pathWithRadius+h.line(f.x2,y-o)+b+b+"z",g=g+h.line(i,m)+b+b+b+b+b+h.line(i,m),d.config.chart.stacked&&(this.barCtx.xArrj.push(f.x2),this.barCtx.xArrjF.push(Math.abs(i-f.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[l][c])),{pathTo:p,pathFrom:g}}},{key:"getRoundedBars",value:function(t,e,n,i,r){var o=new v(this.barCtx.ctx),a=0,s=t.config.plotOptions.bar.borderRadius,l=Array.isArray(s);if(a=l?s[i>s.length-1?s.length-1:i]:s,t.config.chart.stacked&&n.length>1&&i!==this.barCtx.radiusOnSeriesNumber&&!l&&(a=0),this.barCtx.isHorizontal){var c="",d=e.x2;if(Math.abs(e.x1-e.x2)0:n[i][r]<0;h&&(a*=-1),d-=a,c=o.quadraticCurve(d+a,e.barYPosition,d+a,e.barYPosition+(h?-1*a:a))+o.line(d+a,e.barYPosition+e.barHeight-e.strokeWidth-(h?-1*a:a))+o.quadraticCurve(d+a,e.barYPosition+e.barHeight-e.strokeWidth,d,e.barYPosition+e.barHeight-e.strokeWidth)}return{pathWithRadius:c,x2:d}}var u="",f=e.y2;if(Math.abs(e.y1-e.y2)=0;a--)this.barCtx.zeroSerieses.indexOf(a)>-1&&a===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var s=e.length-1;s>=0;s--)n.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(n=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),n}},{key:"getYForValue",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(n=e-t/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),n}},{key:"getGoalValues",value:function(t,e,n,i,r){var o=this,s=this.w,l=[];return s.globals.seriesGoals[i]&&s.globals.seriesGoals[i][r]&&Array.isArray(s.globals.seriesGoals[i][r])&&s.globals.seriesGoals[i][r].forEach((function(i){var r;l.push((a(r={},t,"x"===t?o.getXForValue(i.value,e,!1):o.getYForValue(i.value,n,!1)),a(r,"attrs",i),r))})),l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,n=t.barYPosition,i=t.goalX,r=t.goalY,o=t.barWidth,a=t.barHeight,s=new v(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"}),c=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((function(t){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:a/2,i=n+e+a/2;c=s.drawLine(t.x,i-2*e,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)})):Array.isArray(r)&&r.forEach((function(t){var n=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:o/2,i=e+n+o/2;c=s.drawLine(i-2*n,t.y,i,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)})),l}}]),t}(),O=function(){function t(e,n){i(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.barOptions=r.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=r.config.stroke.width,this.isNullValue=!1,this.isRangeBar=r.globals.seriesRangeBar.length&&this.isHorizontal,this.xyRatios=n,null!==this.xyRatios&&(this.xRatio=n.xRatio,this.initialXRatio=n.initialXRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new M(this)}return o(t,[{key:"draw",value:function(t,n){var i=this.w,r=new v(this.ctx),o=new y(this.ctx,i);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var a=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var s=0,l=0;s0&&(this.visibleI=this.visibleI+1);var _=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=x),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var S=this.barHelpers.initialPositions();g=S.y,_=S.barHeight,d=S.yDivision,u=S.zeroW,f=S.x,k=S.barWidth,c=S.xDivision,h=S.zeroH,this.horizontal||b.push(f+k/2);for(var C=r.group({class:"apexcharts-datalabels","data:realIndex":x}),A=r.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),T=0;T0&&b.push(f+k/2),m.push(g);var M=this.barHelpers.getPathFillColor(t,s,T,x);this.renderSeries({realIndex:x,pathFill:M,j:T,i:s,pathFrom:I.pathFrom,pathTo:I.pathTo,strokeWidth:D,elSeries:w,x:f,y:g,series:t,barHeight:_,barWidth:k,elDataLabelsWrap:C,elGoalsMarkers:A,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[x]=b,i.globals.seriesYvalues[x]=m,a.add(w)}return a}},{key:"renderSeries",value:function(t){var e=t.realIndex,n=t.pathFill,i=t.lineFill,r=t.j,o=t.i,a=t.pathFrom,s=t.pathTo,l=t.strokeWidth,c=t.elSeries,d=t.x,h=t.y,u=t.y1,f=t.y2,p=t.series,g=t.barHeight,y=t.barWidth,b=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,_=t.visibleSeries,k=t.type,S=this.w,C=new v(this.ctx);i||(i=this.barOptions.distributed?S.globals.stroke.colors[r]:S.globals.stroke.colors[e]),S.config.series[o].data[r]&&S.config.series[o].data[r].strokeColor&&(i=S.config.series[o].data[r].strokeColor),this.isNullValue&&(n="none");var A=r/S.config.chart.animations.animateGradually.delay*(S.config.chart.animations.speed/S.globals.dataPoints)/2.4,T=C.renderPaths({i:o,j:r,realIndex:e,pathFrom:a,pathTo:s,stroke:i,strokeWidth:l,strokeLineCap:S.config.stroke.lineCap,fill:n,animationDelay:A,initialSpeed:S.config.chart.animations.speed,dataChangeSpeed:S.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(k,"-area")});T.attr("clip-path","url(#gridRectMask".concat(S.globals.cuid,")"));var D=S.config.forecastDataPoints;D.count>0&&r>=S.globals.dataPoints-D.count&&(T.node.setAttribute("stroke-dasharray",D.dashArray),T.node.setAttribute("stroke-width",D.strokeWidth),T.node.setAttribute("fill-opacity",D.fillOpacity)),void 0!==u&&void 0!==f&&(T.attr("data-range-y1",u),T.attr("data-range-y2",f)),new m(this.ctx).setSelectionFilter(T,e,r),c.add(T);var I=new P(this).handleBarDataLabels({x:d,y:h,y1:u,y2:f,i:o,j:r,series:p,realIndex:e,barHeight:g,barWidth:y,barYPosition:b,renderedPath:T,visibleSeries:_});return null!==I&&x.add(I),c.add(x),w&&c.add(w),c}},{key:"drawBarPaths",value:function(t){var e=t.indexes,n=t.barHeight,i=t.strokeWidth,r=t.zeroW,o=t.x,a=t.y,s=t.yDivision,l=t.elSeries,c=this.w,d=e.i,h=e.j;c.globals.isXNumeric&&(a=(c.globals.seriesX[d][h]-c.globals.minX)/this.invertedXRatio-n);var u=a+n*this.visibleI;o=this.barHelpers.getXForValue(this.series[d][h],r);var f=this.barHelpers.getBarpaths({barYPosition:u,barHeight:n,x1:r,x2:o,strokeWidth:i,series:this.series,realIndex:e.realIndex,i:d,j:h,w:c});return c.globals.isXNumeric||(a+=s),this.barHelpers.barBackground({j:h,i:d,y1:u-n*this.visibleI,y2:n*this.seriesLen,elSeries:l}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x:o,y:a,goalX:this.barHelpers.getGoalValues("x",r,null,d,h),barYPosition:u}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,n=t.x,i=t.y,r=t.xDivision,o=t.barWidth,a=t.zeroH,s=t.strokeWidth,l=t.elSeries,c=this.w,d=e.realIndex,h=e.i,u=e.j,f=e.bc;if(c.globals.isXNumeric){var p=d;c.globals.seriesX[d].length||(p=c.globals.maxValsInArrayIndex),n=(c.globals.seriesX[p][u]-c.globals.minX)/this.xRatio-o*this.seriesLen/2}var g=n+o*this.visibleI;i=this.barHelpers.getYForValue(this.series[h][u],a);var m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:o,y1:a,y2:i,strokeWidth:s,series:this.series,realIndex:e.realIndex,i:h,j:u,w:c});return c.globals.isXNumeric||(n+=r),this.barHelpers.barBackground({bc:f,j:u,i:h,x1:g-s/2-o*this.visibleI,x2:o*this.seriesLen+s/2,elSeries:l}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x:n,y:i,goalY:this.barHelpers.getGoalValues("y",null,a,h,u),barXPosition:g}}},{key:"getPreviousPath",value:function(t,e){for(var n,i=this.w,r=0;r0&&parseInt(o.realIndex,10)===parseInt(t,10)&&void 0!==i.globals.previousPaths[r].paths[e]&&(n=i.globals.previousPaths[r].paths[e].d)}return n}}]),t}(),L=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return o(t,[{key:"isValidDate",value:function(t){return!isNaN(this.parseDate(t))}},{key:"getTimeStamp",value:function(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}},{key:"getDate",value:function(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);var n=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(n)}},{key:"parseDateWithTimezone",value:function(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(t,e){var n=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,r=["\0"].concat(h(n.months)),o=[""].concat(h(n.shortMonths)),a=[""].concat(h(n.days)),s=[""].concat(h(n.shortDays));function l(t,e){var n=t+"";for(e=e||2;n.length12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(p))).replace(/(^|[^\\])h/g,"$1"+p);var g=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g))).replace(/(^|[^\\])m/g,"$1"+g);var m=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(m))).replace(/(^|[^\\])s/g,"$1"+m);var v=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(v,3)),v=Math.round(v/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(v)),v=Math.round(v/10);var y=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+v)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var b=y.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));var x=-t.getTimezoneOffset(),w=i||!x?"Z":x>0?"+":"-";if(!i){var _=(x=Math.abs(x))%60;w+=l(Math.floor(x/60))+":"+l(_)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var k=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[k])).replace(new RegExp(s[0],"g"),s[k])).replace(new RegExp(r[0],"g"),r[d])).replace(new RegExp(o[0],"g"),o[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,n){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var r=this.getDate(t),o=this.getDate(e),a=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,n){return this.determineDaysOfMonths(t,e)-n}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,n){var i=this.daysCntOfYear[e]+n;return e>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(t,e){var n=30;switch(t=p.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(n=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:n=31}return n}}]),t}(),j=function(t){s(r,t);var n=d(r);function r(){return i(this,r),n.apply(this,arguments)}return o(r,[{key:"draw",value:function(t,n){var i=this.w,r=new v(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var o=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),a=0;a0&&(this.visibleI=this.visibleI+1);var m=0,y=0;this.yRatio.length>1&&(this.yaxisIndex=f);var b=this.barHelpers.initialPositions();h=b.y,c=b.zeroW,d=b.x,y=b.barWidth,s=b.xDivision,l=b.zeroH;for(var x=r.group({class:"apexcharts-datalabels","data:realIndex":f}),w=r.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),_=0;_0}));return i=l.config.plotOptions.bar.rangeBarGroupRows?r+a*u:r+o*this.visibleI+a*u,f>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(c=l.globals.seriesRangeBar[e][f].overlaps).indexOf(d)>-1&&(i=(o=s.barHeight/c.length)*this.visibleI+a*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+c.indexOf(d))+a*u),{barYPosition:i,barHeight:o}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,n=t.x;t.strokeWidth;var i=t.xDivision,r=t.barWidth,o=t.zeroH,a=this.w,s=e.i,l=e.j,c=this.yRatio[this.yaxisIndex],d=e.realIndex,h=this.getRangeValue(d,l),u=Math.min(h.start,h.end),f=Math.max(h.start,h.end);a.globals.isXNumeric&&(n=(a.globals.seriesX[s][l]-a.globals.minX)/this.xRatio-r/2);var p=n+r*this.visibleI;void 0===this.series[s][l]||null===this.series[s][l]?u=o:(u=o-u/c,f=o-f/c);var g=Math.abs(f-u),m=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:r,y1:u,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:e.realIndex,i:d,j:l,w:a});return a.globals.isXNumeric||(n+=i),{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:g,x:n,y:f,goalY:this.barHelpers.getGoalValues("y",null,o,s,l),barXPosition:p}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,n=t.y,i=t.y1,r=t.y2,o=t.yDivision,a=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,d=l+i/this.invertedYRatio,h=l+r/this.invertedYRatio,u=Math.abs(h-d),f=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:d,x2:h,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:e.realIndex,realIndex:e.realIndex,j:e.j,w:c});return c.globals.isXNumeric||(n+=o),{pathTo:f.pathTo,pathFrom:f.pathFrom,barWidth:u,x:h,goalX:this.barHelpers.getGoalValues("x",l,null,e.realIndex,e.j),y:n}}},{key:"getRangeValue",value:function(t,e){var n=this.w;return{start:n.globals.seriesRangeStart[t][e],end:n.globals.seriesRangeEnd[t][e]}}},{key:"getTooltipValues",value:function(t){var e=t.ctx,n=t.seriesIndex,i=t.dataPointIndex,r=t.y1,o=t.y2,a=t.w,s=a.globals.seriesRangeStart[n][i],l=a.globals.seriesRangeEnd[n][i],c=a.globals.labels[i],d=a.config.series[n].name?a.config.series[n].name:"",h=a.config.tooltip.y.formatter,u=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:n,dataPointIndex:i,start:s,end:l};"function"==typeof u&&(d=u(d,f)),Number.isFinite(r)&&Number.isFinite(o)&&(s=r,l=o,a.config.series[n].data[i].x&&(c=a.config.series[n].data[i].x+":"),"function"==typeof h&&(c=h(c,f)));var p="",g="",m=a.globals.colors[n];if(void 0===a.config.tooltip.x.formatter)if("datetime"===a.config.xaxis.type){var v=new L(e);p=v.formatDate(v.getDate(s),a.config.tooltip.x.format),g=v.formatDate(v.getDate(l),a.config.tooltip.x.format)}else p=s,g=l;else p=a.config.tooltip.x.formatter(s),g=a.config.tooltip.x.formatter(l);return{start:s,end:l,startVal:p,endVal:g,ylabel:c,color:m,seriesName:d}}},{key:"buildCustomTooltipHTML",value:function(t){return'
    '+(t.seriesName||"")+'
    '+t.ylabel+' '+t.start+' - '+t.end+"
    "}}]),r}(O),F=function(){function t(e){i(this,t),this.opts=e}return o(t,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,p.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var n=e.seriesIndex,i=e.dataPointIndex,r=e.w;return t._getBoxTooltip(r,n,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var n=e.seriesIndex,i=e.dataPointIndex,r=e.w;return t._getBoxTooltip(r,n,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var n=e.seriesIndex,i=e.dataPointIndex,r=e.w,o=r.globals.seriesRangeStart[n][i];return r.globals.seriesRangeEnd[n][i]-o},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=new j(t.ctx,null),n=e.getTooltipValues(t),i=n.color,r=n.seriesName,o=n.ylabel,a=n.startVal,s=n.endVal;return e.buildCustomTooltipHTML({color:i,seriesName:r,ylabel:o,start:a,end:s})}(t):function(t){var e=new j(t.ctx,null),n=e.getTooltipValues(t),i=n.color,r=n.seriesName,o=n.ylabel,a=n.start,s=n.end;return e.buildCustomTooltipHTML({color:i,seriesName:r,ylabel:o,start:a,end:s})}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(t){return p.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,n){t.yaxis[n].min=0,t.yaxis[n].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,n){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return p.isNumber(t)?Math.floor(t):t};var i=t.xaxis.labels.formatter,r=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return n&&n.length&&(r=n.map((function(t){return Array.isArray(t)?t:String(t)}))),r&&r.length&&(t.xaxis.labels.formatter=function(t){return p.isNumber(t)?i(r[Math.floor(t)-1]):i(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(t,e,n,i,r){var o=t.globals.seriesCandleO[e][n],a=t.globals.seriesCandleH[e][n],s=t.globals.seriesCandleM[e][n],l=t.globals.seriesCandleL[e][n],c=t.globals.seriesCandleC[e][n];return t.config.series[e].type&&t.config.series[e].type!==r?'
    \n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][n],"\n
    "):'
    ')+"
    ".concat(i[0],': ')+o+"
    "+"
    ".concat(i[1],': ')+a+"
    "+(s?"
    ".concat(i[2],': ')+s+"
    ":"")+"
    ".concat(i[3],': ')+l+"
    "+"
    ".concat(i[4],': ')+c+"
    "}}]),t}(),N=function(){function t(e){i(this,t),this.opts=e}return o(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,r=new S,o=new F(i);this.chartType=i.chart.type,"histogram"===this.chartType&&(i.chart.type="bar",i=p.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},i)),i=this.extendYAxis(i),i=this.extendAnnotations(i);var a=r.init(),s={};if(i&&"object"===n(i)){var l={};l=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?o[i.chart.type]():o.line(),i.chart.brush&&i.chart.brush.enabled&&(l=o.brush(l)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=o.stacked100(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),((i=this.checkForCatToNumericXAxis(this.chartType,l,i)).chart.sparkline&&i.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(l=o.sparkline(l)),s=p.extend(a,l)}var c=p.extend(s,window.Apex);return a=p.extend(c,i),this.handleUserInputErrors(a)}},{key:"checkForCatToNumericXAxis",value:function(t,e,n){var i=new F(n),r=("bar"===t||"boxPlot"===t)&&n.plotOptions&&n.plotOptions.bar&&n.plotOptions.bar.horizontal,o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,a="datetime"!==n.xaxis.type&&"numeric"!==n.xaxis.type,s=n.xaxis.tickPlacement?n.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return r||o||!a||"between"===s||(n=i.convertCatToNumeric(n)),n}},{key:"extendYAxis",value:function(t,e){var n=new S;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=p.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[p.extend(n.yAxis,t.yaxis)]:t.yaxis=p.extendArray(t.yaxis,n.yAxis);var i=!1;t.yaxis.forEach((function(t){t.logarithmic&&(i=!0)}));var r=t.series;return e&&!r&&(r=e.config.series),i&&r.length!==t.yaxis.length&&r.length&&(t.yaxis=r.map((function(e,i){if(e.name||(r[i].name="series-".concat(i+1)),t.yaxis[i])return t.yaxis[i].seriesName=r[i].name,t.yaxis[i];var o=p.extend(n.yAxis,t.yaxis[0]);return o.show=!1,o}))),i&&r.length>1&&r.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new S;return t.annotations.yaxis=p.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new S;return t.annotations.xaxis=p.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new S;return t.annotations.points=p.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.chart.background||(t.chart.background="#424242"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),R=function(){function t(){i(this,t)}return o(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRangeBar=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasGroups=!1,t.groups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.xaxisLabelsCount=0,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=p.extend({},t),e.initialSeries=p.clone(t.series),e.lastXAxis=p.clone(e.initialConfig.xaxis),e.lastYAxis=p.clone(e.initialConfig.yaxis),e}}]),t}(),H=function(){function t(e){i(this,t),this.opts=e}return o(t,[{key:"init",value:function(){var t=new N(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new R).init(t)}}}]),t}(),B=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new y(this.ctx)}return o(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new E(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new E(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var n=this.w.config,i=this.w.globals,r="boxPlot"===n.chart.type||"boxPlot"===n.series[e].type,o=0;o=5?this.twoDSeries.push(p.parseNumber(t[e].data[o][4])):this.twoDSeries.push(p.parseNumber(t[e].data[o][1])),i.dataFormatXNumeric=!0),"datetime"===n.xaxis.type){var a=new Date(t[e].data[o][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s-1&&(o=this.activeSeriesIndex);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,r=this.w.globals,o=new L(n),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();r.isRangeBar="rangeBar"===i.chart.type&&r.isBarHorizontal,r.hasGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,r.hasGroups&&(r.groups=i.xaxis.group.groups);for(var s=function(){for(var t=0;t0&&(this.twoDSeriesX=a,r.seriesX.push(this.twoDSeriesX))),r.labels.push(this.twoDSeriesX);var c=t[l].data.map((function(t){return p.parseNumber(t)}));r.series.push(c)}r.seriesZ.push(this.threeDSeries),void 0!==t[l].name?r.seriesNames.push(t[l].name):r.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==t[l].color?r.seriesColors.push(t[l].color):r.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,n=this.w.config;e.series=t.slice(),e.seriesNames=n.labels.slice();for(var i=0;i0?n.labels=e.xaxis.categories:e.labels.length>0?n.labels=e.labels.slice():this.fallbackToCategory?(n.labels=n.labels[0],n.seriesRangeBar.length&&(n.seriesRangeBar.map((function(t){t.forEach((function(t){n.labels.indexOf(t.x)<0&&t.x&&n.labels.push(t.x)}))})),n.labels=n.labels.filter((function(t,e,n){return n.indexOf(t)===e}))),e.xaxis.convertedCatToNumeric&&(new F(e).convertCatToNumericXaxis(e,this.ctx,n.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,n=this.w.config,i=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var r=n.series.map((function(t,e){return t.data.filter((function(t,e,n){return n.findIndex((function(e){return e.x===t.x}))===e}))})),o=r.reduce((function(t,e,n,i){return i[t].length>e.length?t:n}),0),a=0;a0&&n<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(n,i){void 0!==n.labels.formatter?e.globals.yLabelFormatters[i]=n.labels.formatter:e.globals.yLabelFormatters[i]=function(r){return e.globals.xyCharts?Array.isArray(r)?r.map((function(e){return t.defaultYFormatter(e,n,i)})):t.defaultYFormatter(r,n,i):r}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"getLabel",value:function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=this.w,l=void 0===t[i]?"":t[i],c=l,d=s.globals.xLabelFormatter,h=s.config.xaxis.labels.formatter,u=!1,f=new z(this.ctx),p=l;a&&(c=f.xLabelFormat(d,l,p,{i:i,dateFormatter:new L(this.ctx).formatDate,w:s}),void 0!==h&&(c=h(l,t[i],{i:i,dateFormatter:new L(this.ctx).formatDate,w:s})));e.length>0?(u=function(t){var n=null;return e.forEach((function(t){"month"===t.unit?n="year":"day"===t.unit?n="month":"hour"===t.unit?n="day":"minute"===t.unit&&(n="hour")})),n===t}(e[i].unit),n=e[i].position,c=e[i].value):"datetime"===s.config.xaxis.type&&void 0===h&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var g,m=new v(this.ctx);g=s.globals.rotateXLabels&&a?m.getTextRects(c,parseInt(o,10),null,"rotate(".concat(s.config.xaxis.labels.rotate," 0 0)"),!1):m.getTextRects(c,parseInt(o,10));var y=!s.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&(0===c.indexOf("NaN")||0===c.toLowerCase().indexOf("invalid")||c.toLowerCase().indexOf("infinity")>=0||r.indexOf(c)>=0&&y)&&(c=""),{x:n,text:c,textRect:g,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,n){var i=this.w,r=i.config.xaxis.tickAmount;return"dataPoints"===r&&(r=Math.round(i.globals.gridWidth/120)),r>n||t%Math.round(n/(r+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,n,i,r){var o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===n-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=r[r.length-1];e.x0){!0===s.config.yaxis[r].opposite&&(t+=i.width);for(var d=e;d>=0;d--){var h=c+e/10+s.config.yaxis[r].labels.offsetY-1;s.globals.isBarHorizontal&&(h=o*d),"heatmap"===s.config.chart.type&&(h+=o/2);var u=l.drawLine(t+n.offsetX-i.width+i.offsetX,h+i.offsetY,t+n.offsetX+i.offsetX,h+i.offsetY,i.color);a.add(u),c+=o}}}}]),t}(),W=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"scaleSvgNode",value:function(t,e){var n=parseFloat(t.getAttributeNS(null,"width")),i=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",n*e),t.setAttributeNS(null,"height",i*e),t.setAttributeNS(null,"viewBox","0 0 "+n+" "+i)}},{key:"fixSvgStringForIe11",value:function(t){if(!p.isIE11())return t.replace(/ /g," ");var e=0,n=t.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(t){return 2==++e?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':t}));return(n=n.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(t){var e=this.w.globals.dom.Paper.svg();if(1!==t){var n=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(n,t),e=(new XMLSerializer).serializeToString(n)}return this.fixSvgStringForIe11(e)}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),n=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(i,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),n&&n[0]&&(n[0].setAttribute("y",-100),n[0].setAttribute("y1",-100),n[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(n){var i=e.w,r=t?t.scale||t.width/i.globals.svgWidth:1;e.cleanup();var o=document.createElement("canvas");o.width=i.globals.svgWidth*r,o.height=parseInt(i.globals.dom.elWrap.style.height,10)*r;var a="transparent"===i.config.chart.background?"#fff":i.config.chart.background,s=o.getContext("2d");s.fillStyle=a,s.fillRect(0,0,o.width*r,o.height*r);var l=e.getSvgString(r);if(window.canvg&&p.isIE11()){var c=window.canvg.Canvg.fromString(s,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=o.msToBlob();c.stop(),n({blob:d})}else{var h="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(s.drawImage(u,0,0),o.msToBlob){var t=o.msToBlob();n({blob:t})}else{var e=o.toDataURL("image/png");n({imgURI:e})}},u.src=h}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){var n=e.imgURI,i=e.blob;i?navigator.msSaveOrOpenBlob(i,t.w.globals.chartID+".png"):t.triggerDownload(n,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,n=t.series,i=t.columnDelimiter,r=t.lineDelimiter,o=void 0===r?"\n":r,a=this.w,s=[],l=[],c="",d=new B(this.ctx),h=new Y(this.ctx),u=function(t){var n="";if(a.globals.axisCharts){if("category"===a.config.xaxis.type||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){var r=a.globals.yLabelFormatters[0],o=new E(e.ctx).getActiveConfigSeriesIndex();n=r(a.globals.labels[t],{seriesIndex:o,dataPointIndex:t,w:a})}else n=h.getLabel(a.globals.labels,a.globals.timescaleLabels,0,t).text;"datetime"===a.config.xaxis.type&&(a.config.xaxis.categories.length?n=a.config.xaxis.categories[t]:a.config.labels.length&&(n=a.config.labels[t]))}else n=a.config.labels[t];return Array.isArray(n)&&(n=n.join(" ")),p.isNumber(n)?n:n.split(i).join("")};s.push(a.config.chart.toolbar.export.csv.headerCategory),n.map((function(t,e){var n=t.name?t.name:"series-".concat(e);a.globals.axisCharts&&s.push(n.split(i).join("")?n.split(i).join(""):"series-".concat(e))})),a.globals.axisCharts||(s.push(a.config.chart.toolbar.export.csv.headerValue),l.push(s.join(i))),n.map((function(t,e){a.globals.axisCharts?function(t,e){if(s.length&&0===e&&l.push(s.join(i)),t.data&&t.data.length)for(var r=0;r=10?a.config.chart.toolbar.export.csv.dateFormatter(o):p.isNumber(o)?o:o.split(i).join("")));for(var c=0;c0&&!n.globals.isBarHorizontal&&(this.xaxisLabels=n.globals.timescaleLabels.slice()),n.config.xaxis.overwriteCategories&&(this.xaxisLabels=n.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===n.config.xaxis.position?this.offY=0:this.offY=n.globals.gridHeight+1,this.offY=this.offY+n.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===n.config.chart.type&&n.config.plotOptions.bar.horizontal,this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.xaxisBorderWidth=n.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=n.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=n.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=n.config.xaxis.axisBorder.height,this.yaxis=n.config.yaxis[0]}return o(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new v(this.ctx),n=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});n.add(i);for(var r=[],o=0;o6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],h=this.w,u=l.xaxisFontSize||this.xaxisFontSize,f=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,m=l.cssClass||h.config.xaxis.labels.style.cssClass,v=h.globals.padHorizontal,y=i.length,b="category"===h.config.xaxis.type?h.globals.dataPoints:y;if(r){var x=b>1?b-1:b;a=h.globals.gridWidth/x,v=v+o(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/b,v=v+o(0,a)+h.config.xaxis.labels.offsetX;for(var w=function(r){var l=v-o(r,a)/2+h.config.xaxis.labels.offsetX;0===r&&1===y&&a/2===v&&1===b&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(i,h.globals.timescaleLabels,l,r,c,u,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),t||(w=w+parseFloat(u)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(r,x,y):s.axesUtils.checkForOverflowingLabels(r,x,y,c,d),t&&x.text&&h.globals.xaxisLabelsCount++,h.config.xaxis.labels.show){var _=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:u,fontFamily:f,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+r-1]:p[r]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+m});if(n.add(_),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,_.node.appendChild(k),""!==x.text&&(c.push(x.text),d.push(x))}}ri.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new v(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,r+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);n.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],n=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var r=0;r0){var c=r[r.length-1].getBBox(),d=r[0].getBBox();c.x<-20&&r[r.length-1].parentNode.removeChild(r[r.length-1]),d.x+d.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&r[0].parentNode.removeChild(r[0]);for(var h=0;h0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return o(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,n=new v(this.ctx);null===t&&(t=n.group({class:"apexcharts-grid"}));var i=n.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),r=n.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(r),t.add(i),t}},{key:"drawGrid",value:function(){var t=null;return this.w.globals.axisCharts&&(t=this.renderGrid(),this.drawGridArea(t.el)),t}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,n=new v(this.ctx),i=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var r=0;t.config.stroke.width.forEach((function(t){r=Math.max(r,t)})),i=r}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elForecastMask.setAttribute("id","forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(e.cuid));var o=t.config.chart.type,a=0,s=0;("bar"===o||"rangeBar"===o||"candlestick"===o||"boxPlot"===o||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(a=t.config.grid.padding.left,s=t.config.grid.padding.right,e.barPadForNumericAxis>a&&(a=e.barPadForNumericAxis,s=e.barPadForNumericAxis)),e.dom.elGridRect=n.drawRect(-i/2-a-2,-i/2,e.gridWidth+i+s+a+4,e.gridHeight+i,0,"#fff");var l=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=n.drawRect(2*-l,2*-l,e.gridWidth+4*l,e.gridHeight+4*l,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var c=e.dom.baseEl.querySelector("defs");c.appendChild(e.dom.elGridRectMask),c.appendChild(e.dom.elForecastMask),c.appendChild(e.dom.elNonForecastMask),c.appendChild(e.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,n=t.x1,i=t.y1,r=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({x1:n,y1:i,x2:r,y2:o,parent:s});var c=0;if(l.globals.hasGroups&&"between"===l.config.xaxis.tickPlacement){var d=l.globals.groups;if(d){for(var h=0,u=0;h2));r++);return!t.globals.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(i=t.globals.labels.length,t.config.xaxis.tickAmount&&t.config.xaxis.labels.formatter&&(n=t.config.xaxis.tickAmount)),this._drawXYLines({xCount:n,tickAmount:i})):(n=i,i=t.globals.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:i})),this.drawGridBands(n,i),{el:this.elg,xAxisTickWidth:t.globals.gridWidth/n}}},{key:"drawGridBands",value:function(t,e){var n=this.w;if(void 0!==n.config.grid.row.colors&&n.config.grid.row.colors.length>0)for(var i=0,r=n.globals.gridHeight/e,o=n.globals.gridWidth,a=0,s=0;a=n.config.grid.row.colors.length&&(s=0),this._drawGridBandRect({c:s,x1:0,y1:i,x2:o,y2:r,type:"row"}),i+=n.globals.gridHeight/e;if(void 0!==n.config.grid.column.colors&&n.config.grid.column.colors.length>0)for(var l=n.globals.isBarHorizontal||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?t:t-1,c=n.globals.padHorizontal,d=n.globals.padHorizontal+n.globals.gridWidth/l,h=n.globals.gridHeight,u=0,f=0;u=n.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:c,y1:0,x2:d,y2:h,type:"column"}),c+=n.globals.gridWidth/l}}]),t}(),X=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"niceScale",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0,o=this.w,a=Math.abs(e-t);if("dataPoints"===(n=this._adjustTicksForSmallRange(n,i,a))&&(n=o.globals.dataPoints-1),t===Number.MIN_VALUE&&0===e||!p.isNumber(t)&&!p.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)return t=0,e=n,this.linearScale(t,e,n);t>e?(console.warn("axis.min cannot be greater than axis.max"),e=t+.1):t===e&&(t=0===t?0:t-.5,e=0===e?2:e+.5);var s=[];a<1&&r&&("candlestick"===o.config.chart.type||"candlestick"===o.config.series[i].type||"boxPlot"===o.config.chart.type||"boxPlot"===o.config.series[i].type||o.globals.isRangeData)&&(e*=1.01);var l=n+1;l<2?l=2:l>2&&(l-=2);var c=a/l,d=Math.floor(p.log10(c)),h=Math.pow(10,d),u=Math.round(c/h);u<1&&(u=1);var f=u*h,g=f*Math.floor(t/f),m=f*Math.ceil(e/f),v=g;if(r&&a>2){for(;s.push(v),!((v+=f)>m););return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}var y=t;(s=[]).push(y);for(var b=Math.abs(e-t)/n,x=0;x<=n;x++)y+=b,s.push(y);return s[s.length-2]>=e&&s.pop(),{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"linearScale",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3?arguments[3]:void 0,r=Math.abs(e-t);"dataPoints"===(n=this._adjustTicksForSmallRange(n,i,r))&&(n=this.w.globals.dataPoints-1);var o=r/n;n===Number.MAX_VALUE&&(n=10,o=1);for(var a=[],s=t;n>=0;)a.push(s),s+=o,n-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,n){e<=0&&(e=Math.max(t,n)),t<=0&&(t=Math.min(e,n));for(var i=[],r=Math.ceil(Math.log(e)/Math.log(n)+1),o=Math.floor(Math.log(t)/Math.log(n));o5)i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.logarithmicScale(e,n,o.logBase),i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,n,o.logBase):this.logarithmicScale(e,n,o.logBase);else if(n!==-Number.MAX_VALUE&&p.isNumber(n))if(i.allSeriesCollapsed=!1,void 0===o.min&&void 0===o.max||o.forceNiceScale){var s=void 0===r.yaxis[t].max&&void 0===r.yaxis[t].min||r.yaxis[t].forceNiceScale;i.yAxisScale[t]=this.niceScale(e,n,o.tickAmount?o.tickAmount:a<5&&a>1?a+1:5,t,s)}else i.yAxisScale[t]=this.linearScale(e,n,o.tickAmount,t);else i.yAxisScale[t]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(t,e){var n=this.w,i=n.globals,r=n.config.xaxis,o=Math.abs(e-t);return e!==-Number.MAX_VALUE&&p.isNumber(e)?i.xAxisScale=this.linearScale(t,e,r.tickAmount?r.tickAmount:o<5&&o>1?o+1:5,0):i.xAxisScale=this.linearScale(0,5,5),i.xAxisScale}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,n=this.w.config,i=e.minYArr.concat([]),r=e.maxYArr.concat([]),o=[];n.yaxis.forEach((function(e,a){var s=a;n.series.forEach((function(t,n){t.name===e.seriesName&&(s=n,a!==n?o.push({index:n,similarIndex:a,alreadyExists:!0}):o.push({index:n}))}));var l=i[s],c=r[s];t.setYScaleForIndex(a,l,c)})),this.sameScaleInMultipleAxes(i,r,o)}},{key:"sameScaleInMultipleAxes",value:function(t,e,n){var i=this,r=this.w.config,o=this.w.globals,a=[];n.forEach((function(t){t.alreadyExists&&(void 0===a[t.index]&&(a[t.index]=[]),a[t.index].push(t.index),a[t.index].push(t.similarIndex))})),o.yAxisSameScaleIndices=a,a.forEach((function(t,e){a.forEach((function(n,i){var r,o;e!==i&&(r=t,o=n,r.filter((function(t){return-1!==o.indexOf(t)}))).length>0&&(a[e]=a[e].concat(a[i]))}))}));var s=a.map((function(t){return t.filter((function(e,n){return t.indexOf(e)===n}))})).map((function(t){return t.sort()}));a=a.filter((function(t){return!!t}));var l=s.slice(),c=l.map((function(t){return JSON.stringify(t)}));l=l.filter((function(t,e){return c.indexOf(JSON.stringify(t))===e}));var d=[],h=[];t.forEach((function(t,n){l.forEach((function(i,r){i.indexOf(n)>-1&&(void 0===d[r]&&(d[r]=[],h[r]=[]),d[r].push({key:n,value:t}),h[r].push({key:n,value:e[n]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),f=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);d.forEach((function(t,e){t.forEach((function(t,n){u[e]=Math.min(t.value,u[e])}))})),h.forEach((function(t,e){t.forEach((function(t,n){f[e]=Math.max(t.value,f[e])}))})),t.forEach((function(t,e){h.forEach((function(t,n){var a=u[n],s=f[n];r.chart.stacked&&(s=0,t.forEach((function(t,e){t.value!==-Number.MAX_VALUE&&(s+=t.value),a!==Number.MIN_VALUE&&(a+=d[n][e].value)}))),t.forEach((function(n,l){t[l].key===e&&(void 0!==r.yaxis[e].min&&(a="function"==typeof r.yaxis[e].min?r.yaxis[e].min(o.minY):r.yaxis[e].min),void 0!==r.yaxis[e].max&&(s="function"==typeof r.yaxis[e].max?r.yaxis[e].max(o.maxY):r.yaxis[e].max),i.setYScaleForIndex(e,a,s))}))}))}))}},{key:"autoScaleY",value:function(t,e,n){t||(t=this);var i=t.w;if(i.globals.isMultipleYAxis||i.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),e;var r=i.globals.seriesX[0],o=i.config.chart.stacked;return e.forEach((function(t,a){for(var s=0,l=0;l=n.xaxis.min){s=l;break}var c,d,h=i.globals.minYArr[a],u=i.globals.maxYArr[a],f=i.globals.stackedSeriesTotals;i.globals.series.forEach((function(a,l){var p=a[s];o?(p=f[s],c=d=p,f.forEach((function(t,e){r[e]<=n.xaxis.max&&r[e]>=n.xaxis.min&&(t>d&&null!==t&&(d=t),a[e]=n.xaxis.min){var o=t,a=t;i.globals.series.forEach((function(n,i){null!==t&&(o=Math.min(n[e],o),a=Math.max(n[e],a))})),a>d&&null!==a&&(d=a),oh&&(c=h),e.length>1?(e[l].min=void 0===t.min?c:t.min,e[l].max=void 0===t.max?d:t.max):(e[0].min=void 0===t.min?c:t.min,e[0].max=void 0===t.max?d:t.max)}))})),e}}]),t}(),U=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.scales=new X(e)}return o(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w.config,o=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===i&&(i=t+1);var l=o.series,c=l,d=l;"candlestick"===r.chart.type?(c=o.seriesCandleL,d=o.seriesCandleH):"boxPlot"===r.chart.type?(c=o.seriesCandleO,d=o.seriesCandleC):o.isRangeData&&(c=o.seriesRangeStart,d=o.seriesRangeEnd);for(var h=t;hc[h][u]&&c[h][u]<0&&(s=c[h][u])):o.hasNullValues=!0}}return"rangeBar"===r.chart.type&&o.seriesRangeStart.length&&o.isBarHorizontal&&(s=e),"bar"===r.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:e,highestY:n}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var n=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var i=0;i=0&&n<=10||void 0!==e.yaxis[0].min||void 0!==e.yaxis[0].max)&&(a=0),t.minY=n-5*a/100,n>0&&t.minY<0&&(t.minY=0),t.maxY=t.maxY+5*a/100}return e.yaxis.forEach((function(e,n){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[n]=e.max:"function"==typeof e.max&&(t.maxYArr[n]=e.max(t.isMultipleYAxis?t.maxYArr[n]:t.maxY)),t.maxY=t.maxYArr[n]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[n]=e.min:"function"==typeof e.min&&(t.minYArr[n]=e.min(t.isMultipleYAxis?t.minYArr[n]===Number.MIN_VALUE?0:t.minYArr[n]:t.minY)),t.minY=t.minYArr[n])})),t.isBarHorizontal&&["min","max"].forEach((function(n){void 0!==e.xaxis[n]&&"number"==typeof e.xaxis[n]&&("min"===n?t.minY=e.xaxis[n]:t.maxY=e.xaxis[n])})),t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.minY=n,t.yAxisScale.forEach((function(e,n){t.minYArr[n]=e.niceMin,t.maxYArr[n]=e.niceMax}))):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.yAxisScale[0].niceMin,t.maxYArr[0]=t.yAxisScale[0].niceMax),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config,n="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided||t.noLabelsProvided||t.isXNumeric;if(t.isXNumeric&&function(){for(var e=0;et.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1)):"dataPoints"===e.xaxis.tickAmount?(t.series.length>1&&(i=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric&&(i=t.maxX-t.minX-1)):i=e.xaxis.tickAmount,t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],o=t.minX-1;o0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,i-1),t.seriesX=t.labels.slice());n&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var r=e-i[n-1];r>0&&(t.minXDiff=Math.min(r,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this.w.globals,e=[],n=[];if(t.series.length)for(var i=0;i0?r=r+parseFloat(t.series[a][i])+1e-4:o+=parseFloat(t.series[a][i])),a===t.series.length-1&&(e.push(r),n.push(o));for(var s=0;s=0;y--)m(y);if(void 0!==n.config.yaxis[t].title.text){var b=i.group({class:"apexcharts-yaxis-title"}),x=0;n.config.yaxis[t].opposite&&(x=n.globals.translateYAxisX[t]);var w=i.drawText({x:x,y:n.globals.gridHeight/2+n.globals.translateY+n.config.yaxis[t].title.offsetY,text:n.config.yaxis[t].title.text,textAnchor:"end",foreColor:n.config.yaxis[t].title.style.color,fontSize:n.config.yaxis[t].title.style.fontSize,fontWeight:n.config.yaxis[t].title.style.fontWeight,fontFamily:n.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[t].title.style.cssClass});b.add(w),l.add(b)}var _=n.config.yaxis[t].axisBorder,k=31+_.offsetX;if(n.config.yaxis[t].opposite&&(k=-31-_.offsetX),_.show){var S=i.drawLine(k,n.globals.translateY+_.offsetY-2,k,n.globals.gridHeight+n.globals.translateY+_.offsetY+2,_.color,0,_.width);l.add(S)}return n.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,d,_,n.config.yaxis[t].axisTicks,t,h,l),l}},{key:"drawYaxisInversed",value:function(t){var e=this.w,n=new v(this.ctx),i=n.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(r);var o=e.globals.yAxisScale[t].result.length-1,a=e.globals.gridWidth/o+.1,s=a+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=e.globals.yAxisScale[t].result.slice(),d=e.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),o=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(t,c);var h=d.length;if(e.config.xaxis.labels.show)for(var u=h?0:o;h?u=0;h?u++:u--){var f=c[u];f=l(f,u,e);var p=e.globals.gridWidth+e.globals.padHorizontal-(s-a+e.config.xaxis.labels.offsetX);if(d.length){var g=this.axesUtils.getLabel(c,d,p,u,this.drawnLabels,this.xaxisFontSize);p=g.x,f=g.text,this.drawnLabels.push(g.text),0===u&&e.globals.skipFirstTimelinelabel&&(f=""),u===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var m=n.drawText({x:p,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});r.add(m),m.tspan(f);var y=document.createElementNS(e.globals.SVGNS,"title");y.textContent=f,m.node.appendChild(y),s+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,n=new v(this.ctx),i=e.config.xaxis.axisBorder;if(i.show){var r=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(r-=15);var o=n.drawLine(e.globals.padHorizontal+r+i.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);t.add(o)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,n=new v(this.ctx);if(void 0!==e.config.xaxis.title.text){var i=n.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=n.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});i.add(r),t.add(i)}}},{key:"yAxisTitleRotate",value:function(t,e){var n=this.w,i=new v(this.ctx),r={width:0,height:0},o={width:0,height:0},a=n.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==a&&(r=a.getBoundingClientRect());var s=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==s&&(o=s.getBoundingClientRect()),null!==s){var l=this.xPaddingForYAxisTitle(t,r,o,e);s.setAttribute("x",l.xPos-(e?10:0))}if(null!==s){var c=i.rotateAroundCenter(s);s.setAttribute("transform","rotate(".concat(e?-1*n.config.yaxis[t].title.rotate:n.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,n,i){var r=this.w,o=0,a=0,s=10;return void 0===r.config.yaxis[t].title.text||t<0?{xPos:a,padd:0}:(i?(a=e.width+r.config.yaxis[t].title.offsetX+n.width/2+s/2,0===(o+=1)&&(a-=s/2)):(a=-1*e.width+r.config.yaxis[t].title.offsetX+s/2+n.width/2,r.globals.isBarHorizontal&&(s=25,a=-1*e.width-r.config.yaxis[t].title.offsetX-s)),{xPos:a,padd:s})}},{key:"setYAxisXPosition",value:function(t,e){var n=this.w,i=0,r=0,o=18,a=1;n.config.yaxis.length>1&&(this.multipleYs=!0),n.config.yaxis.map((function(s,l){var c=n.globals.ignoreYAxisIndexes.indexOf(l)>-1||!s.show||s.floating||0===t[l].width,d=t[l].width+e[l].width;s.opposite?n.globals.isBarHorizontal?(r=n.globals.gridWidth+n.globals.translateX-1,n.globals.translateYAxisX[l]=r-s.labels.offsetX):(r=n.globals.gridWidth+n.globals.translateX+a,c||(a=a+d+20),n.globals.translateYAxisX[l]=r-s.labels.offsetX+20):(i=n.globals.translateX-o,c||(o=o+d+20),n.globals.translateYAxisX[l]=i+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(e=p.listToArray(e)).forEach((function(e,n){var i=t.config.yaxis[n];if(i&&void 0!==i.labels.align){var r=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-texts-g")),o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(n,"'] .apexcharts-yaxis-label"));o=p.listToArray(o);var a=r.getBoundingClientRect();"left"===i.labels.align?(o.forEach((function(t,e){t.setAttribute("text-anchor","start")})),i.opposite||r.setAttribute("transform","translate(-".concat(a.width,", 0)"))):"center"===i.labels.align?(o.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),r.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)"))):"right"===i.labels.align&&(o.forEach((function(t,e){t.setAttribute("text-anchor","end")})),i.opposite&&r.setAttribute("transform","translate(".concat(a.width,", 0)")))}}))}}]),t}(),G=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=p.bind(this.documentEvent,this)}return o(t,[{key:"addEventListener",value:function(t,e){var n=this.w;n.globals.events.hasOwnProperty(t)?n.globals.events[t].push(e):n.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var n=this.w;if(n.globals.events.hasOwnProperty(t)){var i=n.globals.events[t].indexOf(e);-1!==i&&n.globals.events[t].splice(i,1)}}},{key:"fireEvent",value:function(t,e){var n=this.w;if(n.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var i=n.globals.events[t],r=i.length,o=0;o0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var n=e.filter((function(e){return e.name===t}))[0];if(!n)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=p.extend(k,n);this.w.globals.locale=i.options}}]),t}(),Z=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawAxis",value:function(t,e){var n,i,r=this.w.globals,o=this.w.config,a=new $(this.ctx),s=new q(this.ctx);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(i=s.drawYaxisInversed(0),n=a.drawXaxisInversed(0),r.dom.elGraphical.add(n),r.dom.elGraphical.add(i)):(n=a.drawXaxis(),r.dom.elGraphical.add(n),o.yaxis.map((function(t,e){-1===r.ignoreYAxisIndexes.indexOf(e)&&(i=s.drawYaxis(e),r.dom.Paper.add(i))}))))}}]),t}(),Q=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new v(this.ctx),n=new m(this.ctx),i=t.config.xaxis.crosshairs.fill.gradient,r=t.config.xaxis.crosshairs.dropShadow,o=t.config.xaxis.crosshairs.fill.type,a=i.colorFrom,s=i.colorTo,l=i.opacityFrom,c=i.opacityTo,d=i.stops,h=r.enabled,u=r.left,f=r.top,g=r.blur,y=r.color,b=r.opacity,x=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===o&&(x=e.drawGradient("vertical",a,s,l,c,null,d,null));var w=e.drawRect();1===t.config.xaxis.crosshairs.width&&(w=e.drawLine());var _=t.globals.gridHeight;(!p.isNumber(_)||_<0)&&(_=0);var k=t.config.xaxis.crosshairs.width;(!p.isNumber(k)||k<0)&&(k=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:_,width:k,height:_,fill:x,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),h&&(w=n.dropShadow(w,{left:u,top:f,blur:g,color:y,opacity:b})),t.globals.dom.elGraphical.add(w)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new v(this.ctx),n=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var r=e.drawLine(-i,0,t.globals.gridWidth+i,0,n.stroke.color,n.stroke.dashArray,n.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(r)}var o=e.drawLine(-i,0,t.globals.gridWidth+i,0,n.stroke.color,0,0);o.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(o)}}]),t}(),J=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,n=this.w,i=n.config;if(0!==i.responsive.length){var r=i.responsive.slice();r.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var o=new N({}),a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>i){var s=y.extendArrayProps(o,n.globals.initialConfig,n);t=p.extend(s,t),t=p.extend(n.config,t),e.overrideResponsiveOptions(t)}else for(var l=0;l0&&"function"==typeof e.config.colors[0]&&(e.globals.colors=e.config.series.map((function(n,i){var r=e.config.colors[i];return r||(r=e.config.colors[0]),"function"==typeof r?(t.isColorFn=!0,r({value:e.globals.axisCharts?e.globals.series[i][0]?e.globals.series[i][0]:0:e.globals.series[i],seriesIndex:i,dataPointIndex:i,w:e})):r})))),e.globals.seriesColors.map((function(t,n){t&&(e.globals.colors[n]=t)})),e.config.theme.monochrome.enabled){var i=[],r=e.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(r=e.globals.series[0].length*e.globals.series.length);for(var o=e.config.theme.monochrome.color,a=1/(r/e.config.theme.monochrome.shadeIntensity),s=e.config.theme.monochrome.shadeTo,l=0,c=0;c2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,r=e||i.globals.series.length;if(null===n&&(n=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap.colorScale.inverse),n&&i.globals.series.length&&(r=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(t,e){var n=t;if(this.w.globals.isMultiLineX){var i=e.map((function(t,e){return Array.isArray(t)?t.length:1})),r=Math.max.apply(Math,h(i));n=e[i.indexOf(r)]}return n}}]),t}(),it=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,n=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===n.length&&(n=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var r=e.globals.xLabelFormatter,o=p.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n);e.globals.isBarHorizontal&&(a=o=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new z(this.dCtx.ctx),l=o;o=s.xLabelFormat(r,o,l,{i:void 0,dateFormatter:new L(this.dCtx.ctx).formatDate,w:e}),a=s.xLabelFormat(r,a,l,{i:void 0,dateFormatter:new L(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===o||""===String(o).trim())&&(a=o="1");var c=new v(this.dCtx.ctx),d=c.getTextRects(o,e.config.xaxis.labels.style.fontSize),h=d;if(o!==a&&(h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),(t={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height}).width*n.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};d=u(o),o!==a&&(h=u(a)),t.height=(d.height>h.height?d.height:h.height)/1.5,t.width=d.width>h.width?d.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasGroups)return{width:0,height:0};var n,i=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,r=e.globals.groups.map((function(t){return t.title})),o=p.getLargestStringFromArr(r),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,r),s=new v(this.dCtx.ctx),l=s.getTextRects(o,i),c=l;return o!==a&&(c=s.getTextRects(a,i)),n={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(n={width:0,height:0}),{width:n.width,height:n.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,n=0;if(void 0!==t.config.xaxis.title.text){var i=new v(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,n=i.height}return{width:e,height:n}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var n=this.dCtx.timescaleLabels.map((function(t){return t.value})),i=n.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new v(this.dCtx.ctx).getTextRects(i,e.config.xaxis.labels.style.fontSize)).width*n.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,n=this.w,i=n.globals,r=n.config,o=r.xaxis.type,a=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var s=n.config.yaxis[0].opposite&&n.globals.isBarHorizontal,l=function(t,s){(function(t){return-1!==i.collapsedSeriesIndices.indexOf(t)})(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+a/1.75-e.dCtx.yAxisWidthRight,c=s.position-a/1.75+e.dCtx.yAxisWidthLeft,d="right"===n.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>i.svgWidth-i.translateX-d&&(i.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==r.chart.type&&"candlestick"!==r.chart.type&&"rangeBar"!==r.chart.type&&"boxPlot"!==r.chart.type?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===o?e.dCtx.gridPad.rightString(s.niceMax).length?d:s.niceMax,u=c(h,{seriesIndex:a,dataPointIndex:-1,w:e}),f=u;if(void 0!==u&&0!==u.length||(u=h),e.globals.isBarHorizontal){i=0;var g=e.globals.labels.slice();u=c(u=p.getLargestStringFromArr(g),{seriesIndex:a,dataPointIndex:-1,w:e}),f=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,g)}var m=new v(t.dCtx.ctx),y="rotate(".concat(o.labels.rotate," 0 0)"),b=m.getTextRects(u,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1),x=b;u!==f&&(x=m.getTextRects(f,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1)),n.push({width:(l>x.width||l>b.width?l:x.width>b.width?x.width:b.width)+i,height:x.height>b.height?x.height:b.height})}else n.push({width:0,height:0})})),n}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,n=[];return e.config.yaxis.map((function(e,i){if(e.show&&void 0!==e.title.text){var r=new v(t.dCtx.ctx),o="rotate(".concat(e.title.rotate," 0 0)"),a=r.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,o,!1);n.push({width:a.width,height:a.height})}else n.push({width:0,height:0})})),n}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,n=0,i=0,r=t.globals.yAxisScale.length>1?10:0,o=new Y(this.dCtx.ctx),a=function(a,s){var l=t.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+r,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-a.width-r)):c=l||o.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?i+=c:n+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){a(t,e)})),t.globals.yTitleCoords.map((function(t,e){a(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=n,this.dCtx.yAxisWidthRight=i,e}}]),t}(),ot=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w;if(e.globals.noData||e.globals.allSeriesCollapsed)return 0;var n=function(t){return"bar"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t},i=e.config.chart.type,r=0,o=n(i)?e.config.series.length:1;if(e.globals.comboBarCount>0&&(o=e.globals.comboBarCount),e.globals.collapsedSeries.forEach((function(t){n(t.type)&&(o-=1)})),e.config.chart.stacked&&(o=1),(n(i)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&o>0){var a,s,l=Math.abs(e.globals.initialMaxX-e.globals.initialMinX);l<=3&&(l=e.globals.dataPoints),a=l/t,e.globals.minXDiff&&e.globals.minXDiff/a>0&&(s=e.globals.minXDiff/a),s>t/2&&(s/=2),(r=s/o*parseInt(e.config.plotOptions.bar.columnWidth,10)/100)<1&&(r=1),r=r/(o>1?1:1.5)+5,e.globals.barPadForNumericAxis=r}return r}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,n=e.globals,i=this.dCtx.isSparkline||!e.globals.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==e.config[n].text?i+=e.config[n].margin:i+=t.dCtx.isSparkline||!e.globals.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||e.globals.axisCharts||(i+=10);var r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");n.gridHeight=n.gridHeight-r.height-o.height-i,n.translateY=n.translateY+r.height+o.height+i}},{key:"setGridXPosForDualYAxis",value:function(t,e){var n=this.w,i=new Y(this.dCtx.ctx);n.config.yaxis.map((function(r,o){-1!==n.globals.ignoreYAxisIndexes.indexOf(o)||r.floating||i.isYAxisHidden(o)||(r.opposite&&(n.globals.translateX=n.globals.translateX-(e[o].width+t[o].width)-parseInt(n.config.yaxis[o].labels.style.fontSize,10)/1.2-12),n.globals.translateX<2&&(n.globals.translateX=2))}))}}]),t}(),at=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new nt(this),this.dimYAxis=new rt(this),this.dimXAxis=new it(this),this.dimGrid=new ot(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return o(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,n=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);a=!0);}catch(t){s=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),i=n[0],r=n[1];t.gridPad[i]=Math.max(r,t.w.globals.markers.largestSize/1.5)})),n.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),n.gridHeight=n.gridHeight-this.gridPad.top-this.gridPad.bottom,n.gridWidth=n.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var i=this.dimGrid.gridPadForColumnsInNumericAxis(n.gridWidth);n.gridWidth=n.gridWidth-2*i,n.translateX=n.translateX+this.gridPad.left+this.xPadLeft+(i>0?i+4:0),n.translateY=n.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,n=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,n){e.globals.yLabelsCoords.push({width:i[n].width,index:n}),e.globals.yTitleCoords.push({width:r[n].width,index:n})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,s,a),n.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,n.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(n.rotateXLabels=!1,n.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),n.translateXAxisY=n.translateXAxisY+e.config.xaxis.labels.offsetY,n.translateXAxisX=n.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;n.xAxisLabelsHeight=this.xAxisHeight-s.height,n.xAxisGroupLabelsHeight=n.xAxisLabelsHeight-o.height,n.xAxisLabelsWidth=this.xAxisWidth,n.xAxisHeight=this.xAxisHeight;var d=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=n.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,d=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(o);var h=function(){n.translateX=l,n.gridHeight=n.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),n.gridWidth=n.svgWidth-l};switch("top"===e.config.xaxis.position&&(d=n.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":n.translateY=d,h();break;case"top":n.translateY=this.lgRect.height+d,h();break;case"left":n.translateY=d,n.translateX=this.lgRect.width+l,n.gridHeight=n.svgHeight-c-12,n.gridWidth=n.svgWidth-this.lgRect.width-l;break;case"right":n.translateY=d,n.translateX=l,n.gridHeight=n.svgHeight-c-12,n.gridWidth=n.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(r,i),new q(this.ctx).setYAxisXPosition(i,r)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,n=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);var r="pie"===n.chart.type||"polarArea"===n.chart.type||"donut"===n.chart.type?"pie":"radialBar",o=n.plotOptions[r].offsetY,a=n.plotOptions[r].offsetX;if(!n.legend.show||n.legend.floating)return e.gridHeight=e.svgHeight-n.grid.padding.left+n.grid.padding.right,e.gridWidth=e.gridHeight,e.translateY=o,void(e.translateX=a+(e.svgWidth-e.gridWidth)/2);switch(n.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=o-10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+o+10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-i,e.gridHeight="auto"!==n.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+this.lgRect.width+i;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-i-5,e.gridHeight="auto"!==n.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,n){var i=this.w,r=i.globals.hasGroups?2:1,o=n.height+t.height+e.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,s=i.globals.rotateXLabels?22:10,l=i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*a+r*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeightd&&(this.yAxisWidth=d)}}]),t}(),st=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return o(t,[{key:"getLegendStyles",value:function(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return t.appendChild(e),t}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){var t=this.w.globals;t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject");var e=t.dom.elLegendForeign;e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",t.svgWidth),e.setAttribute("height",t.svgHeight),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.appendChild(t.dom.elLegendWrap),e.appendChild(this.getLegendStyles()),t.dom.Paper.node.insertBefore(e,t.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(t,e){var n=this,i=this.w;if(i.globals.axisCharts||"radialBar"===i.config.chart.type){i.globals.resized=!0;var r=null,o=null;i.globals.risingSeries=[],i.globals.axisCharts?(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),o=parseInt(r.getAttribute("data:realIndex"),10)):(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),o=parseInt(r.getAttribute("rel"),10)-1),e?[{cs:i.globals.collapsedSeries,csi:i.globals.collapsedSeriesIndices},{cs:i.globals.ancillaryCollapsedSeries,csi:i.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){n.riseCollapsedSeries(t.cs,t.csi,o)})):this.hideSeries({seriesEl:r,realIndex:o})}else{var a=i.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),s=i.config.chart.type;if("pie"===s||"polarArea"===s||"donut"===s){var l=i.config.plotOptions.pie.donut.labels;new v(this.lgCtx.ctx).pathMouseDown(a.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(a.members[0].node,l)}a.fire("click")}}},{key:"hideSeries",value:function(t){var e=t.seriesEl,n=t.realIndex,i=this.w,r=p.clone(i.config.series);if(i.globals.axisCharts){var o=!1;if(i.config.yaxis[n]&&i.config.yaxis[n].show&&i.config.yaxis[n].showAlways&&(o=!0,i.globals.ancillaryCollapsedSeriesIndices.indexOf(n)<0&&(i.globals.ancillaryCollapsedSeries.push({index:n,data:r[n].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),i.globals.ancillaryCollapsedSeriesIndices.push(n))),!o){i.globals.collapsedSeries.push({index:n,data:r[n].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),i.globals.collapsedSeriesIndices.push(n);var a=i.globals.risingSeries.indexOf(n);i.globals.risingSeries.splice(a,1)}}else i.globals.collapsedSeries.push({index:n,data:r[n]}),i.globals.collapsedSeriesIndices.push(n);for(var s=e.childNodes,l=0;l0){for(var o=0;o-1&&(t[i].data=[])})):t.forEach((function(n,i){e.globals.collapsedSeriesIndices.indexOf(i)>-1&&(t[i]=0)})),t}}]),t}(),lt=function(){function t(e,n){i(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new st(this)}return o(t,[{key:"init",value:function(){var t=this.w,e=t.globals,n=t.config;if((n.legend.showForSingleSeries&&1===e.series.length||this.isBarsDistributed||e.series.length>1||!e.axisCharts)&&n.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),p.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===n.legend.position||"top"===n.legend.position?this.legendAlignHorizontal():"right"!==n.legend.position&&"left"!==n.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var t=this,e=this.w,n=e.config.legend.fontFamily,i=e.globals.seriesNames,r=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var o=e.config.plotOptions.heatmap.colorScale.ranges;i=o.map((function(t){return t.name?t.name:t.from+" - "+t.to})),r=o.map((function(t){return t.color}))}else this.isBarsDistributed&&(i=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(i=e.config.legend.customLegendItems);for(var a=e.globals.legendFormatter,s=e.config.legend.inverseOrder,l=s?i.length-1:0;s?l>=0:l<=i.length-1;s?l--:l++){var c=a(i[l],{seriesIndex:l,w:e}),d=!1,h=!1;if(e.globals.collapsedSeries.length>0)for(var u=0;u0)for(var f=0;f0?l-10:0)+(c>0?c-10:0)}i.style.position="absolute",o=o+t+n.config.legend.offsetX,a=a+e+n.config.legend.offsetY,i.style.left=o+"px",i.style.top=a+"px","bottom"===n.config.legend.position?(i.style.top="auto",i.style.bottom=5-n.config.legend.offsetY+"px"):"right"===n.config.legend.position&&(i.style.left="auto",i.style.right=25+n.config.legend.offsetX+"px"),["width","height"].forEach((function(t){i.style[t]&&(i.style[t]=parseInt(n.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var e=this.legendHelpers.getLegendBBox(),n=new at(this.ctx),i=n.dimHelpers.getTitleSubtitleCoords("title"),r=n.dimHelpers.getTitleSubtitleCoords("subtitle"),o=0;"bottom"===t.config.legend.position?o=-e.clwh/1.8:"top"===t.config.legend.position&&(o=i.height+r.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,o)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendBBox(),n=0;"left"===t.config.legend.position&&(n=20),"right"===t.config.legend.position&&(n=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(n,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,n=t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(n){var i=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new E(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&n&&new E(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var n=parseInt(t.target.getAttribute("rel"),10)-1,i="true"===t.target.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"==typeof r&&r(this.ctx,n,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,n,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,n,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,n,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(n,i)}}}]),t}(),ct=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return o(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,n=function(){return document.createElement("div")},i=n();if(i.setAttribute("class","apexcharts-toolbar"),i.style.top=e.config.chart.toolbar.offsetY+"px",i.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(i),this.elZoom=n(),this.elZoomIn=n(),this.elZoomOut=n(),this.elPan=n(),this.elSelection=n(),this.elZoomReset=n(),this.elMenuIcon=n(),this.elMenu=n(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var r=0;r\n \n \n\n'),a("zoomOut",this.elZoomOut,'\n \n \n\n');var s=function(n){t.t[n]&&e.config.chart[n].enabled&&o.push({el:"zoom"===n?t.elZoom:t.elSelection,icon:"string"==typeof t.t[n]?t.t[n]:"zoom"===n?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===n?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(n,"-icon")})};s("zoom"),s("selection"),this.t.pan&&e.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,'\n \n \n'),this.t.download&&o.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l0&&e.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var n=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i={x:n,y:0,width:t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-n,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,n=t.y,i=t.width,r=t.height,o=t.translateX,a=void 0===o?0:o,s=t.translateY,l=void 0===s?0:s,c=this.w,d=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var u={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(i<0&&(i=1),d.attr({x:e,y:n,width:i,height:r,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),v.setAttrs(d.node,u)),c.globals.selectionEnabled&&(h.attr({x:e,y:n,width:i>0?i:0,height:r>0?r:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),v.setAttrs(h.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e,n=t.context,i=t.zoomtype,r=this.w,o=n,a=this.gridRect.getBoundingClientRect(),s=o.startX-1,l=o.startY,c=!1,d=!1,h=o.clientX-a.left-s,u=o.clientY-a.top-l;return Math.abs(h+s)>r.globals.gridWidth?h=r.globals.gridWidth-s:o.clientX-a.left<0&&(h=s),s>o.clientX-a.left&&(c=!0,h=Math.abs(h)),l>o.clientY-a.top&&(d=!0,u=Math.abs(u)),e="x"===i?{x:c?s-h:s,y:0,width:h,height:r.globals.gridHeight}:"y"===i?{x:0,y:d?l-u:l,width:r.globals.gridWidth,height:u}:{x:c?s-h:s,y:d?l-u:l,width:h,height:u},o.drawSelectionRect(e),o.selectionDragging("resizing"),e}},{key:"selectionDragging",value:function(t,e){var n=this,i=this.w,r=this.xyRatios,o=this.selectionRect,a=0;"resizing"===t&&(a=30);var s=function(t){return parseFloat(o.node.getAttribute(t))},l={x:s("x"),y:s("y"),width:s("width"),height:s("height")};i.globals.selection=l,"function"==typeof i.config.chart.events.selection&&i.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t=n.gridRect.getBoundingClientRect(),e=o.node.getBoundingClientRect(),a={xaxis:{min:i.globals.xAxisScale.niceMin+(e.left-t.left)*r.xRatio,max:i.globals.xAxisScale.niceMin+(e.right-t.left)*r.xRatio},yaxis:{min:i.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*r.yRatio[0],max:i.globals.yAxisScale[0].niceMax-(e.top-t.top)*r.yRatio[0]}};i.config.chart.events.selection(n.ctx,a),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(n.ctx,a)}),a))}},{key:"selectionDrawn",value:function(t){var e=t.context,n=t.zoomtype,i=this.w,r=e,o=this.xyRatios,a=this.ctx.toolbar;if(r.startX>r.endX){var s=r.startX;r.startX=r.endX,r.endX=s}if(r.startY>r.endY){var l=r.startY;r.startY=r.endY,r.endY=l}var c=void 0,d=void 0;i.globals.isRangeBar?(c=i.globals.yAxisScale[0].niceMin+r.startX*o.invertedYRatio,d=i.globals.yAxisScale[0].niceMin+r.endX*o.invertedYRatio):(c=i.globals.xAxisScale.niceMin+r.startX*o.xRatio,d=i.globals.xAxisScale.niceMin+r.endX*o.xRatio);var h=[],u=[];if(i.config.yaxis.forEach((function(t,e){h.push(i.globals.yAxisScale[e].niceMax-o.yRatio[e]*r.startY),u.push(i.globals.yAxisScale[e].niceMax-o.yRatio[e]*r.endY)})),r.dragged&&(r.dragX>10||r.dragY>10)&&c!==d)if(i.globals.zoomEnabled){var f=p.clone(i.globals.initialConfig.yaxis),g=p.clone(i.globals.initialConfig.xaxis);if(i.globals.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),d=Math.floor(d),c<1&&(c=1,d=i.globals.dataPoints),d-c<2&&(d=c+1)),"xy"!==n&&"x"!==n||(g={min:c,max:d}),"xy"!==n&&"y"!==n||f.forEach((function(t,e){f[e].min=u[e],f[e].max=h[e]})),i.config.chart.zoom.autoScaleYaxis){var m=new X(r.ctx);f=m.autoScaleY(r.ctx,f,{xaxis:g})}if(a){var v=a.getBeforeZoomRange(g,f);v&&(g=v.xaxis?v.xaxis:g,f=v.yaxis?v.yaxis:f)}var y={xaxis:g};i.config.chart.group||(y.yaxis=f),r.ctx.updateHelpers._updateOptions(y,!1,r.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof i.config.chart.events.zoomed&&a.zoomCallback(g,f)}else if(i.globals.selectionEnabled){var b,x=null;b={min:c,max:d},"xy"!==n&&"y"!==n||(x=p.clone(i.config.yaxis)).forEach((function(t,e){x[e].min=u[e],x[e].max=h[e]})),i.globals.selection=r.selection,"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(r.ctx,{xaxis:b,yaxis:x})}}},{key:"panDragging",value:function(t){var e=t.context,n=this.w,i=e;if(void 0!==n.globals.lastClientPosition.x){var r=n.globals.lastClientPosition.x-i.clientX,o=n.globals.lastClientPosition.y-i.clientY;Math.abs(r)>Math.abs(o)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(o)&&r<0?this.moveDirection="right":Math.abs(o)>Math.abs(r)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(r)&&o<0&&(this.moveDirection="down")}n.globals.lastClientPosition={x:i.clientX,y:i.clientY};var a=n.globals.isRangeBar?n.globals.minY:n.globals.minX,s=n.globals.isRangeBar?n.globals.maxY:n.globals.maxX;n.config.xaxis.convertedCatToNumeric||i.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,n=t.globals.maxX,i=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+i,n=t.globals.maxX+i):"right"===this.moveDirection&&(e=t.globals.minX-i,n=t.globals.maxX-i),e=Math.floor(e),n=Math.floor(n),this.updateScrolledChart({xaxis:{min:e,max:n}},e,n)}},{key:"panScrolled",value:function(t,e){var n=this.w,i=this.xyRatios,r=p.clone(n.globals.initialConfig.yaxis),o=i.xRatio,a=n.globals.minX,s=n.globals.maxX;n.globals.isRangeBar&&(o=i.invertedYRatio,a=n.globals.minY,s=n.globals.maxY),"left"===this.moveDirection?(t=a+n.globals.gridWidth/15*o,e=s+n.globals.gridWidth/15*o):"right"===this.moveDirection&&(t=a-n.globals.gridWidth/15*o,e=s-n.globals.gridWidth/15*o),n.globals.isRangeBar||(tn.globals.initialMaxX)&&(t=a,e=s);var l={min:t,max:e};n.config.chart.zoom.autoScaleYaxis&&(r=new X(this.ctx).autoScaleY(this.ctx,r,{xaxis:l}));var c={xaxis:{min:t,max:e}};n.config.chart.group||(c.yaxis=r),this.updateScrolledChart(c,t,e)}},{key:"updateScrolledChart",value:function(t,e,n){var i=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled&&i.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:n}})}}]),n}(ct),ht=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return o(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,n=t.elGrid,i=t.clientX,r=t.clientY,o=this.w,a=n.getBoundingClientRect(),s=a.width,l=a.height,c=s/(o.globals.dataPoints-1),d=l/o.globals.dataPoints,h=this.hasBars();!o.globals.comboCharts&&!h||o.config.xaxis.convertedCatToNumeric||(c=s/o.globals.dataPoints);var u=i-a.left-o.globals.barPadForNumericAxis,f=r-a.top;u<0||f<0||u>s||f>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):o.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):o.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(u/c),m=Math.floor(f/d);h&&!o.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(u/c),g-=1);var v=null,y=null,b=[],x=[];if(o.globals.seriesXvalues.forEach((function(t){b.push([t[0]+1e-6].concat(t))})),o.globals.seriesYvalues.forEach((function(t){x.push([t[0]+1e-6].concat(t))})),b=b.map((function(t){return t.filter((function(t){return p.isNumber(t)}))})),x=x.map((function(t){return t.filter((function(t){return p.isNumber(t)}))})),o.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),_=u*(w.width/s),k=f*(w.height/l);v=(y=this.closestInMultiArray(_,k,b,x)).index,g=y.j,null!==v&&(b=o.globals.seriesXvalues[v],g=(y=this.closestInArray(_,b)).index)}return o.globals.capturedSeriesIndex=null===v?-1:v,(!g||g<1)&&(g=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=m:o.globals.capturedDataPointIndex=g,{capturedSeries:v,j:o.globals.isBarHorizontal?m:g,hoverX:u,hoverY:f}}},{key:"closestInMultiArray",value:function(t,e,n,i){var r=this.w,o=0,a=null,s=-1;r.globals.series.length>1?o=this.getFirstActiveXArray(n):a=0;var l=n[o][0],c=Math.abs(t-l);if(n.forEach((function(e){e.forEach((function(e,n){var i=Math.abs(t-e);i0?e:-1})),r=0;r0)for(var i=0;in?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,n=e.config.markers.hover.size;return void 0===n&&(n=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),n}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,n=this.ttCtx;0===n.allTooltipSeriesGroups.length&&(n.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=n.allTooltipSeriesGroups,r=0;r ').concat(n.attrs.name,""),e+="
    ".concat(n.val,"
    ")})),y.innerHTML=t+"",b.innerHTML=e+""};a?l.globals.seriesGoals[e][n]&&Array.isArray(l.globals.seriesGoals[e][n])?x():(y.innerHTML="",b.innerHTML=""):x()}else y.innerHTML="",b.innerHTML="";null!==p&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),a&&g[0]&&(null==d||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var n=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");n&&(n.classList.add("apexcharts-active"),n.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,n=t.j,i=this.w,r=this.ctx.series.filteredSeriesX(),o="",a="",s=null,l=null,c={series:i.globals.series,seriesIndex:e,dataPointIndex:n,w:i},d=i.globals.ttZFormatter;null===n?l=i.globals.series[e]:i.globals.isXNumeric&&"treemap"!==i.config.chart.type?(o=r[e][n],0===r[e].length&&(o=r[this.tooltipUtil.getFirstActiveXArray(r)][n])):o=void 0!==i.globals.labels[n]?i.globals.labels[n]:"";var h=o;return o=i.globals.isXNumeric&&"datetime"===i.config.xaxis.type?new z(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new L(this.ctx).formatDate,w:this.w}):i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,c):i.globals.xLabelFormatter(h,c),void 0!==i.config.tooltip.x.formatter&&(o=i.globals.ttKeyFormatter(h,c)),i.globals.seriesZ.length>0&&i.globals.seriesZ[e].length>0&&(s=d(i.globals.seriesZ[e][n],i)),a="function"==typeof i.config.xaxis.tooltip.formatter?i.globals.xaxisTooltipFormatter(h,c):o,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,n=t.j,i=t.y1,r=t.y2,o=t.w,a=this.ttCtx.getElTooltip(),s=o.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]),a.innerHTML=s({ctx:this.ctx,series:o.globals.series,seriesIndex:e,dataPointIndex:n,y1:i,y2:r,w:o})}}]),t}(),ft=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return o(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.ttCtx,i=this.w,r=n.getElXCrosshairs(),o=t-n.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(null!==e&&(o=i.globals.gridWidth/a*e),null===r||i.globals.isBarHorizontal||(r.setAttribute("x",o),r.setAttribute("x1",o),r.setAttribute("x2",o),r.setAttribute("y2",i.globals.gridHeight),r.classList.add("apexcharts-active")),o<0&&(o=0),o>i.globals.gridWidth&&(o=i.globals.gridWidth),n.isXAxisTooltipEnabled){var s=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(s=o+n.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&v.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&v.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,n=this.ttCtx;if(null!==n.xaxisTooltip&&0!==n.xcrosshairsWidth){n.xaxisTooltip.classList.add("apexcharts-active");var i,r=n.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=n.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t))t+=e.globals.translateX,i=new v(this.ctx).getTextRects(n.xaxisTooltipText.innerHTML),n.xaxisTooltipText.style.minWidth=i.width+"px",n.xaxisTooltip.style.left=t+"px",n.xaxisTooltip.style.top=r+"px"}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,n=this.ttCtx;null===n.yaxisTTEls&&(n.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(n.ycrosshairsHidden.getAttribute("y1"),10),r=e.globals.translateY+i,o=n.yaxisTTEls[t].getBoundingClientRect().height,a=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(a-=26),r-=o/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(n.yaxisTTEls[t].classList.add("apexcharts-active"),n.yaxisTTEls[t].style.top=r+"px",n.yaxisTTEls[t].style.left=a+e.config.yaxis[t].tooltip.offsetX+"px"):n.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,r=this.ttCtx,o=r.getElTooltip(),a=r.tooltipRect,s=null!==n?parseFloat(n):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>i.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>i.globals.gridWidth-a.ttWidth-10&&(l=i.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){var d=r.getElGrid().getBoundingClientRect();c=r.e.clientY+i.globals.translateY-d.top-a.ttHeight/2}else i.globals.isBarHorizontal||(a.ttHeight/2+c>i.globals.gridHeight&&(c=i.globals.gridHeight-a.ttHeight+i.globals.translateY),c<0&&(c=0));isNaN(l)||(l+=i.globals.translateX,o.style.left=l+"px",o.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var n=this.w,i=this.ttCtx;if(n.globals.markers.size[t]>0)for(var r=n.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),o=0;o0&&(c.setAttribute("r",s),c.setAttribute("cx",n),c.setAttribute("cy",i)),this.moveXCrosshairs(n),o.fixedTooltip||this.moveTooltip(n,i,s)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,n=this.ttCtx,i=n.w,r=0,o=0,a=i.globals.pointsArray;e=new E(this.ctx).getActiveConfigSeriesIndex(!0);var s=n.tooltipUtil.getHoverMarkerSize(e);a[e]&&(r=a[e][t][0],o=a[e][t][1]);var l=n.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c0?(l[c]&&l[c].setAttribute("r",s),l[c]&&l[c].setAttribute("cy",h)):l[c]&&l[c].setAttribute("r",0)}}if(this.moveXCrosshairs(r),!n.fixedTooltip){var u=o||i.globals.gridHeight;this.moveTooltip(r,u,s)}}},{key:"moveStickyTooltipOverBars",value:function(t){var e=this.w,n=this.ttCtx,i=e.globals.columnSeries?e.globals.columnSeries.length:e.globals.series.length,r=i>=2&&i%2==0?Math.floor(i/2):Math.floor(i/2)+1;e.globals.isBarHorizontal&&(r=new E(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var o=e.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']")),a=o?parseFloat(o.getAttribute("cx")):0,s=o?parseFloat(o.getAttribute("cy")):0,l=o?parseFloat(o.getAttribute("barWidth")):0,c=o?parseFloat(o.getAttribute("barHeight")):0,d=n.getElGrid().getBoundingClientRect(),h=o.classList.contains("apexcharts-candlestick-area")||o.classList.contains("apexcharts-boxPlot-area");if(e.globals.isXNumeric?(o&&!h&&(a-=i%2!=0?l/2:0),o&&h&&e.globals.comboCharts&&(a-=l/2)):e.globals.isBarHorizontal||(a=n.xAxisTicksPositions[t-1]+n.dataPointsDividedWidth/2,isNaN(a)&&(a=n.xAxisTicksPositions[t]-n.dataPointsDividedWidth/2)),e.globals.isBarHorizontal?(s>e.globals.gridHeight/2&&(s-=n.tooltipRect.ttHeight),(s=s+e.config.grid.padding.top+c/3)+c>e.globals.gridHeight&&(s=e.globals.gridHeight-c)):e.config.tooltip.followCursor?s=n.e.clientY-d.top-n.tooltipRect.ttHeight/2:s+n.tooltipRect.ttHeight+15>e.globals.gridHeight&&(s=e.globals.gridHeight),s<-10&&(s=-10),e.globals.isBarHorizontal||this.moveXCrosshairs(a),!n.fixedTooltip){var u=s||e.globals.gridHeight;this.moveTooltip(a,u)}}}]),t}(),pt=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new ft(e)}return o(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new v(this.ctx),n=new T(this.ctx),i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");i=h(i),t.config.chart.stacked&&i.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w;"bubble"!==r.config.chart.type&&this.newPointSize(t,e);var o=e.getAttribute("cx"),a=e.getAttribute("cy");if(null!==n&&null!==i&&(o=n,a=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===r.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(o,a,r.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,n=this,i=this.ttCtx,r=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=e.config.markers.hover.size,s=0;s=0?t[e].setAttribute("r",n):t[e].setAttribute("r",0)}}}]),t}(),gt=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e}return o(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,n=t.opt,i=t.x,r=t.y,o=t.type,a=this.ttCtx,s=this.w;if(e.target.classList.contains("apexcharts-".concat(o,"-rect"))){var l=this.getAttr(e,"i"),c=this.getAttr(e,"j"),d=this.getAttr(e,"cx"),h=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),f=this.getAttr(e,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:l,j:c,shared:!1,e:e}),s.globals.capturedSeriesIndex=l,s.globals.capturedDataPointIndex=c,i=d+a.tooltipRect.ttWidth/2+u,r=h+a.tooltipRect.ttHeight/2-f/2,a.tooltipPosition.moveXCrosshairs(d+u/2),i>s.globals.gridWidth/2&&(i=d-a.tooltipRect.ttWidth/2+u),a.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();i=s.globals.clientX-p.left-(i>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),r=s.globals.clientY-p.top-(r>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:r}}},{key:"handleMarkerTooltip",value:function(t){var e,n,i=t.e,r=t.opt,o=t.x,a=t.y,s=this.w,l=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var c=parseInt(r.paths.getAttribute("cx"),10),d=parseInt(r.paths.getAttribute("cy"),10),h=parseFloat(r.paths.getAttribute("val"));if(n=parseInt(r.paths.getAttribute("rel"),10),e=parseInt(r.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=p.findAncestor(r.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:e,j:n,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:i}),"mouseup"===i.type&&l.markerClick(i,e,n),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=n,o=c,a=d+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-f.top}h<0&&(a=d),l.marker.enlargeCurrentPoint(n,r.paths,o,a)}return{x:o,y:a}}},{key:"handleBarTooltip",value:function(t){var e,n,i=t.e,r=t.opt,o=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,d=0,h=this.getBarTooltipXY({e:i,opt:r});e=h.i;var u=h.barHeight,f=h.j;o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=f,o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!o.config.tooltip.shared?(c=h.x,d=h.y,n=Array.isArray(o.config.stroke.width)?o.config.stroke.width[e]:o.config.stroke.width,l=c):o.globals.comboCharts||o.config.tooltip.shared||(l/=2),isNaN(d)?d=o.globals.svgHeight-a.tooltipRect.ttHeight:d<0&&(d=0);var p=parseInt(r.paths.parentNode.getAttribute("data:realIndex"),10),g=o.globals.isMultipleYAxis?o.config.yaxis[p]&&o.config.yaxis[p].reversed:o.config.yaxis[0].reversed;if(c+a.tooltipRect.ttWidth>o.globals.gridWidth&&!g?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var m=a.getElGrid().getBoundingClientRect();d=a.e.clientY-m.top}null===a.tooltip&&(a.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+n/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(g&&(c-=a.tooltipRect.ttWidth)<0&&(c=0),!g||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||(d=d+u-2*(o.globals.series[e][f]<0?u:0)),a.tooltipRect.ttHeight+d>o.globals.gridHeight?d=o.globals.gridHeight-a.tooltipRect.ttHeight+o.globals.translateY:(d=d+o.globals.translateY-a.tooltipRect.ttHeight/2)<0&&(d=0),s.style.left=c+o.globals.translateX+"px",s.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(t){var e=t.e,n=t.opt,i=this.w,r=null,o=this.ttCtx,a=0,s=0,l=0,c=0,d=0,h=e.target.classList;if(h.contains("apexcharts-bar-area")||h.contains("apexcharts-candlestick-area")||h.contains("apexcharts-boxPlot-area")||h.contains("apexcharts-rangebar-area")){var u=e.target,f=u.getBoundingClientRect(),p=n.elGrid.getBoundingClientRect(),g=f.height;d=f.height;var m=f.width,v=parseInt(u.getAttribute("cx"),10),y=parseInt(u.getAttribute("cy"),10);c=parseFloat(u.getAttribute("barWidth"));var b="touchmove"===e.type?e.touches[0].clientX:e.clientX;r=parseInt(u.getAttribute("j"),10),a=parseInt(u.parentNode.getAttribute("rel"),10)-1;var x=u.getAttribute("data-range-y1"),w=u.getAttribute("data-range-y2");i.globals.comboCharts&&(a=parseInt(u.parentNode.getAttribute("data:realIndex"),10)),o.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:a,j:r,y1:x?parseInt(x,10):null,y2:w?parseInt(w,10):null,shared:!o.showOnIntersect&&i.config.tooltip.shared,e:e}),i.config.tooltip.followCursor?i.globals.isBarHorizontal?(s=b-p.left+15,l=y-o.dataPointsDividedHeight+g/2-o.tooltipRect.ttHeight/2):(s=i.globals.isXNumeric?v-m/2:v-o.dataPointsDividedWidth+m/2,l=e.clientY-p.top-o.tooltipRect.ttHeight/2-15):i.globals.isBarHorizontal?((s=v)0&&n.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,n){var i=this.ttCtx,r=this.w,o=r.globals.yLabelFormatters[t];if(i.yaxisTooltips[t]){var a=i.getElGrid().getBoundingClientRect(),s=(e-a.top)*n.yRatio[t],l=r.globals.maxYArr[t]-r.globals.minYArr[t],c=r.globals.minYArr[t]+(l-s);i.tooltipPosition.moveYCrosshairs(e-a.top),i.yaxisTooltipText[t].innerHTML=o(c),i.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),vt=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new ht(this),this.tooltipLabels=new ut(this),this.tooltipPosition=new ft(this),this.marker=new pt(this),this.intersect=new gt(this),this.axesTooltip=new mt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return o(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,n){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var n=document.createElement("div");if(n.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&n.classList.add(e.config.tooltip.cssClass),n.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(n),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var i=new $(this.ctx);this.xAxisTicksPositions=i.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,n.appendChild(this.tooltipTitle));var r=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,n=this.w,i=[],r=this.getElTooltip(),o=function(o){var a=document.createElement("div");a.classList.add("apexcharts-tooltip-series-group"),a.style.order=n.config.tooltip.inverseOrder?t-o:o+1,e.tConfig.shared&&e.tConfig.enabledOnSeries&&Array.isArray(e.tConfig.enabledOnSeries)&&e.tConfig.enabledOnSeries.indexOf(o)<0&&a.classList.add("apexcharts-tooltip-series-group-hidden");var s=document.createElement("span");s.classList.add("apexcharts-tooltip-marker"),s.style.backgroundColor=n.globals.colors[o],a.appendChild(s);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||n.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var n=document.createElement("span");n.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(n);var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(i),l.appendChild(e)})),a.appendChild(l),r.appendChild(a),i.push(a)},a=0;a0&&this.addPathsEventListeners(f,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),n=e.getBoundingClientRect(),i=n.width+10,r=n.height+10,o=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),s.indexOf("bottom")>-1&&(a=a+t.globals.svgHeight-r-10),e.style.left=o+"px",e.style.top=a+"px",{x:o,y:a,ttWidth:i,ttHeight:r}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var n=this,i=function(i){var r={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[i].addEventListener(e,n.onSeriesHover.bind(n,r),{capture:!1,passive:!0})}))},r=0;r=100?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){n.seriesHover(t,e)}),100-i))}},{key:"seriesHover",value:function(t,e){var n=this;this.lastHoverTime=Date.now();var i=[],r=this.w;r.config.chart.group&&(i=this.ctx.getGroupedCharts()),r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||0===r.globals.dataPoints)||(i.length?i.forEach((function(i){var r=n.getElTooltip(i),o={paths:t.paths,tooltipEl:r,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===n.w.globals.minX&&i.w.globals.maxX===n.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,n=t.ttCtx,i=t.opt,r=t.e,o=e.w,a=this.getElTooltip();a&&(n.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},n.e=r,!n.tooltipUtil.hasBars()||o.globals.comboCharts||n.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new E(e).toggleSeriesOnHover(r,r.target.parentNode),n.fixedTooltip&&n.drawFixedTooltipRect(),o.globals.axisCharts?n.axisChartsTooltips({e:r,opt:i,tooltipRect:n.tooltipRect}):n.nonAxisChartsTooltips({e:r,opt:i,tooltipRect:n.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,n,i=t.e,r=t.opt,o=this.w,a=r.elGrid.getBoundingClientRect(),s="touchmove"===i.type?i.touches[0].clientX:i.clientX,l="touchmove"===i.type?i.touches[0].clientY:i.clientY;if(this.clientY=l,this.clientX=s,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,la.top+a.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var c=parseInt(r.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(r)}var d=this.getElTooltip(),h=this.getElXCrosshairs(),u=o.globals.xyCharts||"bar"===o.config.chart.type&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===i.type||"touchmove"===i.type||"mouseup"===i.type){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(i,s,l,r);else if("heatmap"===o.config.chart.type||"treemap"===o.config.chart.type){var p=this.intersect.handleHeatTreeTooltip({e:i,opt:r,x:e,y:n,type:o.config.chart.type});e=p.x,n=p.y,d.style.left=e+"px",d.style.top=n+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:r}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:r,x:e,y:n});if(this.yaxisTooltips.length)for(var g=0;gl.width?this.handleMouseOut(i):null!==s?this.handleStickyCapturedSeries(t,s,i,a):(this.tooltipUtil.isXoverlap(a)||r.globals.isBarHorizontal)&&this.create(t,this,0,a,i.ttItems)}},{key:"handleStickyCapturedSeries",value:function(t,e,n,i){var r=this.w;this.tConfig.shared||null!==r.globals.series[e][i]?void 0!==r.globals.series[e][i]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,n.ttItems):this.create(t,this,e,i,n.ttItems,!1):this.tooltipUtil.isXoverlap(i)&&this.create(t,this,0,i,n.ttItems):this.handleMouseOut(n)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new v(this.ctx),n=t.globals.dom.Paper.select(".apexcharts-bar-area"),i=0;i5&&void 0!==arguments[5]?arguments[5]:null,a=this.w,s=e;"mouseup"===t.type&&this.markerClick(t,n,i),null===o&&(o=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),c=this.tooltipUtil.getElBars();if(a.config.legend.tooltipHoverFormatter){var d=a.config.legend.tooltipHoverFormatter,h=Array.from(this.legendLabels);h.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var u=0;u0?s.marker.enlargePoints(i):s.tooltipPosition.moveDynamicPointsOnHover(i)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var y=new v(this.ctx),b=a.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(i);for(var x=0;x0&&(this.totalItems+=t[a].length);for(var s=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,c=0,d=function(o,a){var d=void 0,h=void 0,u=void 0,f=void 0,g=[],m=[],v=r.globals.comboCharts?n[o]:o;i.yRatio.length>1&&(i.yaxisIndex=v),i.isReversed=r.config.yaxis[i.yaxisIndex]&&r.config.yaxis[i.yaxisIndex].reversed;var y=i.graphics.group({class:"apexcharts-series",seriesName:p.escapeString(r.globals.seriesNames[v]),rel:o+1,"data:realIndex":v});i.ctx.series.addCollapsedClassToSeries(y,v);var b=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":v}),x=0,w=0,_=i.initialPositions(l,c,d,h,u,f);c=_.y,x=_.barHeight,h=_.yDivision,f=_.zeroW,l=_.x,w=_.barWidth,d=_.xDivision,u=_.zeroH,i.yArrj=[],i.yArrjF=[],i.yArrjVal=[],i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],1===i.prevY.length&&i.prevY[0].every((function(t){return isNaN(t)}))&&(i.prevY[0]=i.prevY[0].map((function(t){return u})),i.prevYF[0]=i.prevYF[0].map((function(t){return 0})));for(var k=0;k1?(n=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:s*parseInt(l.config.plotOptions.bar.columnWidth,10)/100,r=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=l.globals.padHorizontal+(n-s)/2),{x:t,y:e,yDivision:i,xDivision:n,barHeight:a,barWidth:s,zeroH:r,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var e,n=t.indexes,i=t.barHeight,r=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.yDivision,c=t.elSeries,d=this.w,h=s,u=n.i,f=n.j,p=0,g=0;g0){var m=o;this.prevXVal[u-1][f]<0?m=this.series[u][f]>=0?this.prevX[u-1][f]+p-2*(this.isReversed?p:0):this.prevX[u-1][f]:this.prevXVal[u-1][f]>=0&&(m=this.series[u][f]>=0?this.prevX[u-1][f]:this.prevX[u-1][f]-p+2*(this.isReversed?p:0)),e=m}else e=o;a=null===this.series[u][f]?e:e+this.series[u][f]/this.invertedYRatio-2*(this.isReversed?this.series[u][f]/this.invertedYRatio:0);var v=this.barHelpers.getBarpaths({barYPosition:h,barHeight:i,x1:e,x2:a,strokeWidth:r,series:this.series,realIndex:n.realIndex,i:u,j:f,w:d});return this.barHelpers.barBackground({j:f,i:u,y1:h,y2:i,elSeries:c}),s+=l,{pathTo:v.pathTo,pathFrom:v.pathFrom,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,n=t.x,i=t.y,r=t.xDivision,o=t.barWidth,a=t.zeroH;t.strokeWidth;var s=t.elSeries,l=this.w,c=e.i,d=e.j,h=e.bc;if(l.globals.isXNumeric){var u=l.globals.seriesX[c][d];u||(u=0),n=(u-l.globals.minX)/this.xRatio-o/2}for(var f,p=n,g=0,m=0;m0&&!l.globals.isXNumeric||c>0&&l.globals.isXNumeric&&l.globals.seriesX[c-1][d]===l.globals.seriesX[c][d]){var v,y,b=Math.min(this.yRatio.length+1,c+1);if(void 0!==this.prevY[c-1])for(var x=1;x=0?y-g+2*(this.isReversed?g:0):y;break}if(this.prevYVal[c-w][d]>=0){v=this.series[c][d]>=0?y:y+g-2*(this.isReversed?g:0);break}}void 0===v&&(v=l.globals.gridHeight),f=this.prevYF[0].every((function(t){return 0===t}))&&this.prevYF.slice(1,c).every((function(t){return t.every((function(t){return isNaN(t)}))}))?l.globals.gridHeight-a:v}else f=l.globals.gridHeight-a;i=f-this.series[c][d]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[c][d]/this.yRatio[this.yaxisIndex]:0);var _=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:o,y1:f,y2:i,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:e.realIndex,i:c,j:d,w:l});return this.barHelpers.barBackground({bc:h,j:d,i:c,x1:p,x2:o,elSeries:s}),n+=r,{pathTo:_.pathTo,pathFrom:_.pathFrom,x:l.globals.isXNumeric?n-r:n,y:i}}}]),r}(O),bt=function(t){s(r,t);var n=d(r);function r(){return i(this,r),n.apply(this,arguments)}return o(r,[{key:"draw",value:function(t,n){var i=this,r=this.w,o=new v(this.ctx),a=new A(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal;var s=new y(this.ctx,r);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var l=o.group({class:"apexcharts-".concat(r.config.chart.type,"-series apexcharts-plot-series")}),c=function(s){i.isBoxPlot="boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[s].type;var c,d,h,u,f,g,m=void 0,v=void 0,y=[],b=[],x=r.globals.comboCharts?n[s]:s,w=o.group({class:"apexcharts-series",seriesName:p.escapeString(r.globals.seriesNames[x]),rel:s+1,"data:realIndex":x});i.ctx.series.addCollapsedClassToSeries(w,x),t[s].length>0&&(i.visibleI=i.visibleI+1),i.yRatio.length>1&&(i.yaxisIndex=x);var _=i.barHelpers.initialPositions();v=_.y,f=_.barHeight,d=_.yDivision,u=_.zeroW,m=_.x,g=_.barWidth,c=_.xDivision,h=_.zeroH,b.push(m+g/2);for(var k=o.group({class:"apexcharts-datalabels","data:realIndex":x}),S=function(n){var o=i.barHelpers.getStrokeWidth(s,n,x),l=null,p={indexes:{i:s,j:n,realIndex:x},x:m,y:v,strokeWidth:o,elSeries:w};l=i.isHorizontal?i.drawHorizontalBoxPaths(e(e({},p),{},{yDivision:d,barHeight:f,zeroW:u})):i.drawVerticalBoxPaths(e(e({},p),{},{xDivision:c,barWidth:g,zeroH:h})),v=l.y,m=l.x,n>0&&b.push(m+g/2),y.push(v),l.pathTo.forEach((function(e,c){var d=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?l.color[c]:r.globals.stroke.colors[s],h=a.fillPath({seriesNumber:x,dataPointIndex:n,color:l.color[c],value:t[s][n]});i.renderSeries({realIndex:x,pathFill:h,lineFill:d,j:n,i:s,pathFrom:l.pathFrom,pathTo:e,strokeWidth:o,elSeries:w,x:m,y:v,series:t,barHeight:f,barWidth:g,elDataLabelsWrap:k,visibleSeries:i.visibleI,type:r.config.chart.type})}))},C=0;Cy.c&&(h=!1);var w=Math.min(y.o,y.c),_=Math.max(y.o,y.c),k=y.m;s.globals.isXNumeric&&(n=(s.globals.seriesX[m][d]-s.globals.minX)/this.xRatio-r/2);var S=n+r*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(w=o,_=o):(w=o-w/g,_=o-_/g,b=o-y.h/g,x=o-y.l/g,k=o-y.m/g);var C=l.move(S,o),A=l.move(S+r/2,w);return s.globals.previousPaths.length>0&&(A=this.getPreviousPath(m,d,!0)),C=this.isBoxPlot?[l.move(S,w)+l.line(S+r/2,w)+l.line(S+r/2,b)+l.line(S+r/4,b)+l.line(S+r-r/4,b)+l.line(S+r/2,b)+l.line(S+r/2,w)+l.line(S+r,w)+l.line(S+r,k)+l.line(S,k)+l.line(S,w+a/2),l.move(S,k)+l.line(S+r,k)+l.line(S+r,_)+l.line(S+r/2,_)+l.line(S+r/2,x)+l.line(S+r-r/4,x)+l.line(S+r/4,x)+l.line(S+r/2,x)+l.line(S+r/2,_)+l.line(S,_)+l.line(S,k)+"z"]:[l.move(S,_)+l.line(S+r/2,_)+l.line(S+r/2,b)+l.line(S+r/2,_)+l.line(S+r,_)+l.line(S+r,w)+l.line(S+r/2,w)+l.line(S+r/2,x)+l.line(S+r/2,w)+l.line(S,w)+l.line(S,_-a/2)],A+=l.move(S,w),s.globals.isXNumeric||(n+=i),{pathTo:C,pathFrom:A,x:n,y:_,barXPosition:S,color:this.isBoxPlot?p:h?[u]:[f]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var n=t.y,i=t.yDivision,r=t.barHeight,o=t.zeroW,a=t.strokeWidth,s=this.w,l=new v(this.ctx),c=e.i,d=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,f=e.realIndex,p=this.getOHLCValue(f,d),g=o,m=o,y=Math.min(p.o,p.c),b=Math.max(p.o,p.c),x=p.m;s.globals.isXNumeric&&(n=(s.globals.seriesX[f][d]-s.globals.minX)/this.invertedXRatio-r/2);var w=n+r*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(y=o,b=o):(y=o+y/u,b=o+b/u,g=o+p.h/u,m=o+p.l/u,x=o+p.m/u);var _=l.move(o,w),k=l.move(y,w+r/2);return s.globals.previousPaths.length>0&&(k=this.getPreviousPath(f,d,!0)),_=[l.move(y,w)+l.line(y,w+r/2)+l.line(g,w+r/2)+l.line(g,w+r/2-r/4)+l.line(g,w+r/2+r/4)+l.line(g,w+r/2)+l.line(y,w+r/2)+l.line(y,w+r)+l.line(x,w+r)+l.line(x,w)+l.line(y+a/2,w),l.move(x,w)+l.line(x,w+r)+l.line(b,w+r)+l.line(b,w+r/2)+l.line(m,w+r/2)+l.line(m,w+r-r/4)+l.line(m,w+r/4)+l.line(m,w+r/2)+l.line(b,w+r/2)+l.line(b,w)+l.line(x,w)+"z"],k+=l.move(y,w),s.globals.isXNumeric||(n+=i),{pathTo:_,pathFrom:k,x:b,y:n,barYPosition:w,color:h}}},{key:"getOHLCValue",value:function(t,e){var n=this.w;return{o:this.isBoxPlot?n.globals.seriesCandleH[t][e]:n.globals.seriesCandleO[t][e],h:this.isBoxPlot?n.globals.seriesCandleO[t][e]:n.globals.seriesCandleH[t][e],m:n.globals.seriesCandleM[t][e],l:this.isBoxPlot?n.globals.seriesCandleC[t][e]:n.globals.seriesCandleL[t][e],c:this.isBoxPlot?n.globals.seriesCandleL[t][e]:n.globals.seriesCandleC[t][e]}}}]),r}(O),xt=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,n=t.config.plotOptions[t.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map((function(t,n){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,n,i){var r=this.w,o=1,a=r.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,n);r.globals.hasNegs||i?o=r.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(o=1-s.percent/100,"treemap"===t&&(o=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new p;return r.config.plotOptions[t].enableShades&&(l="dark"===this.w.config.theme.mode?p.hexToRgba(c.shadeColor(-1*o,s.color),r.config.fill.opacity):p.hexToRgba(c.shadeColor(o,s.color),r.config.fill.opacity)),{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,n){var i=this.w,r=i.globals.series[e][n],o=i.config.plotOptions[t],a=o.colorScale.inverse?n:e;o.distributed&&"treemap"===i.config.chart.type&&(a=n);var s=i.globals.colors[a],l=null,c=Math.min.apply(Math,h(i.globals.series[e])),d=Math.max.apply(Math,h(i.globals.series[e]));o.distributed||"heatmap"!==t||(c=i.globals.minY,d=i.globals.maxY),void 0!==o.colorScale.min&&(c=o.colorScale.mini.globals.maxY?o.colorScale.max:i.globals.maxY);var u=Math.abs(d)+Math.abs(c),f=100*r/(0===u?u-1e-6:u);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(r>=t.from&&r<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,d=t.to;var n=Math.abs(d)+Math.abs(c);f=100*r/(0===n?n-1e-6:n)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,n=t.x,i=t.y,r=t.i,o=t.j,a=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new v(this.ctx),d=new I(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var u=l.offsetX,f=l.offsetY,p=n+u,g=i+parseFloat(l.style.fontSize)/3+f;d.plotDataLabelsText({x:p,y:g,text:e,i:r,j:o,color:a.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new v(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),wt=function(){function t(e,n){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new xt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return o(t,[{key:"draw",value:function(t){var e=this.w,n=new v(this.ctx),i=n.group({class:"apexcharts-heatmap"});i.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var r=e.globals.gridWidth/e.globals.dataPoints,o=e.globals.gridHeight/e.globals.series.length,a=0,s=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(s=!0,l.reverse());for(var c=s?0:l.length-1;s?c=0;s?c++:c--){var d=n.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:p.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new m(this.ctx).dropShadow(d,h,c)}for(var u=0,f=e.config.plotOptions.heatmap.shadeIntensity,g=0;g-1&&this.pieClicked(h),n.config.dataLabels.enabled){var k=w.x,S=w.y,C=100*f/this.fullAngle+"%";if(0!==f&&n.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(i+a):i+a=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(s=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(s)>this.fullAngle&&(s-=this.fullAngle);var l=Math.PI*(s-90)/180,c=e.centerX+r*Math.cos(a),d=e.centerY+r*Math.sin(a),h=e.centerX+r*Math.cos(l),u=e.centerY+r*Math.sin(l),f=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,s),g=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,o),m=i>180?1:0,v=["M",c,d,"A",r,r,0,m,1,h,u];return"donut"===e.chartType?[].concat(v,["L",f.x,f.y,"A",e.donutSize,e.donutSize,0,m,0,g.x,g.y,"L",c,d,"z"]).join(" "):"pie"===e.chartType||"polarArea"===e.chartType?[].concat(v,["L",e.centerX,e.centerY,"L",c,d]).join(" "):[].concat(v).join(" ")}},{key:"drawPolarElements",value:function(t){var e=this.w,n=new X(this.ctx),i=new v(this.ctx),r=new _t(this.ctx),o=i.group(),a=i.group(),s=n.niceScale(0,Math.ceil(this.maxY),e.config.yaxis[0].tickAmount,0,!0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var d=e.globals.radialSize,h=d/(c-1),u=0;u1&&t.total.show&&(r=t.total.color);var a=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");n=(0,t.value.formatter)(n,o),i||"function"!=typeof t.total.formatter||(n=t.total.formatter(o));var l=e===t.total.label;e=t.name.formatter(e,l,o),null!==a&&(a.textContent=e),null!==s&&(s.textContent=n),null!==a&&(a.style.fill=r)}},{key:"printDataLabelsInner",value:function(t,e){var n=this.w,i=t.getAttribute("data:value"),r=n.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];n.globals.series.length>1&&this.printInnerLabels(e,r,i,t);var o=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,n=this.w,i=new v(this.ctx),r=n.config.plotOptions.polarArea.spokes;if(0!==r.strokeWidth){for(var o=[],a=360/n.globals.series.length,s=0;s1)a&&!e.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(e,e.total.label,e.total.formatter(r));else if(l({makeSliceOut:!1,printLabel:!0}),!a)if(r.globals.selectedDataPoints.length&&r.globals.series.length>1)if(r.globals.selectedDataPoints[0].length>0){var c=r.globals.selectedDataPoints[0],d=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,e)}else o&&r.globals.selectedDataPoints.length&&0===r.globals.selectedDataPoints[0].length&&(o.style.opacity=0);else o&&r.globals.series.length>1&&(o.style.opacity=0)}}]),t}(),St=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new v(this.ctx),this.lineColorArr=void 0!==n.globals.stroke.colors?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight0&&(v=n.getPreviousPath(s));for(var y=0;y=10?t.x>0?(n="start",i+=10):t.x<0&&(n="end",i-=10):n="middle",Math.abs(t.y)>=e-10&&(t.y<0?r-=10:t.y>0&&(r+=10)),{textAnchor:n,newX:i,newY:r}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,n=null,i=0;i0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(n=e.globals.previousPaths[i].paths[0].d)}return n}},{key:"getDataPointsPos",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var i=[],r=0;r=360&&(u=360-Math.abs(this.startAngle)-.1);var f=n.drawPath({d:"",stroke:d,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;r.dropShadow(f,p)}l.add(f),f.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(f,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return i}},{key:"drawArcs",value:function(t){var e=this.w,n=new v(this.ctx),i=new A(this.ctx),r=new m(this.ctx),o=n.group(),a=this.getStrokeWidth(t);t.size=t.size-a/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-a*t.series.length-this.margin*t.series.length-a*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,o,l,s));var d=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;r.dropShadow(d,h)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var f=null;this.radialDataLabels.show&&(f=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})),"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(d),f&&o.add(f));var g=!1;e.config.plotOptions.radialBar.inverseOrder&&(g=!0);for(var y=g?t.series.length-1:0;g?y>=0:y100?100:t.series[y])/100,S=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(_=this.startAngle,C=Math.round(this.totalAngle*p.negToZero(e.globals.previousPaths[y])/100)+_),Math.abs(S)+Math.abs(w)>=360&&(S-=.01),Math.abs(C)+Math.abs(_)>=360&&(C-=.01);var T=S-w,D=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[y]:e.config.stroke.dashArray,I=n.drawPath({d:"",stroke:x,strokeWidth:a,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:D});if(v.setAttrs(I.node,{"data:angle":T,"data:value":t.series[y]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;r.dropShadow(I,P,y)}r.setSelectionFilter(I,0,y),this.addListeners(I,this.radialDataLabels),b.add(I),I.attr({index:0,j:y});var E=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(E=e.config.chart.animations.speed),e.globals.dataChanged&&(E=e.config.chart.animations.dynamicAnimation.speed),this.animDur=E/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(I,{centerX:t.centerX,centerY:t.centerY,endAngle:S,startAngle:w,prevEndAngle:C,prevStartAngle:_,size:t.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:E,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:o,elHollow:d,dataLabels:f}}},{key:"drawHollow",value:function(t){var e=new v(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,n,i){var r=this.w,o=new A(this.ctx),a=p.randomId(),s=r.config.plotOptions.radialBar.hollow.image;if(r.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:n,height:n,image:s,patternID:"pattern".concat(r.globals.cuid).concat(a)}),i="url(#pattern".concat(r.globals.cuid).concat(a,")");else{var l=r.config.plotOptions.radialBar.hollow.imageWidth,c=r.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var d=r.globals.dom.Paper.image(s).loaded((function(e){this.move(t.centerX-e.width/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+r.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(d)}else{var h=r.globals.dom.Paper.image(s).loaded((function(e){this.move(t.centerX-l/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+r.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return i}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}}]),n}(kt),At=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return o(t,[{key:"sameValueSeriesFix",value:function(t,e){var n=this.w;if("line"===n.config.chart.type&&("gradient"===n.config.fill.type||"gradient"===n.config.fill.type[t])&&new y(this.lineCtx.ctx,n).seriesHaveSameValues(t)){var i=e[t].slice();i[i.length-1]=i[i.length-1]+1e-6,e[t]=i}return e}},{key:"calculatePoints",value:function(t){var e=t.series,n=t.realIndex,i=t.x,r=t.y,o=t.i,a=t.j,s=t.prevY,l=this.w,c=[],d=[];if(0===a){var h=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(h=(l.globals.seriesX[n][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(h),d.push(p.isNumber(e[o][0])?s+l.config.markers.offsetY:null),c.push(i+l.config.markers.offsetX),d.push(p.isNumber(e[o][a+1])?r+l.config.markers.offsetY:null)}else c.push(i+l.config.markers.offsetX),d.push(p.isNumber(e[o][a+1])?r+l.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,n=t.pathFromArea,i=t.realIndex,r=this.w,o=0;o0&&parseInt(a.realIndex,10)===parseInt(i,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[o].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,n=r.globals.previousPaths[o].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[o].paths[1]&&(e=r.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:e,pathFromArea:n}}},{key:"determineFirstPrevY",value:function(t){var e=t.i,n=t.series,i=t.prevY,r=t.lineYPosition,o=this.w;if(void 0!==n[e][0])i=(r=o.config.chart.stacked&&e>0?this.lineCtx.prevSeriesY[e-1][0]:this.lineCtx.zeroY)-n[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?n[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(o.config.chart.stacked&&e>0&&void 0===n[e][0])for(var a=e-1;a>=0;a--)if(null!==n[a][0]&&void 0!==n[a][0]){i=r=this.lineCtx.prevSeriesY[a][0];break}return{prevY:i,lineYPosition:r}}}]),t}(),Tt=function(){function t(e,n,r){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=n,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||r,this.scatter=new D(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new At(this),this.markers=new T(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return o(t,[{key:"draw",value:function(t,e,n){var i=this.w,r=new v(this.ctx),o=i.globals.comboCharts?e:i.config.chart.type,a=r.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),s=new y(this.ctx,i);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio);for(var l=[],c=0;c0&&(f=(i.globals.seriesX[d][0]-i.globals.minX)/this.xRatio),u.push(f);var p,g=f,m=g,b=this.zeroY;b=this.lineHelpers.determineFirstPrevY({i:c,series:t,prevY:b,lineYPosition:0}).prevY,h.push(b),p=b;var x=this._calculatePathsFrom({series:t,i:c,realIndex:d,prevX:m,prevY:b}),w=this._iterateOverDataPoints({series:t,realIndex:d,i:c,x:f,y:1,pX:g,pY:p,pathsFrom:x,linePaths:[],areaPaths:[],seriesIndex:n,lineYPosition:0,xArrj:u,yArrj:h});this._handlePaths({type:o,realIndex:d,i:c,paths:w}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(i.config.chart.stacked)for(var _=l.length;_>0;_--)a.add(l[_-1]);else for(var k=0;k1&&(this.yaxisIndex=n),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=r.group({class:"apexcharts-series",seriesName:p.escapeString(i.globals.seriesNames[n])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":n}),this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":n});var o=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":o,rel:e+1,"data:realIndex":n}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,n,i,r,o=t.series,a=t.i,s=t.realIndex,l=t.prevX,c=t.prevY,d=this.w,h=new v(this.ctx);if(null===o[a][0]){for(var u=0;u0){var f=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:r,realIndex:s});i=f.pathFromLine,r=f.pathFromArea}return{prevX:l,prevY:c,linePath:e,areaPath:n,pathFromLine:i,pathFromArea:r}}},{key:"_handlePaths",value:function(t){var n=t.type,i=t.realIndex,r=t.i,o=t.paths,a=this.w,s=new v(this.ctx),l=new A(this.ctx);this.prevSeriesY.push(o.yArrj),a.globals.seriesXvalues[i]=o.xArrj,a.globals.seriesYvalues[i]=o.yArrj;var c=a.config.forecastDataPoints;if(c.count>0){var d=a.globals.seriesXvalues[i][a.globals.seriesXvalues[i].length-c.count-1],h=s.drawRect(d,0,a.globals.gridWidth,a.globals.gridHeight,0);a.globals.dom.elForecastMask.appendChild(h.node);var u=s.drawRect(0,0,d,a.globals.gridHeight,0);a.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var f={i:r,realIndex:i,animationDelay:r,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if("area"===n)for(var p=l.fillPath({seriesNumber:i}),g=0;g0){var k=s.renderPaths(w);k.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&k.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(k),k.attr("clip-path","url(#forecastMask".concat(a.globals.cuid,")")),_.attr("clip-path","url(#nonForecastMask".concat(a.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){for(var e=t.series,n=t.realIndex,i=t.i,r=t.x,o=t.y,a=t.pX,s=t.pY,l=t.pathsFrom,c=t.linePaths,d=t.areaPaths,h=t.seriesIndex,u=t.lineYPosition,f=t.xArrj,g=t.yArrj,m=this.w,y=new v(this.ctx),b=this.yRatio,x=l.prevY,w=l.linePath,_=l.areaPath,k=l.pathFromLine,S=l.pathFromArea,C=p.isNumber(m.globals.minYArr[n])?m.globals.minYArr[n]:m.globals.minY,A=m.globals.dataPoints>1?m.globals.dataPoints-1:m.globals.dataPoints,T=0;T0&&m.globals.collapsedSeries.length-1){e--;break}return e>=0?e:0}(i-1)][T+1]:this.zeroY,o=D?u-C/b[this.yaxisIndex]+2*(this.isReversed?C/b[this.yaxisIndex]:0):u-e[i][T+1]/b[this.yaxisIndex]+2*(this.isReversed?e[i][T+1]/b[this.yaxisIndex]:0),f.push(r),g.push(o);var P=this.lineHelpers.calculatePoints({series:e,x:r,y:o,realIndex:n,i:i,j:T,prevY:x}),E=this._createPaths({series:e,i:i,realIndex:n,j:T,x:r,y:o,pX:a,pY:s,linePath:w,areaPath:_,linePaths:c,areaPaths:d,seriesIndex:h});d=E.areaPaths,c=E.linePaths,a=E.pX,s=E.pY,_=E.areaPath,w=E.linePath,this.appendPathFrom&&(k+=y.line(r,this.zeroY),S+=y.line(r,this.zeroY)),this.handleNullDataPoints(e,P,i,T,n),this._handleMarkersAndLabels({pointsPos:P,series:e,x:r,y:o,prevY:x,i:i,j:T,realIndex:n})}return{yArrj:g,xArrj:f,pathFromArea:S,areaPaths:d,pathFromLine:k,linePaths:c}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.pointsPos;t.series,t.x,t.y,t.prevY;var n=t.i,i=t.j,r=t.realIndex,o=this.w,a=new I(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:r,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var s=this.markers.plotChartMarkers(e,r,i+1);null!==s&&this.elPointsMain.add(s)}var l=a.drawDataLabel(e,r,i+1,null);null!==l&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(t){var e=t.series,n=t.i,i=t.realIndex,r=t.j,o=t.x,a=t.y,s=t.pX,l=t.pY,c=t.linePath,d=t.areaPath,h=t.linePaths,u=t.areaPaths,f=t.seriesIndex,p=this.w,g=new v(this.ctx),m=p.config.stroke.curve,y=this.areaBottomY;if(Array.isArray(p.config.stroke.curve)&&(m=Array.isArray(f)?p.config.stroke.curve[f[n]]:p.config.stroke.curve[n]),"smooth"===m){var b=.35*(o-s);p.globals.hasNullValues?(null!==e[n][r]&&(null!==e[n][r+1]?(c=g.move(s,l)+g.curve(s+b,l,o-b,a,o+1,a),d=g.move(s+1,l)+g.curve(s+b,l,o-b,a,o+1,a)+g.line(o,y)+g.line(s,y)+"z"):(c=g.move(s,l),d=g.move(s,l)+"z")),h.push(c),u.push(d)):(c+=g.curve(s+b,l,o-b,a,o,a),d+=g.curve(s+b,l,o-b,a,o,a)),s=o,l=a,r===e[n].length-2&&(d=d+g.curve(s,l,o,a,o,y)+g.move(o,a)+"z",p.globals.hasNullValues||(h.push(c),u.push(d)))}else{if(null===e[n][r+1]){c+=g.move(o,a);var x=p.globals.isXNumeric?(p.globals.seriesX[i][r]-p.globals.minX)/this.xRatio:o-this.xDivision;d=d+g.line(x,y)+g.move(o,a)+"z"}null===e[n][r]&&(c+=g.move(o,a),d+=g.move(o,y)),"stepline"===m?(c=c+g.line(o,null,"H")+g.line(null,a,"V"),d=d+g.line(o,null,"H")+g.line(null,a,"V")):"straight"===m&&(c+=g.line(o,a),d+=g.line(o,a)),r===e[n].length-2&&(d=d+g.line(o,y)+g.move(o,a)+"z",h.push(c),u.push(d))}return{linePaths:h,areaPaths:u,pX:s,pY:l,linePath:c,areaPath:d}}},{key:"handleNullDataPoints",value:function(t,e,n,i,r){var o=this.w;if(null===t[n][i]&&o.config.markers.showNullDataPoints||1===t[n].length){var a=this.markers.plotChartMarkers(e,r,i+1,this.strokeWidth-o.config.markers.strokeWidth/2,!0);null!==a&&this.elPointsMain.add(a)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,n,i,r){this.xoffset=e,this.yoffset=n,this.height=r,this.width=i,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,n=[],i=this.xoffset,r=this.yoffset,a=o(t)/this.height,s=o(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var i=e/this.height,r=this.width-i;n=new t(this.xoffset+i,this.yoffset,r,this.height)}else{var o=e/this.width,a=this.height-o;n=new t(this.xoffset,this.yoffset+o,this.width,a)}return n}}function e(e,i,r,a,s){return a=void 0===a?0:a,s=void 0===s?0:s,function(t){var e,n,i=[];for(e=0;e=i(r,n))}(e,l=t[0],s)?(e.push(l),n(t.slice(1),e,r,a)):(c=r.cutArea(o(e),a),a.push(r.getCoordinates(e)),n(t,[],c,a)),a;a.push(r.getCoordinates(e))}function i(t,e){var n=Math.min.apply(Math,t),i=Math.max.apply(Math,t),r=o(t);return Math.max(Math.pow(e,2)*i/Math.pow(r,2),Math.pow(r,2)/(Math.pow(e,2)*n))}function r(t){return t&&t.constructor===Array}function o(t){var e,n=0;for(e=0;er-n&&s.width<=o-i){var l=a.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(t,e,n,i){var r=new g(this.ctx);r.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:n.x,y:n.y,width:n.width,height:n.height},i,(function(){r.animationCompleted(t)}))}}]),t}(),Et=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return o(t,[{key:"calculateTimeScaleTicks",value:function(t,n){var i=this,r=this.w;if(r.globals.allSeriesCollapsed)return r.globals.labels=[],r.globals.timescaleLabels=[],[];var o=new L(this.ctx),a=(n-t)/864e5;this.determineInterval(a),r.globals.disableZoomIn=!1,r.globals.disableZoomOut=!1,a<.00011574074074074075?r.globals.disableZoomIn=!0:a>5e4&&(r.globals.disableZoomOut=!0);var s=o.getTimeUnitsfromTimestamp(t,n,this.utc),l=r.globals.gridWidth/a,c=l/24,d=c/60,h=d/60,u=Math.floor(24*a),f=Math.floor(1440*a),p=Math.floor(86400*a),g=Math.floor(a),m=Math.floor(a/30),v=Math.floor(a/365),y={minMillisecond:s.minMillisecond,minSecond:s.minSecond,minMinute:s.minMinute,minHour:s.minHour,minDate:s.minDate,minMonth:s.minMonth,minYear:s.minYear},b={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:d,secondsWidthOnXAxis:h,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:u,numberOfDays:g,numberOfMonths:m,numberOfYears:v};switch(this.tickInterval){case"years":this.generateYearScale(b);break;case"months":case"half_year":this.generateMonthScale(b);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(b);break;case"hours":this.generateHourScale(b);break;case"minutes_fives":case"minutes":this.generateMinuteScale(b);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(b)}var x=this.timeScaleArray.map((function(t){var n={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?e(e({},n),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?e(e({},n),{},{value:t.value}):"minute"===t.unit?e(e({},n),{},{value:t.value,minute:t.value}):"second"===t.unit?e(e({},n),{},{value:t.value,minute:t.minute,second:t.second}):t}));return x.filter((function(t){var e=1,n=Math.ceil(r.globals.gridWidth/120),o=t.value;void 0!==r.config.xaxis.tickAmount&&(n=r.config.xaxis.tickAmount),x.length>n&&(e=Math.floor(x.length/n));var a=!1,s=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(a=!0);break;case"half_year":e=7,"year"===t.unit&&(a=!0);break;case"months":e=1,"year"===t.unit&&(a=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(a=!0),30===o&&(s=!0);break;case"months_days":e=10,"month"===t.unit&&(a=!0),30===o&&(s=!0);break;case"week_days":e=8,"month"===t.unit&&(a=!0);break;case"days":e=1,"month"===t.unit&&(a=!0);break;case"hours":"day"===t.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":o%5!=0&&(s=!0);break;case"seconds_tens":o%10!=0&&(s=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!s)return!0}else if((o%e==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var n=this.w,i=this.formatDates(t),r=this.removeOverlappingTS(i);n.globals.timescaleLabels=r.slice(),new at(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,n=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case n>15:this.tickInterval="minutes_fives";break;case n>5:this.tickInterval="minutes";break;case n>1:this.tickInterval="seconds_tens";break;case 60*n>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,n=t.currentMonth,i=t.currentYear,r=t.daysWidthOnXAxis,o=t.numberOfYears,a=e.minYear,s=0,l=new L(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var d=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);s=(l.determineDaysOfYear(e.minYear)-d+1)*r,a=e.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:c,year:a,month:p.monthMod(n+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:c,year:i,month:p.monthMod(n+1)});for(var h=a,u=s,f=0;f1){l=(c.determineDaysOfMonths(i+1,e.minYear)-n+1)*o,s=p.monthMod(i+1);var u=r+h,f=p.monthMod(s),g=s;0===s&&(d="year",g=u,f=1,u+=h+=1),this.timeScaleArray.push({position:l,value:g,unit:d,year:u,month:f})}else this.timeScaleArray.push({position:l,value:s,unit:d,year:r,month:p.monthMod(i)});for(var m=s+1,v=l,y=0,b=1;ya.determineDaysOfMonths(e+1,n)?(c=1,s="month",u=e+=1,e):e},h=(24-e.minHour)*r,u=l,f=d(c,n,i);0===e.minHour&&1===e.minDate?(h=0,u=p.monthMod(e.minMonth),s="month",c=e.minDate,o++):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,u=l,f=d(c=l,n,i)),this.timeScaleArray.push({position:h,value:u,unit:s,year:this._getYear(i,f,0),month:p.monthMod(f),day:c});for(var g=h,m=0;ms.determineDaysOfMonths(e+1,r)&&(m=1,e+=1),{month:e,date:m}},d=function(t,e){return t>s.determineDaysOfMonths(e+1,r)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),u=h*o,f=e.minHour+1,g=f+1;60===h&&(u=0,g=(f=e.minHour)+1);var m=n,v=d(m,i);this.timeScaleArray.push({position:u,value:f,unit:l,day:m,hour:g,year:r,month:p.monthMod(v)});for(var y=u,b=0;b=24&&(g=0,l="day",v=c(m+=1,v).month,v=d(m,v));var x=this._getYear(r,v,0);y=0===g&&0===b?h*o:60*o+y;var w=0===g?m:g;this.timeScaleArray.push({position:y,value:w,unit:l,hour:g,day:m,year:x,month:p.monthMod(v)}),g++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,n=t.currentSecond,i=t.currentMinute,r=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,d=t.numberOfMinutes,h=i+1,u=o,f=a,g=s,m=r,v=(60-n-e/1e3)*c,y=0;y=60&&(h=0,24===(m+=1)&&(m=0)),this.timeScaleArray.push({position:v,value:h,unit:"minute",hour:m,minute:h,day:u,year:this._getYear(g,f,0),month:p.monthMod(f)}),v+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,n=t.currentSecond,i=t.currentMinute,r=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,d=n+1,h=i,u=o,f=a,g=s,m=r,v=(1e3-e)/1e3*l,y=0;y=60&&(d=0,++h>=60&&(h=0,24==++m&&(m=0))),this.timeScaleArray.push({position:v,value:d,unit:"second",hour:m,minute:h,second:d,day:u,year:this._getYear(g,f,0),month:p.monthMod(f)}),v+=l,d++}},{key:"createRawDateString",value:function(t,e){var n=t.year;return 0===t.month&&(t.month=1),n+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?n+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":n+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?n+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":n+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?n+=":"+("0"+e).slice(-2):n+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?n+=":"+("0"+e).slice(-2):n+=":00",this.utc&&(n+=".000Z"),n}},{key:"formatDates",value:function(t){var e=this,n=this.w;return t.map((function(t){var i=t.value.toString(),r=new L(e.ctx),o=e.createRawDateString(t,i),a=r.getDate(r.parseDate(o));if(e.utc||(a=r.getDate(r.parseDateWithTimezone(o))),void 0===n.config.xaxis.labels.format){var s="dd MMM",l=n.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(s=l.year),"month"===t.unit&&(s=l.month),"day"===t.unit&&(s=l.day),"hour"===t.unit&&(s=l.hour),"minute"===t.unit&&(s=l.minute),"second"===t.unit&&(s=l.second),i=r.formatDate(a,s)}else i=r.formatDate(a,n.config.xaxis.labels.format);return{dateString:o,position:t.position,value:i,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,n=this,i=new v(this.ctx),r=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(r=!0,e=i.getTextRects(t[0].value).width);var o=0,a=t.map((function(a,s){if(s>0&&n.w.config.xaxis.labels.hideOverlappingLabels){var l=r?e:i.getTextRects(t[o].value).width,c=t[o].position;return a.position>c+l+10?(o=s,a):null}return a}));return a.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,n){return t+Math.floor(e/12)+n}}]),t}(),Mt=function(){function t(e,n){i(this,t),this.ctx=n,this.w=n.w,this.el=e}return o(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,n=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(n)>-1,t.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(n)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type||"boxPlot"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.chartID,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),v.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(e.chart.offsetX,", ").concat(e.chart.offsetY,")")}),t.dom.Paper.node.style.background=e.chart.background,this.setSVGDimensions(),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elAnnotations=t.dom.Paper.group().attr({class:"apexcharts-annotations"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elWrap.appendChild(t.dom.elLegendWrap),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var n=this.w,i=n.config,r=n.globals,o={series:[],i:[]},a={series:[],i:[]},s={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},h={series:[],i:[]};r.series.map((function(e,u){var f=0;void 0!==t[u].type?("column"===t[u].type||"bar"===t[u].type?(r.series.length>1&&i.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(e),c.i.push(u),f++,n.globals.columnSeries=c.series):"area"===t[u].type?(a.series.push(e),a.i.push(u),f++):"line"===t[u].type?(o.series.push(e),o.i.push(u),f++):"scatter"===t[u].type?(s.series.push(e),s.i.push(u)):"bubble"===t[u].type?(l.series.push(e),l.i.push(u),f++):"candlestick"===t[u].type?(d.series.push(e),d.i.push(u),f++):"boxPlot"===t[u].type?(h.series.push(e),h.i.push(u),f++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),f>1&&(r.comboCharts=!0)):(o.series.push(e),o.i.push(u))}));var u=new Tt(this.ctx,e),f=new bt(this.ctx,e);this.ctx.pie=new kt(this.ctx);var p=new Ct(this.ctx);this.ctx.rangeBar=new j(this.ctx,e);var g=new St(this.ctx),m=[];if(r.comboCharts){if(a.series.length>0&&m.push(u.draw(a.series,"area",a.i)),c.series.length>0)if(n.config.chart.stacked){var v=new yt(this.ctx,e);m.push(v.draw(c.series,c.i))}else this.ctx.bar=new O(this.ctx,e),m.push(this.ctx.bar.draw(c.series,c.i));if(o.series.length>0&&m.push(u.draw(o.series,"line",o.i)),d.series.length>0&&m.push(f.draw(d.series,d.i)),h.series.length>0&&m.push(f.draw(h.series,h.i)),s.series.length>0){var y=new Tt(this.ctx,e,!0);m.push(y.draw(s.series,"scatter",s.i))}if(l.series.length>0){var b=new Tt(this.ctx,e,!0);m.push(b.draw(l.series,"bubble",l.i))}}else switch(i.chart.type){case"line":m=u.draw(r.series,"line");break;case"area":m=u.draw(r.series,"area");break;case"bar":i.chart.stacked?m=new yt(this.ctx,e).draw(r.series):(this.ctx.bar=new O(this.ctx,e),m=this.ctx.bar.draw(r.series));break;case"candlestick":case"boxPlot":m=new bt(this.ctx,e).draw(r.series);break;case"rangeBar":m=this.ctx.rangeBar.draw(r.series);break;case"heatmap":m=new wt(this.ctx,e).draw(r.series);break;case"treemap":m=new Pt(this.ctx,e).draw(r.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(r.series);break;case"radialBar":m=p.draw(r.series);break;case"radar":m=g.draw(r.series);break;default:m=u.draw(r.series)}return m}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var n=p.getDimensions(this.el),i=e.chart.width.toString().split(/[0-9]+/g).pop();"%"===i?p.isNumber(n[0])&&(0===n[0].width&&(n=p.getDimensions(this.el.parentNode)),t.svgWidth=n[0]*parseInt(e.chart.width,10)/100):"px"!==i&&""!==i||(t.svgWidth=parseInt(e.chart.width,10));var r=e.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===r){var o=p.getDimensions(this.el.parentNode);t.svgHeight=o[1]*parseInt(e.chart.height,10)/100}else t.svgHeight=parseInt(e.chart.height,10);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth/1.2;if(t.svgWidth<0&&(t.svgWidth=0),t.svgHeight<0&&(t.svgHeight=0),v.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==r){var a=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+a+"px"}t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,n={transform:"translate("+t.translateX+", "+e+")"};v.setAttrs(t.dom.elGraphical.node,n)}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,n=0,i=t.config.chart.sparkline.enabled?1:15;i+=t.config.grid.padding.bottom,"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||!t.config.legend.show||t.config.legend.floating||(n=new lt(this.ctx).legendHelpers.getLegendBBox().clwh+10);var r=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),o=2.05*t.globals.radialSize;if(r&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var a=p.getBoundingClientRect(r);o=a.bottom;var s=a.bottom-a.top;o=Math.max(2.05*t.globals.radialSize,s)}var l=o+e.translateY+n+i;e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).indexOf("%")>0||(e.dom.elWrap.style.height=l+"px",v.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px")}},{key:"coreCalculations",value:function(){new U(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(t){return[]}))},n=new R,i=this.w.globals;n.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position&&new Q(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new Q(this.ctx).drawYCrosshairs(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new Et(this.ctx);var n=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?n=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(n=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(n)}t=new y(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,n=this.w;if(n.config.chart.brush.enabled&&"function"!=typeof n.config.chart.events.selection){var i=n.config.chart.brush.targets||[n.config.chart.brush.target];i.forEach((function(e){var n=ApexCharts.getChartByID(e);n.w.globals.brushSource=t.ctx,"function"!=typeof n.w.config.chart.events.zoomed&&(n.w.config.chart.events.zoomed=function(){t.updateSourceChart(n)}),"function"!=typeof n.w.config.chart.events.scrolled&&(n.w.config.chart.events.scrolled=function(){t.updateSourceChart(n)})})),n.config.chart.events.selection=function(t,r){i.forEach((function(t){var i=ApexCharts.getChartByID(t),o=p.clone(n.config.yaxis);if(n.config.chart.brush.autoScaleYaxis&&1===i.w.globals.series.length){var a=new X(i);o=a.autoScaleY(i,o,r)}var s=i.w.config.yaxis.reduce((function(t,n,r){return[].concat(h(t),[e(e({},i.w.config.yaxis[r]),{},{min:o[0].min,max:o[0].max})])}),[]);i.ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max},yaxis:s},!1,!1,!1,!1)}))}}}}]),t}(),Ot=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(s){var l=[e.ctx];o&&(l=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(l=[e.ctx],e.ctx.w.globals.isExecCalled=!1),l.forEach((function(o,c){var d=o.w;if(d.globals.shouldAnimate=r,i||(d.globals.resized=!0,d.globals.dataChanged=!0,r&&o.series.getPreviousPaths()),t&&"object"===n(t)&&(o.config=new N(t),t=y.extendArrayProps(o.config,t,d),o.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,d.config=p.extend(d.config,t),a&&(d.globals.lastXAxis=t.xaxis?p.clone(t.xaxis):[],d.globals.lastYAxis=t.yaxis?p.clone(t.yaxis):[],d.globals.initialConfig=p.extend({},d.config),d.globals.initialSeries=p.clone(d.config.series),t.series))){for(var h=0;h2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(r){var o,a=n.w;return a.globals.shouldAnimate=e,a.globals.dataChanged=!0,e&&n.ctx.series.getPreviousPaths(),a.globals.axisCharts?(0===(o=t.map((function(t,e){return n._extendSeries(t,e)}))).length&&(o=[{data:[]}]),a.config.series=o):a.config.series=t.slice(),i&&(a.globals.initialSeries=p.clone(a.config.series)),n.ctx.update().then((function(){r(n.ctx)}))}))}},{key:"_extendSeries",value:function(t,n){var i=this.w,r=i.config.series[n];return e(e({},i.config.series[n]),{},{name:t.name?t.name:r&&r.name,color:t.color?t.color:r&&r.color,type:t.type?t.type:r&&r.type,data:t.data?t.data:r&&r.data})}},{key:"toggleDataPointSelection",value:function(t,e){var n=this.w,i=null,r=".apexcharts-series[data\\:realIndex='".concat(t,"']");return n.globals.axisCharts?i=n.globals.dom.Paper.select("".concat(r," path[j='").concat(e,"'], ").concat(r," circle[j='").concat(e,"'], ").concat(r," rect[j='").concat(e,"']")).members[0]:void 0===e&&(i=n.globals.dom.Paper.select("".concat(r," path[j='").concat(t,"']")).members[0],"pie"!==n.config.chart.type&&"polarArea"!==n.config.chart.type&&"donut"!==n.config.chart.type||this.ctx.pie.pieClicked(t)),i?(new v(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(n){void 0!==t.xaxis[n]&&(e.config.xaxis[n]=t.xaxis[n],e.globals.lastXAxis[n]=t.xaxis[n])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var n=new F(t);t=n.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){var e=this.w;return e.config.chart.stacked&&"100%"===e.config.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,n){t.yaxis[n].min=0,t.yaxis[n].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,n=this.w,i=n.globals.lastXAxis,r=n.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(r=t.yaxis),n.config.xaxis.min=i.min,n.config.xaxis.max=i.max;n.config.yaxis.map((function(t,i){n.globals.zoomed||void 0!==r[i]?function(t){void 0!==r[t]&&(n.config.yaxis[t].min=r[t].min,n.config.yaxis[t].max=r[t].max)}(i):void 0!==e.ctx.opts.yaxis[i]&&(t.min=e.ctx.opts.yaxis[i].min,t.max=e.ctx.opts.yaxis[i].max)}))}}]),t}();Dt="undefined"!=typeof window?window:void 0,It=function(t,e){var i=(void 0!==this?this:t).SVG=function(t){if(i.supported)return t=new i.Doc(t),i.parser.draw||i.prepare(),t};if(i.ns="http://www.w3.org/2000/svg",i.xmlns="http://www.w3.org/2000/xmlns/",i.xlink="http://www.w3.org/1999/xlink",i.svgjs="http://svgjs.dev",i.supported=!0,!i.supported)return!1;i.did=1e3,i.eid=function(t){return"Svgjs"+h(t)+i.did++},i.create=function(t){var n=e.createElementNS(this.ns,t);return n.setAttribute("id",this.eid(t)),n},i.extend=function(){var t,e;e=(t=[].slice.call(arguments)).pop();for(var n=t.length-1;n>=0;n--)if(t[n])for(var r in e)t[n].prototype[r]=e[r];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,i.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&i.extend(e,t.extend),t.construct&&i.extend(t.parent||i.Container,t.construct),e},i.adopt=function(e){return e?e.instance?e.instance:((n="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new i.Nested:new i.Doc:"linearGradient"==e.nodeName?new i.Gradient("linear"):"radialGradient"==e.nodeName?new i.Gradient("radial"):i[h(e.nodeName)]?new(i[h(e.nodeName)]):new i.Element(e)).type=e.nodeName,n.node=e,e.instance=n,n instanceof i.Doc&&n.namespace().defs(),n.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),n):null;var n},i.prepare=function(){var t=e.getElementsByTagName("body")[0],n=(t?new i.Doc(t):i.adopt(e.documentElement).nested()).size(2,0);i.parser={body:t||e.documentElement,draw:n.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:n.polyline().node,path:n.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},e.addEventListener("DOMContentLoaded",(function(){i.parser.draw||i.prepare()}),!1),i.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},i.utils={map:function(t,e){for(var n=t.length,i=[],r=0;r1?1:t,new i.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),i.Color.test=function(t){return t+="",i.regex.isHex.test(t)||i.regex.isRgb.test(t)},i.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},i.Color.isColor=function(t){return i.Color.isRgb(t)||i.Color.test(t)},i.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},i.extend(i.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)}}),i.PointArray=function(t,e){i.Array.call(this,t,e||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray;for(var r={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]}},o="mlhvqtcsaz".split(""),a=0,s=o.length;al);return o},bbox:function(){return i.parser.draw||i.prepare(),i.parser.path.setAttribute("d",this.toString()),i.parser.path.getBBox()}}),i.Number=i.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(i.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof i.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new i.Number(t),new i.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new i.Number(t),new i.Number(this-t,this.unit||t.unit)},times:function(t){return t=new i.Number(t),new i.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new i.Number(t),new i.Number(this/t,this.unit||t.unit)},to:function(t){var e=new i.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new i.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new i.Number(this.destination).minus(this).times(t).plus(this):this}}}),i.Element=i.invent({create:function(t){this._stroke=i.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var n=f(this,t,e);return this.width(new i.Number(n.width)).height(new i.Number(n.height))},clone:function(t){this.writeDataToDom();var e=m(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(i.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return i.get(this.attr(t))},parent:function(e){var n=this;if(!n.node.parentNode)return null;if(n=i.adopt(n.node.parentNode),!e)return n;for(;n&&n.node instanceof t.SVGElement;){if("string"==typeof e?n.matches(e):n instanceof e)return n;if(!n.node.parentNode||"#document"==n.node.parentNode.nodeName)return null;n=i.adopt(n.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(t){var e=[],n=this;do{if(!(n=n.parent(t))||!n.node)break;e.push(n)}while(n.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var n=e.createElement("svg");if(!(t&&this instanceof i.Parent))return n.appendChild(t=e.createElement("svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),n.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");n.innerHTML=""+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var r=0,o=n.firstChild.childNodes.length;r":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},i.morph=function(t){return function(e,n){return new i.MorphObj(e,n).at(t)}},i.Situation=i.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new i.Number(t.duration).valueOf(),this.delay=new i.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),i.FX=i.invent({create:function(t){this._target=t,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(t,e,r){"object"===n(t)&&(e=t.ease,r=t.delay,t=t.duration);var o=new i.Situation({duration:t||1e3,delay:r||0,ease:i.easing[e||"-"]||e});return this.queue(o),this},target:function(t){return t&&t instanceof i.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=t.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){t.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(t){return("function"==typeof t||t instanceof i.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof i.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e=this.situation;if(e.init)return this;for(var n in e.animations){t=this.target()[n](),Array.isArray(t)||(t=[t]),Array.isArray(e.animations[n])||(e.animations[n]=[e.animations[n]]);for(var r=t.length;r--;)e.animations[n][r]instanceof i.Number&&(t[r]=new i.Number(t[r])),e.animations[n][r]=t[r].morph(e.animations[n][r])}for(var n in e.attrs)e.attrs[n]=new i.MorphObj(this.target().attr(n),e.attrs[n]);for(var n in e.styles)e.styles[n]=new i.MorphObj(this.target().style(n),e.styles[n]);return e.initialTransformation=this.target().matrixify(),e.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var n=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!n&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(t){var e=this.last();return this.target().on("finished.fx",(function n(i){i.detail.situation==e&&(t.call(this,e),this.off("finished.fx",n))})),this._callStart()},during:function(t){var e=this.last(),n=function(n){n.detail.situation==e&&t.call(this,n.detail.pos,i.morph(n.detail.pos),n.detail.eased,e)};return this.target().off("during.fx",n).on("during.fx",n),this.after((function(){this.off("during.fx",n)})),this._callStart()},afterAll:function(t){var e=function e(n){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,n){return this.last()[n||"animations"][t]=e,this._callStart()},step:function(t){var e,n,i;t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(e=Math.max(this.absPos,0),n=Math.floor(e),!0===this.situation.loops||nthis.lastPos&&o<=r&&(this.situation.once[o].call(this.target(),this.pos,r),delete this.situation.once[o]);return this.active&&this.target().fire("during",{pos:this.pos,eased:r,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=r,this):this},eachAt:function(){var t,e=this,n=this.target(),r=this.situation;for(var o in r.animations)t=[].concat(r.animations[o]).map((function(t){return"string"!=typeof t&&t.at?t.at(r.ease(e.pos),e.pos):t})),n[o].apply(n,t);for(var o in r.attrs)t=[o].concat(r.attrs[o]).map((function(t){return"string"!=typeof t&&t.at?t.at(r.ease(e.pos),e.pos):t})),n.attr.apply(n,t);for(var o in r.styles)t=[o].concat(r.styles[o]).map((function(t){return"string"!=typeof t&&t.at?t.at(r.ease(e.pos),e.pos):t})),n.style.apply(n,t);if(r.transforms.length){t=r.initialTransformation,o=0;for(var a=r.transforms.length;o=0;--r)this[y[r]]=null!=t[y[r]]?t[y[r]]:e[y[r]]},extend:{extract:function(){var t=p(this,0,1);p(this,1,0);var e=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(e*Math.PI/180)+this.f*Math.sin(e*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(e*Math.PI/180)+this.e*Math.sin(-e*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new i.Matrix(this)}},clone:function(){return new i.Matrix(this)},morph:function(t){return this.destination=new i.Matrix(t),this},multiply:function(t){return new i.Matrix(this.native().multiply(function(t){return t instanceof i.Matrix||(t=new i.Matrix(t)),t}(t).native()))},inverse:function(){return new i.Matrix(this.native().inverse())},translate:function(t,e){return new i.Matrix(this.native().translate(t||0,e||0))},native:function(){for(var t=i.parser.native.createSVGMatrix(),e=y.length-1;e>=0;e--)t[y[e]]=this[y[e]];return t},toString:function(){return"matrix("+v(this.a)+","+v(this.b)+","+v(this.c)+","+v(this.d)+","+v(this.e)+","+v(this.f)+")"}},parent:i.Element,construct:{ctm:function(){return new i.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof i.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new i.Matrix(e)}return new i.Matrix(this.node.getScreenCTM())}}}),i.Point=i.invent({create:function(t,e){var i;i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===n(t)?{x:t.x,y:t.y}:null!=t?{x:t,y:null!=e?e:t}:{x:0,y:0},this.x=i.x,this.y=i.y},extend:{clone:function(){return new i.Point(this)},morph:function(t,e){return this.destination=new i.Point(t,e),this}}}),i.extend(i.Element,{point:function(t,e){return new i.Point(t,e).transform(this.screenCTM().inverse())}}),i.extend(i.Element,{attr:function(t,e,r){if(null==t){for(t={},r=(e=this.node.attributes).length-1;r>=0;r--)t[e[r].nodeName]=i.regex.isNumber.test(e[r].nodeValue)?parseFloat(e[r].nodeValue):e[r].nodeValue;return t}if("object"===n(t))for(var o in t)this.attr(o,t[o]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?i.defaults.attrs[t]:i.regex.isNumber.test(e)?parseFloat(e):e;"stroke-width"==t?this.attr("stroke",parseFloat(e)>0?this._stroke:null):"stroke"==t&&(this._stroke=e),"fill"!=t&&"stroke"!=t||(i.regex.isImage.test(e)&&(e=this.doc().defs().image(e,0,0)),e instanceof i.Image&&(e=this.doc().defs().pattern(0,0,(function(){this.add(e)})))),"number"==typeof e?e=new i.Number(e):i.Color.isColor(e)?e=new i.Color(e):Array.isArray(e)&&(e=new i.Array(e)),"leading"==t?this.leading&&this.leading(e):"string"==typeof r?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!=t&&"x"!=t||this.rebuild(t,e)}return this}}),i.extend(i.Element,{transform:function(t,e){var r;return"object"!==n(t)?(r=new i.Matrix(this).extract(),"string"==typeof t?r[t]:r):(r=new i.Matrix(this),e=!!e||!!t.relative,null!=t.a&&(r=e?r.multiply(new i.Matrix(t)):new i.Matrix(t)),this.attr("transform",r))}}),i.extend(i.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(i.regex.transforms).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(i.regex.delimiter).map((function(t){return parseFloat(t)}))]})).reduce((function(t,e){return"matrix"==e[0]?t.multiply(g(e[1])):t[e[0]].apply(t,e[1])}),new i.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t).untransform().transform(n.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),i.Transformation=i.invent({create:function(t,e){if(arguments.length>1&&"boolean"!=typeof e)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(t))for(var i=0,r=this.arguments.length;i=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return i.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){for(var n=this.children(),r=0,o=n.length;r=0;n--)e.childNodes[n]instanceof t.SVGElement&&m(e.childNodes[n]);return i.adopt(e).id(i.eid(e.nodeName))}function v(t){return Math.abs(t)>1e-37?t:0}["fill","stroke"].forEach((function(t){var e={};e[t]=function(e){if(void 0===e)return this;if("string"==typeof e||i.Color.isRgb(e)||e&&"function"==typeof e.fill)this.attr(t,e);else for(var n=l[t].length-1;n>=0;n--)null!=e[l[t][n]]&&this.attr(l.prefix(t,l[t][n]),e[l[t][n]]);return this},i.extend(i.Element,i.FX,e)})),i.extend(i.Element,i.FX,{translate:function(t,e){return this.transform({x:t,y:e})},matrix:function(t){return this.attr("transform",new i.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new i.Number(t).plus(this instanceof i.FX?0:this.x()),!0)},dy:function(t){return this.y(new i.Number(t).plus(this instanceof i.FX?0:this.y()),!0)}}),i.extend(i.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),i.Set=i.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){for(var t=[].slice.call(arguments),e=0,n=t.length;e-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,n=this.members.length;e=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(t){return new i.Set(t)}}}),i.FX.Set=i.invent({create:function(t){this.set=t}}),i.Set.inherit=function(){var t=[];for(var e in i.Shape.prototype)"function"==typeof i.Shape.prototype[e]&&"function"!=typeof i.Set.prototype[e]&&t.push(e);for(var e in t.forEach((function(t){i.Set.prototype[t]=function(){for(var e=0,n=this.members.length;e=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),i.get=function(t){var n=e.getElementById(function(t){var e=(t||"").toString().match(i.regex.reference);if(e)return e[1]}(t)||t);return i.adopt(n)},i.select=function(t,n){return new i.Set(i.utils.map((n||e).querySelectorAll(t),(function(t){return i.adopt(t)})))},i.extend(i.Parent,{select:function(t){return i.select(t,this.node)}});var y="abcdef".split("");if("function"!=typeof t.CustomEvent){var b=function(t,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var i=e.createEvent("CustomEvent");return i.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),i};b.prototype=t.Event.prototype,i.CustomEvent=b}else i.CustomEvent=t.CustomEvent;return i},"function"==typeof define&&define.amd?define((function(){return It(Dt,Dt.document)})):"object"===("undefined"==typeof exports?"undefined":n(exports))&&"undefined"!=typeof module?module.exports=Dt.document?It(Dt,Dt.document):function(t){return It(t,t.document)}:Dt.SVG=It(Dt,Dt.document),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(t,e){return this.add(t,e),!t.attr("in")&&this.autoSetIn&&t.attr("in",this.source),t.attr("result")||t.attr("result",t),t},blend:function(t,e,n){return this.put(new SVG.BlendEffect(t,e,n))},colorMatrix:function(t,e){return this.put(new SVG.ColorMatrixEffect(t,e))},convolveMatrix:function(t){return this.put(new SVG.ConvolveMatrixEffect(t))},componentTransfer:function(t){return this.put(new SVG.ComponentTransferEffect(t))},composite:function(t,e,n){return this.put(new SVG.CompositeEffect(t,e,n))},flood:function(t,e){return this.put(new SVG.FloodEffect(t,e))},offset:function(t,e){return this.put(new SVG.OffsetEffect(t,e))},image:function(t){return this.put(new SVG.ImageEffect(t))},merge:function(){var t=[void 0];for(var e in arguments)t.push(arguments[e]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,t)))},gaussianBlur:function(t,e){return this.put(new SVG.GaussianBlurEffect(t,e))},morphology:function(t,e){return this.put(new SVG.MorphologyEffect(t,e))},diffuseLighting:function(t,e,n){return this.put(new SVG.DiffuseLightingEffect(t,e,n))},displacementMap:function(t,e,n,i,r){return this.put(new SVG.DisplacementMapEffect(t,e,n,i,r))},specularLighting:function(t,e,n,i){return this.put(new SVG.SpecularLightingEffect(t,e,n,i))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(t,e,n,i,r){return this.put(new SVG.TurbulenceEffect(t,e,n,i,r))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(t){var e=this.put(new SVG.Filter);return"function"==typeof t&&t.call(e,e),e}}),SVG.extend(SVG.Container,{filter:function(t){return this.defs().filter(t)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(t){return this.filterer=t instanceof SVG.Element?t:this.doc().filter(t),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(t){return this.filterer&&!0===t&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}});var t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},diffuseLighting:function(t,e,n){return this.parent()&&this.parent().diffuseLighting(t,e,n).in(this)},displacementMap:function(t,e,n,i){return this.parent()&&this.parent().displacementMap(this,t,e,n,i)},specularLighting:function(t,e,n,i){return this.parent()&&this.parent().specularLighting(t,e,n,i).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,n,i,r){return this.parent()&&this.parent().turbulence(t,e,n,i,r).in(this)}};SVG.extend(SVG.Effect,t),SVG.extend(SVG.ParentEffect,t),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){this.attr("in",t)}}});var e={blend:function(t,e,n){this.attr({in:t,in2:e,mode:n||"normal"})},colorMatrix:function(t,e){"matrix"==t&&(e=r(e)),this.attr({type:t,values:void 0===e?null:e})},convolveMatrix:function(t){t=r(t),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},composite:function(t,e,n){this.attr({in:t,in2:e,operator:n})},flood:function(t,e){this.attr("flood-color",t),null!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(t){this.attr("href",t,SVG.xlink)},displacementMap:function(t,e,n,i,r){this.attr({in:t,in2:e,scale:n,xChannelSelector:i,yChannelSelector:r})},gaussianBlur:function(t,e){null!=t||null!=e?this.attr("stdDeviation",function(t){if(!Array.isArray(t))return t;for(var e=0,n=t.length,i=[];e1&&(D*=i=Math.sqrt(i),I*=i),r=(new SVG.Matrix).rotate(P).scale(1/D,1/I).rotate(-P),j=j.transform(r),s=(o=[(F=F.transform(r)).x-j.x,F.y-j.y])[0]*o[0]+o[1]*o[1],a=Math.sqrt(s),o[0]/=a,o[1]/=a,l=s<4?Math.sqrt(1-s/4):0,E===M&&(l*=-1),c=new SVG.Point((F.x+j.x)/2+l*-o[1],(F.y+j.y)/2+l*o[0]),d=new SVG.Point(j.x-c.x,j.y-c.y),h=new SVG.Point(F.x-c.x,F.y-c.y),u=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(u*=-1),f=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(f*=-1),M&&u>f&&(f+=2*Math.PI),!M&&uo.maxX-e.width&&(a=(i=o.maxX-e.width)-this.startPoints.box.x),null!=o.minY&&ro.maxY-e.height&&(s=(r=o.maxY-e.height)-this.startPoints.box.y),null!=o.snapToGrid&&(i-=i%o.snapToGrid,r-=r%o.snapToGrid,a-=a%o.snapToGrid,s-=s%o.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:a,y:s},!0):this.el.move(i,r));return n},t.prototype.end=function(t){var e=this.drag(t);this.el.fire("dragend",{event:t,p:e,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,n){"function"!=typeof e&&"object"!=typeof e||(n=e,e=!0);var i=this.remember("_draggable")||new t(this);return(e=void 0===e||e)?i.init(n||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function t(t){this.el=t,t.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,e,n){var i="string"!=typeof t?t:e[t];return n?i/2:i},this.pointCoords=function(t,e){var n=this.pointsList[t];return{x:this.pointCoord(n[0],e,"t"===t||"b"===t),y:this.pointCoord(n[1],e,"r"===t||"l"===t)}}}t.prototype.init=function(t,e){var n=this.el.bbox();this.options={};var i=this.el.selectize.defaults.points;for(var r in this.el.selectize.defaults)this.options[r]=this.el.selectize.defaults[r],void 0!==e[r]&&(this.options[r]=e[r]);var o=["points","pointsExclude"];for(var r in o){var a=this.options[o[r]];"string"==typeof a?a=a.length>0?a.split(/\s*,\s*/i):[]:"boolean"==typeof a&&"points"===o[r]&&(a=a?i:[]),this.options[o[r]]=a}this.options.points=[i,this.options.points].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)<0}))})),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(n.x,n.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(t):this.selectRect(t),this.observe(),this.cleanup()},t.prototype.selectPoints=function(t){return this.pointSelection.isSelected=t,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},t.prototype.getPointArray=function(){var t=this.el.bbox();return this.el.array().valueOf().map((function(e){return[e[0]-t.x,e[1]-t.y]}))},t.prototype.drawPoints=function(){for(var t=this,e=this.getPointArray(),n=0,i=e.length;n0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y+n[1]).size(this.parameters.box.width-n[0],this.parameters.box.height-n[1])}};break;case"rt":this.calc=function(t,e){var n=this.snapToGrid(t,e,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).size(this.parameters.box.width+n[0],this.parameters.box.height-n[1])}};break;case"rb":this.calc=function(t,e){var n=this.snapToGrid(t,e,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+n[0],this.parameters.box.height+n[1])}};break;case"lb":this.calc=function(t,e){var n=this.snapToGrid(t,e,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).size(this.parameters.box.width-n[0],this.parameters.box.height+n[1])}};break;case"t":this.calc=function(t,e){var n=this.snapToGrid(t,e,2);if(this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).height(this.parameters.box.height-n[1])}};break;case"r":this.calc=function(t,e){var n=this.snapToGrid(t,e,0);if(this.parameters.box.width+n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+n[0])}};break;case"b":this.calc=function(t,e){var n=this.snapToGrid(t,e,0);if(this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+n[1])}};break;case"l":this.calc=function(t,e){var n=this.snapToGrid(t,e,1);if(this.parameters.box.width-n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).width(this.parameters.box.width-n[0])}};break;case"rot":this.calc=function(t,e){var n=t+this.parameters.p.x,i=e+this.parameters.p.y,r=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),o=Math.atan2(i-this.parameters.box.y-this.parameters.box.height/2,n-this.parameters.box.x-this.parameters.box.width/2),a=this.parameters.rotation+180*(o-r)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(a-a%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(t,e){var n=this.snapToGrid(t,e,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),i=this.el.array().valueOf();i[this.parameters.i][0]=this.parameters.pointCoords[0]+n[0],i[this.parameters.i][1]=this.parameters.pointCoords[1]+n[1],this.el.plot(i)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:t}),SVG.on(window,"touchmove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"touchend.resize",(function(){e.done()})),SVG.on(window,"mousemove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"mouseup.resize",(function(){e.done()}))},t.prototype.update=function(t){if(t){var e=this._extractPosition(t),n=this.transformPoint(e.x,e.y),i=n.x-this.parameters.p.x,r=n.y-this.parameters.p.y;this.lastUpdateCall=[i,r],this.calc(i,r),this.el.fire("resizing",{dx:i,dy:r,event:t})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},t.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},t.prototype.snapToGrid=function(t,e,n,i){var r;return void 0!==i?r=[(n+t)%this.options.snapToGrid,(i+e)%this.options.snapToGrid]:(n=null==n?3:n,r=[(this.parameters.box.x+t+(1&n?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+e+(2&n?0:this.parameters.box.height))%this.options.snapToGrid]),t<0&&(r[0]-=this.options.snapToGrid),e<0&&(r[1]-=this.options.snapToGrid),t-=Math.abs(r[0])a.maxX&&(t=a.maxX-r),void 0!==a.minY&&o+ea.maxY&&(e=a.maxY-o),[t,e]},t.prototype.checkAspectRatio=function(t,e){if(!this.options.saveAspectRatio)return t;var n=t.slice(),i=this.parameters.box.width/this.parameters.box.height,r=this.parameters.box.width+t[0],o=this.parameters.box.height-t[1],a=r/o;return ai&&(n[0]=this.parameters.box.width-o*i,e&&(n[0]=-n[0])),n},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new t(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var Lt=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new g(this.ctx),this.ctx.axes=new Z(this.ctx),this.ctx.core=new Mt(this.ctx.el,this.ctx),this.ctx.config=new N({}),this.ctx.data=new B(this.ctx),this.ctx.grid=new V(this.ctx),this.ctx.graphics=new v(this.ctx),this.ctx.coreUtils=new y(this.ctx),this.ctx.crosshairs=new Q(this.ctx),this.ctx.events=new G(this.ctx),this.ctx.exports=new W(this.ctx),this.ctx.localization=new K(this.ctx),this.ctx.options=new S,this.ctx.responsive=new J(this.ctx),this.ctx.series=new E(this.ctx),this.ctx.theme=new tt(this.ctx),this.ctx.formatters=new z(this.ctx),this.ctx.titleSubtitle=new et(this.ctx),this.ctx.legend=new lt(this.ctx),this.ctx.toolbar=new ct(this.ctx),this.ctx.dimensions=new at(this.ctx),this.ctx.updateHelpers=new Ot(this.ctx),this.ctx.zoomPanSelection=new dt(this.ctx),this.ctx.w.globals.tooltip=new vt(this.ctx)}}]),t}(),jt=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"clear",value:function(t){var e=t.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:e})}},{key:"killSVG",value:function(t){t.each((function(t,e){this.removeClass("*"),this.off(),this.stop()}),!0),t.ungroup(),t.clear()}},{key:"clearDomElements",value:function(t){var e=this,n=t.isUpdating,i=this.w.globals.dom.Paper.node;i.parentNode&&i.parentNode.parentNode&&!n&&(i.parentNode.parentNode.style.minHeight="unset");var r=this.w.globals.dom.baseEl;r&&this.ctx.eventList.forEach((function(t){r.removeEventListener(t,e.ctx.events.documentEvent)}));var o=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(o.Paper),o.Paper.remove(),o.elWrap=null,o.elGraphical=null,o.elAnnotations=null,o.elLegendWrap=null,o.baseEl=null,o.elGridRect=null,o.elGridRectMask=null,o.elGridRectMarkerMask=null,o.elForecastMask=null,o.elNonForecastMask=null,o.elDefs=null}}]),t}(),Ft=new WeakMap;return function(){function t(e,n){i(this,t),this.opts=n,this.ctx=this,this.w=new H(n).init(),this.el=e,this.w.globals.cuid=p.randomId(),this.w.globals.chartID=this.w.config.chart.id?p.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Lt(this).initModules(),this.create=p.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return o(t,[{key:"render",value:function(){var t=this;return new Promise((function(e,n){if(null!==t.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),t.w.config.chart.id&&Apex._chartInstances.push({id:t.w.globals.chartID,group:t.w.config.chart.group,chart:t}),t.setLocale(t.w.config.chart.defaultLocale);var i=t.w.config.chart.events.beforeMount;if("function"==typeof i&&i(t,t.w),t.events.fireEvent("beforeMount",[t,t.w]),window.addEventListener("resize",t.windowResizeHandler),function(t,e){var n=!1,i=t.getBoundingClientRect();"none"!==t.style.display&&0!==i.width||(n=!0);var r=new ResizeObserver((function(i){n&&e.call(t,i),n=!0}));t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach((function(t){return r.observe(t)})):r.observe(t),Ft.set(e,r)}(t.el.parentNode,t.parentResizeHandler),!t.css){var r=t.el.getRootNode&&t.el.getRootNode(),o=p.is("ShadowRoot",r),a=t.el.ownerDocument,s=a.getElementById("apexcharts-css");!o&&s||(t.css=document.createElement("style"),t.css.id="apexcharts-css",t.css.textContent='.apexcharts-canvas {\n position: relative;\n user-select: none;\n /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n}\n\n\n.apexcharts-inner {\n position: relative;\n}\n\n.apexcharts-text tspan {\n font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n transition: 0.15s ease all;\n opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0;\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit;\n}\n\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #ECEFF1;\n border-bottom: 1px solid #ddd;\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n font-weight: 600;\n margin-left: 5px;\n}\n\n.apexcharts-tooltip-title:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n font-weight: 600;\n}\n\n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-goals-group, \n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n display: flex;\n}\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px;\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0px;\n margin-right: 10px;\n border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px;\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\n padding: 4px 8px;\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0;\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: bold;\n display: block;\n margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n opacity: 0;\n padding: 9px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #ECEFF1;\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #ECEFF1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n opacity: 0;\n padding: 4px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1;\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none;\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0;\n}\n\n.apexcharts-selection-rect {\n cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible;\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6E8192;\n text-align: center;\n}\n\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(0.76)\n}\n\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n fill: #008FFB;\n}\n\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n position: relative;\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n transform: scale(0.62);\n position: relative;\n left: 1px;\n top: 0px;\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6E8192;\n stroke-width: 2;\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008FFB;\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333;\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0px 6px 2px 6px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: 0.15s ease all;\n pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer;\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee;\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1;\n }\n}\n\n.apexcharts-datalabel.apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n cursor: default;\n pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n from {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.resize-triggers>div {\n background: #eee;\n overflow: auto;\n}\n\n.contract-trigger:before {\n width: 200%;\n height: 200%;\n}',o?r.prepend(t.css):a.head.appendChild(t.css))}var l=t.create(t.w.config.series,{});if(!l)return e(t);t.mount(l).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(l)})).catch((function(t){n(t)}))}else n(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var n=this.w;new Lt(this).initModules();var i=this.w.globals;if(i.noData=!1,i.animationEnded=!1,this.responsive.checkResponsiveConfig(e),n.config.xaxis.convertedCatToNumeric&&new F(n.config).convertCatToNumericXaxis(n.config,this.ctx),null===this.el)return i.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===n.config.chart.type&&(n.config.grid.show=!1,n.config.yaxis[0].show=!1),0===i.svgWidth)return i.animationEnded=!0,null;var r=y.checkComboSeries(t);i.comboCharts=r.comboCharts,i.comboBarCount=r.comboBarCount;var o=t.every((function(t){return t.data&&0===t.data.length}));(0===t.length||o)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(t),this.theme.init(),new T(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),i.noData&&i.collapsedSeries.length!==i.series.length&&!n.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),i.axisCharts&&(this.core.coreCalculations(),"category"!==n.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=n.globals.minX,this.ctx.toolbar.maxX=n.globals.maxX),this.formatters.heatmapLabelFormatters(),new y(this).getLargestMarkerSize(),this.dimensions.plotCoords();var a=this.core.xySettings();this.grid.createGridMask();var s=this.core.plotChartType(t,a),l=new I(this);l.bringForward(),n.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var c={plot:{left:n.globals.translateX,top:n.globals.translateY,width:n.globals.gridWidth,height:n.globals.gridHeight}};return{elGraph:s,xyRatios:a,elInner:n.globals.dom.elGraphical,dimensions:c}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this,i=n.w;return new Promise((function(r,o){if(null===n.el)return o(new Error("Not enough data to display or target element not found"));(null===e||i.globals.allSeriesCollapsed)&&n.series.handleNoData(),"treemap"!==i.config.chart.type&&n.axes.drawAxis(i.config.chart.type,e.xyRatios),n.grid=new V(n);var a=n.grid.drawGrid();n.annotations=new C(n),n.annotations.drawImageAnnos(),n.annotations.drawTextAnnos(),"back"===i.config.grid.position&&a&&i.globals.dom.elGraphical.add(a.el);var s=new $(t.ctx),l=new q(t.ctx);if(null!==a&&(s.xAxisLabelCorrections(a.xAxisTickWidth),l.setYAxisTextAlignments(),i.config.yaxis.map((function(t,e){-1===i.globals.ignoreYAxisIndexes.indexOf(e)&&l.yAxisTitleRotate(e,t.opposite)}))),"back"===i.config.annotations.position&&(i.globals.dom.Paper.add(i.globals.dom.elAnnotations),n.annotations.drawAxesAnnotations()),Array.isArray(e.elGraph))for(var c=0;c0&&i.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),i.globals.axisCharts||i.globals.noData||n.core.resizeNonAxisCharts(),r(n)}))}},{key:"destroy",value:function(){var t,e;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,t=this.parentResizeHandler,(e=Ft.get(t))&&(e.disconnect(),Ft.delete(t));var n=this.w.config.chart.id;n&&Apex._chartInstances.forEach((function(t,e){t.id===p.escapeString(n)&&Apex._chartInstances.splice(e,1)})),new jt(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,n){return e.updateHelpers._extendSeries(t,n)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,n,i,r,o)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,n)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,n)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this;n.w.globals.dataChanged=!0,n.series.getPreviousPaths();for(var i=n.w.config.series.slice(),r=0;r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;n&&(i=n),i.annotations.addXaxisAnnotationExternal(t,e,i)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;n&&(i=n),i.annotations.addYaxisAnnotationExternal(t,e,i)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;n&&(i=n),i.annotations.addPointAnnotationExternal(t,e,i)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=this;e&&(n=e),n.annotations.removeAnnotation(n,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new U(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new U(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new W(this.ctx).dataURI(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=p.escapeString(t),n=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return n&&n.chart}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),n=0;n2?r-2:0),a=2;a@*'+~#";.,=\- \/${}%?`]/g,root:"#"},t.jstree.create=function(e,i){var r=new t.jstree.core(++n),o=i;return i=t.extend(!0,{},t.jstree.defaults,i),o&&o.plugins&&(i.plugins=o.plugins),t.each(i.plugins,(function(t,e){"core"!==t&&(r=r.plugin(e,i[e]))})),t(e).data("jstree",r),r.init(e,i),r},t.jstree.destroy=function(){t(".jstree:jstree").jstree("destroy"),t(l).off(".jstree")},t.jstree.core=function(t){this._id=t,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},t.jstree.reference=function(e){var n=null,i=null;if(!e||!e.id||e.tagName&&e.nodeType||(e=e.id),!i||!i.length)try{i=t(e)}catch(t){}if(!i||!i.length)try{i=t("#"+e.replace(t.jstree.idregex,"\\$&"))}catch(t){}return i&&i.length&&(i=i.closest(".jstree")).length&&(i=i.data("jstree"))?n=i:t(".jstree").each((function(){var i=t(this).data("jstree");if(i&&i._model.data[e])return n=i,!1})),n},t.fn.jstree=function(n){var i="string"==typeof n,r=Array.prototype.slice.call(arguments,1),o=null;return!(!0===n&&!this.length)&&(this.each((function(){var a=t.jstree.reference(this),s=i&&a?a[n]:null;if(o=i&&s?s.apply(a,r):null,a||i||n!==e&&!t.isPlainObject(n)||t.jstree.create(this,n),(a&&!i||!0===n)&&(o=a||!1),null!==o&&o!==e)return!1})),null!==o&&o!==e?o:this)},t.expr.pseudos.jstree=t.expr.createPseudo((function(n){return function(n){return t(n).hasClass("jstree")&&t(n).data("jstree")!==e}})),t.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:t.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(e){e.type="click",t(e.currentTarget).trigger(e)},enter:function(e){e.type="click",t(e.currentTarget).trigger(e)},left:function(e){if(e.preventDefault(),this.is_open(e.currentTarget))this.close_node(e.currentTarget);else{var n=this.get_parent(e.currentTarget);n&&n.id!==t.jstree.root&&this.get_node(n,!0).children(".jstree-anchor").focus()}},up:function(t){t.preventDefault();var e=this.get_prev_dom(t.currentTarget);e&&e.length&&e.children(".jstree-anchor").focus()},right:function(e){if(e.preventDefault(),this.is_closed(e.currentTarget))this.open_node(e.currentTarget,(function(t){this.get_node(t,!0).children(".jstree-anchor").focus()}));else if(this.is_open(e.currentTarget)){var n=this.get_node(e.currentTarget,!0).children(".jstree-children")[0];n&&t(this._firstChild(n)).children(".jstree-anchor").focus()}},down:function(t){t.preventDefault();var e=this.get_next_dom(t.currentTarget);e&&e.length&&e.children(".jstree-anchor").focus()},"*":function(t){this.open_all()},home:function(e){e.preventDefault();var n=this._firstChild(this.get_container_ul()[0]);n&&t(n).children(".jstree-anchor").filter(":visible").focus()},end:function(t){t.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(t){t.preventDefault(),this.edit(t.currentTarget)}}},t.jstree.core.prototype={plugin:function(e,n){var i=t.jstree.plugins[e];return i?(this._data[e]={},i.prototype=this,new i(n,this)):this},init:function(e,n){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=t(e).addClass("jstree jstree-"+this._id),this.settings=n,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter((function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))})).remove(),this.element.html("
    "),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(t.jstree.root)},destroy:function(t){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(t){}t||this.element.empty(),this.teardown()},_create_prototype_node:function(){var t,e,n=l.createElement("LI");return n.setAttribute("role","treeitem"),(t=l.createElement("I")).className="jstree-icon jstree-ocl",t.setAttribute("role","presentation"),n.appendChild(t),(t=l.createElement("A")).className="jstree-anchor",t.setAttribute("href","#"),t.setAttribute("tabindex","-1"),(e=l.createElement("I")).className="jstree-icon jstree-themeicon",e.setAttribute("role","presentation"),t.appendChild(e),n.appendChild(t),t=e=null,n},_kbevent_to_func:function(t){var e=[];t.ctrlKey&&e.push("ctrl"),t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.push({8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"}[t.which]||t.which),e=e.sort().join("-").toLowerCase();var n,i,r=this.settings.core.keyboard;for(n in r)if(r.hasOwnProperty(n)&&("-"!==(i=n)&&"+"!==i&&(i=(i=i.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),i===e))return r[n];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",(function(){return this.className.replace(/jstree[^ ]*|$/gi,"")})),this.element=null},bind:function(){var e="",n=null,i=0;this.element.on("dblclick.jstree",(function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;if(l.selection&&l.selection.empty)l.selection.empty();else if(window.getSelection){var e=window.getSelection();try{e.removeAllRanges(),e.collapse()}catch(t){}}})).on("mousedown.jstree",t.proxy((function(t){t.target===this.element[0]&&(t.preventDefault(),i=+new Date)}),this)).on("mousedown.jstree",".jstree-ocl",(function(t){t.preventDefault()})).on("click.jstree",".jstree-ocl",t.proxy((function(t){this.toggle_node(t.target)}),this)).on("dblclick.jstree",".jstree-anchor",t.proxy((function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(t.target)}),this)).on("click.jstree",".jstree-anchor",t.proxy((function(e){e.preventDefault(),e.currentTarget!==l.activeElement&&t(e.currentTarget).focus(),this.activate_node(e.currentTarget,e)}),this)).on("keydown.jstree",".jstree-anchor",t.proxy((function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===t.which?t.which=39:39===t.which&&(t.which=37));var e=this._kbevent_to_func(t);if(e){var n=e.call(this,t);if(!1===n||!0===n)return n}}),this)).on("load_node.jstree",t.proxy((function(e,n){n.status&&(n.node.id!==t.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(t.proxy((function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var e,n,i=[];for(e=0,n=this._data.core.selected.length;e1){if(o.slice(a).each(t.proxy((function(n,i){if(0===t(i).text().toLowerCase().indexOf(e))return t(i).focus(),s=!0,!1}),this)),s)return;if(o.slice(0,a).each(t.proxy((function(n,i){if(0===t(i).text().toLowerCase().indexOf(e))return t(i).focus(),s=!0,!1}),this)),s)return}if(new RegExp("^"+r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(e)){if(o.slice(a+1).each(t.proxy((function(e,n){if(t(n).text().toLowerCase().charAt(0)===r)return t(n).focus(),s=!0,!1}),this)),s)return;if(o.slice(0,a+1).each(t.proxy((function(e,n){if(t(n).text().toLowerCase().charAt(0)===r)return t(n).focus(),s=!0,!1}),this)),s)return}}),this)).on("init.jstree",t.proxy((function(){var t=this.settings.core.themes;this._data.core.themes.dots=t.dots,this._data.core.themes.stripes=t.stripes,this._data.core.themes.icons=t.icons,this._data.core.themes.ellipsis=t.ellipsis,this.set_theme(t.name||"default",t.url),this.set_theme_variant(t.variant)}),this)).on("loading.jstree",t.proxy((function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}),this)).on("blur.jstree",".jstree-anchor",t.proxy((function(e){this._data.core.focused=null,t(e.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")}),this)).on("focus.jstree",".jstree-anchor",t.proxy((function(e){var n=this.get_node(e.currentTarget);n&&n.id&&(this._data.core.focused=n.id),this.element.find(".jstree-hovered").not(e.currentTarget).mouseleave(),t(e.currentTarget).mouseenter(),this.element.attr("tabindex","-1")}),this)).on("focus.jstree",t.proxy((function(){if(+new Date-i>500&&!this._data.core.focused&&this.settings.core.restore_focus){i=0;var t=this.get_node(this.element.attr("aria-activedescendant"),!0);t&&t.find("> .jstree-anchor").focus()}}),this)).on("mouseenter.jstree",".jstree-anchor",t.proxy((function(t){this.hover_node(t.currentTarget)}),this)).on("mouseleave.jstree",".jstree-anchor",t.proxy((function(t){this.dehover_node(t.currentTarget)}),this))},unbind:function(){this.element.off(".jstree"),t(l).off(".jstree-"+this._id)},trigger:function(t,e){e||(e={}),e.instance=this,this.element.triggerHandler(t.replace(".jstree","")+".jstree",e)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var n=this.settings.core.strings;return t.isFunction(n)?n.call(this,e):n&&n[e]?n[e]:e},_firstChild:function(t){for(t=t?t.firstChild:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_nextSibling:function(t){for(t=t?t.nextSibling:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_previousSibling:function(t){for(t=t?t.previousSibling:null;null!==t&&1!==t.nodeType;)t=t.previousSibling;return t},get_node:function(e,n){var i;e&&e.id&&(e=e.id),e instanceof jQuery&&e.length&&e[0].id&&(e=e[0].id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(i=t("#"+e.replace(t.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[i.closest(".jstree-node").attr("id")])e=this._model.data[i.closest(".jstree-node").attr("id")];else if((i=this.element.find(e)).length&&this._model.data[i.closest(".jstree-node").attr("id")])e=this._model.data[i.closest(".jstree-node").attr("id")];else{if(!(i=this.element.find(e)).length||!i.hasClass("jstree"))return!1;e=this._model.data[t.jstree.root]}return n&&(e=e.id===t.jstree.root?this.element:t("#"+e.id.replace(t.jstree.idregex,"\\$&"),this.element)),e}catch(t){return!1}},get_path:function(e,n,i){if(!(e=e.parents?e:this.get_node(e))||e.id===t.jstree.root||!e.parents)return!1;var r,o,a=[];for(a.push(i?e.id:e.text),r=0,o=e.parents.length;r0)},is_loaded:function(t){return(t=this.get_node(t))&&t.state.loaded},is_loading:function(t){return(t=this.get_node(t))&&t.state&&t.state.loading},is_open:function(t){return(t=this.get_node(t))&&t.state.opened},is_closed:function(t){return(t=this.get_node(t))&&this.is_parent(t)&&!t.state.opened},is_leaf:function(t){return!this.is_parent(t)},load_node:function(e,n){var i,r,o,a,s;if(t.isArray(e))return this._load_nodes(e.slice(),n),!0;if(!(e=this.get_node(e)))return n&&n.call(this,e,!1),!1;if(e.state.loaded){for(e.state.loaded=!1,o=0,a=e.parents.length;o").html(l),h.text=this.settings.core.force_text?l.text():l.html(),l=n.data(),h.data=l?t.extend(!0,{},l):null,h.state.opened=n.hasClass("jstree-open"),h.state.selected=n.children("a").hasClass("jstree-clicked"),h.state.disabled=n.children("a").hasClass("jstree-disabled"),h.data&&h.data.jstree)for(s in h.data.jstree)h.data.jstree.hasOwnProperty(s)&&(h.state[s]=h.data.jstree[s]);(l=n.children("a").children(".jstree-themeicon")).length&&(h.icon=!l.hasClass("jstree-themeicon-hidden")&&l.attr("rel")),h.state.icon!==e&&(h.icon=h.state.icon),h.icon!==e&&null!==h.icon&&""!==h.icon||(h.icon=!0),l=n.children("ul").children("li");do{c="j"+this._id+"_"+ ++this._cnt}while(d[c]);return h.id=h.li_attr.id?h.li_attr.id.toString():c,l.length?(l.each(t.proxy((function(e,n){o=this._parse_model_from_html(t(n),h.id,r),a=this._model.data[o],h.children.push(o),a.children_d.length&&(h.children_d=h.children_d.concat(a.children_d))}),this)),h.children_d=h.children_d.concat(h.children)):n.hasClass("jstree-closed")&&(h.state.loaded=!1),h.li_attr.class&&(h.li_attr.class=h.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),h.a_attr.class&&(h.a_attr.class=h.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),d[h.id]=h,h.state.selected&&this._data.core.selected.push(h.id),h.id},_parse_model_from_flat_json:function(t,n,i){i=i?i.concat():[],n&&i.unshift(n);var r,o,a,s,l=t.id.toString(),c=this._model.data,d=this._model.default_state,h={id:l,text:t.text||"",icon:t.icon===e||t.icon,parent:n,parents:i,children:t.children||[],children_d:t.children_d||[],data:t.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in d)d.hasOwnProperty(r)&&(h.state[r]=d[r]);if(t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(h.icon=t.data.jstree.icon),h.icon!==e&&null!==h.icon&&""!==h.icon||(h.icon=!0),t&&t.data&&(h.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(h.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(h.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(h.li_attr[r]=t.li_attr[r]);if(h.li_attr.id||(h.li_attr.id=l),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(h.a_attr[r]=t.a_attr[r]);for(t&&t.children&&!0===t.children&&(h.state.loaded=!1,h.children=[],h.children_d=[]),c[h.id]=h,r=0,o=h.children.length;r
  • "+this.get_string("Loading ...")+"
  • "),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(t.jstree.root,(function(e,n){n&&(this.get_container_ul()[0].className=i,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(t.extend(!0,{},this._data.core.state),(function(){this.trigger("refresh")}))),this._data.core.state=null}))},refresh_node:function(e){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var n=[],i=[],r=this._data.core.selected.concat([]);i.push(e.id),!0===e.state.opened&&n.push(e.id),this.get_node(e,!0).find(".jstree-open").each((function(){i.push(this.id),n.push(this.id)})),this._load_nodes(i,t.proxy((function(t){this.open_node(n,!1,0),this.select_node(r),this.trigger("refresh_node",{node:e,nodes:t})}),this),!1,!0)},set_id:function(e,n){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var i,r,o=this._model.data,a=e.id;for(n=n.toString(),o[e.parent].children[t.inArray(e.id,o[e.parent].children)]=n,i=0,r=e.parents.length;in.children.length&&(r=n.children.length),i.id||(i.id=!0),!this.check("create_node",i,n,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===i.id&&delete i.id,!(i=this._parse_model_from_json(i,n.id,n.parents.concat())))return!1;for(s=this.get_node(i),(l=[]).push(i),l=l.concat(s.children_d),this.trigger("model",{nodes:l,parent:n.id}),n.children_d=n.children_d.concat(l),c=0,d=n.parents.length;c=r?c+1:c]=n.children[c];return s[r]=i.id,n.children=s,this.redraw_node(n,!0),this.trigger("create_node",{node:this.get_node(i),parent:n.id,position:r}),o&&o.call(this,this.get_node(i)),i.id},rename_node:function(e,n){var i,r,o;if(t.isArray(e)){for(i=0,r=(e=e.slice()).length;if.children.length&&(r=f.children.length),!this.check("move_node",n,f,r,{core:!0,origin:l,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(n.parent===f.id){for(m=f.children.concat(),-1!==(v=t.inArray(n.id,m))&&(m=t.vakata.array_remove(m,v),r>v&&r--),v=[],y=0,b=m.length;y=r?y+1:y]=m[y];v[r]=n.id,f.children=v,this._node_changed(f.id),this.redraw(f.id===t.jstree.root)}else{for((v=n.children_d.concat()).push(n.id),y=0,b=n.parents.length;y=r?y+1:y]=f.children[y];for(m[r]=n.id,f.children=m,f.children_d.push(n.id),f.children_d=f.children_d.concat(n.children_d),n.parent=f.id,(v=f.parents.concat()).unshift(f.id),_=n.parents.length,n.parents=v,v=v.concat(),y=0,b=n.children_d.length;yv.children.length&&(r=v.children.length),!this.check("copy_node",n,v,r,{core:!0,origin:l,is_multi:y&&y._id&&y._id!==this._id,is_foreign:!y||!y._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(g=y?y.get_json(n,{no_id:!0,no_data:!0,no_state:!0}):n))return!1;if(!0===g.id&&delete g.id,!(g=this._parse_model_from_json(g,v.id,v.parents.concat())))return!1;for(u=this.get_node(g),n&&n.state&&!1===n.state.loaded&&(u.state.loaded=!1),(h=[]).push(g),h=h.concat(u.children_d),this.trigger("model",{nodes:h,parent:v.id}),f=0,p=v.parents.length;f=r?f+1:f]=v.children[f];return h[r]=u.id,v.children=h,v.children_d.push(u.id),v.children_d=v.children_d.concat(u.children_d),v.id===t.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(v.id),s||this.redraw(v.id===t.jstree.root),o&&o.call(this,u,v,r),this.trigger("copy_node",{node:u,original:n,parent:v.id,position:r,old_parent:m,old_position:y&&y._id&&m&&y._model.data[m]&&y._model.data[m].children?t.inArray(n.id,y._model.data[m].children):-1,is_multi:y&&y._id&&y._id!==this._id,is_foreign:!y||!y._id,old_instance:y,new_instance:this}),u.id},cut:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var n,a,s,l=[];for(a=0,s=e.length;a"),c=n,d=t("
    ",{css:{position:"absolute",top:"-200px",left:r?"0px":"-1000px",visibility:"hidden"}}).appendTo(l.body),h=t("",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:t.proxy((function(n){n.stopImmediatePropagation(),n.preventDefault();var r,o=s.children(".jstree-rename-input").val(),l=this.settings.core.force_text;""===o&&(o=c),d.remove(),s.replaceWith(a),s.remove(),c=l?c:t("
    ").append(t.parseHTML(c)).html(),e=this.get_node(e),this.set_text(e,c),(r=!!this.rename_node(e,l?t("
    ").text(o).text():t("
    ").append(t.parseHTML(o)).html()))||this.set_text(e,c),this._data.core.focused=f.id,setTimeout(t.proxy((function(){var t=this.get_node(f.id,!0);t.length&&(this._data.core.focused=f.id,t.children(".jstree-anchor").focus())}),this),0),i&&i.call(this,f,r,p),h=null}),this),keydown:function(t){var e=t.which;27===e&&(p=!0,this.value=c),27!==e&&13!==e&&37!==e&&38!==e&&39!==e&&40!==e&&32!==e||t.stopImmediatePropagation(),27!==e&&13!==e||(t.preventDefault(),this.blur())},click:function(t){t.stopImmediatePropagation()},mousedown:function(t){t.stopImmediatePropagation()},keyup:function(t){h.width(Math.min(d.text("pW"+this.value).width(),o))},keypress:function(t){if(13===t.which)return!1}}),u={fontFamily:a.css("fontFamily")||"",fontSize:a.css("fontSize")||"",fontWeight:a.css("fontWeight")||"",fontStyle:a.css("fontStyle")||"",fontStretch:a.css("fontStretch")||"",fontVariant:a.css("fontVariant")||"",letterSpacing:a.css("letterSpacing")||"",wordSpacing:a.css("wordSpacing")||""},s.attr("class",a.attr("class")).append(a.contents().clone()).append(h),a.replaceWith(s),d.css(u),h.css(u).width(Math.min(d.text("pW"+h[0].value).width(),o))[0].select(),void t(l).one("mousedown.jstree touchstart.jstree dnd_start.vakata",(function(e){h&&e.target!==h&&t(h).blur()}))):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,n){if(!e)return!1;if(!0===n){var i=this.settings.core.themes.dir;i||(i=t.jstree.path+"/themes"),n=i+"/"+e+"/style.css"}n&&-1===t.inArray(n,a)&&(t("head").append(''),a.push(n)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(t){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=t,t&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(n,i){var r,o,a,s;if(t.isArray(n)){for(r=0,o=(n=n.slice()).length;r=0&&e.call(n,t[r],+r,t)&&i.push(t[r]);return i},t.jstree.plugins.changed=function(t,e){var n=[];this.trigger=function(t,i){var r,o;if(i||(i={}),"changed"===t.replace(".jstree","")){i.changed={selected:[],deselected:[]};var a={};for(r=0,o=n.length;r-1?u[g[i]]=!0:delete u[g[i]]}if(-1!==d.indexOf("up"))for(;c&&c.id!==t.jstree.root;){for(o=0,i=0,r=c.children.length;i-1}))}if(-1!==a.indexOf("up")&&-1===l.indexOf(o.id)){for(n=0,i=o.parents.length;n0&&o===r))break;s.state[c?"selected":"checked"]=!0,this._data[c?"core":"checkbox"].selected.push(s.id),(a=this.get_node(s,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(c?"jstree-clicked":"jstree-checked"),s=this.get_node(s.parent)}}),this)).on("move_node.jstree",t.proxy((function(e,n){var i,r,o,a,s,l=n.is_multi,c=n.old_parent,d=this.get_node(n.parent),h=this._model.data,u=this.settings.checkbox.tie_selection;if(!l)for(i=this.get_node(c);i&&i.id!==t.jstree.root&&!i.state[u?"selected":"checked"];){for(r=0,o=0,a=i.children.length;o0&&r===a))break;i.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(i.id),(s=this.get_node(i,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),i=this.get_node(i.parent)}for(i=d;i&&i.id!==t.jstree.root;){for(r=0,o=0,a=i.children.length;o-1&&l.push(c)}var d=this.get_node(a,!0),h=l.length>0&&l.length250)&&t.vakata.context.hide(),r=0}),this)).on("touchstart.jstree",".jstree-anchor",(function(i){i.originalEvent&&i.originalEvent.changedTouches&&i.originalEvent.changedTouches[0]&&(e=i.originalEvent.changedTouches[0].clientX,n=i.originalEvent.changedTouches[0].clientY,o=setTimeout((function(){t(i.currentTarget).trigger("contextmenu",!0)}),750))})).on("touchmove.vakata.jstree",(function(i){o&&i.originalEvent&&i.originalEvent.changedTouches&&i.originalEvent.changedTouches[0]&&(Math.abs(e-i.originalEvent.changedTouches[0].clientX)>10||Math.abs(n-i.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(o),t.vakata.context.hide())})).on("touchend.vakata.jstree",(function(t){o&&clearTimeout(o)})),t(l).on("context_hide.vakata.jstree",t.proxy((function(e,n){this._data.contextmenu.visible=!1,t(n.reference).removeClass("jstree-context")}),this))},this.teardown=function(){this._data.contextmenu.visible&&t.vakata.context.hide(),i.teardown.call(this)},this.show_contextmenu=function(n,i,r,o){if(!(n=this.get_node(n))||n.id===t.jstree.root)return!1;var a=this.settings.contextmenu,s=this.get_node(n,!0).children(".jstree-anchor"),l=!1,c=!1;(a.show_at_node||i===e||r===e)&&(l=s.offset(),i=l.left,r=l.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(n)&&this.activate_node(n,o),c=a.items,t.isFunction(c)&&(c=c.call(this,n,t.proxy((function(t){this._show_contextmenu(n,i,r,t)}),this))),t.isPlainObject(c)&&this._show_contextmenu(n,i,r,c)},this._show_contextmenu=function(e,n,i,r){var o=this.get_node(e,!0).children(".jstree-anchor");t(l).one("context_show.vakata.jstree",t.proxy((function(e,n){var i="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";t(n.element).addClass(i),o.addClass("jstree-context")}),this)),this._data.contextmenu.visible=!0,t.vakata.context.show(o,{x:n,y:i},r),this.trigger("show_contextmenu",{node:e,x:n,y:i})}},function(t){var e=!1,n={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};t.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){t(l).triggerHandler("context_"+e+".vakata",{reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}})},_execute:function(e){return!(!(e=n.items[e])||e._disabled&&(!t.isFunction(e._disabled)||e._disabled({item:e,reference:n.reference,element:n.element}))||!e.action)&&e.action.call(null,{item:e,reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}})},_parse:function(e,i){if(!e)return!1;i||(n.html="",n.items=[]);var r,o="",a=!1;return i&&(o+=""),i||(n.html=o,t.vakata.context._trigger("parse")),o.length>10&&o},_show_submenu:function(n){if((n=t(n)).length&&n.children("ul").length){var i=n.children("ul"),r=n.offset().left,o=r+n.outerWidth(),a=n.offset().top,s=i.width(),l=i.height(),c=t(window).width()+t(window).scrollLeft(),d=t(window).height()+t(window).scrollTop();e?n[o-(s+10+n.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):n[o+s>c&&r>c-o?"addClass":"removeClass"]("vakata-context-right"),a+l+10>d&&i.css("bottom","-1px"),n.hasClass("vakata-context-right")?rf&&(c=f-(h+20)),d+u+20>p&&(d=p-(u+20)),n.element.css({left:c,top:d}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),n.is_visible=!0,t.vakata.context._trigger("show"))},hide:function(){n.is_visible&&(n.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),n.is_visible=!1,t.vakata.context._trigger("hide"))}},t((function(){e="rtl"===t(l.body).css("direction");var i=!1;n.element=t("
      "),n.element.on("mouseenter","li",(function(e){e.stopImmediatePropagation(),t.contains(this,e.relatedTarget)||(i&&clearTimeout(i),n.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),t(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),t.vakata.context._show_submenu(this))})).on("mouseleave","li",(function(e){t.contains(this,e.relatedTarget)||t(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")})).on("mouseleave",(function(e){t(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),t.vakata.context.settings.hide_onmouseleave&&(i=setTimeout((function(){t.vakata.context.hide()}),t.vakata.context.settings.hide_onmouseleave))})).on("click","a",(function(e){e.preventDefault(),t(this).blur().parent().hasClass("vakata-context-disabled")||!1===t.vakata.context._execute(t(this).attr("rel"))||t.vakata.context.hide()})).on("keydown","a",(function(e){var i=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),t(e.currentTarget).trigger(e);break;case 37:n.is_visible&&(n.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 38:n.is_visible&&((i=n.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(i=n.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),i.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 39:n.is_visible&&(n.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 40:n.is_visible&&((i=n.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(i=n.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),i.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 27:t.vakata.context.hide(),e.preventDefault()}})).on("keydown",(function(t){t.preventDefault();var e=n.element.find(".vakata-contextmenu-shortcut-"+t.which).parent();e.parent().not(".vakata-context-disabled")&&e.click()})),t(l).on("mousedown.vakata.jstree",(function(e){n.is_visible&&n.element[0]!==e.target&&!t.contains(n.element[0],e.target)&&t.vakata.context.hide()})).on("context_show.vakata.jstree",(function(t,i){n.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),e&&n.element.addClass("vakata-context-rtl").css("direction","rtl"),n.element.find("ul").hide().end()}))}))}(t),t.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},t.jstree.plugins.dnd=function(e,n){this.init=function(t,e){n.init.call(this,t,e),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in l.createElement("span")},this.bind=function(){n.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",t.proxy((function(e){if(this.settings.dnd.large_drag_target&&t(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var n=this.get_node(e.target),i=this.is_selected(n)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=i>1?i+" "+this.get_string("nodes"):this.get_text(e.currentTarget);if(this.settings.core.force_text&&(r=t.vakata.html.escape(r)),n&&n.id&&n.id!==t.jstree.root&&(1===e.which||"touchstart"===e.type||"dragstart"===e.type)&&(!0===this.settings.dnd.is_draggable||t.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,i>1?this.get_top_selected(!0):[n],e))){if(c={jstree:!0,origin:this,obj:this.get_node(n,!0),nodes:i>1?this.get_top_selected():[n.id]},d=e.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),t.vakata.dnd.start(e,c,'
      '+r+'
      ');t.vakata.dnd._trigger("start",e,{helper:t(),element:d,data:c})}}),this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",(function(e){return e.preventDefault(),t.vakata.dnd._trigger("move",e,{helper:t(),element:d,data:c}),!1})).on("drop.jstree",t.proxy((function(e){return e.preventDefault(),t.vakata.dnd._trigger("stop",e,{helper:t(),element:d,data:c}),!1}),this))},this.redraw_node=function(t,e,i,r){if((t=n.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)t.setAttribute("draggable",!0);else{var o,a,s=null;for(o=0,a=t.childNodes.length;o 
      ').hide();t(l).on("dragover.vakata.jstree",(function(e){d&&t.vakata.dnd._trigger("move",e,{helper:t(),element:d,data:c})})).on("drop.vakata.jstree",(function(e){d&&(t.vakata.dnd._trigger("stop",e,{helper:t(),element:d,data:c}),d=null,c=null)})).on("dnd_start.vakata.jstree",(function(t,e){n=!1,r=!1,e&&e.data&&e.data.jstree&&a.appendTo(l.body)})).on("dnd_move.vakata.jstree",(function(s,l){var c=l.event.target!==r.target;if(o&&(l.event&&"dragover"===l.event.type&&!c||clearTimeout(o)),l&&l.data&&l.data.jstree&&(!l.event.target.id||"jstree-marker"!==l.event.target.id)){r=l.event;var d,h,u,f,p,g,m,v,y,b,x,w,_,k,S,C,A=t.jstree.reference(l.event.target),T=!1,D=!1,I=!1;if(A&&A._data&&A._data.dnd)if(a.attr("class","jstree-"+A.get_theme()+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")),S=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey)),l.helper.children().attr("class","jstree-"+A.get_theme()+" jstree-"+A.get_theme()+"-"+A.get_theme_variant()+" "+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[S?"show":"hide"](),l.event.target!==A.element[0]&&l.event.target!==A.get_container_ul()[0]||0!==A.get_container_ul().children().length){if((T=A.settings.dnd.large_drop_target?t(l.event.target).closest(".jstree-node").children(".jstree-anchor"):t(l.event.target).closest(".jstree-anchor"))&&T.length&&T.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(D=T.offset(),I=(l.event.pageY!==e?l.event.pageY:l.event.originalEvent.pageY)-D.top,u=T.outerHeight(),g=Iu-u/3?["a","i","b"]:I>u/2?["i","a","b"]:["i","b","a"],t.each(g,(function(e,r){switch(r){case"b":d=D.left-6,h=D.top,f=A.get_parent(T),p=T.parent().index();break;case"i":_=A.settings.dnd.inside_pos,k=A.get_node(T.parent()),d=D.left-2,h=D.top+u/2+1,f=k.id,p="first"===_?0:"last"===_?k.children.length:Math.min(_,k.children.length);break;case"a":d=D.left-6,h=D.top+u,f=A.get_parent(T),p=T.parent().index()+1}for(m=!0,v=0,y=l.data.nodes.length;vt.inArray(l.data.nodes[v],w.children)&&(x-=1)),!(m=m&&(A&&A.settings&&A.settings.dnd&&!1===A.settings.dnd.check_while_dragging||A.check(b,l.data.origin&&l.data.origin!==A?l.data.origin.get_node(l.data.nodes[v]):l.data.nodes[v],f,x,{dnd:!0,ref:A.get_node(T.parent()),pos:r,origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==A,is_foreign:!l.data.origin})))){A&&A.last_error&&(i=A.last_error());break}var s,I;if("i"===r&&T.parent().is(".jstree-closed")&&A.settings.dnd.open_timeout&&(l.event&&"dragover"===l.event.type&&!c||(o&&clearTimeout(o),o=setTimeout((s=A,I=T,function(){s.open_node(I)}),A.settings.dnd.open_timeout))),m)return(C=A.get_node(f,!0)).hasClass(".jstree-dnd-parent")||(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),C.addClass("jstree-dnd-parent")),n={ins:A,par:f,pos:"i"!==r||"last"!==_||0!==p||A.is_loaded(k)?p:"last"},a.css({left:d+"px",top:h+"px"}).show(),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=S?"copy":"move"),i={},g=!0,!1})),!0===g))return}else{for(m=!0,v=0,y=l.data.nodes.length;v"),escape:function(e){return t.vakata.html.div.text(e).html()},strip:function(e){return t.vakata.html.div.empty().append(t.parseHTML(e)).text()}};var n={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};t.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(n,i,r){r===e&&(r=t.vakata.dnd._get()),r.event=i,t(l).triggerHandler("dnd_"+n+".vakata",r)},_get:function(){return{data:n.data,element:n.element,helper:n.helper}},_clean:function(){n.helper&&n.helper.remove(),n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),n={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},t(l).off("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).off("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop)},_scroll:function(e){if(!n.scroll_e||!n.scroll_l&&!n.scroll_t)return n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),!1;if(!n.scroll_i)return n.scroll_i=setInterval(t.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var i=n.scroll_e.scrollTop(),r=n.scroll_e.scrollLeft();n.scroll_e.scrollTop(i+n.scroll_t*t.vakata.dnd.settings.scroll_speed),n.scroll_e.scrollLeft(r+n.scroll_l*t.vakata.dnd.settings.scroll_speed),i===n.scroll_e.scrollTop()&&r===n.scroll_e.scrollLeft()||t.vakata.dnd._trigger("scroll",n.scroll_e)},start:function(e,i,r){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_drag&&t.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(t){}return n.init_x=e.pageX,n.init_y=e.pageY,n.data=i,n.is_down=!0,n.element=e.currentTarget,n.target=e.target,n.is_touch="touchstart"===e.type,!1!==r&&(n.helper=t("
      ").html(r).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),t(l).on("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).on("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop),!1},drag:function(e){if("touchmove"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_down){if(!n.is_drag){if(!(Math.abs(e.pageX-n.init_x)>(n.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)||Math.abs(e.pageY-n.init_y)>(n.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)))return;n.helper&&(n.helper.appendTo(l.body),n.helper_w=n.helper.outerWidth()),n.is_drag=!0,t(n.target).one("click.vakata",!1),t.vakata.dnd._trigger("start",e)}var i=!1,r=!1,o=!1,a=!1,s=!1,c=!1,d=!1,h=!1,u=!1,f=!1;return n.scroll_t=0,n.scroll_l=0,n.scroll_e=!1,t(t(e.target).parentsUntil("body").addBack().get().reverse()).filter((function(){return/^auto|scroll$/.test(t(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)})).each((function(){var i=t(this),r=i.offset();if(this.scrollHeight>this.offsetHeight&&(r.top+i.height()-e.pageYthis.offsetWidth&&(r.left+i.width()-e.pageXa&&e.pageY-da&&a-(e.pageY-d)c&&e.pageX-hc&&c-(e.pageX-h)o&&(u=o-50),s&&f+n.helper_w>s&&(f=s-(n.helper_w+2)),n.helper.css({left:f+"px",top:u+"px"})),t.vakata.dnd._trigger("move",e),!1}},stop:function(e){if("touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_drag)e.target!==n.target&&t(n.target).off("click.vakata"),t.vakata.dnd._trigger("stop",e);else if("touchend"===e.type&&e.target===n.target){var i=setTimeout((function(){t(e.target).click()}),100);t(e.target).one("click",(function(){i&&clearTimeout(i)}))}return t.vakata.dnd._clean(),!1}}}(t),t.jstree.defaults.massload=null,t.jstree.plugins.massload=function(e,n){this.init=function(t,e){this._data.massload={},n.init.call(this,t,e)},this._load_nodes=function(e,i,r,o){var a,s,l,c=this.settings.massload,d=(JSON.stringify(e),[]),h=this._model.data;if(!r){for(a=0,s=e.length;a32&&(i.fuzzy=!1),i.fuzzy&&(r=1<=p;s--)if(v=o[t.charAt(s-1)],m[s]=0===n?(m[s+1]<<1|1)&v:(m[s+1]<<1|1)&v|(f[s+1]|f[s])<<1|1|f[s+1],m[s]&r&&(_=a(n,s-1))<=b){if(b=_,x=s-1,k.push(x),!(x>l))break;p=Math.max(1,2*l-x)}if(a(n+1,l)>b)break;f=m}return{isMatch:x>=0,score:_}},!0===n?{search:s}:s(n)},t.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(t),t.jstree.defaults.sort=function(t,e){return this.get_text(t)>this.get_text(e)?1:-1},t.jstree.plugins.sort=function(e,n){this.bind=function(){n.bind.call(this),this.element.on("model.jstree",t.proxy((function(t,e){this.sort(e.parent,!0)}),this)).on("rename_node.jstree create_node.jstree",t.proxy((function(t,e){this.sort(e.parent||e.node.parent,!1),this.redraw_node(e.parent||e.node.parent,!0)}),this)).on("move_node.jstree copy_node.jstree",t.proxy((function(t,e){this.sort(e.parent,!1),this.redraw_node(e.parent,!0)}),this))},this.sort=function(e,n){var i,r;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(t.proxy(this.settings.sort,this)),n))for(i=0,r=e.children_d.length;ie.ttl)&&(e&&e.state&&(e=e.state),e&&t.isFunction(this.settings.state.filter)&&(e=this.settings.state.filter.call(this,e)),!!e&&(this.settings.state.preserve_loaded||delete e.core.loaded,this.element.one("set_state.jstree",(function(n,i){i.instance.trigger("restore_state",{state:t.extend(!0,{},e)})})),this.set_state(e),!0))},this.clear_state=function(){return t.vakata.storage.del(this.settings.state.key)}},function(t,e){t.vakata.storage={set:function(t,e){return window.localStorage.setItem(t,e)},get:function(t){return window.localStorage.getItem(t)},del:function(t){return window.localStorage.removeItem(t)}}}(t),t.jstree.defaults.types={default:{}},t.jstree.defaults.types[t.jstree.root]={},t.jstree.plugins.types=function(n,i){this.init=function(n,r){var o,a;if(r&&r.types&&r.types.default)for(o in r.types)if("default"!==o&&o!==t.jstree.root&&r.types.hasOwnProperty(o))for(a in r.types.default)r.types.default.hasOwnProperty(a)&&r.types[o][a]===e&&(r.types[o][a]=r.types.default[a]);i.init.call(this,n,r),this._model.data[t.jstree.root].type=t.jstree.root},this.refresh=function(e,n){i.refresh.call(this,e,n),this._model.data[t.jstree.root].type=t.jstree.root},this.bind=function(){this.element.on("model.jstree",t.proxy((function(n,i){var r,o,a,s=this._model.data,l=i.nodes,c=this.settings.types,d="default";for(r=0,o=l.length;r .jstree-ocl",t.proxy((function(e){e.stopImmediatePropagation();var n=t.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n).focus()}),this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",t.proxy((function(t){return t.stopImmediatePropagation(),this.is_disabled(t.currentTarget)||this.hover_node(t.currentTarget),!1}),this)).on("mouseleave.jstree",".jstree-node",t.proxy((function(t){this.dehover_node(t.currentTarget)}),this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),n.teardown.call(this)},this.redraw_node=function(e,i,r,o){if(e=n.redraw_node.apply(this,arguments)){var a=f.cloneNode(!0);-1!==t.inArray(e.id,this._data.core.selected)&&(a.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(a.className+=" jstree-wholerow-hovered"),e.insertBefore(a,e.childNodes[0])}return e}},window.customElements&&Object&&Object.create){var p=Object.create(HTMLElement.prototype);p.createdCallback=function(){var e,n={core:{},plugins:[]};for(e in t.jstree.plugins)t.jstree.plugins.hasOwnProperty(e)&&this.attributes[e]&&(n.plugins.push(e),this.getAttribute(e)&&JSON.parse(this.getAttribute(e))&&(n[e]=JSON.parse(this.getAttribute(e))));for(e in t.jstree.defaults.core)t.jstree.defaults.core.hasOwnProperty(e)&&this.attributes[e]&&(n.core[e]=JSON.parse(this.getAttribute(e))||this.getAttribute(e));t(this).jstree(n)};try{window.customElements.define("vakata-jstree",(function(){}),{prototype:p})}catch(t){}}}})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,n,i,r){return e||(e=window),n&&n.fn.dataTable||(n=require("datatables.net")(e,n).$),n.fn.dataTable.Buttons||require("datatables.net-buttons")(e,n),t(n,e,e.document,i,r)}:t(jQuery,window,document)}((function(t,e,n,i,r,o){function a(e,n){C===o&&(C=-1===A.serializeToString(t.parseXML(T["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r")),t.each(n,(function(n,i){if(t.isPlainObject(i)){a(r=e.folder(n),i)}else{if(C){var r,o,s,l=[];for(o=(r=i.childNodes[0]).attributes.length-1;0<=o;o--){s=r.attributes[o].nodeName;var c=r.attributes[o].nodeValue;-1!==s.indexOf(":")&&(l.push({name:s,value:c}),r.removeAttribute(s))}for(o=0,s=l.length;o'+r),r=r.replace(/_dt_b_namespace_token_/g,":")),r=r.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>"),e.file(n,r)}}))}function s(e,n,i){var r=e.createElement(n);return i&&(i.attr&&t(r).attr(i.attr),i.children&&t.each(i.children,(function(t,e){r.appendChild(e)})),i.text&&r.appendChild(e.createTextNode(i.text))),r}function l(t,e){var n,i=t.header[e].length;t.footer&&t.footer[e].length>i&&(i=t.footer[e].length);for(var r=0,a=t.body.length;ri&&(i=n),401*t[1])};try{var C,A=new XMLSerializer}catch(t){}var T={"_rels/.rels":'',"xl/_rels/workbook.xml.rels":'',"[Content_Types].xml":'',"xl/workbook.xml":'',"xl/worksheets/sheet1.xml":'',"xl/styles.xml":''},D=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(t){return t/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(t){return t/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64}];return d.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(t){return t.i18n("buttons.copy","Copy")},action:function(e,i,r,o){this.processing(!0);var a=this,s=(e=k(i,o)).str;r=t("
      ").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});if(o.customize&&(s=o.customize(s,o)),o=t("",f.noCloneChecked=!!dt.cloneNode(!0).lastChild.defaultValue,dt.innerHTML="",f.option=!!dt.lastChild;var gt={thead:[1,"
      ").append(e("").attr({href:"#",tabindex:"-1","data-action":"today",title:this._options.tooltips.today}).append(e("").addClass(this._options.icons.today)))),!this._options.sideBySide&&this._hasDate()&&this._hasTime()){var n=void 0,i=void 0;"times"===this._options.viewMode?(n=this._options.tooltips.selectDate,i=this._options.icons.date):(n=this._options.tooltips.selectTime,i=this._options.icons.time),t.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"togglePicker",title:n}).append(e("").addClass(i))))}return this._options.buttons.showClear&&t.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"clear",title:this._options.tooltips.clear}).append(e("").addClass(this._options.icons.clear)))),this._options.buttons.showClose&&t.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"close",title:this._options.tooltips.close}).append(e("").addClass(this._options.icons.close)))),0===t.length?"":e("").addClass("table-condensed").append(e("").append(e("").append(t)))},l.prototype._getTemplate=function(){var t=e("
      ").addClass("bootstrap-datetimepicker-widget dropdown-menu"),n=e("
      ").addClass("datepicker").append(this._getDatePickerTemplate()),i=e("
      ").addClass("timepicker").append(this._getTimePickerTemplate()),r=e("
        ").addClass("list-unstyled"),o=e("
      • ").addClass("picker-switch"+(this._options.collapse?" accordion-toggle":"")).append(this._getToolbar());return this._options.inline&&t.removeClass("dropdown-menu"),this.use24Hours&&t.addClass("usetwentyfour"),this._isEnabled("s")&&!this.use24Hours&&t.addClass("wider"),this._options.sideBySide&&this._hasDate()&&this._hasTime()?(t.addClass("timepicker-sbs"),"top"===this._options.toolbarPlacement&&t.append(o),t.append(e("
        ").addClass("row").append(n.addClass("col-md-6")).append(i.addClass("col-md-6"))),"bottom"!==this._options.toolbarPlacement&&"default"!==this._options.toolbarPlacement||t.append(o),t):("top"===this._options.toolbarPlacement&&r.append(o),this._hasDate()&&r.append(e("
      • ").addClass(this._options.collapse&&this._hasTime()?"collapse":"").addClass(this._options.collapse&&this._hasTime()&&"times"===this._options.viewMode?"":"show").append(n)),"default"===this._options.toolbarPlacement&&r.append(o),this._hasTime()&&r.append(e("
      • ").addClass(this._options.collapse&&this._hasDate()?"collapse":"").addClass(this._options.collapse&&this._hasDate()&&"times"===this._options.viewMode?"show":"").append(i)),"bottom"===this._options.toolbarPlacement&&r.append(o),t.append(r))},l.prototype._place=function(t){var n=t&&t.data&&t.data.picker||this,i=n._options.widgetPositioning.vertical,r=n._options.widgetPositioning.horizontal,o=void 0,a=(n.component&&n.component.length?n.component:n._element).position(),s=(n.component&&n.component.length?n.component:n._element).offset();if(n._options.widgetParent)o=n._options.widgetParent.append(n.widget);else if(n._element.is("input"))o=n._element.after(n.widget).parent();else{if(n._options.inline)return void(o=n._element.append(n.widget));o=n._element,n._element.children().first().after(n.widget)}if("auto"===i&&(i=s.top+1.5*n.widget.height()>=e(window).height()+e(window).scrollTop()&&n.widget.height()+n._element.outerHeight()e(window).width()?"right":"left"),"top"===i?n.widget.addClass("top").removeClass("bottom"):n.widget.addClass("bottom").removeClass("top"),"right"===r?n.widget.addClass("float-right"):n.widget.removeClass("float-right"),"relative"!==o.css("position")&&(o=o.parents().filter((function(){return"relative"===e(this).css("position")})).first()),0===o.length)throw new Error("datetimepicker component should be placed within a relative positioned container");n.widget.css({top:"top"===i?"auto":a.top+n._element.outerHeight()+"px",bottom:"top"===i?o.outerHeight()-(o===n._element?0:a.top)+"px":"auto",left:"left"===r?(o===n._element?0:a.left)+"px":"auto",right:"left"===r?"auto":o.outerWidth()-n._element.outerWidth()-(o===n._element?0:a.left)+"px"})},l.prototype._fillDow=function(){var t=e("
      "),n=this._viewDate.clone().startOf("w").startOf("d");for(!0===this._options.calendarWeeks&&t.append(e(""),this._options.calendarWeeks&&o.append('"),i.push(o)),a="",r.isBefore(this._viewDate,"M")&&(a+=" old"),r.isAfter(this._viewDate,"M")&&(a+=" new"),this._options.allowMultidate){var l=this._datesFormatted.indexOf(r.format("YYYY-MM-DD"));-1!==l&&r.isSame(this._datesFormatted[l],"d")&&!this.unset&&(a+=" active")}else r.isSame(this._getLastPickedDate(),"d")&&!this.unset&&(a+=" active");this._isValid(r,"d")||(a+=" disabled"),r.isSame(this.getMoment(),"d")&&(a+=" today"),0!==r.day()&&6!==r.day()||(a+=" weekend"),o.append('"),r.add(1,"d")}t.find("tbody").empty().append(i),this._updateMonths(),this._updateYears(),this._updateDecades()}},l.prototype._fillHours=function(){var t=this.widget.find(".timepicker-hours table"),n=this._viewDate.clone().startOf("d"),i=[],r=e("");for(this._viewDate.hour()>11&&!this.use24Hours&&n.hour(12);n.isSame(this._viewDate,"d")&&(this.use24Hours||this._viewDate.hour()<12&&n.hour()<12||this._viewDate.hour()>11);)n.hour()%4==0&&(r=e(""),i.push(r)),r.append('"),n.add(1,"h");t.empty().append(i)},l.prototype._fillMinutes=function(){for(var t=this.widget.find(".timepicker-minutes table"),n=this._viewDate.clone().startOf("h"),i=[],r=1===this._options.stepping?5:this._options.stepping,o=e("");this._viewDate.isSame(n,"h");)n.minute()%(4*r)==0&&(o=e(""),i.push(o)),o.append('"),n.add(r,"m");t.empty().append(i)},l.prototype._fillSeconds=function(){for(var t=this.widget.find(".timepicker-seconds table"),n=this._viewDate.clone().startOf("m"),i=[],r=e("");this._viewDate.isSame(n,"m");)n.second()%20==0&&(r=e(""),i.push(r)),r.append('"),n.add(5,"s");t.empty().append(i)},l.prototype._fillTime=function(){var t=void 0,e=void 0,n=this.widget.find(".timepicker span[data-time-component]");this.use24Hours||(t=this.widget.find(".timepicker [data-action=togglePeriod]"),e=this._getLastPickedDate().clone().add(this._getLastPickedDate().hours()>=12?-12:12,"h"),t.text(this._getLastPickedDate().format("A")),this._isValid(e,"h")?t.removeClass("disabled"):t.addClass("disabled")),n.filter("[data-time-component=hours]").text(this._getLastPickedDate().format(this.use24Hours?"HH":"hh")),n.filter("[data-time-component=minutes]").text(this._getLastPickedDate().format("mm")),n.filter("[data-time-component=seconds]").text(this._getLastPickedDate().format("ss")),this._fillHours(),this._fillMinutes(),this._fillSeconds()},l.prototype._doAction=function(t,n){var r=this._getLastPickedDate();if(e(t.currentTarget).is(".disabled"))return!1;switch(n=n||e(t.currentTarget).data("action")){case"next":var o=i.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.add(i.DatePickerModes[this.currentViewMode].NAV_STEP,o),this._fillDate(),this._viewUpdate(o);break;case"previous":var a=i.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.subtract(i.DatePickerModes[this.currentViewMode].NAV_STEP,a),this._fillDate(),this._viewUpdate(a);break;case"pickerSwitch":this._showMode(1);break;case"selectMonth":var s=e(t.target).closest("tbody").find("span").index(e(t.target));this._viewDate.month(s),this.currentViewMode===this.MinViewModeNumber?(this._setValue(r.clone().year(this._viewDate.year()).month(this._viewDate.month()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("M");break;case"selectYear":var l=parseInt(e(t.target).text(),10)||0;this._viewDate.year(l),this.currentViewMode===this.MinViewModeNumber?(this._setValue(r.clone().year(this._viewDate.year()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("YYYY");break;case"selectDecade":var c=parseInt(e(t.target).data("selection"),10)||0;this._viewDate.year(c),this.currentViewMode===this.MinViewModeNumber?(this._setValue(r.clone().year(this._viewDate.year()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("YYYY");break;case"selectDay":var d=this._viewDate.clone();e(t.target).is(".old")&&d.subtract(1,"M"),e(t.target).is(".new")&&d.add(1,"M");var h=d.date(parseInt(e(t.target).text(),10)),u=0;this._options.allowMultidate?-1!==(u=this._datesFormatted.indexOf(h.format("YYYY-MM-DD")))?this._setValue(null,u):this._setValue(h,this._getLastPickedDateIndex()+1):this._setValue(h,this._getLastPickedDateIndex()),this._hasTime()||this._options.keepOpen||this._options.inline||this._options.allowMultidate||this.hide();break;case"incrementHours":var f=r.clone().add(1,"h");this._isValid(f,"h")&&this._setValue(f,this._getLastPickedDateIndex());break;case"incrementMinutes":var p=r.clone().add(this._options.stepping,"m");this._isValid(p,"m")&&this._setValue(p,this._getLastPickedDateIndex());break;case"incrementSeconds":var g=r.clone().add(1,"s");this._isValid(g,"s")&&this._setValue(g,this._getLastPickedDateIndex());break;case"decrementHours":var m=r.clone().subtract(1,"h");this._isValid(m,"h")&&this._setValue(m,this._getLastPickedDateIndex());break;case"decrementMinutes":var v=r.clone().subtract(this._options.stepping,"m");this._isValid(v,"m")&&this._setValue(v,this._getLastPickedDateIndex());break;case"decrementSeconds":var y=r.clone().subtract(1,"s");this._isValid(y,"s")&&this._setValue(y,this._getLastPickedDateIndex());break;case"togglePeriod":this._setValue(r.clone().add(r.hours()>=12?-12:12,"h"),this._getLastPickedDateIndex());break;case"togglePicker":var b=e(t.target),x=b.closest("a"),w=b.closest("ul"),_=w.find(".show"),k=w.find(".collapse:not(.show)"),S=b.is("span")?b:b.find("span"),C=void 0;if(_&&_.length){if((C=_.data("collapse"))&&C.transitioning)return!0;_.collapse?(_.collapse("hide"),k.collapse("show")):(_.removeClass("show"),k.addClass("show")),S.toggleClass(this._options.icons.time+" "+this._options.icons.date),S.hasClass(this._options.icons.date)?x.attr("title",this._options.tooltips.selectDate):x.attr("title",this._options.tooltips.selectTime)}break;case"showPicker":this.widget.find(".timepicker > div:not(.timepicker-picker)").hide(),this.widget.find(".timepicker .timepicker-picker").show();break;case"showHours":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-hours").show();break;case"showMinutes":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-minutes").show();break;case"showSeconds":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-seconds").show();break;case"selectHour":var A=parseInt(e(t.target).text(),10);this.use24Hours||(r.hours()>=12?12!==A&&(A+=12):12===A&&(A=0)),this._setValue(r.clone().hours(A),this._getLastPickedDateIndex()),this._isEnabled("a")||this._isEnabled("m")||this._options.keepOpen||this._options.inline?this._doAction(t,"showPicker"):this.hide();break;case"selectMinute":this._setValue(r.clone().minutes(parseInt(e(t.target).text(),10)),this._getLastPickedDateIndex()),this._isEnabled("a")||this._isEnabled("s")||this._options.keepOpen||this._options.inline?this._doAction(t,"showPicker"):this.hide();break;case"selectSecond":this._setValue(r.clone().seconds(parseInt(e(t.target).text(),10)),this._getLastPickedDateIndex()),this._isEnabled("a")||this._options.keepOpen||this._options.inline?this._doAction(t,"showPicker"):this.hide();break;case"clear":this.clear();break;case"close":this.hide();break;case"today":var T=this.getMoment();this._isValid(T,"d")&&this._setValue(T,this._getLastPickedDateIndex())}return!1},l.prototype.hide=function(){var t=!1;this.widget&&(this.widget.find(".collapse").each((function(){var n=e(this).data("collapse");return!n||!n.transitioning||(t=!0,!1)})),t||(this.component&&this.component.hasClass("btn")&&this.component.toggleClass("active"),this.widget.hide(),e(window).off("resize",this._place()),this.widget.off("click","[data-action]"),this.widget.off("mousedown",!1),this.widget.remove(),this.widget=!1,this._notifyEvent({type:i.Event.HIDE,date:this._getLastPickedDate().clone()}),void 0!==this.input&&this.input.blur(),this._viewDate=this._getLastPickedDate().clone()))},l.prototype.show=function(){var t=void 0,n={year:function(t){return t.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(t){return t.date(1).hours(0).seconds(0).minutes(0)},day:function(t){return t.hours(0).seconds(0).minutes(0)},hour:function(t){return t.seconds(0).minutes(0)},minute:function(t){return t.seconds(0)}};if(void 0!==this.input){if(this.input.prop("disabled")||!this._options.ignoreReadonly&&this.input.prop("readonly")||this.widget)return;void 0!==this.input.val()&&0!==this.input.val().trim().length?this._setValue(this._parseInputDate(this.input.val().trim()),0):this.unset&&this._options.useCurrent&&(t=this.getMoment(),"string"==typeof this._options.useCurrent&&(t=n[this._options.useCurrent](t)),this._setValue(t,0))}else this.unset&&this._options.useCurrent&&(t=this.getMoment(),"string"==typeof this._options.useCurrent&&(t=n[this._options.useCurrent](t)),this._setValue(t,0));this.widget=this._getTemplate(),this._fillDow(),this._fillMonths(),this.widget.find(".timepicker-hours").hide(),this.widget.find(".timepicker-minutes").hide(),this.widget.find(".timepicker-seconds").hide(),this._update(),this._showMode(),e(window).on("resize",{picker:this},this._place),this.widget.on("click","[data-action]",e.proxy(this._doAction,this)),this.widget.on("mousedown",!1),this.component&&this.component.hasClass("btn")&&this.component.toggleClass("active"),this._place(),this.widget.show(),void 0!==this.input&&this._options.focusOnShow&&!this.input.is(":focus")&&this.input.focus(),this._notifyEvent({type:i.Event.SHOW})},l.prototype.destroy=function(){this.hide(),this._element.removeData(i.DATA_KEY),this._element.removeData("date")},l.prototype.disable=function(){this.hide(),this.component&&this.component.hasClass("btn")&&this.component.addClass("disabled"),void 0!==this.input&&this.input.prop("disabled",!0)},l.prototype.enable=function(){this.component&&this.component.hasClass("btn")&&this.component.removeClass("disabled"),void 0!==this.input&&this.input.prop("disabled",!1)},l.prototype.toolbarPlacement=function(t){if(0===arguments.length)return this._options.toolbarPlacement;if("string"!=typeof t)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===s.indexOf(t))throw new TypeError("toolbarPlacement() parameter must be one of ("+s.join(", ")+") value");this._options.toolbarPlacement=t,this.widget&&(this.hide(),this.show())},l.prototype.widgetPositioning=function(t){if(0===arguments.length)return e.extend({},this._options.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===a.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+a.join(", ")+")");this._options.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===o.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+o.join(", ")+")");this._options.widgetPositioning.vertical=t.vertical}this._update()},l.prototype.widgetParent=function(t){if(0===arguments.length)return this._options.widgetParent;if("string"==typeof t&&(t=e(t)),null!==t&&"string"!=typeof t&&!(t instanceof e))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");this._options.widgetParent=t,this.widget&&(this.hide(),this.show())},l._jQueryHandleThis=function(n,r,o){var a=e(n).data(i.DATA_KEY);if("object"===(void 0===r?"undefined":t(r))&&e.extend({},i.Default,r),a||(a=new l(e(n),r),e(n).data(i.DATA_KEY,a)),"string"==typeof r){if(void 0===a[r])throw new Error('No method named "'+r+'"');return void 0===o?a[r]():a[r](o)}},l._jQueryInterface=function(t,e){return 1===this.length?l._jQueryHandleThis(this[0],t,e):this.each((function(){l._jQueryHandleThis(this,t,e)}))},l}(i);e(document).on(i.Event.CLICK_DATA_API,i.Selector.DATA_TOGGLE,(function(){var t=l(e(this));0!==t.length&&c._jQueryInterface.call(t,"toggle")})).on(i.Event.CHANGE,"."+i.ClassName.INPUT,(function(t){var n=l(e(this));0!==n.length&&c._jQueryInterface.call(n,"_change",t)})).on(i.Event.BLUR,"."+i.ClassName.INPUT,(function(t){var n=l(e(this)),r=n.data(i.DATA_KEY);0!==n.length&&(r._options.debug||window.debug||c._jQueryInterface.call(n,"hide",t))})).on(i.Event.KEYDOWN,"."+i.ClassName.INPUT,(function(t){var n=l(e(this));0!==n.length&&c._jQueryInterface.call(n,"_keydown",t)})).on(i.Event.KEYUP,"."+i.ClassName.INPUT,(function(t){var n=l(e(this));0!==n.length&&c._jQueryInterface.call(n,"_keyup",t)})).on(i.Event.FOCUS,"."+i.ClassName.INPUT,(function(t){var n=l(e(this)),r=n.data(i.DATA_KEY);0!==n.length&&r._options.allowInputToggle&&c._jQueryInterface.call(n,"show",t)})),e.fn[i.NAME]=c._jQueryInterface,e.fn[i.NAME].Constructor=c,e.fn[i.NAME].noConflict=function(){return e.fn[i.NAME]=r,c._jQueryInterface}}(jQuery)}(),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}((function(t,e){function n(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var t=new Date;return n(t.getFullYear(),t.getMonth(),t.getDate())}function r(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function o(n,i){return function(){return i!==e&&t.fn.datepicker.deprecated(i),this[n].apply(this,arguments)}}var a,s=(a={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),n=0,i=this.length;n]/g)||[]).length<=0||t(n).length>0)}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var r=this.o=t.extend({},this._o),o=r.language;p[o]||(o=o.split("-")[0],p[o]||(o=u.language)),r.language=o,r.startView=this._resolveViewName(r.startView),r.minViewMode=this._resolveViewName(r.minViewMode),r.maxViewMode=this._resolveViewName(r.maxViewMode),r.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,r.startView)),!0!==r.multidate&&(r.multidate=Number(r.multidate)||!1,!1!==r.multidate&&(r.multidate=Math.max(0,r.multidate))),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var a=g.parseFormat(r.format);r.startDate!==-1/0&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=g.parseDate(r.startDate,a,r.language,r.assumeNearbyYear):r.startDate=-1/0),r.endDate!==1/0&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=g.parseDate(r.endDate,a,r.language,r.assumeNearbyYear):r.endDate=1/0),r.daysOfWeekDisabled=this._resolveDaysOfWeek(r.daysOfWeekDisabled||[]),r.daysOfWeekHighlighted=this._resolveDaysOfWeek(r.daysOfWeekHighlighted||[]),r.datesDisabled=r.datesDisabled||[],t.isArray(r.datesDisabled)||(r.datesDisabled=r.datesDisabled.split(",")),r.datesDisabled=t.map(r.datesDisabled,(function(t){return g.parseDate(t,a,r.language,r.assumeNearbyYear)}));var s=String(r.orientation).toLowerCase().split(/\s+/g),l=r.orientation.toLowerCase();if(s=t.grep(s,(function(t){return/^auto|left|right|top|bottom$/.test(t)})),r.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===s.length)switch(s[0]){case"top":case"bottom":r.orientation.y=s[0];break;case"left":case"right":r.orientation.x=s[0]}else l=t.grep(s,(function(t){return/^left|right$/.test(t)})),r.orientation.x=l[0]||"auto",l=t.grep(s,(function(t){return/^top|bottom$/.test(t)})),r.orientation.y=l[0]||"auto";else;if(r.defaultViewDate instanceof Date||"string"==typeof r.defaultViewDate)r.defaultViewDate=g.parseDate(r.defaultViewDate,a,r.language,r.assumeNearbyYear);else if(r.defaultViewDate){var c=r.defaultViewDate.year||(new Date).getFullYear(),d=r.defaultViewDate.month||0,h=r.defaultViewDate.day||1;r.defaultViewDate=n(c,d,h)}else r.defaultViewDate=i()},_applyEvents:function(t){for(var n,i,r,o=0;or?(this.picker.addClass("datepicker-orient-right"),u+=h-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p=this.o.orientation.y;if("auto"===p&&(p=-o+f-n<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+p),"top"===p?f-=n+parseInt(this.picker.css("padding-top")):f+=d,this.o.rtl){var g=r-(u+h);this.picker.css({top:f,right:g,zIndex:l})}else this.picker.css({top:f,left:u,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),n=[],i=!1;return arguments.length?(t.each(arguments,t.proxy((function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),n.push(e)}),this)),i=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=t.map(n,t.proxy((function(t){return g.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)}),this)),n=t.grep(n,t.proxy((function(t){return!this.dateWithinRange(t)||!t}),this),!0),this.dates.replace(n),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),i?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&i&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,n="";for(this.o.calendarWeeks&&(n+='');e";n+="",this.picker.find(".datepicker-days thead").append(n)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",n=0;n<12;n++)e+=''+p[this.o.language].monthsShort[n]+"";this.picker.find(".datepicker-months td").html(e)},setRange:function(e){e&&e.length?this.range=t.map(e,(function(t){return t.valueOf()})):delete this.range,this.fill()},getClassNames:function(e){var n=[],o=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),s=i();return e.getUTCFullYear()o||e.getUTCFullYear()===o&&e.getUTCMonth()>a)&&n.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&r(e,s)&&n.push("today"),-1!==this.dates.contains(e)&&n.push("active"),this.dateWithinRange(e)||n.push("disabled"),this.dateIsDisabled(e)&&n.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&n.push("highlighted"),this.range&&(e>this.range[0]&&es)&&c.push("disabled"),b===v&&c.push("focused"),l!==t.noop&&((h=l(new Date(b,0,1)))===e?h={}:"boolean"==typeof h?h={enabled:h}:"string"==typeof h&&(h={classes:h}),!1===h.enabled&&c.push("disabled"),h.classes&&(c=c.concat(h.classes.split(/\s+/))),h.tooltip&&(d=h.tooltip)),u+='"+b+"";p.find(".datepicker-switch").text(g+"-"+m),p.find("td").html(u)},fill:function(){var r,o,a=new Date(this.viewDate),s=a.getUTCFullYear(),l=a.getUTCMonth(),c=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,d=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,f=p[this.o.language].today||p.en.today||"",m=p[this.o.language].clear||p.en.clear||"",v=p[this.o.language].titleFormat||p.en.titleFormat,y=i(),b=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&y>=this.o.startDate&&y<=this.o.endDate&&!this.weekOfDateIsDisabled(y);if(!isNaN(s)&&!isNaN(l)){this.picker.find(".datepicker-days .datepicker-switch").text(g.formatDate(a,v,this.o.language)),this.picker.find("tfoot .today").text(f).css("display",b?"table-cell":"none"),this.picker.find("tfoot .clear").text(m).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var x=n(s,l,0),w=x.getUTCDate();x.setUTCDate(w-(x.getUTCDay()-this.o.weekStart+7)%7);var _=new Date(x);x.getUTCFullYear()<100&&_.setUTCFullYear(x.getUTCFullYear()),_.setUTCDate(_.getUTCDate()+42),_=_.valueOf();for(var k,S,C=[];x.valueOf()<_;){if((k=x.getUTCDay())===this.o.weekStart&&(C.push(""),this.o.calendarWeeks)){var A=new Date(+x+(this.o.weekStart-k-7)%7*864e5),T=new Date(Number(A)+(11-A.getUTCDay())%7*864e5),D=new Date(Number(D=n(T.getUTCFullYear(),0,1))+(11-D.getUTCDay())%7*864e5),I=(T-D)/864e5/7+1;C.push('")}(S=this.getClassNames(x)).push("day");var P=x.getUTCDate();this.o.beforeShowDay!==t.noop&&((o=this.o.beforeShowDay(this._utc_to_local(x)))===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&S.push("disabled"),o.classes&&(S=S.concat(o.classes.split(/\s+/))),o.tooltip&&(r=o.tooltip),o.content&&(P=o.content)),S=t.isFunction(t.uniqueSort)?t.uniqueSort(S):t.unique(S),C.push('"),r=null,k===this.o.weekEnd&&C.push(""),x.setUTCDate(x.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(C.join(""));var E=p[this.o.language].monthsTitle||p.en.monthsTitle||"Months",M=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?E:s).end().find("tbody span").removeClass("active");if(t.each(this.dates,(function(t,e){e.getUTCFullYear()===s&&M.eq(e.getUTCMonth()).addClass("active")})),(sh)&&M.addClass("disabled"),s===c&&M.slice(0,d).addClass("disabled"),s===h&&M.slice(u+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var O=this;t.each(M,(function(n,i){var r=new Date(s,n,1),o=O.o.beforeShowMonth(r);o===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1!==o.enabled||t(i).hasClass("disabled")||t(i).addClass("disabled"),o.classes&&t(i).addClass(o.classes),o.tooltip&&t(i).prop("title",o.tooltip)}))}this._fill_yearsView(".datepicker-years","year",10,s,c,h,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,s,c,h,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,s,c,h,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,n=new Date(this.viewDate),i=n.getUTCFullYear(),r=n.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,a=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,s=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,c=1;switch(this.viewMode){case 4:c*=10;case 3:c*=10;case 2:c*=10;case 1:t=Math.floor(i/c)*c<=o,e=Math.floor(i/c)*c+c>s;break;case 0:t=i<=o&&r<=a,e=i>=s&&r>=l}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){var r,o,a;e.preventDefault(),e.stopPropagation(),(r=t(e.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),r.hasClass("clear")&&this.clearDates(),r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),1,1===this.viewMode?(a=r.parent().find("span").index(r),o=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(a)):(a=0,o=Number(r.text()),this.viewDate.setUTCFullYear(o)),this._trigger(g.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(n(o,a,1)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(e){var n=t(e.currentTarget).data("date"),i=new Date(n);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(i)},navArrowsClick:function(e){var n=t(e.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(n*=12*g.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,n),this._trigger(g.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),(!e&&this.o.updateViewDate||"view"===e)&&(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var n=new Date(t);return n.setUTCDate(t.getUTCDate()+e),n},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!(n=t)||isNaN(n.getTime()))return this.o.defaultViewDate;var n;if(!e)return t;var i,r,o=new Date(t.valueOf()),a=o.getUTCDate(),s=o.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)r=-1===e?function(){return o.getUTCMonth()===s}:function(){return o.getUTCMonth()!==i},i=s+e,o.setUTCMonth(i),i=(i+12)%12;else{for(var c=0;c0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,n,i=!1,r=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(n=this.moveAvailableDate(r,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(n=this.moveAvailableDate(r,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?n=this.moveAvailableDate(r,e,"moveDay"):this.weekOfDateIsDisabled(r)||(n=this.moveAvailableDate(r,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(r,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(r,e,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation())},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+g.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var c=function(e,n){t.data(e,"datepicker",this),this.element=t(e),this.inputs=t.map(n.inputs,(function(t){return t.jquery?t[0]:t})),delete n.inputs,this.keepEmptyValues=n.keepEmptyValues,delete n.keepEmptyValues,h.call(t(this.inputs),n).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,(function(e){return t.data(e,"datepicker")})),this.updateDates()};c.prototype={updateDates:function(){this.dates=t.map(this.pickers,(function(t){return t.getUTCDate()})),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,(function(t){return t.valueOf()}));t.each(this.pickers,(function(t,n){n.setRange(e)}))},clearDates:function(){t.each(this.pickers,(function(t,e){e.clearDates()}))},dateUpdated:function(n){if(!this.updating){this.updating=!0;var i=t.data(n.target,"datepicker");if(i!==e){var r=i.getUTCDate(),o=this.keepEmptyValues,a=t.inArray(n.target,this.inputs),s=a-1,l=a+1,c=this.inputs.length;if(-1!==a){if(t.each(this.pickers,(function(t,e){e.getUTCDate()||e!==i&&o||e.setUTCDate(r)})),r=0&&rthis.dates[l])for(;lthis.dates[l];)this.pickers[l++].setUTCDate(r);this.updateDates(),delete this.updating}}}},destroy:function(){t.map(this.pickers,(function(t){t.destroy()})),t(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var d=t.fn.datepicker,h=function(n){var i,r=Array.apply(null,arguments);if(r.shift(),this.each((function(){var e=t(this),o=e.data("datepicker"),a="object"==typeof n&&n;if(!o){var s=function(e,n){var i=t(e).data(),r={},o=new RegExp("^"+n.toLowerCase()+"([A-Z])");function a(t,e){return e.toLowerCase()}for(var s in n=new RegExp("^"+n.toLowerCase()),i)n.test(s)&&(r[s.replace(o,a)]=i[s]);return r}(this,"date"),d=function(e){var n={};if(p[e]||(e=e.split("-")[0],p[e])){var i=p[e];return t.each(f,(function(t,e){e in i&&(n[e]=i[e])})),n}}(t.extend({},u,s,a).language),h=t.extend({},u,d,s,a);e.hasClass("input-daterange")||h.inputs?(t.extend(h,{inputs:h.inputs||e.find("input").toArray()}),o=new c(this,h)):o=new l(this,h),e.data("datepicker",o)}"string"==typeof n&&"function"==typeof o[n]&&(i=o[n].apply(o,r))})),i===e||i instanceof l||i instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+n+" function)");return i};t.fn.datepicker=h;var u=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},f=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=l;var p=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},g={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),n=t.match(this.validParts);if(!e||!e.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:e,parts:n}},parseDate:function(n,r,o,a){if(!n)return e;if(n instanceof Date)return n;if("string"==typeof r&&(r=g.parseFormat(r)),r.toValue)return r.toValue(n,r,o);var s,c,d,h,u,f={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},m={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(n in m&&(n=m[n]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(n)){for(s=n.match(/([\-+]\d+)([dmwy])/gi),n=new Date,h=0;h(new Date).getFullYear()+i&&(n-=100),n):e);var n,i},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};w.yy=w.yyyy,w.M=w.MM=w.mm=w.m,w.dd=w.d,n=i();var _=r.parts.slice();function k(){var t=this.slice(0,s[h].length),e=s[h].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(s.length!==_.length&&(_=t(_).filter((function(e,n){return-1!==t.inArray(n,x)})).toArray()),s.length===_.length){var S,C,A;for(h=0,S=_.length;h",contTemplate:'',footTemplate:''};g.template='
      ").addClass("cw").text("#"));n.isBefore(this._viewDate.clone().endOf("w"));)t.append(e("").addClass("dow").text(n.format("dd"))),n.add(1,"d");this.widget.find(".datepicker-days thead").append(t)},l.prototype._fillMonths=function(){for(var t=[],n=this._viewDate.clone().startOf("y").startOf("d");n.isSame(this._viewDate,"y");)t.push(e("").attr("data-action","selectMonth").addClass("month").text(n.format("MMM"))),n.add(1,"M");this.widget.find(".datepicker-months td").empty().append(t)},l.prototype._updateMonths=function(){var t=this.widget.find(".datepicker-months"),n=t.find("th"),i=t.find("tbody").find("span"),r=this;n.eq(0).find("span").attr("title",this._options.tooltips.prevYear),n.eq(1).attr("title",this._options.tooltips.selectYear),n.eq(2).find("span").attr("title",this._options.tooltips.nextYear),t.find(".disabled").removeClass("disabled"),this._isValid(this._viewDate.clone().subtract(1,"y"),"y")||n.eq(0).addClass("disabled"),n.eq(1).text(this._viewDate.year()),this._isValid(this._viewDate.clone().add(1,"y"),"y")||n.eq(2).addClass("disabled"),i.removeClass("active"),this._getLastPickedDate().isSame(this._viewDate,"y")&&!this.unset&&i.eq(this._getLastPickedDate().month()).addClass("active"),i.each((function(t){r._isValid(r._viewDate.clone().month(t),"M")||e(this).addClass("disabled")}))},l.prototype._getStartEndYear=function(t,e){var n=t/10,i=Math.floor(e/t)*t;return[i,i+9*n,Math.floor(e/n)*n]},l.prototype._updateYears=function(){var t=this.widget.find(".datepicker-years"),e=t.find("th"),n=this._getStartEndYear(10,this._viewDate.year()),i=this._viewDate.clone().year(n[0]),r=this._viewDate.clone().year(n[1]),o="";for(e.eq(0).find("span").attr("title",this._options.tooltips.prevDecade),e.eq(1).attr("title",this._options.tooltips.selectDecade),e.eq(2).find("span").attr("title",this._options.tooltips.nextDecade),t.find(".disabled").removeClass("disabled"),this._options.minDate&&this._options.minDate.isAfter(i,"y")&&e.eq(0).addClass("disabled"),e.eq(1).text(i.year()+"-"+r.year()),this._options.maxDate&&this._options.maxDate.isBefore(r,"y")&&e.eq(2).addClass("disabled"),o+=''+(i.year()-1)+"";!i.isAfter(r,"y");)o+=''+i.year()+"",i.add(1,"y");o+=''+i.year()+"",t.find("td").html(o)},l.prototype._updateDecades=function(){var t=this.widget.find(".datepicker-decades"),e=t.find("th"),n=this._getStartEndYear(100,this._viewDate.year()),i=this._viewDate.clone().year(n[0]),r=this._viewDate.clone().year(n[1]),o=!1,a=!1,s=void 0,l="";for(e.eq(0).find("span").attr("title",this._options.tooltips.prevCentury),e.eq(2).find("span").attr("title",this._options.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(0===i.year()||this._options.minDate&&this._options.minDate.isAfter(i,"y"))&&e.eq(0).addClass("disabled"),e.eq(1).text(i.year()+"-"+r.year()),this._options.maxDate&&this._options.maxDate.isBefore(r,"y")&&e.eq(2).addClass("disabled"),i.year()-10<0?l+=" ":l+=''+(i.year()-10)+"";!i.isAfter(r,"y");)s=i.year()+11,o=this._options.minDate&&this._options.minDate.isAfter(i,"y")&&this._options.minDate.year()<=s,a=this._options.maxDate&&this._options.maxDate.isAfter(i,"y")&&this._options.maxDate.year()<=s,l+=''+i.year()+"",i.add(10,"y");l+=''+i.year()+"",t.find("td").html(l)},l.prototype._fillDate=function(){var t=this.widget.find(".datepicker-days"),n=t.find("th"),i=[],r=void 0,o=void 0,a=void 0,s=void 0;if(this._hasDate()){for(n.eq(0).find("span").attr("title",this._options.tooltips.prevMonth),n.eq(1).attr("title",this._options.tooltips.selectMonth),n.eq(2).find("span").attr("title",this._options.tooltips.nextMonth),t.find(".disabled").removeClass("disabled"),n.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat)),this._isValid(this._viewDate.clone().subtract(1,"M"),"M")||n.eq(0).addClass("disabled"),this._isValid(this._viewDate.clone().add(1,"M"),"M")||n.eq(2).addClass("disabled"),r=this._viewDate.clone().startOf("M").startOf("w").startOf("d"),s=0;s<42;s++){if(0===r.weekday()&&(o=e("
      '+r.week()+"'+r.date()+"
      '+n.format(this.use24Hours?"HH":"hh")+"
      '+n.format("mm")+"
      '+n.format("ss")+"
       
      '+I+"'+P+"
      '+u.templates.leftArrow+''+u.templates.rightArrow+"
      '+g.headTemplate+""+g.footTemplate+'
      '+g.headTemplate+g.contTemplate+g.footTemplate+'
      '+g.headTemplate+g.contTemplate+g.footTemplate+'
      '+g.headTemplate+g.contTemplate+g.footTemplate+'
      '+g.headTemplate+g.contTemplate+g.footTemplate+"
      ",t.fn.datepicker.DPGlobal=g,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=d,this},t.fn.datepicker.version="1.9.0",t.fn.datepicker.deprecated=function(t){var e=window.console;e&&e.warn&&e.warn("DEPRECATED: "+t)},t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',(function(e){var n=t(this);n.data("datepicker")||(e.preventDefault(),h.call(n,"show"))})),t((function(){h.call(t('[data-provide="datepicker-inline"]'))}))})),function(t,e,n){"use strict";var i=function(e,n){this.widget="",this.$element=t(e),this.defaultTime=n.defaultTime,this.disableFocus=n.disableFocus,this.disableMousewheel=n.disableMousewheel,this.isOpen=n.isOpen,this.minuteStep=n.minuteStep,this.modalBackdrop=n.modalBackdrop,this.orientation=n.orientation,this.secondStep=n.secondStep,this.snapToStep=n.snapToStep,this.showInputs=n.showInputs,this.showMeridian=n.showMeridian,this.showSeconds=n.showSeconds,this.template=n.template,this.appendWidgetTo=n.appendWidgetTo,this.showWidgetOnAddonClick=n.showWidgetOnAddonClick,this.icons=n.icons,this.maxHours=n.maxHours,this.explicitMode=n.explicitMode,this.handleDocumentClick=function(t){var e=t.data.scope;e.$element.parent().find(t.target).length||e.$widget.is(t.target)||e.$widget.find(t.target).length||e.hideWidget()},this._init()};i.prototype={constructor:i,_init:function(){var e=this;this.showWidgetOnAddonClick&&this.$element.parent().hasClass("input-group")&&this.$element.parent().hasClass("bootstrap-timepicker")?(this.$element.parent(".input-group.bootstrap-timepicker").find(".input-group-addon").on({"click.timepicker":t.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":t.proxy(this.showWidget,this),"click.timepicker":t.proxy(this.showWidget,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=t(this.getTemplate()).on("click",t.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each((function(){t(this).on({"click.timepicker":function(){t(this).select()},"keydown.timepicker":t.proxy(e.widgetKeydown,e),"keyup.timepicker":t.proxy(e.widgetKeyup,e)})})),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=this.maxHours-1:this.hour--},decrementMinute:function(t){var e;(e=t?this.minute-t:this.minute-this.minuteStep)<0?(this.decrementHour(),this.minute=e+60):this.minute=e},decrementSecond:function(){var t=this.second-this.secondStep;t<0?(this.decrementMinute(!0),this.second=t+60):this.second=t},elementKeydown:function(t){switch(t.which){case 9:if(t.shiftKey){if("hour"===this.highlightedUnit){this.hideWidget();break}this.highlightPrevUnit()}else{if(this.showMeridian&&"meridian"===this.highlightedUnit||this.showSeconds&&"second"===this.highlightedUnit||!this.showMeridian&&!this.showSeconds&&"minute"===this.highlightedUnit){this.hideWidget();break}this.highlightNextUnit()}t.preventDefault(),this.updateFromElementVal();break;case 27:this.updateFromElementVal();break;case 37:t.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:t.preventDefault(),this.highlightNextUnit(),this.updateFromElementVal();break;case 40:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var t=this.$element.get(0);if("selectionStart"in t)return t.selectionStart;if(n.selection){t.focus();var e=n.selection.createRange(),i=n.selection.createRange().text.length;return e.moveStart("character",-t.value.length),e.text.length-i}},getTemplate:function(){var t,e,n,i,r,o;switch(this.showInputs?(e='',n='',i='',r=''):(e='',n='',i='',r=''),o=''+(this.showSeconds?'':"")+(this.showMeridian?'':"")+" "+(this.showSeconds?'":"")+(this.showMeridian?'":"")+''+(this.showSeconds?'':"")+(this.showMeridian?'':"")+"
         
      "+e+' :'+n+":'+i+" '+r+"
        
      ",this.template){case"modal":t='
      ';break;case"dropdown":t='"}return t},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),t(n).off("mousedown.timepicker, touchend.timepicker",this.handleDocumentClick),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="hour",t.setSelectionRange&&setTimeout((function(){e.hour<10?t.setSelectionRange(0,1):t.setSelectionRange(0,2)}),0)},highlightMinute:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="minute",t.setSelectionRange&&setTimeout((function(){e.hour<10?t.setSelectionRange(2,4):t.setSelectionRange(3,5)}),0)},highlightSecond:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="second",t.setSelectionRange&&setTimeout((function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)}),0)},highlightMeridian:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="meridian",t.setSelectionRange&&(this.showSeconds?setTimeout((function(){e.hour<10?t.setSelectionRange(8,10):t.setSelectionRange(9,11)}),0):setTimeout((function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)}),0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}this.hour!==this.maxHours-1?this.hour++:this.hour=0},incrementMinute:function(t){var e;(e=t?this.minute+t:this.minute+this.minuteStep-this.minute%this.minuteStep)>59?(this.incrementHour(),this.minute=e-60):this.minute=e},incrementSecond:function(){var t=this.second+this.secondStep-this.second%this.secondStep;t>59?(this.incrementMinute(!0),this.second=t-60):this.second=t},mousewheel:function(e){if(!this.disableMousewheel){e.preventDefault(),e.stopPropagation();var n=e.originalEvent.wheelDelta||-e.originalEvent.detail,i=null;switch("mousewheel"===e.type?i=-1*e.originalEvent.wheelDelta:"DOMMouseScroll"===e.type&&(i=40*e.originalEvent.detail),i&&(e.preventDefault(),t(this).scrollTop(i+t(this).scrollTop())),this.highlightedUnit){case"minute":n>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":n>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:n>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},changeToNearestStep:function(t,e){return t%e==0?t:Math.round(t%e/e)?(t+(e-t%e))%60:t-t%e},place:function(){if(!this.isInline){var n=this.$widget.outerWidth(),i=this.$widget.outerHeight(),r=t(e).width(),o=t(e).height(),a=t(e).scrollTop(),s=parseInt(this.$element.parents().filter((function(){return"auto"!==t(this).css("z-index")})).first().css("z-index"),10)+10,l=this.component?this.component.parent().offset():this.$element.offset(),c=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),h=l.left,u=l.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.$widget.addClass("timepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(h-=n-d)):(this.$widget.addClass("timepicker-orient-left"),l.left<0?h-=l.left-10:l.left+n>r&&(h=r-n-10));var f,p,g=this.orientation.y;"auto"===g&&(f=-a+l.top-i,p=a+o-(l.top+c+i),g=Math.max(f,p)===p?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+g),"top"===g?u+=c:u-=i+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:u,left:h,zIndex:s})}},remove:function(){t("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(t){if(this.$element.val())this.updateFromElementVal();else if("current"===t){var e=new Date,n=e.getHours(),i=e.getMinutes(),r=e.getSeconds(),o="AM";0!==r&&60===(r=Math.ceil(e.getSeconds()/this.secondStep)*this.secondStep)&&(i+=1,r=0),0!==i&&60===(i=Math.ceil(e.getMinutes()/this.minuteStep)*this.minuteStep)&&(n+=1,i=0),this.showMeridian&&(0===n?n=12:n>=12?(n>12&&(n-=12),o="PM"):o="AM"),this.hour=n,this.minute=i,this.second=r,this.meridian=o,this.update()}else!1===t?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(t)},setTime:function(t,e){if(t){var n,i,r,o,a,s;if("object"==typeof t&&t.getMonth)r=t.getHours(),o=t.getMinutes(),a=t.getSeconds(),this.showMeridian&&(s="AM",r>12&&(s="PM",r%=12),12===r&&(s="PM"));else{if((n=(/a/i.test(t)?1:0)+(/p/i.test(t)?2:0))>2)return void this.clear();if(r=(i=t.replace(/[^0-9\:]/g,"").split(":"))[0]?i[0].toString():i.toString(),this.explicitMode&&r.length>2&&r.length%2!=0)return void this.clear();o=i[1]?i[1].toString():"",a=i[2]?i[2].toString():"",r.length>4&&(a=r.slice(-2),r=r.slice(0,-2)),r.length>2&&(o=r.slice(-2),r=r.slice(0,-2)),o.length>2&&(a=o.slice(-2),o=o.slice(0,-2)),r=parseInt(r,10),o=parseInt(o,10),a=parseInt(a,10),isNaN(r)&&(r=0),isNaN(o)&&(o=0),isNaN(a)&&(a=0),a>59&&(a=59),o>59&&(o=59),r>=this.maxHours&&(r=this.maxHours-1),this.showMeridian?(r>12&&(n=2,r-=12),n||(n=1),0===r&&(r=12),s=1===n?"AM":"PM"):r<12&&2===n?r+=12:r>=this.maxHours?r=this.maxHours-1:(r<0||12===r&&1===n)&&(r=0)}this.hour=r,this.snapToStep?(this.minute=this.changeToNearestStep(o,this.minuteStep),this.second=this.changeToNearestStep(a,this.secondStep)):(this.minute=o,this.second=a),this.meridian=s,this.update(e)}else this.clear()},showWidget:function(){this.isOpen||this.$element.is(":disabled")||(this.$widget.appendTo(this.appendWidgetTo),t(n).on("mousedown.timepicker, touchend.timepicker",{scope:this},this.handleDocumentClick),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",t.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0)},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(t){this.updateElement(),t||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var t=this.hour,e=1===this.minute.toString().length?"0"+this.minute:this.minute,n=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(t),this.$widget.find("input.bootstrap-timepicker-minute").val(e),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(n),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(t),this.$widget.find("span.bootstrap-timepicker-minute").text(e),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(n),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var t=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(t,!0)}},widgetClick:function(e){e.stopPropagation(),e.preventDefault();var n=t(e.target),i=n.closest("a").data("action");i&&this[i](),this.update(),n.is("input")&&n.get(0).setSelectionRange(0,2)},widgetKeydown:function(e){var n=t(e.target),i=n.attr("class").replace("bootstrap-timepicker-","");switch(e.which){case 9:if(e.shiftKey){if("hour"===i)return this.hideWidget()}else if(this.showMeridian&&"meridian"===i||this.showSeconds&&"second"===i||!this.showMeridian&&!this.showSeconds&&"minute"===i)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(e.preventDefault(),i){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),n.get(0).setSelectionRange(0,2);break;case 40:switch(e.preventDefault(),i){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),n.get(0).setSelectionRange(0,2)}},widgetKeyup:function(t){(65===t.which||77===t.which||80===t.which||46===t.which||8===t.which||t.which>=48&&t.which<=57||t.which>=96&&t.which<=105)&&this.updateFromWidgetInputs()}},t.fn.timepicker=function(e){var n=Array.apply(null,arguments);return n.shift(),this.each((function(){var r=t(this),o=r.data("timepicker"),a="object"==typeof e&&e;o||r.data("timepicker",o=new i(this,t.extend({},t.fn.timepicker.defaults,a,t(this).data()))),"string"==typeof e&&o[e].apply(o,n)}))},t.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,snapToStep:!1,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,icons:{up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},maxHours:24,explicitMode:!1},t.fn.timepicker.Constructor=i,t(n).on("focus.timepicker.data-api click.timepicker.data-api",'[data-provide="timepicker"]',(function(e){var n=t(this);n.data("timepicker")||(e.preventDefault(),n.timepicker())}))}(jQuery,window,document);var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(t,e,n){t instanceof String&&(t=String(t));for(var i=t.length,r=0;r").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("
      ").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("
      ").css({width:"100%",height:10}))).appendTo("body"),o=r.children(),a=o.children();i.barWidth=o[0].offsetWidth-o[0].clientWidth,i.bScrollOversize=100===a[0].offsetWidth&&100!==o[0].clientWidth,i.bScrollbarLeft=1!==Math.round(a.offset().left),i.bBounding=!!r[0].getBoundingClientRect().width,r.remove()}t.extend(n.oBrowser,Ut.__browser),n.oScroll.iBarWidth=Ut.__browser.barWidth}function d(t,e,n,r,o,a){var s=!1;if(n!==i){var l=n;s=!0}for(;r!==o;)t.hasOwnProperty(r)&&(l=s?e(l,t[r],r,t):t[r],s=!0,r+=a);return l}function h(e,i){var r=Ut.defaults.column,o=e.aoColumns.length;r=t.extend({},Ut.models.oColumn,r,{nTh:i||n.createElement("th"),sTitle:r.sTitle?r.sTitle:i?i.innerHTML:"",aDataSort:r.aDataSort?r.aDataSort:[o],mData:r.mData?r.mData:o,idx:o}),e.aoColumns.push(r),(r=e.aoPreSearchCols)[o]=t.extend({},Ut.models.oSearch,r[o]),u(e,o,t(i).data())}function u(e,n,r){n=e.aoColumns[n];var a=e.oClasses,s=t(n.nTh);if(!n.sWidthOrig){n.sWidthOrig=s.attr("width")||null;var c=(s.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(n.sWidthOrig=c[1])}r!==i&&null!==r&&(l(r),o(Ut.defaults.column,r,!0),r.mDataProp===i||r.mData||(r.mData=r.mDataProp),r.sType&&(n._sManualType=r.sType),r.className&&!r.sClass&&(r.sClass=r.className),r.sClass&&s.addClass(r.sClass),c=n.sClass,t.extend(n,r),Pt(n,r,"sWidth","sWidthOrig"),c!==n.sClass&&(n.sClass=c+" "+n.sClass),r.iDataSort!==i&&(n.aDataSort=[r.iDataSort]),Pt(n,r,"aDataSort"));var d=n.mData,h=ge(d),u=n.mRender?ge(n.mRender):null;r=function(t){return"string"==typeof t&&-1!==t.indexOf("@")},n._bAttrSrc=t.isPlainObject(d)&&(r(d.sort)||r(d.type)||r(d.filter)),n._setter=null,n.fnGetData=function(t,e,n){var r=h(t,e,i,n);return u&&e?u(r,e,t,n):r},n.fnSetData=function(t,e,n){return me(d)(t,e,n)},"number"!=typeof d&&(e._rowReadObject=!0),e.oFeatures.bSort||(n.bSortable=!1,s.addClass(a.sSortableNone)),e=-1!==t.inArray("asc",n.asSorting),r=-1!==t.inArray("desc",n.asSorting),n.bSortable&&(e||r)?e&&!r?(n.sSortingClass=a.sSortableAsc,n.sSortingClassJUI=a.sSortJUIAscAllowed):!e&&r?(n.sSortingClass=a.sSortableDesc,n.sSortingClassJUI=a.sSortJUIDescAllowed):(n.sSortingClass=a.sSortable,n.sSortingClassJUI=a.sSortJUI):(n.sSortingClass=a.sSortableNone,n.sSortingClassJUI="")}function f(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;ft(t);for(var n=0,i=e.length;nu[f])o(c.length+u[f],d);else if("string"==typeof u[f]){var p=0;for(l=c.length;pe&&t[o]--;-1!=r&&n===i&&t.splice(r,1)}function D(t,e,n,r){var o,a=t.aoData[e],s=function(n,i){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=_(t,e,i,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==a.src)){var l=a.anCells;if(l)if(r!==i)s(l[r],r);else for(n=0,o=l.length;n").appendTo(r));var c=0;for(n=l.length;c=e.fnRecordsDisplay()?0:o,e.iInitDisplayStart=-1),r=Lt(e,"aoPreDrawCallback","preDraw",[e]),-1!==t.inArray(!1,r))ct(e,!1);else{r=[];var a=0,s=(o=e.asStripeClasses).length,l=e.oLanguage,c="ssp"==Nt(e),d=e.aiDisplay,h=e._iDisplayStart,u=e.fnDisplayEnd();if(e.bDrawing=!0,e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,ct(e,!1);else if(c){if(!e.bDestroying&&!n)return void B(e)}else e.iDraw++;if(0!==d.length)for(n=c?e.aoData.length:u,l=c?0:h;l",{class:s?o[0]:""}).append(t("
      ",{valign:"top",colSpan:m(e),class:e.oClasses.sRowEmpty}).html(a))[0];Lt(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],C(e),h,u,d]),Lt(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],C(e),h,u,d]),(o=t(e.nTBody)).children().detach(),o.append(t(r)),Lt(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}}function j(t,e){var n=t.oFeatures,i=n.bFilter;n.bSort&&bt(t),i?V(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,L(t),t._drawHold=!1}function F(e){var n=e.oClasses,i=t(e.nTable);i=t("
      ").insertBefore(i);var r=e.oFeatures,o=t("
      ",{id:e.sTableId+"_wrapper",class:n.sWrapper+(e.nTFoot?"":" "+n.sNoFooter)});e.nHolding=i[0],e.nTableWrapper=o[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var a,s,l,c,d,h,u=e.sDom.split(""),f=0;f")[0],"'"==(c=u[f+1])||'"'==c){for(d="",h=2;u[f+h]!=c;)d+=u[f+h],h++;"H"==d?d=n.sJUIHeader:"F"==d&&(d=n.sJUIFooter),-1!=d.indexOf(".")?(c=d.split("."),l.id=c[0].substr(1,c[0].length-1),l.className=c[1]):"#"==d.charAt(0)?l.id=d.substr(1,d.length-1):l.className=d,f+=h}o.append(l),o=t(l)}else if(">"==s)o=o.parent();else if("l"==s&&r.bPaginate&&r.bLengthChange)a=ot(e);else if("f"==s&&r.bFilter)a=$(e);else if("r"==s&&r.bProcessing)a=lt(e);else if("t"==s)a=dt(e);else if("i"==s&&r.bInfo)a=J(e);else if("p"==s&&r.bPaginate)a=at(e);else if(0!==Ut.ext.feature.length)for(h=0,c=(l=Ut.ext.feature).length;h',c=o.sSearch;c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l,i=t("
      ",{id:s.f?null:r+"_filter",class:i.sFilter}).append(t("
      ").addClass(n.sLength);return e.aanFeatures.l||(c[0].id=i+"_length"),c.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",o[0].outerHTML)),t("select",c).val(e._iDisplayLength).on("change.DT",(function(n){rt(e,t(this).val()),L(e)})),t(e.nTable).on("length.dt.DT",(function(n,i,r){e===i&&t("select",c).val(r)})),c[0]}function at(e){var n=e.sPaginationType,i=Ut.ext.pager[n],r="function"==typeof i,o=function(t){L(t)};n=t("
      ").addClass(e.oClasses.sPaging+n)[0];var a=e.aanFeatures;return r||i.fnInit(e,n,o),a.p||(n.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(r){var e,n=t._iDisplayStart,s=t._iDisplayLength,l=t.fnRecordsDisplay(),c=-1===s;for(n=c?0:Math.ceil(n/s),s=c?1:Math.ceil(l/s),l=i(n,s),c=0,e=a.p.length;co&&(i=0):"first"==e?i=0:"previous"==e?0>(i=0<=r?i-r:0)&&(i=0):"next"==e?i+r",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).append("
      ").insertBefore(e.nTable)[0]}function ct(e,n){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",n?"block":"none"),Lt(e,null,"processing",[e,n])}function dt(e){var n=t(e.nTable),i=e.oScroll;if(""===i.sX&&""===i.sY)return e.nTable;var r=i.sX,o=i.sY,a=e.oClasses,s=n.children("caption"),l=s.length?s[0]._captionSide:null,c=t(n[0].cloneNode(!1)),d=t(n[0].cloneNode(!1)),h=n.children("tfoot");h.length||(h=null),c=t("
      ",{class:a.sScrollWrapper}).append(t("
      ",{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:r?r?vt(r):null:"100%"}).append(t("
      ",{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:i.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?s:null).append(n.children("thead"))))).append(t("
      ",{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:r?vt(r):null}).append(n)),h&&c.append(t("
      ",{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:r?r?vt(r):null:"100%"}).append(t("
      ",{class:a.sScrollFootInner}).append(d.removeAttr("id").css("margin-left",0).append("bottom"===l?s:null).append(n.children("tfoot")))));var u=(n=c.children())[0];a=n[1];var f=h?n[2]:null;return r&&t(a).on("scroll.DT",(function(t){t=this.scrollLeft,u.scrollLeft=t,h&&(f.scrollLeft=t)})),t(a).css("max-height",o),i.bCollapse||t(a).css("height",o),e.nScrollHead=u,e.nScrollBody=a,e.nScrollFoot=f,e.aoDrawCallback.push({fn:ht,sName:"scrolling"}),c[0]}function ht(n){var r=n.oScroll,o=r.sX,a=r.sXInner,s=r.sY;r=r.iBarWidth;var l=t(n.nScrollHead),c=l[0].style,d=l.children("div"),h=d[0].style,u=d.children("table");d=n.nScrollBody;var g=t(d),m=d.style,v=t(n.nScrollFoot).children("div"),y=v.children("table"),b=t(n.nTHead),x=t(n.nTable),w=x[0],_=w.style,k=n.nTFoot?t(n.nTFoot):null,S=n.oBrowser,C=S.bScrollOversize;oe(n.aoColumns,"nTh");var A,T=[],D=[],I=[],P=[],E=function(t){(t=t.style).paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},M=d.scrollHeight>d.clientHeight;if(n.scrollBarVis!==M&&n.scrollBarVis!==i)n.scrollBarVis=M,f(n);else{if(n.scrollBarVis=M,x.children("thead, tfoot").remove(),k){M=k.clone().prependTo(x);var O=k.find("tr"),L=M.find("tr");M.find("[id]").removeAttr("id")}var j=b.clone().prependTo(x);b=b.find("tr"),M=j.find("tr"),j.find("th, td").removeAttr("tabindex"),j.find("[id]").removeAttr("id"),o||(m.width="100%",l[0].style.width="100%"),t.each(R(n,j),(function(t,e){A=p(n,t),e.style.width=n.aoColumns[A].sWidth})),k&&ut((function(t){t.style.width=""}),L),l=x.outerWidth(),""===o?(_.width="100%",C&&(x.find("tbody").height()>d.offsetHeight||"scroll"==g.css("overflow-y"))&&(_.width=vt(x.outerWidth()-r)),l=x.outerWidth()):""!==a&&(_.width=vt(a),l=x.outerWidth()),ut(E,M),ut((function(n){var i=e.getComputedStyle?e.getComputedStyle(n).width:vt(t(n).width());I.push(n.innerHTML),T.push(i)}),M),ut((function(t,e){t.style.width=T[e]}),b),t(M).css("height",0),k&&(ut(E,L),ut((function(e){P.push(e.innerHTML),D.push(vt(t(e).css("width")))}),L),ut((function(t,e){t.style.width=D[e]}),O),t(L).height(0)),ut((function(t,e){t.innerHTML='
      '+I[e]+"
      ",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=T[e]}),M),k&&ut((function(t,e){t.innerHTML='
      '+P[e]+"
      ",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=D[e]}),L),Math.round(x.outerWidth())d.offsetHeight||"scroll"==g.css("overflow-y")?l+r:l,C&&(d.scrollHeight>d.offsetHeight||"scroll"==g.css("overflow-y"))&&(_.width=vt(O-r)),""!==o&&""===a||It(n,1,"Possible column misalignment",6)):O="100%",m.width=vt(O),c.width=vt(O),k&&(n.nScrollFoot.style.width=vt(O)),!s&&C&&(m.height=vt(w.offsetHeight+r)),o=x.outerWidth(),u[0].style.width=vt(o),h.width=vt(o),a=x.height()>d.clientHeight||"scroll"==g.css("overflow-y"),h[s="padding"+(S.bScrollbarLeft?"Left":"Right")]=a?r+"px":"0px",k&&(y[0].style.width=vt(o),v[0].style.width=vt(o),v[0].style[s]=a?r+"px":"0px"),x.children("colgroup").insertBefore(x.children("thead")),g.trigger("scroll"),!n.bSorted&&!n.bFiltered||n._drawHold||(d.scrollTop=0)}}function ut(t,e,n){for(var i,r,o=0,a=0,s=e.length;a").appendTo(d.find("tbody"));for(d.find("thead, tfoot").remove(),d.append(t(n.nTHead).clone()).append(t(n.nTFoot).clone()),d.find("tfoot th, tfoot td").css("width",""),u=R(n,d.find("thead")[0]),i=0;i").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(i=0;i").css(l||s?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(d).appendTo(y),l&&c?d.width(c):l?(d.css("width","auto"),d.removeAttr("width"),d.width()").css("width",vt(e)).appendTo(i||n.body))[0].offsetWidth,e.remove(),i):0}function gt(e,n){var i=mt(e,n);if(0>i)return null;var r=e.aoData[i];return r.nTr?r.anCells[n]:t("
      ").html(_(e,i,n,"display"))[0]}function mt(t,e){for(var n,i=-1,r=-1,o=0,a=t.aoData.length;oi&&(i=n.length,r=o);return r}function vt(t){return null===t?"0px":"number"==typeof t?0>t?"0px":t+"px":t.match(/\d$/)?t+"px":t}function yt(e){var n=[],r=e.aoColumns,o=e.aaSortingFixed,a=t.isPlainObject(o),s=[],l=function(e){e.length&&!Array.isArray(e[0])?s.push(e):t.merge(s,e)};for(Array.isArray(o)&&l(o),a&&o.pre&&l(o.pre),l(e.aaSorting),a&&o.post&&l(o.post),e=0;eh?1:0))return"asc"===c.dir?d:-d}return(d=n[t])<(h=n[e])?-1:d>h?1:0})):a.sort((function(t,e){var o,a=s.length,l=r[t]._aSortData,c=r[e]._aSortData;for(o=0;ou?1:0}))}t.bSorted=!0}function xt(t){var e=t.aoColumns,n=yt(t);t=t.oLanguage.oAria;for(var i=0,r=e.length;i/g,""),l=o.nTh;l.removeAttribute("aria-sort"),o.bSortable&&(0a?a+1:3))}for(a=0,n=o.length;aa?a+1:3))}e.aLastSort=o}function St(t,e){var n,i=t.aoColumns[e],r=Ut.ext.order[i.sSortDataType];r&&(n=r.call(t.oInstance,t,e,g(t,e)));for(var o,a=Ut.ext.type.order[i.sType+"-pre"],s=0,l=t.aoData.length;s=a.length?[0,n[1]]:n)}))),n.search!==i&&t.extend(e.oPreviousSearch,Q(n.search)),n.columns){for(l=0,o=n.columns.length;l=n&&(e=n-i),e-=e%i,(-1===i||0>e)&&(e=0),t._iDisplayStart=e}function Ft(e,n){e=e.renderer;var i=Ut.ext.renderer[n];return t.isPlainObject(e)&&e[n]?i[e[n]]||i._:"string"==typeof e&&i[e]||i._}function Nt(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function Rt(t,e){var n=Ne.numbers_length,i=Math.floor(n/2);return e<=n?t=se(0,e):t<=i?((t=se(0,n-2)).push("ellipsis"),t.push(e-1)):(t>=e-1-i?t=se(e-(n-2),e):((t=se(t-i+2,t+i-1)).push("ellipsis"),t.push(e-1)),t.splice(0,0,"ellipsis"),t.splice(0,0,0)),t.DT_el="span",t}function Ht(e){t.each({num:function(t){return Re(t,e)},"num-fmt":function(t){return Re(t,e,Jt)},"html-num":function(t){return Re(t,e,Kt)},"html-num-fmt":function(t){return Re(t,e,Kt,Jt)}},(function(t,n){$t.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&($t.type.search[t+e]=$t.type.search.html)}))}function Bt(t,n,i,r,o){return e.moment?t[n](o):e.luxon?t[i](o):r?t[r](o):t}function zt(t,n,i){if(e.moment){var r=e.moment.utc(t,n,i,!0);if(!r.isValid())return null}else if(e.luxon){if(!(r=n?e.luxon.DateTime.fromFormat(t,n):e.luxon.DateTime.fromISO(t)).isValid)return null;r.setLocale(i)}else n?(Be||alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),Be=!0):r=new Date(t);return r}function Yt(t){return function(e,n,r,o){0===arguments.length?(r="en",e=n=null):1===arguments.length?(r="en",n=e,e=null):2===arguments.length&&(r=n,n=e,e=null);var a="datetime-"+n;return Ut.ext.type.order[a]||(Ut.ext.type.detect.unshift((function(t){return t===a&&a})),Ut.ext.type.order[a+"-asc"]=function(t,e){return(t=t.valueOf())===(e=e.valueOf())?0:te?-1:1}),function(s,l){if(null!==s&&s!==i||("--now"===o?(s=new Date,s=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()))):s=""),"type"===l)return a;if(""===s)return"sort"!==l?"":zt("0000-01-01 00:00:00",null,r);if(null!==n&&e===n&&"sort"!==l&&"type"!==l&&!(s instanceof Date))return s;var c=zt(s,e,r);return null===c?s:"sort"===l?c:(s=null===n?Bt(c,"toDate","toJSDate","")[t]():Bt(c,"format","toFormat","toISOString",n),"display"===l?He(s):s)}}}function Wt(t){return function(){var e=[Dt(this[Ut.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Ut.ext.internal[t].apply(this,e)}}var $t,Vt,Xt,Ut=function(e,n){if(this instanceof Ut)return t(e).DataTable(n);n=e,this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new Se(t?Dt(this[$t.iApiIndex]):this)},this.fnAddData=function(e,n){var r=this.api(!0);return e=Array.isArray(e)&&(Array.isArray(e[0])||t.isPlainObject(e[0]))?r.rows.add(e):r.row.add(e),(n===i||n)&&r.draw(),e.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],r=n.oScroll;t===i||t?e.draw(!1):(""!==r.sX||""!==r.sY)&&ht(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===i||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var r=this.api(!0),o=(t=r.rows(t)).settings()[0],a=o.aoData[t[0][0]];return t.remove(),e&&e.call(this,o,a),(n===i||n)&&r.draw(),a},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,r,o,a){o=this.api(!0),null===e||e===i?o.search(t,n,r,a):o.column(e).search(t,n,r,a),o.draw()},this.fnGetData=function(t,e){var n=this.api(!0);if(t!==i){var r=t.nodeName?t.nodeName.toLowerCase():"";return e!==i||"td"==r||"th"==r?n.cell(t,e).data():n.row(t).data()||null}return n.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==i?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();return"TR"==n?e.row(t).index():"TD"==n||"TH"==n?[(t=e.cell(t).index()).row,t.columnVisible,t.column]:null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){t=this.api(!0).page(t),(e===i||e)&&t.draw(!1)},this.fnSetColumnVis=function(t,e,n){t=this.api(!0).column(t).visible(e),(n===i||n)&&t.columns.adjust().draw()},this.fnSettings=function(){return Dt(this[$t.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,r,o){var a=this.api(!0);return n===i||null===n?a.row(e).data(t):a.cell(e,n).data(t),(o===i||o)&&a.columns.adjust(),(r===i||r)&&a.draw(),0},this.fnVersionCheck=$t.fnVersionCheck;var r=this,d=n===i,f=this.length;for(var p in d&&(n={}),this.oApi=this.internal=$t.internal,Ut.ext.internal)p&&(this[p]=Wt(p));return this.each((function(){var e,p={},g=1").appendTo(_)),A.nTHead=r[0];var o=_.children("tbody");if(0===o.length&&(o=t("
      ","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};function mt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?w.merge([t],i):i}function vt(t,e){for(var i=0,n=t.length;i",""]);var bt=/<|&#?\w+;/;function yt(t,e,i,n,a){for(var r,o,s,l,c,d,h=e.createDocumentFragment(),u=[],f=0,p=t.length;f\s*$/g;function It(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Pt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Mt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Et(t,e){var i,n,a,r,o,s;if(1===e.nodeType){if(G.hasData(t)&&(s=G.get(t).events))for(a in G.remove(e,"handle events"),s)for(i=0,n=s[a].length;i").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&a("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){i&&i()}}}));var Ve,Xe=[],Ue=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Xe.pop()||w.expando+"_"+ke.guid++;return this[t]=!0,t}}),w.ajaxPrefilter("json jsonp",(function(e,i,n){var a,r,o,s=!1!==e.jsonp&&(Ue.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ue.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return a=e.jsonpCallback=p(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Ue,"$1"+a):!1!==e.jsonp&&(e.url+=(Se.test(e.url)?"&":"?")+e.jsonp+"="+a),e.converters["script json"]=function(){return o||w.error(a+" was not called"),o[0]},e.dataTypes[0]="json",r=t[a],t[a]=function(){o=arguments},n.always((function(){void 0===r?w(t).removeProp(a):t[a]=r,e[a]&&(e.jsonpCallback=i.jsonpCallback,Xe.push(a)),o&&p(r)&&r(o[0]),o=r=void 0})),"script"})),f.createHTMLDocument=((Ve=m.implementation.createHTMLDocument("").body).innerHTML="
      ",2===Ve.childNodes.length),w.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(f.createHTMLDocument?((n=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(n)):e=m),r=!i&&[],(a=D.exec(t))?[e.createElement(a[1])]:(a=yt([t],e,r),r&&r.length&&w(r).remove(),w.merge([],a.childNodes)));var n,a,r},w.fn.load=function(t,e,i){var n,a,r,o=this,s=t.indexOf(" ");return-1").append(w.parseHTML(t)).find(n):t)})).always(i&&function(t,e){o.each((function(){i.apply(this,r||[t.responseText,e,t])}))}),this},w.expr.pseudos.animated=function(t){return w.grep(w.timers,(function(e){return t===e.elem})).length},w.offset={setOffset:function(t,e,i){var n,a,r,o,s,l,c=w.css(t,"position"),d=w(t),h={};"static"===c&&(t.style.position="relative"),s=d.offset(),r=w.css(t,"top"),l=w.css(t,"left"),("absolute"===c||"fixed"===c)&&-1<(r+l).indexOf("auto")?(o=(n=d.position()).top,a=n.left):(o=parseFloat(r)||0,a=parseFloat(l)||0),p(e)&&(e=e.call(t,i,w.extend({},s))),null!=e.top&&(h.top=e.top-s.top+o),null!=e.left&&(h.left=e.left-s.left+a),"using"in e?e.using.call(t,h):d.css(h)}},w.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){w.offset.setOffset(this,t,e)}));var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],a={top:0,left:0};if("fixed"===w.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===w.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((a=w(t).offset()).top+=w.css(t,"borderTopWidth",!0),a.left+=w.css(t,"borderLeftWidth",!0))}return{top:e.top-a.top-w.css(n,"marginTop",!0),left:e.left-a.left-w.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===w.css(t,"position");)t=t.offsetParent;return t||nt}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i="pageYOffset"===e;w.fn[t]=function(n){return Y(this,(function(t,n,a){var r;if(g(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===a)return r?r[e]:t[n];r?r.scrollTo(i?r.pageXOffset:a,i?a:r.pageYOffset):t[n]=a}),t,n,arguments.length)}})),w.each(["top","left"],(function(t,e){w.cssHooks[e]=Wt(f.pixelPosition,(function(t,i){if(i)return i=Yt(t,e),Ft.test(i)?w(t).position()[e]+"px":i}))})),w.each({Height:"height",Width:"width"},(function(t,e){w.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){w.fn[n]=function(a,r){var o=arguments.length&&(i||"boolean"!=typeof a),s=i||(!0===a||!0===r?"margin":"border");return Y(this,(function(e,i,a){var r;return g(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===a?w.css(e,i,s):w.style(e,i,a,s)}),e,o?a:void 0,o)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){w.fn[e]=function(t){return this.on(e,t)}})),w.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){w.fn[e]=function(t,i){return 0>>0,n=0;n0)for(i=0;i=0?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var R=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,H=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},z={};function Y(t,e,i,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),t&&(z[t]=a),e&&(z[e[0]]=function(){return N(a.apply(this,arguments),e[1],e[2])}),i&&(z[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=$(e,t.localeData()),B[e]=B[e]||function(t){var e,i,n,a=t.match(R);for(e=0,i=a.length;e=0&&H.test(t);)t=t.replace(H,n),H.lastIndex=0,i-=1;return t}var V=/\d/,X=/\d\d/,U=/\d{3}/,q=/\d{4}/,G=/[+-]?\d{6}/,K=/\d\d?/,Z=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,J=/\d{1,3}/,tt=/\d{1,4}/,et=/[+-]?\d{1,6}/,it=/\d+/,nt=/[+-]?\d+/,at=/Z|[+-]\d\d:?\d\d/gi,rt=/Z|[+-]\d\d(?::?\d\d)?/gi,ot=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,st={};function lt(t,e,i){st[t]=D(e)?e:function(t,n){return t&&i?i:e}}function ct(t,e){return c(st,t)?st[t](e._strict,e._locale):new RegExp(dt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,n,a){return e||i||n||a}))))}function dt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ht={};function ut(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),o(e)&&(n=function(t,i){i[e]=w(t)}),i=0;i68?1900:2e3)};var At,Tt=Dt("FullYear",!0);function Dt(t,e){return function(n){return null!=n?(Pt(this,t,n),i.updateOffset(this,e),this):It(this,t)}}function It(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Pt(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&Ct(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Mt(i,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function Mt(t,e){if(isNaN(t)||isNaN(e))return NaN;var i,n=(e%(i=12)+i)%i;return t+=(e-n)/12,1===n?Ct(t)?29:28:31-n%7%2}At=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e=0?(s=new Date(t+400,e,i,n,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,i,n,a,r,o),s}function Yt(t){var e;if(t<100&&t>=0){var i=Array.prototype.slice.call(arguments);i[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Wt(t,e,i){var n=7+e-i;return-((7+Yt(t,0,n).getUTCDay()-e)%7)+n-1}function $t(t,e,i,n,a){var r,o,s=1+7*(e-1)+(7+i-n)%7+Wt(t,n,a);return s<=0?o=St(r=t-1)+s:s>St(t)?(r=t+1,o=s-St(t)):(r=t,o=s),{year:r,dayOfYear:o}}function Vt(t,e,i){var n,a,r=Wt(t.year(),e,i),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?n=o+Xt(a=t.year()-1,e,i):o>Xt(t.year(),e,i)?(n=o-Xt(t.year(),e,i),a=t.year()+1):(a=t.year(),n=o),{week:n,year:a}}function Xt(t,e,i){var n=Wt(t,e,i),a=Wt(t+1,e,i);return(St(t)-n+a)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),j("week",5),j("isoWeek",5),lt("w",K),lt("ww",K,X),lt("W",K),lt("WW",K,X),ft(["w","ww","W","WW"],(function(t,e,i,n){e[n.substr(0,1)]=w(t)}));function Ut(t,e){return t.slice(e,7).concat(t.slice(0,e))}Y("d",0,"do","day"),Y("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),Y("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),Y("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),ft(["dd","ddd","dddd"],(function(t,e,i,n){var a=i._locale.weekdaysParse(t,n,i._strict);null!=a?e.d=a:u(i).invalidWeekday=t})),ft(["d","e","E"],(function(t,e,i,n){e[n]=w(t)}));var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Gt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Kt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Zt(t,e,i){var n,a,r,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(a=At.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=At.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=At.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=At.call(this._weekdaysParse,o))||-1!==(a=At.call(this._shortWeekdaysParse,o))||-1!==(a=At.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=At.call(this._shortWeekdaysParse,o))||-1!==(a=At.call(this._weekdaysParse,o))||-1!==(a=At.call(this._minWeekdaysParse,o))?a:null:-1!==(a=At.call(this._minWeekdaysParse,o))||-1!==(a=At.call(this._weekdaysParse,o))||-1!==(a=At.call(this._shortWeekdaysParse,o))?a:null}var Qt=ot;var Jt=ot;var te=ot;function ee(){function t(t,e){return e.length-t.length}var e,i,n,a,r,o=[],s=[],l=[],c=[];for(e=0;e<7;e++)i=h([2e3,1]).day(e),n=this.weekdaysMin(i,""),a=this.weekdaysShort(i,""),r=this.weekdays(i,""),o.push(n),s.push(a),l.push(r),c.push(n),c.push(a),c.push(r);for(o.sort(t),s.sort(t),l.sort(t),c.sort(t),e=0;e<7;e++)s[e]=dt(s[e]),l[e]=dt(l[e]),c[e]=dt(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function ie(){return this.hours()%12||12}function ne(t,e){Y(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function ae(t,e){return e._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,ie),Y("k",["kk",2],0,(function(){return this.hours()||24})),Y("hmm",0,0,(function(){return""+ie.apply(this)+N(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+ie.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),ne("a",!0),ne("A",!1),E("hour","h"),j("hour",13),lt("a",ae),lt("A",ae),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,X),lt("hh",K,X),lt("kk",K,X),lt("hmm",Z),lt("hmmss",Q),lt("Hmm",Z),lt("Hmmss",Q),ut(["H","HH"],bt),ut(["k","kk"],(function(t,e,i){var n=w(t);e[bt]=24===n?0:n})),ut(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),ut(["h","hh"],(function(t,e,i){e[bt]=w(t),u(i).bigHour=!0})),ut("hmm",(function(t,e,i){var n=t.length-2;e[bt]=w(t.substr(0,n)),e[yt]=w(t.substr(n)),u(i).bigHour=!0})),ut("hmmss",(function(t,e,i){var n=t.length-4,a=t.length-2;e[bt]=w(t.substr(0,n)),e[yt]=w(t.substr(n,2)),e[xt]=w(t.substr(a)),u(i).bigHour=!0})),ut("Hmm",(function(t,e,i){var n=t.length-2;e[bt]=w(t.substr(0,n)),e[yt]=w(t.substr(n))})),ut("Hmmss",(function(t,e,i){var n=t.length-4,a=t.length-2;e[bt]=w(t.substr(0,n)),e[yt]=w(t.substr(n,2)),e[xt]=w(t.substr(a))}));var re,oe=Dt("Hours",!0),se={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ot,monthsShort:Lt,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:Kt,weekdaysShort:Gt,meridiemParse:/[ap]\.?m?\.?/i},le={},ce={};function de(t){return t?t.toLowerCase().replace("_","-"):t}function he(t){var e=null;if(!le[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=re._abbr,require("./locale/"+t),ue(e)}catch(t){}return le[t]}function ue(t,e){var i;return t&&((i=r(e)?pe(t):fe(t,e))?re=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),re._abbr}function fe(t,e){if(null!==e){var i,n=se;if(e.abbr=t,null!=le[t])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=le[t]._config;else if(null!=e.parentLocale)if(null!=le[e.parentLocale])n=le[e.parentLocale]._config;else{if(null==(i=he(e.parentLocale)))return ce[e.parentLocale]||(ce[e.parentLocale]=[]),ce[e.parentLocale].push({name:t,config:e}),null;n=i._config}return le[t]=new P(I(n,e)),ce[t]&&ce[t].forEach((function(t){fe(t.name,t.config)})),ue(t),le[t]}return delete le[t],null}function pe(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return re;if(!n(t)){if(e=he(t))return e;t=[t]}return function(t){for(var e,i,n,a,r=0;r0;){if(n=he(a.slice(0,e).join("-")))return n;if(i&&i.length>=e&&_(a,i,!0)>=e-1)break;e--}r++}return re}(t)}function ge(t){var e,i=t._a;return i&&-2===u(t).overflow&&(e=i[mt]<0||i[mt]>11?mt:i[vt]<1||i[vt]>Mt(i[gt],i[mt])?vt:i[bt]<0||i[bt]>24||24===i[bt]&&(0!==i[yt]||0!==i[xt]||0!==i[wt])?bt:i[yt]<0||i[yt]>59?yt:i[xt]<0||i[xt]>59?xt:i[wt]<0||i[wt]>999?wt:-1,u(t)._overflowDayOfYear&&(evt)&&(e=vt),u(t)._overflowWeeks&&-1===e&&(e=_t),u(t)._overflowWeekday&&-1===e&&(e=kt),u(t).overflow=e),t}function me(t,e,i){return null!=t?t:null!=e?e:i}function ve(t){var e,n,a,r,o,s=[];if(!t._d){for(a=function(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[vt]&&null==t._a[mt]&&function(t){var e,i,n,a,r,o,s,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)r=1,o=4,i=me(e.GG,t._a[gt],Vt(Ee(),1,4).year),n=me(e.W,1),((a=me(e.E,1))<1||a>7)&&(l=!0);else{r=t._locale._week.dow,o=t._locale._week.doy;var c=Vt(Ee(),r,o);i=me(e.gg,t._a[gt],c.year),n=me(e.w,c.week),null!=e.d?((a=e.d)<0||a>6)&&(l=!0):null!=e.e?(a=e.e+r,(e.e<0||e.e>6)&&(l=!0)):a=r}n<1||n>Xt(i,r,o)?u(t)._overflowWeeks=!0:null!=l?u(t)._overflowWeekday=!0:(s=$t(i,n,a,r,o),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=me(t._a[gt],a[gt]),(t._dayOfYear>St(o)||0===t._dayOfYear)&&(u(t)._overflowDayOfYear=!0),n=Yt(o,0,t._dayOfYear),t._a[mt]=n.getUTCMonth(),t._a[vt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=a[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[bt]&&0===t._a[yt]&&0===t._a[xt]&&0===t._a[wt]&&(t._nextDay=!0,t._a[bt]=0),t._d=(t._useUTC?Yt:zt).apply(null,s),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[bt]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(u(t).weekdayMismatch=!0)}}var be=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xe=/Z|[+-]\d\d(?::?\d\d)?/,we=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_e=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ke=/^\/?Date\((\-?\d+)/i;function Se(t){var e,i,n,a,r,o,s=t._i,l=be.exec(s)||ye.exec(s);if(l){for(u(t).iso=!0,e=0,i=we.length;e0&&u(t).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),c+=n.length),z[r]?(n?u(t).empty=!1:u(t).unusedTokens.push(r),pt(r,n,t)):t._strict&&!n&&u(t).unusedTokens.push(r);u(t).charsLeftOver=l-c,s.length>0&&u(t).unusedInput.push(s),t._a[bt]<=12&&!0===u(t).bigHour&&t._a[bt]>0&&(u(t).bigHour=void 0),u(t).parsedDateParts=t._a.slice(0),u(t).meridiem=t._meridiem,t._a[bt]=function(t,e,i){var n;if(null==i)return e;return null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}(t._locale,t._a[bt],t._meridiem),ve(t),ge(t)}else De(t);else Se(t)}function Pe(t){var e=t._i,c=t._f;return t._locale=t._locale||pe(t._l),null===e||void 0===c&&""===e?p({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),y(e)?new b(ge(e)):(s(e)?t._d=e:n(c)?function(t){var e,i,n,a,r;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;athis?this:t:p()}));function Fe(t,e){var i,a;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return Ee();for(i=e[0],a=1;a=0?new Date(t+400,e,i)-li:new Date(t,e,i).valueOf()}function hi(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-li:Date.UTC(t,e,i)}function ui(t,e){Y(0,[t,t.length],0,e)}function fi(t,e,i,n,a){var r;return null==t?Vt(this,n,a).year:(e>(r=Xt(t,n,a))&&(e=r),pi.call(this,t,e,i,n,a))}function pi(t,e,i,n,a){var r=$t(t,e,i,n,a),o=Yt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ui("gggg","weekYear"),ui("ggggg","weekYear"),ui("GGGG","isoWeekYear"),ui("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),lt("G",nt),lt("g",nt),lt("GG",K,X),lt("gg",K,X),lt("GGGG",tt,q),lt("gggg",tt,q),lt("GGGGG",et,G),lt("ggggg",et,G),ft(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,n){e[n.substr(0,2)]=w(t)})),ft(["gg","GG"],(function(t,e,n,a){e[a]=i.parseTwoDigitYear(t)})),Y("Q",0,"Qo","quarter"),E("quarter","Q"),j("quarter",7),lt("Q",V),ut("Q",(function(t,e){e[mt]=3*(w(t)-1)})),Y("D",["DD",2],"Do","date"),E("date","D"),j("date",9),lt("D",K),lt("DD",K,X),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),ut(["D","DD"],vt),ut("Do",(function(t,e){e[vt]=w(t.match(K)[0])}));var gi=Dt("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),j("dayOfYear",4),lt("DDD",J),lt("DDDD",U),ut(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=w(t)})),Y("m",["mm",2],0,"minute"),E("minute","m"),j("minute",14),lt("m",K),lt("mm",K,X),ut(["m","mm"],yt);var mi=Dt("Minutes",!1);Y("s",["ss",2],0,"second"),E("second","s"),j("second",15),lt("s",K),lt("ss",K,X),ut(["s","ss"],xt);var vi,bi=Dt("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),E("millisecond","ms"),j("millisecond",16),lt("S",J,V),lt("SS",J,X),lt("SSS",J,U),vi="SSSS";vi.length<=9;vi+="S")lt(vi,it);function yi(t,e){e[wt]=w(1e3*("0."+t))}for(vi="S";vi.length<=9;vi+="S")ut(vi,yi);var xi=Dt("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var wi=b.prototype;function _i(t){return t}wi.add=Je,wi.calendar=function(t,e){var n=t||Ee(),a=We(n,this).startOf("day"),r=i.calendarFormat(this,a)||"sameElse",o=e&&(D(e[r])?e[r].call(this,n):e[r]);return this.format(o||this.localeData().calendar(r,this,Ee(n)))},wi.clone=function(){return new b(this)},wi.diff=function(t,e,i){var n,a,r;if(!this.isValid())return NaN;if(!(n=We(t,this)).isValid())return NaN;switch(a=6e4*(n.utcOffset()-this.utcOffset()),e=O(e)){case"year":r=ei(this,n)/12;break;case"month":r=ei(this,n);break;case"quarter":r=ei(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-a)/864e5;break;case"week":r=(this-n-a)/6048e5;break;default:r=this-n}return i?r:x(r)},wi.endOf=function(t){var e;if(void 0===(t=O(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?hi:di;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=si-ci(e+(this._isUTC?0:this.utcOffset()*oi),si)-1;break;case"minute":e=this._d.valueOf(),e+=oi-ci(e,oi)-1;break;case"second":e=this._d.valueOf(),e+=ri-ci(e,ri)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},wi.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},wi.from=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||Ee(t).isValid())?qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},wi.fromNow=function(t){return this.from(Ee(),t)},wi.to=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||Ee(t).isValid())?qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},wi.toNow=function(t){return this.to(Ee(),t)},wi.get=function(t){return D(this[t=O(t)])?this[t]():this},wi.invalidAt=function(){return u(this).overflow},wi.isAfter=function(t,e){var i=y(t)?t:Ee(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=O(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()9999?W(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(i,"Z")):W(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},wi.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+a)},wi.toJSON=function(){return this.isValid()?this.toISOString():null},wi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},wi.unix=function(){return Math.floor(this.valueOf()/1e3)},wi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},wi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},wi.year=Tt,wi.isLeapYear=function(){return Ct(this.year())},wi.weekYear=function(t){return fi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},wi.isoWeekYear=function(t){return fi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},wi.quarter=wi.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},wi.month=Nt,wi.daysInMonth=function(){return Mt(this.year(),this.month())},wi.week=wi.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},wi.isoWeek=wi.isoWeeks=function(t){var e=Vt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},wi.weeksInYear=function(){var t=this.localeData()._week;return Xt(this.year(),t.dow,t.doy)},wi.isoWeeksInYear=function(){return Xt(this.year(),1,4)},wi.date=gi,wi.day=wi.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},wi.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},wi.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},wi.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},wi.hour=wi.hours=oe,wi.minute=wi.minutes=mi,wi.second=wi.seconds=bi,wi.millisecond=wi.milliseconds=xi,wi.utcOffset=function(t,e,n){var a,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ye(rt,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(a=$e(this)),this._offset=t,this._isUTC=!0,null!=a&&this.add(a,"m"),r!==t&&(!e||this._changeInProgress?Qe(this,qe(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:$e(this)},wi.utc=function(t){return this.utcOffset(0,t)},wi.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract($e(this),"m")),this},wi.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ye(at,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},wi.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ee(t).utcOffset():0,(this.utcOffset()-t)%60==0)},wi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},wi.isLocal=function(){return!!this.isValid()&&!this._isUTC},wi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},wi.isUtc=Ve,wi.isUTC=Ve,wi.zoneAbbr=function(){return this._isUTC?"UTC":""},wi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},wi.dates=S("dates accessor is deprecated. Use date instead.",gi),wi.months=S("months accessor is deprecated. Use month instead",Nt),wi.years=S("years accessor is deprecated. Use year instead",Tt),wi.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),wi.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=Pe(t))._a){var e=t._isUTC?h(t._a):Ee(t._a);this._isDSTShifted=this.isValid()&&_(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var ki=P.prototype;function Si(t,e,i,n){var a=pe(),r=h().set(n,e);return a[i](r,t)}function Ci(t,e,i){if(o(t)&&(e=t,t=void 0),t=t||"",null!=e)return Si(t,e,i,"month");var n,a=[];for(n=0;n<12;n++)a[n]=Si(t,n,i,"month");return a}function Ai(t,e,i,n){"boolean"==typeof t?(o(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,o(e)&&(i=e,e=void 0),e=e||"");var a,r=pe(),s=t?r._week.dow:0;if(null!=i)return Si(e,(i+s)%7,n,"day");var l=[];for(a=0;a<7;a++)l[a]=Si(e,(a+s)%7,n,"day");return l}ki.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return D(n)?n.call(e,i):n},ki.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},ki.invalidDate=function(){return this._invalidDate},ki.ordinal=function(t){return this._ordinal.replace("%d",t)},ki.preparse=_i,ki.postformat=_i,ki.relativeTime=function(t,e,i,n){var a=this._relativeTime[i];return D(a)?a(t,e,i,n):a.replace(/%d/i,t)},ki.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return D(i)?i(e):i.replace(/%s/i,e)},ki.set=function(t){var e,i;for(i in t)D(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ki.months=function(t,e){return t?n(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:n(this._months)?this._months:this._months.standalone},ki.monthsShort=function(t,e){return t?n(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ki.monthsParse=function(t,e,i){var n,a,r;if(this._monthsParseExact)return Ft.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=h([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},ki.monthsRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||Bt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ht),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},ki.monthsShortRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||Bt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Rt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},ki.week=function(t){return Vt(t,this._week.dow,this._week.doy).week},ki.firstDayOfYear=function(){return this._week.doy},ki.firstDayOfWeek=function(){return this._week.dow},ki.weekdays=function(t,e){var i=n(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ut(i,this._week.dow):t?i[t.day()]:i},ki.weekdaysMin=function(t){return!0===t?Ut(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},ki.weekdaysShort=function(t){return!0===t?Ut(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},ki.weekdaysParse=function(t,e,i){var n,a,r;if(this._weekdaysParseExact)return Zt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=h([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},ki.weekdaysRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ee.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Qt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},ki.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ee.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Jt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ki.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ee.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=te),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ki.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},ki.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},ue("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",ue),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",pe);var Ti=Math.abs;function Di(t,e,i,n){var a=qe(e,i);return t._milliseconds+=n*a._milliseconds,t._days+=n*a._days,t._months+=n*a._months,t._bubble()}function Ii(t){return t<0?Math.floor(t):Math.ceil(t)}function Pi(t){return 4800*t/146097}function Mi(t){return 146097*t/4800}function Ei(t){return function(){return this.as(t)}}var Oi=Ei("ms"),Li=Ei("s"),Fi=Ei("m"),ji=Ei("h"),Ni=Ei("d"),Ri=Ei("w"),Hi=Ei("M"),Bi=Ei("Q"),zi=Ei("y");function Yi(t){return function(){return this.isValid()?this._data[t]:NaN}}var Wi=Yi("milliseconds"),$i=Yi("seconds"),Vi=Yi("minutes"),Xi=Yi("hours"),Ui=Yi("days"),qi=Yi("months"),Gi=Yi("years");var Ki=Math.round,Zi={ss:44,s:45,m:45,h:22,d:26,M:11};function Qi(t,e,i,n,a){return a.relativeTime(e||1,!!i,t,n)}var Ji=Math.abs;function tn(t){return(t>0)-(t<0)||+t}function en(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i=Ji(this._milliseconds)/1e3,n=Ji(this._days),a=Ji(this._months);t=x(i/60),e=x(t/60),i%=60,t%=60;var r=x(a/12),o=a%=12,s=n,l=e,c=t,d=i?i.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var u=h<0?"-":"",f=tn(this._months)!==tn(h)?"-":"",p=tn(this._days)!==tn(h)?"-":"",g=tn(this._milliseconds)!==tn(h)?"-":"";return u+"P"+(r?f+r+"Y":"")+(o?f+o+"M":"")+(s?p+s+"D":"")+(l||c||d?"T":"")+(l?g+l+"H":"")+(c?g+c+"M":"")+(d?g+d+"S":"")}var nn=Ne.prototype;return nn.isValid=function(){return this._isValid},nn.abs=function(){var t=this._data;return this._milliseconds=Ti(this._milliseconds),this._days=Ti(this._days),this._months=Ti(this._months),t.milliseconds=Ti(t.milliseconds),t.seconds=Ti(t.seconds),t.minutes=Ti(t.minutes),t.hours=Ti(t.hours),t.months=Ti(t.months),t.years=Ti(t.years),this},nn.add=function(t,e){return Di(this,t,e,1)},nn.subtract=function(t,e){return Di(this,t,e,-1)},nn.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=O(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+Pi(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Mi(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},nn.asMilliseconds=Oi,nn.asSeconds=Li,nn.asMinutes=Fi,nn.asHours=ji,nn.asDays=Ni,nn.asWeeks=Ri,nn.asMonths=Hi,nn.asQuarters=Bi,nn.asYears=zi,nn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},nn._bubble=function(){var t,e,i,n,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*Ii(Mi(s)+o),o=0,s=0),l.milliseconds=r%1e3,t=x(r/1e3),l.seconds=t%60,e=x(t/60),l.minutes=e%60,i=x(e/60),l.hours=i%24,o+=x(i/24),s+=a=x(Pi(o)),o-=Ii(Mi(a)),n=x(s/12),s%=12,l.days=o,l.months=s,l.years=n,this},nn.clone=function(){return qe(this)},nn.get=function(t){return t=O(t),this.isValid()?this[t+"s"]():NaN},nn.milliseconds=Wi,nn.seconds=$i,nn.minutes=Vi,nn.hours=Xi,nn.days=Ui,nn.weeks=function(){return x(this.days()/7)},nn.months=qi,nn.years=Gi,nn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=function(t,e,i){var n=qe(t).abs(),a=Ki(n.as("s")),r=Ki(n.as("m")),o=Ki(n.as("h")),s=Ki(n.as("d")),l=Ki(n.as("M")),c=Ki(n.as("y")),d=a<=Zi.ss&&["s",a]||a0,d[4]=i,Qi.apply(null,d)}(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},nn.toISOString=en,nn.toString=en,nn.toJSON=en,nn.locale=ii,nn.localeData=ai,nn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",en),nn.lang=ni,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),lt("x",nt),lt("X",/[+-]?\d+(\.\d{1,3})?/),ut("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))})),ut("x",(function(t,e,i){i._d=new Date(w(t))})),i.version="2.24.0",t=Ee,i.fn=wi,i.min=function(){return Fe("isBefore",[].slice.call(arguments,0))},i.max=function(){return Fe("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=h,i.unix=function(t){return Ee(1e3*t)},i.months=function(t,e){return Ci(t,e,"months")},i.isDate=s,i.locale=ue,i.invalid=p,i.duration=qe,i.isMoment=y,i.weekdays=function(t,e,i){return Ai(t,e,i,"weekdays")},i.parseZone=function(){return Ee.apply(null,arguments).parseZone()},i.localeData=pe,i.isDuration=Re,i.monthsShort=function(t,e){return Ci(t,e,"monthsShort")},i.weekdaysMin=function(t,e,i){return Ai(t,e,i,"weekdaysMin")},i.defineLocale=fe,i.updateLocale=function(t,e){if(null!=e){var i,n,a=se;null!=(n=he(t))&&(a=n._config),(i=new P(e=I(a,e))).parentLocale=le[t],le[t]=i,ue(t)}else null!=le[t]&&(null!=le[t].parentLocale?le[t]=le[t].parentLocale:null!=le[t]&&delete le[t]);return le[t]},i.locales=function(){return C(le)},i.weekdaysShort=function(t,e,i){return Ai(t,e,i,"weekdaysShort")},i.normalizeUnits=O,i.relativeTimeRounding=function(t){return void 0===t?Ki:"function"==typeof t&&(Ki=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Zi[t]&&(void 0===e?Zi[t]:(Zi[t]=e,"s"===t&&(Zi.ss=e-1),!0))},i.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},i.prototype=wi,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Split=e()}(this,(function(){"use strict";var t="undefined"!=typeof window?window:null,e=null===t,i=e?void 0:t.document,n=function(){return!1},a=e?"calc":["","-webkit-","-moz-","-o-"].filter((function(t){var e=i.createElement("div");return e.style.cssText="width:"+t+"calc(9px)",!!e.style.length})).shift()+"calc",r=function(t){return"string"==typeof t||t instanceof String},o=function(t){if(r(t)){var e=i.querySelector(t);if(!e)throw new Error("Selector "+t+" did not match a DOM element");return e}return t},s=function(t,e,i){var n=t[e];return void 0!==n?n:i},l=function(t,e,i,n){if(e){if("end"===n)return 0;if("center"===n)return t/2}else if(i){if("start"===n)return 0;if("center"===n)return t/2}return t},c=function(t,e){var n=i.createElement("div");return n.className="gutter gutter-"+e,n},d=function(t,e,i){var n={};return r(e)?n[t]=e:n[t]=a+"("+e+"% - "+i+"px)",n},h=function(t,e){var i;return(i={})[t]=e+"px",i};return function(a,r){if(void 0===r&&(r={}),e)return{};var u,f,p,g,m,v,b=a;Array.from&&(b=Array.from(b));var y=o(b[0]).parentNode,x=getComputedStyle?getComputedStyle(y):null,w=x?x.flexDirection:null,_=s(r,"sizes")||b.map((function(){return 100/b.length})),k=s(r,"minSize",100),S=Array.isArray(k)?k:b.map((function(){return k})),C=s(r,"expandToMin",!1),A=s(r,"gutterSize",10),T=s(r,"gutterAlign","center"),D=s(r,"snapOffset",30),I=s(r,"dragInterval",1),P=s(r,"direction","horizontal"),M=s(r,"cursor","horizontal"===P?"col-resize":"row-resize"),E=s(r,"gutter",c),O=s(r,"elementStyle",d),L=s(r,"gutterStyle",h);function F(t,e,i,n){var a=O(u,e,i,n);Object.keys(a).forEach((function(e){t.style[e]=a[e]}))}function j(){return v.map((function(t){return t.size}))}function N(t){return"touches"in t?t.touches[0][f]:t[f]}function R(t){var e=v[this.a],i=v[this.b],n=e.size+i.size;e.size=t/this.size*n,i.size=n-t/this.size*n,F(e.element,e.size,this._b,e.i),F(i.element,i.size,this._c,i.i)}function H(t){var e,i=v[this.a],a=v[this.b];this.dragging&&(e=N(t)-this.start+(this._b-this.dragOffset),I>1&&(e=Math.round(e/I)*I),e<=i.minSize+D+this._b?e=i.minSize+this._b:e>=this.size-(a.minSize+D+this._c)&&(e=this.size-(a.minSize+this._c)),R.call(this,e),s(r,"onDrag",n)())}function B(){var t=v[this.a].element,e=v[this.b].element,i=t.getBoundingClientRect(),n=e.getBoundingClientRect();this.size=i[u]+n[u]+this._b+this._c,this.start=i[p],this.end=i[g]}function z(t){var e=function(t){if(!getComputedStyle)return null;var e=getComputedStyle(t);if(!e)return null;var i=t[m];return 0===i?null:i-="horizontal"===P?parseFloat(e.paddingLeft)+parseFloat(e.paddingRight):parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)}(y);if(null===e)return t;if(S.reduce((function(t,e){return t+e}),0)>e)return t;var i=0,n=[],a=t.map((function(a,r){var o=e*a/100,s=l(A,0===r,r===t.length-1,T),c=S[r]+s;return o0&&n[a]-i>0){var o=Math.min(i,n[a]-i);i-=o,r=t-o}return r/e*100}))}function Y(){var e=v[this.a].element,a=v[this.b].element;this.dragging&&s(r,"onDragEnd",n)(j()),this.dragging=!1,t.removeEventListener("mouseup",this.stop),t.removeEventListener("touchend",this.stop),t.removeEventListener("touchcancel",this.stop),t.removeEventListener("mousemove",this.move),t.removeEventListener("touchmove",this.move),this.stop=null,this.move=null,e.removeEventListener("selectstart",n),e.removeEventListener("dragstart",n),a.removeEventListener("selectstart",n),a.removeEventListener("dragstart",n),e.style.userSelect="",e.style.webkitUserSelect="",e.style.MozUserSelect="",e.style.pointerEvents="",a.style.userSelect="",a.style.webkitUserSelect="",a.style.MozUserSelect="",a.style.pointerEvents="",this.gutter.style.cursor="",this.parent.style.cursor="",i.body.style.cursor=""}function W(e){if(!("button"in e)||0===e.button){var a=v[this.a].element,o=v[this.b].element;this.dragging||s(r,"onDragStart",n)(j()),e.preventDefault(),this.dragging=!0,this.move=H.bind(this),this.stop=Y.bind(this),t.addEventListener("mouseup",this.stop),t.addEventListener("touchend",this.stop),t.addEventListener("touchcancel",this.stop),t.addEventListener("mousemove",this.move),t.addEventListener("touchmove",this.move),a.addEventListener("selectstart",n),a.addEventListener("dragstart",n),o.addEventListener("selectstart",n),o.addEventListener("dragstart",n),a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.MozUserSelect="none",a.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",this.gutter.style.cursor=M,this.parent.style.cursor=M,i.body.style.cursor=M,B.call(this),this.dragOffset=N(e)-this.end}}"horizontal"===P?(u="width",f="clientX",p="left",g="right",m="clientWidth"):"vertical"===P&&(u="height",f="clientY",p="top",g="bottom",m="clientHeight"),_=z(_);var $=[];function V(t){var e=t.i===$.length,i=e?$[t.i-1]:$[t.i];B.call(i);var n=e?i.size-t.minSize-i._c:t.minSize+i._b;R.call(i,n)}return(v=b.map((function(t,e){var i,n={element:o(t),size:_[e],minSize:S[e],i:e};if(e>0&&((i={a:e-1,b:e,dragging:!1,direction:P,parent:y})._b=l(A,e-1==0,!1,T),i._c=l(A,!1,e===b.length-1,T),"row-reverse"===w||"column-reverse"===w)){var a=i.a;i.a=i.b,i.b=a}if(e>0){var r=E(e,P,n.element);!function(t,e,i){var n=L(u,e,i);Object.keys(n).forEach((function(e){t.style[e]=n[e]}))}(r,A,e),i._a=W.bind(i),r.addEventListener("mousedown",i._a),r.addEventListener("touchstart",i._a),y.insertBefore(r,n.element),i.gutter=r}return F(n.element,n.size,l(A,0===e,e===b.length-1,T),e),e>0&&$.push(i),n}))).forEach((function(t){var e=t.element.getBoundingClientRect()[u];e0){var n=$[i-1],a=v[n.a],r=v[n.b];a.size=e[i-1],r.size=t,F(a.element,a.size,n._b,a.i),F(r.element,r.size,n._c,r.i)}}))},getSizes:j,collapse:function(t){V(v[t])},destroy:function(t,e){$.forEach((function(i){if(!0!==e?i.parent.removeChild(i.gutter):(i.gutter.removeEventListener("mousedown",i._a),i.gutter.removeEventListener("touchstart",i._a)),!0!==t){var n=O(u,i.a.size,i._b);Object.keys(n).forEach((function(t){v[i.a].element.style[t]="",v[i.b].element.style[t]=""}))}}))},parent:y,pairs:$}}})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t=t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function i(t,e){for(var i=0;ithis._items.length-1||t<0))if(this._isSliding)e(this._element).one(E.SLID,(function(){return i.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var a=n=i.clientWidth&&n>=i.clientHeight})),d=0l[t]&&!e.escapeWithReference&&(n=Math.min(d[i],l[t]-("right"===t?d.width:d.height))),vt({},i,n)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";d=bt({},d,h[e](t))})),t.offsets.popper=d,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,a=t.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(a),s=o?"right":"bottom",l=o?"left":"top",c=o?"width":"height";return i[s]r(n[s])&&(t.offsets.popper[l]=r(n[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!Rt(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var a=t.placement.split("-")[0],r=t.offsets,o=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(a),c=l?"height":"width",d=l?"Top":"Left",h=d.toLowerCase(),u=l?"left":"top",f=l?"bottom":"right",p=At(n)[c];s[f]-po[f]&&(t.offsets.popper[h]+=s[h]+p-o[f]),t.offsets.popper=yt(t.offsets.popper);var g=s[h]+s[c]/2-p/2,m=nt(t.instance.popper),v=parseFloat(m["margin"+d],10),b=parseFloat(m["border"+d+"Width"],10),y=g-t.offsets.popper[h]-v-b;return y=Math.max(Math.min(o[c]-p,y),0),t.arrowElement=n,t.offsets.arrow=(vt(i={},h,Math.round(y)),vt(i,u,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(Mt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=kt(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],a=Tt(n),r=t.placement.split("-")[1]||"",o=[];switch(e.behavior){case"flip":o=[n,a];break;case"clockwise":o=zt(n);break;case"counterclockwise":o=zt(n,!0);break;default:o=e.behavior}return o.forEach((function(s,l){if(n!==s||o.length===l+1)return t;n=t.placement.split("-")[0],a=Tt(n);var c,d=t.offsets.popper,h=t.offsets.reference,u=Math.floor,f="left"===n&&u(d.right)>u(h.left)||"right"===n&&u(d.left)u(h.top)||"bottom"===n&&u(d.top)u(i.right),m=u(d.top)u(i.bottom),b="left"===n&&p||"right"===n&&g||"top"===n&&m||"bottom"===n&&v,y=-1!==["top","bottom"].indexOf(n),x=!!e.flipVariations&&(y&&"start"===r&&p||y&&"end"===r&&g||!y&&"start"===r&&m||!y&&"end"===r&&v);(f||b||x)&&(t.flipped=!0,(f||b)&&(n=o[l+1]),x&&(r="end"===(c=r)?"start":"start"===c?"end":c),t.placement=n+(r?"-"+r:""),t.offsets.popper=bt({},t.offsets.popper,Dt(t.instance.popper,t.offsets.reference,t.placement)),t=Pt(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,a=n.popper,r=n.reference,o=-1!==["left","right"].indexOf(i),s=-1===["top","left"].indexOf(i);return a[o?"left":"top"]=r[i]-(s?a[o?"width":"height"]:0),t.placement=Tt(e),t.offsets.popper=yt(a),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Rt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=It(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomi.right||e.top>i.bottom||e.rightdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},i._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},i._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
      ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},Ee="show",Oe="out",Le={HIDE:"hide"+Se,HIDDEN:"hidden"+Se,SHOW:"show"+Se,SHOWN:"shown"+Se,INSERTED:"inserted"+Se,CLICK:"click"+Se,FOCUSIN:"focusin"+Se,FOCUSOUT:"focusout"+Se,MOUSEENTER:"mouseenter"+Se,MOUSELEAVE:"mouseleave"+Se},Fe="fade",je="show",Ne="hover",Re="focus",He=function(){function t(t,e){if(void 0===Wt)throw new TypeError("Bootstrap's tooltips require Popper.js (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 i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var i=this.constructor.DATA_KEY,n=e(t.currentTarget).data(i);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(e(this.getTipElement()).hasClass(je))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(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},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var n=o.findShadowRoot(this.element),a=e.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!a)return;var r=this.getTipElement(),s=o.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&e(r).addClass(Fe);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,c=this._getAttachment(l);this.addAttachmentClass(c);var d=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(d),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Wt(this.element,r,{placement:c,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}}),e(r).addClass(je),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var h=function(){t.config.animation&&t._fixTransition();var i=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),i===Oe&&t._leave(null,t)};if(e(this.tip).hasClass(Fe)){var u=o.getTransitionDurationFromElement(this.tip);e(this.tip).one(o.TRANSITION_END,h).emulateTransitionEnd(u)}else h()}},i.hide=function(t){var i=this,n=this.getTipElement(),a=e.Event(this.constructor.Event.HIDE),r=function(){i._hoverState!==Ee&&n.parentNode&&n.parentNode.removeChild(n),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),e(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),t&&t()};if(e(this.element).trigger(a),!a.isDefaultPrevented()){if(e(n).removeClass(je),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger[Re]=!1,this._activeTrigger[Ne]=!1,e(this.tip).hasClass(Fe)){var s=o.getTransitionDurationFromElement(n);e(n).one(o.TRANSITION_END,r).emulateTransitionEnd(s)}else r();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass(Ae+"-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass(Fe+" "+je)},i.setElementContent=function(t,i){"object"!=typeof i||!i.nodeType&&!i.jquery?this.config.html?(this.config.sanitize&&(i=we(i,this.config.whiteList,this.config.sanitizeFn)),t.html(i)):t.text(i):this.config.html?e(i).parent().is(t)||t.empty().append(i):t.text(e(i).text())},i.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},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:o.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return Pe[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(i){if("click"===i)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==i){var n=i===Ne?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,a=i===Ne?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(a,t.config.selector,(function(e){return t._leave(e)}))}})),e(this.element).closest(".modal").on("hide.bs.modal",(function(){t.element&&t.hide()})),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},i._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",""))},i._enter=function(t,i){var n=this.constructor.DATA_KEY;(i=i||e(t.currentTarget).data(n))||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),t&&(i._activeTrigger["focusin"===t.type?Re:Ne]=!0),e(i.getTipElement()).hasClass(je)||i._hoverState===Ee?i._hoverState=Ee:(clearTimeout(i._timeout),i._hoverState=Ee,i.config.delay&&i.config.delay.show?i._timeout=setTimeout((function(){i._hoverState===Ee&&i.show()}),i.config.delay.show):i.show())},i._leave=function(t,i){var n=this.constructor.DATA_KEY;(i=i||e(t.currentTarget).data(n))||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),t&&(i._activeTrigger["focusout"===t.type?Re:Ne]=!1),i._isWithActiveTrigger()||(clearTimeout(i._timeout),i._hoverState=Oe,i.config.delay&&i.config.delay.hide?i._timeout=setTimeout((function(){i._hoverState===Oe&&i.hide()}),i.config.delay.hide):i.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var i=e(this.element).data();return Object.keys(i).forEach((function(t){-1!==De.indexOf(t)&&delete i[t]})),"number"==typeof(t=a({},this.constructor.Default,i,"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()),o.typeCheckConfig(_e,t,this.constructor.DefaultType),t.sanitize&&(t.template=we(t.template,t.whiteList,t.sanitizeFn)),t},i._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},i._cleanTipClass=function(){var t=e(this.getTipElement()),i=t.attr("class").match(Te);null!==i&&i.length&&t.removeClass(i.join(""))},i._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),i=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(Fe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},t._jQueryInterface=function(i){return this.each((function(){var n=e(this).data(ke),a="object"==typeof i&&i;if((n||!/dispose|hide/.test(i))&&(n||(n=new t(this,a),e(this).data(ke,n)),"string"==typeof i)){if(void 0===n[i])throw new TypeError('No method named "'+i+'"');n[i]()}}))},n(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Me}},{key:"NAME",get:function(){return _e}},{key:"DATA_KEY",get:function(){return ke}},{key:"Event",get:function(){return Le}},{key:"EVENT_KEY",get:function(){return Se}},{key:"DefaultType",get:function(){return Ie}}]),t}();e.fn[_e]=He._jQueryInterface,e.fn[_e].Constructor=He,e.fn[_e].noConflict=function(){return e.fn[_e]=Ce,He._jQueryInterface};var Be="popover",ze="bs.popover",Ye="."+ze,We=e.fn[Be],$e="bs-popover",Ve=new RegExp("(^|\\s)"+$e+"\\S+","g"),Xe=a({},He.Default,{placement:"right",trigger:"click",content:"",template:''}),Ue=a({},He.DefaultType,{content:"(string|element|function)"}),qe={HIDE:"hide"+Ye,HIDDEN:"hidden"+Ye,SHOW:"show"+Ye,SHOWN:"shown"+Ye,INSERTED:"inserted"+Ye,CLICK:"click"+Ye,FOCUSIN:"focusin"+Ye,FOCUSOUT:"focusout"+Ye,MOUSEENTER:"mouseenter"+Ye,MOUSELEAVE:"mouseleave"+Ye},Ge=function(t){var i,a;function r(){return t.apply(this,arguments)||this}a=t,(i=r).prototype=Object.create(a.prototype),(i.prototype.constructor=i).__proto__=a;var o=r.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){e(this.getTipElement()).addClass($e+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},o.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var i=this._getContent();"function"==typeof i&&(i=i.call(this.element)),this.setElementContent(t.find(".popover-body"),i),t.removeClass("fade show")},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=e(this.getTipElement()),i=t.attr("class").match(Ve);null!==i&&0=this._offsets[a]&&(void 0===this._offsets[a+1]||t li > .active",bi=function(){function t(t){this._element=t}var i=t.prototype;return i.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(fi)||e(this._element).hasClass("disabled"))){var i,n,a=e(this._element).closest(".nav, .list-group")[0],r=o.getSelectorFromElement(this._element);if(a){var s="UL"===a.nodeName||"OL"===a.nodeName?vi:mi;n=(n=e.makeArray(e(a).find(s)))[n.length-1]}var l=e.Event(ui.HIDE,{relatedTarget:this._element}),c=e.Event(ui.SHOW,{relatedTarget:n});if(n&&e(n).trigger(l),e(this._element).trigger(c),!c.isDefaultPrevented()&&!l.isDefaultPrevented()){r&&(i=document.querySelector(r)),this._activate(this._element,a);var d=function(){var i=e.Event(ui.HIDDEN,{relatedTarget:t._element}),a=e.Event(ui.SHOWN,{relatedTarget:n});e(n).trigger(i),e(t._element).trigger(a)};i?this._activate(i,i.parentNode,d):d()}}},i.dispose=function(){e.removeData(this._element,ci),this._element=null},i._activate=function(t,i,n){var a=this,r=(!i||"UL"!==i.nodeName&&"OL"!==i.nodeName?e(i).children(mi):e(i).find(vi))[0],s=n&&r&&e(r).hasClass(pi),l=function(){return a._transitionComplete(t,r,n)};if(r&&s){var c=o.getTransitionDurationFromElement(r);e(r).removeClass(gi).one(o.TRANSITION_END,l).emulateTransitionEnd(c)}else l()},i._transitionComplete=function(t,i,n){if(i){e(i).removeClass(fi);var a=e(i.parentNode).find("> .dropdown-menu .active")[0];a&&e(a).removeClass(fi),"tab"===i.getAttribute("role")&&i.setAttribute("aria-selected",!1)}if(e(t).addClass(fi),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),o.reflow(t),t.classList.contains(pi)&&t.classList.add(gi),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var r=e(t).closest(".dropdown")[0];if(r){var s=[].slice.call(r.querySelectorAll(".dropdown-toggle"));e(s).addClass(fi)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(i){return this.each((function(){var n=e(this),a=n.data(ci);if(a||(a=new t(this),n.data(ci,a)),"string"==typeof i){if(void 0===a[i])throw new TypeError('No method named "'+i+'"');a[i]()}}))},n(t,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),t}();e(document).on(ui.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),bi._jQueryInterface.call(e(this),"show")})),e.fn.tab=bi._jQueryInterface,e.fn.tab.Constructor=bi,e.fn.tab.noConflict=function(){return e.fn.tab=hi,bi._jQueryInterface};var yi="toast",xi="bs.toast",wi="."+xi,_i=e.fn[yi],ki={CLICK_DISMISS:"click.dismiss"+wi,HIDE:"hide"+wi,HIDDEN:"hidden"+wi,SHOW:"show"+wi,SHOWN:"shown"+wi},Si="hide",Ci="show",Ai="showing",Ti={animation:"boolean",autohide:"boolean",delay:"number"},Di={animation:!0,autohide:!0,delay:500},Ii=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var i=t.prototype;return i.show=function(){var t=this;e(this._element).trigger(ki.SHOW),this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove(Ai),t._element.classList.add(Ci),e(t._element).trigger(ki.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove(Si),this._element.classList.add(Ai),this._config.animation){var n=o.getTransitionDurationFromElement(this._element);e(this._element).one(o.TRANSITION_END,i).emulateTransitionEnd(n)}else i()},i.hide=function(t){var i=this;this._element.classList.contains(Ci)&&(e(this._element).trigger(ki.HIDE),t?this._close():this._timeout=setTimeout((function(){i._close()}),this._config.delay))},i.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(Ci)&&this._element.classList.remove(Ci),e(this._element).off(ki.CLICK_DISMISS),e.removeData(this._element,xi),this._element=null,this._config=null},i._getConfig=function(t){return t=a({},Di,e(this._element).data(),"object"==typeof t&&t?t:{}),o.typeCheckConfig(yi,t,this.constructor.DefaultType),t},i._setListeners=function(){var t=this;e(this._element).on(ki.CLICK_DISMISS,'[data-dismiss="toast"]',(function(){return t.hide(!0)}))},i._close=function(){var t=this,i=function(){t._element.classList.add(Si),e(t._element).trigger(ki.HIDDEN)};if(this._element.classList.remove(Ci),this._config.animation){var n=o.getTransitionDurationFromElement(this._element);e(this._element).one(o.TRANSITION_END,i).emulateTransitionEnd(n)}else i()},t._jQueryInterface=function(i){return this.each((function(){var n=e(this),a=n.data(xi);if(a||(a=new t(this,"object"==typeof i&&i),n.data(xi,a)),"string"==typeof i){if(void 0===a[i])throw new TypeError('No method named "'+i+'"');a[i](this)}}))},n(t,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return Ti}},{key:"Default",get:function(){return Di}}]),t}();e.fn[yi]=Ii._jQueryInterface,e.fn[yi].Constructor=Ii,e.fn[yi].noConflict=function(){return e.fn[yi]=_i,Ii._jQueryInterface},function(){if(void 0===e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=o,t.Alert=u,t.Button=_,t.Carousel=j,t.Collapse=K,t.Dropdown=ae,t.Modal=ve,t.Popover=Ge,t.Scrollspy=li,t.Tab=bi,t.Toast=Ii,t.Tooltip=He,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).bsCustomFileInput=e()}(this,(function(){"use strict";var t='.custom-file input[type="file"]',e=".custom-file-label",i="form",n="input",a=function(t){var i="",n=t.parentNode.querySelector(e);return n&&(i=n.innerHTML),i},r=function(t){if(t.childNodes.length>0)for(var e=[].slice.call(t.childNodes),i=0;ithis._bufferOffset&&(this._buffer=this._buffer.slice(t-this._bufferOffset),this._bufferOffset=t);var i=0===u(this._buffer);return this._done&&i?null:this._buffer.slice(0,e-t)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),t}();function u(t){return void 0===t?0:void 0!==t.size?t.size:t.length}},{"./isCordova":2,"./isReactNative":3,"./readAsByteArray":4,"./uriToBlob":8}],7:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));a.originalRequest=n,a.causingError=i;var r=t.message;return null!=i&&(r+=", caused by "+i.toString()),null!=n&&(r+=", originated from request (response code: "+n.status+", response text: "+n.responseText+")"),a.message=r,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Error),e}();i.default=n},{}],10:[function(t,e,i){"use strict";var n,a=t("./upload"),r=(n=a)&&n.__esModule?n:{default:n},o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(t("./node/storage"));var s=r.default.defaultOptions,l={Upload:r.default,canStoreURLs:o.canStoreURLs,defaultOptions:s};if("undefined"!=typeof window){var c=window,d=c.XMLHttpRequest,h=c.Blob;l.isSupported=d&&h&&"function"==typeof h.prototype.slice}else l.isSupported=!0,l.FileStorage=o.FileStorage;e.exports=l},{"./node/storage":7,"./upload":11}],11:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;ie._offsetBeforeRetry&&(e._retryAttempt=0);var i=!0;"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(i=!1);var r=t.originalRequest?t.originalRequest.status:0,o=!f(r,400)||409===r||423===r;if(e._retryAttemptthis._size)&&!this.options.uploadLengthDeferred&&(n=this._size),this._source.slice(i,n,(function(i,n,a){i?e._emitError(i):(e.options.uploadLengthDeferred&&a&&(e._size=e._offset+(n&&n.size?n.size:0),t.setRequestHeader("Upload-Length",e._size)),null===n?t.send():(t.send(n),e._emitProgress(e._offset,e._size)))}))}},{key:"_handleUploadResponse",value:function(t){var e=this,i=parseInt(t.getResponseHeader("Upload-Offset"),10);if(isNaN(i))this._emitXhrError(t,new Error("tus: invalid or missing offset value"));else{if(this._emitProgress(i,this._size),this._emitChunkComplete(i-this._offset,i,this._size),this._offset=i,i==this._size)return this.options.removeFingerprintOnSuccess&&this.options.resume&&this._storage.removeItem(this._fingerprint,(function(t){t&&e._emitError(t)})),this._emitSuccess(),void this._source.close();this._startUpload()}}}],[{key:"terminate",value:function(t,e,i){if("function"!=typeof e&&"function"!=typeof i)throw new Error("tus: a callback function must be specified");"function"==typeof e&&(i=e,e={});var n=(0,s.newRequest)();n.open("DELETE",t,!0),n.onload=function(){204===n.status?i():i(new a.default(new Error("tus: unexpected response while terminating upload"),null,n))},n.onerror=function(t){i(new a.default(t,new Error("tus: failed to terminate upload"),n))},p(n,e),n.send(null)}}]),t}();function f(t,e){return t>=e&&t>>6)+fromCharCode(128|63&e):fromCharCode(224|e>>>12&15)+fromCharCode(128|e>>>6&63)+fromCharCode(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return fromCharCode(240|e>>>18&7)+fromCharCode(128|e>>>12&63)+fromCharCode(128|e>>>6&63)+fromCharCode(128|63&e)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(t){return t.replace(re_utob,cb_utob)},cb_encode=function(t){var e=[0,2,1][t.length%3],i=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[b64chars.charAt(i>>>18),b64chars.charAt(i>>>12&63),e>=2?"=":b64chars.charAt(i>>>6&63),e>=1?"=":b64chars.charAt(63&i)].join("")},btoa=global.btoa?function(t){return global.btoa(t)}:function(t){return t.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(t){return(t.constructor===buffer.constructor?t:buffer.from(t)).toString("base64")}:function(t){return(t.constructor===buffer.constructor?t:new buffer(t)).toString("base64")}:function(t){return btoa(utob(t))},encode=function(t,e){return e?_encode(String(t)).replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,""):_encode(String(t))},encodeURI=function(t){return encode(t,!0)},re_btou=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),cb_btou=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return fromCharCode(55296+(e>>>10))+fromCharCode(56320+(1023&e));case 3:return fromCharCode((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return fromCharCode((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},btou=function(t){return t.replace(re_btou,cb_btou)},cb_decode=function(t){var e=t.length,i=e%4,n=(e>0?b64tab[t.charAt(0)]<<18:0)|(e>1?b64tab[t.charAt(1)]<<12:0)|(e>2?b64tab[t.charAt(2)]<<6:0)|(e>3?b64tab[t.charAt(3)]:0),a=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(255&n)];return a.length-=[0,0,2,1][i],a.join("")},atob=global.atob?function(t){return global.atob(t)}:function(t){return t.replace(/[\s\S]{1,4}/g,cb_decode)},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(t){return(t.constructor===buffer.constructor?t:buffer.from(t,"base64")).toString()}:function(t){return(t.constructor===buffer.constructor?t:new buffer(t,"base64")).toString()}:function(t){return btou(atob(t))},decode=function(t){return _decode(String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var t=global.Base64;return global.Base64=_Base64,t};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum((function(){return decode(this)}))),Object.defineProperty(String.prototype,"toBase64",noEnum((function(t){return encode(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",noEnum((function(){return encode(this,!0)})))}}return global.Meteor&&(Base64=global.Base64),void 0!==module&&module.exports?module.exports.Base64=global.Base64:"function"==typeof define&&define.amd&&define([],(function(){return global.Base64})),{Base64:global.Base64}}))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty;function a(t){return decodeURIComponent(t.replace(/\+/g," "))}i.stringify=function(t,e){e=e||"";var i=[];for(var a in"string"!=typeof e&&(e="?"),t)n.call(t,a)&&i.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));return i.length?e+i.join("&"):""},i.parse=function(t){for(var e,i=/([^=?&]+)=?([^&]*)/g,n={};e=i.exec(t);){var r=a(e[1]),o=a(e[2]);r in n||(n[r]=o)}return n}},{}],15:[function(t,e,i){"use strict";e.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},{}],16:[function(t,e,i){(function(i){"use strict";var n=t("requires-port"),a=t("querystringify"),r=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,o=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function c(t){var e,n=i&&i.location||{},a={},r=typeof(t=t||n);if("blob:"===t.protocol)a=new h(unescape(t.pathname),{});else if("string"===r)for(e in a=new h(t,{}),l)delete a[e];else if("object"===r){for(e in t)e in l||(a[e]=t[e]);void 0===a.slashes&&(a.slashes=o.test(t.href))}return a}function d(t){var e=r.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function h(t,e,i){if(!(this instanceof h))return new h(t,e,i);var r,o,l,u,f,p,g=s.slice(),m=typeof e,v=this,b=0;for("object"!==m&&"string"!==m&&(i=e,e=null),i&&"function"!=typeof i&&(i=a.parse),e=c(e),r=!(o=d(t||"")).protocol&&!o.slashes,v.slashes=o.slashes||r&&e.slashes,v.protocol=o.protocol||e.protocol||"",t=o.rest,o.slashes||(g[3]=[/(.*)/,"pathname"]);bo&&(n.top-=l),n.top<0&&(n.top=0),n.left+c>s&&(n.left-=c),n.left<0&&(n.left=0),t.$menu.css(n)}else t.determinePosition.call(this,t.$menu)},positionSubmenu:function(e){if(void 0!==e)if(t.ui&&t.ui.position)e.css("display","block").position({my:"left top-5",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var i={top:-9,left:this.outerWidth()-5};e.css(i)}},zIndex:1,animation:{duration:50,show:"slideDown",hide:"slideUp"},events:{preShow:t.noop,show:t.noop,hide:t.noop,activated:t.noop},callback:null,items:{}},d={timer:null,pageX:null,pageY:null},h={abortevent:function(t){t.preventDefault(),t.stopImmediatePropagation()},contextmenu:function(e){var n=t(this);if(!1!==e.data.events.preShow(n,e)&&("right"===e.data.trigger&&(e.preventDefault(),e.stopImmediatePropagation()),!("right"!==e.data.trigger&&"demand"!==e.data.trigger&&e.originalEvent||!(void 0===e.mouseButton||!e.data||"left"===e.data.trigger&&0===e.mouseButton||"right"===e.data.trigger&&2===e.mouseButton)||n.hasClass("context-menu-active")||n.hasClass("context-menu-disabled")))){if(i=n,e.data.build){var a=e.data.build(i,e);if(!1===a)return;if(e.data=t.extend(!0,{},c,e.data,a||{}),!e.data.items||t.isEmptyObject(e.data.items))throw window.console&&(console.error||console.log).call(console,"No items specified to show in contextMenu"),new Error("No Items specified");e.data.$trigger=i,u.create(e.data)}u.show.call(n,e.data,e.pageX,e.pageY)}},click:function(e){e.preventDefault(),e.stopImmediatePropagation(),t(this).trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))},mousedown:function(e){var n=t(this);i&&i.length&&!i.is(n)&&i.data("contextMenu").$menu.trigger("contextmenu:hide"),2===e.button&&(i=n.data("contextMenuActive",!0))},mouseup:function(e){var n=t(this);n.data("contextMenuActive")&&i&&i.length&&i.is(n)&&!n.hasClass("context-menu-disabled")&&(e.preventDefault(),e.stopImmediatePropagation(),i=n,n.trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))),n.removeData("contextMenuActive")},mouseenter:function(e){var n=t(this),a=t(e.relatedTarget),r=t(document);a.is(".context-menu-list")||a.closest(".context-menu-list").length||i&&i.length||(d.pageX=e.pageX,d.pageY=e.pageY,d.data=e.data,r.on("mousemove.contextMenuShow",h.mousemove),d.timer=setTimeout((function(){d.timer=null,r.off("mousemove.contextMenuShow"),i=n,n.trigger(t.Event("contextmenu",{data:d.data,pageX:d.pageX,pageY:d.pageY}))}),e.data.delay))},mousemove:function(t){d.pageX=t.pageX,d.pageY=t.pageY},mouseleave:function(e){var i=t(e.relatedTarget);if(!i.is(".context-menu-list")&&!i.closest(".context-menu-list").length){try{clearTimeout(d.timer)}catch(e){}d.timer=null}},layerClick:function(e){var i,n,r=t(this).data("contextMenuRoot"),o=e.button,s=e.pageX,l=e.pageY,c=void 0===s;e.preventDefault(),setTimeout((function(){if(c)null!=r&&null!==r.$menu&&void 0!==r.$menu&&r.$menu.trigger("contextmenu:hide");else{var d,h="left"===r.trigger&&0===o||"right"===r.trigger&&2===o;if(document.elementFromPoint&&r.$layer){if(r.$layer.hide(),(i=document.elementFromPoint(s-a.scrollLeft(),l-a.scrollTop())).isContentEditable){var u=document.createRange(),f=window.getSelection();u.selectNode(i),u.collapse(!0),f.removeAllRanges(),f.addRange(u)}t(i).trigger(e),r.$layer.show()}if(r.hideOnSecondTrigger&&h&&null!==r.$menu&&void 0!==r.$menu)r.$menu.trigger("contextmenu:hide");else{if(r.reposition&&h)if(document.elementFromPoint){if(r.$trigger.is(i))return void r.position.call(r.$trigger,r,s,l)}else if(n=r.$trigger.offset(),d=t(window),n.top+=d.scrollTop(),n.top<=e.pageY&&(n.left+=d.scrollLeft(),n.left<=e.pageX&&(n.bottom=n.top+r.$trigger.outerHeight(),n.bottom>=e.pageY&&(n.right=n.left+r.$trigger.outerWidth(),n.right>=e.pageX))))return void r.position.call(r.$trigger,r,s,l);i&&h&&r.$trigger.one("contextmenu:hidden",(function(){t(i).contextMenu({x:s,y:l,button:o})})),null!=r&&null!==r.$menu&&void 0!==r.$menu&&r.$menu.trigger("contextmenu:hide")}}}),50)},keyStop:function(t,e){e.isInput||t.preventDefault(),t.stopPropagation()},key:function(t){var e={};i&&(e=i.data("contextMenu")||{}),void 0===e.zIndex&&(e.zIndex=0);var n=0,a=function(t){""!==t.style.zIndex?n=t.style.zIndex:null!==t.offsetParent&&void 0!==t.offsetParent?a(t.offsetParent):null!==t.parentElement&&void 0!==t.parentElement&&a(t.parentElement)};if(a(t.target),!(e.$menu&&parseInt(n,10)>parseInt(e.$menu.css("zIndex"),10))){switch(t.keyCode){case 9:case 38:if(h.keyStop(t,e),e.isInput){if(9===t.keyCode&&t.shiftKey)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("prevcommand"));if(38===t.keyCode&&"checkbox"===e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault()}else if(9!==t.keyCode||t.shiftKey)return void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("prevcommand"));break;case 40:if(h.keyStop(t,e),!e.isInput)return void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("nextcommand"));if(9===t.keyCode)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("nextcommand"));if(40===t.keyCode&&"checkbox"===e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault();break;case 37:if(h.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;if(!e.$selected.parent().hasClass("context-menu-root")){var r=e.$selected.parent().parent();return e.$selected.trigger("contextmenu:blur"),void(e.$selected=r)}break;case 39:if(h.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;var o=e.$selected.data("contextMenu")||{};if(o.$menu&&e.$selected.hasClass("context-menu-submenu"))return e.$selected=null,o.$selected=null,void o.$menu.trigger("nextcommand");break;case 35:case 36:return e.$selected&&e.$selected.find("input, textarea, select").length?void 0:((e.$selected&&e.$selected.parent()||e.$menu).children(":not(."+e.classNames.disabled+", ."+e.classNames.notSelectable+")")[36===t.keyCode?"first":"last"]().trigger("contextmenu:focus"),void t.preventDefault());case 13:if(h.keyStop(t,e),e.isInput){if(e.$selected&&!e.$selected.is("textarea, select"))return void t.preventDefault();break}return void(void 0!==e.$selected&&null!==e.$selected&&e.$selected.trigger("mouseup"));case 32:case 33:case 34:return void h.keyStop(t,e);case 27:return h.keyStop(t,e),void(null!==e.$menu&&void 0!==e.$menu&&e.$menu.trigger("contextmenu:hide"));default:var s=String.fromCharCode(t.keyCode).toUpperCase();if(e.accesskeys&&e.accesskeys[s])return void e.accesskeys[s].$node.trigger(e.accesskeys[s].$menu?"contextmenu:focus":"mouseup")}t.stopPropagation(),void 0!==e.$selected&&null!==e.$selected&&e.$selected.trigger(t)}},prevItem:function(e){e.stopPropagation();var i=t(this).data("contextMenu")||{},n=t(this).data("contextMenuRoot")||{};if(i.$selected){var a=i.$selected;(i=i.$selected.parent().data("contextMenu")||{}).$selected=a}for(var r=i.$menu.children(),o=i.$selected&&i.$selected.prev().length?i.$selected.prev():r.last(),s=o;o.hasClass(n.classNames.disabled)||o.hasClass(n.classNames.notSelectable)||o.is(":hidden");)if((o=o.prev().length?o.prev():r.last()).is(s))return;i.$selected&&h.itemMouseleave.call(i.$selected.get(0),e),h.itemMouseenter.call(o.get(0),e);var l=o.find("input, textarea, select");l.length&&l.focus()},nextItem:function(e){e.stopPropagation();var i=t(this).data("contextMenu")||{},n=t(this).data("contextMenuRoot")||{};if(i.$selected){var a=i.$selected;(i=i.$selected.parent().data("contextMenu")||{}).$selected=a}for(var r=i.$menu.children(),o=i.$selected&&i.$selected.next().length?i.$selected.next():r.first(),s=o;o.hasClass(n.classNames.disabled)||o.hasClass(n.classNames.notSelectable)||o.is(":hidden");)if((o=o.next().length?o.next():r.first()).is(s))return;i.$selected&&h.itemMouseleave.call(i.$selected.get(0),e),h.itemMouseenter.call(o.get(0),e);var l=o.find("input, textarea, select");l.length&&l.focus()},focusInput:function(){var e=t(this).closest(".context-menu-item"),i=e.data(),n=i.contextMenu,a=i.contextMenuRoot;a.$selected=n.$selected=e,a.isInput=n.isInput=!0},blurInput:function(){var e=t(this).closest(".context-menu-item").data(),i=e.contextMenu;e.contextMenuRoot.isInput=i.isInput=!1},menuMouseenter:function(){t(this).data().contextMenuRoot.hovering=!0},menuMouseleave:function(e){var i=t(this).data().contextMenuRoot;i.$layer&&i.$layer.is(e.relatedTarget)&&(i.hovering=!1)},itemMouseenter:function(e){var i=t(this),n=i.data(),a=n.contextMenu,r=n.contextMenuRoot;r.hovering=!0,e&&r.$layer&&r.$layer.is(e.relatedTarget)&&(e.preventDefault(),e.stopImmediatePropagation()),(a.$menu?a:r).$menu.children("."+r.classNames.hover).trigger("contextmenu:blur").children(".hover").trigger("contextmenu:blur"),i.hasClass(r.classNames.disabled)||i.hasClass(r.classNames.notSelectable)?a.$selected=null:i.trigger("contextmenu:focus")},itemMouseleave:function(e){var i=t(this),n=i.data(),a=n.contextMenu,r=n.contextMenuRoot;if(r!==a&&r.$layer&&r.$layer.is(e.relatedTarget))return void 0!==r.$selected&&null!==r.$selected&&r.$selected.trigger("contextmenu:blur"),e.preventDefault(),e.stopImmediatePropagation(),void(r.$selected=a.$selected=a.$node);a&&a.$menu&&a.$menu.hasClass("context-menu-visible")||i.trigger("contextmenu:blur")},itemClick:function(e){var i,n=t(this),a=n.data(),r=a.contextMenu,o=a.contextMenuRoot,s=a.contextMenuKey;if(!(!r.items[s]||n.is("."+o.classNames.disabled+", .context-menu-separator, ."+o.classNames.notSelectable)||n.is(".context-menu-submenu")&&!1===o.selectableSubMenu)){if(e.preventDefault(),e.stopImmediatePropagation(),t.isFunction(r.callbacks[s])&&Object.prototype.hasOwnProperty.call(r.callbacks,s))i=r.callbacks[s];else{if(!t.isFunction(o.callback))return;i=o.callback}!1!==i.call(o.$trigger,s,o,e)?o.$menu.trigger("contextmenu:hide"):o.$menu.parent().length&&u.update.call(o.$trigger,o)}},inputClick:function(t){t.stopImmediatePropagation()},hideMenu:function(e,i){var n=t(this).data("contextMenuRoot");u.hide.call(n.$trigger,n,i&&i.force)},focusItem:function(e){e.stopPropagation();var i=t(this),n=i.data(),a=n.contextMenu,r=n.contextMenuRoot;i.hasClass(r.classNames.disabled)||i.hasClass(r.classNames.notSelectable)||(i.addClass([r.classNames.hover,r.classNames.visible].join(" ")).parent().find(".context-menu-item").not(i).removeClass(r.classNames.visible).filter("."+r.classNames.hover).trigger("contextmenu:blur"),a.$selected=r.$selected=i,a&&a.$node&&a.$node.hasClass("context-menu-submenu")&&a.$node.addClass(r.classNames.hover),a.$node&&r.positionSubmenu.call(a.$node,a.$menu))},blurItem:function(e){e.stopPropagation();var i=t(this),n=i.data(),a=n.contextMenu,r=n.contextMenuRoot;a.autoHide&&i.removeClass(r.classNames.visible),i.removeClass(r.classNames.hover),a.$selected=null}},u={show:function(e,n,a){var r=t(this),o={};if(t("#context-menu-layer").trigger("mousedown"),e.$trigger=r,!1!==e.events.show.call(r,e))if(!1!==u.update.call(r,e)){if(e.position.call(r,e,n,a),e.zIndex){var s=e.zIndex;"function"==typeof e.zIndex&&(s=e.zIndex.call(r,e)),o.zIndex=function(t){for(var e=0,i=t;e=Math.max(e,parseInt(i.css("z-index"),10)||0),(i=i.parent())&&i.length&&!("html body".indexOf(i.prop("nodeName").toLowerCase())>-1););return e}(r)+s}u.layer.call(e.$menu,e,o.zIndex),e.$menu.find("ul").css("zIndex",o.zIndex+1),e.$menu.css(o)[e.animation.show](e.animation.duration,(function(){r.trigger("contextmenu:visible"),u.activated(e),e.events.activated(e)})),r.data("contextMenu",e).addClass("context-menu-active"),t(document).off("keydown.contextMenu").on("keydown.contextMenu",h.key),e.autoHide&&t(document).on("mousemove.contextMenuAutoHide",(function(t){var i=r.offset();i.right=i.left+r.outerWidth(),i.bottom=i.top+r.outerHeight(),!e.$layer||e.hovering||t.pageX>=i.left&&t.pageX<=i.right&&t.pageY>=i.top&&t.pageY<=i.bottom||setTimeout((function(){e.hovering||null===e.$menu||void 0===e.$menu||e.$menu.trigger("contextmenu:hide")}),50)}))}else i=null;else i=null},hide:function(e,n){var a=t(this);if(e||(e=a.data("contextMenu")||{}),n||!e.events||!1!==e.events.hide.call(a,e)){if(a.removeData("contextMenu").removeClass("context-menu-active"),e.$layer){setTimeout((r=e.$layer,function(){r.remove()}),10);try{delete e.$layer}catch(t){e.$layer=null}}var r;i=null,e.$menu.find("."+e.classNames.hover).trigger("contextmenu:blur"),e.$selected=null,e.$menu.find("."+e.classNames.visible).removeClass(e.classNames.visible),t(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),e.$menu&&e.$menu[e.animation.hide](e.animation.duration,(function(){e.build&&(e.$menu.remove(),t.each(e,(function(t){switch(t){case"ns":case"selector":case"build":case"trigger":return!0;default:e[t]=void 0;try{delete e[t]}catch(t){}return!0}}))),setTimeout((function(){a.trigger("contextmenu:hidden")}),10)}))}},create:function(e,i){function n(e){var i=t("");if(e._accesskey)e._beforeAccesskey&&i.append(document.createTextNode(e._beforeAccesskey)),t("").addClass("context-menu-accesskey").text(e._accesskey).appendTo(i),e._afterAccesskey&&i.append(document.createTextNode(e._afterAccesskey));else if(e.isHtmlName){if(void 0!==e.accesskey)throw new Error("accesskeys are not compatible with HTML names and cannot be used together in the same item");i.html(e.name)}else i.text(e.name);return i}void 0===i&&(i=e),e.$menu=t('
        ').addClass(e.className||"").data({contextMenu:e,contextMenuRoot:i}),e.dataAttr&&t.each(e.dataAttr,(function(t,i){e.$menu.attr("data-"+e.key,i)})),t.each(["callbacks","commands","inputs"],(function(t,n){e[n]={},i[n]||(i[n]={})})),i.accesskeys||(i.accesskeys={}),t.each(e.items,(function(a,r){var o=t('
      • ').addClass(r.className||""),s=null,c=null;if(o.on("click",t.noop),"string"!=typeof r&&"cm_separator"!==r.type||(r={type:"cm_seperator"}),r.$node=o.data({contextMenu:e,contextMenuRoot:i,contextMenuKey:a}),void 0!==r.accesskey)for(var d,f=function(t){for(var e,i=t.split(/\s+/),n=[],a=0;e=i[a];a++)e=e.charAt(0).toUpperCase(),n.push(e);return n}(r.accesskey),p=0;d=f[p];p++)if(!i.accesskeys[d]){i.accesskeys[d]=r;var g=r.name.match(new RegExp("^(.*?)("+d+")(.*)$","i"));g&&(r._beforeAccesskey=g[1],r._accesskey=g[2],r._afterAccesskey=g[3]);break}if(r.type&&l[r.type])l[r.type].call(o,r,e,i),t.each([e,i],(function(i,n){n.commands[a]=r,!t.isFunction(r.callback)||void 0!==n.callbacks[a]&&void 0!==e.type||(n.callbacks[a]=r.callback)}));else{switch("cm_seperator"===r.type?o.addClass("context-menu-separator "+i.classNames.notSelectable):"html"===r.type?o.addClass("context-menu-html "+i.classNames.notSelectable):"sub"!==r.type&&r.type?(s=t("").appendTo(o),n(r).appendTo(s),o.addClass("context-menu-input"),e.hasTypes=!0,t.each([e,i],(function(t,e){e.commands[a]=r,e.inputs[a]=r}))):r.items&&(r.type="sub"),r.type){case"cm_seperator":break;case"text":c=t('').attr("name","context-menu-input-"+a).val(r.value||"").appendTo(s);break;case"textarea":c=t('').attr("name","context-menu-input-"+a).val(r.value||"").appendTo(s),r.height&&c.height(r.height);break;case"checkbox":c=t('').attr("name","context-menu-input-"+a).val(r.value||"").prop("checked",!!r.selected).prependTo(s);break;case"radio":c=t('').attr("name","context-menu-input-"+r.radio).val(r.value||"").prop("checked",!!r.selected).prependTo(s);break;case"select":c=t('').attr("name","context-menu-input-"+a).appendTo(s),r.options&&(t.each(r.options,(function(e,i){t("").val(e).text(i).appendTo(c)})),c.val(r.selected));break;case"sub":n(r).appendTo(o),r.appendTo=r.$node,o.data("contextMenu",r).addClass("context-menu-submenu"),r.callback=null,"function"==typeof r.items.then?u.processPromises(r,i,r.items):u.create(r,i);break;case"html":t(r.html).appendTo(o);break;default:t.each([e,i],(function(i,n){n.commands[a]=r,!t.isFunction(r.callback)||void 0!==n.callbacks[a]&&void 0!==e.type||(n.callbacks[a]=r.callback)})),n(r).appendTo(o)}r.type&&"sub"!==r.type&&"html"!==r.type&&"cm_seperator"!==r.type&&(c.on("focus",h.focusInput).on("blur",h.blurInput),r.events&&c.on(r.events,e)),r.icon&&(t.isFunction(r.icon)?r._icon=r.icon.call(this,this,o,a,r):"string"!=typeof r.icon||"fab "!==r.icon.substring(0,4)&&"fas "!==r.icon.substring(0,4)&&"fad "!==r.icon.substring(0,4)&&"far "!==r.icon.substring(0,4)&&"fal "!==r.icon.substring(0,4)?"string"==typeof r.icon&&"fa-"===r.icon.substring(0,3)?r._icon=i.classNames.icon+" "+i.classNames.icon+"--fa fa "+r.icon:r._icon=i.classNames.icon+" "+i.classNames.icon+"-"+r.icon:(o.addClass(i.classNames.icon+" "+i.classNames.icon+"--fa5"),r._icon=t('')),"string"==typeof r._icon?o.addClass(r._icon):o.prepend(r._icon))}r.$input=c,r.$label=s,o.appendTo(e.$menu),!e.hasTypes&&t.support.eventSelectstart&&o.on("selectstart.disableTextSelect",h.abortevent)})),e.$node||e.$menu.css("display","none").addClass("context-menu-root"),e.$menu.appendTo(e.appendTo||document.body)},resize:function(e,i){var n;e.css({position:"absolute",display:"block"}),e.data("width",(n=e.get(0)).getBoundingClientRect?Math.ceil(n.getBoundingClientRect().width):e.outerWidth()+1),e.css({position:"static",minWidth:"0px",maxWidth:"100000px"}),e.find("> li > ul").each((function(){u.resize(t(this),!0)})),i||e.find("ul").addBack().css({position:"",display:"",minWidth:"",maxWidth:""}).outerWidth((function(){return t(this).data("width")}))},update:function(e,i){var n=this;void 0===i&&(i=e,u.resize(e.$menu));var a=!1;return e.$menu.children().each((function(){var r,o=t(this),s=o.data("contextMenuKey"),l=e.items[s],c=t.isFunction(l.disabled)&&l.disabled.call(n,s,i)||!0===l.disabled;if((r=t.isFunction(l.visible)?l.visible.call(n,s,i):void 0===l.visible||!0===l.visible)&&(a=!0),o[r?"show":"hide"](),o[c?"addClass":"removeClass"](i.classNames.disabled),t.isFunction(l.icon)){o.removeClass(l._icon);var d=l.icon.call(this,n,o,s,l);"string"==typeof d?o.addClass(d):o.prepend(d)}if(l.type)switch(o.find("input, select, textarea").prop("disabled",c),l.type){case"text":case"textarea":l.$input.val(l.value||"");break;case"checkbox":case"radio":l.$input.val(l.value||"").prop("checked",!!l.selected);break;case"select":l.$input.val((0===l.selected?"0":l.selected)||"")}l.$menu&&(u.update.call(n,l,i)&&(a=!0))})),a},layer:function(e,i){var n=e.$layer=t('
        ').css({height:a.height(),width:a.width(),display:"block",position:"fixed","z-index":i,top:0,left:0,opacity:0,filter:"alpha(opacity=0)","background-color":"#000"}).data("contextMenuRoot",e).insertBefore(this).on("contextmenu",h.abortevent).on("mousedown",h.layerClick);return void 0===document.body.style.maxWidth&&n.css({position:"absolute",height:t(document).height()}),n},processPromises:function(t,e,i){function n(t,e,i){void 0===i?(i={error:{name:"No items and no error item",icon:"context-menu-icon context-menu-icon-quit"}},window.console&&(console.error||console.log).call(console,'When you reject a promise, provide an "items" object, equal to normal sub-menu items')):"string"==typeof i&&(i={error:{name:i}}),a(t,e,i)}function a(t,e,i){void 0!==e.$menu&&e.$menu.is(":visible")&&(t.$node.removeClass(e.classNames.iconLoadingClass),t.items=i,u.create(t,e,!0),u.update(t,e),e.positionSubmenu.call(t.$node,t.$menu))}t.$node.addClass(e.classNames.iconLoadingClass),i.then(function(t,e,i){void 0===i&&n(void 0),a(t,e,i)}.bind(this,t,e),n.bind(this,t,e))},activated:function(e){var i=e.$menu,n=i.offset(),a=t(window).height(),r=t(window).scrollTop(),o=i.height();o>a?i.css({height:a+"px","overflow-x":"hidden","overflow-y":"auto",top:r+"px"}):(n.topr+a)&&i.css({top:r+"px"})}};function f(e){return e.id&&t('label[for="'+e.id+'"]').val()||e.name}function p(e,i,n){return n||(n=0),i.each((function(){var i,a,r=t(this),o=this,s=this.nodeName.toLowerCase();switch("label"===s&&r.find("input, textarea, select").length&&(i=r.text(),s=(o=(r=r.children().first()).get(0)).nodeName.toLowerCase()),s){case"menu":a={name:r.attr("label"),items:{}},n=p(a.items,r.children(),n);break;case"a":case"button":a={name:r.text(),disabled:!!r.attr("disabled"),callback:function(){r.get(0).click()}};break;case"menuitem":case"command":switch(r.attr("type")){case void 0:case"command":case"menuitem":a={name:r.attr("label"),disabled:!!r.attr("disabled"),icon:r.attr("icon"),callback:function(){r.get(0).click()}};break;case"checkbox":a={type:"checkbox",disabled:!!r.attr("disabled"),name:r.attr("label"),selected:!!r.attr("checked")};break;case"radio":a={type:"radio",disabled:!!r.attr("disabled"),name:r.attr("label"),radio:r.attr("radiogroup"),value:r.attr("id"),selected:!!r.attr("checked")};break;default:a=void 0}break;case"hr":a="-------";break;case"input":switch(r.attr("type")){case"text":a={type:"text",name:i||f(o),disabled:!!r.attr("disabled"),value:r.val()};break;case"checkbox":a={type:"checkbox",name:i||f(o),disabled:!!r.attr("disabled"),selected:!!r.attr("checked")};break;case"radio":a={type:"radio",name:i||f(o),disabled:!!r.attr("disabled"),radio:!!r.attr("name"),value:r.val(),selected:!!r.attr("checked")};break;default:a=void 0}break;case"select":a={type:"select",name:i||f(o),disabled:!!r.attr("disabled"),selected:r.val(),options:{}},r.children().each((function(){a.options[this.value]=t(this).text()}));break;case"textarea":a={type:"textarea",name:i||f(o),disabled:!!r.attr("disabled"),value:r.val()};break;case"label":break;default:a={type:"html",html:r.clone(!0)}}a&&(n++,e["key"+n]=a)})),n}t.fn.contextMenu=function(e){var i=this,n=e;if(this.length>0)if(void 0===e)this.first().trigger("contextmenu");else if(void 0!==e.x&&void 0!==e.y)this.first().trigger(t.Event("contextmenu",{pageX:e.x,pageY:e.y,mouseButton:e.button}));else if("hide"===e){var a=this.first().data("contextMenu")?this.first().data("contextMenu").$menu:null;a&&a.trigger("contextmenu:hide")}else"destroy"===e?t.contextMenu("destroy",{context:this}):t.isPlainObject(e)?(e.context=this,t.contextMenu("create",e)):e?this.removeClass("context-menu-disabled"):e||this.addClass("context-menu-disabled");else t.each(s,(function(){this.selector===i.selector&&(n.data=this,t.extend(n.data,{trigger:"demand"}))})),h.contextmenu.call(n.target,n);return this},t.contextMenu=function(e,i){"string"!=typeof e&&(i=e,e="create"),"string"==typeof i?i={selector:i}:void 0===i&&(i={});var a=t.extend(!0,{},c,i||{}),l=t(document),d=l,f=!1;switch(a.context&&a.context.length?(d=t(a.context).first(),a.context=d.get(0),f=!t(a.context).is(document)):a.context=document,e){case"update":if(f)u.update(d);else for(var p in s)s.hasOwnProperty(p)&&u.update(s[p]);break;case"create":if(!a.selector)throw new Error("No selector specified");if(a.selector.match(/.context-menu-(list|item|input)($|\s)/))throw new Error('Cannot bind to selector "'+a.selector+'" as it contains a reserved className');if(!a.build&&(!a.items||t.isEmptyObject(a.items)))throw new Error("No Items specified");if(r++,a.ns=".contextMenu"+r,f||(o[a.selector]=a.ns),s[a.ns]=a,a.trigger||(a.trigger="right"),!n){var g="click"===a.itemClickEvent?"click.contextMenu":"mouseup.contextMenu",m={"contextmenu:focus.contextMenu":h.focusItem,"contextmenu:blur.contextMenu":h.blurItem,"contextmenu.contextMenu":h.abortevent,"mouseenter.contextMenu":h.itemMouseenter,"mouseleave.contextMenu":h.itemMouseleave};m[g]=h.itemClick,l.on({"contextmenu:hide.contextMenu":h.hideMenu,"prevcommand.contextMenu":h.prevItem,"nextcommand.contextMenu":h.nextItem,"contextmenu.contextMenu":h.abortevent,"mouseenter.contextMenu":h.menuMouseenter,"mouseleave.contextMenu":h.menuMouseleave},".context-menu-list").on("mouseup.contextMenu",".context-menu-input",h.inputClick).on(m,".context-menu-item"),n=!0}switch(d.on("contextmenu"+a.ns,a.selector,a,h.contextmenu),f&&d.on("remove"+a.ns,(function(){t(this).contextMenu("destroy")})),a.trigger){case"hover":d.on("mouseenter"+a.ns,a.selector,a,h.mouseenter).on("mouseleave"+a.ns,a.selector,a,h.mouseleave);break;case"left":d.on("click"+a.ns,a.selector,a,h.click);break;case"touchstart":d.on("touchstart"+a.ns,a.selector,a,h.click)}a.build||u.create(a);break;case"destroy":var v;if(f){var b=a.context;t.each(s,(function(e,i){if(!i)return!0;if(!t(b).is(i.selector))return!0;(v=t(".context-menu-list").filter(":visible")).length&&v.data().contextMenuRoot.$trigger.is(t(i.context).find(i.selector))&&v.trigger("contextmenu:hide",{force:!0});try{s[i.ns].$menu&&s[i.ns].$menu.remove(),delete s[i.ns]}catch(t){s[i.ns]=null}return t(i.context).off(i.ns),!0}))}else if(a.selector){if(o[a.selector]){(v=t(".context-menu-list").filter(":visible")).length&&v.data().contextMenuRoot.$trigger.is(a.selector)&&v.trigger("contextmenu:hide",{force:!0});try{s[o[a.selector]].$menu&&s[o[a.selector]].$menu.remove(),delete s[o[a.selector]]}catch(t){s[o[a.selector]]=null}l.off(o[a.selector])}}else l.off(".contextMenu .contextMenuAutoHide"),t.each(s,(function(e,i){t(i.context).off(i.ns)})),o={},s={},r=0,n=!1,t("#context-menu-layer, .context-menu-list").remove();break;case"html5":(!t.support.htmlCommand&&!t.support.htmlMenuitem||"boolean"==typeof i&&i)&&t('menu[type="context"]').each((function(){this.id&&t.contextMenu({selector:"[contextmenu="+this.id+"]",items:t.contextMenu.fromMenu(this)})})).css("display","none");break;default:throw new Error('Unknown operation "'+e+'"')}return this},t.contextMenu.setInputValues=function(e,i){void 0===i&&(i={}),t.each(e.inputs,(function(t,e){switch(e.type){case"text":case"textarea":e.value=i[t]||"";break;case"checkbox":e.selected=!!i[t];break;case"radio":e.selected=(i[e.radio]||"")===e.value;break;case"select":e.selected=i[t]||""}}))},t.contextMenu.getInputValues=function(e,i){return void 0===i&&(i={}),t.each(e.inputs,(function(t,e){switch(e.type){case"text":case"textarea":case"select":i[t]=e.$input.val();break;case"checkbox":i[t]=e.$input.prop("checked");break;case"radio":e.$input.prop("checked")&&(i[e.radio]=e.value)}})),i},t.contextMenu.fromMenu=function(e){var i={};return p(i,t(e).children()),i},t.contextMenu.defaults=c,t.contextMenu.types=l,t.contextMenu.handle=h,t.contextMenu.op=u,t.contextMenu.menus=s})),"undefined"==typeof jQuery)throw new Error("Tempus Dominus Bootstrap4's requires jQuery. jQuery must be included before Tempus Dominus Bootstrap4's JavaScript.");if(function(t){var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Tempus Dominus Bootstrap4's requires at least jQuery v3.0.0 but less than v4.0.0")}(),"undefined"==typeof moment)throw new Error("Tempus Dominus Bootstrap4's requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4's JavaScript.");var version=moment.version.split(".");if(version[0]<=2&&version[1]<17||version[0]>=3)throw new Error("Tempus Dominus Bootstrap4's requires at least moment.js v2.17.0 but less than v3.0.0");!function(){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(){function t(t,e){for(var i=0;i1){for(var a=0;a1)throw new TypeError("isEnabled expects a single character string parameter");switch(t){case"y":return-1!==this.actualFormat.indexOf("Y");case"M":return-1!==this.actualFormat.indexOf("M");case"d":return-1!==this.actualFormat.toLowerCase().indexOf("d");case"h":case"H":return-1!==this.actualFormat.toLowerCase().indexOf("h");case"m":return-1!==this.actualFormat.indexOf("m");case"s":return-1!==this.actualFormat.indexOf("s");case"a":case"A":return-1!==this.actualFormat.toLowerCase().indexOf("a");default:return!1}},v.prototype._hasTime=function(){return this._isEnabled("h")||this._isEnabled("m")||this._isEnabled("s")},v.prototype._hasDate=function(){return this._isEnabled("y")||this._isEnabled("M")||this._isEnabled("d")},v.prototype._dataToOptions=function(){var e=this._element.data(),i={};return e.dateOptions&&e.dateOptions instanceof Object&&(i=t.extend(!0,i,e.dateOptions)),t.each(this._options,(function(t){var n="date"+t.charAt(0).toUpperCase()+t.slice(1);void 0!==e[n]?i[t]=e[n]:delete i[t]})),i},v.prototype._notifyEvent=function(t){t.type===v.Event.CHANGE&&t.date&&t.date.isSame(t.oldDate)||!t.date&&!t.oldDate||this._element.trigger(t)},v.prototype._viewUpdate=function(t){"y"===t&&(t="YYYY"),this._notifyEvent({type:v.Event.UPDATE,change:t,viewDate:this._viewDate.clone()})},v.prototype._showMode=function(t){this.widget&&(t&&(this.currentViewMode=Math.max(this.MinViewModeNumber,Math.min(3,this.currentViewMode+t))),this.widget.find(".datepicker > div").hide().filter(".datepicker-"+h[this.currentViewMode].CLASS_NAME).show())},v.prototype._isInDisabledDates=function(t){return!0===this._options.disabledDates[t.format("YYYY-MM-DD")]},v.prototype._isInEnabledDates=function(t){return!0===this._options.enabledDates[t.format("YYYY-MM-DD")]},v.prototype._isInDisabledHours=function(t){return!0===this._options.disabledHours[t.format("H")]},v.prototype._isInEnabledHours=function(t){return!0===this._options.enabledHours[t.format("H")]},v.prototype._isValid=function(e,i){if(!e.isValid())return!1;if(this._options.disabledDates&&"d"===i&&this._isInDisabledDates(e))return!1;if(this._options.enabledDates&&"d"===i&&!this._isInEnabledDates(e))return!1;if(this._options.minDate&&e.isBefore(this._options.minDate,i))return!1;if(this._options.maxDate&&e.isAfter(this._options.maxDate,i))return!1;if(this._options.daysOfWeekDisabled&&"d"===i&&-1!==this._options.daysOfWeekDisabled.indexOf(e.day()))return!1;if(this._options.disabledHours&&("h"===i||"m"===i||"s"===i)&&this._isInDisabledHours(e))return!1;if(this._options.enabledHours&&("h"===i||"m"===i||"s"===i)&&!this._isInEnabledHours(e))return!1;if(this._options.disabledTimeIntervals&&("h"===i||"m"===i||"s"===i)){var n=!1;if(t.each(this._options.disabledTimeIntervals,(function(){if(e.isBetween(this[0],this[1]))return n=!0,!1})),n)return!1}return!0},v.prototype._parseInputDate=function(t){return void 0===this._options.parseInputDate?n.isMoment(t)||(t=this.getMoment(t)):t=this._options.parseInputDate(t),t},v.prototype._keydown=function(t){var e=null,i=void 0,n=void 0,a=void 0,r=void 0,o=[],s={},l=t.which;for(i in p[l]="p",p)p.hasOwnProperty(i)&&"p"===p[i]&&(o.push(i),parseInt(i,10)!==l&&(s[i]=!0));for(i in this._options.keyBinds)if(this._options.keyBinds.hasOwnProperty(i)&&"function"==typeof this._options.keyBinds[i]&&(a=i.split(" ")).length===o.length&&u[l]===a[a.length-1]){for(r=!0,n=a.length-2;n>=0;n--)if(!(u[a[n]]in s)){r=!1;break}if(r){e=this._options.keyBinds[i];break}}e&&e.call(this)&&(t.stopPropagation(),t.preventDefault())},v.prototype._keyup=function(t){p[t.which]="r",g[t.which]&&(g[t.which]=!1,t.stopPropagation(),t.preventDefault())},v.prototype._indexGivenDates=function(e){var i={},n=this;return t.each(e,(function(){var t=n._parseInputDate(this);t.isValid()&&(i[t.format("YYYY-MM-DD")]=!0)})),!!Object.keys(i).length&&i},v.prototype._indexGivenHours=function(e){var i={};return t.each(e,(function(){i[this]=!0})),!!Object.keys(i).length&&i},v.prototype._initFormatting=function(){var t=this._options.format||"L LT",e=this;this.actualFormat=t.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,(function(t){return e._dates[0].localeData().longDateFormat(t)||t})),this.parseFormats=this._options.extraFormats?this._options.extraFormats.slice():[],this.parseFormats.indexOf(t)<0&&this.parseFormats.indexOf(this.actualFormat)<0&&this.parseFormats.push(this.actualFormat),this.use24Hours=this.actualFormat.toLowerCase().indexOf("a")<1&&this.actualFormat.replace(/\[.*?]/g,"").indexOf("h")<1,this._isEnabled("y")&&(this.MinViewModeNumber=2),this._isEnabled("M")&&(this.MinViewModeNumber=1),this._isEnabled("d")&&(this.MinViewModeNumber=0),this.currentViewMode=Math.max(this.MinViewModeNumber,this.currentViewMode),this.unset||this._setValue(this._dates[0],0)},v.prototype._getLastPickedDate=function(){return this._dates[this._getLastPickedDateIndex()]},v.prototype._getLastPickedDateIndex=function(){return this._dates.length-1},v.prototype.getMoment=function(t){var e=void 0;return e=null==t?n():this._hasTimeZone()?n.tz(t,this.parseFormats,this._options.locale,this._options.useStrict,this._options.timeZone):n(t,this.parseFormats,this._options.locale,this._options.useStrict),this._hasTimeZone()&&e.tz(this._options.timeZone),e},v.prototype.toggle=function(){return this.widget?this.hide():this.show()},v.prototype.ignoreReadonly=function(t){if(0===arguments.length)return this._options.ignoreReadonly;if("boolean"!=typeof t)throw new TypeError("ignoreReadonly () expects a boolean parameter");this._options.ignoreReadonly=t},v.prototype.options=function(e){if(0===arguments.length)return t.extend(!0,{},this._options);if(!(e instanceof Object))throw new TypeError("options() this.options parameter should be an object");t.extend(!0,this._options,e);var i=this;t.each(this._options,(function(t,e){void 0!==i[t]&&i[t](e)}))},v.prototype.date=function(t,e){if(e=e||0,0===arguments.length)return this.unset?null:this._options.allowMultidate?this._dates.join(this._options.multidateSeparator):this._dates[e].clone();if(!(null===t||"string"==typeof t||n.isMoment(t)||t instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");this._setValue(null===t?null:this._parseInputDate(t),e)},v.prototype.format=function(t){if(0===arguments.length)return this._options.format;if("string"!=typeof t&&("boolean"!=typeof t||!1!==t))throw new TypeError("format() expects a string or boolean:false parameter "+t);this._options.format=t,this.actualFormat&&this._initFormatting()},v.prototype.timeZone=function(t){if(0===arguments.length)return this._options.timeZone;if("string"!=typeof t)throw new TypeError("newZone() expects a string parameter");this._options.timeZone=t},v.prototype.dayViewHeaderFormat=function(t){if(0===arguments.length)return this._options.dayViewHeaderFormat;if("string"!=typeof t)throw new TypeError("dayViewHeaderFormat() expects a string parameter");this._options.dayViewHeaderFormat=t},v.prototype.extraFormats=function(t){if(0===arguments.length)return this._options.extraFormats;if(!1!==t&&!(t instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");this._options.extraFormats=t,this.parseFormats&&this._initFormatting()},v.prototype.disabledDates=function(e){if(0===arguments.length)return this._options.disabledDates?t.extend({},this._options.disabledDates):this._options.disabledDates;if(!e)return this._options.disabledDates=!1,this._update(),!0;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");this._options.disabledDates=this._indexGivenDates(e),this._options.enabledDates=!1,this._update()},v.prototype.enabledDates=function(e){if(0===arguments.length)return this._options.enabledDates?t.extend({},this._options.enabledDates):this._options.enabledDates;if(!e)return this._options.enabledDates=!1,this._update(),!0;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");this._options.enabledDates=this._indexGivenDates(e),this._options.disabledDates=!1,this._update()},v.prototype.daysOfWeekDisabled=function(t){if(0===arguments.length)return this._options.daysOfWeekDisabled.splice(0);if("boolean"==typeof t&&!t)return this._options.daysOfWeekDisabled=!1,this._update(),!0;if(!(t instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(this._options.daysOfWeekDisabled=t.reduce((function(t,e){return(e=parseInt(e,10))>6||e<0||isNaN(e)||-1===t.indexOf(e)&&t.push(e),t}),[]).sort(),this._options.useCurrent&&!this._options.keepInvalid)for(var e=0;e1)throw new TypeError("multidateSeparator expects a single character string parameter");this._options.multidateSeparator=t},e(v,null,[{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return r}},{key:"EVENT_KEY",get:function(){return o}},{key:"DATA_API_KEY",get:function(){return s}},{key:"DatePickerModes",get:function(){return h}},{key:"ViewModes",get:function(){return f}},{key:"Event",get:function(){return d}},{key:"Selector",get:function(){return l}},{key:"Default",get:function(){return m},set:function(t){m=t}},{key:"ClassName",get:function(){return c}}]),v}();return v}(jQuery,moment);!function(e){var a=e.fn[n.NAME],r=["top","bottom","auto"],o=["left","right","auto"],s=["default","top","bottom"],l=function(t){var i=t.data("target"),a=void 0;return i||(i=t.attr("href")||"",i=/^#[a-z]/i.test(i)?i:null),0===(a=e(i)).length||a.data(n.DATA_KEY)||e.extend({},a.data(),e(this).data()),a},c=function(a){function l(t,e){i(this,l);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,a.call(this,t,e));return n._init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(l,a),l.prototype._init=function(){if(this._element.hasClass("input-group")){var t=this._element.find(".datepickerbutton");0===t.length?this.component=this._element.find('[data-toggle="datetimepicker"]'):this.component=t}},l.prototype._getDatePickerTemplate=function(){var t=e("
        ").addClass("prev").attr("data-action","previous").append(e("").addClass(this._options.icons.previous))).append(e("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",this._options.calendarWeeks?"6":"5")).append(e("").addClass("next").attr("data-action","next").append(e("").addClass(this._options.icons.next)))),i=e("
        ").attr("colspan",this._options.calendarWeeks?"8":"7")));return[e("
        ").addClass("datepicker-days").append(e("").addClass("table table-sm").append(t).append(e(""))),e("
        ").addClass("datepicker-months").append(e("
        ").addClass("table-condensed").append(t.clone()).append(i.clone())),e("
        ").addClass("datepicker-years").append(e("
        ").addClass("table-condensed").append(t.clone()).append(i.clone())),e("
        ").addClass("datepicker-decades").append(e("
        ").addClass("table-condensed").append(t.clone()).append(i.clone()))]},l.prototype._getTimePickerMainTemplate=function(){var t=e(""),i=e(""),n=e("");return this._isEnabled("h")&&(t.append(e(" - -
        - - -
        -
        - -
        - -
        -
        -
        -
        -
        {{__("İmzalayan")}}
        -
        -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        -
        -
        -
        -
        {{__("Parmak İzleri")}}
        -
        -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        -
        -
        -
        -
        {{__("Geçerlilik Tarihi")}}
        -
        -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -

        {{__("Sertifikayı Onayla")}}

        -
        -
        - {{__("Not : Eklediğiniz sertifika işletim sistemi tarafından güvenilecektir.")}}

        - -
        -
        -
        -
        - - - -@endsection \ No newline at end of file diff --git a/resources/views/settings/channel.blade.php b/resources/views/settings/channel.blade.php deleted file mode 100644 index 3b491a6a5..000000000 --- a/resources/views/settings/channel.blade.php +++ /dev/null @@ -1,5 +0,0 @@ -@extends('layouts.app') - -@section('content') - It Works! -@endsection \ No newline at end of file diff --git a/resources/views/settings/extension.blade.php b/resources/views/settings/extension.blade.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/resources/views/settings/health.blade.php b/resources/views/settings/health.blade.php deleted file mode 100644 index 2c9a330f9..000000000 --- a/resources/views/settings/health.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -@extends('layouts.app') - -@section('content') - -@endsection \ No newline at end of file diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php deleted file mode 100755 index 0a4f8babc..000000000 --- a/resources/views/settings/index.blade.php +++ /dev/null @@ -1,667 +0,0 @@ -@extends('layouts.app') - -@section('content') - -
        -
        -
        -
        - -
        -
        - @include('errors') -
        -
        - @include('modal-button',[ - "class" => "btn-success", - "target_id" => "add_user", - "text" => "Kullanıcı Ekle" - ])

        -
        - @include('table',[ - "value" => \App\User::all()->map(function($user) { - $user->status = (bool) $user->status ? __("Yönetici") : __("Kullanıcı"); - $user->username = empty($user->username) ? "-" : $user->username; - $user->auth_type = ! empty($user->auth_type) ? ( - $user->auth_type == "local" ? "Liman" : ( - $user->auth_type == "ldap" ? "LDAP" : "Keycloak" - ) - ) : "-"; - return $user; - }), - "title" => [ - "İsim Soyisim", "Kullanıcı Adı", "Email", "Yetki", "Giriş Türü", "*hidden*" , - ], - "display" => [ - "name", "username", "email", "id:user_id", "status", "auth_type" - ], - "menu" => [ - "Parolayı Sıfırla" => [ - "target" => "passwordReset", - "icon" => "fa-lock" - ], - "Sil" => [ - "target" => "deleteUser", - "icon" => " context-menu-icon-delete" - ] - ], - "onclick" => "userDetails" - ]) -
        -
        -
        - @include('modal-button',[ - "class" => "btn-success", - "target_id" => "add_role", - "text" => "Rol Grubu Ekle" - ])

        -
        - -
        -
        -
        - -

        - @include('table',[ - "value" => \App\Models\Certificate::all(), - "title" => [ - "Sunucu Adresi" , "Servis" , "*hidden*" , - ], - "display" => [ - "server_hostname" , "origin", "id:certificate_id" , - ], - "menu" => [ - "Detaylar" => [ - "target" => "showCertificateModal", - "icon" => "fa-info" - ], - "Güncelle" => [ - "target" => "updateCertificate", - "icon" => "fa-sync-alt" - ], - "Sil" => [ - "target" => "deleteCertificate", - "icon" => " context-menu-icon-delete" - ] - ], - ]) -
        -
        -
        
        -                        
        -
        - @include('extension_pages.manager') -
        -
        -

        {{__("Liman'ın sunucu adreslerini çözebilmesi için gerekli DNS sunucularını aşağıdan düzenleyebilirsiniz.")}}

        -
        - - - - - -
        - - -
        -
        - enabled = $server->enabled - ? __("Aktif") - : __("Pasif"); - } - ?> - -

        - @include('table',[ - "value" => $servers, - "title" => [ - "Sunucu Adı" , "İp Adresi" , "Durumu" , "*hidden*" - ], - "display" => [ - "name" , "ip_address", "enabled", "id:server_id" - ], - "noInitialize" => true - ]) - -
        - {!! settingsModuleViews() !!} -
        - @php($updateOutput = shell_exec("apt list --upgradable | grep 'liman'")) - @if($updateOutput) -
        {{$updateOutput}}
        - @else -
        {{__("Liman Sürümünüz : " . getVersion() . " güncel.")}}
        - @endif -
        - -
        - @include('modal-button',[ - "class" => "btn-primary", - "target_id" => "addNewNotificationSource", - "text" => "Yeni İstemci Ekle" - ])

        - @include('table',[ - "value" => \App\Models\ExternalNotification::all(), - "title" => [ - "İsim" , "İp Adresi / Hostname", "Son Erişim Tarihi" , "*hidden*" , - ], - "display" => [ - "name" , "ip", "last_used", "id:id" , - ], - "menu" => [ - "Düzenle" => [ - "target" => "editExternalNotificationToken", - "icon" => " context-menu-icon-edit" - ], - "Yeni Token Al" => [ - "target" => "renewExternalNotificationToken", - "icon" => "fa-lock" - ], - "Sil" => [ - "target" => "deleteExternalNotificationToken", - "icon" => " context-menu-icon-delete" - ] - ], - ]) -
        - -
        -

        {{__("Liman Üzerindeki İşlem Loglarını hedef bir log sunucusuna rsyslog servisi ile göndermek için hedef log sunucusunun adresi ve portunu yazınız.")}}

        -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        - -
        - - -
        -
        -
        -
        -
        - @include("settings.tweaks") -
        -
        -
        -
        -
        -
        - - - - - @include('modal',[ - "id"=>"add_user", - "title" => "Kullanıcı Ekle", - "url" => route('user_add'), - "next" => "afterUserAdd", - "selects" => [ - "Yönetici:administrator" => [ - "-:administrator" => "type:hidden" - ], - "Kullanıcı:user" => [ - "-:user" => "type:hidden" - ] - ], - "inputs" => [ - "İsim Soyisim" => "name:text", - "Kullanıcı Adı (opsiyonel)" => "username:text", - "E-mail Adresi" => "email:email", - ], - "submit_text" => "Ekle" - ]) - - @include('modal',[ - "id"=>"add_role", - "title" => "Rol Grubu Ekle", - "url" => route('role_add'), - "next" => "reload", - "inputs" => [ - "Adı" => "name:text" - ], - "submit_text" => "Ekle" - ]) - - @include('modal',[ - "id"=>"deleteUser", - "title" =>"Kullanıcıyı Sil", - "url" => route('user_remove'), - "text" => "Kullanıcıyı silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "reload", - "inputs" => [ - "Kullanici Id:'null'" => "user_id:hidden" - ], - "submit_text" => "Kullanıcıyı Sil" - ]) - - @include('modal',[ - "id"=>"editRole", - "title" => "Rol Grubu Yeniden Adlandır", - "url" => route('role_rename'), - "next" => "getRoleList", - "inputs" => [ - "Rol Adı" => "name:text", - "Rol Id:'null'" => "role_id:hidden" - ], - "submit_text" => "Düzenle" - ]) - - @include('modal',[ - "id"=>"deleteRole", - "title" =>"Rol Grubunu Sil", - "url" => route('role_remove'), - "text" => "Rol grubunu silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "getRoleList", - "inputs" => [ - "Rol Id:'null'" => "role_id:hidden" - ], - "submit_text" => "Rol Grubunu Sil" - ]) - - @component('modal-component',[ - "id" => "showCertificate", - "title" => "Sertifika Detayları", - ]) -
        -
        -
        -
        -
        {{__("İmzalayan")}}
        -
        -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        -
        -
        -
        -
        {{__("Parmak İzleri")}}
        -
        -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        -
        -
        -
        -
        {{__("Geçerlilik Tarihi")}}
        -
        -
        -
        -
        - - -
        -
        - - -
        -
        -
        -
        -
        - @endcomponent - - @include('modal',[ - "id"=>"updateCertificate", - "title" =>"Sertifikayı Güncelle", - "url" => route('update_certificate'), - "text" => "Sertifikayı güncellemek istediğinize emin misiniz?", - "next" => "reload", - "inputs" => [ - "Kullanici Id:'null'" => "certificate_id:hidden" - ], - "submit_text" => "Sertifikayı Güncelle" - ]) - - @include('modal',[ - "id"=>"deleteCertificate", - "title" =>"Sertifikayı Sil", - "url" => route('remove_certificate'), - "text" => "Sertifikayı silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "reload", - "inputs" => [ - "Kullanici Id:'null'" => "certificate_id:hidden" - ], - "submit_text" => "Sertifikayı Sil" - ]) - - @include('modal',[ - "id"=>"passwordReset", - "title" =>"Parolayı Sıfırla", - "url" => route('user_password_reset'), - "text" => "Parolayı sıfırlamak istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "nothing", - "inputs" => [ - "Kullanici Id:'null'" => "user_id:hidden" - ], - "submit_text" => "Parolayı Sıfırla" - ]) - - @include('modal',[ - "id"=>"addNewNotificationSource", - "title" => "Yeni Bildirim İstemcisi Ekle", - "url" => route('add_notification_channel'), - "text" => "İp Adresi bölümüne izin vermek istediğiniz bir subnet adresini ya da ip adresini yazarak erişimi kısıtlayabilirsiniz. Örneğin : 192.168.1.0/24", - "next" => "debug", - "inputs" => [ - "Adı" => "name:text", - "İp Adresi / Hostname" => "ip:text", - ], - "submit_text" => "Ekle" - ]) - - @include('modal',[ - "id"=>"editExternalNotificationToken", - "title" =>"İstemciyi Düzenle", - "url" => route('edit_notification_channel'), - "text" => "İp Adresi bölümüne izin vermek istediğiniz bir subnet adresini ya da ip adresini yazarak erişimi kısıtlayabilirsiniz. Örneğin : 192.168.1.0/24", - "next" => "reload", - "inputs" => [ - "Adı" => "name:text", - "İp Adresi / Hostname" => "ip:text", - "-:-" => "id:hidden" - ], - "submit_text" => "Yenile" - ]) - - @include('modal',[ - "id"=>"renewExternalNotificationToken", - "title" =>"İstemci Token'ı Yenile", - "url" => route('renew_notification_channel'), - "text" => "İstemciye ait token'i yenilemek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "debug", - "inputs" => [ - "-:-" => "id:hidden" - ], - "submit_text" => "Yenile" - ]) - - @include('modal',[ - "id"=>"deleteExternalNotificationToken", - "title" =>"İstemciyi Sil", - "url" => route('revoke_notification_channel'), - "text" => "İstemciyi silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "reload", - "inputs" => [ - "-:-" => "id:hidden" - ], - "submit_text" => "Sil" - ]) - - - -@endsection diff --git a/resources/views/settings/one.blade.php b/resources/views/settings/one.blade.php deleted file mode 100644 index b85506dce..000000000 --- a/resources/views/settings/one.blade.php +++ /dev/null @@ -1,599 +0,0 @@ -@extends('layouts.app') - -@section('content') - -
        - -
        - @include('errors') -
        -
        -
        -
        -
        - -
        - @if ($user->auth_type !== "ldap" && $user->auth_type !== 'keycloak') -
        - -
        -
        -
        - -
        -
        - @endif -
        - - -
        -
        -
        - @php - $col = $user->auth_type !== "ldap" && $user->auth_type !== 'keycloak' ? "4" : "6"; - @endphp -
        -
        -
        - @if ($user->auth_type !== "ldap" && $user->auth_type !== 'keycloak') -
        -
        -
        - @endif -
        - -
        -
        - -
        -
        - -

        - @include('table',[ - "id" => "role_table", - "value" => $user->roles, - "title" => [ - "Adı" , "*hidden*" - ], - "display" => [ - "name" , "id:role_id" - ], - "menu" => [ - "Görüntüle" => [ - "target" => "roleDetails", - "icon" => "fa-arrow-right" - ] - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "extension_table", - "value" => $extensions, - "title" => [ - "Adı" , "*hidden*" - ], - "display" => [ - "display_name" , "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "server_table", - "value" => $servers, - "title" => [ - "Adı" , "*hidden*" - ], - "display" => [ - "name" , "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "extensionFunctions", - "value" => $user->permissions->where('type','function')->map(function ($item){ - $function = getExtensionFunctions($item->value)->where('name', $item->extra)->first(); - $item->description = isset($function['description']) ? extensionTranslate($function['description'], $item->value) : ''; - return $item; - }), - "title" => [ - "Açıklama", "Fonksiyon Adı" , "Eklenti" , "*hidden*" - ], - "display" => [ - "description", "extra" , "value", "id:id" - ], - "menu" => [ - "Yetki Verilerini Düzenle" => [ - "target" => "permissionData", - "icon" => "fa-database" - ] - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "liman_table", - "value" => getLimanPermissions($user->id), - "title" => [ - "Adı" , "*hidden*" - ], - "display" => [ - "name" , "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "variables_table", - "value" => $user->permissions->where('type','variable'), - "title" => [ - "Adı" , "*hidden*", "Değeri" - ], - "display" => [ - "key" , "id:id", "value" - ], - "noInitialize" => "true" - ]) -
        -
        -
        -
        - - @include('modal',[ - "id" => "role_modal", - "title" => "Rol Grubu Listesi", - "submit_text" => "Seçili Grupları Ekle", - "onsubmit" => "addRole" - ]) - @include('modal',[ - "id" => "server_modal", - "title" => "Sunucu Listesi", - "submit_text" => "Seçili Sunuculara Yetki Ver", - "onsubmit" => "addData" - ]) - @include('modal',[ - "id" => "extension_modal", - "title" => "Eklenti Listesi", - "submit_text" => "Seçili Eklentilere Yetki Ver", - "onsubmit" => "addData" - ]) - @include('modal',[ - "id" => "liman_modal", - "title" => "Özellik Listesi", - "submit_text" => "Seçili Özelliklere Yetki Ver", - "onsubmit" => "addData" - ]) - - @include('modal',[ - "id" => "variables_modal", - "title" => "Özel Veri Ekle", - "submit_text" => "Ekle", - "url" => route('permission_add_variable'), - "inputs" => [ - "Adı" => "key:text", - "Değeri" => "value:text", - "$user->id:$user->id" => "object_id:hidden", - "users:users" => "object_type:hidden" - ], - "next" => "reload" - ]) - - @component('modal-component',[ - "id" => "permissionDataModal", - "title" => "Fonksiyon Parametreleri", - "footer" => [ - "class" => "btn-success", - "onclick" => "writePermissionData()", - "text" => "Kaydet" - ] - ]) - -
        - - @endcomponent - - @include('modal',[ - "id"=>"removeUser", - "title" =>"Kullanıcıyı Sil", - "url" => route('user_remove'), - "text" => "Kullanıcıyı silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "redirectToSettings", - "inputs" => [ - "Kullanici Id:'null'" => "user_id:hidden" - ], - "submit_text" => "Kullanıcıyı Sil" - ]) - - @include('modal',[ - "id"=>"resetPassword", - "title" =>"Parolayı Sıfırla", - "url" => route('user_password_reset'), - "text" => "Parolayı sıfırlamak istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "nothing", - "inputs" => [ - "Kullanici Id:'null'" => "user_id:hidden" - ], - "submit_text" => "Parolayı Sıfırla" - ]) - -@endsection \ No newline at end of file diff --git a/resources/views/settings/role.blade.php b/resources/views/settings/role.blade.php deleted file mode 100644 index 8b5888c91..000000000 --- a/resources/views/settings/role.blade.php +++ /dev/null @@ -1,423 +0,0 @@ -@extends('layouts.app') - -@section('content') - -
        - -
        - @include('errors') -
        -
        - -

        - @include('table',[ - "id" => "extension_table", - "value" => $extensions, - "title" => [ - "Adı" , "*hidden*" - ], - "display" => [ - "name" , "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "server_table", - "value" => $servers, - "title" => [ - "Adı" , "*hidden*" - ], - "display" => [ - "name" , "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "extensionFunctions", - "value" => $role->permissions->where('type','function')->map(function ($item){ - $functions = getExtensionFunctions($item->value); - if ($functions != []) { - $function = $functions->where('name', $item->extra)->first(); - } else { - return $item; - } - $item->description = isset($function['description']) ? extensionTranslate($function['description'], $item->value) : ''; - return $item; - }), - "title" => [ - "Açıklama", "Fonksiyon Adı", "Eklenti", "*hidden*" - ], - "display" => [ - "description", "extra", "value", "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "liman_table", - "value" => $limanPermissions, - "title" => [ - "Adı" , "*hidden*" - ], - "display" => [ - "name" , "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "variables_table", - "value" => $variablesPermissions, - "title" => [ - "Adı" , "*hidden*", "Değeri" - ], - "display" => [ - "key" , "id:id", "value" - ], - "noInitialize" => "true" - ]) -
        -
        - -

        - @include('table',[ - "id" => "role_users_table", - "value" => $role->users, - "title" => [ - "Kullanıcı Adı" , "Email" , "*hidden*" - ], - "display" => [ - "name", "email", "id:id" - ], - "noInitialize" => "true" - ]) -
        -
        -
        -
        - - @include('modal',[ - "id" => "user_modal", - "title" => "Kullanıcı Listesi", - "submit_text" => "Seçili Kullanıcıları Gruba Ekle", - "onsubmit" => "addUsers" - ]) - @include('modal',[ - "id" => "server_modal", - "title" => "Sunucu Listesi", - "submit_text" => "Seçili Sunuculara Yetki Ver", - "onsubmit" => "addData" - ]) - @include('modal',[ - "id" => "extension_modal", - "title" => "Eklenti Listesi", - "submit_text" => "Seçili Eklentilere Yetki Ver", - "onsubmit" => "addData" - ]) - @include('modal',[ - "id" => "liman_modal", - "title" => "Özellik Listesi", - "submit_text" => "Seçili Özelliklere Yetki Ver", - "onsubmit" => "addData" - ]) - - @include('modal',[ - "id" => "variables_modal", - "title" => "Özel Veri Ekle", - "submit_text" => "Ekle", - "url" => route('permission_add_variable'), - "inputs" => [ - "Adı" => "key:text", - "Değeri" => "value:text", - "$role->id:$role->id" => "object_id:hidden", - "roles:roles" => "object_type:hidden" - ], - "next" => "reload" - ]) - - -@endsection \ No newline at end of file diff --git a/resources/views/settings/tweaks.blade.php b/resources/views/settings/tweaks.blade.php deleted file mode 100644 index 3a5ea3742..000000000 --- a/resources/views/settings/tweaks.blade.php +++ /dev/null @@ -1,274 +0,0 @@ -
        - -
        -
        -
        -
        -
        -
        - {{__("Sistemin genel dil ayarı. Dil seçimi yapmamış kullanıcıların ayarlarını da değiştirir.")}} - -
        -
        -
        - {{__("Giriş ekranında gözükecek özel isim.")}} - -
        -
        -
        - -
        -
        -
        - {{__("Eklenti sayfasında kullanıcıların yardım alması için oluşturulan mail adresi.")}} - -
        -
        -
        - {{__("Maillerde ve bildimlerde eklenmesi gereken Liman'ın adresi")}} - -
        -
        -
        - {{__("Giriş ekranının üzerinde görünmesi için kendi logonuzu ekleyebilirsiniz.")}} -
        -
        - - - - - - - - -
        -
        -
        -
        -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        - -
        -
        -
        -
        -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        -
        - -
        -
        -
        -
        -
        -
        -
        - -
        -
        -
        - {{__("Liman'ın debug modunu aktifleştir.")}} - -
        -
        -
        - {{__("Eklenti geliştirici modunu aktifleştir.")}} - -
        -
        -
        - {{__("Log Seviyesini düzenle.")}} - -
        -
        -
        - -
        -
        -
        -
        -
        -
        - -
        -
        - \ No newline at end of file diff --git a/resources/views/terminal/index.blade.php b/resources/views/terminal/index.blade.php deleted file mode 100644 index 715abc81b..000000000 --- a/resources/views/terminal/index.blade.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - -
        -
        -
        - - - - - \ No newline at end of file diff --git a/resources/views/user/keys.blade.php b/resources/views/user/keys.blade.php deleted file mode 100644 index 565eb9a0d..000000000 --- a/resources/views/user/keys.blade.php +++ /dev/null @@ -1,75 +0,0 @@ -@extends('layouts.app') - -@section('content') - - @include('errors') -
        -
        -
        -
        -

        {{__("Kişisel Erişim Anahtarları")}}

        -

        {{__("Size ait Kişisel Erişim Anahtarları'nın listesini görüntüleyebilirsiniz. Mevcut anahtar üzerinde işlem yapmak için sağ tıklayabilirsiniz.")}}

        -
        -
        -
        -
        -
        -
        - @include('modal-button',[ - "class" => "btn-success", - "target_id" => "addAccessToken", - "text" => "Oluştur" - ])

        - @include('table',[ - "value" => $access_tokens, - "title" => [ - "Adı", "Token", "İp Adresi / Hostname","*hidden*" - ], - "display" => [ - "name" , "token", "ip_range" ,"id:token_id" - ], - "menu" => [ - "Sil" => [ - "target" => "removeAccessToken", - "icon" => " context-menu-icon-delete" - ] - ] - ]) -
        -
        -
        -
        - -@include('modal',[ - "id"=>"addAccessToken", - "title" => "Anahtar Oluştur", - "url" => route('create_access_token'), - "next" => "reload", - "text" => "İp Adresi bölümüne izin vermek istediğiniz bir subnet adresini ya da ip adresini yazarak erişimi kısıtlayabilirsiniz. Örneğin : 192.168.1.0/24. Ayrıca, bu kısıtı kaldırmak için adres yerine -1 yazabilirsiniz.", - "inputs" => [ - "İsim" => "name:text", - "İp Adresi / Hostname" => "ip_range:text", - ], - "submit_text" => "Anahtar Ekle" -]) - - -@include('modal',[ - "id"=>"removeAccessToken", - "title" => "Anahtarı Sil", - "url" => route('revoke_access_token'), - "next" => "reload", - "text" => "Veri'yi silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "inputs" => [ - "-:-" => "token_id:hidden" - ], - "submit_text" => "Anahtarı Sil" -]) - -@endsection \ No newline at end of file diff --git a/resources/views/user/password.blade.php b/resources/views/user/password.blade.php deleted file mode 100644 index cf17cc54c..000000000 --- a/resources/views/user/password.blade.php +++ /dev/null @@ -1,106 +0,0 @@ -forceChange != true) { - header('Location: ' . route('home')); - die(); -} ?> - - - - - - - {{__("Liman Merkezi Yönetim Sistemi")}} - - - - - - - - - - -
        -
        -
        -
        - - Liman MYS - -

        -
        -

        -
        {{env("BRAND_NAME")}}
        -
        -
        -
        - -
        - @if ($errors->count() > 0 ) -
        - {{$errors->first()}} -
        - @endif - @if(session('warning')) -
        - {{session('warning')}} -
        - @endif - @if (session('status')) -
        - {{ session('status') }} -
        - @endif -
        -

        - Lütfen devam etmeden önce parolanızı değiştirin. -
        - Please change your password before proceeding. -

        -
        -
        - @csrf - -
        -
        - -
        -
        -
        -
        - -
        -
        -
        -
        - -
        -
        -
        - -
        - -
        - - HAVELSAN Açıklab - -
        - -
        -
        -
        -
        - - \ No newline at end of file diff --git a/resources/views/user/self.blade.php b/resources/views/user/self.blade.php deleted file mode 100644 index bd9474772..000000000 --- a/resources/views/user/self.blade.php +++ /dev/null @@ -1,106 +0,0 @@ -@extends('layouts.app') - -@section('content') - - @include('errors') -
        -
        -
        -
        -

        {{auth()->user()->name}}

        -

        {{auth()->user()->email}}

        -
        -
        -
        -
        -

        {{ __('Bilgiler') }}

        -
        -
        - {{ __('Son Giriş Yapılan IP') }} -

        {{auth()->user()->last_login_ip}}

        -
        - {{ __('Son Giriş Tarihi') }} -

        {{\Carbon\Carbon::parse(auth()->user()->last_login_at)->isoFormat('LLLL')}}

        -
        -
        -
        -
        -
        -
        -
        -
        - -
        - auth_type == "ldap" || user()->auth_type == "keycloak") disabled @endif> -
        -
        -
        - -
        - auth_type == "ldap" || user()->auth_type == "keycloak") disabled @endif> -
        -
        -
        - -
        - auth_type == "ldap" || user()->auth_type == "keycloak") disabled @endif> -
        -
        -
        - -
        - auth_type == "ldap" || user()->auth_type == "keycloak") disabled @endif> - {{__("Yeni parolanız en az 10 karakter uzunluğunda olmalı ve en az 1 sayı,özel karakter ve büyük harf içermelidir.")}} -
        -
        -
        - -
        - auth_type == "ldap" || user()->auth_type == "keycloak") disabled @endif> -
        -
        -
        -
        - -
        -
        - -
        -
        -
        -
        - -@endsection \ No newline at end of file diff --git a/routes/channels.php b/routes/channels.php index 80a737873..3d0fb8fcb 100644 --- a/routes/channels.php +++ b/routes/channels.php @@ -13,8 +13,4 @@ Broadcast::channel('App.User.{id}', function ($user, $id) { return (int) $user->id === (int) $id; -}); - -Broadcast::channel('extension_renderer_{id}', function ($user, $id) { - return (int) $user->id === (int) $id; -}); +}); \ No newline at end of file diff --git a/routes/console.php b/routes/console.php index 93148ed34..751829b48 100644 --- a/routes/console.php +++ b/routes/console.php @@ -55,54 +55,6 @@ $this->comment('Scanned and saved to '.$output); })->describe('Scan missing translation strings'); -Artisan::command('module:add {module_name}', function ($module_name) { - // Check if files are exists. - $basePath = "/liman/modules/$module_name"; - - if (! is_dir($basePath) || ! is_file($basePath.'/db.json')) { - return $this->error('Modül okunamadı!'); - } - - //Check if module supported or not. - $json = json_decode(file_get_contents($basePath.'/db.json'), true); - if (getVersionCode() < intval(trim((string) $json['minLimanSupported']))) { - return $this->error( - "Bu modülü yüklemek için önce liman'ı güncellemelisiniz!" - ); - } - - $flag = Module::where(['name' => $module_name])->exists(); - - if (! $flag) { - $module = Module::create(['name' => $module_name, 'enabled' => true]); - - // TODO: Module notification - } else { - Module::where(['name' => $module_name])->first()->touch(); - - // TODO: Module update notification - } - - $notification->save(); - $this->info('Modül başarıyla yüklendi.'); -})->describe('New module add'); - -Artisan::command('module:remove {module_name}', function ($module_name) { - $module = Module::where('name', $module_name)->first(); - - if (! $module) { - return $this->error('Modul bulunamadi!'); - } - - $flag = $module->delete(); - - if ($flag) { - $this->info('Modul basariyla silindi.'); - } else { - $this->error("Modul silinemedi.$flag"); - } -})->describe('Module remove'); - Artisan::command('register_liman', function () { Liman::updateOrCreate([ 'last_ip' => env('LIMAN_IP', trim((string) `hostname -I | cut -d' ' -f1 | xargs`)), diff --git a/routes/extension_developer.php b/routes/extension_developer.php deleted file mode 100644 index fd8160541..000000000 --- a/routes/extension_developer.php +++ /dev/null @@ -1,41 +0,0 @@ -name('extension_new') - ->middleware('admin'); - -Route::get( - '/eklentiler/{extension_id}/{page_name}', - 'Extension\OneController@page' -) - ->middleware('admin') - ->name('extension_page_edit_view'); - -Route::post('/ayar/eklenti/guncelle', 'Extension\SettingsController@update') - ->middleware('admin') - ->name('extension_settings_update'); - -Route::post('/ayar/eklenti/ekle', 'Extension\SettingsController@add') - ->middleware('admin') - ->name('extension_settings_add'); - -Route::post('/ayar/eklenti/sil', 'Extension\SettingsController@remove') - ->middleware('admin') - ->name('extension_settings_remove'); - -Route::post('/ayar/eklenti/kod', 'Extension\OneController@updateCode') - ->middleware('admin') - ->name('extension_code_update'); - -Route::post( - '/ayar/eklenti/yeni/sayfa', - 'Extension\MainController@newExtensionPage' -) - ->middleware('admin') - ->name('extension_new_page'); - -// Extension Download Page -Route::get( - '/indir/eklenti/{extension_id}', - 'Extension\MainController@download' -)->name('extension_download'); diff --git a/routes/web.php b/routes/web.php index a18eff0dc..5bf53254e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,6 +1,5 @@ ['auth', 'check_google_two_factor', 'google2fa', 'permissions']], function () { - /* - // Extension Routes - - require_once app_path('Http/Controllers/Extension/_routes.php'); - - // Notification Routes - - require_once app_path('Http/Controllers/Notification/_routes.php'); - - // Server Routes - - require_once app_path('Http/Controllers/Server/_routes.php'); - - // Certificate Routes - - require_once app_path('Http/Controllers/Certificate/_routes.php'); - - // Settings Routes - - require_once app_path('Http/Controllers/Settings/_routes.php'); - - // Modules Routes - - require_once app_path('Http/Controllers/Module/_routes.php'); - - // Role Routes - - require_once app_path('Http/Controllers/Roles/_routes.php'); - */ - // Internal Sandbox Routes - require_once app_path('Http/Controllers/Extension/Sandbox/_routes.php'); - - /* - // Change the language - Route::get('/locale', 'HomeController@setLocale')->name('set_locale'); - - // Home Route - - Route::get('/', 'HomeController@index')->name('home'); - - Route::post('/', 'HomeController@getLimanStats') - ->name('liman_stats') - ->middleware('admin'); - - Route::post('/online_servers', 'HomeController@getServerStatus') - ->name('online_servers') - ->middleware('admin'); - - // Vault Route - - Route::get('/kasa/{user_id?}', 'UserController@userKeyList')->name('keys'); - - // Add Key Route - Route::post('/kasa/ekle', 'UserController@addKey')->name('key_add'); - - // User Add - Route::post('/kullanici/ekle', 'UserController@add') - ->name('user_add') - ->middleware('admin'); - - // User Remove - Route::post('/kullanici/sil', 'UserController@remove') - ->name('user_remove') - ->middleware('admin'); - - // User Remove - Route::post('/kullanici/parola/sifirla', 'UserController@passwordReset') - ->name('user_password_reset') - ->middleware('admin'); - - Route::view('/profil', 'user.self')->name('my_profile'); - - Route::get('/profil/anahtarlarim', 'UserController@myAccessTokens')->name( - 'my_access_tokens' - ); - - Route::post( - '/profil/anahtarlarim/ekle', - 'UserController@createAccessToken' - )->name('create_access_token'); - - Route::post( - '/profil/anahtarlarim/sil', - 'UserController@revokeAccessToken' - )->name('revoke_access_token'); - - Route::post('/profil', 'UserController@selfUpdate')->name('profile_update'); - - Route::post('/user/update', 'UserController@adminUpdate') - ->name('update_user') - ->middleware('admin'); - - Route::post('/user/setting/delete', 'UserController@removeSetting')->name( - 'user_setting_remove' - ); - - Route::post('/user/setting/create', 'UserController@createSetting')->name( - 'user_setting_create' - ); - - Route::post('/user/setting/update', 'UserController@updateSetting')->name( - 'user_setting_update' - ); - - Route::get('/liman_arama', 'SearchController@search')->name('search'); - */ }); Route::any('/upload/{any?}', function () { @@ -171,13 +61,8 @@ return $info; })->middleware(['upload_token_check']); -// registerModuleRoutes(); - -Route::get('/bildirimYolla', 'Notification\ExternalNotificationController@accept'); - - Route::get( '/eklenti/{extension_id}/public/{any}', - 'Extension\OneController@publicFolder' + 'API\ExtensionController@publicFolder' )->where('any', '.+')->name('extension_public_folder'); diff --git a/storage/debugbar/.gitignore b/storage/debugbar/.gitignore deleted file mode 100644 index d6b7ef32c..000000000 --- a/storage/debugbar/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/storage/php8.1-fpm-www.conf b/storage/php8.1-fpm-www.conf new file mode 100644 index 000000000..e9519ef84 --- /dev/null +++ b/storage/php8.1-fpm-www.conf @@ -0,0 +1,463 @@ +; Start a new pool named 'www'. +; the variable $pool can be used in any directive and will be replaced by the +; pool name ('www' here) +[www] + +; Per pool prefix +; It only applies on the following directives: +; - 'access.log' +; - 'slowlog' +; - 'listen' (unixsocket) +; - 'chroot' +; - 'chdir' +; - 'php_values' +; - 'php_admin_values' +; When not set, the global prefix (or /usr) applies instead. +; Note: This directive can also be relative to the global prefix. +; Default Value: none +;prefix = /path/to/pools/$pool + +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = liman +group = liman + +; The address on which to accept FastCGI requests. +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on +; a specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Note: This value is mandatory. +listen = /run/php/php8.1-fpm.sock + +; Set listen(2) backlog. +; Default Value: 511 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 511 + +; Set permissions for unix socket, if one is used. In Linux, read/write +; permissions must be set in order to allow connections from a web server. Many +; BSD-derived systems allow connections regardless of permissions. The owner +; and group can be specified either by name or by their numeric IDs. +; Default Values: user and group are set as the running user +; mode is set to 0660 +listen.owner = liman +listen.group = liman +listen.mode = 0660 +; When POSIX Access Control Lists are supported you can set them using +; these options, value is a comma separated list of user/group names. +; When set, listen.owner and listen.group are ignored +;listen.acl_users = +;listen.acl_groups = + +; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address +; must be separated by a comma. If this value is left blank, connections will be +; accepted from any ip address. +; Default Value: any +;listen.allowed_clients = 127.0.0.1 + +; Specify the nice(2) priority to apply to the pool processes (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool processes will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; process.priority = -19 + +; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user +; or group is different than the master process user. It allows to create process +; core dump and ptrace the process for the pool user. +; Default Value: no +; process.dumpable = yes + +; Choose how the process manager will control the number of child processes. +; Possible Values: +; static - a fixed number (pm.max_children) of child processes; +; dynamic - the number of child processes are set dynamically based on the +; following directives. With this process management, there will be +; always at least 1 children. +; pm.max_children - the maximum number of children that can +; be alive at the same time. +; pm.start_servers - the number of children created on startup. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is greater than this +; number then some children will be killed. +; pm.max_spawn_rate - the maximum number of rate to spawn child +; processes at once. +; ondemand - no children are created at startup. Children will be forked when +; new requests will connect. The following parameter are used: +; pm.max_children - the maximum number of children that +; can be alive at the same time. +; pm.process_idle_timeout - The number of seconds after which +; an idle process will be killed. +; Note: This value is mandatory. +pm = dynamic + +; The number of child processes to be created when pm is set to 'static' and the +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. +; This value sets the limit on the number of simultaneous requests that will be +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP +; CGI. The below defaults are based on a server without much resources. Don't +; forget to tweak pm.* to fit your needs. +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' +; Note: This value is mandatory. +pm.max_children = 60 + +; The number of child processes created on startup. +; Note: Used only when pm is set to 'dynamic' +; Default Value: (min_spare_servers + max_spare_servers) / 2 +pm.start_servers = 10 + +; The desired minimum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.min_spare_servers = 5 + +; The desired maximum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.max_spare_servers = 20 + +; The number of rate to spawn child processes at once. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +; Default Value: 32 +;pm.max_spawn_rate = 32 + +; The number of seconds after which an idle process will be killed. +; Note: Used only when pm is set to 'ondemand' +; Default Value: 10s +;pm.process_idle_timeout = 10s; + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. For +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default Value: 0 +;pm.max_requests = 500 + +; The URI to view the FPM status page. If this value is not set, no URI will be +; recognized as a status page. It shows the following information: +; pool - the name of the pool; +; process manager - static, dynamic or ondemand; +; start time - the date and time FPM has started; +; start since - number of seconds since FPM has started; +; accepted conn - the number of request accepted by the pool; +; listen queue - the number of request in the queue of pending +; connections (see backlog in listen(2)); +; max listen queue - the maximum number of requests in the queue +; of pending connections since FPM has started; +; listen queue len - the size of the socket queue of pending connections; +; idle processes - the number of idle processes; +; active processes - the number of active processes; +; total processes - the number of idle + active processes; +; max active processes - the maximum number of active processes since FPM +; has started; +; max children reached - number of times, the process limit has been reached, +; when pm tries to start more children (works only for +; pm 'dynamic' and 'ondemand'); +; Value are updated in real time. +; Example output: +; pool: www +; process manager: static +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 62636 +; accepted conn: 190460 +; listen queue: 0 +; max listen queue: 1 +; listen queue len: 42 +; idle processes: 4 +; active processes: 11 +; total processes: 15 +; max active processes: 12 +; max children reached: 0 +; +; By default the status page output is formatted as text/plain. Passing either +; 'html', 'xml' or 'json' in the query string will return the corresponding +; output syntax. Example: +; http://www.foo.bar/status +; http://www.foo.bar/status?json +; http://www.foo.bar/status?html +; http://www.foo.bar/status?xml +; +; By default the status page only outputs short status. Passing 'full' in the +; query string will also return status for each pool process. +; Example: +; http://www.foo.bar/status?full +; http://www.foo.bar/status?json&full +; http://www.foo.bar/status?html&full +; http://www.foo.bar/status?xml&full +; The Full status returns for each process: +; pid - the PID of the process; +; state - the state of the process (Idle, Running, ...); +; start time - the date and time the process has started; +; start since - the number of seconds since the process has started; +; requests - the number of requests the process has served; +; request duration - the duration in µs of the requests; +; request method - the request method (GET, POST, ...); +; request URI - the request URI with the query string; +; content length - the content length of the request (only with POST); +; user - the user (PHP_AUTH_USER) (or '-' if not set); +; script - the main script called (or '-' if not set); +; last request cpu - the %cpu the last request consumed +; it's always 0 if the process is not in Idle state +; because CPU calculation is done when the request +; processing has terminated; +; last request memory - the max amount of memory the last request consumed +; it's always 0 if the process is not in Idle state +; because memory calculation is done when the request +; processing has terminated; +; If the process is in Idle state, then informations are related to the +; last request the process has served. Otherwise informations are related to +; the current request being served. +; Example output: +; ************************ +; pid: 31330 +; state: Running +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 63087 +; requests: 12808 +; request duration: 1250261 +; request method: GET +; request URI: /test_mem.php?N=10000 +; content length: 0 +; user: - +; script: /home/fat/web/docs/php/test_mem.php +; last request cpu: 0.00 +; last request memory: 0 +; +; Note: There is a real-time FPM status monitoring sample web page available +; It's available in: /usr/share/php/8.1/fpm/status.html +; +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;pm.status_path = /status + +; The address on which to accept FastCGI status request. This creates a new +; invisible pool that can handle requests independently. This is useful +; if the main pool is busy with long running requests because it is still possible +; to get the status before finishing the long running requests. +; +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on +; a specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Default Value: value of the listen option +;pm.status_listen = 127.0.0.1:9001 + +; The ping URI to call the monitoring page of FPM. If this value is not set, no +; URI will be recognized as a ping page. This could be used to test from outside +; that FPM is alive and responding, or to +; - create a graph of FPM availability (rrd or such); +; - remove a server from a group if it is not responding (load balancing); +; - trigger alerts for the operating team (24/7). +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;ping.path = /ping + +; This directive may be used to customize the response of a ping request. The +; response is formatted as text/plain with a 200 response code. +; Default Value: pong +;ping.response = pong + +; The access log file +; Default: not set +;access.log = log/$pool.access.log + +; The access log format. +; The following syntax is allowed +; %%: the '%' character +; %C: %CPU used by the request +; it can accept the following format: +; - %{user}C for user CPU only +; - %{system}C for system CPU only +; - %{total}C for user + system CPU (default) +; %d: time taken to serve the request +; it can accept the following format: +; - %{seconds}d (default) +; - %{milliseconds}d +; - %{milli}d +; - %{microseconds}d +; - %{micro}d +; %e: an environment variable (same as $_ENV or $_SERVER) +; it must be associated with embraces to specify the name of the env +; variable. Some examples: +; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e +; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e +; %f: script filename +; %l: content-length of the request (for POST request only) +; %m: request method +; %M: peak of memory allocated by PHP +; it can accept the following format: +; - %{bytes}M (default) +; - %{kilobytes}M +; - %{kilo}M +; - %{megabytes}M +; - %{mega}M +; %n: pool name +; %o: output header +; it must be associated with embraces to specify the name of the header: +; - %{Content-Type}o +; - %{X-Powered-By}o +; - %{Transfert-Encoding}o +; - .... +; %p: PID of the child that serviced the request +; %P: PID of the parent of the child that serviced the request +; %q: the query string +; %Q: the '?' character if query string exists +; %r: the request URI (without the query string, see %q and %Q) +; %R: remote IP address +; %s: status (response code) +; %t: server time the request was received +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsulated in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %T: time the log has been written (the request has finished) +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsulated in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %u: remote user +; +; Default: "%R - %u %t \"%m %r\" %s" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{milli}d %{kilo}M %C%%" + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +;slowlog = log/$pool.log.slow + +; The timeout for serving a single request after which a PHP backtrace will be +; dumped to the 'slowlog' file. A value of '0s' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_slowlog_timeout = 0 + +; Depth of slow log stack trace. +; Default Value: 20 +;request_slowlog_trace_depth = 20 + +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_terminate_timeout = 0 + +; The timeout set by 'request_terminate_timeout' ini option is not engaged after +; application calls 'fastcgi_finish_request' or when application has finished and +; shutdown functions are being called (registered via register_shutdown_function). +; This option will enable timeout limit to be applied unconditionally +; even in such cases. +; Default Value: no +;request_terminate_timeout_track_finished = no + +; Set open file descriptor rlimit. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Chroot to this directory at the start. This value must be defined as an +; absolute path. When this value is not set, chroot is not used. +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one +; of its subdirectories. If the pool prefix is not set, the global prefix +; will be used instead. +; Note: chrooting is a great security feature and should be used whenever +; possible. However, all PHP paths will be relative to the chroot +; (error_log, sessions.save_path, ...). +; Default Value: not set +;chroot = + +; Chdir to this directory at the start. +; Note: relative path can be used. +; Default Value: current directory or / when chroot +;chdir = /var/www + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environment, this can cause some delay in the page +; process time (several ms). +; Default Value: no +;catch_workers_output = yes + +; Decorate worker output with prefix and suffix containing information about +; the child that writes to the log and if stdout or stderr is used as well as +; log level and time. This options is used only if catch_workers_output is yes. +; Settings to "no" will output data as written to the stdout or stderr. +; Default value: yes +;decorate_workers_output = no + +; Clear environment in FPM workers +; Prevents arbitrary environment variables from reaching FPM worker processes +; by clearing the environment in workers before env vars specified in this +; pool configuration are added. +; Setting to "no" will make all environment variables available to PHP code +; via getenv(), $_ENV and $_SERVER. +; Default Value: yes +;clear_env = no + +; Limits the extensions of the main script FPM will allow to parse. This can +; prevent configuration mistakes on the web server side. You should only limit +; FPM to .php extensions to prevent malicious users to use other extensions to +; execute php code. +; Note: set an empty value to allow all extensions. +; Default Value: .php +;security.limit_extensions = .php .php3 .php4 .php5 .php7 + +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from +; the current environment. +; Default Value: clean env +;env[HOSTNAME] = $HOSTNAME +;env[PATH] = /usr/local/bin:/usr/bin:/bin +;env[TMP] = /tmp +;env[TMPDIR] = /tmp +;env[TEMP] = /tmp + +; Additional php.ini defines, specific to this pool of workers. These settings +; overwrite the values previously defined in the php.ini. The directives are the +; same as the PHP SAPI: +; php_value/php_flag - you can set classic ini defines which can +; be overwritten from PHP call 'ini_set'. +; php_admin_value/php_admin_flag - these directives won't be overwritten by +; PHP call 'ini_set' +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. + +; Defining 'extension' will load the corresponding shared extension from +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not +; overwrite previously defined php.ini values, but will append the new value +; instead. + +; Note: path INI options can be relative and will be expanded with the prefix +; (pool, global or /usr) + +; Default Value: nothing is defined by default except the values in php.ini and +; specified at startup with the -d argument +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com +;php_flag[display_errors] = off +;php_admin_value[error_log] = /var/log/fpm-php.www.log +;php_admin_flag[log_errors] = on +;php_admin_value[memory_limit] = 32M diff --git a/webpack.mix.js b/webpack.mix.js index dad88cfe0..27feec52a 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -35,7 +35,6 @@ mix 'resources/assets/js/bootstrap-datepicker.js', 'resources/assets/js/bootstrap-timepicker.js', 'resources/assets/js/jquery.dataTables.js', - 'resources/assets/js/adminlte.js', 'resources/assets/js/select2.full.js', 'resources/assets/js/sweetalert2.min.js', 'resources/assets/js/Chart.js', @@ -43,8 +42,6 @@ mix 'resources/assets/js/jstree.js', 'resources/assets/js/buttons.html5.min.js', 'resources/assets/js/jquery.inputmask.min.js', - 'resources/assets/js/echo.common.js', - 'resources/assets/js/pusher.min.js', 'resources/assets/js/jquery.overlayScrollbars.js', 'resources/assets/js/liman.js', 'resources/assets/js/tus.js'
        ").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(e("").addClass(this._options.icons.up)))),i.append(e("").append(e("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:this._options.tooltips.pickHour}).attr("data-action","showHours"))),n.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(e("").addClass(this._options.icons.down))))),this._isEnabled("m")&&(this._isEnabled("h")&&(t.append(e("").addClass("separator")),i.append(e("").addClass("separator").html(":")),n.append(e("").addClass("separator"))),t.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(e("").addClass(this._options.icons.up)))),i.append(e("").append(e("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:this._options.tooltips.pickMinute}).attr("data-action","showMinutes"))),n.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(e("").addClass(this._options.icons.down))))),this._isEnabled("s")&&(this._isEnabled("m")&&(t.append(e("").addClass("separator")),i.append(e("").addClass("separator").html(":")),n.append(e("").addClass("separator"))),t.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(e("").addClass(this._options.icons.up)))),i.append(e("").append(e("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:this._options.tooltips.pickSecond}).attr("data-action","showSeconds"))),n.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:this._options.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(e("").addClass(this._options.icons.down))))),this.use24Hours||(t.append(e("").addClass("separator")),i.append(e("").append(e("").addClass("separator"))),e("
        ").addClass("timepicker-picker").append(e("").addClass("table-condensed").append([t,i,n]))},l.prototype._getTimePickerTemplate=function(){var t=e("
        ").addClass("timepicker-hours").append(e("
        ").addClass("table-condensed")),i=e("
        ").addClass("timepicker-minutes").append(e("
        ").addClass("table-condensed")),n=e("
        ").addClass("timepicker-seconds").append(e("
        ").addClass("table-condensed")),a=[this._getTimePickerMainTemplate()];return this._isEnabled("h")&&a.push(t),this._isEnabled("m")&&a.push(i),this._isEnabled("s")&&a.push(n),a},l.prototype._getToolbar=function(){var t=[];if(this._options.buttons.showToday&&t.push(e("").insertAfter(a)),A.nTBody=r[0],0===(a=_.children("tfoot")).length&&0").appendTo(_)),0===a.length||0===a.children().length?_.addClass(T.sNoFooter):0/g,Zt=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,Qt=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,Jt=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,te=function(t){return!t||!0===t||"-"===t},ee=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},ie=function(t,e){return qt[e]||(qt[e]=new RegExp(ve(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(qt[e],"."):t},ne=function(t,e,i){var n="string"==typeof t;return!!te(t)||(e&&n&&(t=ie(t,e)),i&&n&&(t=t.replace(Jt,"")),!isNaN(parseFloat(t))&&isFinite(t))},ae=function(t,e,i){return!!te(t)||((te(t)||"string"==typeof t)&&!!ne(t.replace(Kt,""),e,i)||null)},re=function(t,e,i){var a=[],r=0,o=t.length;if(i!==n)for(;rt.length))for(var e=t.slice().sort(),i=e[0],n=1,a=e.length;n")[0],ye=be.textContent!==n,xe=/<.*?>/g,we=Ut.util.throttle,_e=[],ke=Array.prototype,Se=function(e,i){if(!(this instanceof Se))return new Se(e,i);var n=[],a=function(e){(e=function(e){var i,n=Ut.settings,a=t.map(n,(function(t,e){return t.nTable}));if(!e)return[];if(e.nTable&&e.oApi)return[e];if(e.nodeName&&"table"===e.nodeName.toLowerCase()){var r=t.inArray(e,a);return-1!==r?[n[r]]:null}return e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?i=t(e):e instanceof t&&(i=e),i?i.map((function(e){return-1!==(r=t.inArray(this,a))?n[r]:null})).toArray():void 0)}(e))&&n.push.apply(n,e)};if(Array.isArray(e))for(var r=0,o=e.length;rt?new Se(e[t],this[t]):null},filter:function(t){var e=[];if(ke.filter)e=ke.filter.call(this,t,this);else for(var i=0,n=this.length;i").addClass(n),t("td",a).addClass(n).html(i)[0].colSpan=m(e),r.push(a[0]))};o(n,a),i._details&&i._details.detach(),i._details=t(r),i._detailsShow&&i._details.insertAfter(i.nTr)}(a[0],a[0].aoData[this[0]],e,i),this)})),Vt(["row().child.show()","row().child().show()"],(function(t){return Oe(this,!0),this})),Vt(["row().child.hide()","row().child().hide()"],(function(){return Oe(this,!1),this})),Vt(["row().child.remove()","row().child().remove()"],(function(){return Ee(this),this})),Vt("row().child.isShown()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]]._detailsShow||!1}));var Fe=/^([^:]+):(name|visIdx|visible)$/,je=function(t,e,i,n,a){i=[],n=0;for(var r=a.length;n(s=parseInt(c[1],10))){var d=t.map(a,(function(t,e){return t.bVisible?e:null}));return[d[d.length+s]]}return[p(e,s)];case"name":return t.map(r,(function(t,e){return t===c[1]?e:null}));default:return[]}return i.nodeName&&i._DT_CellIndex?[i._DT_CellIndex.column]:(s=t(o).filter(i).map((function(){return t.inArray(this,o)})).toArray()).length||!i.nodeName?s:(s=t(i).closest("*[data-dt-column]")).length?[s.data("dt-column")]:[]}),e,n)}(n,e,i)}),1);return a.selector.cols=e,a.selector.opts=i,a})),Xt("columns().header()","column().header()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTh}),1)})),Xt("columns().footer()","column().footer()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTf}),1)})),Xt("columns().data()","column().data()",(function(){return this.iterator("column-rows",je,1)})),Xt("columns().dataSrc()","column().dataSrc()",(function(){return this.iterator("column",(function(t,e){return t.aoColumns[e].mData}),1)})),Xt("columns().cache()","column().cache()",(function(t){return this.iterator("column-rows",(function(e,i,n,a,r){return oe(e.aoData,r,"search"===t?"_aFilterData":"_aSortData",i)}),1)})),Xt("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(t,e,i,n,a){return oe(t.aoData,a,"anCells",e)}),1)})),Xt("columns().visible()","column().visible()",(function(e,i){var a=this,r=this.iterator("column",(function(i,a){if(e===n)return i.aoColumns[a].bVisible;var r,o=i.aoColumns,s=o[a],l=i.aoData;if(e!==n&&s.bVisible!==e){if(e){var c=t.inArray(!0,re(o,"bVisible"),a+1);for(o=0,r=l.length;oi;return!0},Ut.isDataTable=Ut.fnIsDataTable=function(e){var i=t(e).get(0),n=!1;return e instanceof Ut.Api||(t.each(Ut.settings,(function(e,a){e=a.nScrollHead?t("table",a.nScrollHead)[0]:null;var r=a.nScrollFoot?t("table",a.nScrollFoot)[0]:null;a.nTable!==i&&e!==i&&r!==i||(n=!0)})),n)},Ut.tables=Ut.fnTables=function(e){var i=!1;t.isPlainObject(e)&&(i=e.api,e=e.visible);var n=t.map(Ut.settings,(function(i){if(!e||e&&t(i.nTable).is(":visible"))return i.nTable}));return i?new Se(n):n},Ut.camelToHungarian=r,Vt("$()",(function(e,i){return i=this.rows(i).nodes(),i=t(i),t([].concat(i.filter(e).toArray(),i.find(e).toArray()))})),t.each(["on","one","off"],(function(e,i){Vt(i+"()",(function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),(function(t){return t.match(/\.dt\b/)?t:t+".dt"})).join(" ");var n=t(this.tables().nodes());return n[i].apply(n,e),this}))})),Vt("clear()",(function(){return this.iterator("table",(function(t){A(t)}))})),Vt("settings()",(function(){return new Se(this.context,this.context)})),Vt("init()",(function(){var t=this.context;return t.length?t[0].oInit:null})),Vt("data()",(function(){return this.iterator("table",(function(t){return re(t.aoData,"_aData")})).flatten()})),Vt("destroy()",(function(i){return i=i||!1,this.iterator("table",(function(n){var a=n.oClasses,r=n.nTable,o=n.nTBody,s=n.nTHead,l=n.nTFoot,c=t(r);o=t(o);var d,h=t(n.nTableWrapper),u=t.map(n.aoData,(function(t){return t.nTr}));n.bDestroying=!0,Lt(n,"aoDestroyCallback","destroy",[n]),i||new Se(n).columns().visible(!0),h.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+n.sInstance),r!=s.parentNode&&(c.children("thead").detach(),c.append(s)),l&&r!=l.parentNode&&(c.children("tfoot").detach(),c.append(l)),n.aaSorting=[],n.aaSortingFixed=[],kt(n),t(u).removeClass(n.asStripeClasses.join(" ")),t("th, td",s).removeClass(a.sSortable+" "+a.sSortableAsc+" "+a.sSortableDesc+" "+a.sSortableNone),o.children().detach(),o.append(u),s=n.nTableWrapper.parentNode,c[l=i?"remove":"detach"](),h[l](),!i&&s&&(s.insertBefore(r,n.nTableReinsertBefore),c.css("width",n.sDestroyWidth).removeClass(a.sTable),(d=n.asDestroyStripes.length)&&o.children().each((function(e){t(this).addClass(n.asDestroyStripes[e%d])}))),-1!==(a=t.inArray(n,Ut.settings))&&Ut.settings.splice(a,1)}))})),t.each(["column","row","cell"],(function(t,e){Vt(e+"s().every()",(function(t){var i=this.selector.opts,a=this;return this.iterator(e,(function(r,o,s,l,c){t.call(a[e](o,"cell"===e?s:i,"cell"===e?i:n),o,s,l,c)}))}))})),Vt("i18n()",(function(e,i,a){var r=this.context[0];return(e=ge(e)(r.oLanguage))===n&&(e=i),a!==n&&t.isPlainObject(e)&&(e=e[a]!==n?e[a]:e._),e.replace("%d",a)})),Ut.version="1.12.1",Ut.settings=[],Ut.models={},Ut.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,return:!1},Ut.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},Ut.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Ut.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},Ut.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},a(Ut.defaults),Ut.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},a(Ut.defaults.column),Ut.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:n,oAjaxData:n,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Nt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Nt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,i=e+t,n=this.aiDisplay.length,a=this.oFeatures,r=a.bPaginate;return a.bServerSide?!1===r||-1===t?e+n:Math.min(e+t,this._iRecordsDisplay):!r||i>n||-1===t?n:i},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},Ut.ext=$t={buttons:{},classes:{},builder:"bs4/dt-1.12.1/b-2.2.3/b-colvis-2.2.3/b-html5-2.2.3/b-print-2.2.3/cr-1.5.6/r-2.3.0/rr-1.2.8/sp-2.0.2/sl-1.4.0",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Ut.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Ut.version},t.extend($t,{afnFiltering:$t.search,aTypes:$t.type.detect,ofnSearch:$t.type.search,oSort:$t.type.order,afnSortData:$t.order,aoFeatures:$t.feature,oApi:$t.internal,oStdClasses:$t.classes,oPagination:$t.pager}),t.extend(Ut.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Ne=Ut.ext.pager;t.extend(Ne,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[Rt(t,e)]},simple_numbers:function(t,e){return["previous",Rt(t,e),"next"]},full_numbers:function(t,e){return["first","previous",Rt(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",Rt(t,e),"last"]},_numbers:Rt,numbers_length:7}),t.extend(!0,Ut.ext.renderer,{pageButton:{_:function(e,a,r,o,s,l){var c,d,h=e.oClasses,u=e.oLanguage.oPaginate,f=e.oLanguage.oAria.paginate||{},p=0,g=function(i,n){var a,o=h.sPageButtonDisabled,m=function(t){st(e,t.data.action,!0)},v=0;for(a=n.length;v").appendTo(i);g(y,b)}else{switch(c=null,d=b,y=e.iTabIndex,b){case"ellipsis":i.append('');break;case"first":c=u.sFirst,0===s&&(y=-1,d+=" "+o);break;case"previous":c=u.sPrevious,0===s&&(y=-1,d+=" "+o);break;case"next":c=u.sNext,0!==l&&s!==l-1||(y=-1,d+=" "+o);break;case"last":c=u.sLast,0!==l&&s!==l-1||(y=-1,d+=" "+o);break;default:c=e.fnFormatNumber(b+1),d=s===b?h.sPageButtonActive:""}null!==c&&(Et(y=t("",{class:h.sPageButton+" "+d,"aria-controls":e.sTableId,"aria-label":f[b],"data-dt-idx":p,tabindex:y,id:0===r&&"string"==typeof b?e.sTableId+"_"+b:null}).html(c).appendTo(i),{action:b},m),p++)}}};try{var m=t(a).find(i.activeElement).data("dt-idx")}catch(t){}g(t(a).empty(),o),m!==n&&t(a).find("[data-dt-idx="+m+"]").trigger("focus")}}}),t.extend(Ut.ext.type.detect,[function(t,e){return e=e.oLanguage.sDecimal,ne(t,e)?"num"+e:null},function(t,e){return(!t||t instanceof Date||Zt.test(t))&&(null!==(e=Date.parse(t))&&!isNaN(e)||te(t))?"date":null},function(t,e){return e=e.oLanguage.sDecimal,ne(t,e,!0)?"num-fmt"+e:null},function(t,e){return e=e.oLanguage.sDecimal,ae(t,e)?"html-num"+e:null},function(t,e){return e=e.oLanguage.sDecimal,ae(t,e,!0)?"html-num-fmt"+e:null},function(t,e){return te(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(Ut.ext.type.search,{html:function(t){return te(t)?t:"string"==typeof t?t.replace(Gt," ").replace(Kt,""):""},string:function(t){return te(t)?t:"string"==typeof t?t.replace(Gt," "):t}});var Re=function(t,e,i,n){return 0===t||t&&"-"!==t?(e&&(t=ie(t,e)),t.replace&&(i&&(t=t.replace(i,"")),n&&(t=t.replace(n,""))),1*t):-1/0};t.extend($t.type.order,{"date-pre":function(t){return t=Date.parse(t),isNaN(t)?-1/0:t},"html-pre":function(t){return te(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return te(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return te?1:0},"string-desc":function(t,e){return te?-1:0}}),Ht(""),t.extend(!0,Ut.ext.renderer,{header:{_:function(e,i,n,a){t(e.nTable).on("order.dt.DT",(function(t,r,o,s){e===r&&(t=n.idx,i.removeClass(a.sSortAsc+" "+a.sSortDesc).addClass("asc"==s[t]?a.sSortAsc:"desc"==s[t]?a.sSortDesc:n.sSortingClass))}))},jqueryui:function(e,i,n,a){t("
        ").addClass(a.sSortJUIWrapper).append(i.contents()).append(t("").addClass(a.sSortIcon+" "+n.sSortingClassJUI)).appendTo(i),t(e.nTable).on("order.dt.DT",(function(t,r,o,s){e===r&&(t=n.idx,i.removeClass(a.sSortAsc+" "+a.sSortDesc).addClass("asc"==s[t]?a.sSortAsc:"desc"==s[t]?a.sSortDesc:n.sSortingClass),i.find("span."+a.sSortIcon).removeClass(a.sSortJUIAsc+" "+a.sSortJUIDesc+" "+a.sSortJUI+" "+a.sSortJUIAscAllowed+" "+a.sSortJUIDescAllowed).addClass("asc"==s[t]?a.sSortJUIAsc:"desc"==s[t]?a.sSortJUIDesc:n.sSortingClassJUI))}))}}});var He=function(t){return Array.isArray(t)&&(t=t.join(",")),"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):t},Be=!1,ze=",",Ye=".";if(Intl)try{for(var We=(new Intl.NumberFormat).formatToParts(100000.1),$e=0;$en?"-":"",s=parseFloat(n);return isNaN(s)?He(n):(s=s.toFixed(i),n=Math.abs(s),s=parseInt(n,10),n=i?e+(n-s).toFixed(i).substring(2):"",0===s&&0===parseFloat(n)&&(o=""),o+(a||"")+s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+n+(r||""))}}},text:function(){return{display:He,filter:He}}},t.extend(Ut.ext.internal,{_fnExternApiFunc:Wt,_fnBuildAjax:H,_fnAjaxUpdate:B,_fnAjaxParameters:z,_fnAjaxUpdateDraw:Y,_fnAjaxDataSrc:W,_fnAddColumn:h,_fnColumnOptions:u,_fnAdjustColumnSizing:f,_fnVisibleToColumnIndex:p,_fnColumnIndexToVisible:g,_fnVisbleColumns:m,_fnGetColumns:v,_fnColumnTypes:b,_fnApplyColumnDefs:y,_fnHungarianMap:a,_fnCamelToHungarian:r,_fnLanguageCompat:o,_fnBrowserDetect:c,_fnAddData:x,_fnAddTr:w,_fnNodeToDataIndex:function(t,e){return e._DT_RowIndex!==n?e._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,i,n){return t.inArray(n,e.aoData[i].anCells)},_fnGetCellData:_,_fnSetCellData:k,_fnSplitObjNotation:S,_fnGetObjectDataFn:ge,_fnSetObjectDataFn:me,_fnGetDataMaster:C,_fnClearTable:A,_fnDeleteIndex:T,_fnInvalidate:D,_fnGetRowElements:I,_fnCreateTr:P,_fnBuildHead:E,_fnDrawHead:O,_fnDraw:L,_fnReDraw:F,_fnAddOptionsHtml:j,_fnDetectHeader:N,_fnGetUniqueThs:R,_fnFeatureHtmlFilter:$,_fnFilterComplete:V,_fnFilterCustom:X,_fnFilterColumn:U,_fnFilter:q,_fnFilterCreateSearch:G,_fnEscapeRegex:ve,_fnFilterData:K,_fnFeatureHtmlInfo:J,_fnUpdateInfo:tt,_fnInfoMacros:et,_fnInitialise:it,_fnInitComplete:nt,_fnLengthChange:at,_fnFeatureHtmlLength:rt,_fnFeatureHtmlPaginate:ot,_fnPageChange:st,_fnFeatureHtmlProcessing:lt,_fnProcessingDisplay:ct,_fnFeatureHtmlTable:dt,_fnScrollDraw:ht,_fnApplyToChildren:ut,_fnCalculateColumnWidths:ft,_fnThrottle:we,_fnConvertToWidth:pt,_fnGetWidestNode:gt,_fnGetMaxLenString:mt,_fnStringToCss:vt,_fnSortFlatten:bt,_fnSort:yt,_fnSortAria:xt,_fnSortListener:wt,_fnSortAttachListener:_t,_fnSortingClasses:kt,_fnSortData:St,_fnSaveState:Ct,_fnLoadState:At,_fnImplementState:Tt,_fnSettingsFromNode:Dt,_fnLog:It,_fnMap:Pt,_fnBindAction:Et,_fnCallbackReg:Ot,_fnCallbackFire:Lt,_fnLengthOverflow:Ft,_fnRenderer:jt,_fnDataSource:Nt,_fnRowAttributes:M,_fnExtend:Mt,_fnCalculateEnd:function(){}}),t.fn.dataTable=Ut,Ut.$=t,t.fn.dataTableSettings=Ut.settings,t.fn.dataTableExt=Ut.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(Ut,(function(e,i){t.fn.DataTable[e]=i})),Ut}));var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(t,e,i){t instanceof String&&(t=String(t));for(var n=t.length,a=0;a<'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),t.extend(a.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),a.ext.renderer.pageButton.bootstrap=function(e,r,o,s,l,c){var d,h,u=new a.Api(e),f=e.oClasses,p=e.oLanguage.oPaginate,g=e.oLanguage.oAria.paginate||{},m=0,v=function(i,n){var a,r=function(e){e.preventDefault(),t(e.currentTarget).hasClass("disabled")||u.page()==e.data.action||u.page(e.data.action).draw("page")},s=0;for(a=n.length;s",{class:f.sPageButton+" "+h,id:0===o&&"string"==typeof b?e.sTableId+"_"+b:null}).append(t("",{href:"#","aria-controls":e.sTableId,"aria-label":g[b],"data-dt-idx":m,tabindex:e.iTabIndex,class:"page-link"}).html(d)).appendTo(i);e.oApi._fnBindAction(y,{action:b},r),m++}}}};try{var b=t(r).find(i.activeElement).data("dt-idx")}catch(t){}v(t(r).empty().html('
          ').children("ul"),s),b!==n&&t(r).find("[data-dt-idx="+b+"]").trigger("focus")},a})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){function a(e,i,n){t.fn.animate?e.stop().fadeIn(i,n):(e.css("display","block"),n&&n.call(e))}function r(e,i,n){t.fn.animate?e.stop().fadeOut(i,n):(e.css("display","none"),n&&n.call(e))}function o(t,e){return t=new l.Api(t),e=e||(t.init().buttons||l.defaults.buttons),new u(t,e).container()}var s,l=t.fn.dataTable,c=0,d=0,h=l.ext.buttons,u=function(e,i){if(!(this instanceof u))return function(t){return new u(t,e).container()};void 0===i&&(i={}),!0===i&&(i={}),Array.isArray(i)&&(i={buttons:i}),this.c=t.extend(!0,{},u.defaults,i),i.buttons&&(this.c.buttons=i.buttons),this.s={dt:new l.Api(e),buttons:[],listenKeys:"",namespace:"dtb"+c++},this.dom={container:t("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)},this._constructor()};t.extend(u.prototype,{action:function(t,e){return t=this._nodeToButton(t),e===n?t.conf.action:(t.conf.action=e,this)},active:function(e,i){var a=this._nodeToButton(e);return e=this.c.dom.button.active,a=t(a.node),i===n?a.hasClass(e):(a.toggleClass(e,i===n||i),this)},add:function(t,e,i){var a=this.s.buttons;if("string"==typeof e){e=e.split("-");var r=this.s;a=0;for(var o=e.length-1;a"),f.conf._collection=f.collection,f.conf.split)for(var p=0;p'+this.c.dom.splitDropdown.text+""));this._expandButton(f.buttons,f.conf.buttons,f.conf.split,!i,i,s,f.conf)}f.conf.parent=l,u.init&&u.init.call(c.button(f.node),c,t(f.node),u)}}}},_buildButton:function(e,i,a,r){var o=this.c.dom.button,s=this.c.dom.buttonLiner,l=this.c.dom.collection,c=this.c.dom.splitCollection,u=this.c.dom.splitDropdownButton,f=this.s.dt,p=function(t){return"function"==typeof t?t(f,m,e):t};if(e.spacer){var g=t("").addClass("dt-button-spacer "+e.style+" "+o.spacerClass).html(p(e.text));return{conf:e,node:g,inserter:g,buttons:[],inCollection:i,isSplit:a,inSplit:r,collection:null}}if(!a&&r&&c?o=u:!a&&i&&l.button&&(o=l.button),!a&&r&&c.buttonLiner?s=c.buttonLiner:!a&&i&&l.buttonLiner&&(s=l.buttonLiner),e.available&&!e.available(f,e)&&!e.hasOwnProperty("html"))return!1;if(e.hasOwnProperty("html"))var m=t(e.html);else{var v=function(e,i,n,a){a.action.call(i.button(n),e,i,n,a),t(i.table().node()).triggerHandler("buttons-action.dt",[i.button(n),i,n,a])};l=e.tag||o.tag;var b=e.clickBlurs===n||e.clickBlurs;m=t("<"+l+"/>").addClass(o.className).addClass(r?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",(function(t){t.preventDefault(),!m.hasClass(o.disabled)&&e.action&&v(t,f,m,e),b&&m.trigger("blur")})).on("keypress.dtb",(function(t){13===t.keyCode&&(t.preventDefault(),!m.hasClass(o.disabled)&&e.action&&v(t,f,m,e))})),"a"===l.toLowerCase()&&m.attr("href","#"),"button"===l.toLowerCase()&&m.attr("type","button"),s.tag?(l=t("<"+s.tag+"/>").html(p(e.text)).addClass(s.className),"a"===s.tag.toLowerCase()&&l.attr("href","#"),m.append(l)):m.html(p(e.text)),!1===e.enabled&&m.addClass(o.disabled),e.className&&m.addClass(e.className),e.titleAttr&&m.attr("title",p(e.titleAttr)),e.attr&&m.attr(e.attr),e.namespace||(e.namespace=".dt-button-"+d++),e.config!==n&&e.config.split&&(e.split=e.config.split)}if(s=(s=this.c.dom.buttonContainer)&&s.tag?t("<"+s.tag+"/>").addClass(s.className).append(m):m,this._addKey(e),this.c.buttonCreated&&(s=this.c.buttonCreated(e,s)),a){(g=t("
          ").addClass(this.c.dom.splitWrapper.className)).append(m);var y=t.extend(e,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,closeButton:!1,attr:{"aria-haspopup":"dialog","aria-expanded":!1},align:this.c.dom.splitDropdown.align,splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(y);var x=function(e,i,n,a){h.split.action.call(i.button(t("div.dt-btn-split-wrapper")[0]),e,i,n,a),t(i.table().node()).triggerHandler("buttons-action.dt",[i.button(n),i,n,a]),n.attr("aria-expanded",!0)},w=t('").on("click.dtb",(function(t){t.preventDefault(),t.stopPropagation(),w.hasClass(o.disabled)||x(t,f,w,y),b&&w.trigger("blur")})).on("keypress.dtb",(function(t){13===t.keyCode&&(t.preventDefault(),w.hasClass(o.disabled)||x(t,f,w,y))}));0===e.split.length&&w.addClass("dtb-hide-drop"),g.append(w).attr(y.attr)}return{conf:e,node:a?g.get(0):m.get(0),inserter:a?g:s,buttons:[],inCollection:i,isSplit:a,inSplit:r,collection:null}},_nodeToButton:function(t,e){e||(e=this.s.buttons);for(var i=0,n=e.length;i").addClass("dt-button-collection").addClass(d.collectionLayout).addClass(d.splitAlignClass).addClass(l).css("display","none").attr({"aria-modal":!0,role:"dialog"});n=t(n).addClass(d.contentClassName).attr("role","menu").appendTo(p),h.attr("aria-expanded","true"),h.parents("body")[0]!==i.body&&(h=i.body.lastChild),d.popoverTitle?p.prepend('
          '+d.popoverTitle+"
          "):d.collectionTitle&&p.prepend('
          '+d.collectionTitle+"
          "),d.closeButton&&p.prepend('
          x
          ').addClass("dtb-collection-closeable"),a(p.insertAfter(h),d.fade),s=t(o.table().container());var g=p.css("position");if("container"!==d.span&&"dt-container"!==d.align||(h=h.parent(),p.css("width",s.width())),"absolute"===g){var m=t(h[0].offsetParent);s=h.position(),l=h.offset();var v=m.offset(),b=m.position(),y=e.getComputedStyle(m[0]);v.height=m.outerHeight(),v.width=m.width()+parseFloat(y.paddingLeft),v.right=v.left+v.width,v.bottom=v.top+v.height,m=s.top+h.outerHeight();var x=s.left;p.css({top:m,left:x}),y=e.getComputedStyle(p[0]);var w=p.offset();w.height=p.outerHeight(),w.width=p.outerWidth(),w.right=w.left+w.width,w.bottom=w.top+w.height,w.marginTop=parseFloat(y.marginTop),w.marginBottom=parseFloat(y.marginBottom),d.dropup&&(m=s.top-w.height-w.marginTop-w.marginBottom),("button-right"===d.align||p.hasClass(d.rightAlignClassName))&&(x=s.left-w.width+h.outerWidth()),"dt-container"!==d.align&&"container"!==d.align||(xv.width&&(x=v.width-w.width)),b.left+x+w.width>t(e).width()&&(x=t(e).width()-w.width-b.left),0>l.left+x&&(x=-l.left),b.top+m+w.height>t(e).height()+t(e).scrollTop()&&(m=s.top-w.height-w.marginTop-w.marginBottom),b.top+mi&&(n=i),p.css("marginTop",-1*n)})(),t(e).on("resize.dtb-collection",(function(){g()}));d.background&&u.background(!0,d.backgroundClassName,d.fade,d.backgroundHost||h),t("div.dt-button-background").on("click.dtb-collection",(function(){})),d.autoClose&&setTimeout((function(){o.on("buttons-action.b-internal",(function(t,e,i,n){n[0]!==h[0]&&f()}))}),0),t(p).trigger("buttons-popover.dt"),o.on("destroy",f),setTimeout((function(){c=!1,t("body").on("click.dtb-collection",(function(e){if(!c){var i=t.fn.addBack?"addBack":"andSelf",a=t(e.target).parent()[0];(!t(e.target).parents()[i]().filter(n).length&&!t(a).hasClass("dt-buttons")||t(e.target).hasClass("dt-button-background"))&&f()}})).on("keyup.dtb-collection",(function(t){27===t.keyCode&&f()})).on("keydown.dtb-collection",(function(e){var a=t("a, button",n),r=i.activeElement;9===e.keyCode&&(-1===a.index(r)?(a.first().focus(),e.preventDefault()):e.shiftKey?r===a[0]&&(a.last().focus(),e.preventDefault()):r===a.last()[0]&&(a.first().focus(),e.preventDefault()))}))}),0)}}}),u.background=function(e,o,s,l){s===n&&(s=400),l||(l=i.body),e?a(t("
          ").addClass(o).css("display","none").insertAfter(l),s):r(t("div."+o),s,(function(){t(this).removeClass(o).remove()}))},u.instanceSelector=function(e,i){if(e===n||null===e)return t.map(i,(function(t){return t.inst}));var a=[],r=t.map(i,(function(t){return t.name})),o=function(e){if(Array.isArray(e))for(var n=0,s=e.length;n)<[^<]*)*<\/script>/gi,"")).replace(//g,""),e&&!e.stripHtml||(t=t.replace(/<[^>]*>/g,"")),e&&!e.trim||(t=t.replace(/^\s+|\s+$/g,"")),e&&!e.stripNewlines||(t=t.replace(/\n/g," ")),e&&!e.decodeEntities||(g.innerHTML=t,t=g.value)),t},u.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled",spacerClass:""},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper"},splitDropdown:{tag:"button",text:"▼",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div",className:"dt-button-split-collection"}}},u.version="2.2.3",t.extend(h,{collection:{text:function(t){return t.i18n("buttons.collection","Collection")},className:"buttons-collection",closeButton:!1,init:function(t,e,i){e.attr("aria-expanded",!1)},action:function(e,i,n,a){a._collection.parents("body").length?this.popover(!1,a):this.popover(a._collection,a),"keypress"===e.type&&t("a, button",a._collection).eq(0).focus()},attr:{"aria-haspopup":"dialog"}},split:{text:function(t){return t.i18n("buttons.split","Split")},className:"buttons-split",closeButton:!1,init:function(t,e,i){return e.attr("aria-expanded",!1)},action:function(t,e,i,n){this.popover(n._collection,n)},attr:{"aria-haspopup":"dialog"}},copy:function(t,e){if(h.copyHtml5)return"copyHtml5"},csv:function(t,e){if(h.csvHtml5&&h.csvHtml5.available(t,e))return"csvHtml5"},excel:function(t,e){if(h.excelHtml5&&h.excelHtml5.available(t,e))return"excelHtml5"},pdf:function(t,e){if(h.pdfHtml5&&h.pdfHtml5.available(t,e))return"pdfHtml5"},pageLength:function(e){e=e.settings()[0].aLengthMenu;var i=[],n=[];if(Array.isArray(e[0]))i=e[0],n=e[1];else for(var a=0;a"+e+"":"",a(t('
          ').html(e).append(t("
          ")["string"==typeof i?"html":"append"](i)).css("display","none").appendTo("body")),o!==n&&0!==o&&(s=setTimeout((function(){l.buttons.info(!1)}),o)),this.on("destroy.btn-info",(function(){l.buttons.info(!1)})),this)})),l.Api.register("buttons.exportData()",(function(t){if(this.context.length)return m(new l.Api(this.context[0]),t)})),l.Api.register("buttons.exportInfo()",(function(e){e||(e={});var i=e,a="*"===i.filename&&"*"!==i.title&&i.title!==n&&null!==i.title&&""!==i.title?i.title:i.filename;return"function"==typeof a&&(a=a()),a===n||null===a?a=null:(-1!==a.indexOf("*")&&(a=a.replace("*",t("head > title").text()).trim()),a=a.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(i=f(i.extension))||(i=""),a+=i),{filename:a,title:i=null===(i=f(e.title))?null:-1!==i.indexOf("*")?i.replace("*",t("head > title").text()||"Exported data"):i,messageTop:p(this,e.message||e.messageTop,"top"),messageBottom:p(this,e.messageBottom,"bottom")}}));var f=function(t){return null===t||t===n?null:"function"==typeof t?t():t},p=function(e,i,n){return null===(i=f(i))?null:(e=t("caption",e.table().container()).eq(0),"*"===i?e.css("caption-side")!==n?null:e.length?e.text():"":i)},g=t("\n
          \n
          \n
          \n \n \n
          \n
          \n
          \n
          \n').replace(/(^|\n)\s*/g,""),lt=function(t,e){if(t.innerHTML="",0 in e)for(var i=0;i in e;i++)t.appendChild(e[i].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},ct=function(){if(J())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&void 0!==t.style[i])return e[i];return!1}();function dt(t,e,i){M(t,i["showC"+e.substring(1)+"Button"],"inline-block"),t.innerHTML=i[e+"ButtonText"],t.setAttribute("aria-label",i[e+"ButtonAriaLabel"]),t.className=_[e],m(t,i.customClass,e+"Button"),nt(t,i[e+"ButtonClass"])}function ht(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var ut={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},ft=["input","file","range","select","radio","checkbox","textarea"],pt=function(t){if(!vt[t.input])return h('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));I(vt[t.input](t))},gt=function(t,e){var i=C(z(),t);if(i)for(var n in function(t){for(var e=0;e=e.progressSteps.length&&b("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((function(t,a){var r=function(t){var e=document.createElement("li");return nt(e,_["progress-step"]),e.innerHTML=t,e}(t);if(i.appendChild(r),a===n&&nt(r,_["active-progress-step"]),a!==e.progressSteps.length-1){var o=function(t){var e=document.createElement("li");return nt(e,_["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(t);i.appendChild(o)}}))}function yt(t,e){!function(t,e){var i=N();D(i,"width",e.width),D(i,"padding",e.padding),e.background&&(i.style.background=e.background),i.className=_.popup,e.toast?(nt([document.documentElement,document.body],_["toast-shown"]),nt(i,_.toast)):nt(i,_.modal),m(i,e.customClass,"popup"),"string"==typeof e.customClass&&nt(i,e.customClass),T(i,_.noanimation,!e.animation)}(0,e),function(t,e){var i=L();i&&(function(t,e){"string"==typeof e?t.style.background=e:e||nt([document.documentElement,document.body],_["no-backdrop"])}(i,e.backdrop),!e.backdrop&&e.allowOutsideClick&&b('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in _?nt(t,_[e]):(b('The "position" parameter is not valid, defaulting to "center"'),nt(t,_.center))}(i,e.position),function(t,e){if(e&&"string"==typeof e){var i="grow-"+e;i in _&&nt(t,_[i])}}(i,e.grow),m(i,e.customClass,"container"),e.customContainerClass&&nt(i,e.customContainerClass))}(0,e),function(t,e){m(q(),e.customClass,"header"),bt(0,e),function(t,e){var i=ut.innerParams.get(t);if(i&&e.type===i.type&&H())m(H(),e.customClass,"icon");else if(xt(),e.type)if(wt(),-1!==Object.keys(k).indexOf(e.type)){var n=F(".".concat(_.icon,".").concat(k[e.type]));I(n),m(n,e.customClass,"icon"),T(n,"swal2-animate-".concat(e.type,"-icon"),e.animation)}else h('Unknown type! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.type,'"'))}(t,e),function(t,e){var i=Y();if(!e.imageUrl)return P(i);I(i),i.setAttribute("src",e.imageUrl),i.setAttribute("alt",e.imageAlt),D(i,"width",e.imageWidth),D(i,"height",e.imageHeight),i.className=_.image,m(i,e.customClass,"image"),e.imageClass&&nt(i,e.imageClass)}(0,e),function(t,e){var i=B();M(i,e.title||e.titleText),e.title&&et(e.title,i),e.titleText&&(i.innerText=e.titleText),m(i,e.customClass,"title")}(0,e),function(t,e){var i=K();i.innerHTML=e.closeButtonHtml,m(i,e.customClass,"closeButton"),M(i,e.showCloseButton),i.setAttribute("aria-label",e.closeButtonAriaLabel)}(0,e)}(t,e),function(t,e){var i=z().querySelector("#"+_.content);e.html?(et(e.html,i),I(i,"block")):e.text?(i.textContent=e.text,I(i,"block")):P(i),function(t,e){var i=z(),n=ut.innerParams.get(t),a=!n||e.input!==n.input;ft.forEach((function(t){var n=_[t],r=rt(i,n);gt(t,e.inputAttributes),mt(r,n,e),a&&P(r)})),e.input&&a&&pt(e)}(t,e),m(z(),e.customClass,"content")}(t,e),function(t,e){var i=U(),n=V(),a=X();e.showConfirmButton||e.showCancelButton?I(i):P(i),m(i,e.customClass,"actions"),dt(n,"confirm",e),dt(a,"cancel",e),e.buttonsStyling?function(t,e,i){nt([t,e],_.styled),i.confirmButtonColor&&(t.style.backgroundColor=i.confirmButtonColor),i.cancelButtonColor&&(e.style.backgroundColor=i.cancelButtonColor);var n=window.getComputedStyle(t).getPropertyValue("background-color");t.style.borderLeftColor=n,t.style.borderRightColor=n}(n,a,e):(at([n,a],_.styled),n.style.backgroundColor=n.style.borderLeftColor=n.style.borderRightColor="",a.style.backgroundColor=a.style.borderLeftColor=a.style.borderRightColor="")}(0,e),function(t,e){var i=G();M(i,e.footer),e.footer&&et(e.footer,i),m(i,e.customClass,"footer")}(0,e)}vt.text=vt.email=vt.password=vt.number=vt.tel=vt.url=function(e){var i=rt(z(),_.input);return"string"==typeof e.inputValue||"number"==typeof e.inputValue?i.value=e.inputValue:f(e.inputValue)||b('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(t(e.inputValue),'"')),ht(i,e),i.type=e.input,i},vt.file=function(t){var e=rt(z(),_.file);return ht(e,t),e.type=t.input,e},vt.range=function(t){var e=rt(z(),_.range),i=e.querySelector("input"),n=e.querySelector("output");return i.value=t.inputValue,i.type=t.input,n.value=t.inputValue,e},vt.select=function(t){var e=rt(z(),_.select);if(e.innerHTML="",t.inputPlaceholder){var i=document.createElement("option");i.innerHTML=t.inputPlaceholder,i.value="",i.disabled=!0,i.selected=!0,e.appendChild(i)}return e},vt.radio=function(){var t=rt(z(),_.radio);return t.innerHTML="",t},vt.checkbox=function(t){var e=rt(z(),_.checkbox),i=C(z(),"checkbox");return i.type="checkbox",i.value=1,i.id=_.checkbox,i.checked=Boolean(t.inputValue),e.querySelector("span").innerHTML=t.inputPlaceholder,e},vt.textarea=function(t){var e=rt(z(),_.textarea);return e.value=t.inputValue,ht(e,t),e};var xt=function(){for(var t=R(),e=0;e")),function(t){if(function(){var t=L();t&&(t.parentNode.removeChild(t),at([document.documentElement,document.body],[_["no-backdrop"],_["toast-shown"],_["has-column"]]))}(),J())h("SweetAlert2 requires document to initialize");else{var e=document.createElement("div");e.className=_.container,e.innerHTML=st;var i=function(t){return"string"==typeof t?document.querySelector(t):t}(t.target);i.appendChild(e),function(t){var e=N();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&nt(L(),_.rtl)}(i),function(){var t=z(),e=rt(t,_.input),i=rt(t,_.file),n=t.querySelector(".".concat(_.range," input")),a=t.querySelector(".".concat(_.range," output")),r=rt(t,_.select),o=t.querySelector(".".concat(_.checkbox," input")),s=rt(t,_.textarea);e.oninput=tt,i.onchange=tt,r.onchange=tt,o.onchange=tt,s.oninput=tt,n.oninput=function(t){tt(t),a.value=n.value},n.onchange=function(t){tt(t),n.nextSibling.value=n.value}}()}}(t)}function Xt(t,e){t.removeEventListener(ct,Xt),e.style.overflowY="auto"}var Ut,qt=function(t,e){!function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!g(document.body,_.iosfix)){var t=document.body.scrollTop;document.body.style.top=-1*t+"px",nt(document.body,_.iosfix),function(){var t,e=L();e.ontouchstart=function(i){t=i.target===e||!function(t){return!!(t.scrollHeight>t.clientHeight)}(e)&&"INPUT"!==i.target.tagName},e.ontouchmove=function(e){t&&(e.preventDefault(),e.stopPropagation())}}()}}(),"undefined"!=typeof window&&Ot()&&(Lt(),window.addEventListener("resize",Lt)),d(document.body.children).forEach((function(t){t===L()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,L())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})),e&&(null===S.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(S.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=S.previousBodyPadding+function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var t=document.createElement("div");t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}()+"px")),setTimeout((function(){t.scrollTop=0}))},Gt={select:function(t,e,i){var n=rt(t,_.select);e.forEach((function(t){var e=t[0],a=t[1],r=document.createElement("option");r.value=e,r.innerHTML=a,i.inputValue.toString()===e.toString()&&(r.selected=!0),n.appendChild(r)})),n.focus()},radio:function(t,e,i){var n=rt(t,_.radio);e.forEach((function(t){var e=t[0],a=t[1],r=document.createElement("input"),o=document.createElement("label");r.type="radio",r.name=_.radio,r.value=e,i.inputValue.toString()===e.toString()&&(r.checked=!0);var s=document.createElement("span");s.innerHTML=a,s.className=_.label,o.appendChild(r),o.appendChild(s),n.appendChild(o)}));var a=n.querySelectorAll("input");a.length&&a[0].focus()}},Kt=Object.freeze({hideLoading:Et,disableLoading:Et,getInput:function(t){var e=ut.innerParams.get(t||this),i=ut.domCache.get(t||this);return i?C(i.content,e.input):null},close:Nt,closePopup:Nt,closeModal:Nt,closeToast:Nt,enableButtons:function(){zt(this,["confirmButton","cancelButton"],!1)},disableButtons:function(){zt(this,["confirmButton","cancelButton"],!0)},enableConfirmButton:function(){u("Swal.disableConfirmButton()","Swal.getConfirmButton().removeAttribute('disabled')"),zt(this,["confirmButton"],!1)},disableConfirmButton:function(){u("Swal.enableConfirmButton()","Swal.getConfirmButton().setAttribute('disabled', '')"),zt(this,["confirmButton"],!0)},enableInput:function(){return Yt(this.getInput(),!1)},disableInput:function(){return Yt(this.getInput(),!0)},showValidationMessage:function(t){var e=ut.domCache.get(this);e.validationMessage.innerHTML=t;var i=window.getComputedStyle(e.popup);e.validationMessage.style.marginLeft="-".concat(i.getPropertyValue("padding-left")),e.validationMessage.style.marginRight="-".concat(i.getPropertyValue("padding-right")),I(e.validationMessage);var n=this.getInput();n&&(n.setAttribute("aria-invalid",!0),n.setAttribute("aria-describedBy",_["validation-message"]),A(n),nt(n,_.inputerror))},resetValidationMessage:function(){var t=ut.domCache.get(this);t.validationMessage&&P(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),at(e,_.inputerror))},getProgressSteps:function(){return u("Swal.getProgressSteps()","const swalInstance = Swal.fire({progressSteps: ['1', '2', '3']}); const progressSteps = swalInstance.params.progressSteps"),ut.innerParams.get(this).progressSteps},setProgressSteps:function(t){u("Swal.setProgressSteps()","Swal.update()");var e=a({},ut.innerParams.get(this),{progressSteps:t});bt(0,e),ut.innerParams.set(this,e)},showProgressSteps:function(){I(ut.domCache.get(this).progressSteps)},hideProgressSteps:function(){P(ut.domCache.get(this).progressSteps)},_main:function(e){var i=this;!function(t){for(var e in t)kt(a=e)||b('Unknown parameter "'.concat(a,'"')),t.toast&&(n=e,-1!==Pt.indexOf(n)&&b('The parameter "'.concat(n,'" is incompatible with toasts'))),St(i=void 0)&&u(i,St(i));var i,n,a}(e),N()&&At.swalCloseEventFinishedCallback&&(At.swalCloseEventFinishedCallback(),delete At.swalCloseEventFinishedCallback),At.deferDisposalTimer&&(clearTimeout(At.deferDisposalTimer),delete At.deferDisposalTimer);var n=a({},Tt,e);Vt(n),Object.freeze(n),At.timeout&&(At.timeout.stop(),delete At.timeout),clearTimeout(At.restoreFocusTimeout);var r={popup:N(),container:L(),content:z(),actions:U(),confirmButton:V(),cancelButton:X(),closeButton:K(),validationMessage:$(),progressSteps:W()};ut.domCache.set(this,r),yt(this,n),ut.innerParams.set(this,n);var o=this.constructor;return new Promise((function(e){function a(t){i.closePopup({value:t})}function s(t){i.closePopup({dismiss:t})}Ft.swalPromiseResolve.set(i,e),n.timer&&(At.timeout=new Wt((function(){s("timer"),delete At.timeout}),n.timer)),n.input&&setTimeout((function(){var t=i.getInput();t&&A(t)}),0);for(var l=function(t){n.showLoaderOnConfirm&&o.showLoading(),n.preConfirm?(i.resetValidationMessage(),Promise.resolve().then((function(){return n.preConfirm(t,n.validationMessage)})).then((function(e){E(r.validationMessage)||!1===e?i.hideLoading():a(void 0===e?t:e)}))):a(t)},c=function(t){var e=t.target,a=r.confirmButton,c=r.cancelButton,d=a&&(a===e||a.contains(e)),h=c&&(c===e||c.contains(e));if("click"===t.type)if(d)if(i.disableButtons(),n.input){var u=function(){var t=i.getInput();if(!t)return null;switch(n.input){case"checkbox":return t.checked?1:0;case"radio":return t.checked?t.value:null;case"file":return t.files.length?t.files[0]:null;default:return n.inputAutoTrim?t.value.trim():t.value}}();n.inputValidator?(i.disableInput(),Promise.resolve().then((function(){return n.inputValidator(u,n.validationMessage)})).then((function(t){i.enableButtons(),i.enableInput(),t?i.showValidationMessage(t):l(u)}))):i.getInput().checkValidity()?l(u):(i.enableButtons(),i.showValidationMessage(n.validationMessage))}else l(!0);else h&&(i.disableButtons(),s(o.DismissReason.cancel))},d=r.popup.querySelectorAll("button"),u=0;ui?(e+.05)/(i+.05):(i+.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,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=this,n=t,a=void 0===e?.5:e,r=2*a-1,o=i.alpha()-n.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,l=1-s;return this.rgb(s*i.red()+l*n.red(),s*i.green()+l*n.green(),s*i.blue()+l*n.blue()).alpha(i.alpha()*a+n.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new r,n=this.values,a=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?a[o]=t.slice(0):"[object Number]"===e?a[o]=t:console.error("unexpected color value:",t));return i}},r.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},r.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},r.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function d(t){var e=c(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function h(t){var e,i,n,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[r=255*l,r,r];e=2*l-(i=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0&&n++,n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[c]=255*r;return a}function u(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*n*(1-i),s=255*n*(1-i*r),l=255*n*(1-i*(1-r));n*=255;switch(a){case 0:return[n,l,o];case 1:return[s,n,o];case 2:return[o,n,l];case 3:return[o,s,n];case 4:return[l,o,n];case 5:return[n,o,s]}}function f(t){var e,i,n,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,c=s+l;switch(c>1&&(s/=c,l/=c),n=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(n=1-n),a=s+n*((i=1-l)-s),e){default:case 6:case 0:r=i,g=a,b=s;break;case 1:r=a,g=i,b=s;break;case 2:r=s,g=i,b=a;break;case 3:r=s,g=a,b=i;break;case 4:r=a,g=s,b=i;break;case 5:r=i,g=s,b=a}return[255*r,255*g,255*b]}function p(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function m(t){var e,i,n,a=t[0]/100,r=t[1]/100,o=t[2]/100;return i=-.9689*a+1.8758*r+.0415*o,n=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function v(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function y(t){var e,i,n,a,r=t[0],o=t[1],s=t[2];return r<=8?a=(i=100*r/903.3)/100*7.787+16/116:(i=100*Math.pow((r+16)/116,3),a=Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(o/500+a-16/116)/7.787:95.047*Math.pow(o/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function x(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function w(t){return m(y(t))}function _(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function k(t){return S[t]}e.exports={rgb2hsl:n,rgb2hsv:a,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:c,rgb2lab:d,rgb2lch:function(t){return x(d(t))},hsl2rgb:h,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;if(0===n)return[0,0,0];return[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]},hsl2hwb:function(t){return o(h(t))},hsl2cmyk:function(t){return s(h(t))},hsl2keyword:function(t){return l(h(t))},hsv2rgb:u,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,r=t[2]/100;return e=a*r,[n,100*(e=(e/=(i=(2-a)*r)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return o(u(t))},hsv2cmyk:function(t){return s(u(t))},hsv2keyword:function(t){return l(u(t))},hwb2rgb:f,hwb2hsl:function(t){return n(f(t))},hwb2hsv:function(t){return a(f(t))},hwb2cmyk:function(t){return s(f(t))},hwb2keyword:function(t){return l(f(t))},cmyk2rgb:p,cmyk2hsl:function(t){return n(p(t))},cmyk2hsv:function(t){return a(p(t))},cmyk2hwb:function(t){return o(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:k,keyword2hsl:function(t){return n(k(t))},keyword2hsv:function(t){return a(k(t))},keyword2hwb:function(t){return o(k(t))},keyword2cmyk:function(t){return s(k(t))},keyword2lab:function(t){return d(k(t))},keyword2xyz:function(t){return c(k(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return x(v(t))},lab2xyz:y,lab2rgb:w,lab2lch:x,lch2lab:_,lch2xyz:function(t){return y(_(t))},lch2rgb:function(t){return w(_(t))}};var S={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]},C={};for(var A in S)C[JSON.stringify(S[A])]=A},{}],5:[function(t,e,i){var n=t(4),a=function(){return new c};for(var r in n){a[r+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(r);var o=/(\w+)2(\w+)/.exec(r),s=o[1],l=o[2];(a[s]=a[s]||{})[l]=a[r]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var a=0;a0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index=0&&a>0)&&(m+=a));return r=h.getPixelForValue(m),{size:s=((o=h.getPixelForValue(m+f))-r)/2,base:r,head:o,center:o+s/2}},calculateBarIndexPixels:function(t,e,i){var n,a,o,s,l,c=i.scale.options,d=this.getStackIndex(t),h=i.pixels,u=h[e],f=h.length,p=i.start,g=i.end;return 1===f?(n=u>p?u-p:g-u,a=u0&&(n=(u-h[e-1])/2,e===f-1&&(a=n)),e');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push("
        "),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],s=a.data[n],l=s&&s.custom||{},c=r.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:c(o.backgroundColor,n,d.backgroundColor),strokeStyle:l.borderColor?l.borderColor:c(o.borderColor,n,d.borderColor),lineWidth:l.borderWidth?l.borderWidth:c(o.borderWidth,n,d.borderWidth),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}})):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i=Math.PI?-1:p<-Math.PI?1:0))+f,m={x:Math.cos(p),y:Math.sin(p)},v={x:Math.cos(g),y:Math.sin(g)},b=p<=0&&g>=0||p<=2*Math.PI&&2*Math.PI<=g,y=p<=.5*Math.PI&&.5*Math.PI<=g||p<=2.5*Math.PI&&2.5*Math.PI<=g,x=p<=-Math.PI&&-Math.PI<=g||p<=Math.PI&&Math.PI<=g,w=p<=.5*-Math.PI&&.5*-Math.PI<=g||p<=1.5*Math.PI&&1.5*Math.PI<=g,_=u/100,k={x:x?-1:Math.min(m.x*(m.x<0?1:_),v.x*(v.x<0?1:_)),y:w?-1:Math.min(m.y*(m.y<0?1:_),v.y*(v.y<0?1:_))},S={x:b?1:Math.max(m.x*(m.x>0?1:_),v.x*(v.x>0?1:_)),y:y?1:Math.max(m.y*(m.y>0?1:_),v.y*(v.y>0?1:_))},C={width:.5*(S.x-k.x),height:.5*(S.y-k.y)};c=Math.min(s/C.width,l/C.height),d={x:-.5*(S.x+k.x),y:-.5*(S.y+k.y)}}i.borderWidth=e.getMaxBorderWidth(h.data),i.outerRadius=Math.max((c-i.borderWidth)/2,0),i.innerRadius=Math.max(u?i.outerRadius/100*u:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=d.x*i.outerRadius,i.offsetY=d.y*i.outerRadius,h.total=e.calculateTotal(),e.outerRadius=i.outerRadius-i.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-i.radiusLength,0),r.each(h.data,(function(i,n){e.updateElement(i,n,t)}))},updateElement:function(t,e,i){var n=this,a=n.chart,o=a.chartArea,s=a.options,l=s.animation,c=(o.left+o.right)/2,d=(o.top+o.bottom)/2,h=s.rotation,u=s.rotation,f=n.getDataset(),p=i&&l.animateRotate||t.hidden?0:n.calculateCircumference(f.data[e])*(s.circumference/(2*Math.PI)),g=i&&l.animateScale?0:n.innerRadius,m=i&&l.animateScale?0:n.outerRadius,v=r.valueAtIndexOrDefault;r.extend(t,{_datasetIndex:n.index,_index:e,_model:{x:c+a.offsetX,y:d+a.offsetY,startAngle:h,endAngle:u,circumference:p,outerRadius:m,innerRadius:g,label:v(f.label,e,a.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),i&&l.animateRotate||(b.startAngle=0===e?s.rotation:n.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return r.each(i.data,(function(i,a){t=e.data[a],isNaN(t)||i.hidden||(n+=Math.abs(t))})),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,a=this.index,r=t.length,o=0;o(n=e>n?e:n)?i:n;return n}})}},{25:25,40:40,45:45}],18:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);n._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return r.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var i,n,a,o=this,s=o.getMeta(),l=s.dataset,c=s.data||[],d=o.chart.options,h=d.elements.line,u=o.getScaleForId(s.yAxisID),f=o.getDataset(),p=e(f,d);for(p&&(a=l.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),l._scale=u,l._datasetIndex=o.index,l._children=c,l._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:a.tension?a.tension:r.valueOrDefault(f.lineTension,h.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||h.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||h.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||h.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||h.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||h.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||h.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||h.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:h.fill,steppedLine:a.steppedLine?a.steppedLine:r.valueOrDefault(f.steppedLine,h.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:r.valueOrDefault(f.cubicInterpolationMode,h.cubicInterpolationMode)},l.pivot()),i=0,n=c.length;i');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(i,n){var a=t.getDatasetMeta(0),o=e.datasets[0],s=a.data[n].custom||{},l=r.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:i,fillStyle:s.backgroundColor?s.backgroundColor:l(o.backgroundColor,n,c.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(o.borderColor,n,c.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(o.borderWidth,n,c.borderWidth),hidden:isNaN(o.data[n])||a.data[n].hidden,index:n}})):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:r.noop,update:function(t){var e=this,i=e.getMeta(),n=i.dataset,a=i.data,o=n.custom||{},s=e.getDataset(),l=e.chart.options.elements.line,c=e.chart.scale;void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),r.extend(i.dataset,{_datasetIndex:e.index,_scale:c,_children:a,_loop:!0,_model:{tension:o.tension?o.tension:r.valueOrDefault(s.lineTension,l.tension),backgroundColor:o.backgroundColor?o.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:s.borderWidth||l.borderWidth,borderColor:o.borderColor?o.borderColor:s.borderColor||l.borderColor,fill:o.fill?o.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:o.borderCapStyle?o.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:o.borderDash?o.borderDash:s.borderDash||l.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle}}),i.dataset.pivot(),r.each(a,(function(i,n){e.updateElement(i,n,t)}),e),e.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,a=t.custom||{},o=n.getDataset(),s=n.chart.scale,l=n.chart.options.elements.point,c=s.getPointPositionForValue(e,o.data[e]);void 0!==o.radius&&void 0===o.pointRadius&&(o.pointRadius=o.radius),void 0!==o.hitRadius&&void 0===o.pointHitRadius&&(o.pointHitRadius=o.hitRadius),r.extend(t,{_datasetIndex:n.index,_index:e,_scale:s,_model:{x:i?s.xCenter:c.x,y:i?s.yCenter:c.y,tension:a.tension?a.tension:r.valueOrDefault(o.lineTension,n.chart.options.elements.line.tension),radius:a.radius?a.radius:r.valueAtIndexOrDefault(o.pointRadius,e,l.radius),backgroundColor:a.backgroundColor?a.backgroundColor:r.valueAtIndexOrDefault(o.pointBackgroundColor,e,l.backgroundColor),borderColor:a.borderColor?a.borderColor:r.valueAtIndexOrDefault(o.pointBorderColor,e,l.borderColor),borderWidth:a.borderWidth?a.borderWidth:r.valueAtIndexOrDefault(o.pointBorderWidth,e,l.borderWidth),pointStyle:a.pointStyle?a.pointStyle:r.valueAtIndexOrDefault(o.pointStyle,e,l.pointStyle),hitRadius:a.hitRadius?a.hitRadius:r.valueAtIndexOrDefault(o.pointHitRadius,e,l.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();r.each(e.data,(function(i,n){var a=i._model,o=r.splineCurve(r.previousItem(e.data,n,!0)._model,a,r.nextItem(e.data,n,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(o.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(o.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(o.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(o.next.y,t.bottom),t.top),i.pivot()}))},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model;a.radius=i.hoverRadius?i.hoverRadius:r.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:r.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,r.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor?i.hoverBorderColor:r.valueAtIndexOrDefault(e.pointHoverBorderColor,n,r.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:r.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model,o=this.chart.options.elements.point;a.radius=i.radius?i.radius:r.valueAtIndexOrDefault(e.pointRadius,n,o.radius),a.backgroundColor=i.backgroundColor?i.backgroundColor:r.valueAtIndexOrDefault(e.pointBackgroundColor,n,o.backgroundColor),a.borderColor=i.borderColor?i.borderColor:r.valueAtIndexOrDefault(e.pointBorderColor,n,o.borderColor),a.borderWidth=i.borderWidth?i.borderWidth:r.valueAtIndexOrDefault(e.pointBorderWidth,n,o.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,i){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:r.noop,onComplete:r.noop}}),e.exports=function(t){t.Animation=a.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var a,r,o=this.animations;for(e.chart=t,n||(t.animating=!0),a=0,r=o.length;a1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,a=0;a=e.numSteps?(r.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var n=t(25),a=t(45),r=t(28),o=t(48);e.exports=function(t){var e=t.plugins;function i(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(e,i){var r=this;i=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=a.configMerge(n.global,n[t.type],t.options||{}),t}(i);var s=o.acquireContext(e,i),l=s&&s.canvas,c=l&&l.height,d=l&&l.width;r.id=a.uid(),r.ctx=s,r.canvas=l,r.config=i,r.width=d,r.height=c,r.aspectRatio=c?d/c:null,r.options=i.options,r._bufferedRender=!1,r.chart=r,r.controller=r,t.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(t){r.config.data=t}}),s&&l?(r.initialize(),r.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return e.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),e.notify(t,"afterInit"),t},clear:function(){return a.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var i=this,n=i.options,r=i.canvas,o=n.maintainAspectRatio&&i.aspectRatio||null,s=Math.max(0,Math.floor(a.getMaximumWidth(r))),l=Math.max(0,Math.floor(o?s/o:a.getMaximumHeight(r)));if((i.width!==s||i.height!==l)&&(r.width=i.width=s,r.height=i.height=l,r.style.width=s+"px",r.style.height=l+"px",a.retinaScale(i,n.devicePixelRatio),!t)){var c={width:s,height:l};e.notify(i,"resize",[c]),i.options.onResize&&i.options.onResize(i,c),i.stop(),i.update(i.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;a.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),a.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),i&&(i.id=i.id||"scale")},buildScales:function(){var e=this,n=e.options,r=e.scales={},o=[];n.scales&&(o=o.concat((n.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(n.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(o,(function(n){var o=n.options,s=a.valueOrDefault(o.type,n.dtype),l=t.scaleService.getScaleConstructor(s);if(l){i(o.position)!==i(n.dposition)&&(o.position=n.dposition);var c=new l({id:o.id,options:o,ctx:e.ctx,chart:e});r[c.id]=c,c.mergeTicksOptions(),n.isDefault&&(e.scale=c)}})),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return a.each(e.data.datasets,(function(a,r){var o=e.getDatasetMeta(r),s=a.type||e.config.type;if(o.type&&o.type!==s&&(e.destroyDatasetMeta(r),o=e.getDatasetMeta(r)),o.type=s,i.push(o.type),o.controller)o.controller.updateIndex(r);else{var l=t.controllers[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(e,r),n.push(o.controller)}}),e),n},resetElements:function(){var t=this;a.each(t.data.datasets,(function(e,i){t.getDatasetMeta(i).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var i,n,r=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),(n=(i=r).options).scale?i.scale.options=n.scale:n.scales&&n.scales.xAxes.concat(n.scales.yAxes).forEach((function(t){i.scales[t.id].options=t})),i.tooltip._options=n.tooltips,!1!==e.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var o=r.buildOrUpdateControllers();a.each(r.data.datasets,(function(t,e){r.getDatasetMeta(e).controller.buildOrUpdateElements()}),r),r.updateLayout(),a.each(o,(function(t){t.reset()})),r.updateDatasets(),e.notify(r,"afterUpdate"),r._bufferedRender?r._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:r.render(t)}},updateLayout:function(){var i=this;!1!==e.notify(i,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),e.notify(i,"afterScaleUpdate"),e.notify(i,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==e.notify(t,"beforeDatasetsUpdate")){for(var i=0,n=t.data.datasets.length;i=0;--n)i.isDatasetVisible(n)&&i.drawDataset(n,t);e.notify(i,"afterDatasetsDraw",[t])}},drawDataset:function(t,i){var n=this,a=n.getDatasetMeta(t),r={meta:a,index:t,easingValue:i};!1!==e.notify(n,"beforeDatasetDraw",[r])&&(a.controller.draw(i),e.notify(n,"afterDatasetDraw",[r]))},getElementAtEvent:function(t){return r.modes.single(this,t)},getElementsAtEvent:function(t){return r.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return r.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=r.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return r.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta[e.id];return n||(n=i._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e0||(e.forEach((function(e){delete t[e]})),delete t._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null===e.xAxisID&&(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=i.yAxisID||t.chart.options.scales.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]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(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,i=e.dataElementType;return i&&new i({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,i=this,n=i.getMeta(),a=i.getDataset().data||[],r=n.data;for(t=0,e=a.length;tn&&t.insertElements(n,a-n)},insertElements:function(t,e){for(var i=0;i=i[e].length&&i[e].push({}),!i[e][o].type||l.type&&l.type!==i[e][o].type?r.merge(i[e][o],[t.scaleService.getScaleDefaults(s),l]):r.merge(i[e][o],l)}else r._merger(e,i,n,a)}})},r.where=function(t,e){if(r.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return r.each(t,(function(t){e(t)&&i.push(t)})),i},r.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;n=0;n--){var a=t[n];if(e(a))return a}},r.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=r.inherits,t&&r.extend(i.prototype,t),i.__super__=e.prototype,i},r.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},r.almostEquals=function(t,e,i){return Math.abs(t-e)t},r.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},r.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},r.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},r.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},r.toRadians=function(t){return t*(Math.PI/180)},r.toDegrees=function(t){return t*(180/Math.PI)},r.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),r=Math.atan2(n,i);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},r.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},r.aliasPixel=function(t){return t%2==0?0:.5},r.splineCurve=function(t,e,i,n){var a=t.skip?e:t,r=e,o=i.skip?e:i,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),c=s/(s+l),d=l/(s+l),h=n*(c=isNaN(c)?0:c),u=n*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+u*(o.x-a.x),y:r.y+u*(o.y-a.y)}}},r.EPSILON=Number.EPSILON||1e-14,r.splineCurveMonotone=function(t){var e,i,n,a,o,s,l,c,d,h=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),u=h.length;for(e=0;e0?h[e-1]:null,(a=e0?h[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},r.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},r.niceNum=function(t,e){var i=Math.floor(r.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},r.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)},r.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,o=t.currentTarget||t.srcElement,s=o.getBoundingClientRect(),l=a.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=a.clientX,n=a.clientY);var c=parseFloat(r.getStyle(o,"padding-left")),d=parseFloat(r.getStyle(o,"padding-top")),h=parseFloat(r.getStyle(o,"padding-right")),u=parseFloat(r.getStyle(o,"padding-bottom")),f=s.right-s.left-c-h,p=s.bottom-s.top-d-u;return{x:i=Math.round((i-s.left-c)/f*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-s.top-d)/p*o.height/e.currentDevicePixelRatio)}},r.getConstraintWidth=function(t){return o(t,"max-width","clientWidth")},r.getConstraintHeight=function(t){return o(t,"max-height","clientHeight")},r.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(r.getStyle(e,"padding-left"),10),n=parseInt(r.getStyle(e,"padding-right"),10),a=e.clientWidth-i-n,o=r.getConstraintWidth(t);return isNaN(o)?a:Math.min(a,o)},r.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(r.getStyle(e,"padding-top"),10),n=parseInt(r.getStyle(e,"padding-bottom"),10),a=e.clientHeight-i-n,o=r.getConstraintHeight(t);return isNaN(o)?a:Math.min(a,o)},r.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},r.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,r=t.width;n.height=a*i,n.width=r*i,t.ctx.scale(i,i),n.style.height=a+"px",n.style.width=r+"px"}},r.fontString=function(t,e,i){return e+" "+t+"px "+i},r.longestText=function(t,e,i,n){var a=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var s=0;r.each(i,(function(e){null!=e&&!0!==r.isArray(e)?s=r.measureText(t,a,o,s,e):r.isArray(e)&&r.each(e,(function(e){null==e||r.isArray(e)||(s=r.measureText(t,a,o,s,e))}))}));var l=o.length/2;if(l>i.length){for(var c=0;cn&&(n=r),n},r.numberOfLabelLines=function(t){var e=1;return r.each(t,(function(t){r.isArray(t)&&t.length>e&&(e=t.length)})),e},r.color=n?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},r.getHoverColor=function(t){return t instanceof CanvasPattern?t:r.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,i){"use strict";var n=t(45);function a(t,e){return t.native?{x:t.x,y:t.y}:n.getRelativePosition(t,e)}function r(t,e){var i,n,a,r,o;for(n=0,r=t.data.datasets.length;n0&&(c=t.getDatasetMeta(c[0]._datasetIndex).data),c},"x-axis":function(t,e){return c(t,e,{intersect:!0})},point:function(t,e){return o(t,a(e,t))},nearest:function(t,e,i){var n=a(e,t);i.axis=i.axis||"xy";var r=l(i.axis),o=s(t,n,i.intersect,r);return o.length>1&&o.sort((function(t,e){var i=t.getArea()-e.getArea();return 0===i&&(i=t._datasetIndex-e._datasetIndex),i})),o.slice(0,1)},x:function(t,e,i){var n=a(e,t),o=[],s=!1;return r(t,(function(t){t.inXRange(n.x)&&o.push(t),t.inRange(n.x,n.y)&&(s=!0)})),i.intersect&&!s&&(o=[]),o},y:function(t,e,i){var n=a(e,t),o=[],s=!1;return r(t,(function(t){t.inYRange(n.y)&&o.push(t),t.inRange(n.x,n.y)&&(s=!0)})),i.intersect&&!s&&(o=[]),o}}}},{45:45}],29:[function(t,e,i){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){function e(t,e){return n.where(t,(function(t){return t.position===e}))}function i(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,i){var n=e?i:t,a=e?t:i;return n.weight===a.weight?n._tmpIndex_-a._tmpIndex_:n.weight-a.weight})),t.forEach((function(t){delete t._tmpIndex_}))}t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],r=a.length,o=0;ou&&lt.maxHeight){l--;break}l++,h=c*d}t.labelRotation=l},afterCalculateTickRotation:function(){r.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){r.callback(this.options.beforeFit,[this])},fit:function(){var t=this,n=t.minSize={width:0,height:0},a=s(t._ticks),l=t.options,c=l.ticks,d=l.scaleLabel,h=l.gridLines,u=l.display,f=t.isHorizontal(),p=i(c),g=l.gridLines.tickMarkLength;if(n.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:u&&h.drawTicks?g:0,n.height=f?u&&h.drawTicks?g:0:t.maxHeight,d.display&&u){var m=o(d)+r.options.toPadding(d.padding).height;f?n.height+=m:n.width+=m}if(c.display&&u){var v=r.longestText(t.ctx,p.font,a,t.longestTextCache),b=r.numberOfLabelLines(a),y=.5*p.size,x=t.options.ticks.padding;if(f){t.longestLabelWidth=v;var w=r.toRadians(t.labelRotation),_=Math.cos(w),k=Math.sin(w)*v+p.size*b+y*(b-1)+y;n.height=Math.min(t.maxHeight,n.height+k+x),t.ctx.font=p.font;var S=e(t.ctx,a[0],p.font),C=e(t.ctx,a[a.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===l.position?_*S+3:_*y+3,t.paddingRight="bottom"===l.position?_*y+3:_*C+3):(t.paddingLeft=S/2+3,t.paddingRight=C/2+3)}else c.mirror?v=0:v+=x+y,n.width=Math.min(t.maxWidth,n.width+v),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=n.width,t.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){r.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(r.isNullOrUndef(t))return NaN;if("number"==typeof t&&!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},getLabelForIndex:r.noop,getPixelForValue:r.noop,getValueForPixel:r.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var r=e.left+Math.round(a);return r+=e.isFullWidth()?e.margins.left:0}var o=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(o/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,i=t.max;return t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0},_autoSkip:function(t){var e,i,n,a,o=this,s=o.isHorizontal(),l=o.options.ticks.minor,c=t.length,d=r.toRadians(o.labelRotation),h=Math.cos(d),u=o.longestLabelWidth*h,f=[];for(l.maxTicksLimit&&(a=l.maxTicksLimit),s&&(e=!1,(u+l.autoSkipPadding)*c>o.width-(o.paddingLeft+o.paddingRight)&&(e=1+Math.floor((u+l.autoSkipPadding)*c/(o.width-(o.paddingLeft+o.paddingRight)))),a&&c>a&&(e=Math.max(e,Math.floor(c/a)))),i=0;i1&&i%e>0||i%e==0&&i+e>=c)&&i!==c-1||r.isNullOrUndef(n.label))&&delete n.label,f.push(n);return f},draw:function(t){var e=this,a=e.options;if(a.display){var s=e.ctx,c=n.global,d=a.ticks.minor,h=a.ticks.major||d,u=a.gridLines,f=a.scaleLabel,p=0!==e.labelRotation,g=e.isHorizontal(),m=d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=r.valueOrDefault(d.fontColor,c.defaultFontColor),b=i(d),y=r.valueOrDefault(h.fontColor,c.defaultFontColor),x=i(h),w=u.drawTicks?u.tickMarkLength:0,_=r.valueOrDefault(f.fontColor,c.defaultFontColor),k=i(f),S=r.options.toPadding(f.padding),C=r.toRadians(e.labelRotation),A=[],T="right"===a.position?e.left:e.right-w,D="right"===a.position?e.left+w:e.right,I="bottom"===a.position?e.top:e.bottom-w,P="bottom"===a.position?e.top+w:e.bottom;if(r.each(m,(function(i,n){if(void 0!==i.label){var o,s,h,f,v,b,y,x,_,k,S,M,E,O,L=i.label;n===e.zeroLineIndex&&a.offset===u.offsetGridLines?(o=u.zeroLineWidth,s=u.zeroLineColor,h=u.zeroLineBorderDash,f=u.zeroLineBorderDashOffset):(o=r.valueAtIndexOrDefault(u.lineWidth,n),s=r.valueAtIndexOrDefault(u.color,n),h=r.valueOrDefault(u.borderDash,c.borderDash),f=r.valueOrDefault(u.borderDashOffset,c.borderDashOffset));var F="middle",j="middle",N=d.padding;if(g){var R=w+N;"bottom"===a.position?(j=p?"middle":"top",F=p?"right":"center",O=e.top+R):(j=p?"middle":"bottom",F=p?"left":"center",O=e.bottom-R);var H=l(e,n,u.offsetGridLines&&m.length>1);H1);Y0)i=t.stepSize;else{var r=n.niceNum(e.max-e.min,!1);i=n.niceNum(r/(t.maxTicks-1),!0)}var o=Math.floor(e.min/i)*i,s=Math.ceil(e.max/i)*i;t.min&&t.max&&t.stepSize&&n.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(o=t.min,s=t.max);var l=(s-o)/i;l=n.almostEquals(l,Math.round(l),i/1e3)?Math.round(l):Math.ceil(l),a.push(void 0!==t.min?t.min:o);for(var c=1;c3?i[2]-i[1]:i[1]-i[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var r=n.log10(Math.abs(a)),o="";if(0!==t){var s=-1*Math.floor(r);s=Math.max(Math.min(s,20),0),o=t.toFixed(s)}else o="0";return o},logarithmic:function(t,e,i){var a=t/Math.pow(10,Math.floor(n.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45);n._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:r.noop,title:function(t,e){var i="",n=e.labels,a=n?n.length:0;if(t.length>0){var r=t[0];r.xLabel?i=r.xLabel:a>0&&r.indexl.height-e.height&&(h="bottom");var u=(c.left+c.right)/2,f=(c.top+c.bottom)/2;"center"===h?(i=function(t){return t<=u},n=function(t){return t>u}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width>l.width},r=function(t){return t-e.width<0},o=function(t){return t<=f?"top":"bottom"},i(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):n(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:d,yAlign:p.yAlign?p.yAlign:h}}(this,y),b=function(t,e,i){var n=t.x,a=t.y,r=t.caretSize,o=t.caretPadding,s=t.cornerRadius,l=i.xAlign,c=i.yAlign,d=r+o,h=s+o;return"right"===l?n-=e.width:"center"===l&&(n-=e.width/2),"top"===c?a+=d:a-="bottom"===c?e.height+d:e.height/2,"center"===c?"left"===l?n+=d:"right"===l&&(n-=d):"left"===l?n-=h:"right"===l&&(n+=h),{x:n,y:a}}(p,y,v)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=b.x,p.y=b.y,p.width=y.width,p.height=y.height,p.caretX=x.x,p.caretY=x.y,h._model=p,e&&u.custom&&u.custom.call(h,p),h},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,r,o,s,l,c=i.caretSize,d=i.cornerRadius,h=i.xAlign,u=i.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===u)s=p+m/2,"left"===h?(a=(n=f)-c,r=n,o=s+c,l=s-c):(a=(n=f+g)+c,r=n,o=s-c,l=s+c);else if("left"===h?(n=(a=f+d+c)-c,r=a+c):"right"===h?(n=(a=f+g-d-c)-c,r=a+c):(n=(a=f+g/2)-c,r=a+c),"top"===u)s=(o=p)-c,l=o;else{s=(o=p+m)+c,l=o;var v=r;r=n,n=v}return{x1:n,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,i,n,a){var o=i.title;if(o.length){n.textAlign=i._titleAlign,n.textBaseline="top";var s,l,c=i.titleFontSize,d=i.titleSpacing;for(n.fillStyle=e(i.titleFontColor,a),n.font=r.fontString(c,i._titleFontStyle,i._titleFontFamily),s=0,l=o.length;s0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(this.drawBackground(n,e,t,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a))}},handleEvent:function(t){var e=this,i=e._options,n=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,i.mode,i),!(n=!r.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,i.enabled||i.custom){e._eventPosition={x:t.x,y:t.y};var a=e._model;e.update(!0),e.pivot(),n|=a.x!==e._model.x||a.y!==e._model.y}return n}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,a=0,r=0;for(e=0,i=t.length;el;)a-=2*Math.PI;for(;a=s&&a<=l,d=o>=i.innerRadius&&o<=i.outerRadius;return c&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},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,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45),o=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:o.defaultColor,borderWidth:3,borderColor:o.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a=this,s=a._view,l=a._chart.ctx,c=s.spanGaps,d=a._children.slice(),h=o.elements.line,u=-1;for(a._loop&&d.length&&d.push(d[0]),l.save(),l.lineCap=s.borderCapStyle||h.borderCapStyle,l.setLineDash&&l.setLineDash(s.borderDash||h.borderDash),l.lineDashOffset=s.borderDashOffset||h.borderDashOffset,l.lineJoin=s.borderJoinStyle||h.borderJoinStyle,l.lineWidth=s.borderWidth||h.borderWidth,l.strokeStyle=s.borderColor||o.defaultColor,l.beginPath(),u=-1,t=0;tt?1:-1,r=1,o=l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,i=l.y,a=1,r=(n=l.base)>i?1:-1,o=l.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(t-e),Math.abs(i-n)),h=(c=c>d?d:c)/2,u=t+("left"!==o?h*a:0),f=e+("right"!==o?-h*a:0),p=i+("top"!==o?h*r:0),g=n+("bottom"!==o?-h*r:0);u!==f&&(i=p,n=g),p!==g&&(t=u,e=f)}s.beginPath(),s.fillStyle=l.backgroundColor,s.strokeStyle=l.borderColor,s.lineWidth=c;var m=[[t,n],[t,i],[e,i],[e,n]],v=["bottom","left","top","right"].indexOf(o,0);function b(t){return m[(v+t)%4]}-1===v&&(v=0);var y=b(0);s.moveTo(y[0],y[1]);for(var x=1;x<4;x++)y=b(x),s.lineTo(y[0],y[1]);s.fill(),c&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=o(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){var i=this;if(!i._view)return!1;var n=o(i);return r(i)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return r(this)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42);i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,r){if(r){var o=Math.min(r,n/2),s=Math.min(r,a/2);t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+s),t.lineTo(e+n,i+a-s),t.quadraticCurveTo(e+n,i+a,e+n-o,i+a),t.lineTo(e+o,i+a),t.quadraticCurveTo(e,i+a,e,i+a-s),t.lineTo(e,i+s),t.quadraticCurveTo(e,i,e+o,i)}else t.rect(e,i,n,a)},drawPoint:function(t,e,i,n,a){var r,o,s,l,c,d;if("object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,a,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(o=3*i/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(n-o/2,a+c/3),t.lineTo(n+o/2,a+c/3),t.lineTo(n,a-2*c/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-d,a-d,2*d,2*d),t.strokeRect(n-d,a-d,2*d,2*d);break;case"rectRounded":var h=i/Math.SQRT2,u=n-h,f=a-h,p=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,u,f,p,p,i/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-d,a),t.lineTo(n,a+d),t.lineTo(n+d,a),t.lineTo(n,a-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),s=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-s,a-l),t.lineTo(n+s,a+l),t.moveTo(n-s,a+l),t.lineTo(n+s,a-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,a),t.lineTo(n+i,a),t.closePath()}t.stroke()}}else t.drawImage(e,n-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){if(i.steppedLine)return"after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n,a={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return a.valueOrDefault(a.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var r,o,s;if(a.isArray(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r=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,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.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-a.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*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},n.easingEffects=a},{42:42}],44:[function(t,e,i){"use strict";var n=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,a,r;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,a=+t.bottom||0,r=+t.left||0):e=i=a=r=+t||0,{top:e,right:i,bottom:a,left:r,height:e+a,width:r+i}},resolve:function(t,e,i){var a,r,o;for(a=0,r=t.length;a
        ';var o=e.childNodes[0],s=e.childNodes[1];e._reset=function(){o.scrollLeft=n,o.scrollTop=n,s.scrollLeft=n,s.scrollTop=n};var l=function(){e._reset(),t()};return u(o,"scroll",l.bind(o,"expand")),u(s,"scroll",l.bind(s,"shrink")),e}((c=function(){if(g.resizer)return e(p("resize",i))},h=!1,f=[],function(){f=Array.prototype.slice.call(arguments),d=d||this,h||(h=!0,n.requestAnimFrame.call(window,(function(){h=!1,c.apply(d,f)})))}));!function(t,e){var i=(t[a]||(t[a]={})).renderProxy=function(t){t.animationName===s&&e()};n.each(l,(function(e){u(t,e,i)})),t.classList.add(o)}(t,(function(){if(g.resizer){var e=t.parentNode;e&&e!==m.parentNode&&e.insertBefore(m,e.firstChild),m._reset()}}))}function m(t){var e=t[a]||{},i=e.resizer;delete e.resizer,function(t){var e=t[a]||{},i=e.renderProxy;i&&(n.each(l,(function(e){f(t,e,i)})),delete e.renderProxy),t.classList.remove(o)}(t),i&&i.parentNode&&i.parentNode.removeChild(i)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,i,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+s+"{"+n+"}@keyframes "+s+"{"+n+"}."+o+"{-webkit-animation:"+s+" 0.001s;animation:"+s+" 0.001s;}",i=(t=this)._style||document.createElement("style"),t._style||(t._style=i,e="/* Chart.js */\n"+e,i.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[a]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===r||""===r){var o=d(t,"width");void 0!==o&&(t.width=o)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=d(t,"height");void 0!==o&&(t.height=s)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[a]){var i=e[a].initial;["height","width"].forEach((function(t){var a=i[t];n.isNullOrUndef(a)?e.removeAttribute(t):e.setAttribute(t,a)})),n.each(i.style||{},(function(t,i){e.style[i]=t})),e.width=e.width,delete e[a]}},addEventListener:function(t,e,i){var r=t.canvas;if("resize"!==e){var o=i[a]||(i[a]={}),s=(o.proxies||(o.proxies={}))[t.id+"_"+e]=function(e){i(function(t,e){var i=c[t.type]||t.type,a=n.getRelativePosition(t,e);return p(i,e,a.x,a.y,t)}(e,t))};u(r,e,s)}else g(r,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var r=((i[a]||{}).proxies||{})[t.id+"_"+e];r&&f(n,e,r)}else m(n)}},n.addEvent=u,n.removeEvent=f},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),a=t(46),r=t(47),o=r._enabled?r:a;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},o)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";var n=t(25),a=t(40),r=t(45);n._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){var t={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.dataset._children||[],r=a.length||0;return r?function(t,e){return e=i)&&n;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function i(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?r=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?r=i.scaleZero:n.getBasePosition?r=n.getBasePosition():n.getBasePixel&&(r=n.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if("number"==typeof r&&isFinite(r))return{x:(e=n.isHorizontal())?r:null,y:e?null:r}}return null}function o(t,e,i){var n,a=t[e].fill,r=[e];if(!i)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;r.push(a),a=n.fill}return!1}function s(e){var i=e.fill,n="dataset";return!1===i?null:(isFinite(i)||(n="boundary"),t[n](e))}function l(t){return t&&!t.skip}function c(t,e,i,n,a){var o;if(n&&a){for(t.moveTo(e[0].x,e[0].y),o=1;o0;--o)r.canvas.lineTo(t,i[o],i[o-1],!0)}}return{id:"filler",afterDatasetsUpdate:function(t,n){var r,l,c,d,h=(t.data.datasets||[]).length,u=n.propagate,f=[];for(l=0;l');for(var i=0;i'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push(""),e.join("")}}),e.exports=function(t){var e=t.layoutService,i=r.noop;function o(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function s(i,n){var a=new t.Legend({ctx:i.ctx,options:n,chart:i});e.configure(i,a,n),e.addBox(i,a),i.legend=a}return t.Legend=a.extend({initialize:function(t){r.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:i,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:i,beforeSetDimensions:i,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:i,beforeBuildLabels:i,buildLabels:function(){var t=this,e=t.options.labels||{},i=r.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((function(i){return e.filter(i,t.chart.data)}))),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:i,beforeFit:i,fit:function(){var t=this,e=t.options,i=e.labels,a=e.display,s=t.ctx,l=n.global,c=r.valueOrDefault,d=c(i.fontSize,l.defaultFontSize),h=c(i.fontStyle,l.defaultFontStyle),u=c(i.fontFamily,l.defaultFontFamily),f=r.fontString(d,h,u),p=t.legendHitBoxes=[],g=t.minSize,m=t.isHorizontal();if(m?(g.width=t.maxWidth,g.height=a?10:0):(g.width=a?10:0,g.height=t.maxHeight),a)if(s.font=f,m){var v=t.lineWidths=[0],b=t.legendItems.length?d+i.padding:0;s.textAlign="left",s.textBaseline="top",r.each(t.legendItems,(function(e,n){var a=o(i,d)+d/2+s.measureText(e.text).width;v[v.length-1]+a+i.padding>=t.width&&(b+=d+i.padding,v[v.length]=t.left),p[n]={left:0,top:0,width:a,height:d},v[v.length-1]+=a+i.padding})),g.height+=b}else{var y=i.padding,x=t.columnWidths=[],w=i.padding,_=0,k=0,S=d+y;r.each(t.legendItems,(function(t,e){var n=o(i,d)+d/2+s.measureText(t.text).width;k+S>g.height&&(w+=_+i.padding,x.push(_),_=0,k=0),_=Math.max(_,n),k+=S,p[e]={left:0,top:0,width:n,height:d}})),w+=_,x.push(_),g.width+=w}t.width=g.width,t.height=g.height},afterFit:i,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,a=n.global,s=a.elements.line,l=t.width,c=t.lineWidths;if(e.display){var d,h=t.ctx,u=r.valueOrDefault,f=u(i.fontColor,a.defaultFontColor),p=u(i.fontSize,a.defaultFontSize),g=u(i.fontStyle,a.defaultFontStyle),m=u(i.fontFamily,a.defaultFontFamily),v=r.fontString(p,g,m);h.textAlign="left",h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=v;var b=o(i,p),y=t.legendHitBoxes,x=t.isHorizontal();d=x?{x:t.left+(l-c[0])/2,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var w=p+i.padding;r.each(t.legendItems,(function(n,o){var f=h.measureText(n.text).width,g=b+p/2+f,m=d.x,v=d.y;x?m+g>=l&&(v=d.y+=w,d.line++,m=d.x=t.left+(l-c[d.line])/2):v+w>t.bottom&&(m=d.x=m+t.columnWidths[d.line]+i.padding,v=d.y=t.top+i.padding,d.line++),function(t,i,n){if(!(isNaN(b)||b<=0)){h.save(),h.fillStyle=u(n.fillStyle,a.defaultColor),h.lineCap=u(n.lineCap,s.borderCapStyle),h.lineDashOffset=u(n.lineDashOffset,s.borderDashOffset),h.lineJoin=u(n.lineJoin,s.borderJoinStyle),h.lineWidth=u(n.lineWidth,s.borderWidth),h.strokeStyle=u(n.strokeStyle,a.defaultColor);var o=0===u(n.lineWidth,s.borderWidth);if(h.setLineDash&&h.setLineDash(u(n.lineDash,s.borderDash)),e.labels&&e.labels.usePointStyle){var l=p*Math.SQRT2/2,c=l/Math.SQRT2,d=t+c,f=i+c;r.canvas.drawPoint(h,n.pointStyle,l,d,f)}else o||h.strokeRect(t,i,b,p),h.fillRect(t,i,b,p);h.restore()}}(m,v,n),y[o].left=m,y[o].top=v,function(t,e,i,n){var a=p/2,r=b+a+t,o=e+a;h.fillText(i.text,r,o),i.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(r,o),h.lineTo(r+n,o),h.stroke())}(m,v,n,f),x?d.x+=g+i.padding:d.y+=w}))}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var r=t.x,o=t.y;if(r>=e.left&&r<=e.right&&o>=e.top&&o<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=c.left&&r<=c.left+c.width&&o>=c.top&&o<=c.top+c.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&s(t,e)},beforeUpdate:function(t){var i=t.options.legend,a=t.legend;i?(r.mergeIf(i,n.global.legend),a?(e.configure(t,a,i),a.options=i):s(t,i)):a&&(e.removeBox(t,a),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,i){"use strict";var n=t(25),a=t(26),r=t(45);n._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){var e=t.layoutService,i=r.noop;function o(i,n){var a=new t.Title({ctx:i.ctx,options:n,chart:i});e.configure(i,a,n),e.addBox(i,a),i.titleBlock=a}return t.Title=a.extend({initialize:function(t){r.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:i,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:i,beforeSetDimensions:i,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:i,beforeBuildLabels:i,buildLabels:i,afterBuildLabels:i,beforeFit:i,fit:function(){var t=this,e=r.valueOrDefault,i=t.options,a=i.display,o=e(i.fontSize,n.global.defaultFontSize),s=t.minSize,l=r.isArray(i.text)?i.text.length:1,c=r.options.toLineHeight(i.lineHeight,o),d=a?l*c+2*i.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=d):(s.width=d,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:i,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=r.valueOrDefault,a=t.options,o=n.global;if(a.display){var s,l,c,d=i(a.fontSize,o.defaultFontSize),h=i(a.fontStyle,o.defaultFontStyle),u=i(a.fontFamily,o.defaultFontFamily),f=r.fontString(d,h,u),p=r.options.toLineHeight(a.lineHeight,d),g=p/2+a.padding,m=0,v=t.top,b=t.left,y=t.bottom,x=t.right;e.fillStyle=i(a.fontColor,o.defaultFontColor),e.font=f,t.isHorizontal()?(l=b+(x-b)/2,c=v+g,s=x-b):(l="left"===a.position?b+g:x-g,c=v+(y-v)/2,s=y-v,m=Math.PI*("left"===a.position?-.5:.5)),e.save(),e.translate(l,c),e.rotate(m),e.textAlign="center",e.textBaseline="middle";var w=a.text;if(r.isArray(w))for(var _=0,k=0;kt.max)&&(t.max=n))}))}));t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,i=e.options.ticks;if(e.isHorizontal())t=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(e.width/50));else{var r=a.valueOrDefault(i.fontSize,n.global.defaultFontSize);t=Math.min(i.maxTicksLimit?i.maxTicksLimit:11,Math.ceil(e.height/(2*r)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i=this,n=i.start,a=+i.getRightValue(t),r=i.end-n;return i.isHorizontal()?(e=i.left+i.width/r*(a-n),Math.round(e)):(e=i.bottom-i.height/r*(a-n),Math.round(e))},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,a=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],54:[function(t,e,i){"use strict";var n=t(45),a=t(34);e.exports=function(t){var e=n.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=n.sign(t.min),a=n.sign(t.max);i<0&&a<0?t.max=0:i>0&&a>0&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,o=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)),r!==o&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),r={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,stepSize:n.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=a.generators.linear(r,t);t.handleDirectionalChanges(),t.max=n.max(o),t.min=n.min(o),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{34:34,45:45}],55:[function(t,e,i){"use strict";var n=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){var t=this,e=t.options,i=e.ticks,a=t.chart,r=a.data.datasets,o=n.valueOrDefault,s=t.isHorizontal();function l(e){return s?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var c=e.stacked;if(void 0===c&&n.each(r,(function(t,e){if(!c){var i=a.getDatasetMeta(e);a.isDatasetVisible(e)&&l(i)&&void 0!==i.stack&&(c=!0)}})),e.stacked||c){var d={};n.each(r,(function(i,r){var o=a.getDatasetMeta(r),s=[o.type,void 0===e.stacked&&void 0===o.stack?r:"",o.stack].join(".");a.isDatasetVisible(r)&&l(o)&&(void 0===d[s]&&(d[s]=[]),n.each(i.data,(function(i,n){var a=d[s],r=+t.getRightValue(i);isNaN(r)||o.data[n].hidden||(a[n]=a[n]||0,e.relativePoints?a[n]=100:a[n]+=r)})))})),n.each(d,(function(e){var i=n.min(e),a=n.max(e);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?a:Math.max(t.max,a)}))}else n.each(r,(function(e,i){var r=a.getDatasetMeta(i);a.isDatasetVisible(i)&&l(r)&&n.each(e.data,(function(e,i){var n=+t.getRightValue(e);isNaN(n)||r.data[i].hidden||((null===t.min||nt.max)&&(t.max=n),0!==n&&(null===t.minNotZero||na?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function c(t){return 0===t||180===t?"center":t<180?"left":"right"}function d(t,e,i,n){if(a.isArray(e))for(var r=i.y,o=1.5*n,s=0;s270||t<90)&&(i.y-=e.h)}function u(t){return a.isNumber(t)?t:0}var f=t.LinearScaleBase.extend({setDimensions:function(){var t=this,i=t.options,n=i.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var r=a.min([t.height,t.width]),o=a.valueOrDefault(n.fontSize,e.defaultFontSize);t.drawingArea=i.display?r/2-(o/2+n.backdropPaddingY):r/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;a.each(e.data.datasets,(function(r,o){if(e.isDatasetVisible(o)){var s=e.getDatasetMeta(o);a.each(r.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||s.data[a].hidden||(i=Math.min(r,i),n=Math.max(r,n))}))}})),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,i=a.valueOrDefault(t.fontSize,e.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*i)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,i,n,r=s(t),c=Math.min(t.height/2,t.width/2),d={r:t.width,l:0,t:t.height,b:0},h={};t.ctx.font=r.font,t._pointLabelSizes=[];var u,f,p,g=o(t);for(e=0;ed.r&&(d.r=b.end,h.r=m),y.startd.b&&(d.b=y.end,h.b=m)}t.setReductions(c,d,h)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,i){var n=this,a=e.l/Math.sin(i.l),r=Math.max(e.r-n.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-n.height,0)/Math.cos(i.b);a=u(a),r=u(r),o=u(o),s=u(s),n.drawingArea=Math.min(Math.round(t-(a+r)/2),Math.round(t-(o+s)/2)),n.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,i,n){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=i+a.drawingArea,l=a.height-n-a.drawingArea;a.xCenter=Math.round((o+r)/2+a.left),a.yCenter=Math.round((s+l)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/o(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this,n=i.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+i.xCenter,y:Math.round(Math.sin(n)*e)+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(){var t=this,i=t.options,n=i.gridLines,r=i.ticks,l=a.valueOrDefault;if(i.display){var u=t.ctx,f=this.getIndexAngle(0),p=l(r.fontSize,e.defaultFontSize),g=l(r.fontStyle,e.defaultFontStyle),m=l(r.fontFamily,e.defaultFontFamily),v=a.fontString(p,g,m);a.each(t.ticks,(function(i,s){if(s>0||r.reverse){var c=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(n.display&&0!==s&&function(t,e,i,n){var r=t.ctx;if(r.strokeStyle=a.valueAtIndexOrDefault(e.color,n-1),r.lineWidth=a.valueAtIndexOrDefault(e.lineWidth,n-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),r.closePath(),r.stroke();else{var s=o(t);if(0===s)return;r.beginPath();var l=t.getPointPosition(0,i);r.moveTo(l.x,l.y);for(var c=1;c=0;g--){if(l.display){var m=t.getPointPosition(g,f);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(m.x,m.y),i.stroke(),i.closePath()}if(u.display){var v=t.getPointPosition(g,f+5),b=n(u.fontColor,e.defaultFontColor);i.font=p.font,i.fillStyle=b;var y=t.getIndexAngle(g),x=a.toDegrees(y);i.textAlign=c(x),h(x,t._pointLabelSizes[g],v),d(i,t.pointLabels[g]||"",v,p.size)}}}(t)}}});t.scaleService.registerScaleType("radialLinear",f,i)}},{25:25,34:34,45:45}],57:[function(t,e,i){"use strict";var n=t(1);n="function"==typeof n?n:window.moment;var a=t(25),r=t(45),o=Number.MIN_SAFE_INTEGER||-9007199254740991,s=Number.MAX_SAFE_INTEGER||9007199254740991,l={millisecond:{major:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{major:!0,size:1e3,steps:[1,2,5,10,30]},minute:{major:!0,size:6e4,steps:[1,2,5,10,30]},hour:{major:!0,size:36e5,steps:[1,2,3,6,12]},day:{major:!0,size:864e5,steps:[1,2,5]},week:{major:!1,size:6048e5,steps:[1,2,3,4]},month:{major:!0,size:2628e6,steps:[1,2,3]},quarter:{major:!1,size:7884e6,steps:[1,2,3,4]},year:{major:!0,size:3154e7}},c=Object.keys(l);function d(t,e){return t-e}function h(t){var e,i,n,a={},r=[];for(e=0,i=t.length;e=0&&o<=s;){if(a=t[(n=o+s>>1)-1]||null,r=t[n],!a)return{lo:null,hi:r};if(r[e]i))return{lo:a,hi:r};s=n-1}}return{lo:r,hi:null}}(t,e,i),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(i-r[e])/s:0,c=(o[n]-r[n])*l;return r[n]+c}function f(t,e){var i=e.parser,a=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof a?n(t,a):(t instanceof n||(t=n(t)),t.isValid()?t:"function"==typeof a?a(t):t)}function p(t,e){if(r.isNullOrUndef(t))return null;var i=e.options.time,n=f(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function g(t,e,i,a,o,s){var c,d=s.time,h=r.valueOrDefault(d.stepSize,d.unitStepSize),u="week"===i&&d.isoWeekday,f=s.ticks.major.enabled,p=l[i],g=n(t),m=n(e),v=[];for(h||(h=function(t,e,i,n){var a,r,o,s=e-t,c=l[i],d=c.size,h=c.steps;if(!h)return Math.ceil(s/((n||1)*d));for(a=0,r=h.length;a=r&&i<=o&&x.push(i);return a.min=r,a.max=o,a._unit=v,a._majorUnit=b,a._minorFormat=f[v],a._majorFormat=f[b],a._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,r,o,s,l,c=[],d=[e];for(a=0,r=t.length;ae&&s1?e[1]:n,o=e[0],s=(u(t,"time",r,"pos")-u(t,"time",o,"pos"))/2),a.time.max||(r=e[e.length-1],o=e.length>1?e[e.length-2]:i,l=(u(t,"time",r,"pos")-u(t,"time",o,"pos"))/2)),{left:s,right:l}}(a._table,x,r,o,d),function(t,e){var i,a,r,o,s=[];for(i=0,a=t.length;i=0&&tt.length)&&(e=t.length);for(var i=0,n=new Array(e);i>16,o=i>>8&255,s=255&i;return"#"+(16777216+65536*(Math.round((n-r)*a)+r)+256*(Math.round((n-o)*a)+o)+(Math.round((n-s)*a)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===i(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;ee.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var n=i-t.length+1;n--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}}]),t}(),g=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return r(t,[{key:"setEasingFunctions",value:function(){var t;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":t="-";break;case"easein":t="<";break;case"easeout":t=">";break;case"easeinout":default:t="<>";break;case"swing":t=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1};break;case"bounce":t=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};break;case"elastic":t=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=t}}},{key:"animateLine",value:function(t,e,i,n){t.attr(e).animate(n).attr(i)}},{key:"animateMarker",value:function(t,e,i,n,a,r){e||(e=0),t.attr({r:e,width:e,height:e}).animate(n,a).attr({r:i,width:i.width,height:i.height}).afterAll((function(){r()}))}},{key:"animateCircle",value:function(t,e,i,n,a){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(n,a).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(t,e,i,n,a){t.attr(e).animate(n).attr(i).afterAll((function(){return a()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,n=t.j,a=t.fill,r=t.pathFrom,o=t.pathTo,s=t.speed,l=t.delay,c=this.w,d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(d=0),this.morphSVG(e,i,n,"line"!==c.config.chart.type||c.globals.comboCharts?a:"stroke",r,o,s,l*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){t.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,n,a,r,o,s){var l=this,c=this.w;a||(a=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var d=function(t){return"radar"===c.config.chart.type&&(o=1),"M 0 ".concat(c.globals.gridHeight)};(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=d()),(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),c.globals.shouldAnimate||(o=1),t.plot(a).animate(1,c.globals.easing,s).plot(a).animate(o,c.globals.easing,s).plot(r).afterAll((function(){p.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==n&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}(),m=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(t,e,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addNormalFilter",value:function(t,e){var i=this.w;i.config.chart.dropShadow.enabled&&!t.node.classList.contains("apexcharts-marker")&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addLightenFilter",value:function(t,e,i){var n=this,a=this.w,r=i.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var i=a.config.chart.dropShadow;(i.enabled?n.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"addDarkenFilter",value:function(t,e,i){var n=this,a=this.w,r=i.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var i=a.config.chart.dropShadow;(i.enabled?n.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"applyFilter",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(t,e);break;case"lighten":this.addLightenFilter(t,e,{intensity:n});break;case"darken":this.addDarkenFilter(t,e,{intensity:n})}}},{key:"addShadow",value:function(t,e,i){var n=i.blur,a=i.top,r=i.left,o=i.color,s=i.opacity,l=t.flood(Array.isArray(o)?o[e]:o,s).composite(t.sourceAlpha,"in").offset(r,a).gaussianBlur(n).merge(t.source);return t.blend(t.source,l)}},{key:"dropShadow",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.top,a=e.left,r=e.blur,o=e.color,s=e.opacity,l=e.noUserSpaceOnUse,c=this.w;return t.unfilter(!0),p.isIE()&&"radialBar"===c.config.chart.type||(o=Array.isArray(o)?o[i]:o,t.filter((function(t){var e;e=p.isSafari()||p.isFirefox()||p.isIE()?t.flood(o,s).composite(t.sourceAlpha,"in").offset(a,n).gaussianBlur(r):t.flood(o,s).composite(t.sourceAlpha,"in").offset(a,n).gaussianBlur(r).merge(t.source),t.blend(t.source,e)})),l||t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)),t}},{key:"setSelectionFilter",value:function(t,e,i){var n=this.w;if(void 0!==n.globals.selectedDataPoints[e]&&n.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var a=n.config.states.active.filter;"none"!==a&&this.applyFilter(t,e,a.type,a.value)}}},{key:"_scaleFilterSize",value:function(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),v=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"drawLine",value:function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:n,stroke:a,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:t,y:e,width:i>0?i:0,height:n>0?n:0,rx:a,ry:a,opacity:o,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:n,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,n=t.stroke,a=void 0===n?"#a8a8a8":n,r=t.strokeWidth,o=void 0===r?1:r,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,d=t.strokeOpacity,h=void 0===d?1:d,u=t.classes,f=t.strokeLinecap,p=void 0===f?null:f,g=t.strokeDashArray,m=void 0===g?0:g,v=this.w;return null===p&&(p=v.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(v.globals.gridHeight)),v.globals.dom.Paper.path(i).attr({fill:s,"fill-opacity":c,stroke:a,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":o,"stroke-dasharray":m,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=null;return null===i?n=["L",t,e].join(" "):"H"===i?n=["H",t].join(" "):"V"===i&&(n=["V",e].join(" ")),n}},{key:"curve",value:function(t,e,i,n,a,r){return["C",t,e,i,n,a,r].join(" ")}},{key:"quadraticCurve",value:function(t,e,i,n){return["Q",t,e,i,n].join(" ")}},{key:"arc",value:function(t,e,i,n,a,r,o){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,i,n,a,r,o].join(" ")}},{key:"renderPaths",value:function(t){var i,n=t.j,a=t.realIndex,r=t.pathFrom,o=t.pathTo,s=t.stroke,l=t.strokeWidth,c=t.strokeLinecap,d=t.fill,h=t.animationDelay,u=t.initialSpeed,f=t.dataChangeSpeed,p=t.className,v=t.shouldClipToGrid,b=void 0===v||v,y=t.bindEventsOnPaths,x=void 0===y||y,w=t.drawShadow,_=void 0===w||w,k=this.w,S=new m(this.ctx),C=new g(this.ctx),A=this.w.config.chart.animations.enabled,T=A&&this.w.config.chart.animations.dynamicAnimation.enabled,D=!!(A&&!k.globals.resized||T&&k.globals.dataChanged&&k.globals.shouldAnimate);D?i=r:(i=o,k.globals.animationEnded=!0);var I,P=k.config.stroke.dashArray;I=Array.isArray(P)?P[a]:k.config.stroke.dashArray;var M=this.drawPath({d:i,stroke:s,strokeWidth:l,fill:d,fillOpacity:1,classes:p,strokeLinecap:c,strokeDashArray:I});if(M.attr("index",a),b&&M.attr({"clip-path":"url(#gridRectMask".concat(k.globals.cuid,")")}),"none"!==k.config.states.normal.filter.type)S.getDefaultFilter(M,a);else if(k.config.chart.dropShadow.enabled&&_&&(!k.config.chart.dropShadow.enabledOnSeries||k.config.chart.dropShadow.enabledOnSeries&&-1!==k.config.chart.dropShadow.enabledOnSeries.indexOf(a))){var E=k.config.chart.dropShadow;S.dropShadow(M,E,a)}x&&(M.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,M)),M.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,M)),M.node.addEventListener("mousedown",this.pathMouseDown.bind(this,M))),M.attr({pathTo:o,pathFrom:r});var O={el:M,j:n,realIndex:a,pathFrom:r,pathTo:o,fill:d,strokeWidth:l,delay:h};return!A||k.globals.resized||k.globals.dataChanged?!k.globals.resized&&k.globals.dataChanged||C.showDelayedElements():C.animatePathsGradually(e(e({},O),{},{speed:u})),k.globals.dataChanged&&T&&D&&C.animatePathsGradually(e(e({},O),{},{speed:f})),M}},{key:"drawPattern",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:n,width:a+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:n,width:a+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:n,width:a}):"squares"===t?r.rect(e,i).fill("none").stroke({color:n,width:a}):"circles"===t&&r.circle(e).fill("none").stroke({color:n,width:a})}));return r}},{key:"drawGradient",value:function(t,e,i,n,a){var r,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;e.length<9&&0===e.indexOf("#")&&(e=p.hexToRgba(e,n)),i.length<9&&0===i.indexOf("#")&&(i=p.hexToRgba(i,a));var h=0,u=1,f=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,u=void 0!==s[1]?s[1]/100:1,f=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var m=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"polarArea"!==d.config.chart.type&&"bubble"!==d.config.chart.type);if(r=null===l||0===l.length?d.globals.dom.Paper.gradient(m?"radial":"linear",(function(t){t.at(h,e,n),t.at(u,i,a),t.at(f,i,a),null!==g&&t.at(g,e,n)})):d.globals.dom.Paper.gradient(m?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.at(e.offset/100,e.color,e.opacity)}))})),m){var v=d.globals.gridWidth/2,b=d.globals.gridHeight/2;"bubble"!==d.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:v,cy:b,r:o}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,n=t.fontSize,a=t.fontFamily,r=this.getTextRects(e,n,a),o=r.width/e.length,s=Math.floor(i/o);return i-1){var s=i.globals.selectedDataPoints[a].indexOf(r);i.globals.selectedDataPoints[a].splice(s,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,d=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),n.getDefaultFilter(t,a)}))};d(l),d(c)}t.node.setAttribute("selected","true"),o="true",void 0===i.globals.selectedDataPoints[a]&&(i.globals.selectedDataPoints[a]=[]),i.globals.selectedDataPoints[a].push(r)}if("true"===o){var h=i.config.states.active.filter;if("none"!==h)n.applyFilter(t,a,h.type,h.value);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;n.applyFilter(t,a,u.type,u.value)}}else"none"!==i.config.states.active.filter.type&&("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice?n.getDefaultFilter(t,a):(u=i.config.states.hover.filter,n.applyFilter(t,a,u.type,u.value)));"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:a,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:a,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,n){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,o=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});n&&o.attr("transform",n),r.globals.dom.Paper.add(o);var s=o.bbox();return a||(s=o.node.getBoundingClientRect()),o.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var n=e.length-3;n>0;n-=3)if(t.getSubStringLength(0,n)<=i/1.1)return void(t.textContent=e.substring(0,n)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),b=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"getStackedSeriesTotals",value:function(){var t=this.w,e=[];if(0===t.globals.series.length)return e;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"isSeriesNull",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(e+=t.config.markers.hover.sizeOffset+1),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var n=0;nt&&i.globals.seriesX[a][o]0&&(e=!0),{comboBarCount:i,comboCharts:e}}},{key:"extendArrayProps",value:function(t,e,i){return e.yaxis&&(e=t.extendYAxis(e,i)),e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),e.annotations.xaxis&&(e=t.extendXAxisAnnotations(e)),e.annotations.points&&(e=t.extendPointAnnotations(e))),e}}]),t}(),y=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e}return r(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var n=null!==e?e:0,a=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(n,"']"));if(null!==a){var r=a.getBoundingClientRect();a.setAttribute("x",parseFloat(a.getAttribute("x"))-r.height+4),"top"===t.label.position?a.setAttribute("y",parseFloat(a.getAttribute("y"))+r.width):a.setAttribute("y",parseFloat(a.getAttribute("y"))-r.width);var o=this.annoCtx.graphics.rotateAroundCenter(a),s=o.x,l=o.y;a.setAttribute("transform","rotate(-90 ".concat(s," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||void 0===e.label.text||void 0!==e.label.text&&!String(e.label.text).trim())return null;var n=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),a=t.getBoundingClientRect(),r=e.label.style.padding.left,o=e.label.style.padding.right,s=e.label.style.padding.top,l=e.label.style.padding.bottom;"vertical"===e.label.orientation&&(s=e.label.style.padding.left,l=e.label.style.padding.right,r=e.label.style.padding.top,o=e.label.style.padding.bottom);var c=a.left-n.left-r,d=a.top-n.top-s,h=this.annoCtx.graphics.drawRect(c-i.globals.barPadForNumericAxis,d,a.width+r+o,a.height+s+l,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&h.node.classList.add(e.id),h}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,n,a){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(a,"-annotations .apexcharts-").concat(a,"-annotation-label[rel='").concat(n,"']"));if(r){var o=r.parentNode,s=t.addBackgroundToAnno(r,i);s&&(o.insertBefore(s.node,r),i.label.mouseEnter&&s.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&s.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)))}};e.config.annotations.xaxis.map((function(t,e){i(t,e,"xaxis")})),e.config.annotations.yaxis.map((function(t,e){i(t,e,"yaxis")})),e.config.annotations.points.map((function(t,e){i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,n="y1"===t?e.y:e.y2,a=this.w;if(this.annoCtx.invertAxis){var r=a.globals.labels.indexOf(n);a.config.xaxis.convertedCatToNumeric&&(r=a.globals.categoryLabels.indexOf(n));var o=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(r+1)+")");o&&(i=parseFloat(o.getAttribute("y")))}else{var s;s=a.config.yaxis[e.yAxisIndex].logarithmic?(n=new b(this.annoCtx.ctx).getLogVal(n,e.yAxisIndex))/a.globals.yLogRatio[e.yAxisIndex]:(n-a.globals.minYArr[e.yAxisIndex])/(a.globals.yRange[e.yAxisIndex]/a.globals.gridHeight),i=a.globals.gridHeight-s,a.config.yaxis[e.yAxisIndex]&&a.config.yaxis[e.yAxisIndex].reversed&&(i=s)}return i}},{key:"getX1X2",value:function(t,e){var i=this.w,n=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,a=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,r=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=(e.x-n)/(r/i.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(o=(a-e.x)/(r/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(o=this.getStringX(e.x));var s=(e.x2-n)/(r/i.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(s=(a-e.x2)/(r/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(s=this.getStringX(e.x2)),"x1"===t?o:s}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var n=e.globals.labels.indexOf(t),a=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(n+1)+")");return a&&(i=parseFloat(a.getAttribute("x"))),i}}]),t}(),x=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new y(this.annoCtx)}return r(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var n,a=this.w,r=this.helpers.getX1X2("x1",t),o=t.label.text,s=t.strokeDashArray;if(p.isNumber(r)){if(null===t.x2||void 0===t.x2){var l=this.annoCtx.graphics.drawLine(r+t.offsetX,0+t.offsetY,r+t.offsetX,a.globals.gridHeight+t.offsetY,t.borderColor,s,t.borderWidth);e.appendChild(l.node),t.id&&l.node.classList.add(t.id)}else{if((n=this.helpers.getX1X2("x2",t))o){var c=o;o=n,n=c}var d=this.annoCtx.graphics.drawRect(0+t.offsetX,n+t.offsetY,this._getYAxisAnnotationWidth(t),o-n,0,t.fillColor,t.opacity,1,t.borderColor,r);d.node.classList.add("apexcharts-annotation-rect"),d.attr("clip-path","url(#gridRectMask".concat(a.globals.cuid,")")),e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}var h="right"===t.label.position?a.globals.gridWidth:0,u=this.annoCtx.graphics.drawText({x:h+t.label.offsetX,y:(null!=n?n:o)+t.label.offsetY-3,text:s,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});u.attr({rel:i}),e.appendChild(u.node)}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.map((function(e,n){t.addYaxisAnnotation(e,i.node,n)})),i}}]),t}(),_=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new y(this.annoCtx)}return r(t,[{key:"addPointAnnotation",value:function(t,e,i){this.w;var n=this.helpers.getX1X2("x1",t),a=this.helpers.getY1Y2("y1",t);if(p.isNumber(n)){var r={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},o=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,r);e.appendChild(o.node);var s=t.label.text?t.label.text:"",l=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:s,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(l.attr({rel:i}),e.appendChild(l.node),t.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});c.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),c.node.innerHTML=t.customSVG.SVG,e.appendChild(c.node)}if(t.image.path){var d=t.image.width?t.image.width:20,h=t.image.height?t.image.height:20;o=this.annoCtx.addImage({x:n+t.image.offsetX-d/2,y:a+t.image.offsetY-h/2,width:d,height:h,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&o.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&o.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t))}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,n){t.addPointAnnotation(e,i.node,n)})),i}}]),t}(),k={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},S=function(){function t(){n(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:0,mouseEnter:void 0,mouseLeave:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return r(t,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[k],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(t){return new Date(t).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),C=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.graphics=new v(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new y(this),this.xAxisAnnotations=new x(this),this.yAxisAnnotations=new w(this),this.pointsAnnotations=new _(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return r(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),n=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,r=[e,i,n],o=[i.node,e.node,n.node],s=0;s<3;s++)t.globals.dom.elGraphical.add(r[s]),!a||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&o[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:o[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,n=t.y,a=t.text,r=t.textAnchor,o=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,d=t.cssClass,h=t.backgroundColor,u=t.borderWidth,f=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,m=t.appendTo,v=void 0===m?".apexcharts-annotations":m,b=t.paddingLeft,y=void 0===b?4:b,x=t.paddingRight,w=void 0===x?4:x,_=t.paddingBottom,k=void 0===_?2:_,S=t.paddingTop,C=void 0===S?2:S,A=this.w,T=this.graphics.drawText({x:i,y:n,text:a,textAnchor:r||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||A.config.chart.fontFamily,foreColor:o||A.config.chart.foreColor,cssClass:d}),D=A.globals.dom.baseEl.querySelector(v);D&&D.appendChild(T.node);var I=T.bbox();if(a){var P=this.graphics.drawRect(I.x-y,I.y-C,I.width+y+w,I.height+k+C,p,h||"transparent",1,u,g,f);D.insertBefore(P.node,T.node)}}},{key:"addImage",value:function(t,e){var i=this.w,n=t.path,a=t.x,r=void 0===a?0:a,o=t.y,s=void 0===o?0:o,l=t.width,c=void 0===l?20:l,d=t.height,h=void 0===d?20:d,u=t.appendTo,f=void 0===u?".apexcharts-annotations":u,p=i.globals.dom.Paper.image(n);p.size(c,h).move(r,s);var g=i.globals.dom.baseEl.querySelector(f);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,n=t.context,a=t.type,r=t.contextMethod,o=n,s=o.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(a,"-annotations")),c=l.childNodes.length+1,d=new S,h=Object.assign({},"xaxis"===a?d.xAxisAnnotation:"yaxis"===a?d.yAxisAnnotation:d.pointAnnotation),u=p.extend(h,e);switch(a){case"xaxis":this.addXaxisAnnotation(u,l,c);break;case"yaxis":this.addYaxisAnnotation(u,l,c);break;case"point":this.addPointAnnotation(u,l,c)}var f=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(a,"-annotations .apexcharts-").concat(a,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(f,u);return g&&l.insertBefore(g.node,f),i&&s.globals.memory.methodsToExec.push({context:o,id:u.id?u.id:p.randomId(),method:r,label:"addAnnotation",params:e}),n}},{key:"clearAnnotations",value:function(t){var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");e.globals.memory.methodsToExec.map((function(t,i){"addText"!==t.label&&"addAnnotation"!==t.label||e.globals.memory.methodsToExec.splice(i,1)})),i=p.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,n=i.globals.dom.baseEl.querySelectorAll(".".concat(e));n&&(i.globals.memory.methodsToExec.map((function(t,n){t.id===e&&i.globals.memory.methodsToExec.splice(n,1)})),Array.prototype.forEach.call(n,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),A=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return r(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,n=parseInt(e.globals.gridWidth,10),a=parseInt(e.globals.gridHeight,10),r=n>a?n:a,o=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(s=i.fill.image.width+1,l=i.fill.image.height):(s=r+1,l=r):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");v.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var d=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",o),v.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),d.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w;return("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||"heatmap"===e.config.chart.type||"treemap"===e.config.chart.type?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var i,n,a,r=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var o=this.getFillColors()[this.seriesIndex];void 0!==e.globals.seriesColors[this.seriesIndex]&&(o=e.globals.seriesColors[this.seriesIndex]),"function"==typeof o&&(o=o({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:e}));var s=this.getFillType(this.seriesIndex),l=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;t.color&&(o=t.color);var c=o;if(-1===o.indexOf("rgb")?o.length<9&&(c=p.hexToRgba(o,l)):o.indexOf("rgba")>-1&&(l=p.getOpacityFromRGBA(o)),t.opacity&&(l=t.opacity),"pattern"===s&&(n=this.handlePatternFill(n,o,l,c)),"gradient"===s&&(a=this.handleGradientFill(o,l,this.seriesIndex)),"image"===s){var d=r.fill.image.src,h=t.patternID?t.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(d)?t.seriesNumber-1&&(d=p.getOpacityFromRGBA(c));var h=void 0===a.fill.gradient.opacityTo?e:Array.isArray(a.fill.gradient.opacityTo)?a.fill.gradient.opacityTo[i]:a.fill.gradient.opacityTo;if(void 0===a.fill.gradient.gradientToColors||0===a.fill.gradient.gradientToColors.length)n="dark"===a.fill.gradient.shade?s.shadeColor(-1*parseFloat(a.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?p.rgb2hex(t):t):s.shadeColor(parseFloat(a.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?p.rgb2hex(t):t);else if(a.fill.gradient.gradientToColors[r.seriesNumber]){var u=a.fill.gradient.gradientToColors[r.seriesNumber];n=u,u.indexOf("rgba")>-1&&(h=p.getOpacityFromRGBA(u))}else n=t;if(a.fill.gradient.inverseColors){var f=c;c=n,n=f}return c.indexOf("rgb")>-1&&(c=p.rgb2hex(c)),n.indexOf("rgb")>-1&&(n=p.rgb2hex(n)),o.drawGradient(l,c,n,d,h,r.size,a.fill.gradient.stops,a.fill.gradient.colorStops,i)}}]),t}(),T=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],o=this.w,s=e,l=t,c=null,d=new v(this.ctx),h=o.config.markers.discrete&&o.config.markers.discrete.length;if((o.globals.markers.size[e]>0||r||h)&&(c=d.group({class:r||h?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),Array.isArray(l.x))for(var u=0;u0:o.config.markers.size>0)||r||h){p.isNumber(l.y[u])?g+=" w".concat(p.randomId()):g="apexcharts-nullpoint";var b=this.getMarkerConfig({cssClass:g,seriesIndex:e,dataPointIndex:f});o.config.series[s].data[f]&&(o.config.series[s].data[f].fillColor&&(b.pointFillColor=o.config.series[s].data[f].fillColor),o.config.series[s].data[f].strokeColor&&(b.pointStrokeColor=o.config.series[s].data[f].strokeColor)),n&&(b.pSize=n),(a=d.drawMarker(l.x[u],l.y[u],b)).attr("rel",f),a.attr("j",f),a.attr("index",e),a.node.setAttribute("default-marker-size",b.pSize),new m(this.ctx).setSelectionFilter(a,e,f),this.addEvents(a),c&&c.add(a)}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([l.x[u],l.y[u]])}return c}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,n=t.dataPointIndex,a=void 0===n?null:n,r=t.finishRadius,o=void 0===r?null:r,s=this.w,l=this.getMarkerStyle(i),c=s.globals.markers.size[i],d=s.config.markers;return null!==a&&d.discrete.length&&d.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===a&&(l.pointStrokeColor=t.strokeColor,l.pointFillColor=t.fillColor,c=t.size,l.pointShape=t.shape)})),{pSize:null===o?c:o,pRadius:d.radius,width:Array.isArray(d.width)?d.width[i]:d.width,height:Array.isArray(d.height)?d.height[i]:d.height,pointStrokeWidth:Array.isArray(d.strokeWidth)?d.strokeWidth[i]:d.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(d.shape)?d.shape[i]:d.shape),class:e,pointStrokeOpacity:Array.isArray(d.strokeOpacity)?d.strokeOpacity[i]:d.strokeOpacity,pointStrokeDashArray:Array.isArray(d.strokeDashArray)?d.strokeDashArray[i]:d.strokeDashArray,pointFillOpacity:Array.isArray(d.fillOpacity)?d.fillOpacity[i]:d.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new v(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,n=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(n)?n[t]:n,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),D=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return r(t,[{key:"draw",value:function(t,e,i){var n=this.w,a=new v(this.ctx),r=i.realIndex,o=i.pointsPos,s=i.zRatio,l=i.elParent,c=a.group({class:"apexcharts-series-markers apexcharts-series-".concat(n.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(o.x))for(var d=0;dg.maxBubbleRadius&&(p=g.maxBubbleRadius)}n.config.chart.animations.enabled||(f=p);var m=o.x[d],b=o.y[d];if(f=f||0,null!==b&&void 0!==n.globals.series[r][h]||(u=!1),u){var y=this.drawPoint(m,b,f,p,r,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,i,n,a,r,o){var s=this.w,l=a,c=new g(this.ctx),d=new m(this.ctx),h=new A(this.ctx),u=new T(this.ctx),f=new v(this.ctx),p=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:r,finishRadius:"bubble"===s.config.chart.type||s.globals.comboCharts&&s.config.series[a]&&"bubble"===s.config.series[a].type?n:null});n=p.pSize;var b,y=h.fillPath({seriesNumber:a,dataPointIndex:r,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:s.globals.series[a][o]});if("circle"===p.shape?b=f.drawCircle(i):"square"!==p.shape&&"rect"!==p.shape||(b=f.drawRect(0,0,p.width-p.pointStrokeWidth/2,p.height-p.pointStrokeWidth/2,p.pRadius)),s.config.series[l].data[r]&&s.config.series[l].data[r].fillColor&&(y=s.config.series[l].data[r].fillColor),b.attr({x:t-p.width/2-p.pointStrokeWidth/2,y:e-p.height/2-p.pointStrokeWidth/2,cx:t,cy:e,fill:y,"fill-opacity":p.pointFillOpacity,stroke:p.pointStrokeColor,r:n,"stroke-width":p.pointStrokeWidth,"stroke-dasharray":p.pointStrokeDashArray,"stroke-opacity":p.pointStrokeOpacity}),s.config.chart.dropShadow.enabled){var x=s.config.chart.dropShadow;d.dropShadow(b,x,a)}if(!this.initialAnim||s.globals.dataChanged||s.globals.resized)s.globals.animationEnded=!0;else{var w=s.config.chart.animations.speed;c.animateMarker(b,0,"circle"===p.shape?n:{width:p.width,height:p.height},w,s.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(b)}),100)}))}if(s.globals.dataChanged&&"circle"===p.shape)if(this.dynamicAnim){var _,k,S,C,D=s.config.chart.animations.dynamicAnimation.speed;null!=(C=s.globals.previousPaths[a]&&s.globals.previousPaths[a][o])&&(_=C.x,k=C.y,S=void 0!==C.r?C.r:n);for(var I=0;Is.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[n]&&(s.globals.dataLabelsRects[n]=[]),s.globals.dataLabelsRects[n].push({x:t,y:e,width:d,height:h});var u=s.globals.dataLabelsRects[n].length-2,f=void 0!==s.globals.lastDrawnDataLabelsIndexes[n]?s.globals.lastDrawnDataLabelsIndexes[n][s.globals.lastDrawnDataLabelsIndexes[n].length-1]:0;if(void 0!==s.globals.dataLabelsRects[n][u]){var p=s.globals.dataLabelsRects[n][f];(t>p.x+p.width+2||e>p.y+p.height+2||t+d4&&void 0!==arguments[4]?arguments[4]:2,r=this.w,o=new v(this.ctx),s=r.config.dataLabels,l=0,c=0,d=i,h=null;if(!s.enabled||!Array.isArray(t.x))return h;h=o.group({class:"apexcharts-data-labels"});for(var u=0;ue.globals.gridWidth+g.textRects.width+10)&&(s="");var b=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(b=e.globals.dataLabels.style.colors[o]),"function"==typeof b&&(b=b({series:e.globals.series,seriesIndex:r,dataPointIndex:o,w:e})),u&&(b=u);var y=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(y=0,x=0),g.drawnextLabel){var w=i.drawText({width:100,height:parseInt(h.style.fontSize,10),x:n+y,y:a+x,foreColor:b,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"});if(w.attr({class:"apexcharts-datalabel",cx:n,cy:a}),h.dropShadow.enabled){var _=h.dropShadow;new m(this.ctx).dropShadow(w,_)}d.add(w),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(o)}}}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,n=i.config.dataLabels.background,a=n.padding,r=n.padding/2,o=e.width,s=e.height,l=new v(this.ctx).drawRect(e.x-a,e.y-r/2,o+2*a,s+r,n.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,n.opacity,n.borderWidth,n.borderColor);return n.dropShadow.enabled&&new m(this.ctx).dropShadow(l,n.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;ii.globals.gridHeight&&(d=i.globals.gridHeight-u)),{bcx:o,bcy:r,dataLabelsX:e,dataLabelsY:d}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,n=t.i,a=t.j,r=t.bcy,o=t.barHeight,s=t.barWidth,l=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,h=t.barDataLabelsConfig,u=t.offX,f=t.offY,p=e.globals.gridHeight/e.globals.dataPoints;s=Math.abs(s);var g=r-(this.barCtx.isRangeBar?0:p)+o/2+l.height/2+f-3,m=this.barCtx.series[n][a]<0,v=i;switch(this.barCtx.isReversed&&(v=i+s-(m?2*s:0),i=e.globals.gridWidth-s),h.position){case"center":c=m?v+s/2-u:Math.max(l.width/2,v-s/2)+u;break;case"bottom":c=m?v+s-d-Math.round(l.width/2)-u:v-s+d+Math.round(l.width/2)+u;break;case"top":c=m?v-d+Math.round(l.width/2)-u:v-d-Math.round(l.width/2)+u}return e.config.chart.stacked||(c<0?c=c+l.width+d:c+l.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-l.width-d)),{bcx:i,bcy:r,dataLabelsX:c,dataLabelsY:g}}},{key:"drawCalculatedDataLabels",value:function(t){var i=t.x,n=t.y,a=t.val,r=t.i,o=t.j,s=t.textRects,l=t.barHeight,c=t.barWidth,d=t.dataLabelsConfig,h=this.w,u="rotate(0)";"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(i,", ").concat(n,")"));var f=new I(this.barCtx.ctx),p=new v(this.barCtx.ctx),g=d.formatter,m=null,b=h.globals.collapsedSeriesIndices.indexOf(r)>-1;if(d.enabled&&!b){m=p.group({class:"apexcharts-data-labels",transform:u});var y="";void 0!==a&&(y=g(a,{seriesIndex:r,dataPointIndex:o,w:h}));var x=h.globals.series[r][o]<0,w=h.config.plotOptions.bar.dataLabels.position;"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&("top"===w&&(d.textAnchor=x?"end":"start"),"center"===w&&(d.textAnchor="middle"),"bottom"===w&&(d.textAnchor=x?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&cMath.abs(c)&&(y=""):s.height/1.6>Math.abs(l)&&(y=""));var _=e({},d);this.barCtx.isHorizontal&&a<0&&("start"===d.textAnchor?_.textAnchor="end":"end"===d.textAnchor&&(_.textAnchor="start")),f.plotDataLabelsText({x:i,y:n,text:y,i:r,j:o,parent:m,dataLabelsConfig:_,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}}]),t}(),M=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return r(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(t){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(p.escapeString(t),"']"))}},{key:"isSeriesHidden",value:function(t){var e=this.getSeriesByName(t),i=parseInt(e.getAttribute("data:realIndex"),10);return{isHidden:e.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(t,e){var i=this.w;function n(i){for(var n=0;n0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.w,a=p.clone(n.globals.initialSeries);n.globals.previousPaths=[],i?(n.globals.collapsedSeries=[],n.globals.ancillaryCollapsedSeries=[],n.globals.collapsedSeriesIndices=[],n.globals.ancillaryCollapsedSeriesIndices=[]):a=this.emptyCollapsedSeries(a),n.config.series=a,t&&(e&&(n.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(a,n.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"toggleSeriesOnHover",value:function(t,e){var i=this.w;e||(e=t.target);var n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===t.type){var a=parseInt(e.getAttribute("rel"),10)-1,r=null,o=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),o=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"))):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']")):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var s=0;s=t.from&&n<=t.to&&a[e].classList.remove(i.legendInactiveClass)}}(n.config.plotOptions.heatmap.colorScale.ranges[o])}else"mouseout"===t.type&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",i=this.w,n=0;if(i.config.series.length>1)for(var a=i.config.series.map((function(e,n){var a=!1;return t&&(a="bar"===i.config.series[n].type||"column"===i.config.series[n].type),e.data&&e.data.length>0&&!a?n:-1})),r="asc"===e?0:a.length-1;"asc"===e?r=0;"asc"===e?r++:r--)if(-1!==a[r]){n=a[r];break}return n}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,n){for(var a=e[i].childNodes,r={type:n,paths:[],realIndex:e[i].getAttribute("data:realIndex")},o=0;o0)for(var n=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),n=[],a=function(t){var e=function(e){return i[t].getAttribute(e)},a={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};n.push({rect:a,color:i[t].getAttribute("color")})},r=0;r0)for(var n=0;n0?t:[]}))}}]),t}(),E=function(){function t(e){n(this,t),this.w=e.w,this.barCtx=e}return r(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var n=0;ne.globals.minX&&e.globals.seriesX[i][n]0&&(n=l.globals.minXDiff/h),(r=n/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}o=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),t=l.globals.padHorizontal+(n-r*this.barCtx.seriesLen)/2}return{x:t,y:e,yDivision:i,xDivision:n,barHeight:a,barWidth:r,zeroH:o,zeroW:s}}},{key:"getPathFillColor",value:function(t,e,i,n){var a=this.w,r=new A(this.barCtx.ctx),o=null,s=this.barCtx.barOptions.distributed?i:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(n){t[e][i]>=n.from&&t[e][i]<=n.to&&(o=n.color)})),a.config.series[e].data[i]&&a.config.series[e].data[i].fillColor&&(o=a.config.series[e].data[i].fillColor),r.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:n,dataPointIndex:i,color:o,value:t[e][i]})}},{key:"getStrokeWidth",value:function(t,e,i){var n=0,a=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,a.config.stroke.show&&(this.barCtx.isNullValue||(n=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),n}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,n=t.x1,a=t.x2,r=t.y1,o=t.y2,s=t.elSeries,l=this.w,c=new v(this.barCtx.ctx),d=new M(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],u=c.drawRect(void 0!==n?n:0,void 0!==r?r:0,void 0!==a?a:l.globals.gridWidth,void 0!==o?o:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e=t.barWidth,i=t.barXPosition,n=t.yRatio,a=t.y1,r=t.y2,o=t.strokeWidth,s=t.series,l=t.realIndex,c=t.i,d=t.j,h=t.w,u=new v(this.barCtx.ctx);(o=Array.isArray(o)?o[l]:o)||(o=0);var f={barWidth:e,strokeWidth:o,yRatio:n,barXPosition:i,y1:a,y2:r},p=this.getRoundedBars(h,f,s,c,d),g=i,m=i+e,b=u.move(g,a),y=u.move(g,a),x=u.line(m-o,a);return h.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(l,d,!1)),b=b+u.line(g,p.y2)+p.pathWithRadius+u.line(m-o,p.y2)+x+x+"z",y=y+u.line(g,a)+x+x+x+x+x+u.line(g,a),h.config.chart.stacked&&(this.barCtx.yArrj.push(p.y2),this.barCtx.yArrjF.push(Math.abs(a-p.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[c][d])),{pathTo:b,pathFrom:y}}},{key:"getBarpaths",value:function(t){var e=t.barYPosition,i=t.barHeight,n=t.x1,a=t.x2,r=t.strokeWidth,o=t.series,s=t.realIndex,l=t.i,c=t.j,d=t.w,h=new v(this.barCtx.ctx);(r=Array.isArray(r)?r[s]:r)||(r=0);var u={barHeight:i,strokeWidth:r,barYPosition:e,x2:a,x1:n},f=this.getRoundedBars(d,u,o,l,c),p=h.move(n,e),g=h.move(n,e);d.globals.previousPaths.length>0&&(g=this.barCtx.getPreviousPath(s,c,!1));var m=e,b=e+i,y=h.line(n,b-r);return p=p+h.line(f.x2,m)+f.pathWithRadius+h.line(f.x2,b-r)+y+y+"z",g=g+h.line(n,m)+y+y+y+y+y+h.line(n,m),d.config.chart.stacked&&(this.barCtx.xArrj.push(f.x2),this.barCtx.xArrjF.push(Math.abs(n-f.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[l][c])),{pathTo:p,pathFrom:g}}},{key:"getRoundedBars",value:function(t,e,i,n,a){var r=new v(this.barCtx.ctx),o=0,s=t.config.plotOptions.bar.borderRadius,l=Array.isArray(s);if(o=l?s[n>s.length-1?s.length-1:n]:s,t.config.chart.stacked&&i.length>1&&n!==this.barCtx.radiusOnSeriesNumber&&!l&&(o=0),this.barCtx.isHorizontal){var c="",d=e.x2;if(Math.abs(e.x1-e.x2)0:i[n][a]<0;h&&(o*=-1),d-=o,c=r.quadraticCurve(d+o,e.barYPosition,d+o,e.barYPosition+(h?-1*o:o))+r.line(d+o,e.barYPosition+e.barHeight-e.strokeWidth-(h?-1*o:o))+r.quadraticCurve(d+o,e.barYPosition+e.barHeight-e.strokeWidth,d,e.barYPosition+e.barHeight-e.strokeWidth)}return{pathWithRadius:c,x2:d}}var u="",f=e.y2;if(Math.abs(e.y1-e.y2)=0;o--)this.barCtx.zeroSerieses.indexOf(o)>-1&&o===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var s=e.length-1;s>=0;s--)i.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e-t/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),i}},{key:"getGoalValues",value:function(t,e,i,n,a){var r=this,s=this.w,l=[];return s.globals.seriesGoals[n]&&s.globals.seriesGoals[n][a]&&Array.isArray(s.globals.seriesGoals[n][a])&&s.globals.seriesGoals[n][a].forEach((function(n){var a;l.push((o(a={},t,"x"===t?r.getXForValue(n.value,e,!1):r.getYForValue(n.value,i,!1)),o(a,"attrs",n),a))})),l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,n=t.goalX,a=t.goalY,r=t.barWidth,o=t.barHeight,s=new v(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"}),c=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach((function(t){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:o/2,n=i+e+o/2;c=s.drawLine(t.x,n-2*e,t.x,n,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)})):Array.isArray(a)&&a.forEach((function(t){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,n=e+i+r/2;c=s.drawLine(n-2*i,t.y,n,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)})),l}}]),t}(),O=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.barOptions=a.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=a.config.stroke.width,this.isNullValue=!1,this.isRangeBar=a.globals.seriesRangeBar.length&&this.isHorizontal,this.xyRatios=i,null!==this.xyRatios&&(this.xRatio=i.xRatio,this.initialXRatio=i.initialXRatio,this.yRatio=i.yRatio,this.invertedXRatio=i.invertedXRatio,this.invertedYRatio=i.invertedYRatio,this.baseLineY=i.baseLineY,this.baseLineInvertedY=i.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new E(this)}return r(t,[{key:"draw",value:function(t,i){var n=this.w,a=new v(this.ctx),r=new b(this.ctx,n);t=r.getLogSeries(t),this.series=t,this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var o=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var s=0,l=0;s0&&(this.visibleI=this.visibleI+1);var _=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=x),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;var S=this.barHelpers.initialPositions();g=S.y,_=S.barHeight,d=S.yDivision,u=S.zeroW,f=S.x,k=S.barWidth,c=S.xDivision,h=S.zeroH,this.horizontal||y.push(f+k/2);for(var C=a.group({class:"apexcharts-datalabels","data:realIndex":x}),A=a.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),T=0;T0&&y.push(f+k/2),m.push(g);var E=this.barHelpers.getPathFillColor(t,s,T,x);this.renderSeries({realIndex:x,pathFill:E,j:T,i:s,pathFrom:I.pathFrom,pathTo:I.pathTo,strokeWidth:D,elSeries:w,x:f,y:g,series:t,barHeight:_,barWidth:k,elDataLabelsWrap:C,elGoalsMarkers:A,visibleSeries:this.visibleI,type:"bar"})}n.globals.seriesXvalues[x]=y,n.globals.seriesYvalues[x]=m,o.add(w)}return o}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,n=t.lineFill,a=t.j,r=t.i,o=t.pathFrom,s=t.pathTo,l=t.strokeWidth,c=t.elSeries,d=t.x,h=t.y,u=t.y1,f=t.y2,p=t.series,g=t.barHeight,b=t.barWidth,y=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,_=t.visibleSeries,k=t.type,S=this.w,C=new v(this.ctx);n||(n=this.barOptions.distributed?S.globals.stroke.colors[a]:S.globals.stroke.colors[e]),S.config.series[r].data[a]&&S.config.series[r].data[a].strokeColor&&(n=S.config.series[r].data[a].strokeColor),this.isNullValue&&(i="none");var A=a/S.config.chart.animations.animateGradually.delay*(S.config.chart.animations.speed/S.globals.dataPoints)/2.4,T=C.renderPaths({i:r,j:a,realIndex:e,pathFrom:o,pathTo:s,stroke:n,strokeWidth:l,strokeLineCap:S.config.stroke.lineCap,fill:i,animationDelay:A,initialSpeed:S.config.chart.animations.speed,dataChangeSpeed:S.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(k,"-area")});T.attr("clip-path","url(#gridRectMask".concat(S.globals.cuid,")"));var D=S.config.forecastDataPoints;D.count>0&&a>=S.globals.dataPoints-D.count&&(T.node.setAttribute("stroke-dasharray",D.dashArray),T.node.setAttribute("stroke-width",D.strokeWidth),T.node.setAttribute("fill-opacity",D.fillOpacity)),void 0!==u&&void 0!==f&&(T.attr("data-range-y1",u),T.attr("data-range-y2",f)),new m(this.ctx).setSelectionFilter(T,e,a),c.add(T);var I=new P(this).handleBarDataLabels({x:d,y:h,y1:u,y2:f,i:r,j:a,series:p,realIndex:e,barHeight:g,barWidth:b,barYPosition:y,renderedPath:T,visibleSeries:_});return null!==I&&x.add(I),c.add(x),w&&c.add(w),c}},{key:"drawBarPaths",value:function(t){var e=t.indexes,i=t.barHeight,n=t.strokeWidth,a=t.zeroW,r=t.x,o=t.y,s=t.yDivision,l=t.elSeries,c=this.w,d=e.i,h=e.j;c.globals.isXNumeric&&(o=(c.globals.seriesX[d][h]-c.globals.minX)/this.invertedXRatio-i);var u=o+i*this.visibleI;r=this.barHelpers.getXForValue(this.series[d][h],a);var f=this.barHelpers.getBarpaths({barYPosition:u,barHeight:i,x1:a,x2:r,strokeWidth:n,series:this.series,realIndex:e.realIndex,i:d,j:h,w:c});return c.globals.isXNumeric||(o+=s),this.barHelpers.barBackground({j:h,i:d,y1:u-i*this.visibleI,y2:i*this.seriesLen,elSeries:l}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x:r,y:o,goalX:this.barHelpers.getGoalValues("x",a,null,d,h),barYPosition:u}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,n=t.y,a=t.xDivision,r=t.barWidth,o=t.zeroH,s=t.strokeWidth,l=t.elSeries,c=this.w,d=e.realIndex,h=e.i,u=e.j,f=e.bc;if(c.globals.isXNumeric){var p=d;c.globals.seriesX[d].length||(p=c.globals.maxValsInArrayIndex),i=(c.globals.seriesX[p][u]-c.globals.minX)/this.xRatio-r*this.seriesLen/2}var g=i+r*this.visibleI;n=this.barHelpers.getYForValue(this.series[h][u],o);var m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:r,y1:o,y2:n,strokeWidth:s,series:this.series,realIndex:e.realIndex,i:h,j:u,w:c});return c.globals.isXNumeric||(i+=a),this.barHelpers.barBackground({bc:f,j:u,i:h,x1:g-s/2-r*this.visibleI,x2:r*this.seriesLen+s/2,elSeries:l}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,o,h,u),barXPosition:g}}},{key:"getPreviousPath",value:function(t,e){for(var i,n=this.w,a=0;a0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==n.globals.previousPaths[a].paths[e]&&(i=n.globals.previousPaths[a].paths[e].d)}return i}}]),t}(),L=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return r(t,[{key:"isValidDate",value:function(t){return!isNaN(this.parseDate(t))}},{key:"getTimeStamp",value:function(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}},{key:"getDate",value:function(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);var i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(t,e){var i=this.w.globals.locale,n=this.w.config.xaxis.labels.datetimeUTC,a=["\0"].concat(h(i.months)),r=[""].concat(h(i.shortMonths)),o=[""].concat(h(i.days)),s=[""].concat(h(i.shortDays));function l(t,e){var i=t+"";for(e=e||2;i.length12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(p))).replace(/(^|[^\\])h/g,"$1"+p);var g=n?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g))).replace(/(^|[^\\])m/g,"$1"+g);var m=n?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(m))).replace(/(^|[^\\])s/g,"$1"+m);var v=n?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(v,3)),v=Math.round(v/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(v)),v=Math.round(v/10);var b=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+v)).replace(/(^|[^\\])TT+/g,"$1"+b)).replace(/(^|[^\\])T/g,"$1"+b.charAt(0));var y=b.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+y)).replace(/(^|[^\\])t/g,"$1"+y.charAt(0));var x=-t.getTimezoneOffset(),w=n||!x?"Z":x>0?"+":"-";if(!n){var _=(x=Math.abs(x))%60;w+=l(Math.floor(x/60))+":"+l(_)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var k=(n?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(o[0],"g"),o[k])).replace(new RegExp(s[0],"g"),s[k])).replace(new RegExp(a[0],"g"),a[d])).replace(new RegExp(r[0],"g"),r[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var n=this.w;void 0!==n.config.xaxis.min&&(t=n.config.xaxis.min),void 0!==n.config.xaxis.max&&(e=n.config.xaxis.max);var a=this.getDate(t),r=this.getDate(e),o=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var n=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&n++,n}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=p.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),F=function(t){s(a,t);var i=d(a);function a(){return n(this,a),i.apply(this,arguments)}return r(a,[{key:"draw",value:function(t,i){var n=this.w,a=new v(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=n.globals.seriesRangeStart,this.seriesRangeEnd=n.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var r=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o0&&(this.visibleI=this.visibleI+1);var m=0,b=0;this.yRatio.length>1&&(this.yaxisIndex=f);var y=this.barHelpers.initialPositions();h=y.y,c=y.zeroW,d=y.x,b=y.barWidth,s=y.xDivision,l=y.zeroH;for(var x=a.group({class:"apexcharts-datalabels","data:realIndex":f}),w=a.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),_=0;_0}));return n=l.config.plotOptions.bar.rangeBarGroupRows?a+o*u:a+r*this.visibleI+o*u,f>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(c=l.globals.seriesRangeBar[e][f].overlaps).indexOf(d)>-1&&(n=(r=s.barHeight/c.length)*this.visibleI+o*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+c.indexOf(d))+o*u),{barYPosition:n,barHeight:r}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x;t.strokeWidth;var n=t.xDivision,a=t.barWidth,r=t.zeroH,o=this.w,s=e.i,l=e.j,c=this.yRatio[this.yaxisIndex],d=e.realIndex,h=this.getRangeValue(d,l),u=Math.min(h.start,h.end),f=Math.max(h.start,h.end);o.globals.isXNumeric&&(i=(o.globals.seriesX[s][l]-o.globals.minX)/this.xRatio-a/2);var p=i+a*this.visibleI;void 0===this.series[s][l]||null===this.series[s][l]?u=r:(u=r-u/c,f=r-f/c);var g=Math.abs(f-u),m=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:a,y1:u,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:e.realIndex,i:d,j:l,w:o});return o.globals.isXNumeric||(i+=n),{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:g,x:i,y:f,goalY:this.barHelpers.getGoalValues("y",null,r,s,l),barXPosition:p}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,n=t.y1,a=t.y2,r=t.yDivision,o=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,d=l+n/this.invertedYRatio,h=l+a/this.invertedYRatio,u=Math.abs(h-d),f=this.barHelpers.getBarpaths({barYPosition:s,barHeight:o,x1:d,x2:h,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:e.realIndex,realIndex:e.realIndex,j:e.j,w:c});return c.globals.isXNumeric||(i+=r),{pathTo:f.pathTo,pathFrom:f.pathFrom,barWidth:u,x:h,goalX:this.barHelpers.getGoalValues("x",l,null,e.realIndex,e.j),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}},{key:"getTooltipValues",value:function(t){var e=t.ctx,i=t.seriesIndex,n=t.dataPointIndex,a=t.y1,r=t.y2,o=t.w,s=o.globals.seriesRangeStart[i][n],l=o.globals.seriesRangeEnd[i][n],c=o.globals.labels[n],d=o.config.series[i].name?o.config.series[i].name:"",h=o.config.tooltip.y.formatter,u=o.config.tooltip.y.title.formatter,f={w:o,seriesIndex:i,dataPointIndex:n,start:s,end:l};"function"==typeof u&&(d=u(d,f)),Number.isFinite(a)&&Number.isFinite(r)&&(s=a,l=r,o.config.series[i].data[n].x&&(c=o.config.series[i].data[n].x+":"),"function"==typeof h&&(c=h(c,f)));var p="",g="",m=o.globals.colors[i];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var v=new L(e);p=v.formatDate(v.getDate(s),o.config.tooltip.x.format),g=v.formatDate(v.getDate(l),o.config.tooltip.x.format)}else p=s,g=l;else p=o.config.tooltip.x.formatter(s),g=o.config.tooltip.x.formatter(l);return{start:s,end:l,startVal:p,endVal:g,ylabel:c,color:m,seriesName:d}}},{key:"buildCustomTooltipHTML",value:function(t){return'
        '+(t.seriesName||"")+'
        '+t.ylabel+' '+t.start+' - '+t.end+"
        "}}]),a}(O),j=function(){function t(e){n(this,t),this.opts=e}return r(t,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,p.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,n=e.dataPointIndex,a=e.w;return t._getBoxTooltip(a,i,n,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,n=e.dataPointIndex,a=e.w;return t._getBoxTooltip(a,i,n,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,n=e.dataPointIndex,a=e.w,r=a.globals.seriesRangeStart[i][n];return a.globals.seriesRangeEnd[i][n]-r},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=new F(t.ctx,null),i=e.getTooltipValues(t),n=i.color,a=i.seriesName,r=i.ylabel,o=i.startVal,s=i.endVal;return e.buildCustomTooltipHTML({color:n,seriesName:a,ylabel:r,start:o,end:s})}(t):function(t){var e=new F(t.ctx,null),i=e.getTooltipValues(t),n=i.color,a=i.seriesName,r=i.ylabel,o=i.start,s=i.end;return e.buildCustomTooltipHTML({color:n,seriesName:a,ylabel:r,start:o,end:s})}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(t){return p.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return p.isNumber(t)?Math.floor(t):t};var n=t.xaxis.labels.formatter,a=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(a=i.map((function(t){return Array.isArray(t)?t:String(t)}))),a&&a.length&&(t.xaxis.labels.formatter=function(t){return p.isNumber(t)?n(a[Math.floor(t)-1]):n(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(t,e,i,n,a){var r=t.globals.seriesCandleO[e][i],o=t.globals.seriesCandleH[e][i],s=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],c=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==a?'
        \n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
        "):'
        ')+"
        ".concat(n[0],': ')+r+"
        "+"
        ".concat(n[1],': ')+o+"
        "+(s?"
        ".concat(n[2],': ')+s+"
        ":"")+"
        ".concat(n[3],': ')+l+"
        "+"
        ".concat(n[4],': ')+c+"
        "}}]),t}(),N=function(){function t(e){n(this,t),this.opts=e}return r(t,[{key:"init",value:function(t){var e=t.responsiveOverride,n=this.opts,a=new S,r=new j(n);this.chartType=n.chart.type,"histogram"===this.chartType&&(n.chart.type="bar",n=p.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},n)),n=this.extendYAxis(n),n=this.extendAnnotations(n);var o=a.init(),s={};if(n&&"object"===i(n)){var l={};l=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(n.chart.type)?r[n.chart.type]():r.line(),n.chart.brush&&n.chart.brush.enabled&&(l=r.brush(l)),n.chart.stacked&&"100%"===n.chart.stackType&&(n=r.stacked100(n)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(n),n.xaxis=n.xaxis||window.Apex.xaxis||{},e||(n.xaxis.convertedCatToNumeric=!1),((n=this.checkForCatToNumericXAxis(this.chartType,l,n)).chart.sparkline&&n.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(l=r.sparkline(l)),s=p.extend(o,l)}var c=p.extend(s,window.Apex);return o=p.extend(c,n),this.handleUserInputErrors(o)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var n=new j(i),a=("bar"===t||"boxPlot"===t)&&i.plotOptions&&i.plotOptions.bar&&i.plotOptions.bar.horizontal,r="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,o="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,s=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return a||r||!o||"between"===s||(i=n.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new S;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=p.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[p.extend(i.yAxis,t.yaxis)]:t.yaxis=p.extendArray(t.yaxis,i.yAxis);var n=!1;t.yaxis.forEach((function(t){t.logarithmic&&(n=!0)}));var a=t.series;return e&&!a&&(a=e.config.series),n&&a.length!==t.yaxis.length&&a.length&&(t.yaxis=a.map((function(e,n){if(e.name||(a[n].name="series-".concat(n+1)),t.yaxis[n])return t.yaxis[n].seriesName=a[n].name,t.yaxis[n];var r=p.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),n&&a.length>1&&a.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new S;return t.annotations.yaxis=p.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new S;return t.annotations.xaxis=p.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new S;return t.annotations.points=p.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.chart.background||(t.chart.background="#424242"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),R=function(){function t(){n(this,t)}return r(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRangeBar=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasGroups=!1,t.groups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.xaxisLabelsCount=0,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=p.extend({},t),e.initialSeries=p.clone(t.series),e.lastXAxis=p.clone(e.initialConfig.xaxis),e.lastYAxis=p.clone(e.initialConfig.yaxis),e}}]),t}(),H=function(){function t(e){n(this,t),this.opts=e}return r(t,[{key:"init",value:function(){var t=new N(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new R).init(t)}}}]),t}(),B=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new b(this.ctx)}return r(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new M(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new M(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,n=this.w.globals,a="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(p.parseNumber(t[e].data[r][4])):this.twoDSeries.push(p.parseNumber(t[e].data[r][1])),n.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var o=new Date(t[e].data[r][0]);o=new Date(o).getTime(),this.twoDSeriesX.push(o)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var s=0;s-1&&(r=this.activeSeriesIndex);for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:this.ctx,n=this.w.config,a=this.w.globals,r=new L(i),o=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();a.isRangeBar="rangeBar"===n.chart.type&&a.isBarHorizontal,a.hasGroups="category"===n.xaxis.type&&n.xaxis.group.groups.length>0,a.hasGroups&&(a.groups=n.xaxis.group.groups);for(var s=function(){for(var t=0;t0&&(this.twoDSeriesX=o,a.seriesX.push(this.twoDSeriesX))),a.labels.push(this.twoDSeriesX);var c=t[l].data.map((function(t){return p.parseNumber(t)}));a.series.push(c)}a.seriesZ.push(this.threeDSeries),void 0!==t[l].name?a.seriesNames.push(t[l].name):a.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==t[l].color?a.seriesColors.push(t[l].color):a.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var n=0;n0?i.labels=e.xaxis.categories:e.labels.length>0?i.labels=e.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRangeBar.length&&(i.seriesRangeBar.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=i.labels.filter((function(t,e,i){return i.indexOf(t)===e}))),e.xaxis.convertedCatToNumeric&&(new j(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,n=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var a=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=a.reduce((function(t,e,i,n){return n[t].length>e.length?t:i}),0),o=0;o0&&i<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,n){void 0!==i.labels.formatter?e.globals.yLabelFormatters[n]=i.labels.formatter:e.globals.yLabelFormatters[n]=function(a){return e.globals.xyCharts?Array.isArray(a)?a.map((function(e){return t.defaultYFormatter(e,i,n)})):t.defaultYFormatter(a,i,n):a}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Y=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"getLabel",value:function(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=this.w,l=void 0===t[n]?"":t[n],c=l,d=s.globals.xLabelFormatter,h=s.config.xaxis.labels.formatter,u=!1,f=new z(this.ctx),p=l;o&&(c=f.xLabelFormat(d,l,p,{i:n,dateFormatter:new L(this.ctx).formatDate,w:s}),void 0!==h&&(c=h(l,t[n],{i:n,dateFormatter:new L(this.ctx).formatDate,w:s})));e.length>0?(u=function(t){var i=null;return e.forEach((function(t){"month"===t.unit?i="year":"day"===t.unit?i="month":"hour"===t.unit?i="day":"minute"===t.unit&&(i="hour")})),i===t}(e[n].unit),i=e[n].position,c=e[n].value):"datetime"===s.config.xaxis.type&&void 0===h&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var g,m=new v(this.ctx);g=s.globals.rotateXLabels&&o?m.getTextRects(c,parseInt(r,10),null,"rotate(".concat(s.config.xaxis.labels.rotate," 0 0)"),!1):m.getTextRects(c,parseInt(r,10));var b=!s.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&(0===c.indexOf("NaN")||0===c.toLowerCase().indexOf("invalid")||c.toLowerCase().indexOf("infinity")>=0||a.indexOf(c)>=0&&b)&&(c=""),{x:i,text:c,textRect:g,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var n=this.w,a=n.config.xaxis.tickAmount;return"dataPoints"===a&&(a=Math.round(n.globals.gridWidth/120)),a>i||t%Math.round(i/(a+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,n,a){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&n.length>0){var o=a[a.length-1];e.x0){!0===s.config.yaxis[a].opposite&&(t+=n.width);for(var d=e;d>=0;d--){var h=c+e/10+s.config.yaxis[a].labels.offsetY-1;s.globals.isBarHorizontal&&(h=r*d),"heatmap"===s.config.chart.type&&(h+=r/2);var u=l.drawLine(t+i.offsetX-n.width+n.offsetX,h+n.offsetY,t+i.offsetX+n.offsetX,h+n.offsetY,n.color);o.add(u),c+=r}}}}]),t}(),W=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),n=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",n*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+n)}},{key:"fixSvgStringForIe11",value:function(t){if(!p.isIE11())return t.replace(/ /g," ");var e=0,i=t.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(t){return 2==++e?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':t}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(t){var e=this.w.globals.dom.Paper.svg();if(1!==t){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,t),e=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(e)}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(n,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var n=e.w,a=t?t.scale||t.width/n.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=n.globals.svgWidth*a,r.height=parseInt(n.globals.dom.elWrap.style.height,10)*a;var o="transparent"===n.config.chart.background?"#fff":n.config.chart.background,s=r.getContext("2d");s.fillStyle=o,s.fillRect(0,0,r.width*a,r.height*a);var l=e.getSvgString(a);if(window.canvg&&p.isIE11()){var c=window.canvg.Canvg.fromString(s,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=r.msToBlob();c.stop(),i({blob:d})}else{var h="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(s.drawImage(u,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},u.src=h}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){var i=e.imgURI,n=e.blob;n?navigator.msSaveOrOpenBlob(n,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,n=t.columnDelimiter,a=t.lineDelimiter,r=void 0===a?"\n":a,o=this.w,s=[],l=[],c="",d=new B(this.ctx),h=new Y(this.ctx),u=function(t){var i="";if(o.globals.axisCharts){if("category"===o.config.xaxis.type||o.config.xaxis.convertedCatToNumeric)if(o.globals.isBarHorizontal){var a=o.globals.yLabelFormatters[0],r=new M(e.ctx).getActiveConfigSeriesIndex();i=a(o.globals.labels[t],{seriesIndex:r,dataPointIndex:t,w:o})}else i=h.getLabel(o.globals.labels,o.globals.timescaleLabels,0,t).text;"datetime"===o.config.xaxis.type&&(o.config.xaxis.categories.length?i=o.config.xaxis.categories[t]:o.config.labels.length&&(i=o.config.labels[t]))}else i=o.config.labels[t];return Array.isArray(i)&&(i=i.join(" ")),p.isNumber(i)?i:i.split(n).join("")};s.push(o.config.chart.toolbar.export.csv.headerCategory),i.map((function(t,e){var i=t.name?t.name:"series-".concat(e);o.globals.axisCharts&&s.push(i.split(n).join("")?i.split(n).join(""):"series-".concat(e))})),o.globals.axisCharts||(s.push(o.config.chart.toolbar.export.csv.headerValue),l.push(s.join(n))),i.map((function(t,e){o.globals.axisCharts?function(t,e){if(s.length&&0===e&&l.push(s.join(n)),t.data&&t.data.length)for(var a=0;a=10?o.config.chart.toolbar.export.csv.dateFormatter(r):p.isNumber(r)?r:r.split(n).join("")));for(var c=0;c0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return r(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new v(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),n=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(n);for(var a=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],h=this.w,u=l.xaxisFontSize||this.xaxisFontSize,f=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,m=l.cssClass||h.config.xaxis.labels.style.cssClass,v=h.globals.padHorizontal,b=n.length,y="category"===h.config.xaxis.type?h.globals.dataPoints:b;if(a){var x=y>1?y-1:y;o=h.globals.gridWidth/x,v=v+r(0,o)/2+h.config.xaxis.labels.offsetX}else o=h.globals.gridWidth/y,v=v+r(0,o)+h.config.xaxis.labels.offsetX;for(var w=function(a){var l=v-r(a,o)/2+h.config.xaxis.labels.offsetX;0===a&&1===b&&o/2===v&&1===y&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(n,h.globals.timescaleLabels,l,a,c,u,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),t||(w=w+parseFloat(u)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(a,x,b):s.axesUtils.checkForOverflowingLabels(a,x,b,c,d),t&&x.text&&h.globals.xaxisLabelsCount++,h.config.xaxis.labels.show){var _=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:u,fontFamily:f,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+a-1]:p[a]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+m});if(i.add(_),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,_.node.appendChild(k),""!==x.text&&(c.push(x.text),d.push(x))}}an.globals.gridWidth)){var r=this.offY+n.config.xaxis.axisTicks.offsetY;if(e=e+r+n.config.xaxis.axisTicks.height,"top"===n.config.xaxis.position&&(e=r-n.config.xaxis.axisTicks.height),n.config.xaxis.axisTicks.show){var o=new v(this.ctx).drawLine(t+n.config.xaxis.axisTicks.offsetX,r+n.config.xaxis.offsetY,a+n.config.xaxis.axisTicks.offsetX,e+n.config.xaxis.offsetY,n.config.xaxis.axisTicks.color);i.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,n=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var a=0;a0){var c=a[a.length-1].getBBox(),d=a[0].getBBox();c.x<-20&&a[a.length-1].parentNode.removeChild(a[a.length-1]),d.x+d.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&a[0].parentNode.removeChild(a[0]);for(var h=0;h0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return r(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new v(this.ctx);null===t&&(t=i.group({class:"apexcharts-grid"}));var n=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),a=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(a),t.add(n),t}},{key:"drawGrid",value:function(){var t=null;return this.w.globals.axisCharts&&(t=this.renderGrid(),this.drawGridArea(t.el)),t}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new v(this.ctx),n=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var a=0;t.config.stroke.width.forEach((function(t){a=Math.max(a,t)})),n=a}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elForecastMask.setAttribute("id","forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(e.cuid));var r=t.config.chart.type,o=0,s=0;("bar"===r||"rangeBar"===r||"candlestick"===r||"boxPlot"===r||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=t.config.grid.padding.left,s=t.config.grid.padding.right,e.barPadForNumericAxis>o&&(o=e.barPadForNumericAxis,s=e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-n/2-o-2,-n/2,e.gridWidth+n+s+o+4,e.gridHeight+n,0,"#fff");var l=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,e.gridWidth+4*l,e.gridHeight+4*l,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var c=e.dom.baseEl.querySelector("defs");c.appendChild(e.dom.elGridRectMask),c.appendChild(e.dom.elForecastMask),c.appendChild(e.dom.elNonForecastMask),c.appendChild(e.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,n=t.y1,a=t.x2,r=t.y2,o=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===o-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({x1:i,y1:n,x2:a,y2:r,parent:s});var c=0;if(l.globals.hasGroups&&"between"===l.config.xaxis.tickPlacement){var d=l.globals.groups;if(d){for(var h=0,u=0;h2));a++);return!t.globals.isBarHorizontal||this.isRangeBar?(i=this.xaxisLabels.length,this.isRangeBar&&(n=t.globals.labels.length,t.config.xaxis.tickAmount&&t.config.xaxis.labels.formatter&&(i=t.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:n})):(i=n,n=t.globals.xTickAmount,this._drawInvertedXYLines({xCount:i,tickAmount:n})),this.drawGridBands(i,n),{el:this.elg,xAxisTickWidth:t.globals.gridWidth/i}}},{key:"drawGridBands",value:function(t,e){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var n=0,a=i.globals.gridHeight/e,r=i.globals.gridWidth,o=0,s=0;o=i.config.grid.row.colors.length&&(s=0),this._drawGridBandRect({c:s,x1:0,y1:n,x2:r,y2:a,type:"row"}),n+=i.globals.gridHeight/e;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?t:t-1,c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/l,h=i.globals.gridHeight,u=0,f=0;u=i.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:c,y1:0,x2:d,y2:h,type:"column"}),c+=i.globals.gridWidth/l}}]),t}(),X=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"niceScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4?arguments[4]:void 0,r=this.w,o=Math.abs(e-t);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,n,o))&&(i=r.globals.dataPoints-1),t===Number.MIN_VALUE&&0===e||!p.isNumber(t)&&!p.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)return t=0,e=i,this.linearScale(t,e,i);t>e?(console.warn("axis.min cannot be greater than axis.max"),e=t+.1):t===e&&(t=0===t?0:t-.5,e=0===e?2:e+.5);var s=[];o<1&&a&&("candlestick"===r.config.chart.type||"candlestick"===r.config.series[n].type||"boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[n].type||r.globals.isRangeData)&&(e*=1.01);var l=i+1;l<2?l=2:l>2&&(l-=2);var c=o/l,d=Math.floor(p.log10(c)),h=Math.pow(10,d),u=Math.round(c/h);u<1&&(u=1);var f=u*h,g=f*Math.floor(t/f),m=f*Math.ceil(e/f),v=g;if(a&&o>2){for(;s.push(v),!((v+=f)>m););return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}var b=t;(s=[]).push(b);for(var y=Math.abs(e-t)/i,x=0;x<=i;x++)b+=y,s.push(b);return s[s.length-2]>=e&&s.pop(),{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=arguments.length>3?arguments[3]:void 0,a=Math.abs(e-t);"dataPoints"===(i=this._adjustTicksForSmallRange(i,n,a))&&(i=this.w.globals.dataPoints-1);var r=a/i;i===Number.MAX_VALUE&&(i=10,r=1);for(var o=[],s=t;i>=0;)o.push(s),s+=r,i-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var n=[],a=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5)n.allSeriesCollapsed=!1,n.yAxisScale[t]=this.logarithmicScale(e,i,r.logBase),n.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase);else if(i!==-Number.MAX_VALUE&&p.isNumber(i))if(n.allSeriesCollapsed=!1,void 0===r.min&&void 0===r.max||r.forceNiceScale){var s=void 0===a.yaxis[t].max&&void 0===a.yaxis[t].min||a.yaxis[t].forceNiceScale;n.yAxisScale[t]=this.niceScale(e,i,r.tickAmount?r.tickAmount:o<5&&o>1?o+1:5,t,s)}else n.yAxisScale[t]=this.linearScale(e,i,r.tickAmount,t);else n.yAxisScale[t]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(t,e){var i=this.w,n=i.globals,a=i.config.xaxis,r=Math.abs(e-t);return e!==-Number.MAX_VALUE&&p.isNumber(e)?n.xAxisScale=this.linearScale(t,e,a.tickAmount?a.tickAmount:r<5&&r>1?r+1:5,0):n.xAxisScale=this.linearScale(0,5,5),n.xAxisScale}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,i=this.w.config,n=e.minYArr.concat([]),a=e.maxYArr.concat([]),r=[];i.yaxis.forEach((function(e,o){var s=o;i.series.forEach((function(t,i){t.name===e.seriesName&&(s=i,o!==i?r.push({index:i,similarIndex:o,alreadyExists:!0}):r.push({index:i}))}));var l=n[s],c=a[s];t.setYScaleForIndex(o,l,c)})),this.sameScaleInMultipleAxes(n,a,r)}},{key:"sameScaleInMultipleAxes",value:function(t,e,i){var n=this,a=this.w.config,r=this.w.globals,o=[];i.forEach((function(t){t.alreadyExists&&(void 0===o[t.index]&&(o[t.index]=[]),o[t.index].push(t.index),o[t.index].push(t.similarIndex))})),r.yAxisSameScaleIndices=o,o.forEach((function(t,e){o.forEach((function(i,n){var a,r;e!==n&&(a=t,r=i,a.filter((function(t){return-1!==r.indexOf(t)}))).length>0&&(o[e]=o[e].concat(o[n]))}))}));var s=o.map((function(t){return t.filter((function(e,i){return t.indexOf(e)===i}))})).map((function(t){return t.sort()}));o=o.filter((function(t){return!!t}));var l=s.slice(),c=l.map((function(t){return JSON.stringify(t)}));l=l.filter((function(t,e){return c.indexOf(JSON.stringify(t))===e}));var d=[],h=[];t.forEach((function(t,i){l.forEach((function(n,a){n.indexOf(i)>-1&&(void 0===d[a]&&(d[a]=[],h[a]=[]),d[a].push({key:i,value:t}),h[a].push({key:i,value:e[i]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),f=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);d.forEach((function(t,e){t.forEach((function(t,i){u[e]=Math.min(t.value,u[e])}))})),h.forEach((function(t,e){t.forEach((function(t,i){f[e]=Math.max(t.value,f[e])}))})),t.forEach((function(t,e){h.forEach((function(t,i){var o=u[i],s=f[i];a.chart.stacked&&(s=0,t.forEach((function(t,e){t.value!==-Number.MAX_VALUE&&(s+=t.value),o!==Number.MIN_VALUE&&(o+=d[i][e].value)}))),t.forEach((function(i,l){t[l].key===e&&(void 0!==a.yaxis[e].min&&(o="function"==typeof a.yaxis[e].min?a.yaxis[e].min(r.minY):a.yaxis[e].min),void 0!==a.yaxis[e].max&&(s="function"==typeof a.yaxis[e].max?a.yaxis[e].max(r.maxY):a.yaxis[e].max),n.setYScaleForIndex(e,o,s))}))}))}))}},{key:"autoScaleY",value:function(t,e,i){t||(t=this);var n=t.w;if(n.globals.isMultipleYAxis||n.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),e;var a=n.globals.seriesX[0],r=n.config.chart.stacked;return e.forEach((function(t,o){for(var s=0,l=0;l=i.xaxis.min){s=l;break}var c,d,h=n.globals.minYArr[o],u=n.globals.maxYArr[o],f=n.globals.stackedSeriesTotals;n.globals.series.forEach((function(o,l){var p=o[s];r?(p=f[s],c=d=p,f.forEach((function(t,e){a[e]<=i.xaxis.max&&a[e]>=i.xaxis.min&&(t>d&&null!==t&&(d=t),o[e]=i.xaxis.min){var r=t,o=t;n.globals.series.forEach((function(i,n){null!==t&&(r=Math.min(i[e],r),o=Math.max(i[e],o))})),o>d&&null!==o&&(d=o),rh&&(c=h),e.length>1?(e[l].min=void 0===t.min?c:t.min,e[l].max=void 0===t.max?d:t.max):(e[0].min=void 0===t.min?c:t.min,e[0].max=void 0===t.max?d:t.max)}))})),e}}]),t}(),U=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.scales=new X(e)}return r(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=this.w.config,r=this.w.globals,o=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===n&&(n=t+1);var l=r.series,c=l,d=l;"candlestick"===a.chart.type?(c=r.seriesCandleL,d=r.seriesCandleH):"boxPlot"===a.chart.type?(c=r.seriesCandleO,d=r.seriesCandleC):r.isRangeData&&(c=r.seriesRangeStart,d=r.seriesRangeEnd);for(var h=t;hc[h][u]&&c[h][u]<0&&(s=c[h][u])):r.hasNullValues=!0}}return"rangeBar"===a.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(s=e),"bar"===a.chart.type&&(s<0&&o<0&&(o=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:o,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var n=0;n=0&&i<=10||void 0!==e.yaxis[0].min||void 0!==e.yaxis[0].max)&&(o=0),t.minY=i-5*o/100,i>0&&t.minY<0&&(t.minY=0),t.maxY=t.maxY+5*o/100}return e.yaxis.forEach((function(e,i){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[i]=e.max:"function"==typeof e.max&&(t.maxYArr[i]=e.max(t.isMultipleYAxis?t.maxYArr[i]:t.maxY)),t.maxY=t.maxYArr[i]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[i]=e.min:"function"==typeof e.min&&(t.minYArr[i]=e.min(t.isMultipleYAxis?t.minYArr[i]===Number.MIN_VALUE?0:t.minYArr[i]:t.minY)),t.minY=t.minYArr[i])})),t.isBarHorizontal&&["min","max"].forEach((function(i){void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])})),t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.minY=i,t.yAxisScale.forEach((function(e,i){t.minYArr[i]=e.niceMin,t.maxYArr[i]=e.niceMax}))):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.yAxisScale[0].niceMin,t.maxYArr[0]=t.yAxisScale[0].niceMax),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config,i="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided||t.noLabelsProvided||t.isXNumeric;if(t.isXNumeric&&function(){for(var e=0;et.dataPoints&&0!==t.dataPoints&&(n=t.dataPoints-1)):"dataPoints"===e.xaxis.tickAmount?(t.series.length>1&&(n=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric&&(n=t.maxX-t.minX-1)):n=e.xaxis.tickAmount,t.xTickAmount=n,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var a=[],r=t.minX-1;r0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,n-1),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var a=e-n[i-1];a>0&&(t.minXDiff=Math.min(a,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this.w.globals,e=[],i=[];if(t.series.length)for(var n=0;n0?a=a+parseFloat(t.series[o][n])+1e-4:r+=parseFloat(t.series[o][n])),o===t.series.length-1&&(e.push(a),i.push(r));for(var s=0;s=0;b--)m(b);if(void 0!==i.config.yaxis[t].title.text){var y=n.group({class:"apexcharts-yaxis-title"}),x=0;i.config.yaxis[t].opposite&&(x=i.globals.translateYAxisX[t]);var w=n.drawText({x:x,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[t].title.offsetY,text:i.config.yaxis[t].title.text,textAnchor:"end",foreColor:i.config.yaxis[t].title.style.color,fontSize:i.config.yaxis[t].title.style.fontSize,fontWeight:i.config.yaxis[t].title.style.fontWeight,fontFamily:i.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[t].title.style.cssClass});y.add(w),l.add(y)}var _=i.config.yaxis[t].axisBorder,k=31+_.offsetX;if(i.config.yaxis[t].opposite&&(k=-31-_.offsetX),_.show){var S=n.drawLine(k,i.globals.translateY+_.offsetY-2,k,i.globals.gridHeight+i.globals.translateY+_.offsetY+2,_.color,0,_.width);l.add(S)}return i.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,d,_,i.config.yaxis[t].axisTicks,t,h,l),l}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new v(this.ctx),n=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});n.add(a);var r=e.globals.yAxisScale[t].result.length-1,o=e.globals.gridWidth/r+.1,s=o+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=e.globals.yAxisScale[t].result.slice(),d=e.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),r=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(t,c);var h=d.length;if(e.config.xaxis.labels.show)for(var u=h?0:r;h?u=0;h?u++:u--){var f=c[u];f=l(f,u,e);var p=e.globals.gridWidth+e.globals.padHorizontal-(s-o+e.config.xaxis.labels.offsetX);if(d.length){var g=this.axesUtils.getLabel(c,d,p,u,this.drawnLabels,this.xaxisFontSize);p=g.x,f=g.text,this.drawnLabels.push(g.text),0===u&&e.globals.skipFirstTimelinelabel&&(f=""),u===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var m=i.drawText({x:p,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});a.add(m),m.tspan(f);var b=document.createElementNS(e.globals.SVGNS,"title");b.textContent=f,m.node.appendChild(b),s+=o}return this.inversedYAxisTitleText(n),this.inversedYAxisBorder(n),n}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new v(this.ctx),n=e.config.xaxis.axisBorder;if(n.show){var a=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(a-=15);var r=i.drawLine(e.globals.padHorizontal+a+n.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,n.color,0,n.height);t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new v(this.ctx);if(void 0!==e.config.xaxis.title.text){var n=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});n.add(a),t.add(n)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,n=new v(this.ctx),a={width:0,height:0},r={width:0,height:0},o=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==o&&(a=o.getBoundingClientRect());var s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==s&&(r=s.getBoundingClientRect()),null!==s){var l=this.xPaddingForYAxisTitle(t,a,r,e);s.setAttribute("x",l.xPos-(e?10:0))}if(null!==s){var c=n.rotateAroundCenter(s);s.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,n){var a=this.w,r=0,o=0,s=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(n?(o=e.width+a.config.yaxis[t].title.offsetX+i.width/2+s/2,0===(r+=1)&&(o-=s/2)):(o=-1*e.width+a.config.yaxis[t].title.offsetX+s/2+i.width/2,a.globals.isBarHorizontal&&(s=25,o=-1*e.width-a.config.yaxis[t].title.offsetX-s)),{xPos:o,padd:s})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,n=0,a=0,r=18,o=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(s,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!s.show||s.floating||0===t[l].width,d=t[l].width+e[l].width;s.opposite?i.globals.isBarHorizontal?(a=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=a-s.labels.offsetX):(a=i.globals.gridWidth+i.globals.translateX+o,c||(o=o+d+20),i.globals.translateYAxisX[l]=a-s.labels.offsetX+20):(n=i.globals.translateX-r,c||(r=r+d+20),i.globals.translateYAxisX[l]=n+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(e=p.listToArray(e)).forEach((function(e,i){var n=t.config.yaxis[i];if(n&&void 0!==n.labels.align){var a=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));r=p.listToArray(r);var o=a.getBoundingClientRect();"left"===n.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","start")})),n.opposite||a.setAttribute("transform","translate(-".concat(o.width,", 0)"))):"center"===n.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),a.setAttribute("transform","translate(".concat(o.width/2*(n.opposite?1:-1),", 0)"))):"right"===n.labels.align&&(r.forEach((function(t,e){t.setAttribute("text-anchor","end")})),n.opposite&&a.setAttribute("transform","translate(".concat(o.width,", 0)")))}}))}}]),t}(),G=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.documentEvent=p.bind(this.documentEvent,this)}return r(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var n=i.globals.events[t].indexOf(e);-1!==n&&i.globals.events[t].splice(n,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var n=i.globals.events[t],a=n.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var n=p.extend(k,i);this.w.globals.locale=n.options}}]),t}(),Z=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"drawAxis",value:function(t,e){var i,n,a=this.w.globals,r=this.w.config,o=new $(this.ctx),s=new q(this.ctx);a.axisCharts&&"radar"!==t&&(a.isBarHorizontal?(n=s.drawYaxisInversed(0),i=o.drawXaxisInversed(0),a.dom.elGraphical.add(i),a.dom.elGraphical.add(n)):(i=o.drawXaxis(),a.dom.elGraphical.add(i),r.yaxis.map((function(t,e){-1===a.ignoreYAxisIndexes.indexOf(e)&&(n=s.drawYaxis(e),a.dom.Paper.add(n))}))))}}]),t}(),Q=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new v(this.ctx),i=new m(this.ctx),n=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,o=n.colorFrom,s=n.colorTo,l=n.opacityFrom,c=n.opacityTo,d=n.stops,h=a.enabled,u=a.left,f=a.top,g=a.blur,b=a.color,y=a.opacity,x=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(x=e.drawGradient("vertical",o,s,l,c,null,d,null));var w=e.drawRect();1===t.config.xaxis.crosshairs.width&&(w=e.drawLine());var _=t.globals.gridHeight;(!p.isNumber(_)||_<0)&&(_=0);var k=t.config.xaxis.crosshairs.width;(!p.isNumber(k)||k<0)&&(k=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:_,width:k,height:_,fill:x,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),h&&(w=i.dropShadow(w,{left:u,top:f,blur:g,color:b,opacity:y})),t.globals.dom.elGraphical.add(w)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new v(this.ctx),i=t.config.yaxis[0].crosshairs,n=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var a=e.drawLine(-n,0,t.globals.gridWidth+n,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(a)}var r=e.drawLine(-n,0,t.globals.gridWidth+n,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),J=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,n=i.config;if(0!==n.responsive.length){var a=n.responsive.slice();a.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new N({}),o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=a[0].breakpoint,o=window.innerWidth>0?window.innerWidth:screen.width;if(o>n){var s=b.extendArrayProps(r,i.globals.initialConfig,i);t=p.extend(s,t),t=p.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var l=0;l0&&"function"==typeof e.config.colors[0]&&(e.globals.colors=e.config.series.map((function(i,n){var a=e.config.colors[n];return a||(a=e.config.colors[0]),"function"==typeof a?(t.isColorFn=!0,a({value:e.globals.axisCharts?e.globals.series[n][0]?e.globals.series[n][0]:0:e.globals.series[n],seriesIndex:n,dataPointIndex:n,w:e})):a})))),e.globals.seriesColors.map((function(t,i){t&&(e.globals.colors[i]=t)})),e.config.theme.monochrome.enabled){var n=[],a=e.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(a=e.globals.series[0].length*e.globals.series.length);for(var r=e.config.theme.monochrome.color,o=1/(a/e.config.theme.monochrome.shadeIntensity),s=e.config.theme.monochrome.shadeTo,l=0,c=0;c2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,a=e||n.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===n.config.chart.type&&n.config.plotOptions.heatmap.colorScale.inverse),i&&n.globals.series.length&&(a=n.globals.series[n.globals.maxValsInArrayIndex].length*n.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var n=e.map((function(t,e){return Array.isArray(t)?t.length:1})),a=Math.max.apply(Math,h(n));i=e[n.indexOf(a)]}return i}}]),t}(),nt=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return r(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var n=this.getxAxisTimeScaleLabelsCoords();t={width:n.width,height:n.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var a=e.globals.xLabelFormatter,r=p.getLargestStringFromArr(i),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(o=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new z(this.dCtx.ctx),l=r;r=s.xLabelFormat(a,r,l,{i:void 0,dateFormatter:new L(this.dCtx.ctx).formatDate,w:e}),o=s.xLabelFormat(a,o,l,{i:void 0,dateFormatter:new L(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(o=r="1");var c=new v(this.dCtx.ctx),d=c.getTextRects(r,e.config.xaxis.labels.style.fontSize),h=d;if(r!==o&&(h=c.getTextRects(o,e.config.xaxis.labels.style.fontSize)),(t={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};d=u(r),r!==o&&(h=u(o)),t.height=(d.height>h.height?d.height:h.height)/1.5,t.width=d.width>h.width?d.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasGroups)return{width:0,height:0};var i,n=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,a=e.globals.groups.map((function(t){return t.title})),r=p.getLargestStringFromArr(a),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,a),s=new v(this.dCtx.ctx),l=s.getTextRects(r,n),c=l;return r!==o&&(c=s.getTextRects(o,n)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var n=new v(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=n.width,i=n.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),n=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new v(this.dCtx.ctx).getTextRects(n,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,n=i.globals,a=i.config,r=a.xaxis.type,o=t.width;n.skipLastTimelinelabel=!1,n.skipFirstTimelinelabel=!1;var s=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,s){(function(t){return-1!==n.collapsedSeriesIndices.indexOf(t)})(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+o/1.75-e.dCtx.yAxisWidthRight,c=s.position-o/1.75+e.dCtx.yAxisWidthLeft,d="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>n.svgWidth-n.translateX-d&&(n.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==a.chart.type&&"candlestick"!==a.chart.type&&"rangeBar"!==a.chart.type&&"boxPlot"!==a.chart.type?10:o/1.75)&&(n.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.rightString(s.niceMax).length?d:s.niceMax,u=c(h,{seriesIndex:o,dataPointIndex:-1,w:e}),f=u;if(void 0!==u&&0!==u.length||(u=h),e.globals.isBarHorizontal){n=0;var g=e.globals.labels.slice();u=c(u=p.getLargestStringFromArr(g),{seriesIndex:o,dataPointIndex:-1,w:e}),f=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,g)}var m=new v(t.dCtx.ctx),b="rotate(".concat(r.labels.rotate," 0 0)"),y=m.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1),x=y;u!==f&&(x=m.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1)),i.push({width:(l>x.width||l>y.width?l:x.width>y.width?x.width:y.width)+n,height:x.height>y.height?x.height:y.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,n){if(e.show&&void 0!==e.title.text){var a=new v(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),o=a.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,n=0,a=t.globals.yAxisScale.length>1?10:0,r=new Y(this.dCtx.ctx),o=function(o,s){var l=t.config.yaxis[s].floating,c=0;o.width>0&&!l?(c=o.width+a,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-o.width-a)):c=l||r.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?n+=c:i+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){o(t,e)})),t.globals.yTitleCoords.map((function(t,e){o(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=n,e}}]),t}(),rt=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return r(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w;if(e.globals.noData||e.globals.allSeriesCollapsed)return 0;var i=function(t){return"bar"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t},n=e.config.chart.type,a=0,r=i(n)?e.config.series.length:1;if(e.globals.comboBarCount>0&&(r=e.globals.comboBarCount),e.globals.collapsedSeries.forEach((function(t){i(t.type)&&(r-=1)})),e.config.chart.stacked&&(r=1),(i(n)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&r>0){var o,s,l=Math.abs(e.globals.initialMaxX-e.globals.initialMinX);l<=3&&(l=e.globals.dataPoints),o=l/t,e.globals.minXDiff&&e.globals.minXDiff/o>0&&(s=e.globals.minXDiff/o),s>t/2&&(s/=2),(a=s/r*parseInt(e.config.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),a=a/(r>1?1:1.5)+5,e.globals.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,n=this.dCtx.isSparkline||!e.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==e.config[i].text?n+=e.config[i].margin:n+=t.dCtx.isSparkline||!e.globals.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||e.globals.axisCharts||(n+=10);var a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-a.height-r.height-n,i.translateY=i.translateY+a.height+r.height+n}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,n=new Y(this.dCtx.ctx);i.config.yaxis.map((function(a,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||n.isYAxisHidden(r)||(a.opposite&&(i.globals.translateX=i.globals.translateX-(e[r].width+t[r].width)-parseInt(i.config.yaxis[r].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),ot=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new it(this),this.dimYAxis=new at(this),this.dimXAxis=new nt(this),this.dimGrid=new rt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return r(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,a,r=[],o=!0,s=!1;try{for(i=i.call(t);!(o=(n=i.next()).done)&&(r.push(n.value),!e||r.length!==e);o=!0);}catch(t){s=!0,a=t}finally{try{o||null==i.return||i.return()}finally{if(s)throw a}}return r}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=i[0],a=i[1];t.gridPad[n]=Math.max(a,t.w.globals.markers.largestSize/1.5)})),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*n,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(n>0?n+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,n=this.dimYAxis.getyAxisLabelsCoords(),a=this.dimYAxis.getyAxisTitleCoords();e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:n[i].width,index:i}),e.globals.yTitleCoords.push({width:a[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,s,o),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-s.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,d=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(r);var h=function(){i.translateX=l,i.gridHeight=i.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l};switch("top"===e.config.xaxis.position&&(d=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=d,h();break;case"top":i.translateY=this.lgRect.height+d,h();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=d,i.translateX=l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(a,n),new q(this.ctx).setYAxisXPosition(n,a)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,n=0;t.config.legend.show&&!t.config.legend.floating&&(n=20);var a="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[a].offsetY,o=i.plotOptions[a].offsetX;if(!i.legend.show||i.legend.floating)return e.gridHeight=e.svgHeight-i.grid.padding.left+i.grid.padding.right,e.gridWidth=e.gridHeight,e.translateY=r,void(e.translateX=o+(e.svgWidth-e.gridWidth)/2);switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=o+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=o+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-n,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=o+this.lgRect.width+n;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-n-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=o+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var n=this.w,a=n.globals.hasGroups?2:1,r=i.height+t.height+e.height,o=n.globals.isMultiLineX?1.2:n.globals.LINE_HEIGHT_RATIO,s=n.globals.rotateXLabels?22:10,l=n.globals.rotateXLabels&&"bottom"===n.config.legend.position?10:0;this.xAxisHeight=r*o+a*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>n.config.xaxis.labels.maxHeight&&(this.xAxisHeight=n.config.xaxis.labels.maxHeight),n.config.xaxis.labels.minHeight&&this.xAxisHeightd&&(this.yAxisWidth=d)}}]),t}(),st=function(){function t(e){n(this,t),this.w=e.w,this.lgCtx=e}return r(t,[{key:"getLegendStyles",value:function(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return t.appendChild(e),t}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){var t=this.w.globals;t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject");var e=t.dom.elLegendForeign;e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",t.svgWidth),e.setAttribute("height",t.svgHeight),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.appendChild(t.dom.elLegendWrap),e.appendChild(this.getLegendStyles()),t.dom.Paper.node.insertBefore(e,t.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(t,e){var i=this,n=this.w;if(n.globals.axisCharts||"radialBar"===n.config.chart.type){n.globals.resized=!0;var a=null,r=null;n.globals.risingSeries=[],n.globals.axisCharts?(a=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(a.getAttribute("data:realIndex"),10)):(a=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(a.getAttribute("rel"),10)-1),e?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)})):this.hideSeries({seriesEl:a,realIndex:r})}else{var o=n.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),s=n.config.chart.type;if("pie"===s||"polarArea"===s||"donut"===s){var l=n.config.plotOptions.pie.donut.labels;new v(this.lgCtx.ctx).pathMouseDown(o.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(o.members[0].node,l)}o.fire("click")}}},{key:"hideSeries",value:function(t){var e=t.seriesEl,i=t.realIndex,n=this.w,a=p.clone(n.config.series);if(n.globals.axisCharts){var r=!1;if(n.config.yaxis[i]&&n.config.yaxis[i].show&&n.config.yaxis[i].showAlways&&(r=!0,n.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(n.globals.ancillaryCollapsedSeries.push({index:i,data:a[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),n.globals.ancillaryCollapsedSeriesIndices.push(i))),!r){n.globals.collapsedSeries.push({index:i,data:a[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),n.globals.collapsedSeriesIndices.push(i);var o=n.globals.risingSeries.indexOf(i);n.globals.risingSeries.splice(o,1)}}else n.globals.collapsedSeries.push({index:i,data:a[i]}),n.globals.collapsedSeriesIndices.push(i);for(var s=e.childNodes,l=0;l0){for(var r=0;r-1&&(t[n].data=[])})):t.forEach((function(i,n){e.globals.collapsedSeriesIndices.indexOf(n)>-1&&(t[n]=0)})),t}}]),t}(),lt=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new st(this)}return r(t,[{key:"init",value:function(){var t=this.w,e=t.globals,i=t.config;if((i.legend.showForSingleSeries&&1===e.series.length||this.isBarsDistributed||e.series.length>1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),p.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,n=e.globals.seriesNames,a=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;n=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),a=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(n=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(n=e.config.legend.customLegendItems);for(var o=e.globals.legendFormatter,s=e.config.legend.inverseOrder,l=s?n.length-1:0;s?l>=0:l<=n.length-1;s?l--:l++){var c=o(n[l],{seriesIndex:l,w:e}),d=!1,h=!1;if(e.globals.collapsedSeries.length>0)for(var u=0;u0)for(var f=0;f0?l-10:0)+(c>0?c-10:0)}n.style.position="absolute",r=r+t+i.config.legend.offsetX,o=o+e+i.config.legend.offsetY,n.style.left=r+"px",n.style.top=o+"px","bottom"===i.config.legend.position?(n.style.top="auto",n.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(n.style.left="auto",n.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(t){n.style[t]&&(n.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var e=this.legendHelpers.getLegendBBox(),i=new ot(this.ctx),n=i.dimHelpers.getTitleSubtitleCoords("title"),a=i.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;"bottom"===t.config.legend.position?r=-e.clwh/1.8:"top"===t.config.legend.position&&(r=n.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,r)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var n=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,n,this.w]),new M(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new M(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,n="true"===t.target.getAttribute("data:collapsed"),a=this.w.config.chart.events.legendClick;"function"==typeof a&&a(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,n)}}}]),t}(),ct=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return r(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},n=i();if(n.setAttribute("class","apexcharts-toolbar"),n.style.top=e.config.chart.toolbar.offsetY+"px",n.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(n),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var a=0;a\n \n \n\n'),o("zoomOut",this.elZoomOut,'\n \n \n\n');var s=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};s("zoom"),s("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),o("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l0&&e.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,n={x:i,y:0,width:t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,n=t.width,a=t.height,r=t.translateX,o=void 0===r?0:r,s=t.translateY,l=void 0===s?0:s,c=this.w,d=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var u={transform:"translate("+o+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(n<0&&(n=1),d.attr({x:e,y:i,width:n,height:a,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),v.setAttrs(d.node,u)),c.globals.selectionEnabled&&(h.attr({x:e,y:i,width:n>0?n:0,height:a>0?a:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),v.setAttrs(h.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e,i=t.context,n=t.zoomtype,a=this.w,r=i,o=this.gridRect.getBoundingClientRect(),s=r.startX-1,l=r.startY,c=!1,d=!1,h=r.clientX-o.left-s,u=r.clientY-o.top-l;return Math.abs(h+s)>a.globals.gridWidth?h=a.globals.gridWidth-s:r.clientX-o.left<0&&(h=s),s>r.clientX-o.left&&(c=!0,h=Math.abs(h)),l>r.clientY-o.top&&(d=!0,u=Math.abs(u)),e="x"===n?{x:c?s-h:s,y:0,width:h,height:a.globals.gridHeight}:"y"===n?{x:0,y:d?l-u:l,width:a.globals.gridWidth,height:u}:{x:c?s-h:s,y:d?l-u:l,width:h,height:u},r.drawSelectionRect(e),r.selectionDragging("resizing"),e}},{key:"selectionDragging",value:function(t,e){var i=this,n=this.w,a=this.xyRatios,r=this.selectionRect,o=0;"resizing"===t&&(o=30);var s=function(t){return parseFloat(r.node.getAttribute(t))},l={x:s("x"),y:s("y"),width:s("width"),height:s("height")};n.globals.selection=l,"function"==typeof n.config.chart.events.selection&&n.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t=i.gridRect.getBoundingClientRect(),e=r.node.getBoundingClientRect(),o={xaxis:{min:n.globals.xAxisScale.niceMin+(e.left-t.left)*a.xRatio,max:n.globals.xAxisScale.niceMin+(e.right-t.left)*a.xRatio},yaxis:{min:n.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*a.yRatio[0],max:n.globals.yAxisScale[0].niceMax-(e.top-t.top)*a.yRatio[0]}};n.config.chart.events.selection(i.ctx,o),n.config.chart.brush.enabled&&void 0!==n.config.chart.events.brushScrolled&&n.config.chart.events.brushScrolled(i.ctx,o)}),o))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,n=this.w,a=e,r=this.xyRatios,o=this.ctx.toolbar;if(a.startX>a.endX){var s=a.startX;a.startX=a.endX,a.endX=s}if(a.startY>a.endY){var l=a.startY;a.startY=a.endY,a.endY=l}var c=void 0,d=void 0;n.globals.isRangeBar?(c=n.globals.yAxisScale[0].niceMin+a.startX*r.invertedYRatio,d=n.globals.yAxisScale[0].niceMin+a.endX*r.invertedYRatio):(c=n.globals.xAxisScale.niceMin+a.startX*r.xRatio,d=n.globals.xAxisScale.niceMin+a.endX*r.xRatio);var h=[],u=[];if(n.config.yaxis.forEach((function(t,e){h.push(n.globals.yAxisScale[e].niceMax-r.yRatio[e]*a.startY),u.push(n.globals.yAxisScale[e].niceMax-r.yRatio[e]*a.endY)})),a.dragged&&(a.dragX>10||a.dragY>10)&&c!==d)if(n.globals.zoomEnabled){var f=p.clone(n.globals.initialConfig.yaxis),g=p.clone(n.globals.initialConfig.xaxis);if(n.globals.zoomed=!0,n.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),d=Math.floor(d),c<1&&(c=1,d=n.globals.dataPoints),d-c<2&&(d=c+1)),"xy"!==i&&"x"!==i||(g={min:c,max:d}),"xy"!==i&&"y"!==i||f.forEach((function(t,e){f[e].min=u[e],f[e].max=h[e]})),n.config.chart.zoom.autoScaleYaxis){var m=new X(a.ctx);f=m.autoScaleY(a.ctx,f,{xaxis:g})}if(o){var v=o.getBeforeZoomRange(g,f);v&&(g=v.xaxis?v.xaxis:g,f=v.yaxis?v.yaxis:f)}var b={xaxis:g};n.config.chart.group||(b.yaxis=f),a.ctx.updateHelpers._updateOptions(b,!1,a.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof n.config.chart.events.zoomed&&o.zoomCallback(g,f)}else if(n.globals.selectionEnabled){var y,x=null;y={min:c,max:d},"xy"!==i&&"y"!==i||(x=p.clone(n.config.yaxis)).forEach((function(t,e){x[e].min=u[e],x[e].max=h[e]})),n.globals.selection=a.selection,"function"==typeof n.config.chart.events.selection&&n.config.chart.events.selection(a.ctx,{xaxis:y,yaxis:x})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,n=e;if(void 0!==i.globals.lastClientPosition.x){var a=i.globals.lastClientPosition.x-n.clientX,r=i.globals.lastClientPosition.y-n.clientY;Math.abs(a)>Math.abs(r)&&a>0?this.moveDirection="left":Math.abs(a)>Math.abs(r)&&a<0?this.moveDirection="right":Math.abs(r)>Math.abs(a)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(a)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:n.clientX,y:n.clientY};var o=i.globals.isRangeBar?i.globals.minY:i.globals.minX,s=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||n.panScrolled(o,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,n=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+n,i=t.globals.maxX+n):"right"===this.moveDirection&&(e=t.globals.minX-n,i=t.globals.maxX-n),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,n=this.xyRatios,a=p.clone(i.globals.initialConfig.yaxis),r=n.xRatio,o=i.globals.minX,s=i.globals.maxX;i.globals.isRangeBar&&(r=n.invertedYRatio,o=i.globals.minY,s=i.globals.maxY),"left"===this.moveDirection?(t=o+i.globals.gridWidth/15*r,e=s+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=o-i.globals.gridWidth/15*r,e=s-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=o,e=s);var l={min:t,max:e};i.config.chart.zoom.autoScaleYaxis&&(a=new X(this.ctx).autoScaleY(this.ctx,a,{xaxis:l}));var c={xaxis:{min:t,max:e}};i.config.chart.group||(c.yaxis=a),this.updateScrolledChart(c,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var n=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof n.config.chart.events.scrolled&&n.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),i}(ct),ht=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return r(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,n=t.clientX,a=t.clientY,r=this.w,o=i.getBoundingClientRect(),s=o.width,l=o.height,c=s/(r.globals.dataPoints-1),d=l/r.globals.dataPoints,h=this.hasBars();!r.globals.comboCharts&&!h||r.config.xaxis.convertedCatToNumeric||(c=s/r.globals.dataPoints);var u=n-o.left-r.globals.barPadForNumericAxis,f=a-o.top;u<0||f<0||u>s||f>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(u/c),m=Math.floor(f/d);h&&!r.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(u/c),g-=1);var v=null,b=null,y=[],x=[];if(r.globals.seriesXvalues.forEach((function(t){y.push([t[0]+1e-6].concat(t))})),r.globals.seriesYvalues.forEach((function(t){x.push([t[0]+1e-6].concat(t))})),y=y.map((function(t){return t.filter((function(t){return p.isNumber(t)}))})),x=x.map((function(t){return t.filter((function(t){return p.isNumber(t)}))})),r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),_=u*(w.width/s),k=f*(w.height/l);v=(b=this.closestInMultiArray(_,k,y,x)).index,g=b.j,null!==v&&(y=r.globals.seriesXvalues[v],g=(b=this.closestInArray(_,y)).index)}return r.globals.capturedSeriesIndex=null===v?-1:v,(!g||g<1)&&(g=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=m:r.globals.capturedDataPointIndex=g,{capturedSeries:v,j:r.globals.isBarHorizontal?m:g,hoverX:u,hoverY:f}}},{key:"closestInMultiArray",value:function(t,e,i,n){var a=this.w,r=0,o=null,s=-1;a.globals.series.length>1?r=this.getFirstActiveXArray(i):o=0;var l=i[r][0],c=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var n=Math.abs(t-e);n0?e:-1})),a=0;a0)for(var n=0;ni?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var n=i.allTooltipSeriesGroups,a=0;a ').concat(i.attrs.name,""),e+="
        ".concat(i.val,"
        ")})),b.innerHTML=t+"",y.innerHTML=e+""};o?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?x():(b.innerHTML="",y.innerHTML=""):x()}else b.innerHTML="",y.innerHTML="";null!==p&&(n[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,n[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),o&&g[0]&&(null==d||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,n=this.w,a=this.ctx.series.filteredSeriesX(),r="",o="",s=null,l=null,c={series:n.globals.series,seriesIndex:e,dataPointIndex:i,w:n},d=n.globals.ttZFormatter;null===i?l=n.globals.series[e]:n.globals.isXNumeric&&"treemap"!==n.config.chart.type?(r=a[e][i],0===a[e].length&&(r=a[this.tooltipUtil.getFirstActiveXArray(a)][i])):r=void 0!==n.globals.labels[i]?n.globals.labels[i]:"";var h=r;return r=n.globals.isXNumeric&&"datetime"===n.config.xaxis.type?new z(this.ctx).xLabelFormat(n.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new L(this.ctx).formatDate,w:this.w}):n.globals.isBarHorizontal?n.globals.yLabelFormatters[0](h,c):n.globals.xLabelFormatter(h,c),void 0!==n.config.tooltip.x.formatter&&(r=n.globals.ttKeyFormatter(h,c)),n.globals.seriesZ.length>0&&n.globals.seriesZ[e].length>0&&(s=d(n.globals.seriesZ[e][i],n)),o="function"==typeof n.config.xaxis.tooltip.formatter?n.globals.xaxisTooltipFormatter(h,c):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(o)?o.join(" "):o,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,n=t.y1,a=t.y2,r=t.w,o=this.ttCtx.getElTooltip(),s=r.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]),o.innerHTML=s({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:n,y2:a,w:r})}}]),t}(),ft=function(){function t(e){n(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return r(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,n=this.w,a=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,o=n.globals.labels.slice().length;if(null!==e&&(r=n.globals.gridWidth/o*e),null===a||n.globals.isBarHorizontal||(a.setAttribute("x",r),a.setAttribute("x1",r),a.setAttribute("x2",r),a.setAttribute("y2",n.globals.gridHeight),a.classList.add("apexcharts-active")),r<0&&(r=0),r>n.globals.gridWidth&&(r=n.globals.gridWidth),i.isXAxisTooltipEnabled){var s=r;"tickWidth"!==n.config.xaxis.crosshairs.width&&"barWidth"!==n.config.xaxis.crosshairs.width||(s=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&v.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&v.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var n,a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t))t+=e.globals.translateX,n=new v(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=n.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var n=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),a=e.globals.translateY+n,r=i.yaxisTTEls[t].getBoundingClientRect().height,o=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(o-=26),a-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=a+"px",i.yaxisTTEls[t].style.left=o+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,a=this.ttCtx,r=a.getElTooltip(),o=a.tooltipRect,s=null!==i?parseFloat(i):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>n.globals.gridWidth/2&&(l=l-o.ttWidth-s-10),l>n.globals.gridWidth-o.ttWidth-10&&(l=n.globals.gridWidth-o.ttWidth),l<-20&&(l=-20),n.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();c=a.e.clientY+n.globals.translateY-d.top-o.ttHeight/2}else n.globals.isBarHorizontal||(o.ttHeight/2+c>n.globals.gridHeight&&(c=n.globals.gridHeight-o.ttHeight+n.globals.translateY),c<0&&(c=0));isNaN(l)||(l+=n.globals.translateX,r.style.left=l+"px",r.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,n=this.ttCtx;if(i.globals.markers.size[t]>0)for(var a=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0&&(c.setAttribute("r",s),c.setAttribute("cx",i),c.setAttribute("cy",n)),this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,n,s)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,n=i.w,a=0,r=0,o=n.globals.pointsArray;e=new M(this.ctx).getActiveConfigSeriesIndex(!0);var s=i.tooltipUtil.getHoverMarkerSize(e);o[e]&&(a=o[e][t][0],r=o[e][t][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c0?(l[c]&&l[c].setAttribute("r",s),l[c]&&l[c].setAttribute("cy",h)):l[c]&&l[c].setAttribute("r",0)}}if(this.moveXCrosshairs(a),!i.fixedTooltip){var u=r||n.globals.gridHeight;this.moveTooltip(a,u,s)}}},{key:"moveStickyTooltipOverBars",value:function(t){var e=this.w,i=this.ttCtx,n=e.globals.columnSeries?e.globals.columnSeries.length:e.globals.series.length,a=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;e.globals.isBarHorizontal&&(a=new M(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var r=e.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(a,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(a,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(a,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(a,"'] path[j='").concat(t,"']")),o=r?parseFloat(r.getAttribute("cx")):0,s=r?parseFloat(r.getAttribute("cy")):0,l=r?parseFloat(r.getAttribute("barWidth")):0,c=r?parseFloat(r.getAttribute("barHeight")):0,d=i.getElGrid().getBoundingClientRect(),h=r.classList.contains("apexcharts-candlestick-area")||r.classList.contains("apexcharts-boxPlot-area");if(e.globals.isXNumeric?(r&&!h&&(o-=n%2!=0?l/2:0),r&&h&&e.globals.comboCharts&&(o-=l/2)):e.globals.isBarHorizontal||(o=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(o)&&(o=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),e.globals.isBarHorizontal?(s>e.globals.gridHeight/2&&(s-=i.tooltipRect.ttHeight),(s=s+e.config.grid.padding.top+c/3)+c>e.globals.gridHeight&&(s=e.globals.gridHeight-c)):e.config.tooltip.followCursor?s=i.e.clientY-d.top-i.tooltipRect.ttHeight/2:s+i.tooltipRect.ttHeight+15>e.globals.gridHeight&&(s=e.globals.gridHeight),s<-10&&(s=-10),e.globals.isBarHorizontal||this.moveXCrosshairs(o),!i.fixedTooltip){var u=s||e.globals.gridHeight;this.moveTooltip(o,u)}}}]),t}(),pt=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new ft(e)}return r(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new v(this.ctx),i=new T(this.ctx),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");n=h(n),t.config.chart.stacked&&n.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=this.w;"bubble"!==a.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),o=e.getAttribute("cy");if(null!==i&&null!==n&&(r=i,o=n),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===a.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(r,o,a.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,n=this.ttCtx,a=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),o=e.config.markers.hover.size,s=0;s=0?t[e].setAttribute("r",i):t[e].setAttribute("r",0)}}}]),t}(),gt=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e}return r(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,n=t.x,a=t.y,r=t.type,o=this.ttCtx,s=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),c=this.getAttr(e,"j"),d=this.getAttr(e,"cx"),h=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),f=this.getAttr(e,"height");if(o.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:e}),s.globals.capturedSeriesIndex=l,s.globals.capturedDataPointIndex=c,n=d+o.tooltipRect.ttWidth/2+u,a=h+o.tooltipRect.ttHeight/2-f/2,o.tooltipPosition.moveXCrosshairs(d+u/2),n>s.globals.gridWidth/2&&(n=d-o.tooltipRect.ttWidth/2+u),o.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();n=s.globals.clientX-p.left-(n>s.globals.gridWidth/2?o.tooltipRect.ttWidth:0),a=s.globals.clientY-p.top-(a>s.globals.gridHeight/2?o.tooltipRect.ttHeight:0)}}return{x:n,y:a}}},{key:"handleMarkerTooltip",value:function(t){var e,i,n=t.e,a=t.opt,r=t.x,o=t.y,s=this.w,l=this.ttCtx;if(n.target.classList.contains("apexcharts-marker")){var c=parseInt(a.paths.getAttribute("cx"),10),d=parseInt(a.paths.getAttribute("cy"),10),h=parseFloat(a.paths.getAttribute("val"));if(i=parseInt(a.paths.getAttribute("rel"),10),e=parseInt(a.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=p.findAncestor(a.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:e,j:i,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:n}),"mouseup"===n.type&&l.markerClick(n,e,i),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=i,r=c,o=d+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();o=l.e.clientY+s.globals.translateY-f.top}h<0&&(o=d),l.marker.enlargeCurrentPoint(i,a.paths,r,o)}return{x:r,y:o}}},{key:"handleBarTooltip",value:function(t){var e,i,n=t.e,a=t.opt,r=this.w,o=this.ttCtx,s=o.getElTooltip(),l=0,c=0,d=0,h=this.getBarTooltipXY({e:n,opt:a});e=h.i;var u=h.barHeight,f=h.j;r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=f,r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared?(c=h.x,d=h.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=c):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(d)?d=r.globals.svgHeight-o.tooltipRect.ttHeight:d<0&&(d=0);var p=parseInt(a.paths.parentNode.getAttribute("data:realIndex"),10),g=r.globals.isMultipleYAxis?r.config.yaxis[p]&&r.config.yaxis[p].reversed:r.config.yaxis[0].reversed;if(c+o.tooltipRect.ttWidth>r.globals.gridWidth&&!g?c-=o.tooltipRect.ttWidth:c<0&&(c=0),o.w.config.tooltip.followCursor){var m=o.getElGrid().getBoundingClientRect();d=o.e.clientY-m.top}null===o.tooltip&&(o.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(l+i/2):o.tooltipPosition.moveXCrosshairs(l)),!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(g&&(c-=o.tooltipRect.ttWidth)<0&&(c=0),!g||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||(d=d+u-2*(r.globals.series[e][f]<0?u:0)),o.tooltipRect.ttHeight+d>r.globals.gridHeight?d=r.globals.gridHeight-o.tooltipRect.ttHeight+r.globals.translateY:(d=d+r.globals.translateY-o.tooltipRect.ttHeight/2)<0&&(d=0),s.style.left=c+r.globals.translateX+"px",s.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(t){var e=t.e,i=t.opt,n=this.w,a=null,r=this.ttCtx,o=0,s=0,l=0,c=0,d=0,h=e.target.classList;if(h.contains("apexcharts-bar-area")||h.contains("apexcharts-candlestick-area")||h.contains("apexcharts-boxPlot-area")||h.contains("apexcharts-rangebar-area")){var u=e.target,f=u.getBoundingClientRect(),p=i.elGrid.getBoundingClientRect(),g=f.height;d=f.height;var m=f.width,v=parseInt(u.getAttribute("cx"),10),b=parseInt(u.getAttribute("cy"),10);c=parseFloat(u.getAttribute("barWidth"));var y="touchmove"===e.type?e.touches[0].clientX:e.clientX;a=parseInt(u.getAttribute("j"),10),o=parseInt(u.parentNode.getAttribute("rel"),10)-1;var x=u.getAttribute("data-range-y1"),w=u.getAttribute("data-range-y2");n.globals.comboCharts&&(o=parseInt(u.parentNode.getAttribute("data:realIndex"),10)),r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:o,j:a,y1:x?parseInt(x,10):null,y2:w?parseInt(w,10):null,shared:!r.showOnIntersect&&n.config.tooltip.shared,e:e}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(s=y-p.left+15,l=b-r.dataPointsDividedHeight+g/2-r.tooltipRect.ttHeight/2):(s=n.globals.isXNumeric?v-m/2:v-r.dataPointsDividedWidth+m/2,l=e.clientY-p.top-r.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((s=v)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var n=this.ttCtx,a=this.w,r=a.globals.yLabelFormatters[t];if(n.yaxisTooltips[t]){var o=n.getElGrid().getBoundingClientRect(),s=(e-o.top)*i.yRatio[t],l=a.globals.maxYArr[t]-a.globals.minYArr[t],c=a.globals.minYArr[t]+(l-s);n.tooltipPosition.moveYCrosshairs(e-o.top),n.yaxisTooltipText[t].innerHTML=r(c),n.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),vt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new ht(this),this.tooltipLabels=new ut(this),this.tooltipPosition=new ft(this),this.marker=new pt(this),this.intersect=new gt(this),this.axesTooltip=new mt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!i.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return r(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var n=new $(this.ctx);this.xAxisTicksPositions=n.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var a=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(a=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(a),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,n=[],a=this.getElTooltip(),r=function(r){var o=document.createElement("div");o.classList.add("apexcharts-tooltip-series-group"),o.style.order=i.config.tooltip.inverseOrder?t-r:r+1,e.tConfig.shared&&e.tConfig.enabledOnSeries&&Array.isArray(e.tConfig.enabledOnSeries)&&e.tConfig.enabledOnSeries.indexOf(r)<0&&o.classList.add("apexcharts-tooltip-series-group-hidden");var s=document.createElement("span");s.classList.add("apexcharts-tooltip-marker"),s.style.backgroundColor=i.globals.colors[r],o.appendChild(s);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var n=document.createElement("span");n.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(n),l.appendChild(e)})),o.appendChild(l),a.appendChild(o),n.push(o)},o=0;o0&&this.addPathsEventListeners(f,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),n=i.width+10,a=i.height+10,r=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(r=r+t.globals.svgWidth-n+10),s.indexOf("bottom")>-1&&(o=o+t.globals.svgHeight-a-10),e.style.left=r+"px",e.style.top=o+"px",{x:r,y:o,ttWidth:n,ttHeight:a}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,n=function(n){var a={paths:t[n],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[n].addEventListener(e,i.onSeriesHover.bind(i,a),{capture:!1,passive:!0})}))},a=0;a=100?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),100-n))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var n=[],a=this.w;a.config.chart.group&&(n=this.ctx.getGroupedCharts()),a.globals.axisCharts&&(a.globals.minX===-1/0&&a.globals.maxX===1/0||0===a.globals.dataPoints)||(n.length?n.forEach((function(n){var a=i.getElTooltip(n),r={paths:t.paths,tooltipEl:a,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===i.w.globals.minX&&n.w.globals.maxX===i.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,n=t.opt,a=t.e,r=e.w,o=this.getElTooltip();o&&(i.tooltipRect={x:0,y:0,ttWidth:o.getBoundingClientRect().width,ttHeight:o.getBoundingClientRect().height},i.e=a,!i.tooltipUtil.hasBars()||r.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new M(e).toggleSeriesOnHover(a,a.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:a,opt:n,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:a,opt:n,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,i,n=t.e,a=t.opt,r=this.w,o=a.elGrid.getBoundingClientRect(),s="touchmove"===n.type?n.touches[0].clientX:n.clientX,l="touchmove"===n.type?n.touches[0].clientY:n.clientY;if(this.clientY=l,this.clientX=s,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,lo.top+o.height)this.handleMouseOut(a);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var c=parseInt(a.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(a)}var d=this.getElTooltip(),h=this.getElXCrosshairs(),u=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===n.type||"touchmove"===n.type||"mouseup"===n.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(n,s,l,a);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var p=this.intersect.handleHeatTreeTooltip({e:n,opt:a,x:e,y:i,type:r.config.chart.type});e=p.x,i=p.y,d.style.left=e+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:n,opt:a}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:n,opt:a,x:e,y:i});if(this.yaxisTooltips.length)for(var g=0;gl.width?this.handleMouseOut(n):null!==s?this.handleStickyCapturedSeries(t,s,n,o):(this.tooltipUtil.isXoverlap(o)||a.globals.isBarHorizontal)&&this.create(t,this,0,o,n.ttItems)}},{key:"handleStickyCapturedSeries",value:function(t,e,i,n){var a=this.w;this.tConfig.shared||null!==a.globals.series[e][n]?void 0!==a.globals.series[e][n]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(n)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,n,i.ttItems):this.create(t,this,e,n,i.ttItems,!1):this.tooltipUtil.isXoverlap(n)&&this.create(t,this,0,n,i.ttItems):this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new v(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),n=0;n5&&void 0!==arguments[5]?arguments[5]:null,o=this.w,s=e;"mouseup"===t.type&&this.markerClick(t,i,n),null===r&&(r=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),c=this.tooltipUtil.getElBars();if(o.config.legend.tooltipHoverFormatter){var d=o.config.legend.tooltipHoverFormatter,h=Array.from(this.legendLabels);h.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var u=0;u0?s.marker.enlargePoints(n):s.tooltipPosition.moveDynamicPointsOnHover(n)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var b=new v(this.ctx),y=o.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(n,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(n);for(var x=0;x0&&(this.totalItems+=t[o].length);for(var s=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,c=0,d=function(r,o){var d=void 0,h=void 0,u=void 0,f=void 0,g=[],m=[],v=a.globals.comboCharts?i[r]:r;n.yRatio.length>1&&(n.yaxisIndex=v),n.isReversed=a.config.yaxis[n.yaxisIndex]&&a.config.yaxis[n.yaxisIndex].reversed;var b=n.graphics.group({class:"apexcharts-series",seriesName:p.escapeString(a.globals.seriesNames[v]),rel:r+1,"data:realIndex":v});n.ctx.series.addCollapsedClassToSeries(b,v);var y=n.graphics.group({class:"apexcharts-datalabels","data:realIndex":v}),x=0,w=0,_=n.initialPositions(l,c,d,h,u,f);c=_.y,x=_.barHeight,h=_.yDivision,f=_.zeroW,l=_.x,w=_.barWidth,d=_.xDivision,u=_.zeroH,n.yArrj=[],n.yArrjF=[],n.yArrjVal=[],n.xArrj=[],n.xArrjF=[],n.xArrjVal=[],1===n.prevY.length&&n.prevY[0].every((function(t){return isNaN(t)}))&&(n.prevY[0]=n.prevY[0].map((function(t){return u})),n.prevYF[0]=n.prevYF[0].map((function(t){return 0})));for(var k=0;k1?(i=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:s*parseInt(l.config.plotOptions.bar.columnWidth,10)/100,a=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=l.globals.padHorizontal+(i-s)/2),{x:t,y:e,yDivision:n,xDivision:i,barHeight:o,barWidth:s,zeroH:a,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,n=t.barHeight,a=t.strokeWidth,r=t.zeroW,o=t.x,s=t.y,l=t.yDivision,c=t.elSeries,d=this.w,h=s,u=i.i,f=i.j,p=0,g=0;g0){var m=r;this.prevXVal[u-1][f]<0?m=this.series[u][f]>=0?this.prevX[u-1][f]+p-2*(this.isReversed?p:0):this.prevX[u-1][f]:this.prevXVal[u-1][f]>=0&&(m=this.series[u][f]>=0?this.prevX[u-1][f]:this.prevX[u-1][f]-p+2*(this.isReversed?p:0)),e=m}else e=r;o=null===this.series[u][f]?e:e+this.series[u][f]/this.invertedYRatio-2*(this.isReversed?this.series[u][f]/this.invertedYRatio:0);var v=this.barHelpers.getBarpaths({barYPosition:h,barHeight:n,x1:e,x2:o,strokeWidth:a,series:this.series,realIndex:i.realIndex,i:u,j:f,w:d});return this.barHelpers.barBackground({j:f,i:u,y1:h,y2:n,elSeries:c}),s+=l,{pathTo:v.pathTo,pathFrom:v.pathFrom,x:o,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,n=t.y,a=t.xDivision,r=t.barWidth,o=t.zeroH;t.strokeWidth;var s=t.elSeries,l=this.w,c=e.i,d=e.j,h=e.bc;if(l.globals.isXNumeric){var u=l.globals.seriesX[c][d];u||(u=0),i=(u-l.globals.minX)/this.xRatio-r/2}for(var f,p=i,g=0,m=0;m0&&!l.globals.isXNumeric||c>0&&l.globals.isXNumeric&&l.globals.seriesX[c-1][d]===l.globals.seriesX[c][d]){var v,b,y=Math.min(this.yRatio.length+1,c+1);if(void 0!==this.prevY[c-1])for(var x=1;x=0?b-g+2*(this.isReversed?g:0):b;break}if(this.prevYVal[c-w][d]>=0){v=this.series[c][d]>=0?b:b+g-2*(this.isReversed?g:0);break}}void 0===v&&(v=l.globals.gridHeight),f=this.prevYF[0].every((function(t){return 0===t}))&&this.prevYF.slice(1,c).every((function(t){return t.every((function(t){return isNaN(t)}))}))?l.globals.gridHeight-o:v}else f=l.globals.gridHeight-o;n=f-this.series[c][d]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[c][d]/this.yRatio[this.yaxisIndex]:0);var _=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:r,y1:f,y2:n,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:e.realIndex,i:c,j:d,w:l});return this.barHelpers.barBackground({bc:h,j:d,i:c,x1:p,x2:r,elSeries:s}),i+=a,{pathTo:_.pathTo,pathFrom:_.pathFrom,x:l.globals.isXNumeric?i-a:i,y:n}}}]),a}(O),yt=function(t){s(a,t);var i=d(a);function a(){return n(this,a),i.apply(this,arguments)}return r(a,[{key:"draw",value:function(t,i){var n=this,a=this.w,r=new v(this.ctx),o=new A(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal;var s=new b(this.ctx,a);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var l=r.group({class:"apexcharts-".concat(a.config.chart.type,"-series apexcharts-plot-series")}),c=function(s){n.isBoxPlot="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[s].type;var c,d,h,u,f,g,m=void 0,v=void 0,b=[],y=[],x=a.globals.comboCharts?i[s]:s,w=r.group({class:"apexcharts-series",seriesName:p.escapeString(a.globals.seriesNames[x]),rel:s+1,"data:realIndex":x});n.ctx.series.addCollapsedClassToSeries(w,x),t[s].length>0&&(n.visibleI=n.visibleI+1),n.yRatio.length>1&&(n.yaxisIndex=x);var _=n.barHelpers.initialPositions();v=_.y,f=_.barHeight,d=_.yDivision,u=_.zeroW,m=_.x,g=_.barWidth,c=_.xDivision,h=_.zeroH,y.push(m+g/2);for(var k=r.group({class:"apexcharts-datalabels","data:realIndex":x}),S=function(i){var r=n.barHelpers.getStrokeWidth(s,i,x),l=null,p={indexes:{i:s,j:i,realIndex:x},x:m,y:v,strokeWidth:r,elSeries:w};l=n.isHorizontal?n.drawHorizontalBoxPaths(e(e({},p),{},{yDivision:d,barHeight:f,zeroW:u})):n.drawVerticalBoxPaths(e(e({},p),{},{xDivision:c,barWidth:g,zeroH:h})),v=l.y,m=l.x,i>0&&y.push(m+g/2),b.push(v),l.pathTo.forEach((function(e,c){var d=!n.isBoxPlot&&n.candlestickOptions.wick.useFillColor?l.color[c]:a.globals.stroke.colors[s],h=o.fillPath({seriesNumber:x,dataPointIndex:i,color:l.color[c],value:t[s][i]});n.renderSeries({realIndex:x,pathFill:h,lineFill:d,j:i,i:s,pathFrom:l.pathFrom,pathTo:e,strokeWidth:r,elSeries:w,x:m,y:v,series:t,barHeight:f,barWidth:g,elDataLabelsWrap:k,visibleSeries:n.visibleI,type:a.config.chart.type})}))},C=0;Cb.c&&(h=!1);var w=Math.min(b.o,b.c),_=Math.max(b.o,b.c),k=b.m;s.globals.isXNumeric&&(i=(s.globals.seriesX[m][d]-s.globals.minX)/this.xRatio-a/2);var S=i+a*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(w=r,_=r):(w=r-w/g,_=r-_/g,y=r-b.h/g,x=r-b.l/g,k=r-b.m/g);var C=l.move(S,r),A=l.move(S+a/2,w);return s.globals.previousPaths.length>0&&(A=this.getPreviousPath(m,d,!0)),C=this.isBoxPlot?[l.move(S,w)+l.line(S+a/2,w)+l.line(S+a/2,y)+l.line(S+a/4,y)+l.line(S+a-a/4,y)+l.line(S+a/2,y)+l.line(S+a/2,w)+l.line(S+a,w)+l.line(S+a,k)+l.line(S,k)+l.line(S,w+o/2),l.move(S,k)+l.line(S+a,k)+l.line(S+a,_)+l.line(S+a/2,_)+l.line(S+a/2,x)+l.line(S+a-a/4,x)+l.line(S+a/4,x)+l.line(S+a/2,x)+l.line(S+a/2,_)+l.line(S,_)+l.line(S,k)+"z"]:[l.move(S,_)+l.line(S+a/2,_)+l.line(S+a/2,y)+l.line(S+a/2,_)+l.line(S+a,_)+l.line(S+a,w)+l.line(S+a/2,w)+l.line(S+a/2,x)+l.line(S+a/2,w)+l.line(S,w)+l.line(S,_-o/2)],A+=l.move(S,w),s.globals.isXNumeric||(i+=n),{pathTo:C,pathFrom:A,x:i,y:_,barXPosition:S,color:this.isBoxPlot?p:h?[u]:[f]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,n=t.yDivision,a=t.barHeight,r=t.zeroW,o=t.strokeWidth,s=this.w,l=new v(this.ctx),c=e.i,d=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,f=e.realIndex,p=this.getOHLCValue(f,d),g=r,m=r,b=Math.min(p.o,p.c),y=Math.max(p.o,p.c),x=p.m;s.globals.isXNumeric&&(i=(s.globals.seriesX[f][d]-s.globals.minX)/this.invertedXRatio-a/2);var w=i+a*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(b=r,y=r):(b=r+b/u,y=r+y/u,g=r+p.h/u,m=r+p.l/u,x=r+p.m/u);var _=l.move(r,w),k=l.move(b,w+a/2);return s.globals.previousPaths.length>0&&(k=this.getPreviousPath(f,d,!0)),_=[l.move(b,w)+l.line(b,w+a/2)+l.line(g,w+a/2)+l.line(g,w+a/2-a/4)+l.line(g,w+a/2+a/4)+l.line(g,w+a/2)+l.line(b,w+a/2)+l.line(b,w+a)+l.line(x,w+a)+l.line(x,w)+l.line(b+o/2,w),l.move(x,w)+l.line(x,w+a)+l.line(y,w+a)+l.line(y,w+a/2)+l.line(m,w+a/2)+l.line(m,w+a-a/4)+l.line(m,w+a/4)+l.line(m,w+a/2)+l.line(y,w+a/2)+l.line(y,w)+l.line(x,w)+"z"],k+=l.move(b,w),s.globals.isXNumeric||(i+=n),{pathTo:_,pathFrom:k,x:y,y:i,barYPosition:w,color:h}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),a}(O),xt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,n){var a=this.w,r=1,o=a.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,i);a.globals.hasNegs||n?r=a.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*o):(1-s.percent/100)*(1.25*o):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(r=1-s.percent/100,"treemap"===t&&(r=(1-s.percent/100)*(1.25*o)));var l=s.color,c=new p;return a.config.plotOptions[t].enableShades&&(l="dark"===this.w.config.theme.mode?p.hexToRgba(c.shadeColor(-1*r,s.color),a.config.fill.opacity):p.hexToRgba(c.shadeColor(r,s.color),a.config.fill.opacity)),{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,i){var n=this.w,a=n.globals.series[e][i],r=n.config.plotOptions[t],o=r.colorScale.inverse?i:e;r.distributed&&"treemap"===n.config.chart.type&&(o=i);var s=n.globals.colors[o],l=null,c=Math.min.apply(Math,h(n.globals.series[e])),d=Math.max.apply(Math,h(n.globals.series[e]));r.distributed||"heatmap"!==t||(c=n.globals.minY,d=n.globals.maxY),void 0!==r.colorScale.min&&(c=r.colorScale.minn.globals.maxY?r.colorScale.max:n.globals.maxY);var u=Math.abs(d)+Math.abs(c),f=100*a/(0===u?u-1e-6:u);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(a>=t.from&&a<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,d=t.to;var i=Math.abs(d)+Math.abs(c);f=100*a/(0===i?i-1e-6:i)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,n=t.y,a=t.i,r=t.j,o=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new v(this.ctx),d=new I(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var u=l.offsetX,f=l.offsetY,p=i+u,g=n+parseFloat(l.style.fontSize)/3+f;d.plotDataLabelsText({x:p,y:g,text:e,i:a,j:r,color:o.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new v(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),wt=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new xt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return r(t,[{key:"draw",value:function(t){var e=this.w,i=new v(this.ctx),n=i.group({class:"apexcharts-heatmap"});n.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var a=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,o=0,s=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(s=!0,l.reverse());for(var c=s?0:l.length-1;s?c=0;s?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:p.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new m(this.ctx).dropShadow(d,h,c)}for(var u=0,f=e.config.plotOptions.heatmap.shadeIntensity,g=0;g-1&&this.pieClicked(h),i.config.dataLabels.enabled){var k=w.x,S=w.y,C=100*f/this.fullAngle+"%";if(0!==f&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(n+o):n+o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(s=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(s)>this.fullAngle&&(s-=this.fullAngle);var l=Math.PI*(s-90)/180,c=e.centerX+a*Math.cos(o),d=e.centerY+a*Math.sin(o),h=e.centerX+a*Math.cos(l),u=e.centerY+a*Math.sin(l),f=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,s),g=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,r),m=n>180?1:0,v=["M",c,d,"A",a,a,0,m,1,h,u];return"donut"===e.chartType?[].concat(v,["L",f.x,f.y,"A",e.donutSize,e.donutSize,0,m,0,g.x,g.y,"L",c,d,"z"]).join(" "):"pie"===e.chartType||"polarArea"===e.chartType?[].concat(v,["L",e.centerX,e.centerY,"L",c,d]).join(" "):[].concat(v).join(" ")}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new X(this.ctx),n=new v(this.ctx),a=new _t(this.ctx),r=n.group(),o=n.group(),s=i.niceScale(0,Math.ceil(this.maxY),e.config.yaxis[0].tickAmount,0,!0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var d=e.globals.radialSize,h=d/(c-1),u=0;u1&&t.total.show&&(a=t.total.color);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),n||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=t.name.formatter(e,l,r),null!==o&&(o.textContent=e),null!==s&&(s.textContent=i),null!==o&&(o.style.fill=a)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,n=t.getAttribute("data:value"),a=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,a,n,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,n=new v(this.ctx),a=i.config.plotOptions.polarArea.spokes;if(0!==a.strokeWidth){for(var r=[],o=360/i.globals.series.length,s=0;s1)o&&!e.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(e,e.total.label,e.total.formatter(a));else if(l({makeSliceOut:!1,printLabel:!0}),!o)if(a.globals.selectedDataPoints.length&&a.globals.series.length>1)if(a.globals.selectedDataPoints[0].length>0){var c=a.globals.selectedDataPoints[0],d=a.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,e)}else r&&a.globals.selectedDataPoints.length&&0===a.globals.selectedDataPoints[0].length&&(r.style.opacity=0);else r&&a.globals.series.length>1&&(r.style.opacity=0)}}]),t}(),St=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var i=this.w;this.graphics=new v(this.ctx),this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=i.globals.svgHeight0&&(v=i.getPreviousPath(s));for(var b=0;b=10?t.x>0?(i="start",n+=10):t.x<0&&(i="end",n-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?a-=10:t.y>0&&(a+=10)),{textAnchor:i,newX:n,newY:a}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,n=0;n0&&parseInt(a.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[n].paths[0]&&(i=e.globals.previousPaths[n].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var n=[],a=0;a=360&&(u=360-Math.abs(this.startAngle)-.1);var f=i.drawPath({d:"",stroke:d,strokeWidth:o*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;a.dropShadow(f,p)}l.add(f),f.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(f,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return n}},{key:"drawArcs",value:function(t){var e=this.w,i=new v(this.ctx),n=new A(this.ctx),a=new m(this.ctx),r=i.group(),o=this.getStrokeWidth(t);t.size=t.size-o/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-o*t.series.length-this.margin*t.series.length-o*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,r,l,s));var d=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(d,h)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var f=null;this.radialDataLabels.show&&(f=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})),"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(d),f&&r.add(f));var g=!1;e.config.plotOptions.radialBar.inverseOrder&&(g=!0);for(var b=g?t.series.length-1:0;g?b>=0:b100?100:t.series[b])/100,S=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(_=this.startAngle,C=Math.round(this.totalAngle*p.negToZero(e.globals.previousPaths[b])/100)+_),Math.abs(S)+Math.abs(w)>=360&&(S-=.01),Math.abs(C)+Math.abs(_)>=360&&(C-=.01);var T=S-w,D=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[b]:e.config.stroke.dashArray,I=i.drawPath({d:"",stroke:x,strokeWidth:o,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+b,strokeDashArray:D});if(v.setAttrs(I.node,{"data:angle":T,"data:value":t.series[b]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;a.dropShadow(I,P,b)}a.setSelectionFilter(I,0,b),this.addListeners(I,this.radialDataLabels),y.add(I),I.attr({index:0,j:b});var M=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(M=e.config.chart.animations.speed),e.globals.dataChanged&&(M=e.config.chart.animations.dynamicAnimation.speed),this.animDur=M/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(I,{centerX:t.centerX,centerY:t.centerY,endAngle:S,startAngle:w,prevEndAngle:C,prevStartAngle:_,size:t.size,i:b,totalItems:2,animBeginArr:this.animBeginArr,dur:M,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:r,elHollow:d,dataLabels:f}}},{key:"drawHollow",value:function(t){var e=new v(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,n){var a=this.w,r=new A(this.ctx),o=p.randomId(),s=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:s,patternID:"pattern".concat(a.globals.cuid).concat(o)}),n="url(#pattern".concat(a.globals.cuid).concat(o,")");else{var l=a.config.plotOptions.radialBar.hollow.imageWidth,c=a.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var d=a.globals.dom.Paper.image(s).loaded((function(e){this.move(t.centerX-e.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(d)}else{var h=a.globals.dom.Paper.image(s).loaded((function(e){this.move(t.centerX-l/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return n}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}}]),i}(kt),At=function(){function t(e){n(this,t),this.w=e.w,this.lineCtx=e}return r(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if("line"===i.config.chart.type&&("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new b(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var n=e[t].slice();n[n.length-1]=n[n.length-1]+1e-6,e[t]=n}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,n=t.x,a=t.y,r=t.i,o=t.j,s=t.prevY,l=this.w,c=[],d=[];if(0===o){var h=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(h=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(h),d.push(p.isNumber(e[r][0])?s+l.config.markers.offsetY:null),c.push(n+l.config.markers.offsetX),d.push(p.isNumber(e[r][o+1])?a+l.config.markers.offsetY:null)}else c.push(n+l.config.markers.offsetX),d.push(p.isNumber(e[r][o+1])?a+l.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,n=t.realIndex,a=this.w,r=0;r0&&parseInt(o.realIndex,10)===parseInt(n,10)&&("line"===o.type?(this.lineCtx.appendPathFrom=!1,e=a.globals.previousPaths[r].paths[0].d):"area"===o.type&&(this.lineCtx.appendPathFrom=!1,i=a.globals.previousPaths[r].paths[0].d,a.config.stroke.show&&a.globals.previousPaths[r].paths[1]&&(e=a.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e=t.i,i=t.series,n=t.prevY,a=t.lineYPosition,r=this.w;if(void 0!==i[e][0])n=(a=r.config.chart.stacked&&e>0?this.lineCtx.prevSeriesY[e-1][0]:this.lineCtx.zeroY)-i[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?i[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(r.config.chart.stacked&&e>0&&void 0===i[e][0])for(var o=e-1;o>=0;o--)if(null!==i[o][0]&&void 0!==i[o][0]){n=a=this.lineCtx.prevSeriesY[o][0];break}return{prevY:n,lineYPosition:a}}}]),t}(),Tt=function(){function t(e,i,a){n(this,t),this.ctx=e,this.w=e.w,this.xyRatios=i,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||a,this.scatter=new D(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new At(this),this.markers=new T(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return r(t,[{key:"draw",value:function(t,e,i){var n=this.w,a=new v(this.ctx),r=n.globals.comboCharts?e:n.config.chart.type,o=a.group({class:"apexcharts-".concat(r,"-series apexcharts-plot-series")}),s=new b(this.ctx,n);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio);for(var l=[],c=0;c0&&(f=(n.globals.seriesX[d][0]-n.globals.minX)/this.xRatio),u.push(f);var p,g=f,m=g,y=this.zeroY;y=this.lineHelpers.determineFirstPrevY({i:c,series:t,prevY:y,lineYPosition:0}).prevY,h.push(y),p=y;var x=this._calculatePathsFrom({series:t,i:c,realIndex:d,prevX:m,prevY:y}),w=this._iterateOverDataPoints({series:t,realIndex:d,i:c,x:f,y:1,pX:g,pY:p,pathsFrom:x,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:u,yArrj:h});this._handlePaths({type:r,realIndex:d,i:c,paths:w}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(n.config.chart.stacked)for(var _=l.length;_>0;_--)o.add(l[_-1]);else for(var k=0;k1&&(this.yaxisIndex=i),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.zeroY=n.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?n.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>n.globals.gridHeight||"end"===n.config.plotOptions.area.fillTo)&&(this.areaBottomY=n.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=a.group({class:"apexcharts-series",seriesName:p.escapeString(n.globals.seriesNames[i])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":i});var r=t[e].length===n.globals.dataPoints;this.elSeries.attr({"data:longestSeries":r,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,n,a,r=t.series,o=t.i,s=t.realIndex,l=t.prevX,c=t.prevY,d=this.w,h=new v(this.ctx);if(null===r[o][0]){for(var u=0;u0){var f=this.lineHelpers.checkPreviousPaths({pathFromLine:n,pathFromArea:a,realIndex:s});n=f.pathFromLine,a=f.pathFromArea}return{prevX:l,prevY:c,linePath:e,areaPath:i,pathFromLine:n,pathFromArea:a}}},{key:"_handlePaths",value:function(t){var i=t.type,n=t.realIndex,a=t.i,r=t.paths,o=this.w,s=new v(this.ctx),l=new A(this.ctx);this.prevSeriesY.push(r.yArrj),o.globals.seriesXvalues[n]=r.xArrj,o.globals.seriesYvalues[n]=r.yArrj;var c=o.config.forecastDataPoints;if(c.count>0){var d=o.globals.seriesXvalues[n][o.globals.seriesXvalues[n].length-c.count-1],h=s.drawRect(d,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(h.node);var u=s.drawRect(0,0,d,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:n});var f={i:a,realIndex:n,animationDelay:a,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(i)};if("area"===i)for(var p=l.fillPath({seriesNumber:n}),g=0;g0){var k=s.renderPaths(w);k.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&k.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(k),k.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),_.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){for(var e=t.series,i=t.realIndex,n=t.i,a=t.x,r=t.y,o=t.pX,s=t.pY,l=t.pathsFrom,c=t.linePaths,d=t.areaPaths,h=t.seriesIndex,u=t.lineYPosition,f=t.xArrj,g=t.yArrj,m=this.w,b=new v(this.ctx),y=this.yRatio,x=l.prevY,w=l.linePath,_=l.areaPath,k=l.pathFromLine,S=l.pathFromArea,C=p.isNumber(m.globals.minYArr[i])?m.globals.minYArr[i]:m.globals.minY,A=m.globals.dataPoints>1?m.globals.dataPoints-1:m.globals.dataPoints,T=0;T0&&m.globals.collapsedSeries.length-1){e--;break}return e>=0?e:0}(n-1)][T+1]:this.zeroY,r=D?u-C/y[this.yaxisIndex]+2*(this.isReversed?C/y[this.yaxisIndex]:0):u-e[n][T+1]/y[this.yaxisIndex]+2*(this.isReversed?e[n][T+1]/y[this.yaxisIndex]:0),f.push(a),g.push(r);var P=this.lineHelpers.calculatePoints({series:e,x:a,y:r,realIndex:i,i:n,j:T,prevY:x}),M=this._createPaths({series:e,i:n,realIndex:i,j:T,x:a,y:r,pX:o,pY:s,linePath:w,areaPath:_,linePaths:c,areaPaths:d,seriesIndex:h});d=M.areaPaths,c=M.linePaths,o=M.pX,s=M.pY,_=M.areaPath,w=M.linePath,this.appendPathFrom&&(k+=b.line(a,this.zeroY),S+=b.line(a,this.zeroY)),this.handleNullDataPoints(e,P,n,T,i),this._handleMarkersAndLabels({pointsPos:P,series:e,x:a,y:r,prevY:x,i:n,j:T,realIndex:i})}return{yArrj:g,xArrj:f,pathFromArea:S,areaPaths:d,pathFromLine:k,linePaths:c}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.pointsPos;t.series,t.x,t.y,t.prevY;var i=t.i,n=t.j,a=t.realIndex,r=this.w,o=new I(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,n,{realIndex:a,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{r.globals.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var s=this.markers.plotChartMarkers(e,a,n+1);null!==s&&this.elPointsMain.add(s)}var l=o.drawDataLabel(e,a,n+1,null);null!==l&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(t){var e=t.series,i=t.i,n=t.realIndex,a=t.j,r=t.x,o=t.y,s=t.pX,l=t.pY,c=t.linePath,d=t.areaPath,h=t.linePaths,u=t.areaPaths,f=t.seriesIndex,p=this.w,g=new v(this.ctx),m=p.config.stroke.curve,b=this.areaBottomY;if(Array.isArray(p.config.stroke.curve)&&(m=Array.isArray(f)?p.config.stroke.curve[f[i]]:p.config.stroke.curve[i]),"smooth"===m){var y=.35*(r-s);p.globals.hasNullValues?(null!==e[i][a]&&(null!==e[i][a+1]?(c=g.move(s,l)+g.curve(s+y,l,r-y,o,r+1,o),d=g.move(s+1,l)+g.curve(s+y,l,r-y,o,r+1,o)+g.line(r,b)+g.line(s,b)+"z"):(c=g.move(s,l),d=g.move(s,l)+"z")),h.push(c),u.push(d)):(c+=g.curve(s+y,l,r-y,o,r,o),d+=g.curve(s+y,l,r-y,o,r,o)),s=r,l=o,a===e[i].length-2&&(d=d+g.curve(s,l,r,o,r,b)+g.move(r,o)+"z",p.globals.hasNullValues||(h.push(c),u.push(d)))}else{if(null===e[i][a+1]){c+=g.move(r,o);var x=p.globals.isXNumeric?(p.globals.seriesX[n][a]-p.globals.minX)/this.xRatio:r-this.xDivision;d=d+g.line(x,b)+g.move(r,o)+"z"}null===e[i][a]&&(c+=g.move(r,o),d+=g.move(r,b)),"stepline"===m?(c=c+g.line(r,null,"H")+g.line(null,o,"V"),d=d+g.line(r,null,"H")+g.line(null,o,"V")):"straight"===m&&(c+=g.line(r,o),d+=g.line(r,o)),a===e[i].length-2&&(d=d+g.line(r,b)+g.move(r,o)+"z",h.push(c),u.push(d))}return{linePaths:h,areaPaths:u,pX:s,pY:l,linePath:c,areaPath:d}}},{key:"handleNullDataPoints",value:function(t,e,i,n,a){var r=this.w;if(null===t[i][n]&&r.config.markers.showNullDataPoints||1===t[i].length){var o=this.markers.plotChartMarkers(e,a,n+1,this.strokeWidth-r.config.markers.strokeWidth/2,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,n,a){this.xoffset=e,this.yoffset=i,this.height=a,this.width=n,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],n=this.xoffset,a=this.yoffset,o=r(t)/this.height,s=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var n=e/this.height,a=this.width-n;i=new t(this.xoffset+n,this.yoffset,a,this.height)}else{var r=e/this.width,o=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,o)}return i}}function e(e,n,a,o,s){return o=void 0===o?0:o,s=void 0===s?0:s,function(t){var e,i,n=[];for(e=0;e=n(a,i))}(e,l=t[0],s)?(e.push(l),i(t.slice(1),e,a,o)):(c=a.cutArea(r(e),o),o.push(a.getCoordinates(e)),i(t,[],c,o)),o;o.push(a.getCoordinates(e))}function n(t,e){var i=Math.min.apply(Math,t),n=Math.max.apply(Math,t),a=r(t);return Math.max(Math.pow(e,2)*n/Math.pow(a,2),Math.pow(a,2)/(Math.pow(e,2)*i))}function a(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;ea-i&&s.width<=r-n){var l=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(t,e,i,n){var a=new g(this.ctx);a.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},n,(function(){a.animationCompleted(t)}))}}]),t}(),Mt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return r(t,[{key:"calculateTimeScaleTicks",value:function(t,i){var n=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var r=new L(this.ctx),o=(i-t)/864e5;this.determineInterval(o),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,o<.00011574074074074075?a.globals.disableZoomIn=!0:o>5e4&&(a.globals.disableZoomOut=!0);var s=r.getTimeUnitsfromTimestamp(t,i,this.utc),l=a.globals.gridWidth/o,c=l/24,d=c/60,h=d/60,u=Math.floor(24*o),f=Math.floor(1440*o),p=Math.floor(86400*o),g=Math.floor(o),m=Math.floor(o/30),v=Math.floor(o/365),b={minMillisecond:s.minMillisecond,minSecond:s.minSecond,minMinute:s.minMinute,minHour:s.minHour,minDate:s.minDate,minMonth:s.minMonth,minYear:s.minYear},y={firstVal:b,currentMillisecond:b.minMillisecond,currentSecond:b.minSecond,currentMinute:b.minMinute,currentHour:b.minHour,currentMonthDate:b.minDate,currentDate:b.minDate,currentMonth:b.minMonth,currentYear:b.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:d,secondsWidthOnXAxis:h,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:u,numberOfDays:g,numberOfMonths:m,numberOfYears:v};switch(this.tickInterval){case"years":this.generateYearScale(y);break;case"months":case"half_year":this.generateMonthScale(y);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(y);break;case"hours":this.generateHourScale(y);break;case"minutes_fives":case"minutes":this.generateMinuteScale(y);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(y)}var x=this.timeScaleArray.map((function(t){var i={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?e(e({},i),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?e(e({},i),{},{value:t.value}):"minute"===t.unit?e(e({},i),{},{value:t.value,minute:t.value}):"second"===t.unit?e(e({},i),{},{value:t.value,minute:t.minute,second:t.second}):t}));return x.filter((function(t){var e=1,i=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(i=a.config.xaxis.tickAmount),x.length>i&&(e=Math.floor(x.length/i));var o=!1,s=!1;switch(n.tickInterval){case"years":"year"===t.unit&&(o=!0);break;case"half_year":e=7,"year"===t.unit&&(o=!0);break;case"months":e=1,"year"===t.unit&&(o=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(o=!0),30===r&&(s=!0);break;case"months_days":e=10,"month"===t.unit&&(o=!0),30===r&&(s=!0);break;case"week_days":e=8,"month"===t.unit&&(o=!0);break;case"days":e=1,"month"===t.unit&&(o=!0);break;case"hours":"day"===t.unit&&(o=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(s=!0);break;case"seconds_tens":r%10!=0&&(s=!0)}if("hours"===n.tickInterval||"minutes_fives"===n.tickInterval||"seconds_tens"===n.tickInterval||"seconds_fives"===n.tickInterval){if(!s)return!0}else if((r%e==0||o)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,n=this.formatDates(t),a=this.removeOverlappingTS(n);i.globals.timescaleLabels=a.slice(),new ot(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,n=t.currentYear,a=t.daysWidthOnXAxis,r=t.numberOfYears,o=e.minYear,s=0,l=new L(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var d=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);s=(l.determineDaysOfYear(e.minYear)-d+1)*a,o=e.minYear+1,this.timeScaleArray.push({position:s,value:o,unit:c,year:o,month:p.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:s,value:o,unit:c,year:n,month:p.monthMod(i+1)});for(var h=o,u=s,f=0;f1){l=(c.determineDaysOfMonths(n+1,e.minYear)-i+1)*r,s=p.monthMod(n+1);var u=a+h,f=p.monthMod(s),g=s;0===s&&(d="year",g=u,f=1,u+=h+=1),this.timeScaleArray.push({position:l,value:g,unit:d,year:u,month:f})}else this.timeScaleArray.push({position:l,value:s,unit:d,year:a,month:p.monthMod(n)});for(var m=s+1,v=l,b=0,y=1;bo.determineDaysOfMonths(e+1,i)?(c=1,s="month",u=e+=1,e):e},h=(24-e.minHour)*a,u=l,f=d(c,i,n);0===e.minHour&&1===e.minDate?(h=0,u=p.monthMod(e.minMonth),s="month",c=e.minDate,r++):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,u=l,f=d(c=l,i,n)),this.timeScaleArray.push({position:h,value:u,unit:s,year:this._getYear(n,f,0),month:p.monthMod(f),day:c});for(var g=h,m=0;ms.determineDaysOfMonths(e+1,a)&&(m=1,e+=1),{month:e,date:m}},d=function(t,e){return t>s.determineDaysOfMonths(e+1,a)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),u=h*r,f=e.minHour+1,g=f+1;60===h&&(u=0,g=(f=e.minHour)+1);var m=i,v=d(m,n);this.timeScaleArray.push({position:u,value:f,unit:l,day:m,hour:g,year:a,month:p.monthMod(v)});for(var b=u,y=0;y=24&&(g=0,l="day",v=c(m+=1,v).month,v=d(m,v));var x=this._getYear(a,v,0);b=0===g&&0===y?h*r:60*r+b;var w=0===g?m:g;this.timeScaleArray.push({position:b,value:w,unit:l,hour:g,day:m,year:x,month:p.monthMod(v)}),g++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,n=t.currentMinute,a=t.currentHour,r=t.currentDate,o=t.currentMonth,s=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,d=t.numberOfMinutes,h=n+1,u=r,f=o,g=s,m=a,v=(60-i-e/1e3)*c,b=0;b=60&&(h=0,24===(m+=1)&&(m=0)),this.timeScaleArray.push({position:v,value:h,unit:"minute",hour:m,minute:h,day:u,year:this._getYear(g,f,0),month:p.monthMod(f)}),v+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,n=t.currentMinute,a=t.currentHour,r=t.currentDate,o=t.currentMonth,s=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,d=i+1,h=n,u=r,f=o,g=s,m=a,v=(1e3-e)/1e3*l,b=0;b=60&&(d=0,++h>=60&&(h=0,24==++m&&(m=0))),this.timeScaleArray.push({position:v,value:d,unit:"second",hour:m,minute:h,second:d,day:u,year:this._getYear(g,f,0),month:p.monthMod(f)}),v+=l,d++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var n=t.value.toString(),a=new L(e.ctx),r=e.createRawDateString(t,n),o=a.getDate(a.parseDate(r));if(e.utc||(o=a.getDate(a.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var s="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(s=l.year),"month"===t.unit&&(s=l.month),"day"===t.unit&&(s=l.day),"hour"===t.unit&&(s=l.hour),"minute"===t.unit&&(s=l.minute),"second"===t.unit&&(s=l.second),n=a.formatDate(o,s)}else n=a.formatDate(o,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:n,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,n=new v(this.ctx),a=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(a=!0,e=n.getTextRects(t[0].value).width);var r=0,o=t.map((function(o,s){if(s>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=a?e:n.getTextRects(t[r].value).width,c=t[r].position;return o.position>c+l+10?(r=s,o):null}return o}));return o.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),Et=function(){function t(e,i){n(this,t),this.ctx=i,this.w=i.w,this.el=e}return r(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,i=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,t.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type||"boxPlot"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.chartID,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),v.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(e.chart.offsetX,", ").concat(e.chart.offsetY,")")}),t.dom.Paper.node.style.background=e.chart.background,this.setSVGDimensions(),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elAnnotations=t.dom.Paper.group().attr({class:"apexcharts-annotations"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elWrap.appendChild(t.dom.elLegendWrap),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,n=i.config,a=i.globals,r={series:[],i:[]},o={series:[],i:[]},s={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},h={series:[],i:[]};a.series.map((function(e,u){var f=0;void 0!==t[u].type?("column"===t[u].type||"bar"===t[u].type?(a.series.length>1&&n.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(e),c.i.push(u),f++,i.globals.columnSeries=c.series):"area"===t[u].type?(o.series.push(e),o.i.push(u),f++):"line"===t[u].type?(r.series.push(e),r.i.push(u),f++):"scatter"===t[u].type?(s.series.push(e),s.i.push(u)):"bubble"===t[u].type?(l.series.push(e),l.i.push(u),f++):"candlestick"===t[u].type?(d.series.push(e),d.i.push(u),f++):"boxPlot"===t[u].type?(h.series.push(e),h.i.push(u),f++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),f>1&&(a.comboCharts=!0)):(r.series.push(e),r.i.push(u))}));var u=new Tt(this.ctx,e),f=new yt(this.ctx,e);this.ctx.pie=new kt(this.ctx);var p=new Ct(this.ctx);this.ctx.rangeBar=new F(this.ctx,e);var g=new St(this.ctx),m=[];if(a.comboCharts){if(o.series.length>0&&m.push(u.draw(o.series,"area",o.i)),c.series.length>0)if(i.config.chart.stacked){var v=new bt(this.ctx,e);m.push(v.draw(c.series,c.i))}else this.ctx.bar=new O(this.ctx,e),m.push(this.ctx.bar.draw(c.series,c.i));if(r.series.length>0&&m.push(u.draw(r.series,"line",r.i)),d.series.length>0&&m.push(f.draw(d.series,d.i)),h.series.length>0&&m.push(f.draw(h.series,h.i)),s.series.length>0){var b=new Tt(this.ctx,e,!0);m.push(b.draw(s.series,"scatter",s.i))}if(l.series.length>0){var y=new Tt(this.ctx,e,!0);m.push(y.draw(l.series,"bubble",l.i))}}else switch(n.chart.type){case"line":m=u.draw(a.series,"line");break;case"area":m=u.draw(a.series,"area");break;case"bar":n.chart.stacked?m=new bt(this.ctx,e).draw(a.series):(this.ctx.bar=new O(this.ctx,e),m=this.ctx.bar.draw(a.series));break;case"candlestick":case"boxPlot":m=new yt(this.ctx,e).draw(a.series);break;case"rangeBar":m=this.ctx.rangeBar.draw(a.series);break;case"heatmap":m=new wt(this.ctx,e).draw(a.series);break;case"treemap":m=new Pt(this.ctx,e).draw(a.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(a.series);break;case"radialBar":m=p.draw(a.series);break;case"radar":m=g.draw(a.series);break;default:m=u.draw(a.series)}return m}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var i=p.getDimensions(this.el),n=e.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?p.isNumber(i[0])&&(0===i[0].width&&(i=p.getDimensions(this.el.parentNode)),t.svgWidth=i[0]*parseInt(e.chart.width,10)/100):"px"!==n&&""!==n||(t.svgWidth=parseInt(e.chart.width,10));var a=e.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===a){var r=p.getDimensions(this.el.parentNode);t.svgHeight=r[1]*parseInt(e.chart.height,10)/100}else t.svgHeight=parseInt(e.chart.height,10);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth/1.2;if(t.svgWidth<0&&(t.svgWidth=0),t.svgHeight<0&&(t.svgHeight=0),v.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==a){var o=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+o+"px"}t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i={transform:"translate("+t.translateX+", "+e+")"};v.setAttrs(t.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,n=t.config.chart.sparkline.enabled?1:15;n+=t.config.grid.padding.bottom,"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||!t.config.legend.show||t.config.legend.floating||(i=new lt(this.ctx).legendHelpers.getLegendBBox().clwh+10);var a=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(a&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var o=p.getBoundingClientRect(a);r=o.bottom;var s=o.bottom-o.top;r=Math.max(2.05*t.globals.radialSize,s)}var l=r+e.translateY+i+n;e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).indexOf("%")>0||(e.dom.elWrap.style.height=l+"px",v.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px")}},{key:"coreCalculations",value:function(){new U(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(t){return[]}))},i=new R,n=this.w.globals;i.initGlobalVars(n),n.seriesXvalues=e(),n.seriesYvalues=e()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position&&new Q(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new Q(this.ctx).drawYCrosshairs(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new Mt(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new b(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,i=this.w;if(i.config.chart.brush.enabled&&"function"!=typeof i.config.chart.events.selection){var n=i.config.chart.brush.targets||[i.config.chart.brush.target];n.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){t.updateSourceChart(i)})})),i.config.chart.events.selection=function(t,a){n.forEach((function(t){var n=ApexCharts.getChartByID(t),r=p.clone(i.config.yaxis);if(i.config.chart.brush.autoScaleYaxis&&1===n.w.globals.series.length){var o=new X(n);r=o.autoScaleY(n,r,a)}var s=n.w.config.yaxis.reduce((function(t,i,a){return[].concat(h(t),[e(e({},n.w.config.yaxis[a]),{},{min:r[0].min,max:r[0].max})])}),[]);n.ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max},yaxis:s},!1,!1,!1,!1)}))}}}}]),t}(),Ot=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"_updateOptions",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(s){var l=[e.ctx];r&&(l=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(l=[e.ctx],e.ctx.w.globals.isExecCalled=!1),l.forEach((function(r,c){var d=r.w;if(d.globals.shouldAnimate=a,n||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&r.series.getPreviousPaths()),t&&"object"===i(t)&&(r.config=new N(t),t=b.extendArrayProps(r.config,t,d),r.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,d.config=p.extend(d.config,t),o&&(d.globals.lastXAxis=t.xaxis?p.clone(t.xaxis):[],d.globals.lastYAxis=t.yaxis?p.clone(t.yaxis):[],d.globals.initialConfig=p.extend({},d.config),d.globals.initialSeries=p.clone(d.config.series),t.series))){for(var h=0;h2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(a){var r,o=i.w;return o.globals.shouldAnimate=e,o.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),o.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),o.config.series=r):o.config.series=t.slice(),n&&(o.globals.initialSeries=p.clone(o.config.series)),i.ctx.update().then((function(){a(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,i){var n=this.w,a=n.config.series[i];return e(e({},n.config.series[i]),{},{name:t.name?t.name:a&&a.name,color:t.color?t.color:a&&a.color,type:t.type?t.type:a&&a.type,data:t.data?t.data:a&&a.data})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,n=null,a=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?n=i.globals.dom.Paper.select("".concat(a," path[j='").concat(e,"'], ").concat(a," circle[j='").concat(e,"'], ").concat(a," rect[j='").concat(e,"']")).members[0]:void 0===e&&(n=i.globals.dom.Paper.select("".concat(a," path[j='").concat(t,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),n?(new v(this.ctx).pathMouseDown(n,null),n.node?n.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new j(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){var e=this.w;return e.config.chart.stacked&&"100%"===e.config.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,n=i.globals.lastXAxis,a=i.globals.lastYAxis;t&&t.xaxis&&(n=t.xaxis),t&&t.yaxis&&(a=t.yaxis),i.config.xaxis.min=n.min,i.config.xaxis.max=n.max;i.config.yaxis.map((function(t,n){i.globals.zoomed||void 0!==a[n]?function(t){void 0!==a[t]&&(i.config.yaxis[t].min=a[t].min,i.config.yaxis[t].max=a[t].max)}(n):void 0!==e.ctx.opts.yaxis[n]&&(t.min=e.ctx.opts.yaxis[n].min,t.max=e.ctx.opts.yaxis[n].max)}))}}]),t}();Dt="undefined"!=typeof window?window:void 0,It=function(t,e){var n=(void 0!==this?this:t).SVG=function(t){if(n.supported)return t=new n.Doc(t),n.parser.draw||n.prepare(),t};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.dev",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(t){return"Svgjs"+h(t)+n.did++},n.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},n.extend=function(){var t,e;e=(t=[].slice.call(arguments)).pop();for(var i=t.length-1;i>=0;i--)if(t[i])for(var a in e)t[i].prototype[a]=e[a];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,n.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&n.extend(e,t.extend),t.construct&&n.extend(t.parent||n.Container,t.construct),e},n.adopt=function(e){return e?e.instance?e.instance:((i="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new n.Nested:new n.Doc:"linearGradient"==e.nodeName?new n.Gradient("linear"):"radialGradient"==e.nodeName?new n.Gradient("radial"):n[h(e.nodeName)]?new(n[h(e.nodeName)]):new n.Element(e)).type=e.nodeName,i.node=e,e.instance=i,i instanceof n.Doc&&i.namespace().defs(),i.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),i):null;var i},n.prepare=function(){var t=e.getElementsByTagName("body")[0],i=(t?new n.Doc(t):n.adopt(e.documentElement).nested()).size(2,0);n.parser={body:t||e.documentElement,draw:i.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:i.polyline().node,path:i.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},e.addEventListener("DOMContentLoaded",(function(){n.parser.draw||n.prepare()}),!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(t,e){for(var i=t.length,n=[],a=0;a1?1:t,new n.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),n.Color.test=function(t){return t+="",n.regex.isHex.test(t)||n.regex.isRgb.test(t)},n.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},n.Color.isColor=function(t){return n.Color.isRgb(t)||n.Color.test(t)},n.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},n.extend(n.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)}}),n.PointArray=function(t,e){n.Array.call(this,t,e||[[0,0]])},n.PointArray.prototype=new n.Array,n.PointArray.prototype.constructor=n.PointArray;for(var a={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]}},r="mlhvqtcsaz".split(""),o=0,s=r.length;ol);return r},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(n.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new n.Number(t),new n.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new n.Number(t),new n.Number(this-t,this.unit||t.unit)},times:function(t){return t=new n.Number(t),new n.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new n.Number(t),new n.Number(this/t,this.unit||t.unit)},to:function(t){var e=new n.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new n.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new n.Number(this.destination).minus(this).times(t).plus(this):this}}}),n.Element=n.invent({create:function(t){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var i=f(this,t,e);return this.width(new n.Number(i.width)).height(new n.Number(i.height))},clone:function(t){this.writeDataToDom();var e=m(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(n.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return n.get(this.attr(t))},parent:function(e){var i=this;if(!i.node.parentNode)return null;if(i=n.adopt(i.node.parentNode),!e)return i;for(;i&&i.node instanceof t.SVGElement;){if("string"==typeof e?i.matches(e):i instanceof e)return i;if(!i.node.parentNode||"#document"==i.node.parentNode.nodeName)return null;i=n.adopt(i.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(t){var e=[],i=this;do{if(!(i=i.parent(t))||!i.node)break;e.push(i)}while(i.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var i=e.createElement("svg");if(!(t&&this instanceof n.Parent))return i.appendChild(t=e.createElement("svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),i.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");i.innerHTML=""+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var a=0,r=i.firstChild.childNodes.length;a":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},n.morph=function(t){return function(e,i){return new n.MorphObj(e,i).at(t)}},n.Situation=n.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(t.duration).valueOf(),this.delay=new n.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(t){this._target=t,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(t,e,a){"object"===i(t)&&(e=t.ease,a=t.delay,t=t.duration);var r=new n.Situation({duration:t||1e3,delay:a||0,ease:n.easing[e||"-"]||e});return this.queue(r),this},target:function(t){return t&&t instanceof n.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=t.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){t.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(t){return("function"==typeof t||t instanceof n.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e=this.situation;if(e.init)return this;for(var i in e.animations){t=this.target()[i](),Array.isArray(t)||(t=[t]),Array.isArray(e.animations[i])||(e.animations[i]=[e.animations[i]]);for(var a=t.length;a--;)e.animations[i][a]instanceof n.Number&&(t[a]=new n.Number(t[a])),e.animations[i][a]=t[a].morph(e.animations[i][a])}for(var i in e.attrs)e.attrs[i]=new n.MorphObj(this.target().attr(i),e.attrs[i]);for(var i in e.styles)e.styles[i]=new n.MorphObj(this.target().style(i),e.styles[i]);return e.initialTransformation=this.target().matrixify(),e.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var i=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(t){var e=this.last();return this.target().on("finished.fx",(function i(n){n.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))})),this._callStart()},during:function(t){var e=this.last(),i=function(i){i.detail.situation==e&&t.call(this,i.detail.pos,n.morph(i.detail.pos),i.detail.eased,e)};return this.target().off("during.fx",i).on("during.fx",i),this.after((function(){this.off("during.fx",i)})),this._callStart()},afterAll:function(t){var e=function e(i){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,i){return this.last()[i||"animations"][t]=e,this._callStart()},step:function(t){var e,i,n;t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||ithis.lastPos&&r<=a&&(this.situation.once[r].call(this.target(),this.pos,a),delete this.situation.once[r]);return this.active&&this.target().fire("during",{pos:this.pos,eased:a,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=a,this):this},eachAt:function(){var t,e=this,i=this.target(),a=this.situation;for(var r in a.animations)t=[].concat(a.animations[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(a.ease(e.pos),e.pos):t})),i[r].apply(i,t);for(var r in a.attrs)t=[r].concat(a.attrs[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(a.ease(e.pos),e.pos):t})),i.attr.apply(i,t);for(var r in a.styles)t=[r].concat(a.styles[r]).map((function(t){return"string"!=typeof t&&t.at?t.at(a.ease(e.pos),e.pos):t})),i.style.apply(i,t);if(a.transforms.length){t=a.initialTransformation,r=0;for(var o=a.transforms.length;r=0;--a)this[b[a]]=null!=t[b[a]]?t[b[a]]:e[b[a]]},extend:{extract:function(){var t=p(this,0,1);p(this,1,0);var e=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(e*Math.PI/180)+this.f*Math.sin(e*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(e*Math.PI/180)+this.e*Math.sin(-e*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(t){return this.destination=new n.Matrix(t),this},multiply:function(t){return new n.Matrix(this.native().multiply(function(t){return t instanceof n.Matrix||(t=new n.Matrix(t)),t}(t).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(t,e){return new n.Matrix(this.native().translate(t||0,e||0))},native:function(){for(var t=n.parser.native.createSVGMatrix(),e=b.length-1;e>=0;e--)t[b[e]]=this[b[e]];return t},toString:function(){return"matrix("+v(this.a)+","+v(this.b)+","+v(this.c)+","+v(this.d)+","+v(this.e)+","+v(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new n.Matrix(e)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(t,e){var n;n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===i(t)?{x:t.x,y:t.y}:null!=t?{x:t,y:null!=e?e:t}:{x:0,y:0},this.x=n.x,this.y=n.y},extend:{clone:function(){return new n.Point(this)},morph:function(t,e){return this.destination=new n.Point(t,e),this}}}),n.extend(n.Element,{point:function(t,e){return new n.Point(t,e).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(t,e,a){if(null==t){for(t={},a=(e=this.node.attributes).length-1;a>=0;a--)t[e[a].nodeName]=n.regex.isNumber.test(e[a].nodeValue)?parseFloat(e[a].nodeValue):e[a].nodeValue;return t}if("object"===i(t))for(var r in t)this.attr(r,t[r]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?n.defaults.attrs[t]:n.regex.isNumber.test(e)?parseFloat(e):e;"stroke-width"==t?this.attr("stroke",parseFloat(e)>0?this._stroke:null):"stroke"==t&&(this._stroke=e),"fill"!=t&&"stroke"!=t||(n.regex.isImage.test(e)&&(e=this.doc().defs().image(e,0,0)),e instanceof n.Image&&(e=this.doc().defs().pattern(0,0,(function(){this.add(e)})))),"number"==typeof e?e=new n.Number(e):n.Color.isColor(e)?e=new n.Color(e):Array.isArray(e)&&(e=new n.Array(e)),"leading"==t?this.leading&&this.leading(e):"string"==typeof a?this.node.setAttributeNS(a,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!=t&&"x"!=t||this.rebuild(t,e)}return this}}),n.extend(n.Element,{transform:function(t,e){var a;return"object"!==i(t)?(a=new n.Matrix(this).extract(),"string"==typeof t?a[t]:a):(a=new n.Matrix(this),e=!!e||!!t.relative,null!=t.a&&(a=e?a.multiply(new n.Matrix(t)):new n.Matrix(t)),this.attr("transform",a))}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(n.regex.delimiter).map((function(t){return parseFloat(t)}))]})).reduce((function(t,e){return"matrix"==e[0]?t.multiply(g(e[1])):t[e[0]].apply(t,e[1])}),new n.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(t,e){if(arguments.length>1&&"boolean"!=typeof e)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(t))for(var n=0,a=this.arguments.length;n=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return n.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){for(var i=this.children(),a=0,r=i.length;a=0;i--)e.childNodes[i]instanceof t.SVGElement&&m(e.childNodes[i]);return n.adopt(e).id(n.eid(e.nodeName))}function v(t){return Math.abs(t)>1e-37?t:0}["fill","stroke"].forEach((function(t){var e={};e[t]=function(e){if(void 0===e)return this;if("string"==typeof e||n.Color.isRgb(e)||e&&"function"==typeof e.fill)this.attr(t,e);else for(var i=l[t].length-1;i>=0;i--)null!=e[l[t][i]]&&this.attr(l.prefix(t,l[t][i]),e[l[t][i]]);return this},n.extend(n.Element,n.FX,e)})),n.extend(n.Element,n.FX,{translate:function(t,e){return this.transform({x:t,y:e})},matrix:function(t){return this.attr("transform",new n.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new n.Number(t).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(t){return this.y(new n.Number(t).plus(this instanceof n.FX?0:this.y()),!0)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),n.Set=n.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){for(var t=[].slice.call(arguments),e=0,i=t.length;e-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(t){return new n.Set(t)}}}),n.FX.Set=n.invent({create:function(t){this.set=t}}),n.Set.inherit=function(){var t=[];for(var e in n.Shape.prototype)"function"==typeof n.Shape.prototype[e]&&"function"!=typeof n.Set.prototype[e]&&t.push(e);for(var e in t.forEach((function(t){n.Set.prototype[t]=function(){for(var e=0,i=this.members.length;e=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(t){var i=e.getElementById(function(t){var e=(t||"").toString().match(n.regex.reference);if(e)return e[1]}(t)||t);return n.adopt(i)},n.select=function(t,i){return new n.Set(n.utils.map((i||e).querySelectorAll(t),(function(t){return n.adopt(t)})))},n.extend(n.Parent,{select:function(t){return n.select(t,this.node)}});var b="abcdef".split("");if("function"!=typeof t.CustomEvent){var y=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var n=e.createEvent("CustomEvent");return n.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),n};y.prototype=t.Event.prototype,n.CustomEvent=y}else n.CustomEvent=t.CustomEvent;return n},"function"==typeof define&&define.amd?define((function(){return It(Dt,Dt.document)})):"object"===("undefined"==typeof exports?"undefined":i(exports))&&"undefined"!=typeof module?module.exports=Dt.document?It(Dt,Dt.document):function(t){return It(t,t.document)}:Dt.SVG=It(Dt,Dt.document),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(t,e){return this.add(t,e),!t.attr("in")&&this.autoSetIn&&t.attr("in",this.source),t.attr("result")||t.attr("result",t),t},blend:function(t,e,i){return this.put(new SVG.BlendEffect(t,e,i))},colorMatrix:function(t,e){return this.put(new SVG.ColorMatrixEffect(t,e))},convolveMatrix:function(t){return this.put(new SVG.ConvolveMatrixEffect(t))},componentTransfer:function(t){return this.put(new SVG.ComponentTransferEffect(t))},composite:function(t,e,i){return this.put(new SVG.CompositeEffect(t,e,i))},flood:function(t,e){return this.put(new SVG.FloodEffect(t,e))},offset:function(t,e){return this.put(new SVG.OffsetEffect(t,e))},image:function(t){return this.put(new SVG.ImageEffect(t))},merge:function(){var t=[void 0];for(var e in arguments)t.push(arguments[e]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,t)))},gaussianBlur:function(t,e){return this.put(new SVG.GaussianBlurEffect(t,e))},morphology:function(t,e){return this.put(new SVG.MorphologyEffect(t,e))},diffuseLighting:function(t,e,i){return this.put(new SVG.DiffuseLightingEffect(t,e,i))},displacementMap:function(t,e,i,n,a){return this.put(new SVG.DisplacementMapEffect(t,e,i,n,a))},specularLighting:function(t,e,i,n){return this.put(new SVG.SpecularLightingEffect(t,e,i,n))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(t,e,i,n,a){return this.put(new SVG.TurbulenceEffect(t,e,i,n,a))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(t){var e=this.put(new SVG.Filter);return"function"==typeof t&&t.call(e,e),e}}),SVG.extend(SVG.Container,{filter:function(t){return this.defs().filter(t)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(t){return this.filterer=t instanceof SVG.Element?t:this.doc().filter(t),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(t){return this.filterer&&!0===t&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}});var t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},diffuseLighting:function(t,e,i){return this.parent()&&this.parent().diffuseLighting(t,e,i).in(this)},displacementMap:function(t,e,i,n){return this.parent()&&this.parent().displacementMap(this,t,e,i,n)},specularLighting:function(t,e,i,n){return this.parent()&&this.parent().specularLighting(t,e,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,n,a){return this.parent()&&this.parent().turbulence(t,e,i,n,a).in(this)}};SVG.extend(SVG.Effect,t),SVG.extend(SVG.ParentEffect,t),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){this.attr("in",t)}}});var e={blend:function(t,e,i){this.attr({in:t,in2:e,mode:i||"normal"})},colorMatrix:function(t,e){"matrix"==t&&(e=a(e)),this.attr({type:t,values:void 0===e?null:e})},convolveMatrix:function(t){t=a(t),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},composite:function(t,e,i){this.attr({in:t,in2:e,operator:i})},flood:function(t,e){this.attr("flood-color",t),null!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(t){this.attr("href",t,SVG.xlink)},displacementMap:function(t,e,i,n,a){this.attr({in:t,in2:e,scale:i,xChannelSelector:n,yChannelSelector:a})},gaussianBlur:function(t,e){null!=t||null!=e?this.attr("stdDeviation",function(t){if(!Array.isArray(t))return t;for(var e=0,i=t.length,n=[];e1&&(D*=n=Math.sqrt(n),I*=n),a=(new SVG.Matrix).rotate(P).scale(1/D,1/I).rotate(-P),F=F.transform(a),s=(r=[(j=j.transform(a)).x-F.x,j.y-F.y])[0]*r[0]+r[1]*r[1],o=Math.sqrt(s),r[0]/=o,r[1]/=o,l=s<4?Math.sqrt(1-s/4):0,M===E&&(l*=-1),c=new SVG.Point((j.x+F.x)/2+l*-r[1],(j.y+F.y)/2+l*r[0]),d=new SVG.Point(F.x-c.x,F.y-c.y),h=new SVG.Point(j.x-c.x,j.y-c.y),u=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(u*=-1),f=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(f*=-1),E&&u>f&&(f+=2*Math.PI),!E&&ur.maxX-e.width&&(o=(n=r.maxX-e.width)-this.startPoints.box.x),null!=r.minY&&ar.maxY-e.height&&(s=(a=r.maxY-e.height)-this.startPoints.box.y),null!=r.snapToGrid&&(n-=n%r.snapToGrid,a-=a%r.snapToGrid,o-=o%r.snapToGrid,s-=s%r.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:o,y:s},!0):this.el.move(n,a));return i},t.prototype.end=function(t){var e=this.drag(t);this.el.fire("dragend",{event:t,p:e,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,i){"function"!=typeof e&&"object"!=typeof e||(i=e,e=!0);var n=this.remember("_draggable")||new t(this);return(e=void 0===e||e)?n.init(i||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function t(t){this.el=t,t.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,e,i){var n="string"!=typeof t?t:e[t];return i?n/2:n},this.pointCoords=function(t,e){var i=this.pointsList[t];return{x:this.pointCoord(i[0],e,"t"===t||"b"===t),y:this.pointCoord(i[1],e,"r"===t||"l"===t)}}}t.prototype.init=function(t,e){var i=this.el.bbox();this.options={};var n=this.el.selectize.defaults.points;for(var a in this.el.selectize.defaults)this.options[a]=this.el.selectize.defaults[a],void 0!==e[a]&&(this.options[a]=e[a]);var r=["points","pointsExclude"];for(var a in r){var o=this.options[r[a]];"string"==typeof o?o=o.length>0?o.split(/\s*,\s*/i):[]:"boolean"==typeof o&&"points"===r[a]&&(o=o?n:[]),this.options[r[a]]=o}this.options.points=[n,this.options.points].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)<0}))})),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(t):this.selectRect(t),this.observe(),this.cleanup()},t.prototype.selectPoints=function(t){return this.pointSelection.isSelected=t,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},t.prototype.getPointArray=function(){var t=this.el.bbox();return this.el.array().valueOf().map((function(e){return[e[0]-t.x,e[1]-t.y]}))},t.prototype.drawPoints=function(){for(var t=this,e=this.getPointArray(),i=0,n=e.length;i0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y+i[1]).size(this.parameters.box.width-i[0],this.parameters.box.height-i[1])}};break;case"rt":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).size(this.parameters.box.width+i[0],this.parameters.box.height-i[1])}};break;case"rb":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+i[0],this.parameters.box.height+i[1])}};break;case"lb":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).size(this.parameters.box.width-i[0],this.parameters.box.height+i[1])}};break;case"t":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).height(this.parameters.box.height-i[1])}};break;case"r":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+i[0])}};break;case"b":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+i[1])}};break;case"l":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).width(this.parameters.box.width-i[0])}};break;case"rot":this.calc=function(t,e){var i=t+this.parameters.p.x,n=e+this.parameters.p.y,a=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),r=Math.atan2(n-this.parameters.box.y-this.parameters.box.height/2,i-this.parameters.box.x-this.parameters.box.width/2),o=this.parameters.rotation+180*(r-a)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(o-o%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(t,e){var i=this.snapToGrid(t,e,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),n=this.el.array().valueOf();n[this.parameters.i][0]=this.parameters.pointCoords[0]+i[0],n[this.parameters.i][1]=this.parameters.pointCoords[1]+i[1],this.el.plot(n)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:t}),SVG.on(window,"touchmove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"touchend.resize",(function(){e.done()})),SVG.on(window,"mousemove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"mouseup.resize",(function(){e.done()}))},t.prototype.update=function(t){if(t){var e=this._extractPosition(t),i=this.transformPoint(e.x,e.y),n=i.x-this.parameters.p.x,a=i.y-this.parameters.p.y;this.lastUpdateCall=[n,a],this.calc(n,a),this.el.fire("resizing",{dx:n,dy:a,event:t})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},t.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},t.prototype.snapToGrid=function(t,e,i,n){var a;return void 0!==n?a=[(i+t)%this.options.snapToGrid,(n+e)%this.options.snapToGrid]:(i=null==i?3:i,a=[(this.parameters.box.x+t+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+e+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),t<0&&(a[0]-=this.options.snapToGrid),e<0&&(a[1]-=this.options.snapToGrid),t-=Math.abs(a[0])o.maxX&&(t=o.maxX-a),void 0!==o.minY&&r+eo.maxY&&(e=o.maxY-r),[t,e]},t.prototype.checkAspectRatio=function(t,e){if(!this.options.saveAspectRatio)return t;var i=t.slice(),n=this.parameters.box.width/this.parameters.box.height,a=this.parameters.box.width+t[0],r=this.parameters.box.height-t[1],o=a/r;return on&&(i[0]=this.parameters.box.width-r*n,e&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new t(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var Lt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new g(this.ctx),this.ctx.axes=new Z(this.ctx),this.ctx.core=new Et(this.ctx.el,this.ctx),this.ctx.config=new N({}),this.ctx.data=new B(this.ctx),this.ctx.grid=new V(this.ctx),this.ctx.graphics=new v(this.ctx),this.ctx.coreUtils=new b(this.ctx),this.ctx.crosshairs=new Q(this.ctx),this.ctx.events=new G(this.ctx),this.ctx.exports=new W(this.ctx),this.ctx.localization=new K(this.ctx),this.ctx.options=new S,this.ctx.responsive=new J(this.ctx),this.ctx.series=new M(this.ctx),this.ctx.theme=new tt(this.ctx),this.ctx.formatters=new z(this.ctx),this.ctx.titleSubtitle=new et(this.ctx),this.ctx.legend=new lt(this.ctx),this.ctx.toolbar=new ct(this.ctx),this.ctx.dimensions=new ot(this.ctx),this.ctx.updateHelpers=new Ot(this.ctx),this.ctx.zoomPanSelection=new dt(this.ctx),this.ctx.w.globals.tooltip=new vt(this.ctx)}}]),t}(),Ft=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return r(t,[{key:"clear",value:function(t){var e=t.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:e})}},{key:"killSVG",value:function(t){t.each((function(t,e){this.removeClass("*"),this.off(),this.stop()}),!0),t.ungroup(),t.clear()}},{key:"clearDomElements",value:function(t){var e=this,i=t.isUpdating,n=this.w.globals.dom.Paper.node;n.parentNode&&n.parentNode.parentNode&&!i&&(n.parentNode.parentNode.style.minHeight="unset");var a=this.w.globals.dom.baseEl;a&&this.ctx.eventList.forEach((function(t){a.removeEventListener(t,e.ctx.events.documentEvent)}));var r=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elAnnotations=null,r.elLegendWrap=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),t}(),jt=new WeakMap;return function(){function t(e,i){n(this,t),this.opts=i,this.ctx=this,this.w=new H(i).init(),this.el=e,this.w.globals.cuid=p.randomId(),this.w.globals.chartID=this.w.config.chart.id?p.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Lt(this).initModules(),this.create=p.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return r(t,[{key:"render",value:function(){var t=this;return new Promise((function(e,i){if(null!==t.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),t.w.config.chart.id&&Apex._chartInstances.push({id:t.w.globals.chartID,group:t.w.config.chart.group,chart:t}),t.setLocale(t.w.config.chart.defaultLocale);var n=t.w.config.chart.events.beforeMount;if("function"==typeof n&&n(t,t.w),t.events.fireEvent("beforeMount",[t,t.w]),window.addEventListener("resize",t.windowResizeHandler),function(t,e){var i=!1,n=t.getBoundingClientRect();"none"!==t.style.display&&0!==n.width||(i=!0);var a=new ResizeObserver((function(n){i&&e.call(t,n),i=!0}));t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach((function(t){return a.observe(t)})):a.observe(t),jt.set(e,a)}(t.el.parentNode,t.parentResizeHandler),!t.css){var a=t.el.getRootNode&&t.el.getRootNode(),r=p.is("ShadowRoot",a),o=t.el.ownerDocument,s=o.getElementById("apexcharts-css");!r&&s||(t.css=document.createElement("style"),t.css.id="apexcharts-css",t.css.textContent='.apexcharts-canvas {\n position: relative;\n user-select: none;\n /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n}\n\n\n.apexcharts-inner {\n position: relative;\n}\n\n.apexcharts-text tspan {\n font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n transition: 0.15s ease all;\n opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0;\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit;\n}\n\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #ECEFF1;\n border-bottom: 1px solid #ddd;\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n font-weight: 600;\n margin-left: 5px;\n}\n\n.apexcharts-tooltip-title:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n font-weight: 600;\n}\n\n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-goals-group, \n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n display: flex;\n}\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px;\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0px;\n margin-right: 10px;\n border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px;\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\n padding: 4px 8px;\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0;\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: bold;\n display: block;\n margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n opacity: 0;\n padding: 9px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #ECEFF1;\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #ECEFF1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n opacity: 0;\n padding: 4px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1;\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none;\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0;\n}\n\n.apexcharts-selection-rect {\n cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible;\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6E8192;\n text-align: center;\n}\n\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(0.76)\n}\n\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n fill: #008FFB;\n}\n\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n position: relative;\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n transform: scale(0.62);\n position: relative;\n left: 1px;\n top: 0px;\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6E8192;\n stroke-width: 2;\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008FFB;\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333;\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0px 6px 2px 6px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: 0.15s ease all;\n pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer;\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee;\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1;\n }\n}\n\n.apexcharts-datalabel.apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n cursor: default;\n pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n from {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.resize-triggers>div {\n background: #eee;\n overflow: auto;\n}\n\n.contract-trigger:before {\n width: 200%;\n height: 200%;\n}',r?a.prepend(t.css):o.head.appendChild(t.css))}var l=t.create(t.w.config.series,{});if(!l)return e(t);t.mount(l).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(l)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this.w;new Lt(this).initModules();var n=this.w.globals;if(n.noData=!1,n.animationEnded=!1,this.responsive.checkResponsiveConfig(e),i.config.xaxis.convertedCatToNumeric&&new j(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el)return n.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===n.svgWidth)return n.animationEnded=!0,null;var a=b.checkComboSeries(t);n.comboCharts=a.comboCharts,n.comboBarCount=a.comboBarCount;var r=t.every((function(t){return t.data&&0===t.data.length}));(0===t.length||r)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(t),this.theme.init(),new T(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),n.noData&&n.collapsedSeries.length!==n.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),n.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new b(this).getLargestMarkerSize(),this.dimensions.plotCoords();var o=this.core.xySettings();this.grid.createGridMask();var s=this.core.plotChartType(t,o),l=new I(this);l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var c={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:s,xyRatios:o,elInner:i.globals.dom.elGraphical,dimensions:c}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,n=i.w;return new Promise((function(a,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||n.globals.allSeriesCollapsed)&&i.series.handleNoData(),"treemap"!==n.config.chart.type&&i.axes.drawAxis(n.config.chart.type,e.xyRatios),i.grid=new V(i);var o=i.grid.drawGrid();i.annotations=new C(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===n.config.grid.position&&o&&n.globals.dom.elGraphical.add(o.el);var s=new $(t.ctx),l=new q(t.ctx);if(null!==o&&(s.xAxisLabelCorrections(o.xAxisTickWidth),l.setYAxisTextAlignments(),n.config.yaxis.map((function(t,e){-1===n.globals.ignoreYAxisIndexes.indexOf(e)&&l.yAxisTitleRotate(e,t.opposite)}))),"back"===n.config.annotations.position&&(n.globals.dom.Paper.add(n.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),Array.isArray(e.elGraph))for(var c=0;c0&&n.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),n.globals.axisCharts||n.globals.noData||i.core.resizeNonAxisCharts(),a(i)}))}},{key:"destroy",value:function(){var t,e;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,t=this.parentResizeHandler,(e=jt.get(t))&&(e.disconnect(),jt.delete(t));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach((function(t,e){t.id===p.escapeString(i)&&Apex._chartInstances.splice(e,1)})),new Ft(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w;return o.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,n,a,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.w.config.series.slice();return n.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(n,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var n=i.w.config.series.slice(),a=0;a0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addXaxisAnnotationExternal(t,e,n)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addYaxisAnnotationExternal(t,e,n)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addPointAnnotationExternal(t,e,n)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new U(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new U(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new W(this.ctx).dataURI(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=p.escapeString(t),i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?a-2:0),o=2;o@*'+~#";.,=\- \/${}%?`]/g,root:"#"},t.jstree.create=function(e,n){var a=new t.jstree.core(++i),r=n;return n=t.extend(!0,{},t.jstree.defaults,n),r&&r.plugins&&(n.plugins=r.plugins),t.each(n.plugins,(function(t,e){"core"!==t&&(a=a.plugin(e,n[e]))})),t(e).data("jstree",a),a.init(e,n),a},t.jstree.destroy=function(){t(".jstree:jstree").jstree("destroy"),t(l).off(".jstree")},t.jstree.core=function(t){this._id=t,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},t.jstree.reference=function(e){var i=null,n=null;if(!e||!e.id||e.tagName&&e.nodeType||(e=e.id),!n||!n.length)try{n=t(e)}catch(t){}if(!n||!n.length)try{n=t("#"+e.replace(t.jstree.idregex,"\\$&"))}catch(t){}return n&&n.length&&(n=n.closest(".jstree")).length&&(n=n.data("jstree"))?i=n:t(".jstree").each((function(){var n=t(this).data("jstree");if(n&&n._model.data[e])return i=n,!1})),i},t.fn.jstree=function(i){var n="string"==typeof i,a=Array.prototype.slice.call(arguments,1),r=null;return!(!0===i&&!this.length)&&(this.each((function(){var o=t.jstree.reference(this),s=n&&o?o[i]:null;if(r=n&&s?s.apply(o,a):null,o||n||i!==e&&!t.isPlainObject(i)||t.jstree.create(this,i),(o&&!n||!0===i)&&(r=o||!1),null!==r&&r!==e)return!1})),null!==r&&r!==e?r:this)},t.expr.pseudos.jstree=t.expr.createPseudo((function(i){return function(i){return t(i).hasClass("jstree")&&t(i).data("jstree")!==e}})),t.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:t.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(e){e.type="click",t(e.currentTarget).trigger(e)},enter:function(e){e.type="click",t(e.currentTarget).trigger(e)},left:function(e){if(e.preventDefault(),this.is_open(e.currentTarget))this.close_node(e.currentTarget);else{var i=this.get_parent(e.currentTarget);i&&i.id!==t.jstree.root&&this.get_node(i,!0).children(".jstree-anchor").focus()}},up:function(t){t.preventDefault();var e=this.get_prev_dom(t.currentTarget);e&&e.length&&e.children(".jstree-anchor").focus()},right:function(e){if(e.preventDefault(),this.is_closed(e.currentTarget))this.open_node(e.currentTarget,(function(t){this.get_node(t,!0).children(".jstree-anchor").focus()}));else if(this.is_open(e.currentTarget)){var i=this.get_node(e.currentTarget,!0).children(".jstree-children")[0];i&&t(this._firstChild(i)).children(".jstree-anchor").focus()}},down:function(t){t.preventDefault();var e=this.get_next_dom(t.currentTarget);e&&e.length&&e.children(".jstree-anchor").focus()},"*":function(t){this.open_all()},home:function(e){e.preventDefault();var i=this._firstChild(this.get_container_ul()[0]);i&&t(i).children(".jstree-anchor").filter(":visible").focus()},end:function(t){t.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(t){t.preventDefault(),this.edit(t.currentTarget)}}},t.jstree.core.prototype={plugin:function(e,i){var n=t.jstree.plugins[e];return n?(this._data[e]={},n.prototype=this,new n(i,this)):this},init:function(e,i){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=t(e).addClass("jstree jstree-"+this._id),this.settings=i,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter((function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))})).remove(),this.element.html("
        "),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(t.jstree.root)},destroy:function(t){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(t){}t||this.element.empty(),this.teardown()},_create_prototype_node:function(){var t,e,i=l.createElement("LI");return i.setAttribute("role","treeitem"),(t=l.createElement("I")).className="jstree-icon jstree-ocl",t.setAttribute("role","presentation"),i.appendChild(t),(t=l.createElement("A")).className="jstree-anchor",t.setAttribute("href","#"),t.setAttribute("tabindex","-1"),(e=l.createElement("I")).className="jstree-icon jstree-themeicon",e.setAttribute("role","presentation"),t.appendChild(e),i.appendChild(t),t=e=null,i},_kbevent_to_func:function(t){var e=[];t.ctrlKey&&e.push("ctrl"),t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.push({8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"}[t.which]||t.which),e=e.sort().join("-").toLowerCase();var i,n,a=this.settings.core.keyboard;for(i in a)if(a.hasOwnProperty(i)&&("-"!==(n=i)&&"+"!==n&&(n=(n=n.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),n===e))return a[i];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",(function(){return this.className.replace(/jstree[^ ]*|$/gi,"")})),this.element=null},bind:function(){var e="",i=null,n=0;this.element.on("dblclick.jstree",(function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;if(l.selection&&l.selection.empty)l.selection.empty();else if(window.getSelection){var e=window.getSelection();try{e.removeAllRanges(),e.collapse()}catch(t){}}})).on("mousedown.jstree",t.proxy((function(t){t.target===this.element[0]&&(t.preventDefault(),n=+new Date)}),this)).on("mousedown.jstree",".jstree-ocl",(function(t){t.preventDefault()})).on("click.jstree",".jstree-ocl",t.proxy((function(t){this.toggle_node(t.target)}),this)).on("dblclick.jstree",".jstree-anchor",t.proxy((function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(t.target)}),this)).on("click.jstree",".jstree-anchor",t.proxy((function(e){e.preventDefault(),e.currentTarget!==l.activeElement&&t(e.currentTarget).focus(),this.activate_node(e.currentTarget,e)}),this)).on("keydown.jstree",".jstree-anchor",t.proxy((function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===t.which?t.which=39:39===t.which&&(t.which=37));var e=this._kbevent_to_func(t);if(e){var i=e.call(this,t);if(!1===i||!0===i)return i}}),this)).on("load_node.jstree",t.proxy((function(e,i){i.status&&(i.node.id!==t.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(t.proxy((function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var e,i,n=[];for(e=0,i=this._data.core.selected.length;e1){if(r.slice(o).each(t.proxy((function(i,n){if(0===t(n).text().toLowerCase().indexOf(e))return t(n).focus(),s=!0,!1}),this)),s)return;if(r.slice(0,o).each(t.proxy((function(i,n){if(0===t(n).text().toLowerCase().indexOf(e))return t(n).focus(),s=!0,!1}),this)),s)return}if(new RegExp("^"+a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(e)){if(r.slice(o+1).each(t.proxy((function(e,i){if(t(i).text().toLowerCase().charAt(0)===a)return t(i).focus(),s=!0,!1}),this)),s)return;if(r.slice(0,o+1).each(t.proxy((function(e,i){if(t(i).text().toLowerCase().charAt(0)===a)return t(i).focus(),s=!0,!1}),this)),s)return}}),this)).on("init.jstree",t.proxy((function(){var t=this.settings.core.themes;this._data.core.themes.dots=t.dots,this._data.core.themes.stripes=t.stripes,this._data.core.themes.icons=t.icons,this._data.core.themes.ellipsis=t.ellipsis,this.set_theme(t.name||"default",t.url),this.set_theme_variant(t.variant)}),this)).on("loading.jstree",t.proxy((function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}),this)).on("blur.jstree",".jstree-anchor",t.proxy((function(e){this._data.core.focused=null,t(e.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")}),this)).on("focus.jstree",".jstree-anchor",t.proxy((function(e){var i=this.get_node(e.currentTarget);i&&i.id&&(this._data.core.focused=i.id),this.element.find(".jstree-hovered").not(e.currentTarget).mouseleave(),t(e.currentTarget).mouseenter(),this.element.attr("tabindex","-1")}),this)).on("focus.jstree",t.proxy((function(){if(+new Date-n>500&&!this._data.core.focused&&this.settings.core.restore_focus){n=0;var t=this.get_node(this.element.attr("aria-activedescendant"),!0);t&&t.find("> .jstree-anchor").focus()}}),this)).on("mouseenter.jstree",".jstree-anchor",t.proxy((function(t){this.hover_node(t.currentTarget)}),this)).on("mouseleave.jstree",".jstree-anchor",t.proxy((function(t){this.dehover_node(t.currentTarget)}),this))},unbind:function(){this.element.off(".jstree"),t(l).off(".jstree-"+this._id)},trigger:function(t,e){e||(e={}),e.instance=this,this.element.triggerHandler(t.replace(".jstree","")+".jstree",e)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var i=this.settings.core.strings;return t.isFunction(i)?i.call(this,e):i&&i[e]?i[e]:e},_firstChild:function(t){for(t=t?t.firstChild:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_nextSibling:function(t){for(t=t?t.nextSibling:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_previousSibling:function(t){for(t=t?t.previousSibling:null;null!==t&&1!==t.nodeType;)t=t.previousSibling;return t},get_node:function(e,i){var n;e&&e.id&&(e=e.id),e instanceof jQuery&&e.length&&e[0].id&&(e=e[0].id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(n=t("#"+e.replace(t.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else if((n=this.element.find(e)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else{if(!(n=this.element.find(e)).length||!n.hasClass("jstree"))return!1;e=this._model.data[t.jstree.root]}return i&&(e=e.id===t.jstree.root?this.element:t("#"+e.id.replace(t.jstree.idregex,"\\$&"),this.element)),e}catch(t){return!1}},get_path:function(e,i,n){if(!(e=e.parents?e:this.get_node(e))||e.id===t.jstree.root||!e.parents)return!1;var a,r,o=[];for(o.push(n?e.id:e.text),a=0,r=e.parents.length;a0)},is_loaded:function(t){return(t=this.get_node(t))&&t.state.loaded},is_loading:function(t){return(t=this.get_node(t))&&t.state&&t.state.loading},is_open:function(t){return(t=this.get_node(t))&&t.state.opened},is_closed:function(t){return(t=this.get_node(t))&&this.is_parent(t)&&!t.state.opened},is_leaf:function(t){return!this.is_parent(t)},load_node:function(e,i){var n,a,r,o,s;if(t.isArray(e))return this._load_nodes(e.slice(),i),!0;if(!(e=this.get_node(e)))return i&&i.call(this,e,!1),!1;if(e.state.loaded){for(e.state.loaded=!1,r=0,o=e.parents.length;r").html(l),h.text=this.settings.core.force_text?l.text():l.html(),l=i.data(),h.data=l?t.extend(!0,{},l):null,h.state.opened=i.hasClass("jstree-open"),h.state.selected=i.children("a").hasClass("jstree-clicked"),h.state.disabled=i.children("a").hasClass("jstree-disabled"),h.data&&h.data.jstree)for(s in h.data.jstree)h.data.jstree.hasOwnProperty(s)&&(h.state[s]=h.data.jstree[s]);(l=i.children("a").children(".jstree-themeicon")).length&&(h.icon=!l.hasClass("jstree-themeicon-hidden")&&l.attr("rel")),h.state.icon!==e&&(h.icon=h.state.icon),h.icon!==e&&null!==h.icon&&""!==h.icon||(h.icon=!0),l=i.children("ul").children("li");do{c="j"+this._id+"_"+ ++this._cnt}while(d[c]);return h.id=h.li_attr.id?h.li_attr.id.toString():c,l.length?(l.each(t.proxy((function(e,i){r=this._parse_model_from_html(t(i),h.id,a),o=this._model.data[r],h.children.push(r),o.children_d.length&&(h.children_d=h.children_d.concat(o.children_d))}),this)),h.children_d=h.children_d.concat(h.children)):i.hasClass("jstree-closed")&&(h.state.loaded=!1),h.li_attr.class&&(h.li_attr.class=h.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),h.a_attr.class&&(h.a_attr.class=h.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),d[h.id]=h,h.state.selected&&this._data.core.selected.push(h.id),h.id},_parse_model_from_flat_json:function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var a,r,o,s,l=t.id.toString(),c=this._model.data,d=this._model.default_state,h={id:l,text:t.text||"",icon:t.icon===e||t.icon,parent:i,parents:n,children:t.children||[],children_d:t.children_d||[],data:t.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(a in d)d.hasOwnProperty(a)&&(h.state[a]=d[a]);if(t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(h.icon=t.data.jstree.icon),h.icon!==e&&null!==h.icon&&""!==h.icon||(h.icon=!0),t&&t.data&&(h.data=t.data,t.data.jstree))for(a in t.data.jstree)t.data.jstree.hasOwnProperty(a)&&(h.state[a]=t.data.jstree[a]);if(t&&"object"==typeof t.state)for(a in t.state)t.state.hasOwnProperty(a)&&(h.state[a]=t.state[a]);if(t&&"object"==typeof t.li_attr)for(a in t.li_attr)t.li_attr.hasOwnProperty(a)&&(h.li_attr[a]=t.li_attr[a]);if(h.li_attr.id||(h.li_attr.id=l),t&&"object"==typeof t.a_attr)for(a in t.a_attr)t.a_attr.hasOwnProperty(a)&&(h.a_attr[a]=t.a_attr[a]);for(t&&t.children&&!0===t.children&&(h.state.loaded=!1,h.children=[],h.children_d=[]),c[h.id]=h,a=0,r=h.children.length;a
      • "+this.get_string("Loading ...")+"
      • "),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(t.jstree.root,(function(e,i){i&&(this.get_container_ul()[0].className=n,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(t.extend(!0,{},this._data.core.state),(function(){this.trigger("refresh")}))),this._data.core.state=null}))},refresh_node:function(e){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var i=[],n=[],a=this._data.core.selected.concat([]);n.push(e.id),!0===e.state.opened&&i.push(e.id),this.get_node(e,!0).find(".jstree-open").each((function(){n.push(this.id),i.push(this.id)})),this._load_nodes(n,t.proxy((function(t){this.open_node(i,!1,0),this.select_node(a),this.trigger("refresh_node",{node:e,nodes:t})}),this),!1,!0)},set_id:function(e,i){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var n,a,r=this._model.data,o=e.id;for(i=i.toString(),r[e.parent].children[t.inArray(e.id,r[e.parent].children)]=i,n=0,a=e.parents.length;ni.children.length&&(a=i.children.length),n.id||(n.id=!0),!this.check("create_node",n,i,a))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===n.id&&delete n.id,!(n=this._parse_model_from_json(n,i.id,i.parents.concat())))return!1;for(s=this.get_node(n),(l=[]).push(n),l=l.concat(s.children_d),this.trigger("model",{nodes:l,parent:i.id}),i.children_d=i.children_d.concat(l),c=0,d=i.parents.length;c=a?c+1:c]=i.children[c];return s[a]=n.id,i.children=s,this.redraw_node(i,!0),this.trigger("create_node",{node:this.get_node(n),parent:i.id,position:a}),r&&r.call(this,this.get_node(n)),n.id},rename_node:function(e,i){var n,a,r;if(t.isArray(e)){for(n=0,a=(e=e.slice()).length;nf.children.length&&(a=f.children.length),!this.check("move_node",i,f,a,{core:!0,origin:l,is_multi:p&&p._id&&p._id!==this._id,is_foreign:!p||!p._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(i.parent===f.id){for(m=f.children.concat(),-1!==(v=t.inArray(i.id,m))&&(m=t.vakata.array_remove(m,v),a>v&&a--),v=[],b=0,y=m.length;b=a?b+1:b]=m[b];v[a]=i.id,f.children=v,this._node_changed(f.id),this.redraw(f.id===t.jstree.root)}else{for((v=i.children_d.concat()).push(i.id),b=0,y=i.parents.length;b=a?b+1:b]=f.children[b];for(m[a]=i.id,f.children=m,f.children_d.push(i.id),f.children_d=f.children_d.concat(i.children_d),i.parent=f.id,(v=f.parents.concat()).unshift(f.id),_=i.parents.length,i.parents=v,v=v.concat(),b=0,y=i.children_d.length;bv.children.length&&(a=v.children.length),!this.check("copy_node",i,v,a,{core:!0,origin:l,is_multi:b&&b._id&&b._id!==this._id,is_foreign:!b||!b._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(g=b?b.get_json(i,{no_id:!0,no_data:!0,no_state:!0}):i))return!1;if(!0===g.id&&delete g.id,!(g=this._parse_model_from_json(g,v.id,v.parents.concat())))return!1;for(u=this.get_node(g),i&&i.state&&!1===i.state.loaded&&(u.state.loaded=!1),(h=[]).push(g),h=h.concat(u.children_d),this.trigger("model",{nodes:h,parent:v.id}),f=0,p=v.parents.length;f=a?f+1:f]=v.children[f];return h[a]=u.id,v.children=h,v.children_d.push(u.id),v.children_d=v.children_d.concat(u.children_d),v.id===t.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(v.id),s||this.redraw(v.id===t.jstree.root),r&&r.call(this,u,v,a),this.trigger("copy_node",{node:u,original:i,parent:v.id,position:a,old_parent:m,old_position:b&&b._id&&m&&b._model.data[m]&&b._model.data[m].children?t.inArray(i.id,b._model.data[m].children):-1,is_multi:b&&b._id&&b._id!==this._id,is_foreign:!b||!b._id,old_instance:b,new_instance:this}),u.id},cut:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var i,o,s,l=[];for(o=0,s=e.length;o"),c=i,d=t("
        ",{css:{position:"absolute",top:"-200px",left:a?"0px":"-1000px",visibility:"hidden"}}).appendTo(l.body),h=t("",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:t.proxy((function(i){i.stopImmediatePropagation(),i.preventDefault();var a,r=s.children(".jstree-rename-input").val(),l=this.settings.core.force_text;""===r&&(r=c),d.remove(),s.replaceWith(o),s.remove(),c=l?c:t("
        ").append(t.parseHTML(c)).html(),e=this.get_node(e),this.set_text(e,c),(a=!!this.rename_node(e,l?t("
        ").text(r).text():t("
        ").append(t.parseHTML(r)).html()))||this.set_text(e,c),this._data.core.focused=f.id,setTimeout(t.proxy((function(){var t=this.get_node(f.id,!0);t.length&&(this._data.core.focused=f.id,t.children(".jstree-anchor").focus())}),this),0),n&&n.call(this,f,a,p),h=null}),this),keydown:function(t){var e=t.which;27===e&&(p=!0,this.value=c),27!==e&&13!==e&&37!==e&&38!==e&&39!==e&&40!==e&&32!==e||t.stopImmediatePropagation(),27!==e&&13!==e||(t.preventDefault(),this.blur())},click:function(t){t.stopImmediatePropagation()},mousedown:function(t){t.stopImmediatePropagation()},keyup:function(t){h.width(Math.min(d.text("pW"+this.value).width(),r))},keypress:function(t){if(13===t.which)return!1}}),u={fontFamily:o.css("fontFamily")||"",fontSize:o.css("fontSize")||"",fontWeight:o.css("fontWeight")||"",fontStyle:o.css("fontStyle")||"",fontStretch:o.css("fontStretch")||"",fontVariant:o.css("fontVariant")||"",letterSpacing:o.css("letterSpacing")||"",wordSpacing:o.css("wordSpacing")||""},s.attr("class",o.attr("class")).append(o.contents().clone()).append(h),o.replaceWith(s),d.css(u),h.css(u).width(Math.min(d.text("pW"+h[0].value).width(),r))[0].select(),void t(l).one("mousedown.jstree touchstart.jstree dnd_start.vakata",(function(e){h&&e.target!==h&&t(h).blur()}))):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,i){if(!e)return!1;if(!0===i){var n=this.settings.core.themes.dir;n||(n=t.jstree.path+"/themes"),i=n+"/"+e+"/style.css"}i&&-1===t.inArray(i,o)&&(t("head").append(''),o.push(i)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(t){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=t,t&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(i,n){var a,r,o,s;if(t.isArray(i)){for(a=0,r=(i=i.slice()).length;a=0&&e.call(i,t[a],+a,t)&&n.push(t[a]);return n},t.jstree.plugins.changed=function(t,e){var i=[];this.trigger=function(t,n){var a,r;if(n||(n={}),"changed"===t.replace(".jstree","")){n.changed={selected:[],deselected:[]};var o={};for(a=0,r=i.length;a-1?u[g[n]]=!0:delete u[g[n]]}if(-1!==d.indexOf("up"))for(;c&&c.id!==t.jstree.root;){for(r=0,n=0,a=c.children.length;n-1}))}if(-1!==o.indexOf("up")&&-1===l.indexOf(r.id)){for(i=0,n=r.parents.length;i0&&r===a))break;s.state[c?"selected":"checked"]=!0,this._data[c?"core":"checkbox"].selected.push(s.id),(o=this.get_node(s,!0))&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass(c?"jstree-clicked":"jstree-checked"),s=this.get_node(s.parent)}}),this)).on("move_node.jstree",t.proxy((function(e,i){var n,a,r,o,s,l=i.is_multi,c=i.old_parent,d=this.get_node(i.parent),h=this._model.data,u=this.settings.checkbox.tie_selection;if(!l)for(n=this.get_node(c);n&&n.id!==t.jstree.root&&!n.state[u?"selected":"checked"];){for(a=0,r=0,o=n.children.length;r0&&a===o))break;n.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(n.id),(s=this.get_node(n,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),n=this.get_node(n.parent)}for(n=d;n&&n.id!==t.jstree.root;){for(a=0,r=0,o=n.children.length;r-1&&l.push(c)}var d=this.get_node(o,!0),h=l.length>0&&l.length250)&&t.vakata.context.hide(),a=0}),this)).on("touchstart.jstree",".jstree-anchor",(function(n){n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(e=n.originalEvent.changedTouches[0].clientX,i=n.originalEvent.changedTouches[0].clientY,r=setTimeout((function(){t(n.currentTarget).trigger("contextmenu",!0)}),750))})).on("touchmove.vakata.jstree",(function(n){r&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(Math.abs(e-n.originalEvent.changedTouches[0].clientX)>10||Math.abs(i-n.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(r),t.vakata.context.hide())})).on("touchend.vakata.jstree",(function(t){r&&clearTimeout(r)})),t(l).on("context_hide.vakata.jstree",t.proxy((function(e,i){this._data.contextmenu.visible=!1,t(i.reference).removeClass("jstree-context")}),this))},this.teardown=function(){this._data.contextmenu.visible&&t.vakata.context.hide(),n.teardown.call(this)},this.show_contextmenu=function(i,n,a,r){if(!(i=this.get_node(i))||i.id===t.jstree.root)return!1;var o=this.settings.contextmenu,s=this.get_node(i,!0).children(".jstree-anchor"),l=!1,c=!1;(o.show_at_node||n===e||a===e)&&(l=s.offset(),n=l.left,a=l.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(i)&&this.activate_node(i,r),c=o.items,t.isFunction(c)&&(c=c.call(this,i,t.proxy((function(t){this._show_contextmenu(i,n,a,t)}),this))),t.isPlainObject(c)&&this._show_contextmenu(i,n,a,c)},this._show_contextmenu=function(e,i,n,a){var r=this.get_node(e,!0).children(".jstree-anchor");t(l).one("context_show.vakata.jstree",t.proxy((function(e,i){var n="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";t(i.element).addClass(n),r.addClass("jstree-context")}),this)),this._data.contextmenu.visible=!0,t.vakata.context.show(r,{x:i,y:n},a),this.trigger("show_contextmenu",{node:e,x:i,y:n})}},function(t){var e=!1,i={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};t.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){t(l).triggerHandler("context_"+e+".vakata",{reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_execute:function(e){return!(!(e=i.items[e])||e._disabled&&(!t.isFunction(e._disabled)||e._disabled({item:e,reference:i.reference,element:i.element}))||!e.action)&&e.action.call(null,{item:e,reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_parse:function(e,n){if(!e)return!1;n||(i.html="",i.items=[]);var a,r="",o=!1;return n&&(r+=""),n||(i.html=r,t.vakata.context._trigger("parse")),r.length>10&&r},_show_submenu:function(i){if((i=t(i)).length&&i.children("ul").length){var n=i.children("ul"),a=i.offset().left,r=a+i.outerWidth(),o=i.offset().top,s=n.width(),l=n.height(),c=t(window).width()+t(window).scrollLeft(),d=t(window).height()+t(window).scrollTop();e?i[r-(s+10+i.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):i[r+s>c&&a>c-r?"addClass":"removeClass"]("vakata-context-right"),o+l+10>d&&n.css("bottom","-1px"),i.hasClass("vakata-context-right")?af&&(c=f-(h+20)),d+u+20>p&&(d=p-(u+20)),i.element.css({left:c,top:d}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),i.is_visible=!0,t.vakata.context._trigger("show"))},hide:function(){i.is_visible&&(i.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),i.is_visible=!1,t.vakata.context._trigger("hide"))}},t((function(){e="rtl"===t(l.body).css("direction");var n=!1;i.element=t("
          "),i.element.on("mouseenter","li",(function(e){e.stopImmediatePropagation(),t.contains(this,e.relatedTarget)||(n&&clearTimeout(n),i.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),t(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),t.vakata.context._show_submenu(this))})).on("mouseleave","li",(function(e){t.contains(this,e.relatedTarget)||t(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")})).on("mouseleave",(function(e){t(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),t.vakata.context.settings.hide_onmouseleave&&(n=setTimeout((function(){t.vakata.context.hide()}),t.vakata.context.settings.hide_onmouseleave))})).on("click","a",(function(e){e.preventDefault(),t(this).blur().parent().hasClass("vakata-context-disabled")||!1===t.vakata.context._execute(t(this).attr("rel"))||t.vakata.context.hide()})).on("keydown","a",(function(e){var n=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),t(e.currentTarget).trigger(e);break;case 37:i.is_visible&&(i.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 38:i.is_visible&&((n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),n.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 39:i.is_visible&&(i.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 40:i.is_visible&&((n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),n.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 27:t.vakata.context.hide(),e.preventDefault()}})).on("keydown",(function(t){t.preventDefault();var e=i.element.find(".vakata-contextmenu-shortcut-"+t.which).parent();e.parent().not(".vakata-context-disabled")&&e.click()})),t(l).on("mousedown.vakata.jstree",(function(e){i.is_visible&&i.element[0]!==e.target&&!t.contains(i.element[0],e.target)&&t.vakata.context.hide()})).on("context_show.vakata.jstree",(function(t,n){i.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),e&&i.element.addClass("vakata-context-rtl").css("direction","rtl"),i.element.find("ul").hide().end()}))}))}(t),t.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},t.jstree.plugins.dnd=function(e,i){this.init=function(t,e){i.init.call(this,t,e),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in l.createElement("span")},this.bind=function(){i.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",t.proxy((function(e){if(this.settings.dnd.large_drag_target&&t(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var i=this.get_node(e.target),n=this.is_selected(i)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,a=n>1?n+" "+this.get_string("nodes"):this.get_text(e.currentTarget);if(this.settings.core.force_text&&(a=t.vakata.html.escape(a)),i&&i.id&&i.id!==t.jstree.root&&(1===e.which||"touchstart"===e.type||"dragstart"===e.type)&&(!0===this.settings.dnd.is_draggable||t.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,n>1?this.get_top_selected(!0):[i],e))){if(c={jstree:!0,origin:this,obj:this.get_node(i,!0),nodes:n>1?this.get_top_selected():[i.id]},d=e.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),t.vakata.dnd.start(e,c,'
          '+a+'
          ');t.vakata.dnd._trigger("start",e,{helper:t(),element:d,data:c})}}),this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",(function(e){return e.preventDefault(),t.vakata.dnd._trigger("move",e,{helper:t(),element:d,data:c}),!1})).on("drop.jstree",t.proxy((function(e){return e.preventDefault(),t.vakata.dnd._trigger("stop",e,{helper:t(),element:d,data:c}),!1}),this))},this.redraw_node=function(t,e,n,a){if((t=i.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)t.setAttribute("draggable",!0);else{var r,o,s=null;for(r=0,o=t.childNodes.length;r 
          ').hide();t(l).on("dragover.vakata.jstree",(function(e){d&&t.vakata.dnd._trigger("move",e,{helper:t(),element:d,data:c})})).on("drop.vakata.jstree",(function(e){d&&(t.vakata.dnd._trigger("stop",e,{helper:t(),element:d,data:c}),d=null,c=null)})).on("dnd_start.vakata.jstree",(function(t,e){i=!1,a=!1,e&&e.data&&e.data.jstree&&o.appendTo(l.body)})).on("dnd_move.vakata.jstree",(function(s,l){var c=l.event.target!==a.target;if(r&&(l.event&&"dragover"===l.event.type&&!c||clearTimeout(r)),l&&l.data&&l.data.jstree&&(!l.event.target.id||"jstree-marker"!==l.event.target.id)){a=l.event;var d,h,u,f,p,g,m,v,b,y,x,w,_,k,S,C,A=t.jstree.reference(l.event.target),T=!1,D=!1,I=!1;if(A&&A._data&&A._data.dnd)if(o.attr("class","jstree-"+A.get_theme()+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")),S=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey)),l.helper.children().attr("class","jstree-"+A.get_theme()+" jstree-"+A.get_theme()+"-"+A.get_theme_variant()+" "+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[S?"show":"hide"](),l.event.target!==A.element[0]&&l.event.target!==A.get_container_ul()[0]||0!==A.get_container_ul().children().length){if((T=A.settings.dnd.large_drop_target?t(l.event.target).closest(".jstree-node").children(".jstree-anchor"):t(l.event.target).closest(".jstree-anchor"))&&T.length&&T.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(D=T.offset(),I=(l.event.pageY!==e?l.event.pageY:l.event.originalEvent.pageY)-D.top,u=T.outerHeight(),g=Iu-u/3?["a","i","b"]:I>u/2?["i","a","b"]:["i","b","a"],t.each(g,(function(e,a){switch(a){case"b":d=D.left-6,h=D.top,f=A.get_parent(T),p=T.parent().index();break;case"i":_=A.settings.dnd.inside_pos,k=A.get_node(T.parent()),d=D.left-2,h=D.top+u/2+1,f=k.id,p="first"===_?0:"last"===_?k.children.length:Math.min(_,k.children.length);break;case"a":d=D.left-6,h=D.top+u,f=A.get_parent(T),p=T.parent().index()+1}for(m=!0,v=0,b=l.data.nodes.length;vt.inArray(l.data.nodes[v],w.children)&&(x-=1)),!(m=m&&(A&&A.settings&&A.settings.dnd&&!1===A.settings.dnd.check_while_dragging||A.check(y,l.data.origin&&l.data.origin!==A?l.data.origin.get_node(l.data.nodes[v]):l.data.nodes[v],f,x,{dnd:!0,ref:A.get_node(T.parent()),pos:a,origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==A,is_foreign:!l.data.origin})))){A&&A.last_error&&(n=A.last_error());break}var s,I;if("i"===a&&T.parent().is(".jstree-closed")&&A.settings.dnd.open_timeout&&(l.event&&"dragover"===l.event.type&&!c||(r&&clearTimeout(r),r=setTimeout((s=A,I=T,function(){s.open_node(I)}),A.settings.dnd.open_timeout))),m)return(C=A.get_node(f,!0)).hasClass(".jstree-dnd-parent")||(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),C.addClass("jstree-dnd-parent")),i={ins:A,par:f,pos:"i"!==a||"last"!==_||0!==p||A.is_loaded(k)?p:"last"},o.css({left:d+"px",top:h+"px"}).show(),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=S?"copy":"move"),n={},g=!0,!1})),!0===g))return}else{for(m=!0,v=0,b=l.data.nodes.length;v"),escape:function(e){return t.vakata.html.div.text(e).html()},strip:function(e){return t.vakata.html.div.empty().append(t.parseHTML(e)).text()}};var i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};t.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(i,n,a){a===e&&(a=t.vakata.dnd._get()),a.event=n,t(l).triggerHandler("dnd_"+i+".vakata",a)},_get:function(){return{data:i.data,element:i.element,helper:i.helper}},_clean:function(){i.helper&&i.helper.remove(),i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},t(l).off("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).off("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop)},_scroll:function(e){if(!i.scroll_e||!i.scroll_l&&!i.scroll_t)return i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),!1;if(!i.scroll_i)return i.scroll_i=setInterval(t.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var n=i.scroll_e.scrollTop(),a=i.scroll_e.scrollLeft();i.scroll_e.scrollTop(n+i.scroll_t*t.vakata.dnd.settings.scroll_speed),i.scroll_e.scrollLeft(a+i.scroll_l*t.vakata.dnd.settings.scroll_speed),n===i.scroll_e.scrollTop()&&a===i.scroll_e.scrollLeft()||t.vakata.dnd._trigger("scroll",i.scroll_e)},start:function(e,n,a){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag&&t.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(t){}return i.init_x=e.pageX,i.init_y=e.pageY,i.data=n,i.is_down=!0,i.element=e.currentTarget,i.target=e.target,i.is_touch="touchstart"===e.type,!1!==a&&(i.helper=t("
          ").html(a).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),t(l).on("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).on("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop),!1},drag:function(e){if("touchmove"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_down){if(!i.is_drag){if(!(Math.abs(e.pageX-i.init_x)>(i.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)||Math.abs(e.pageY-i.init_y)>(i.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)))return;i.helper&&(i.helper.appendTo(l.body),i.helper_w=i.helper.outerWidth()),i.is_drag=!0,t(i.target).one("click.vakata",!1),t.vakata.dnd._trigger("start",e)}var n=!1,a=!1,r=!1,o=!1,s=!1,c=!1,d=!1,h=!1,u=!1,f=!1;return i.scroll_t=0,i.scroll_l=0,i.scroll_e=!1,t(t(e.target).parentsUntil("body").addBack().get().reverse()).filter((function(){return/^auto|scroll$/.test(t(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)})).each((function(){var n=t(this),a=n.offset();if(this.scrollHeight>this.offsetHeight&&(a.top+n.height()-e.pageYthis.offsetWidth&&(a.left+n.width()-e.pageXo&&e.pageY-do&&o-(e.pageY-d)c&&e.pageX-hc&&c-(e.pageX-h)r&&(u=r-50),s&&f+i.helper_w>s&&(f=s-(i.helper_w+2)),i.helper.css({left:f+"px",top:u+"px"})),t.vakata.dnd._trigger("move",e),!1}},stop:function(e){if("touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag)e.target!==i.target&&t(i.target).off("click.vakata"),t.vakata.dnd._trigger("stop",e);else if("touchend"===e.type&&e.target===i.target){var n=setTimeout((function(){t(e.target).click()}),100);t(e.target).one("click",(function(){n&&clearTimeout(n)}))}return t.vakata.dnd._clean(),!1}}}(t),t.jstree.defaults.massload=null,t.jstree.plugins.massload=function(e,i){this.init=function(t,e){this._data.massload={},i.init.call(this,t,e)},this._load_nodes=function(e,n,a,r){var o,s,l,c=this.settings.massload,d=(JSON.stringify(e),[]),h=this._model.data;if(!a){for(o=0,s=e.length;o32&&(n.fuzzy=!1),n.fuzzy&&(a=1<=p;s--)if(v=r[t.charAt(s-1)],m[s]=0===i?(m[s+1]<<1|1)&v:(m[s+1]<<1|1)&v|(f[s+1]|f[s])<<1|1|f[s+1],m[s]&a&&(_=o(i,s-1))<=y){if(y=_,x=s-1,k.push(x),!(x>l))break;p=Math.max(1,2*l-x)}if(o(i+1,l)>y)break;f=m}return{isMatch:x>=0,score:_}},!0===i?{search:s}:s(i)},t.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(t),t.jstree.defaults.sort=function(t,e){return this.get_text(t)>this.get_text(e)?1:-1},t.jstree.plugins.sort=function(e,i){this.bind=function(){i.bind.call(this),this.element.on("model.jstree",t.proxy((function(t,e){this.sort(e.parent,!0)}),this)).on("rename_node.jstree create_node.jstree",t.proxy((function(t,e){this.sort(e.parent||e.node.parent,!1),this.redraw_node(e.parent||e.node.parent,!0)}),this)).on("move_node.jstree copy_node.jstree",t.proxy((function(t,e){this.sort(e.parent,!1),this.redraw_node(e.parent,!0)}),this))},this.sort=function(e,i){var n,a;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(t.proxy(this.settings.sort,this)),i))for(n=0,a=e.children_d.length;ne.ttl)&&(e&&e.state&&(e=e.state),e&&t.isFunction(this.settings.state.filter)&&(e=this.settings.state.filter.call(this,e)),!!e&&(this.settings.state.preserve_loaded||delete e.core.loaded,this.element.one("set_state.jstree",(function(i,n){n.instance.trigger("restore_state",{state:t.extend(!0,{},e)})})),this.set_state(e),!0))},this.clear_state=function(){return t.vakata.storage.del(this.settings.state.key)}},function(t,e){t.vakata.storage={set:function(t,e){return window.localStorage.setItem(t,e)},get:function(t){return window.localStorage.getItem(t)},del:function(t){return window.localStorage.removeItem(t)}}}(t),t.jstree.defaults.types={default:{}},t.jstree.defaults.types[t.jstree.root]={},t.jstree.plugins.types=function(i,n){this.init=function(i,a){var r,o;if(a&&a.types&&a.types.default)for(r in a.types)if("default"!==r&&r!==t.jstree.root&&a.types.hasOwnProperty(r))for(o in a.types.default)a.types.default.hasOwnProperty(o)&&a.types[r][o]===e&&(a.types[r][o]=a.types.default[o]);n.init.call(this,i,a),this._model.data[t.jstree.root].type=t.jstree.root},this.refresh=function(e,i){n.refresh.call(this,e,i),this._model.data[t.jstree.root].type=t.jstree.root},this.bind=function(){this.element.on("model.jstree",t.proxy((function(i,n){var a,r,o,s=this._model.data,l=n.nodes,c=this.settings.types,d="default";for(a=0,r=l.length;a .jstree-ocl",t.proxy((function(e){e.stopImmediatePropagation();var i=t.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()}),this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",t.proxy((function(t){return t.stopImmediatePropagation(),this.is_disabled(t.currentTarget)||this.hover_node(t.currentTarget),!1}),this)).on("mouseleave.jstree",".jstree-node",t.proxy((function(t){this.dehover_node(t.currentTarget)}),this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),i.teardown.call(this)},this.redraw_node=function(e,n,a,r){if(e=i.redraw_node.apply(this,arguments)){var o=f.cloneNode(!0);-1!==t.inArray(e.id,this._data.core.selected)&&(o.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(o.className+=" jstree-wholerow-hovered"),e.insertBefore(o,e.childNodes[0])}return e}},window.customElements&&Object&&Object.create){var p=Object.create(HTMLElement.prototype);p.createdCallback=function(){var e,i={core:{},plugins:[]};for(e in t.jstree.plugins)t.jstree.plugins.hasOwnProperty(e)&&this.attributes[e]&&(i.plugins.push(e),this.getAttribute(e)&&JSON.parse(this.getAttribute(e))&&(i[e]=JSON.parse(this.getAttribute(e))));for(e in t.jstree.defaults.core)t.jstree.defaults.core.hasOwnProperty(e)&&this.attributes[e]&&(i.core[e]=JSON.parse(this.getAttribute(e))||this.getAttribute(e));t(this).jstree(i)};try{window.customElements.define("vakata-jstree",(function(){}),{prototype:p})}catch(t){}}}})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i,n,a){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),i.fn.dataTable.Buttons||require("datatables.net-buttons")(e,i),t(i,e,e.document,n,a)}:t(jQuery,window,document)}((function(t,e,i,n,a,r){function o(e,i){C===r&&(C=-1===A.serializeToString(t.parseXML(T["xl/worksheets/sheet1.xml"])).indexOf("xmlns:r")),t.each(i,(function(i,n){if(t.isPlainObject(n)){o(a=e.folder(i),n)}else{if(C){var a,r,s,l=[];for(r=(a=n.childNodes[0]).attributes.length-1;0<=r;r--){s=a.attributes[r].nodeName;var c=a.attributes[r].nodeValue;-1!==s.indexOf(":")&&(l.push({name:s,value:c}),a.removeAttribute(s))}for(r=0,s=l.length;r'+a),a=a.replace(/_dt_b_namespace_token_/g,":")),a=a.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>"),e.file(i,a)}}))}function s(e,i,n){var a=e.createElement(i);return n&&(n.attr&&t(a).attr(n.attr),n.children&&t.each(n.children,(function(t,e){a.appendChild(e)})),n.text&&a.appendChild(e.createTextNode(n.text))),a}function l(t,e){var i,n=t.header[e].length;t.footer&&t.footer[e].length>n&&(n=t.footer[e].length);for(var a=0,o=t.body.length;an&&(n=i),401*t[1])};try{var C,A=new XMLSerializer}catch(t){}var T={"_rels/.rels":'',"xl/_rels/workbook.xml.rels":'',"[Content_Types].xml":'',"xl/workbook.xml":'',"xl/worksheets/sheet1.xml":'',"xl/styles.xml":''},D=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(t){return t/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(t){return t/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64}];return d.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(t){return t.i18n("buttons.copy","Copy")},action:function(e,n,a,r){this.processing(!0);var o=this,s=(e=k(n,r)).str;a=t("
          ").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});if(r.customize&&(s=r.customize(s,r)),r=t("",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"
          ").append(e("").attr({href:"#",tabindex:"-1","data-action":"today",title:this._options.tooltips.today}).append(e("").addClass(this._options.icons.today)))),!this._options.sideBySide&&this._hasDate()&&this._hasTime()){var i=void 0,n=void 0;"times"===this._options.viewMode?(i=this._options.tooltips.selectDate,n=this._options.icons.date):(i=this._options.tooltips.selectTime,n=this._options.icons.time),t.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"togglePicker",title:i}).append(e("").addClass(n))))}return this._options.buttons.showClear&&t.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"clear",title:this._options.tooltips.clear}).append(e("").addClass(this._options.icons.clear)))),this._options.buttons.showClose&&t.push(e("").append(e("").attr({href:"#",tabindex:"-1","data-action":"close",title:this._options.tooltips.close}).append(e("").addClass(this._options.icons.close)))),0===t.length?"":e("").addClass("table-condensed").append(e("").append(e("").append(t)))},l.prototype._getTemplate=function(){var t=e("
          ").addClass("bootstrap-datetimepicker-widget dropdown-menu"),i=e("
          ").addClass("datepicker").append(this._getDatePickerTemplate()),n=e("
          ").addClass("timepicker").append(this._getTimePickerTemplate()),a=e("
            ").addClass("list-unstyled"),r=e("
          • ").addClass("picker-switch"+(this._options.collapse?" accordion-toggle":"")).append(this._getToolbar());return this._options.inline&&t.removeClass("dropdown-menu"),this.use24Hours&&t.addClass("usetwentyfour"),this._isEnabled("s")&&!this.use24Hours&&t.addClass("wider"),this._options.sideBySide&&this._hasDate()&&this._hasTime()?(t.addClass("timepicker-sbs"),"top"===this._options.toolbarPlacement&&t.append(r),t.append(e("
            ").addClass("row").append(i.addClass("col-md-6")).append(n.addClass("col-md-6"))),"bottom"!==this._options.toolbarPlacement&&"default"!==this._options.toolbarPlacement||t.append(r),t):("top"===this._options.toolbarPlacement&&a.append(r),this._hasDate()&&a.append(e("
          • ").addClass(this._options.collapse&&this._hasTime()?"collapse":"").addClass(this._options.collapse&&this._hasTime()&&"times"===this._options.viewMode?"":"show").append(i)),"default"===this._options.toolbarPlacement&&a.append(r),this._hasTime()&&a.append(e("
          • ").addClass(this._options.collapse&&this._hasDate()?"collapse":"").addClass(this._options.collapse&&this._hasDate()&&"times"===this._options.viewMode?"show":"").append(n)),"bottom"===this._options.toolbarPlacement&&a.append(r),t.append(a))},l.prototype._place=function(t){var i=t&&t.data&&t.data.picker||this,n=i._options.widgetPositioning.vertical,a=i._options.widgetPositioning.horizontal,r=void 0,o=(i.component&&i.component.length?i.component:i._element).position(),s=(i.component&&i.component.length?i.component:i._element).offset();if(i._options.widgetParent)r=i._options.widgetParent.append(i.widget);else if(i._element.is("input"))r=i._element.after(i.widget).parent();else{if(i._options.inline)return void(r=i._element.append(i.widget));r=i._element,i._element.children().first().after(i.widget)}if("auto"===n&&(n=s.top+1.5*i.widget.height()>=e(window).height()+e(window).scrollTop()&&i.widget.height()+i._element.outerHeight()e(window).width()?"right":"left"),"top"===n?i.widget.addClass("top").removeClass("bottom"):i.widget.addClass("bottom").removeClass("top"),"right"===a?i.widget.addClass("float-right"):i.widget.removeClass("float-right"),"relative"!==r.css("position")&&(r=r.parents().filter((function(){return"relative"===e(this).css("position")})).first()),0===r.length)throw new Error("datetimepicker component should be placed within a relative positioned container");i.widget.css({top:"top"===n?"auto":o.top+i._element.outerHeight()+"px",bottom:"top"===n?r.outerHeight()-(r===i._element?0:o.top)+"px":"auto",left:"left"===a?(r===i._element?0:o.left)+"px":"auto",right:"left"===a?"auto":r.outerWidth()-i._element.outerWidth()-(r===i._element?0:o.left)+"px"})},l.prototype._fillDow=function(){var t=e("
          "),i=this._viewDate.clone().startOf("w").startOf("d");for(!0===this._options.calendarWeeks&&t.append(e(""),this._options.calendarWeeks&&r.append('"),n.push(r)),o="",a.isBefore(this._viewDate,"M")&&(o+=" old"),a.isAfter(this._viewDate,"M")&&(o+=" new"),this._options.allowMultidate){var l=this._datesFormatted.indexOf(a.format("YYYY-MM-DD"));-1!==l&&a.isSame(this._datesFormatted[l],"d")&&!this.unset&&(o+=" active")}else a.isSame(this._getLastPickedDate(),"d")&&!this.unset&&(o+=" active");this._isValid(a,"d")||(o+=" disabled"),a.isSame(this.getMoment(),"d")&&(o+=" today"),0!==a.day()&&6!==a.day()||(o+=" weekend"),r.append('"),a.add(1,"d")}t.find("tbody").empty().append(n),this._updateMonths(),this._updateYears(),this._updateDecades()}},l.prototype._fillHours=function(){var t=this.widget.find(".timepicker-hours table"),i=this._viewDate.clone().startOf("d"),n=[],a=e("");for(this._viewDate.hour()>11&&!this.use24Hours&&i.hour(12);i.isSame(this._viewDate,"d")&&(this.use24Hours||this._viewDate.hour()<12&&i.hour()<12||this._viewDate.hour()>11);)i.hour()%4==0&&(a=e(""),n.push(a)),a.append('"),i.add(1,"h");t.empty().append(n)},l.prototype._fillMinutes=function(){for(var t=this.widget.find(".timepicker-minutes table"),i=this._viewDate.clone().startOf("h"),n=[],a=1===this._options.stepping?5:this._options.stepping,r=e("");this._viewDate.isSame(i,"h");)i.minute()%(4*a)==0&&(r=e(""),n.push(r)),r.append('"),i.add(a,"m");t.empty().append(n)},l.prototype._fillSeconds=function(){for(var t=this.widget.find(".timepicker-seconds table"),i=this._viewDate.clone().startOf("m"),n=[],a=e("");this._viewDate.isSame(i,"m");)i.second()%20==0&&(a=e(""),n.push(a)),a.append('"),i.add(5,"s");t.empty().append(n)},l.prototype._fillTime=function(){var t=void 0,e=void 0,i=this.widget.find(".timepicker span[data-time-component]");this.use24Hours||(t=this.widget.find(".timepicker [data-action=togglePeriod]"),e=this._getLastPickedDate().clone().add(this._getLastPickedDate().hours()>=12?-12:12,"h"),t.text(this._getLastPickedDate().format("A")),this._isValid(e,"h")?t.removeClass("disabled"):t.addClass("disabled")),i.filter("[data-time-component=hours]").text(this._getLastPickedDate().format(this.use24Hours?"HH":"hh")),i.filter("[data-time-component=minutes]").text(this._getLastPickedDate().format("mm")),i.filter("[data-time-component=seconds]").text(this._getLastPickedDate().format("ss")),this._fillHours(),this._fillMinutes(),this._fillSeconds()},l.prototype._doAction=function(t,i){var a=this._getLastPickedDate();if(e(t.currentTarget).is(".disabled"))return!1;switch(i=i||e(t.currentTarget).data("action")){case"next":var r=n.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.add(n.DatePickerModes[this.currentViewMode].NAV_STEP,r),this._fillDate(),this._viewUpdate(r);break;case"previous":var o=n.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.subtract(n.DatePickerModes[this.currentViewMode].NAV_STEP,o),this._fillDate(),this._viewUpdate(o);break;case"pickerSwitch":this._showMode(1);break;case"selectMonth":var s=e(t.target).closest("tbody").find("span").index(e(t.target));this._viewDate.month(s),this.currentViewMode===this.MinViewModeNumber?(this._setValue(a.clone().year(this._viewDate.year()).month(this._viewDate.month()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("M");break;case"selectYear":var l=parseInt(e(t.target).text(),10)||0;this._viewDate.year(l),this.currentViewMode===this.MinViewModeNumber?(this._setValue(a.clone().year(this._viewDate.year()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("YYYY");break;case"selectDecade":var c=parseInt(e(t.target).data("selection"),10)||0;this._viewDate.year(c),this.currentViewMode===this.MinViewModeNumber?(this._setValue(a.clone().year(this._viewDate.year()),this._getLastPickedDateIndex()),this._options.inline||this.hide()):(this._showMode(-1),this._fillDate()),this._viewUpdate("YYYY");break;case"selectDay":var d=this._viewDate.clone();e(t.target).is(".old")&&d.subtract(1,"M"),e(t.target).is(".new")&&d.add(1,"M");var h=d.date(parseInt(e(t.target).text(),10)),u=0;this._options.allowMultidate?-1!==(u=this._datesFormatted.indexOf(h.format("YYYY-MM-DD")))?this._setValue(null,u):this._setValue(h,this._getLastPickedDateIndex()+1):this._setValue(h,this._getLastPickedDateIndex()),this._hasTime()||this._options.keepOpen||this._options.inline||this._options.allowMultidate||this.hide();break;case"incrementHours":var f=a.clone().add(1,"h");this._isValid(f,"h")&&this._setValue(f,this._getLastPickedDateIndex());break;case"incrementMinutes":var p=a.clone().add(this._options.stepping,"m");this._isValid(p,"m")&&this._setValue(p,this._getLastPickedDateIndex());break;case"incrementSeconds":var g=a.clone().add(1,"s");this._isValid(g,"s")&&this._setValue(g,this._getLastPickedDateIndex());break;case"decrementHours":var m=a.clone().subtract(1,"h");this._isValid(m,"h")&&this._setValue(m,this._getLastPickedDateIndex());break;case"decrementMinutes":var v=a.clone().subtract(this._options.stepping,"m");this._isValid(v,"m")&&this._setValue(v,this._getLastPickedDateIndex());break;case"decrementSeconds":var b=a.clone().subtract(1,"s");this._isValid(b,"s")&&this._setValue(b,this._getLastPickedDateIndex());break;case"togglePeriod":this._setValue(a.clone().add(a.hours()>=12?-12:12,"h"),this._getLastPickedDateIndex());break;case"togglePicker":var y=e(t.target),x=y.closest("a"),w=y.closest("ul"),_=w.find(".show"),k=w.find(".collapse:not(.show)"),S=y.is("span")?y:y.find("span"),C=void 0;if(_&&_.length){if((C=_.data("collapse"))&&C.transitioning)return!0;_.collapse?(_.collapse("hide"),k.collapse("show")):(_.removeClass("show"),k.addClass("show")),S.toggleClass(this._options.icons.time+" "+this._options.icons.date),S.hasClass(this._options.icons.date)?x.attr("title",this._options.tooltips.selectDate):x.attr("title",this._options.tooltips.selectTime)}break;case"showPicker":this.widget.find(".timepicker > div:not(.timepicker-picker)").hide(),this.widget.find(".timepicker .timepicker-picker").show();break;case"showHours":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-hours").show();break;case"showMinutes":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-minutes").show();break;case"showSeconds":this.widget.find(".timepicker .timepicker-picker").hide(),this.widget.find(".timepicker .timepicker-seconds").show();break;case"selectHour":var A=parseInt(e(t.target).text(),10);this.use24Hours||(a.hours()>=12?12!==A&&(A+=12):12===A&&(A=0)),this._setValue(a.clone().hours(A),this._getLastPickedDateIndex()),this._isEnabled("a")||this._isEnabled("m")||this._options.keepOpen||this._options.inline?this._doAction(t,"showPicker"):this.hide();break;case"selectMinute":this._setValue(a.clone().minutes(parseInt(e(t.target).text(),10)),this._getLastPickedDateIndex()),this._isEnabled("a")||this._isEnabled("s")||this._options.keepOpen||this._options.inline?this._doAction(t,"showPicker"):this.hide();break;case"selectSecond":this._setValue(a.clone().seconds(parseInt(e(t.target).text(),10)),this._getLastPickedDateIndex()),this._isEnabled("a")||this._options.keepOpen||this._options.inline?this._doAction(t,"showPicker"):this.hide();break;case"clear":this.clear();break;case"close":this.hide();break;case"today":var T=this.getMoment();this._isValid(T,"d")&&this._setValue(T,this._getLastPickedDateIndex())}return!1},l.prototype.hide=function(){var t=!1;this.widget&&(this.widget.find(".collapse").each((function(){var i=e(this).data("collapse");return!i||!i.transitioning||(t=!0,!1)})),t||(this.component&&this.component.hasClass("btn")&&this.component.toggleClass("active"),this.widget.hide(),e(window).off("resize",this._place()),this.widget.off("click","[data-action]"),this.widget.off("mousedown",!1),this.widget.remove(),this.widget=!1,this._notifyEvent({type:n.Event.HIDE,date:this._getLastPickedDate().clone()}),void 0!==this.input&&this.input.blur(),this._viewDate=this._getLastPickedDate().clone()))},l.prototype.show=function(){var t=void 0,i={year:function(t){return t.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(t){return t.date(1).hours(0).seconds(0).minutes(0)},day:function(t){return t.hours(0).seconds(0).minutes(0)},hour:function(t){return t.seconds(0).minutes(0)},minute:function(t){return t.seconds(0)}};if(void 0!==this.input){if(this.input.prop("disabled")||!this._options.ignoreReadonly&&this.input.prop("readonly")||this.widget)return;void 0!==this.input.val()&&0!==this.input.val().trim().length?this._setValue(this._parseInputDate(this.input.val().trim()),0):this.unset&&this._options.useCurrent&&(t=this.getMoment(),"string"==typeof this._options.useCurrent&&(t=i[this._options.useCurrent](t)),this._setValue(t,0))}else this.unset&&this._options.useCurrent&&(t=this.getMoment(),"string"==typeof this._options.useCurrent&&(t=i[this._options.useCurrent](t)),this._setValue(t,0));this.widget=this._getTemplate(),this._fillDow(),this._fillMonths(),this.widget.find(".timepicker-hours").hide(),this.widget.find(".timepicker-minutes").hide(),this.widget.find(".timepicker-seconds").hide(),this._update(),this._showMode(),e(window).on("resize",{picker:this},this._place),this.widget.on("click","[data-action]",e.proxy(this._doAction,this)),this.widget.on("mousedown",!1),this.component&&this.component.hasClass("btn")&&this.component.toggleClass("active"),this._place(),this.widget.show(),void 0!==this.input&&this._options.focusOnShow&&!this.input.is(":focus")&&this.input.focus(),this._notifyEvent({type:n.Event.SHOW})},l.prototype.destroy=function(){this.hide(),this._element.removeData(n.DATA_KEY),this._element.removeData("date")},l.prototype.disable=function(){this.hide(),this.component&&this.component.hasClass("btn")&&this.component.addClass("disabled"),void 0!==this.input&&this.input.prop("disabled",!0)},l.prototype.enable=function(){this.component&&this.component.hasClass("btn")&&this.component.removeClass("disabled"),void 0!==this.input&&this.input.prop("disabled",!1)},l.prototype.toolbarPlacement=function(t){if(0===arguments.length)return this._options.toolbarPlacement;if("string"!=typeof t)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===s.indexOf(t))throw new TypeError("toolbarPlacement() parameter must be one of ("+s.join(", ")+") value");this._options.toolbarPlacement=t,this.widget&&(this.hide(),this.show())},l.prototype.widgetPositioning=function(t){if(0===arguments.length)return e.extend({},this._options.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===o.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+o.join(", ")+")");this._options.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===r.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+r.join(", ")+")");this._options.widgetPositioning.vertical=t.vertical}this._update()},l.prototype.widgetParent=function(t){if(0===arguments.length)return this._options.widgetParent;if("string"==typeof t&&(t=e(t)),null!==t&&"string"!=typeof t&&!(t instanceof e))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");this._options.widgetParent=t,this.widget&&(this.hide(),this.show())},l._jQueryHandleThis=function(i,a,r){var o=e(i).data(n.DATA_KEY);if("object"===(void 0===a?"undefined":t(a))&&e.extend({},n.Default,a),o||(o=new l(e(i),a),e(i).data(n.DATA_KEY,o)),"string"==typeof a){if(void 0===o[a])throw new Error('No method named "'+a+'"');return void 0===r?o[a]():o[a](r)}},l._jQueryInterface=function(t,e){return 1===this.length?l._jQueryHandleThis(this[0],t,e):this.each((function(){l._jQueryHandleThis(this,t,e)}))},l}(n);e(document).on(n.Event.CLICK_DATA_API,n.Selector.DATA_TOGGLE,(function(){var t=l(e(this));0!==t.length&&c._jQueryInterface.call(t,"toggle")})).on(n.Event.CHANGE,"."+n.ClassName.INPUT,(function(t){var i=l(e(this));0!==i.length&&c._jQueryInterface.call(i,"_change",t)})).on(n.Event.BLUR,"."+n.ClassName.INPUT,(function(t){var i=l(e(this)),a=i.data(n.DATA_KEY);0!==i.length&&(a._options.debug||window.debug||c._jQueryInterface.call(i,"hide",t))})).on(n.Event.KEYDOWN,"."+n.ClassName.INPUT,(function(t){var i=l(e(this));0!==i.length&&c._jQueryInterface.call(i,"_keydown",t)})).on(n.Event.KEYUP,"."+n.ClassName.INPUT,(function(t){var i=l(e(this));0!==i.length&&c._jQueryInterface.call(i,"_keyup",t)})).on(n.Event.FOCUS,"."+n.ClassName.INPUT,(function(t){var i=l(e(this)),a=i.data(n.DATA_KEY);0!==i.length&&a._options.allowInputToggle&&c._jQueryInterface.call(i,"show",t)})),e.fn[n.NAME]=c._jQueryInterface,e.fn[n.NAME].Constructor=c,e.fn[n.NAME].noConflict=function(){return e.fn[n.NAME]=a,c._jQueryInterface}}(jQuery)}(),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}((function(t,e){function i(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var t=new Date;return i(t.getFullYear(),t.getMonth(),t.getDate())}function a(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function r(i,n){return function(){return n!==e&&t.fn.datepicker.deprecated(n),this[i].apply(this,arguments)}}var o,s=(o={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),i=0,n=this.length;i]/g)||[]).length<=0||t(i).length>0)}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var a=this.o=t.extend({},this._o),r=a.language;p[r]||(r=r.split("-")[0],p[r]||(r=u.language)),a.language=r,a.startView=this._resolveViewName(a.startView),a.minViewMode=this._resolveViewName(a.minViewMode),a.maxViewMode=this._resolveViewName(a.maxViewMode),a.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,a.startView)),!0!==a.multidate&&(a.multidate=Number(a.multidate)||!1,!1!==a.multidate&&(a.multidate=Math.max(0,a.multidate))),a.multidateSeparator=String(a.multidateSeparator),a.weekStart%=7,a.weekEnd=(a.weekStart+6)%7;var o=g.parseFormat(a.format);a.startDate!==-1/0&&(a.startDate?a.startDate instanceof Date?a.startDate=this._local_to_utc(this._zero_time(a.startDate)):a.startDate=g.parseDate(a.startDate,o,a.language,a.assumeNearbyYear):a.startDate=-1/0),a.endDate!==1/0&&(a.endDate?a.endDate instanceof Date?a.endDate=this._local_to_utc(this._zero_time(a.endDate)):a.endDate=g.parseDate(a.endDate,o,a.language,a.assumeNearbyYear):a.endDate=1/0),a.daysOfWeekDisabled=this._resolveDaysOfWeek(a.daysOfWeekDisabled||[]),a.daysOfWeekHighlighted=this._resolveDaysOfWeek(a.daysOfWeekHighlighted||[]),a.datesDisabled=a.datesDisabled||[],t.isArray(a.datesDisabled)||(a.datesDisabled=a.datesDisabled.split(",")),a.datesDisabled=t.map(a.datesDisabled,(function(t){return g.parseDate(t,o,a.language,a.assumeNearbyYear)}));var s=String(a.orientation).toLowerCase().split(/\s+/g),l=a.orientation.toLowerCase();if(s=t.grep(s,(function(t){return/^auto|left|right|top|bottom$/.test(t)})),a.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===s.length)switch(s[0]){case"top":case"bottom":a.orientation.y=s[0];break;case"left":case"right":a.orientation.x=s[0]}else l=t.grep(s,(function(t){return/^left|right$/.test(t)})),a.orientation.x=l[0]||"auto",l=t.grep(s,(function(t){return/^top|bottom$/.test(t)})),a.orientation.y=l[0]||"auto";else;if(a.defaultViewDate instanceof Date||"string"==typeof a.defaultViewDate)a.defaultViewDate=g.parseDate(a.defaultViewDate,o,a.language,a.assumeNearbyYear);else if(a.defaultViewDate){var c=a.defaultViewDate.year||(new Date).getFullYear(),d=a.defaultViewDate.month||0,h=a.defaultViewDate.day||1;a.defaultViewDate=i(c,d,h)}else a.defaultViewDate=n()},_applyEvents:function(t){for(var i,n,a,r=0;ra?(this.picker.addClass("datepicker-orient-right"),u+=h-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p=this.o.orientation.y;if("auto"===p&&(p=-r+f-i<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+p),"top"===p?f-=i+parseInt(this.picker.css("padding-top")):f+=d,this.o.rtl){var g=a-(u+h);this.picker.css({top:f,right:g,zIndex:l})}else this.picker.css({top:f,left:u,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy((function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)}),this)),n=!0):(i=(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy((function(t){return g.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)}),this)),i=t.grep(i,t.proxy((function(t){return!this.dateWithinRange(t)||!t}),this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="";for(this.o.calendarWeeks&&(i+='');e";i+="",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",i=0;i<12;i++)e+=''+p[this.o.language].monthsShort[i]+"";this.picker.find(".datepicker-months td").html(e)},setRange:function(e){e&&e.length?this.range=t.map(e,(function(t){return t.valueOf()})):delete this.range,this.fill()},getClassNames:function(e){var i=[],r=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),s=n();return e.getUTCFullYear()r||e.getUTCFullYear()===r&&e.getUTCMonth()>o)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&a(e,s)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&es)&&c.push("disabled"),y===v&&c.push("focused"),l!==t.noop&&((h=l(new Date(y,0,1)))===e?h={}:"boolean"==typeof h?h={enabled:h}:"string"==typeof h&&(h={classes:h}),!1===h.enabled&&c.push("disabled"),h.classes&&(c=c.concat(h.classes.split(/\s+/))),h.tooltip&&(d=h.tooltip)),u+='"+y+"";p.find(".datepicker-switch").text(g+"-"+m),p.find("td").html(u)},fill:function(){var a,r,o=new Date(this.viewDate),s=o.getUTCFullYear(),l=o.getUTCMonth(),c=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,d=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,f=p[this.o.language].today||p.en.today||"",m=p[this.o.language].clear||p.en.clear||"",v=p[this.o.language].titleFormat||p.en.titleFormat,b=n(),y=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&b>=this.o.startDate&&b<=this.o.endDate&&!this.weekOfDateIsDisabled(b);if(!isNaN(s)&&!isNaN(l)){this.picker.find(".datepicker-days .datepicker-switch").text(g.formatDate(o,v,this.o.language)),this.picker.find("tfoot .today").text(f).css("display",y?"table-cell":"none"),this.picker.find("tfoot .clear").text(m).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var x=i(s,l,0),w=x.getUTCDate();x.setUTCDate(w-(x.getUTCDay()-this.o.weekStart+7)%7);var _=new Date(x);x.getUTCFullYear()<100&&_.setUTCFullYear(x.getUTCFullYear()),_.setUTCDate(_.getUTCDate()+42),_=_.valueOf();for(var k,S,C=[];x.valueOf()<_;){if((k=x.getUTCDay())===this.o.weekStart&&(C.push(""),this.o.calendarWeeks)){var A=new Date(+x+(this.o.weekStart-k-7)%7*864e5),T=new Date(Number(A)+(11-A.getUTCDay())%7*864e5),D=new Date(Number(D=i(T.getUTCFullYear(),0,1))+(11-D.getUTCDay())%7*864e5),I=(T-D)/864e5/7+1;C.push('")}(S=this.getClassNames(x)).push("day");var P=x.getUTCDate();this.o.beforeShowDay!==t.noop&&((r=this.o.beforeShowDay(this._utc_to_local(x)))===e?r={}:"boolean"==typeof r?r={enabled:r}:"string"==typeof r&&(r={classes:r}),!1===r.enabled&&S.push("disabled"),r.classes&&(S=S.concat(r.classes.split(/\s+/))),r.tooltip&&(a=r.tooltip),r.content&&(P=r.content)),S=t.isFunction(t.uniqueSort)?t.uniqueSort(S):t.unique(S),C.push('"),a=null,k===this.o.weekEnd&&C.push(""),x.setUTCDate(x.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(C.join(""));var M=p[this.o.language].monthsTitle||p.en.monthsTitle||"Months",E=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?M:s).end().find("tbody span").removeClass("active");if(t.each(this.dates,(function(t,e){e.getUTCFullYear()===s&&E.eq(e.getUTCMonth()).addClass("active")})),(sh)&&E.addClass("disabled"),s===c&&E.slice(0,d).addClass("disabled"),s===h&&E.slice(u+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var O=this;t.each(E,(function(i,n){var a=new Date(s,i,1),r=O.o.beforeShowMonth(a);r===e?r={}:"boolean"==typeof r?r={enabled:r}:"string"==typeof r&&(r={classes:r}),!1!==r.enabled||t(n).hasClass("disabled")||t(n).addClass("disabled"),r.classes&&t(n).addClass(r.classes),r.tooltip&&t(n).prop("title",r.tooltip)}))}this._fill_yearsView(".datepicker-years","year",10,s,c,h,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,s,c,h,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,s,c,h,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,i=new Date(this.viewDate),n=i.getUTCFullYear(),a=i.getUTCMonth(),r=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,o=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,s=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,c=1;switch(this.viewMode){case 4:c*=10;case 3:c*=10;case 2:c*=10;case 1:t=Math.floor(n/c)*c<=r,e=Math.floor(n/c)*c+c>s;break;case 0:t=n<=r&&a<=o,e=n>=s&&a>=l}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){var a,r,o;e.preventDefault(),e.stopPropagation(),(a=t(e.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),a.hasClass("today")&&!a.hasClass("day")&&(this.setViewMode(0),this._setDate(n(),"linked"===this.o.todayBtn?null:"view")),a.hasClass("clear")&&this.clearDates(),a.hasClass("disabled")||(a.hasClass("month")||a.hasClass("year")||a.hasClass("decade")||a.hasClass("century"))&&(this.viewDate.setUTCDate(1),1,1===this.viewMode?(o=a.parent().find("span").index(a),r=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(o)):(o=0,r=Number(a.text()),this.viewDate.setUTCFullYear(r)),this._trigger(g.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(i(r,o,1)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(e){var i=t(e.currentTarget).data("date"),n=new Date(i);this.o.updateViewDate&&(n.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),n.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(n)},navArrowsClick:function(e){var i=t(e.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(i*=12*g.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,i),this._trigger(g.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),(!e&&this.o.updateViewDate||"view"===e)&&(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var i=new Date(t);return i.setUTCDate(t.getUTCDate()+e),i},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!(i=t)||isNaN(i.getTime()))return this.o.defaultViewDate;var i;if(!e)return t;var n,a,r=new Date(t.valueOf()),o=r.getUTCDate(),s=r.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)a=-1===e?function(){return r.getUTCMonth()===s}:function(){return r.getUTCMonth()!==n},n=s+e,r.setUTCMonth(n),n=(n+12)%12;else{for(var c=0;c0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,i,n=!1,a=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(i=this.moveAvailableDate(a,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(i=this.moveAvailableDate(a,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?i=this.moveAvailableDate(a,e,"moveDay"):this.weekOfDateIsDisabled(a)||(i=this.moveAvailableDate(a,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(a,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(a,e,"moveYear")),i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;a=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(a),n=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}n&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation())},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+g.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var c=function(e,i){t.data(e,"datepicker",this),this.element=t(e),this.inputs=t.map(i.inputs,(function(t){return t.jquery?t[0]:t})),delete i.inputs,this.keepEmptyValues=i.keepEmptyValues,delete i.keepEmptyValues,h.call(t(this.inputs),i).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,(function(e){return t.data(e,"datepicker")})),this.updateDates()};c.prototype={updateDates:function(){this.dates=t.map(this.pickers,(function(t){return t.getUTCDate()})),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,(function(t){return t.valueOf()}));t.each(this.pickers,(function(t,i){i.setRange(e)}))},clearDates:function(){t.each(this.pickers,(function(t,e){e.clearDates()}))},dateUpdated:function(i){if(!this.updating){this.updating=!0;var n=t.data(i.target,"datepicker");if(n!==e){var a=n.getUTCDate(),r=this.keepEmptyValues,o=t.inArray(i.target,this.inputs),s=o-1,l=o+1,c=this.inputs.length;if(-1!==o){if(t.each(this.pickers,(function(t,e){e.getUTCDate()||e!==n&&r||e.setUTCDate(a)})),a=0&&athis.dates[l])for(;lthis.dates[l];)this.pickers[l++].setUTCDate(a);this.updateDates(),delete this.updating}}}},destroy:function(){t.map(this.pickers,(function(t){t.destroy()})),t(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:r("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var d=t.fn.datepicker,h=function(i){var n,a=Array.apply(null,arguments);if(a.shift(),this.each((function(){var e=t(this),r=e.data("datepicker"),o="object"==typeof i&&i;if(!r){var s=function(e,i){var n=t(e).data(),a={},r=new RegExp("^"+i.toLowerCase()+"([A-Z])");function o(t,e){return e.toLowerCase()}for(var s in i=new RegExp("^"+i.toLowerCase()),n)i.test(s)&&(a[s.replace(r,o)]=n[s]);return a}(this,"date"),d=function(e){var i={};if(p[e]||(e=e.split("-")[0],p[e])){var n=p[e];return t.each(f,(function(t,e){e in n&&(i[e]=n[e])})),i}}(t.extend({},u,s,o).language),h=t.extend({},u,d,s,o);e.hasClass("input-daterange")||h.inputs?(t.extend(h,{inputs:h.inputs||e.find("input").toArray()}),r=new c(this,h)):r=new l(this,h),e.data("datepicker",r)}"string"==typeof i&&"function"==typeof r[i]&&(n=r[i].apply(r,a))})),n===e||n instanceof l||n instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return n};t.fn.datepicker=h;var u=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},f=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=l;var p=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},g={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:e,parts:i}},parseDate:function(i,a,r,o){if(!i)return e;if(i instanceof Date)return i;if("string"==typeof a&&(a=g.parseFormat(a)),a.toValue)return a.toValue(i,a,r);var s,c,d,h,u,f={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},m={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(i in m&&(i=m[i]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(i)){for(s=i.match(/([\-+]\d+)([dmwy])/gi),i=new Date,h=0;h(new Date).getFullYear()+n&&(i-=100),i):e);var i,n},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};w.yy=w.yyyy,w.M=w.MM=w.mm=w.m,w.dd=w.d,i=n();var _=a.parts.slice();function k(){var t=this.slice(0,s[h].length),e=s[h].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(s.length!==_.length&&(_=t(_).filter((function(e,i){return-1!==t.inArray(i,x)})).toArray()),s.length===_.length){var S,C,A;for(h=0,S=_.length;h",contTemplate:'',footTemplate:''};g.template='
          ").addClass("cw").text("#"));i.isBefore(this._viewDate.clone().endOf("w"));)t.append(e("").addClass("dow").text(i.format("dd"))),i.add(1,"d");this.widget.find(".datepicker-days thead").append(t)},l.prototype._fillMonths=function(){for(var t=[],i=this._viewDate.clone().startOf("y").startOf("d");i.isSame(this._viewDate,"y");)t.push(e("").attr("data-action","selectMonth").addClass("month").text(i.format("MMM"))),i.add(1,"M");this.widget.find(".datepicker-months td").empty().append(t)},l.prototype._updateMonths=function(){var t=this.widget.find(".datepicker-months"),i=t.find("th"),n=t.find("tbody").find("span"),a=this;i.eq(0).find("span").attr("title",this._options.tooltips.prevYear),i.eq(1).attr("title",this._options.tooltips.selectYear),i.eq(2).find("span").attr("title",this._options.tooltips.nextYear),t.find(".disabled").removeClass("disabled"),this._isValid(this._viewDate.clone().subtract(1,"y"),"y")||i.eq(0).addClass("disabled"),i.eq(1).text(this._viewDate.year()),this._isValid(this._viewDate.clone().add(1,"y"),"y")||i.eq(2).addClass("disabled"),n.removeClass("active"),this._getLastPickedDate().isSame(this._viewDate,"y")&&!this.unset&&n.eq(this._getLastPickedDate().month()).addClass("active"),n.each((function(t){a._isValid(a._viewDate.clone().month(t),"M")||e(this).addClass("disabled")}))},l.prototype._getStartEndYear=function(t,e){var i=t/10,n=Math.floor(e/t)*t;return[n,n+9*i,Math.floor(e/i)*i]},l.prototype._updateYears=function(){var t=this.widget.find(".datepicker-years"),e=t.find("th"),i=this._getStartEndYear(10,this._viewDate.year()),n=this._viewDate.clone().year(i[0]),a=this._viewDate.clone().year(i[1]),r="";for(e.eq(0).find("span").attr("title",this._options.tooltips.prevDecade),e.eq(1).attr("title",this._options.tooltips.selectDecade),e.eq(2).find("span").attr("title",this._options.tooltips.nextDecade),t.find(".disabled").removeClass("disabled"),this._options.minDate&&this._options.minDate.isAfter(n,"y")&&e.eq(0).addClass("disabled"),e.eq(1).text(n.year()+"-"+a.year()),this._options.maxDate&&this._options.maxDate.isBefore(a,"y")&&e.eq(2).addClass("disabled"),r+=''+(n.year()-1)+"";!n.isAfter(a,"y");)r+=''+n.year()+"",n.add(1,"y");r+=''+n.year()+"",t.find("td").html(r)},l.prototype._updateDecades=function(){var t=this.widget.find(".datepicker-decades"),e=t.find("th"),i=this._getStartEndYear(100,this._viewDate.year()),n=this._viewDate.clone().year(i[0]),a=this._viewDate.clone().year(i[1]),r=!1,o=!1,s=void 0,l="";for(e.eq(0).find("span").attr("title",this._options.tooltips.prevCentury),e.eq(2).find("span").attr("title",this._options.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(0===n.year()||this._options.minDate&&this._options.minDate.isAfter(n,"y"))&&e.eq(0).addClass("disabled"),e.eq(1).text(n.year()+"-"+a.year()),this._options.maxDate&&this._options.maxDate.isBefore(a,"y")&&e.eq(2).addClass("disabled"),n.year()-10<0?l+=" ":l+=''+(n.year()-10)+"";!n.isAfter(a,"y");)s=n.year()+11,r=this._options.minDate&&this._options.minDate.isAfter(n,"y")&&this._options.minDate.year()<=s,o=this._options.maxDate&&this._options.maxDate.isAfter(n,"y")&&this._options.maxDate.year()<=s,l+=''+n.year()+"",n.add(10,"y");l+=''+n.year()+"",t.find("td").html(l)},l.prototype._fillDate=function(){var t=this.widget.find(".datepicker-days"),i=t.find("th"),n=[],a=void 0,r=void 0,o=void 0,s=void 0;if(this._hasDate()){for(i.eq(0).find("span").attr("title",this._options.tooltips.prevMonth),i.eq(1).attr("title",this._options.tooltips.selectMonth),i.eq(2).find("span").attr("title",this._options.tooltips.nextMonth),t.find(".disabled").removeClass("disabled"),i.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat)),this._isValid(this._viewDate.clone().subtract(1,"M"),"M")||i.eq(0).addClass("disabled"),this._isValid(this._viewDate.clone().add(1,"M"),"M")||i.eq(2).addClass("disabled"),a=this._viewDate.clone().startOf("M").startOf("w").startOf("d"),s=0;s<42;s++){if(0===a.weekday()&&(r=e("
          '+a.week()+"'+a.date()+"
          '+i.format(this.use24Hours?"HH":"hh")+"
          '+i.format("mm")+"
          '+i.format("ss")+"
           
          '+I+"'+P+"
          '+u.templates.leftArrow+''+u.templates.rightArrow+"
          '+g.headTemplate+""+g.footTemplate+'
          '+g.headTemplate+g.contTemplate+g.footTemplate+'
          '+g.headTemplate+g.contTemplate+g.footTemplate+'
          '+g.headTemplate+g.contTemplate+g.footTemplate+'
          '+g.headTemplate+g.contTemplate+g.footTemplate+"
          ",t.fn.datepicker.DPGlobal=g,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=d,this},t.fn.datepicker.version="1.9.0",t.fn.datepicker.deprecated=function(t){var e=window.console;e&&e.warn&&e.warn("DEPRECATED: "+t)},t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',(function(e){var i=t(this);i.data("datepicker")||(e.preventDefault(),h.call(i,"show"))})),t((function(){h.call(t('[data-provide="datepicker-inline"]'))}))})),function(t,e,i){"use strict";var n=function(e,i){this.widget="",this.$element=t(e),this.defaultTime=i.defaultTime,this.disableFocus=i.disableFocus,this.disableMousewheel=i.disableMousewheel,this.isOpen=i.isOpen,this.minuteStep=i.minuteStep,this.modalBackdrop=i.modalBackdrop,this.orientation=i.orientation,this.secondStep=i.secondStep,this.snapToStep=i.snapToStep,this.showInputs=i.showInputs,this.showMeridian=i.showMeridian,this.showSeconds=i.showSeconds,this.template=i.template,this.appendWidgetTo=i.appendWidgetTo,this.showWidgetOnAddonClick=i.showWidgetOnAddonClick,this.icons=i.icons,this.maxHours=i.maxHours,this.explicitMode=i.explicitMode,this.handleDocumentClick=function(t){var e=t.data.scope;e.$element.parent().find(t.target).length||e.$widget.is(t.target)||e.$widget.find(t.target).length||e.hideWidget()},this._init()};n.prototype={constructor:n,_init:function(){var e=this;this.showWidgetOnAddonClick&&this.$element.parent().hasClass("input-group")&&this.$element.parent().hasClass("bootstrap-timepicker")?(this.$element.parent(".input-group.bootstrap-timepicker").find(".input-group-addon").on({"click.timepicker":t.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":t.proxy(this.showWidget,this),"click.timepicker":t.proxy(this.showWidget,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=t(this.getTemplate()).on("click",t.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each((function(){t(this).on({"click.timepicker":function(){t(this).select()},"keydown.timepicker":t.proxy(e.widgetKeydown,e),"keyup.timepicker":t.proxy(e.widgetKeyup,e)})})),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=this.maxHours-1:this.hour--},decrementMinute:function(t){var e;(e=t?this.minute-t:this.minute-this.minuteStep)<0?(this.decrementHour(),this.minute=e+60):this.minute=e},decrementSecond:function(){var t=this.second-this.secondStep;t<0?(this.decrementMinute(!0),this.second=t+60):this.second=t},elementKeydown:function(t){switch(t.which){case 9:if(t.shiftKey){if("hour"===this.highlightedUnit){this.hideWidget();break}this.highlightPrevUnit()}else{if(this.showMeridian&&"meridian"===this.highlightedUnit||this.showSeconds&&"second"===this.highlightedUnit||!this.showMeridian&&!this.showSeconds&&"minute"===this.highlightedUnit){this.hideWidget();break}this.highlightNextUnit()}t.preventDefault(),this.updateFromElementVal();break;case 27:this.updateFromElementVal();break;case 37:t.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:t.preventDefault(),this.highlightNextUnit(),this.updateFromElementVal();break;case 40:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var t=this.$element.get(0);if("selectionStart"in t)return t.selectionStart;if(i.selection){t.focus();var e=i.selection.createRange(),n=i.selection.createRange().text.length;return e.moveStart("character",-t.value.length),e.text.length-n}},getTemplate:function(){var t,e,i,n,a,r;switch(this.showInputs?(e='',i='',n='',a=''):(e='',i='',n='',a=''),r=''+(this.showSeconds?'':"")+(this.showMeridian?'':"")+" "+(this.showSeconds?'":"")+(this.showMeridian?'":"")+''+(this.showSeconds?'':"")+(this.showMeridian?'':"")+"
             
          "+e+' :'+i+":'+n+" '+a+"
            
          ",this.template){case"modal":t='
          ';break;case"dropdown":t='"}return t},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),t(i).off("mousedown.timepicker, touchend.timepicker",this.handleDocumentClick),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="hour",t.setSelectionRange&&setTimeout((function(){e.hour<10?t.setSelectionRange(0,1):t.setSelectionRange(0,2)}),0)},highlightMinute:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="minute",t.setSelectionRange&&setTimeout((function(){e.hour<10?t.setSelectionRange(2,4):t.setSelectionRange(3,5)}),0)},highlightSecond:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="second",t.setSelectionRange&&setTimeout((function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)}),0)},highlightMeridian:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="meridian",t.setSelectionRange&&(this.showSeconds?setTimeout((function(){e.hour<10?t.setSelectionRange(8,10):t.setSelectionRange(9,11)}),0):setTimeout((function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)}),0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}this.hour!==this.maxHours-1?this.hour++:this.hour=0},incrementMinute:function(t){var e;(e=t?this.minute+t:this.minute+this.minuteStep-this.minute%this.minuteStep)>59?(this.incrementHour(),this.minute=e-60):this.minute=e},incrementSecond:function(){var t=this.second+this.secondStep-this.second%this.secondStep;t>59?(this.incrementMinute(!0),this.second=t-60):this.second=t},mousewheel:function(e){if(!this.disableMousewheel){e.preventDefault(),e.stopPropagation();var i=e.originalEvent.wheelDelta||-e.originalEvent.detail,n=null;switch("mousewheel"===e.type?n=-1*e.originalEvent.wheelDelta:"DOMMouseScroll"===e.type&&(n=40*e.originalEvent.detail),n&&(e.preventDefault(),t(this).scrollTop(n+t(this).scrollTop())),this.highlightedUnit){case"minute":i>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":i>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:i>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},changeToNearestStep:function(t,e){return t%e==0?t:Math.round(t%e/e)?(t+(e-t%e))%60:t-t%e},place:function(){if(!this.isInline){var i=this.$widget.outerWidth(),n=this.$widget.outerHeight(),a=t(e).width(),r=t(e).height(),o=t(e).scrollTop(),s=parseInt(this.$element.parents().filter((function(){return"auto"!==t(this).css("z-index")})).first().css("z-index"),10)+10,l=this.component?this.component.parent().offset():this.$element.offset(),c=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),h=l.left,u=l.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.$widget.addClass("timepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(h-=i-d)):(this.$widget.addClass("timepicker-orient-left"),l.left<0?h-=l.left-10:l.left+i>a&&(h=a-i-10));var f,p,g=this.orientation.y;"auto"===g&&(f=-o+l.top-n,p=o+r-(l.top+c+n),g=Math.max(f,p)===p?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+g),"top"===g?u+=c:u-=n+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:u,left:h,zIndex:s})}},remove:function(){t("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(t){if(this.$element.val())this.updateFromElementVal();else if("current"===t){var e=new Date,i=e.getHours(),n=e.getMinutes(),a=e.getSeconds(),r="AM";0!==a&&60===(a=Math.ceil(e.getSeconds()/this.secondStep)*this.secondStep)&&(n+=1,a=0),0!==n&&60===(n=Math.ceil(e.getMinutes()/this.minuteStep)*this.minuteStep)&&(i+=1,n=0),this.showMeridian&&(0===i?i=12:i>=12?(i>12&&(i-=12),r="PM"):r="AM"),this.hour=i,this.minute=n,this.second=a,this.meridian=r,this.update()}else!1===t?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(t)},setTime:function(t,e){if(t){var i,n,a,r,o,s;if("object"==typeof t&&t.getMonth)a=t.getHours(),r=t.getMinutes(),o=t.getSeconds(),this.showMeridian&&(s="AM",a>12&&(s="PM",a%=12),12===a&&(s="PM"));else{if((i=(/a/i.test(t)?1:0)+(/p/i.test(t)?2:0))>2)return void this.clear();if(a=(n=t.replace(/[^0-9\:]/g,"").split(":"))[0]?n[0].toString():n.toString(),this.explicitMode&&a.length>2&&a.length%2!=0)return void this.clear();r=n[1]?n[1].toString():"",o=n[2]?n[2].toString():"",a.length>4&&(o=a.slice(-2),a=a.slice(0,-2)),a.length>2&&(r=a.slice(-2),a=a.slice(0,-2)),r.length>2&&(o=r.slice(-2),r=r.slice(0,-2)),a=parseInt(a,10),r=parseInt(r,10),o=parseInt(o,10),isNaN(a)&&(a=0),isNaN(r)&&(r=0),isNaN(o)&&(o=0),o>59&&(o=59),r>59&&(r=59),a>=this.maxHours&&(a=this.maxHours-1),this.showMeridian?(a>12&&(i=2,a-=12),i||(i=1),0===a&&(a=12),s=1===i?"AM":"PM"):a<12&&2===i?a+=12:a>=this.maxHours?a=this.maxHours-1:(a<0||12===a&&1===i)&&(a=0)}this.hour=a,this.snapToStep?(this.minute=this.changeToNearestStep(r,this.minuteStep),this.second=this.changeToNearestStep(o,this.secondStep)):(this.minute=r,this.second=o),this.meridian=s,this.update(e)}else this.clear()},showWidget:function(){this.isOpen||this.$element.is(":disabled")||(this.$widget.appendTo(this.appendWidgetTo),t(i).on("mousedown.timepicker, touchend.timepicker",{scope:this},this.handleDocumentClick),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",t.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0)},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(t){this.updateElement(),t||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var t=this.hour,e=1===this.minute.toString().length?"0"+this.minute:this.minute,i=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(t),this.$widget.find("input.bootstrap-timepicker-minute").val(e),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(i),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(t),this.$widget.find("span.bootstrap-timepicker-minute").text(e),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(i),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var t=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(t,!0)}},widgetClick:function(e){e.stopPropagation(),e.preventDefault();var i=t(e.target),n=i.closest("a").data("action");n&&this[n](),this.update(),i.is("input")&&i.get(0).setSelectionRange(0,2)},widgetKeydown:function(e){var i=t(e.target),n=i.attr("class").replace("bootstrap-timepicker-","");switch(e.which){case 9:if(e.shiftKey){if("hour"===n)return this.hideWidget()}else if(this.showMeridian&&"meridian"===n||this.showSeconds&&"second"===n||!this.showMeridian&&!this.showSeconds&&"minute"===n)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(e.preventDefault(),n){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2);break;case 40:switch(e.preventDefault(),n){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2)}},widgetKeyup:function(t){(65===t.which||77===t.which||80===t.which||46===t.which||8===t.which||t.which>=48&&t.which<=57||t.which>=96&&t.which<=105)&&this.updateFromWidgetInputs()}},t.fn.timepicker=function(e){var i=Array.apply(null,arguments);return i.shift(),this.each((function(){var a=t(this),r=a.data("timepicker"),o="object"==typeof e&&e;r||a.data("timepicker",r=new n(this,t.extend({},t.fn.timepicker.defaults,o,t(this).data()))),"string"==typeof e&&r[e].apply(r,i)}))},t.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,snapToStep:!1,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,icons:{up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},maxHours:24,explicitMode:!1},t.fn.timepicker.Constructor=n,t(i).on("focus.timepicker.data-api click.timepicker.data-api",'[data-provide="timepicker"]',(function(e){var i=t(this);i.data("timepicker")||(e.preventDefault(),i.timepicker())}))}(jQuery,window,document);var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(t,e,i){t instanceof String&&(t=String(t));for(var n=t.length,a=0;a").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("
          ").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("
          ").css({width:"100%",height:10}))).appendTo("body"),r=a.children(),o=r.children();n.barWidth=r[0].offsetWidth-r[0].clientWidth,n.bScrollOversize=100===o[0].offsetWidth&&100!==r[0].clientWidth,n.bScrollbarLeft=1!==Math.round(o.offset().left),n.bBounding=!!a[0].getBoundingClientRect().width,a.remove()}t.extend(i.oBrowser,Ut.__browser),i.oScroll.iBarWidth=Ut.__browser.barWidth}function d(t,e,i,a,r,o){var s=!1;if(i!==n){var l=i;s=!0}for(;a!==r;)t.hasOwnProperty(a)&&(l=s?e(l,t[a],a,t):t[a],s=!0,a+=o);return l}function h(e,n){var a=Ut.defaults.column,r=e.aoColumns.length;a=t.extend({},Ut.models.oColumn,a,{nTh:n||i.createElement("th"),sTitle:a.sTitle?a.sTitle:n?n.innerHTML:"",aDataSort:a.aDataSort?a.aDataSort:[r],mData:a.mData?a.mData:r,idx:r}),e.aoColumns.push(a),(a=e.aoPreSearchCols)[r]=t.extend({},Ut.models.oSearch,a[r]),u(e,r,t(n).data())}function u(e,i,a){i=e.aoColumns[i];var o=e.oClasses,s=t(i.nTh);if(!i.sWidthOrig){i.sWidthOrig=s.attr("width")||null;var c=(s.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(i.sWidthOrig=c[1])}a!==n&&null!==a&&(l(a),r(Ut.defaults.column,a,!0),a.mDataProp===n||a.mData||(a.mData=a.mDataProp),a.sType&&(i._sManualType=a.sType),a.className&&!a.sClass&&(a.sClass=a.className),a.sClass&&s.addClass(a.sClass),c=i.sClass,t.extend(i,a),Pt(i,a,"sWidth","sWidthOrig"),c!==i.sClass&&(i.sClass=c+" "+i.sClass),a.iDataSort!==n&&(i.aDataSort=[a.iDataSort]),Pt(i,a,"aDataSort"));var d=i.mData,h=ge(d),u=i.mRender?ge(i.mRender):null;a=function(t){return"string"==typeof t&&-1!==t.indexOf("@")},i._bAttrSrc=t.isPlainObject(d)&&(a(d.sort)||a(d.type)||a(d.filter)),i._setter=null,i.fnGetData=function(t,e,i){var a=h(t,e,n,i);return u&&e?u(a,e,t,i):a},i.fnSetData=function(t,e,i){return me(d)(t,e,i)},"number"!=typeof d&&(e._rowReadObject=!0),e.oFeatures.bSort||(i.bSortable=!1,s.addClass(o.sSortableNone)),e=-1!==t.inArray("asc",i.asSorting),a=-1!==t.inArray("desc",i.asSorting),i.bSortable&&(e||a)?e&&!a?(i.sSortingClass=o.sSortableAsc,i.sSortingClassJUI=o.sSortJUIAscAllowed):!e&&a?(i.sSortingClass=o.sSortableDesc,i.sSortingClassJUI=o.sSortJUIDescAllowed):(i.sSortingClass=o.sSortable,i.sSortingClassJUI=o.sSortJUI):(i.sSortingClass=o.sSortableNone,i.sSortingClassJUI="")}function f(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;ft(t);for(var i=0,n=e.length;iu[f])r(c.length+u[f],d);else if("string"==typeof u[f]){var p=0;for(l=c.length;pe&&t[r]--;-1!=a&&i===n&&t.splice(a,1)}function D(t,e,i,a){var r,o=t.aoData[e],s=function(i,n){for(;i.childNodes.length;)i.removeChild(i.firstChild);i.innerHTML=_(t,e,n,"display")};if("dom"!==i&&(i&&"auto"!==i||"dom"!==o.src)){var l=o.anCells;if(l)if(a!==n)s(l[a],a);else for(i=0,r=l.length;i").appendTo(a));var c=0;for(i=l.length;c=e.fnRecordsDisplay()?0:r,e.iInitDisplayStart=-1),a=Lt(e,"aoPreDrawCallback","preDraw",[e]),-1!==t.inArray(!1,a))ct(e,!1);else{a=[];var o=0,s=(r=e.asStripeClasses).length,l=e.oLanguage,c="ssp"==Nt(e),d=e.aiDisplay,h=e._iDisplayStart,u=e.fnDisplayEnd();if(e.bDrawing=!0,e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,ct(e,!1);else if(c){if(!e.bDestroying&&!i)return void B(e)}else e.iDraw++;if(0!==d.length)for(i=c?e.aoData.length:u,l=c?0:h;l",{class:s?r[0]:""}).append(t("
          ",{valign:"top",colSpan:m(e),class:e.oClasses.sRowEmpty}).html(o))[0];Lt(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],C(e),h,u,d]),Lt(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],C(e),h,u,d]),(r=t(e.nTBody)).children().detach(),r.append(t(a)),Lt(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}}function F(t,e){var i=t.oFeatures,n=i.bFilter;i.bSort&&yt(t),n?V(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,L(t),t._drawHold=!1}function j(e){var i=e.oClasses,n=t(e.nTable);n=t("
          ").insertBefore(n);var a=e.oFeatures,r=t("
          ",{id:e.sTableId+"_wrapper",class:i.sWrapper+(e.nTFoot?"":" "+i.sNoFooter)});e.nHolding=n[0],e.nTableWrapper=r[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var o,s,l,c,d,h,u=e.sDom.split(""),f=0;f")[0],"'"==(c=u[f+1])||'"'==c){for(d="",h=2;u[f+h]!=c;)d+=u[f+h],h++;"H"==d?d=i.sJUIHeader:"F"==d&&(d=i.sJUIFooter),-1!=d.indexOf(".")?(c=d.split("."),l.id=c[0].substr(1,c[0].length-1),l.className=c[1]):"#"==d.charAt(0)?l.id=d.substr(1,d.length-1):l.className=d,f+=h}r.append(l),r=t(l)}else if(">"==s)r=r.parent();else if("l"==s&&a.bPaginate&&a.bLengthChange)o=rt(e);else if("f"==s&&a.bFilter)o=$(e);else if("r"==s&&a.bProcessing)o=lt(e);else if("t"==s)o=dt(e);else if("i"==s&&a.bInfo)o=J(e);else if("p"==s&&a.bPaginate)o=ot(e);else if(0!==Ut.ext.feature.length)for(h=0,c=(l=Ut.ext.feature).length;h',c=r.sSearch;c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l,n=t("
          ",{id:s.f?null:a+"_filter",class:n.sFilter}).append(t("
          ").addClass(i.sLength);return e.aanFeatures.l||(c[0].id=n+"_length"),c.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",r[0].outerHTML)),t("select",c).val(e._iDisplayLength).on("change.DT",(function(i){at(e,t(this).val()),L(e)})),t(e.nTable).on("length.dt.DT",(function(i,n,a){e===n&&t("select",c).val(a)})),c[0]}function ot(e){var i=e.sPaginationType,n=Ut.ext.pager[i],a="function"==typeof n,r=function(t){L(t)};i=t("
          ").addClass(e.oClasses.sPaging+i)[0];var o=e.aanFeatures;return a||n.fnInit(e,i,r),o.p||(i.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(a){var e,i=t._iDisplayStart,s=t._iDisplayLength,l=t.fnRecordsDisplay(),c=-1===s;for(i=c?0:Math.ceil(i/s),s=c?1:Math.ceil(l/s),l=n(i,s),c=0,e=o.p.length;cr&&(n=0):"first"==e?n=0:"previous"==e?0>(n=0<=a?n-a:0)&&(n=0):"next"==e?n+a",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).append("
          ").insertBefore(e.nTable)[0]}function ct(e,i){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",i?"block":"none"),Lt(e,null,"processing",[e,i])}function dt(e){var i=t(e.nTable),n=e.oScroll;if(""===n.sX&&""===n.sY)return e.nTable;var a=n.sX,r=n.sY,o=e.oClasses,s=i.children("caption"),l=s.length?s[0]._captionSide:null,c=t(i[0].cloneNode(!1)),d=t(i[0].cloneNode(!1)),h=i.children("tfoot");h.length||(h=null),c=t("
          ",{class:o.sScrollWrapper}).append(t("
          ",{class:o.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:a?a?vt(a):null:"100%"}).append(t("
          ",{class:o.sScrollHeadInner}).css({"box-sizing":"content-box",width:n.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?s:null).append(i.children("thead"))))).append(t("
          ",{class:o.sScrollBody}).css({position:"relative",overflow:"auto",width:a?vt(a):null}).append(i)),h&&c.append(t("
          ",{class:o.sScrollFoot}).css({overflow:"hidden",border:0,width:a?a?vt(a):null:"100%"}).append(t("
          ",{class:o.sScrollFootInner}).append(d.removeAttr("id").css("margin-left",0).append("bottom"===l?s:null).append(i.children("tfoot")))));var u=(i=c.children())[0];o=i[1];var f=h?i[2]:null;return a&&t(o).on("scroll.DT",(function(t){t=this.scrollLeft,u.scrollLeft=t,h&&(f.scrollLeft=t)})),t(o).css("max-height",r),n.bCollapse||t(o).css("height",r),e.nScrollHead=u,e.nScrollBody=o,e.nScrollFoot=f,e.aoDrawCallback.push({fn:ht,sName:"scrolling"}),c[0]}function ht(i){var a=i.oScroll,r=a.sX,o=a.sXInner,s=a.sY;a=a.iBarWidth;var l=t(i.nScrollHead),c=l[0].style,d=l.children("div"),h=d[0].style,u=d.children("table");d=i.nScrollBody;var g=t(d),m=d.style,v=t(i.nScrollFoot).children("div"),b=v.children("table"),y=t(i.nTHead),x=t(i.nTable),w=x[0],_=w.style,k=i.nTFoot?t(i.nTFoot):null,S=i.oBrowser,C=S.bScrollOversize;re(i.aoColumns,"nTh");var A,T=[],D=[],I=[],P=[],M=function(t){(t=t.style).paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},E=d.scrollHeight>d.clientHeight;if(i.scrollBarVis!==E&&i.scrollBarVis!==n)i.scrollBarVis=E,f(i);else{if(i.scrollBarVis=E,x.children("thead, tfoot").remove(),k){E=k.clone().prependTo(x);var O=k.find("tr"),L=E.find("tr");E.find("[id]").removeAttr("id")}var F=y.clone().prependTo(x);y=y.find("tr"),E=F.find("tr"),F.find("th, td").removeAttr("tabindex"),F.find("[id]").removeAttr("id"),r||(m.width="100%",l[0].style.width="100%"),t.each(R(i,F),(function(t,e){A=p(i,t),e.style.width=i.aoColumns[A].sWidth})),k&&ut((function(t){t.style.width=""}),L),l=x.outerWidth(),""===r?(_.width="100%",C&&(x.find("tbody").height()>d.offsetHeight||"scroll"==g.css("overflow-y"))&&(_.width=vt(x.outerWidth()-a)),l=x.outerWidth()):""!==o&&(_.width=vt(o),l=x.outerWidth()),ut(M,E),ut((function(i){var n=e.getComputedStyle?e.getComputedStyle(i).width:vt(t(i).width());I.push(i.innerHTML),T.push(n)}),E),ut((function(t,e){t.style.width=T[e]}),y),t(E).css("height",0),k&&(ut(M,L),ut((function(e){P.push(e.innerHTML),D.push(vt(t(e).css("width")))}),L),ut((function(t,e){t.style.width=D[e]}),O),t(L).height(0)),ut((function(t,e){t.innerHTML='
          '+I[e]+"
          ",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=T[e]}),E),k&&ut((function(t,e){t.innerHTML='
          '+P[e]+"
          ",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=D[e]}),L),Math.round(x.outerWidth())d.offsetHeight||"scroll"==g.css("overflow-y")?l+a:l,C&&(d.scrollHeight>d.offsetHeight||"scroll"==g.css("overflow-y"))&&(_.width=vt(O-a)),""!==r&&""===o||It(i,1,"Possible column misalignment",6)):O="100%",m.width=vt(O),c.width=vt(O),k&&(i.nScrollFoot.style.width=vt(O)),!s&&C&&(m.height=vt(w.offsetHeight+a)),r=x.outerWidth(),u[0].style.width=vt(r),h.width=vt(r),o=x.height()>d.clientHeight||"scroll"==g.css("overflow-y"),h[s="padding"+(S.bScrollbarLeft?"Left":"Right")]=o?a+"px":"0px",k&&(b[0].style.width=vt(r),v[0].style.width=vt(r),v[0].style[s]=o?a+"px":"0px"),x.children("colgroup").insertBefore(x.children("thead")),g.trigger("scroll"),!i.bSorted&&!i.bFiltered||i._drawHold||(d.scrollTop=0)}}function ut(t,e,i){for(var n,a,r=0,o=0,s=e.length;o").appendTo(d.find("tbody"));for(d.find("thead, tfoot").remove(),d.append(t(i.nTHead).clone()).append(t(i.nTFoot).clone()),d.find("tfoot th, tfoot td").css("width",""),u=R(i,d.find("thead")[0]),n=0;n").css({width:w.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(i.aoData.length)for(n=0;n").css(l||s?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(d).appendTo(b),l&&c?d.width(c):l?(d.css("width","auto"),d.removeAttr("width"),d.width()").css("width",vt(e)).appendTo(n||i.body))[0].offsetWidth,e.remove(),n):0}function gt(e,i){var n=mt(e,i);if(0>n)return null;var a=e.aoData[n];return a.nTr?a.anCells[i]:t("
          ").html(_(e,n,i,"display"))[0]}function mt(t,e){for(var i,n=-1,a=-1,r=0,o=t.aoData.length;rn&&(n=i.length,a=r);return a}function vt(t){return null===t?"0px":"number"==typeof t?0>t?"0px":t+"px":t.match(/\d$/)?t+"px":t}function bt(e){var i=[],a=e.aoColumns,r=e.aaSortingFixed,o=t.isPlainObject(r),s=[],l=function(e){e.length&&!Array.isArray(e[0])?s.push(e):t.merge(s,e)};for(Array.isArray(r)&&l(r),o&&r.pre&&l(r.pre),l(e.aaSorting),o&&r.post&&l(r.post),e=0;eh?1:0))return"asc"===c.dir?d:-d}return(d=i[t])<(h=i[e])?-1:d>h?1:0})):o.sort((function(t,e){var r,o=s.length,l=a[t]._aSortData,c=a[e]._aSortData;for(r=0;ru?1:0}))}t.bSorted=!0}function xt(t){var e=t.aoColumns,i=bt(t);t=t.oLanguage.oAria;for(var n=0,a=e.length;n/g,""),l=r.nTh;l.removeAttribute("aria-sort"),r.bSortable&&(0o?o+1:3))}for(o=0,i=r.length;oo?o+1:3))}e.aLastSort=r}function St(t,e){var i,n=t.aoColumns[e],a=Ut.ext.order[n.sSortDataType];a&&(i=a.call(t.oInstance,t,e,g(t,e)));for(var r,o=Ut.ext.type.order[n.sType+"-pre"],s=0,l=t.aoData.length;s=o.length?[0,i[1]]:i)}))),i.search!==n&&t.extend(e.oPreviousSearch,Q(i.search)),i.columns){for(l=0,r=i.columns.length;l=i&&(e=i-n),e-=e%n,(-1===n||0>e)&&(e=0),t._iDisplayStart=e}function jt(e,i){e=e.renderer;var n=Ut.ext.renderer[i];return t.isPlainObject(e)&&e[i]?n[e[i]]||n._:"string"==typeof e&&n[e]||n._}function Nt(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function Rt(t,e){var i=Ne.numbers_length,n=Math.floor(i/2);return e<=i?t=se(0,e):t<=n?((t=se(0,i-2)).push("ellipsis"),t.push(e-1)):(t>=e-1-n?t=se(e-(i-2),e):((t=se(t-n+2,t+n-1)).push("ellipsis"),t.push(e-1)),t.splice(0,0,"ellipsis"),t.splice(0,0,0)),t.DT_el="span",t}function Ht(e){t.each({num:function(t){return Re(t,e)},"num-fmt":function(t){return Re(t,e,Jt)},"html-num":function(t){return Re(t,e,Kt)},"html-num-fmt":function(t){return Re(t,e,Kt,Jt)}},(function(t,i){$t.type.order[t+e+"-pre"]=i,t.match(/^html\-/)&&($t.type.search[t+e]=$t.type.search.html)}))}function Bt(t,i,n,a,r){return e.moment?t[i](r):e.luxon?t[n](r):a?t[a](r):t}function zt(t,i,n){if(e.moment){var a=e.moment.utc(t,i,n,!0);if(!a.isValid())return null}else if(e.luxon){if(!(a=i?e.luxon.DateTime.fromFormat(t,i):e.luxon.DateTime.fromISO(t)).isValid)return null;a.setLocale(n)}else i?(Be||alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),Be=!0):a=new Date(t);return a}function Yt(t){return function(e,i,a,r){0===arguments.length?(a="en",e=i=null):1===arguments.length?(a="en",i=e,e=null):2===arguments.length&&(a=i,i=e,e=null);var o="datetime-"+i;return Ut.ext.type.order[o]||(Ut.ext.type.detect.unshift((function(t){return t===o&&o})),Ut.ext.type.order[o+"-asc"]=function(t,e){return(t=t.valueOf())===(e=e.valueOf())?0:te?-1:1}),function(s,l){if(null!==s&&s!==n||("--now"===r?(s=new Date,s=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds()))):s=""),"type"===l)return o;if(""===s)return"sort"!==l?"":zt("0000-01-01 00:00:00",null,a);if(null!==i&&e===i&&"sort"!==l&&"type"!==l&&!(s instanceof Date))return s;var c=zt(s,e,a);return null===c?s:"sort"===l?c:(s=null===i?Bt(c,"toDate","toJSDate","")[t]():Bt(c,"format","toFormat","toISOString",i),"display"===l?He(s):s)}}}function Wt(t){return function(){var e=[Dt(this[Ut.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Ut.ext.internal[t].apply(this,e)}}var $t,Vt,Xt,Ut=function(e,i){if(this instanceof Ut)return t(e).DataTable(i);i=e,this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new Se(t?Dt(this[$t.iApiIndex]):this)},this.fnAddData=function(e,i){var a=this.api(!0);return e=Array.isArray(e)&&(Array.isArray(e[0])||t.isPlainObject(e[0]))?a.rows.add(e):a.row.add(e),(i===n||i)&&a.draw(),e.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),i=e.settings()[0],a=i.oScroll;t===n||t?e.draw(!1):(""!==a.sX||""!==a.sY)&&ht(i)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===n||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,i){var a=this.api(!0),r=(t=a.rows(t)).settings()[0],o=r.aoData[t[0][0]];return t.remove(),e&&e.call(this,r,o),(i===n||i)&&a.draw(),o},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,i,a,r,o){r=this.api(!0),null===e||e===n?r.search(t,i,a,o):r.column(e).search(t,i,a,o),r.draw()},this.fnGetData=function(t,e){var i=this.api(!0);if(t!==n){var a=t.nodeName?t.nodeName.toLowerCase():"";return e!==n||"td"==a||"th"==a?i.cell(t,e).data():i.row(t).data()||null}return i.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==n?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),i=t.nodeName.toUpperCase();return"TR"==i?e.row(t).index():"TD"==i||"TH"==i?[(t=e.cell(t).index()).row,t.columnVisible,t.column]:null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,i){return this.api(!0).row(t).child(e,i).show().child()[0]},this.fnPageChange=function(t,e){t=this.api(!0).page(t),(e===n||e)&&t.draw(!1)},this.fnSetColumnVis=function(t,e,i){t=this.api(!0).column(t).visible(e),(i===n||i)&&t.columns.adjust().draw()},this.fnSettings=function(){return Dt(this[$t.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,i){this.api(!0).order.listener(t,e,i)},this.fnUpdate=function(t,e,i,a,r){var o=this.api(!0);return i===n||null===i?o.row(e).data(t):o.cell(e,i).data(t),(r===n||r)&&o.columns.adjust(),(a===n||a)&&o.draw(),0},this.fnVersionCheck=$t.fnVersionCheck;var a=this,d=i===n,f=this.length;for(var p in d&&(i={}),this.oApi=this.internal=$t.internal,Ut.ext.internal)p&&(this[p]=Wt(p));return this.each((function(){var e,p={},g=1").appendTo(_)),A.nTHead=a[0];var r=_.children("tbody");if(0===r.length&&(r=t("
          ","
          "],col:[2,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
          ",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 - * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE) - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.adminlte = {})); -}(this, function (exports) { 'use strict'; - - /** - * -------------------------------------------- - * AdminLTE ControlSidebar.js - * License MIT - * -------------------------------------------- - */ - var ControlSidebar = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'ControlSidebar'; - var DATA_KEY = 'lte.controlsidebar'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Event = { - COLLAPSED: "collapsed" + EVENT_KEY, - EXPANDED: "expanded" + EVENT_KEY - }; - var Selector = { - CONTROL_SIDEBAR: '.control-sidebar', - CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content', - DATA_TOGGLE: '[data-widget="control-sidebar"]', - CONTENT: '.content-wrapper', - HEADER: '.main-header', - FOOTER: '.main-footer' - }; - var ClassName = { - CONTROL_SIDEBAR_ANIMATE: 'control-sidebar-animate', - CONTROL_SIDEBAR_OPEN: 'control-sidebar-open', - CONTROL_SIDEBAR_SLIDE: 'control-sidebar-slide-open', - LAYOUT_FIXED: 'layout-fixed', - NAVBAR_FIXED: 'layout-navbar-fixed', - NAVBAR_SM_FIXED: 'layout-sm-navbar-fixed', - NAVBAR_MD_FIXED: 'layout-md-navbar-fixed', - NAVBAR_LG_FIXED: 'layout-lg-navbar-fixed', - NAVBAR_XL_FIXED: 'layout-xl-navbar-fixed', - FOOTER_FIXED: 'layout-footer-fixed', - FOOTER_SM_FIXED: 'layout-sm-footer-fixed', - FOOTER_MD_FIXED: 'layout-md-footer-fixed', - FOOTER_LG_FIXED: 'layout-lg-footer-fixed', - FOOTER_XL_FIXED: 'layout-xl-footer-fixed' - }; - /** - * Class Definition - * ==================================================== - */ - - var ControlSidebar = - /*#__PURE__*/ - function () { - function ControlSidebar(element, config) { - this._element = element; - this._config = config; - - this._init(); - } // Public - - - var _proto = ControlSidebar.prototype; - - _proto.show = function show() { - // Show the control sidebar - if (this._config.controlsidebarSlide) { - $('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE); - $('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () { - $(Selector.CONTROL_SIDEBAR).hide(); - $('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE); - $(this).dequeue(); - }); - } else { - $('body').removeClass(ClassName.CONTROL_SIDEBAR_OPEN); - } - - var expandedEvent = $.Event(Event.EXPANDED); - $(this._element).trigger(expandedEvent); - }; - - _proto.collapse = function collapse() { - // Collapse the control sidebar - if (this._config.controlsidebarSlide) { - $('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE); - $(Selector.CONTROL_SIDEBAR).show().delay(10).queue(function () { - $('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () { - $('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE); - $(this).dequeue(); - }); - $(this).dequeue(); - }); - } else { - $('body').addClass(ClassName.CONTROL_SIDEBAR_OPEN); - } - - var collapsedEvent = $.Event(Event.COLLAPSED); - $(this._element).trigger(collapsedEvent); - }; - - _proto.toggle = function toggle() { - var shouldOpen = $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE); - - if (shouldOpen) { - // Open the control sidebar - this.show(); - } else { - // Close the control sidebar - this.collapse(); - } - } // Private - ; - - _proto._init = function _init() { - var _this = this; - - this._fixHeight(); - - this._fixScrollHeight(); - - $(window).resize(function () { - _this._fixHeight(); - - _this._fixScrollHeight(); - }); - $(window).scroll(function () { - if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) { - _this._fixScrollHeight(); - } - }); - }; - - _proto._fixScrollHeight = function _fixScrollHeight() { - var heights = { - scroll: $(document).height(), - window: $(window).height(), - header: $(Selector.HEADER).outerHeight(), - footer: $(Selector.FOOTER).outerHeight() - }; - var positions = { - bottom: Math.abs(heights.window + $(window).scrollTop() - heights.scroll), - top: $(window).scrollTop() - }; - var navbarFixed = false; - var footerFixed = false; - - if ($('body').hasClass(ClassName.LAYOUT_FIXED)) { - if ($('body').hasClass(ClassName.NAVBAR_FIXED) || $('body').hasClass(ClassName.NAVBAR_SM_FIXED) || $('body').hasClass(ClassName.NAVBAR_MD_FIXED) || $('body').hasClass(ClassName.NAVBAR_LG_FIXED) || $('body').hasClass(ClassName.NAVBAR_XL_FIXED)) { - if ($(Selector.HEADER).css("position") === "fixed") { - navbarFixed = true; - } - } - - if ($('body').hasClass(ClassName.FOOTER_FIXED) || $('body').hasClass(ClassName.FOOTER_SM_FIXED) || $('body').hasClass(ClassName.FOOTER_MD_FIXED) || $('body').hasClass(ClassName.FOOTER_LG_FIXED) || $('body').hasClass(ClassName.FOOTER_XL_FIXED)) { - if ($(Selector.FOOTER).css("position") === "fixed") { - footerFixed = true; - } - } - - if (positions.top === 0 && positions.bottom === 0) { - $(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer); - $(Selector.CONTROL_SIDEBAR).css('top', heights.header); - $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer)); - } else if (positions.bottom <= heights.footer) { - if (footerFixed === false) { - $(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer - positions.bottom); - $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.footer - positions.bottom)); - } else { - $(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer); - } - } else if (positions.top <= heights.header) { - if (navbarFixed === false) { - $(Selector.CONTROL_SIDEBAR).css('top', heights.header - positions.top); - $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header - positions.top)); - } else { - $(Selector.CONTROL_SIDEBAR).css('top', heights.header); - } - } else { - if (navbarFixed === false) { - $(Selector.CONTROL_SIDEBAR).css('top', 0); - $(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window); - } else { - $(Selector.CONTROL_SIDEBAR).css('top', heights.header); - } - } - } - }; - - _proto._fixHeight = function _fixHeight() { - var heights = { - window: $(window).height(), - header: $(Selector.HEADER).outerHeight(), - footer: $(Selector.FOOTER).outerHeight() - }; - - if ($('body').hasClass(ClassName.LAYOUT_FIXED)) { - var sidebarHeight = heights.window - heights.header; - - if ($('body').hasClass(ClassName.FOOTER_FIXED) || $('body').hasClass(ClassName.FOOTER_SM_FIXED) || $('body').hasClass(ClassName.FOOTER_MD_FIXED) || $('body').hasClass(ClassName.FOOTER_LG_FIXED) || $('body').hasClass(ClassName.FOOTER_XL_FIXED)) { - if ($(Selector.FOOTER).css("position") === "fixed") { - sidebarHeight = heights.window - heights.header - heights.footer; - } - } - - $(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', sidebarHeight); - - if (typeof $.fn.overlayScrollbars !== 'undefined') { - $(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).overlayScrollbars({ - className: this._config.scrollbarTheme, - sizeAutoCapable: true, - scrollbars: { - autoHide: this._config.scrollbarAutoHide, - clickScrolling: true - } - }); - } - } - } // Static - ; - - ControlSidebar._jQueryInterface = function _jQueryInterface(operation) { - return this.each(function () { - var data = $(this).data(DATA_KEY); - - if (!data) { - data = new ControlSidebar(this, $(this).data()); - $(this).data(DATA_KEY, data); - } - - if (data[operation] === 'undefined') { - throw new Error(operation + " is not a function"); - } - - data[operation](); - }); - }; - - return ControlSidebar; - }(); - /** - * - * Data Api implementation - * ==================================================== - */ - - - $(document).on('click', Selector.DATA_TOGGLE, function (event) { - event.preventDefault(); - - ControlSidebar._jQueryInterface.call($(this), 'toggle'); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = ControlSidebar._jQueryInterface; - $.fn[NAME].Constructor = ControlSidebar; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return ControlSidebar._jQueryInterface; - }; - - return ControlSidebar; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE Layout.js - * License MIT - * -------------------------------------------- - */ - var Layout = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'Layout'; - var DATA_KEY = 'lte.layout'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Selector = { - HEADER: '.main-header', - MAIN_SIDEBAR: '.main-sidebar', - SIDEBAR: '.main-sidebar .sidebar', - CONTENT: '.content-wrapper', - BRAND: '.brand-link', - CONTENT_HEADER: '.content-header', - WRAPPER: '.wrapper', - CONTROL_SIDEBAR: '.control-sidebar', - LAYOUT_FIXED: '.layout-fixed', - FOOTER: '.main-footer', - PUSHMENU_BTN: '[data-widget="pushmenu"]', - LOGIN_BOX: '.login-box', - REGISTER_BOX: '.register-box' - }; - var ClassName = { - HOLD: 'hold-transition', - SIDEBAR: 'main-sidebar', - CONTENT_FIXED: 'content-fixed', - SIDEBAR_FOCUSED: 'sidebar-focused', - LAYOUT_FIXED: 'layout-fixed', - NAVBAR_FIXED: 'layout-navbar-fixed', - FOOTER_FIXED: 'layout-footer-fixed', - LOGIN_PAGE: 'login-page', - REGISTER_PAGE: 'register-page' - }; - var Default = { - scrollbarTheme: 'os-theme-light', - scrollbarAutoHide: 'l' - }; - /** - * Class Definition - * ==================================================== - */ - - var Layout = - /*#__PURE__*/ - function () { - function Layout(element, config) { - this._config = config; - this._element = element; - - this._init(); - } // Public - - - var _proto = Layout.prototype; - - _proto.fixLayoutHeight = function fixLayoutHeight() { - var heights = { - window: $(window).height(), - header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0, - footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0, - sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0 - }; - - var max = this._max(heights); - - if (max == heights.window) { - $(Selector.CONTENT).css('min-height', max - heights.header - heights.footer); - } else { - $(Selector.CONTENT).css('min-height', max - heights.header); - } - - if ($('body').hasClass(ClassName.LAYOUT_FIXED)) { - $(Selector.CONTENT).css('min-height', max - heights.header - heights.footer); - - if (typeof $.fn.overlayScrollbars !== 'undefined') { - $(Selector.SIDEBAR).overlayScrollbars({ - className: this._config.scrollbarTheme, - sizeAutoCapable: true, - scrollbars: { - autoHide: this._config.scrollbarAutoHide, - clickScrolling: true - } - }); - } - } - } // Private - ; - - _proto._init = function _init() { - var _this = this; - - // Activate layout height watcher - this.fixLayoutHeight(); - $(Selector.SIDEBAR).on('collapsed.lte.treeview expanded.lte.treeview', function () { - _this.fixLayoutHeight(); - }); - $(Selector.PUSHMENU_BTN).on('collapsed.lte.pushmenu shown.lte.pushmenu', function () { - _this.fixLayoutHeight(); - }); - $(window).resize(function () { - _this.fixLayoutHeight(); - }); - - if (!$('body').hasClass(ClassName.LOGIN_PAGE) && !$('body').hasClass(ClassName.REGISTER_PAGE)) { - $('body, html').css('height', 'auto'); - } else if ($('body').hasClass(ClassName.LOGIN_PAGE) || $('body').hasClass(ClassName.REGISTER_PAGE)) { - var box_height = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height(); - $('body').css('min-height', box_height); - } - - $('body.hold-transition').removeClass('hold-transition'); - }; - - _proto._max = function _max(numbers) { - // Calculate the maximum number in a list - var max = 0; - Object.keys(numbers).forEach(function (key) { - if (numbers[key] > max) { - max = numbers[key]; - } - }); - return max; - } // Static - ; - - Layout._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY); - - var _config = $.extend({}, Default, $(this).data()); - - if (!data) { - data = new Layout($(this), _config); - $(this).data(DATA_KEY, data); - } - - if (config === 'init') { - data[config](); - } - }); - }; - - return Layout; - }(); - /** - * Data API - * ==================================================== - */ - - - $(window).on('load', function () { - Layout._jQueryInterface.call($('body')); - }); - $(Selector.SIDEBAR + ' a').on('focusin', function () { - $(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED); - }); - $(Selector.SIDEBAR + ' a').on('focusout', function () { - $(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = Layout._jQueryInterface; - $.fn[NAME].Constructor = Layout; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Layout._jQueryInterface; - }; - - return Layout; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE PushMenu.js - * License MIT - * -------------------------------------------- - */ - var PushMenu = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'PushMenu'; - var DATA_KEY = 'lte.pushmenu'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Event = { - COLLAPSED: "collapsed" + EVENT_KEY, - SHOWN: "shown" + EVENT_KEY - }; - var Default = { - autoCollapseSize: 992, - enableRemember: false, - noTransitionAfterReload: true - }; - var Selector = { - TOGGLE_BUTTON: '[data-widget="pushmenu"]', - SIDEBAR_MINI: '.sidebar-mini', - SIDEBAR_COLLAPSED: '.sidebar-collapse', - BODY: 'body', - OVERLAY: '#sidebar-overlay', - WRAPPER: '.wrapper' - }; - var ClassName = { - SIDEBAR_OPEN: 'sidebar-open', - COLLAPSED: 'sidebar-collapse', - OPEN: 'sidebar-open' - }; - /** - * Class Definition - * ==================================================== - */ - - var PushMenu = - /*#__PURE__*/ - function () { - function PushMenu(element, options) { - this._element = element; - this._options = $.extend({}, Default, options); - - if (!$(Selector.OVERLAY).length) { - this._addOverlay(); - } - - this._init(); - } // Public - - - var _proto = PushMenu.prototype; - - _proto.show = function show() { - if (this._options.autoCollapseSize) { - if ($(window).width() <= this._options.autoCollapseSize) { - $(Selector.BODY).addClass(ClassName.OPEN); - } - } - - $(Selector.BODY).removeClass(ClassName.COLLAPSED); - - if (this._options.enableRemember) { - localStorage.setItem("remember" + EVENT_KEY, ClassName.OPEN); - } - - var shownEvent = $.Event(Event.SHOWN); - $(this._element).trigger(shownEvent); - }; - - _proto.collapse = function collapse() { - if (this._options.autoCollapseSize) { - if ($(window).width() <= this._options.autoCollapseSize) { - $(Selector.BODY).removeClass(ClassName.OPEN); - } - } - - $(Selector.BODY).addClass(ClassName.COLLAPSED); - - if (this._options.enableRemember) { - localStorage.setItem("remember" + EVENT_KEY, ClassName.COLLAPSED); - } - - var collapsedEvent = $.Event(Event.COLLAPSED); - $(this._element).trigger(collapsedEvent); - }; - - _proto.toggle = function toggle() { - if (!$(Selector.BODY).hasClass(ClassName.COLLAPSED)) { - this.collapse(); - } else { - this.show(); - } - }; - - _proto.autoCollapse = function autoCollapse(resize) { - if (resize === void 0) { - resize = false; - } - - if (this._options.autoCollapseSize) { - if ($(window).width() <= this._options.autoCollapseSize) { - if (!$(Selector.BODY).hasClass(ClassName.OPEN)) { - this.collapse(); - } - } else if (resize == true) { - if ($(Selector.BODY).hasClass(ClassName.OPEN)) { - $(Selector.BODY).removeClass(ClassName.OPEN); - } - } - } - }; - - _proto.remember = function remember() { - if (this._options.enableRemember) { - var toggleState = localStorage.getItem("remember" + EVENT_KEY); - - if (toggleState == ClassName.COLLAPSED) { - if (this._options.noTransitionAfterReload) { - $("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function () { - $(this).removeClass('hold-transition'); - $(this).dequeue(); - }); - } else { - $("body").addClass(ClassName.COLLAPSED); - } - } else { - if (this._options.noTransitionAfterReload) { - $("body").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function () { - $(this).removeClass('hold-transition'); - $(this).dequeue(); - }); - } else { - $("body").removeClass(ClassName.COLLAPSED); - } - } - } - } // Private - ; - - _proto._init = function _init() { - var _this = this; - - this.remember(); - this.autoCollapse(); - $(window).resize(function () { - _this.autoCollapse(true); - }); - }; - - _proto._addOverlay = function _addOverlay() { - var _this2 = this; - - var overlay = $('
          ', { - id: 'sidebar-overlay' - }); - overlay.on('click', function () { - _this2.collapse(); - }); - $(Selector.WRAPPER).append(overlay); - } // Static - ; - - PushMenu._jQueryInterface = function _jQueryInterface(operation) { - return this.each(function () { - var data = $(this).data(DATA_KEY); - - var _options = $.extend({}, Default, $(this).data()); - - if (!data) { - data = new PushMenu(this, _options); - $(this).data(DATA_KEY, data); - } - - if (operation === 'toggle') { - data[operation](); - } - }); - }; - - return PushMenu; - }(); - /** - * Data API - * ==================================================== - */ - - - $(document).on('click', Selector.TOGGLE_BUTTON, function (event) { - event.preventDefault(); - var button = event.currentTarget; - - if ($(button).data('widget') !== 'pushmenu') { - button = $(button).closest(Selector.TOGGLE_BUTTON); - } - - PushMenu._jQueryInterface.call($(button), 'toggle'); - }); - $(window).on('load', function () { - PushMenu._jQueryInterface.call($(Selector.TOGGLE_BUTTON)); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = PushMenu._jQueryInterface; - $.fn[NAME].Constructor = PushMenu; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return PushMenu._jQueryInterface; - }; - - return PushMenu; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE Treeview.js - * License MIT - * -------------------------------------------- - */ - var Treeview = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'Treeview'; - var DATA_KEY = 'lte.treeview'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Event = { - SELECTED: "selected" + EVENT_KEY, - EXPANDED: "expanded" + EVENT_KEY, - COLLAPSED: "collapsed" + EVENT_KEY, - LOAD_DATA_API: "load" + EVENT_KEY - }; - var Selector = { - LI: '.nav-item', - LINK: '.nav-link', - TREEVIEW_MENU: '.nav-treeview', - OPEN: '.menu-open', - DATA_WIDGET: '[data-widget="treeview"]' - }; - var ClassName = { - LI: 'nav-item', - LINK: 'nav-link', - TREEVIEW_MENU: 'nav-treeview', - OPEN: 'menu-open' - }; - var Default = { - trigger: Selector.DATA_WIDGET + " " + Selector.LINK, - animationSpeed: 300, - accordion: true - }; - /** - * Class Definition - * ==================================================== - */ - - var Treeview = - /*#__PURE__*/ - function () { - function Treeview(element, config) { - this._config = config; - this._element = element; - } // Public - - - var _proto = Treeview.prototype; - - _proto.init = function init() { - this._setupListeners(); - }; - - _proto.expand = function expand(treeviewMenu, parentLi) { - var _this = this; - - var expandedEvent = $.Event(Event.EXPANDED); - - if (this._config.accordion) { - var openMenuLi = parentLi.siblings(Selector.OPEN).first(); - var openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first(); - this.collapse(openTreeview, openMenuLi); - } - - treeviewMenu.stop().slideDown(this._config.animationSpeed, function () { - parentLi.addClass(ClassName.OPEN); - $(_this._element).trigger(expandedEvent); - }); - }; - - _proto.collapse = function collapse(treeviewMenu, parentLi) { - var _this2 = this; - - var collapsedEvent = $.Event(Event.COLLAPSED); - treeviewMenu.stop().slideUp(this._config.animationSpeed, function () { - parentLi.removeClass(ClassName.OPEN); - $(_this2._element).trigger(collapsedEvent); - treeviewMenu.find(Selector.OPEN + " > " + Selector.TREEVIEW_MENU).slideUp(); - treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN); - }); - }; - - _proto.toggle = function toggle(event) { - var $relativeTarget = $(event.currentTarget); - var $parent = $relativeTarget.parent(); - var treeviewMenu = $parent.find('> ' + Selector.TREEVIEW_MENU); - - if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) { - if (!$parent.is(Selector.LI)) { - treeviewMenu = $parent.parent().find('> ' + Selector.TREEVIEW_MENU); - } - - if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) { - return; - } - } - - event.preventDefault(); - var parentLi = $relativeTarget.parents(Selector.LI).first(); - var isOpen = parentLi.hasClass(ClassName.OPEN); - - if (isOpen) { - this.collapse($(treeviewMenu), parentLi); - } else { - this.expand($(treeviewMenu), parentLi); - } - } // Private - ; - - _proto._setupListeners = function _setupListeners() { - var _this3 = this; - - $(document).on('click', this._config.trigger, function (event) { - _this3.toggle(event); - }); - } // Static - ; - - Treeview._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY); - - var _config = $.extend({}, Default, $(this).data()); - - if (!data) { - data = new Treeview($(this), _config); - $(this).data(DATA_KEY, data); - } - - if (config === 'init') { - data[config](); - } - }); - }; - - return Treeview; - }(); - /** - * Data API - * ==================================================== - */ - - - $(window).on(Event.LOAD_DATA_API, function () { - $(Selector.DATA_WIDGET).each(function () { - Treeview._jQueryInterface.call($(this), 'init'); - }); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = Treeview._jQueryInterface; - $.fn[NAME].Constructor = Treeview; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Treeview._jQueryInterface; - }; - - return Treeview; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE DirectChat.js - * License MIT - * -------------------------------------------- - */ - var DirectChat = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'DirectChat'; - var DATA_KEY = 'lte.directchat'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Event = { - TOGGLED: "toggled{EVENT_KEY}" - }; - var Selector = { - DATA_TOGGLE: '[data-widget="chat-pane-toggle"]', - DIRECT_CHAT: '.direct-chat' - }; - var ClassName = { - DIRECT_CHAT_OPEN: 'direct-chat-contacts-open' - }; - /** - * Class Definition - * ==================================================== - */ - - var DirectChat = - /*#__PURE__*/ - function () { - function DirectChat(element, config) { - this._element = element; - } - - var _proto = DirectChat.prototype; - - _proto.toggle = function toggle() { - $(this._element).parents(Selector.DIRECT_CHAT).first().toggleClass(ClassName.DIRECT_CHAT_OPEN); - var toggledEvent = $.Event(Event.TOGGLED); - $(this._element).trigger(toggledEvent); - } // Static - ; - - DirectChat._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY); - - if (!data) { - data = new DirectChat($(this)); - $(this).data(DATA_KEY, data); - } - - data[config](); - }); - }; - - return DirectChat; - }(); - /** - * - * Data Api implementation - * ==================================================== - */ - - - $(document).on('click', Selector.DATA_TOGGLE, function (event) { - if (event) event.preventDefault(); - - DirectChat._jQueryInterface.call($(this), 'toggle'); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = DirectChat._jQueryInterface; - $.fn[NAME].Constructor = DirectChat; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return DirectChat._jQueryInterface; - }; - - return DirectChat; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE TodoList.js - * License MIT - * -------------------------------------------- - */ - var TodoList = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'TodoList'; - var DATA_KEY = 'lte.todolist'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Selector = { - DATA_TOGGLE: '[data-widget="todo-list"]' - }; - var ClassName = { - TODO_LIST_DONE: 'done' - }; - var Default = { - onCheck: function onCheck(item) { - return item; - }, - onUnCheck: function onUnCheck(item) { - return item; - } - }; - /** - * Class Definition - * ==================================================== - */ - - var TodoList = - /*#__PURE__*/ - function () { - function TodoList(element, config) { - this._config = config; - this._element = element; - - this._init(); - } // Public - - - var _proto = TodoList.prototype; - - _proto.toggle = function toggle(item) { - item.parents('li').toggleClass(ClassName.TODO_LIST_DONE); - - if (!$(item).prop('checked')) { - this.unCheck($(item)); - return; - } - - this.check(item); - }; - - _proto.check = function check(item) { - this._config.onCheck.call(item); - }; - - _proto.unCheck = function unCheck(item) { - this._config.onUnCheck.call(item); - } // Private - ; - - _proto._init = function _init() { - var that = this; - $(Selector.DATA_TOGGLE).find('input:checkbox:checked').parents('li').toggleClass(ClassName.TODO_LIST_DONE); - $(Selector.DATA_TOGGLE).on('change', 'input:checkbox', function (event) { - that.toggle($(event.target)); - }); - } // Static - ; - - TodoList._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY); - - var _config = $.extend({}, Default, $(this).data()); - - if (!data) { - data = new TodoList($(this), _config); - $(this).data(DATA_KEY, data); - } - - if (config === 'init') { - data[config](); - } - }); - }; - - return TodoList; - }(); - /** - * Data API - * ==================================================== - */ - - - $(window).on('load', function () { - TodoList._jQueryInterface.call($(Selector.DATA_TOGGLE)); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = TodoList._jQueryInterface; - $.fn[NAME].Constructor = TodoList; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return TodoList._jQueryInterface; - }; - - return TodoList; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE CardWidget.js - * License MIT - * -------------------------------------------- - */ - var CardWidget = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'CardWidget'; - var DATA_KEY = 'lte.cardwidget'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Event = { - EXPANDED: "expanded" + EVENT_KEY, - COLLAPSED: "collapsed" + EVENT_KEY, - MAXIMIZED: "maximized" + EVENT_KEY, - MINIMIZED: "minimized" + EVENT_KEY, - REMOVED: "removed" + EVENT_KEY - }; - var ClassName = { - CARD: 'card', - COLLAPSED: 'collapsed-card', - WAS_COLLAPSED: 'was-collapsed', - MAXIMIZED: 'maximized-card' - }; - var Selector = { - DATA_REMOVE: '[data-card-widget="remove"]', - DATA_COLLAPSE: '[data-card-widget="collapse"]', - DATA_MAXIMIZE: '[data-card-widget="maximize"]', - CARD: "." + ClassName.CARD, - CARD_HEADER: '.card-header', - CARD_BODY: '.card-body', - CARD_FOOTER: '.card-footer', - COLLAPSED: "." + ClassName.COLLAPSED - }; - var Default = { - animationSpeed: 'normal', - collapseTrigger: Selector.DATA_COLLAPSE, - removeTrigger: Selector.DATA_REMOVE, - maximizeTrigger: Selector.DATA_MAXIMIZE, - collapseIcon: 'fa-minus', - expandIcon: 'fa-plus', - maximizeIcon: 'fa-expand', - minimizeIcon: 'fa-compress' - }; - - var CardWidget = - /*#__PURE__*/ - function () { - function CardWidget(element, settings) { - this._element = element; - this._parent = element.parents(Selector.CARD).first(); - - if (element.hasClass(ClassName.CARD)) { - this._parent = element; - } - - this._settings = $.extend({}, Default, settings); - } - - var _proto = CardWidget.prototype; - - _proto.collapse = function collapse() { - var _this = this; - - this._parent.children(Selector.CARD_BODY + ", " + Selector.CARD_FOOTER).slideUp(this._settings.animationSpeed, function () { - _this._parent.addClass(ClassName.COLLAPSED); - }); - - this._parent.find(this._settings.collapseTrigger + ' .' + this._settings.collapseIcon).addClass(this._settings.expandIcon).removeClass(this._settings.collapseIcon); - - var collapsed = $.Event(Event.COLLAPSED); - - this._element.trigger(collapsed, this._parent); - }; - - _proto.expand = function expand() { - var _this2 = this; - - this._parent.children(Selector.CARD_BODY + ", " + Selector.CARD_FOOTER).slideDown(this._settings.animationSpeed, function () { - _this2._parent.removeClass(ClassName.COLLAPSED); - }); - - this._parent.find(this._settings.collapseTrigger + ' .' + this._settings.expandIcon).addClass(this._settings.collapseIcon).removeClass(this._settings.expandIcon); - - var expanded = $.Event(Event.EXPANDED); - - this._element.trigger(expanded, this._parent); - }; - - _proto.remove = function remove() { - this._parent.slideUp(); - - var removed = $.Event(Event.REMOVED); - - this._element.trigger(removed, this._parent); - }; - - _proto.toggle = function toggle() { - if (this._parent.hasClass(ClassName.COLLAPSED)) { - this.expand(); - return; - } - - this.collapse(); - }; - - _proto.maximize = function maximize() { - this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.maximizeIcon).addClass(this._settings.minimizeIcon).removeClass(this._settings.maximizeIcon); - - this._parent.css({ - 'height': this._parent.height(), - 'width': this._parent.width(), - 'transition': 'all .15s' - }).delay(150).queue(function () { - $(this).addClass(ClassName.MAXIMIZED); - $('html').addClass(ClassName.MAXIMIZED); - - if ($(this).hasClass(ClassName.COLLAPSED)) { - $(this).addClass(ClassName.WAS_COLLAPSED); - } - - $(this).dequeue(); - }); - - var maximized = $.Event(Event.MAXIMIZED); - - this._element.trigger(maximized, this._parent); - }; - - _proto.minimize = function minimize() { - this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.minimizeIcon).addClass(this._settings.maximizeIcon).removeClass(this._settings.minimizeIcon); - - this._parent.css('cssText', 'height:' + this._parent[0].style.height + ' !important;' + 'width:' + this._parent[0].style.width + ' !important; transition: all .15s;').delay(10).queue(function () { - $(this).removeClass(ClassName.MAXIMIZED); - $('html').removeClass(ClassName.MAXIMIZED); - $(this).css({ - 'height': 'inherit', - 'width': 'inherit' - }); - - if ($(this).hasClass(ClassName.WAS_COLLAPSED)) { - $(this).removeClass(ClassName.WAS_COLLAPSED); - } - - $(this).dequeue(); - }); - - var MINIMIZED = $.Event(Event.MINIMIZED); - - this._element.trigger(MINIMIZED, this._parent); - }; - - _proto.toggleMaximize = function toggleMaximize() { - if (this._parent.hasClass(ClassName.MAXIMIZED)) { - this.minimize(); - return; - } - - this.maximize(); - } // Private - ; - - _proto._init = function _init(card) { - var _this3 = this; - - this._parent = card; - $(this).find(this._settings.collapseTrigger).click(function () { - _this3.toggle(); - }); - $(this).find(this._settings.maximizeTrigger).click(function () { - _this3.toggleMaximize(); - }); - $(this).find(this._settings.removeTrigger).click(function () { - _this3.remove(); - }); - } // Static - ; - - CardWidget._jQueryInterface = function _jQueryInterface(config) { - var data = $(this).data(DATA_KEY); - - if (!data) { - data = new CardWidget($(this), data); - $(this).data(DATA_KEY, typeof config === 'string' ? data : config); - } - - if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) { - data[config](); - } else if (typeof config === 'object') { - data._init($(this)); - } - }; - - return CardWidget; - }(); - /** - * Data API - * ==================================================== - */ - - - $(document).on('click', Selector.DATA_COLLAPSE, function (event) { - if (event) { - event.preventDefault(); - } - - CardWidget._jQueryInterface.call($(this), 'toggle'); - }); - $(document).on('click', Selector.DATA_REMOVE, function (event) { - if (event) { - event.preventDefault(); - } - - CardWidget._jQueryInterface.call($(this), 'remove'); - }); - $(document).on('click', Selector.DATA_MAXIMIZE, function (event) { - if (event) { - event.preventDefault(); - } - - CardWidget._jQueryInterface.call($(this), 'toggleMaximize'); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = CardWidget._jQueryInterface; - $.fn[NAME].Constructor = CardWidget; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return CardWidget._jQueryInterface; - }; - - return CardWidget; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE CardRefresh.js - * License MIT - * -------------------------------------------- - */ - var CardRefresh = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'CardRefresh'; - var DATA_KEY = 'lte.cardrefresh'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Event = { - LOADED: "loaded" + EVENT_KEY, - OVERLAY_ADDED: "overlay.added" + EVENT_KEY, - OVERLAY_REMOVED: "overlay.removed" + EVENT_KEY - }; - var ClassName = { - CARD: 'card' - }; - var Selector = { - CARD: "." + ClassName.CARD, - DATA_REFRESH: '[data-card-widget="card-refresh"]' - }; - var Default = { - source: '', - sourceSelector: '', - params: {}, - trigger: Selector.DATA_REFRESH, - content: '.card-body', - loadInContent: true, - loadOnInit: true, - responseType: '', - overlayTemplate: '
          ', - onLoadStart: function onLoadStart() {}, - onLoadDone: function onLoadDone(response) { - return response; - } - }; - - var CardRefresh = - /*#__PURE__*/ - function () { - function CardRefresh(element, settings) { - this._element = element; - this._parent = element.parents(Selector.CARD).first(); - this._settings = $.extend({}, Default, settings); - this._overlay = $(this._settings.overlayTemplate); - - if (element.hasClass(ClassName.CARD)) { - this._parent = element; - } - - if (this._settings.source === '') { - throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.'); - } - - this._init(); - - if (this._settings.loadOnInit) { - this.load(); - } - } - - var _proto = CardRefresh.prototype; - - _proto.load = function load() { - this._addOverlay(); - - this._settings.onLoadStart.call($(this)); - - $.get(this._settings.source, this._settings.params, function (response) { - if (this._settings.loadInContent) { - if (this._settings.sourceSelector != '') { - response = $(response).find(this._settings.sourceSelector).html(); - } - - this._parent.find(this._settings.content).html(response); - } - - this._settings.onLoadDone.call($(this), response); - - this._removeOverlay(); - }.bind(this), this._settings.responseType !== '' && this._settings.responseType); - var loadedEvent = $.Event(Event.LOADED); - $(this._element).trigger(loadedEvent); - }; - - _proto._addOverlay = function _addOverlay() { - this._parent.append(this._overlay); - - var overlayAddedEvent = $.Event(Event.OVERLAY_ADDED); - $(this._element).trigger(overlayAddedEvent); - }; - - _proto._removeOverlay = function _removeOverlay() { - this._parent.find(this._overlay).remove(); - - var overlayRemovedEvent = $.Event(Event.OVERLAY_REMOVED); - $(this._element).trigger(overlayRemovedEvent); - }; - - // Private - _proto._init = function _init(card) { - var _this = this; - - $(this).find(this._settings.trigger).on('click', function () { - _this.load(); - }); - } // Static - ; - - CardRefresh._jQueryInterface = function _jQueryInterface(config) { - var data = $(this).data(DATA_KEY); - var options = $(this).data(); - - if (!data) { - data = new CardRefresh($(this), options); - $(this).data(DATA_KEY, typeof config === 'string' ? data : config); - } - - if (typeof config === 'string' && config.match(/load/)) { - data[config](); - } else if (typeof config === 'object') { - data._init($(this)); - } - }; - - return CardRefresh; - }(); - /** - * Data API - * ==================================================== - */ - - - $(document).on('click', Selector.DATA_REFRESH, function (event) { - if (event) { - event.preventDefault(); - } - - CardRefresh._jQueryInterface.call($(this), 'load'); - }); - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = CardRefresh._jQueryInterface; - $.fn[NAME].Constructor = CardRefresh; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return CardRefresh._jQueryInterface; - }; - - return CardRefresh; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE Dropdown.js - * License MIT - * -------------------------------------------- - */ - var Dropdown = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'Dropdown'; - var DATA_KEY = 'lte.dropdown'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Selector = { - DROPDOWN_MENU: 'ul.dropdown-menu', - DROPDOWN_TOGGLE: '[data-toggle="dropdown"]' - }; - var Default = {}; - /** - * Class Definition - * ==================================================== - */ - - var Dropdown = - /*#__PURE__*/ - function () { - function Dropdown(element, config) { - this._config = config; - this._element = element; - } // Public - - - var _proto = Dropdown.prototype; - - _proto.toggleSubmenu = function toggleSubmenu() { - this._element.siblings().show().toggleClass("show"); - - if (!this._element.next().hasClass('show')) { - this._element.parents('.dropdown-menu').first().find('.show').removeClass("show").hide(); - } - - this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) { - $('.dropdown-submenu .show').removeClass("show").hide(); - }); - } // Static - ; - - Dropdown._jQueryInterface = function _jQueryInterface(config) { - return this.each(function () { - var data = $(this).data(DATA_KEY); - - var _config = $.extend({}, Default, $(this).data()); - - if (!data) { - data = new Dropdown($(this), _config); - $(this).data(DATA_KEY, data); - } - - if (config === 'toggleSubmenu') { - data[config](); - } - }); - }; - - return Dropdown; - }(); - /** - * Data API - * ==================================================== - */ - - - $(Selector.DROPDOWN_MENU + ' ' + Selector.DROPDOWN_TOGGLE).on("click", function (event) { - event.preventDefault(); - event.stopPropagation(); - - Dropdown._jQueryInterface.call($(this), 'toggleSubmenu'); - }); // $(Selector.SIDEBAR + ' a').on('focusin', () => { - // $(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED); - // }) - // $(Selector.SIDEBAR + ' a').on('focusout', () => { - // $(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED); - // }) - - /** - * jQuery API - * ==================================================== - */ - - $.fn[NAME] = Dropdown._jQueryInterface; - $.fn[NAME].Constructor = Dropdown; - - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; - return Dropdown._jQueryInterface; - }; - - return Dropdown; - }(jQuery); - - /** - * -------------------------------------------- - * AdminLTE Toasts.js - * License MIT - * -------------------------------------------- - */ - var Toasts = function ($) { - /** - * Constants - * ==================================================== - */ - var NAME = 'Toasts'; - var DATA_KEY = 'lte.toasts'; - var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Event = { - INIT: "init" + EVENT_KEY, - CREATED: "created" + EVENT_KEY, - REMOVED: "removed" + EVENT_KEY - }; - var Selector = { - BODY: 'toast-body', - CONTAINER_TOP_RIGHT: '#toastsContainerTopRight', - CONTAINER_TOP_LEFT: '#toastsContainerTopLeft', - CONTAINER_BOTTOM_RIGHT: '#toastsContainerBottomRight', - CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft' - }; - var ClassName = { - TOP_RIGHT: 'toasts-top-right', - TOP_LEFT: 'toasts-top-left', - BOTTOM_RIGHT: 'toasts-bottom-right', - BOTTOM_LEFT: 'toasts-bottom-left', - FADE: 'fade' - }; - var Position = { - TOP_RIGHT: 'topRight', - TOP_LEFT: 'topLeft', - BOTTOM_RIGHT: 'bottomRight', - BOTTOM_LEFT: 'bottomLeft' - }; - var Default = { - position: Position.TOP_RIGHT, - fixed: true, - autohide: false, - autoremove: true, - delay: 1000, - fade: true, - icon: null, - image: null, - imageAlt: null, - imageHeight: '25px', - title: null, - subtitle: null, - close: true, - body: null, - class: null - }; - /** - * Class Definition - * ==================================================== - */ - - var Toasts = - /*#__PURE__*/ - function () { - function Toasts(element, config) { - this._config = config; - - this._prepareContainer(); - - var initEvent = $.Event(Event.INIT); - $('body').trigger(initEvent); - } // Public - - - var _proto = Toasts.prototype; - - _proto.create = function create() { - var toast = $(' -
          -
          - - - - diff --git a/resources/views/components/alert.blade.php b/resources/views/components/alert.blade.php deleted file mode 100644 index c386ccd5b..000000000 --- a/resources/views/components/alert.blade.php +++ /dev/null @@ -1,4 +0,0 @@ -
          -
          {{ __($title) }}
          - {!! __($message) !!} -
          \ No newline at end of file diff --git a/resources/views/components/attribute.blade.php b/resources/views/components/attribute.blade.php deleted file mode 100644 index e5bf4f34b..000000000 --- a/resources/views/components/attribute.blade.php +++ /dev/null @@ -1,8 +0,0 @@ -
          -
          -

          {{__($title)}}

          -
          -
          - -
          -
          \ No newline at end of file diff --git a/resources/views/components/attributes.blade.php b/resources/views/components/attributes.blade.php deleted file mode 100644 index 664711d84..000000000 --- a/resources/views/components/attributes.blade.php +++ /dev/null @@ -1,54 +0,0 @@ - - -@isset($open) -
          - @else -
          - @endisset -
          -

          {{$title}}

          -
          - -
          -
          -
          - @isset($onSave) - - -
          - @endisset - @foreach ($data as $key=>$value) - @include('attribute',[ - "title" => $key, - "id" => $value, - "class" => $rand - ]) - @endforeach -
          -
          - \ No newline at end of file diff --git a/resources/views/components/editor.blade.php b/resources/views/components/editor.blade.php deleted file mode 100644 index d207d3e76..000000000 --- a/resources/views/components/editor.blade.php +++ /dev/null @@ -1,61 +0,0 @@ -@extends('layouts.app') - -@section('content') - - - -

          -
          -
          - - -@endsection \ No newline at end of file diff --git a/resources/views/components/file-input.blade.php b/resources/views/components/file-input.blade.php deleted file mode 100644 index 9c72ff480..000000000 --- a/resources/views/components/file-input.blade.php +++ /dev/null @@ -1,73 +0,0 @@ -@isset($id) - @php($rand = $id) -@else - @php($rand = str_random(10)) -@endisset -
          - -
          - - - - - - - - -
          - -
          - - diff --git a/resources/views/components/folder.blade.php b/resources/views/components/folder.blade.php deleted file mode 100644 index bb78a55bb..000000000 --- a/resources/views/components/folder.blade.php +++ /dev/null @@ -1,12 +0,0 @@ -@foreach($files as $key => $file) - @if(is_array($file)) - @if(strpos($key,"=")) - { "text" : "{{explode("=",$key)[1]}}", "children" : [@include('folder',["files" => $file])], "id" : "{{$key}}"}, - @else - { "text" : "{{$key}}", "children" : [@include('folder',["files" => $file])],"id" : "{{$key}}"}}, - @endif - - @else - { "text" : "{{$file}}" }, - @endif -@endforeach \ No newline at end of file diff --git a/resources/views/components/inputs.blade.php b/resources/views/components/inputs.blade.php deleted file mode 100644 index 44a13b7c3..000000000 --- a/resources/views/components/inputs.blade.php +++ /dev/null @@ -1,100 +0,0 @@ -@php -if (!function_exists('safeExplode')) { - function safeExplode($explodable, $split, $accessor) { - $temp = explode($split, $explodable); - if (isset($temp[$accessor])) { - return $temp[$accessor]; - } - - return ""; - } -} -@endphp - -@foreach ($inputs as $name => $input) -
          - @if(is_array($input)) - @if(isset($disabled)) - - @else - - - @endif - @if(safeExplode($name, ":", 2)) - {{__(safeExplode($name, ":", 2))}} - @endif - @else - @php - $placeholder = safeExplode($input, ":", 2); - @endphp - @if(safeExplode($input, ":", 1) == "hidden") - @if(safeExplode($input, ":", 1) == "checkbox") -
          - - -
          - @else - @if(safeExplode($input, ":", 1) != "hidden")@endif - @endif - @elseif(isset($disabled)) - @if(safeExplode($input, ":", 1) == "checkbox") -
          - - -
          - @else - - - @endif - @elseif(safeExplode($input, ":", 1) == "textarea") - @if(count($inputs)) - - @else - - @endif - @elseif(safeExplode($input, ":", 1) == "file") -
          - - -
          - - @else - @if(safeExplode($input, ":", 1) == "checkbox") -
          - - -
          - @else - @if(substr(safeExplode($input, ":", 0),0,2) != "d-") - - @if(safeExplode($input, ":", 1) != "hidden")@endif - @else - - @if(safeExplode($input, ":", 1) != "hidden")@endif - @endif - @endif - @endif - @isset(explode(":", $input,3)[2]) - {{__(explode(":", $input,3)[2])}} - @endisset - @endif -
          -@endforeach diff --git a/resources/views/components/modal-button.blade.php b/resources/views/components/modal-button.blade.php deleted file mode 100644 index 1d896ca80..000000000 --- a/resources/views/components/modal-button.blade.php +++ /dev/null @@ -1,5 +0,0 @@ -@if(isset($text,$class,$target_id)) - -@endif \ No newline at end of file diff --git a/resources/views/components/modal-component.blade.php b/resources/views/components/modal-component.blade.php deleted file mode 100644 index 00a08a553..000000000 --- a/resources/views/components/modal-component.blade.php +++ /dev/null @@ -1,25 +0,0 @@ -@php($random = str_random(20)) - \ No newline at end of file diff --git a/resources/views/components/modal-iframe.blade.php b/resources/views/components/modal-iframe.blade.php deleted file mode 100644 index 3c44bb1a8..000000000 --- a/resources/views/components/modal-iframe.blade.php +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/resources/views/components/modal-table.blade.php b/resources/views/components/modal-table.blade.php deleted file mode 100644 index 707626b31..000000000 --- a/resources/views/components/modal-table.blade.php +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/resources/views/components/modal-tree.blade.php b/resources/views/components/modal-tree.blade.php deleted file mode 100644 index 5c4f7aefd..000000000 --- a/resources/views/components/modal-tree.blade.php +++ /dev/null @@ -1,65 +0,0 @@ -@php($random = str_random(20)) - - - - \ No newline at end of file diff --git a/resources/views/components/modal.blade.php b/resources/views/components/modal.blade.php deleted file mode 100644 index dc17dae03..000000000 --- a/resources/views/components/modal.blade.php +++ /dev/null @@ -1,80 +0,0 @@ -@php($id = isset($id) ? $id : bin2hex(random_bytes(10))) - -@isset($selects) - -@endisset \ No newline at end of file diff --git a/resources/views/components/newModal.blade.php b/resources/views/components/newModal.blade.php deleted file mode 100644 index 4b54b6c6b..000000000 --- a/resources/views/components/newModal.blade.php +++ /dev/null @@ -1,45 +0,0 @@ - - - \ No newline at end of file diff --git a/resources/views/components/pagination.blade.php b/resources/views/components/pagination.blade.php deleted file mode 100644 index 32563e59b..000000000 --- a/resources/views/components/pagination.blade.php +++ /dev/null @@ -1,34 +0,0 @@ -
          -
          - {{ __('Toplam :count kayıttan, sayfa :current/:page gösteriliyor', [ - 'count' => isset($total_count) ? $total_count : $count * 10 + 1, - 'current' => $current, - 'page' => $count, - ]) }} -
          -
          - -
          -
          diff --git a/resources/views/components/redirect.blade.php b/resources/views/components/redirect.blade.php deleted file mode 100644 index c26a263f2..000000000 --- a/resources/views/components/redirect.blade.php +++ /dev/null @@ -1,18 +0,0 @@ - - - - {{ __('Yönlendiriliyor...') }} - - - - - Yönlendiriliyorsunuz, - eğer otomatik yönlendirilmezseniz lütfen buraya tıklayın. - - \ No newline at end of file diff --git a/resources/views/components/table-card.blade.php b/resources/views/components/table-card.blade.php deleted file mode 100644 index 424522cf9..000000000 --- a/resources/views/components/table-card.blade.php +++ /dev/null @@ -1,63 +0,0 @@ -@php - $random = str_random(20) -@endphp -
          -
          -

          {{ $title }}

          -
          - -
          -
          -
          -
          -
          -
          -
          - {{ __('Yükleniyor...') }} -
          -
          -
          - - - - \ No newline at end of file diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php deleted file mode 100644 index 50564e917..000000000 --- a/resources/views/components/table.blade.php +++ /dev/null @@ -1,180 +0,0 @@ -@if(!isset($title) && !isset($value) && !isset($display)) - @php(__("Tablo Oluşturulamadı.")) -@else - @isset($id) - @php($rand = $id) - @else - @php($rand = str_random(10)) - @endisset - @if(!isset($startingNumber)) - @php($startingNumber = 0) - @endisset - -
          - - - - @if(isset($sortable) && $sortable) - - @endif - - @foreach($title as $i) - @if($i == "*hidden*") - - @else - - @endif - @endforeach - @isset($menu) - - @endisset - - - - @foreach ($value as $k) - id)) data-id="{{$k->id}}" @endif id="{{str_random(10)}}"> - @if(isset($sortable) && $sortable) - - @endif - - @foreach($display as $item) - @if(count(explode(':',$item)) > 1) - - @if(is_array($k)) - - @else - - @endif - @else - @if(is_array($k)) - - @else - - @endif - @endif - @endforeach - @isset($menu) - - @endisset - - @endforeach - -
          {{__("Taşı")}}#{{ __($i) }} - -
          {{$loop->iteration + $startingNumber}}{{array_key_exists($item,$k) ? $k[$item] : ""}}{{ $k->$item }} - -
          -
          - @if(isset($menu)) - - - @endif -@endif diff --git a/resources/views/components/test.blade.php b/resources/views/components/test.blade.php deleted file mode 100644 index 6d2f8d33f..000000000 --- a/resources/views/components/test.blade.php +++ /dev/null @@ -1,19 +0,0 @@ -@foreach($data as $key=>$d) -@if(strpos($key,"dc") !== false || strpos($key,"DC") !== false) - @include('test',[ - "data" => $d - ]) - @continue -@endif -@if(!empty($d)) -
          - {{explode("=",$key)[1]}} - @include('test',[ - "data" => $d - ]) -
          -@else -

          {{$key}}

          -@endif - -@endforeach \ No newline at end of file diff --git a/resources/views/components/title.blade.php b/resources/views/components/title.blade.php deleted file mode 100644 index e1a6c008d..000000000 --- a/resources/views/components/title.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -@section('content_header') -

          {{ __($title) }}

          -@stop \ No newline at end of file diff --git a/resources/views/components/tree.blade.php b/resources/views/components/tree.blade.php deleted file mode 100644 index 9db559ff9..000000000 --- a/resources/views/components/tree.blade.php +++ /dev/null @@ -1,58 +0,0 @@ -@php($random = (isset($id)? $id : str_random(20))) - -
          -
          - \ No newline at end of file diff --git a/resources/views/errors/400.blade.php b/resources/views/errors/400.blade.php deleted file mode 100644 index 1398f4bb2..000000000 --- a/resources/views/errors/400.blade.php +++ /dev/null @@ -1,18 +0,0 @@ -@if(request()->wantsJson() || request()->ip() == "127.0.0.1") - @php(respond(__($exception->getMessage()),201)) -@else - @extends('layouts.app') - @section('content') -
          -

          -
          -

          {{ __("Bir şeyler ters gitti.") }}

          - -

          - {{ $exception->getMessage() }} -
          {{ __("Yenile") }} -

          -
          -
          - @endsection -@endif \ No newline at end of file diff --git a/resources/views/errors/402.blade.php b/resources/views/errors/402.blade.php deleted file mode 100644 index 1398f4bb2..000000000 --- a/resources/views/errors/402.blade.php +++ /dev/null @@ -1,18 +0,0 @@ -@if(request()->wantsJson() || request()->ip() == "127.0.0.1") - @php(respond(__($exception->getMessage()),201)) -@else - @extends('layouts.app') - @section('content') -
          -

          -
          -

          {{ __("Bir şeyler ters gitti.") }}

          - -

          - {{ $exception->getMessage() }} -
          {{ __("Yenile") }} -

          -
          -
          - @endsection -@endif \ No newline at end of file diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php deleted file mode 100644 index 1398f4bb2..000000000 --- a/resources/views/errors/403.blade.php +++ /dev/null @@ -1,18 +0,0 @@ -@if(request()->wantsJson() || request()->ip() == "127.0.0.1") - @php(respond(__($exception->getMessage()),201)) -@else - @extends('layouts.app') - @section('content') -
          -

          -
          -

          {{ __("Bir şeyler ters gitti.") }}

          - -

          - {{ $exception->getMessage() }} -
          {{ __("Yenile") }} -

          -
          -
          - @endsection -@endif \ No newline at end of file diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php deleted file mode 100644 index c9d76b895..000000000 --- a/resources/views/errors/404.blade.php +++ /dev/null @@ -1,114 +0,0 @@ -@if(request()->wantsJson() || request()->ip() == "127.0.0.1") -@php(respond(__($exception->getMessage()),201)) -@else - - - - - - - {{ __("Liman Merkezi Yönetim Sistemi") }} - - - - -
          -
          -
          -
          - - Liman MYS - -
          -
          -

          404

          -

          {{__("Sayfa bulunamadı.")}}

          -

          {{ $exception->getMessage() ? $exception->getMessage() : __("Önceki sayfaya geri dönerek işleminize devam edebilirsiniz.") }} -

          - -
          -
          -
          -
          - - -@endif \ No newline at end of file diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php deleted file mode 100644 index 96bd67f1a..000000000 --- a/resources/views/errors/503.blade.php +++ /dev/null @@ -1,23 +0,0 @@ - -{{__("Bakım")}} - - - -
          - Asset 3 -

          {{__("Bakım Zamanı")}}

          -
          -

          {{__("Liman Merkezi Yönetim Sistemi şu an bakımda. Lütfen daha sonra tekrar deneyin.")}}

          -

          {{env('BRAND_NAME')}}

          -
          -
          \ No newline at end of file diff --git a/resources/views/errors/504.blade.php b/resources/views/errors/504.blade.php deleted file mode 100644 index 05e8a955d..000000000 --- a/resources/views/errors/504.blade.php +++ /dev/null @@ -1,18 +0,0 @@ -@if(request()->wantsJson() || request()->ip() == "127.0.0.1") - @php(respond(__($exception->getMessage()),201)) -@else - @extends('layouts.app') - @section('content') -
          -

          -
          -

          {{ __("Bir şeyler ters gitti.") }}

          - -

          - {{ $exception->getMessage() }} -
          {{ __("Yenile") }} -

          -
          -
          - @endsection -@endif \ No newline at end of file diff --git a/resources/views/errors/rediserror.blade.php b/resources/views/errors/rediserror.blade.php deleted file mode 100644 index d95b9f153..000000000 --- a/resources/views/errors/rediserror.blade.php +++ /dev/null @@ -1,23 +0,0 @@ - -{{__("Hata")}} - - - -
          - Asset 3 -

          {{__("Hata")}}

          -
          -

          {{__("Liman Merkezi Yönetim Sisteminin çalışması için gereken Redis servisi çalışmamaktadır. Lütfen kontrol ediniz.")}}

          -

          {{env('BRAND_NAME')}}

          -
          -
          \ No newline at end of file diff --git a/resources/views/extension_pages/manager.blade.php b/resources/views/extension_pages/manager.blade.php deleted file mode 100644 index 2274c5aed..000000000 --- a/resources/views/extension_pages/manager.blade.php +++ /dev/null @@ -1,279 +0,0 @@ -@include('modal-button',[ - "class" => "btn-primary", - "target_id" => "extensionUpload", - "text" => "Yükle" -]) -@if(env('EXTENSION_DEVELOPER_MODE') == true) - @include('modal-button',[ - "class" => "btn-secondary", - "target_id" => "extensionExport", - "text" => "İndir" - ]) - @include('modal-button',[ - "class" => "btn-info", - "target_id" => "newExtension", - "text" => "Yeni" - ]) -@endif -@if($updateAvailable) - -@endif

          -@include('errors') - -@include('table',[ - "value" => $extensions, - "title" => [ - "Eklenti Adı" , "Versiyon", "Lisans Durumu", "Son Kullanım Tarihi", "Son Güncelleme Tarihi", "*hidden*" - ], - "display" => [ - "name" , "version", "valid", "expires", "updated_at", "id:extension_id" - ], - "menu" => [ - "Lisans Ekle" => [ - "target" => "addLicenseToExtension", - "icon" => " context-menu-icon-add" - ], - "Bağımlılıkları Yükle" => [ - "target" => "forceInstallDepencencies", - "icon" => "fa-box-open" - ], - "Zorla Aktifleştir" => [ - "target" => "forceActivateExtension", - "icon" => "fa-check-double" - ], - "Sil" => [ - "target" => "delete", - "icon" => " context-menu-icon-delete" - ] - ], - "onclick" => env('EXTENSION_DEVELOPER_MODE') ? "extensionDetails" : "" -]) -@include('modal',[ - "id"=>"addLicenseToExtension", - "title" => "Lisans Ekle", - "text" => "Varsa mevcut lisansınızın üzerine yazılacaktır.", - "url" => route('add_extension_license'), - "next" => "reload", - "inputs" => [ - "Lisans" => "license:text", - "extension_id:extension_id" => "extension_id:hidden" - ], - "submit_text" => "Ekle" -]) - -@include('modal',[ - "id"=>"forceActivateExtension", - "title" => "Zorla Aktifleştir", - "text" => "Bu eklentiyi zorla aktifleştirmek istediğinize emin misiniz?", - "url" => route('extension_force_enable'), - "next" => "reload", - "inputs" => [ - "extension_id:extension_id" => "extension_id:hidden" - ], - "submit_text" => "Aktifleştir" -]) - -@include('modal',[ - "id"=>"forceInstallDepencencies", - "title" => "Bağımlılıkları Yükle", - "text" => "Bu eklentinin bağımlılıklarını tekrar yüklemek istediğinize emin misiniz?", - "url" => route('extension_force_dep_install'), - "next" => "reload", - "inputs" => [ - "extension_id:extension_id" => "extension_id:hidden" - ], - "submit_text" => "Yükle" -]) - -@component('modal-component',[ - "id" => "extensionUpdatesModal", - "title" => "Eklenti Güncellemeleri" -]) -
          -
          -
          -
            -
          -
          -
          -
          -
          -

          -
          -
          -

          -
          -
          -
          -
          -
          -

          - -
          -
          - -
          -@endcomponent - -@include('modal',[ - "id"=>"extensionUpload", - "title" => "Eklenti Yükle", - "url" => route('extension_upload'), - "next" => "reload", - "error" => "extensionUploadError", - "inputs" => [ - "Lütfen Eklenti Dosyasını(.lmne) Seçiniz" => "extension:file", - ], - "submit_text" => "Yükle" -]) -@if(env('EXTENSION_DEVELOPER_MODE') == true) -display_name] = $extension->id; -} -?> - -@include('modal',[ - "id"=>"extensionExport", - "onsubmit" => "downloadFile", - "title" => "Eklenti İndir", - "next" => "", - "inputs" => [ - "Eklenti Seçin:extension_id" => $input_extensions - ], - "submit_text" => "İndir" -]) - -@php - $templates = fetchExtensionTemplates(); -@endphp - -@include('modal',[ - "id"=>"newExtension", - "url" => route('extension_new'), - "next" => "debug", - "title" => "Yeni Eklenti Oluştur", - "inputs" => [ - "Eklenti Adı" => "name:text", - "Tipi:template" => collect($templates->templates)->mapWithKeys(function($value, $key){ - return [$value => $key]; - })->toArray() - ], - "submit_text" => "Oluştur" -]) - - -@endif - -@include('modal',[ - "id"=>"delete", - "title" =>"Eklentiyi Sil", - "url" => route('extension_remove'), - "text" => "Eklentiyi silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "next" => "reload", - "inputs" => [ - "Extension Id:'null'" => "extension_id:hidden" - ], - "submit_text" => "Eklentiyi Sil" -]) - - \ No newline at end of file diff --git a/resources/views/extension_pages/one.blade.php b/resources/views/extension_pages/one.blade.php deleted file mode 100644 index 941eb11c4..000000000 --- a/resources/views/extension_pages/one.blade.php +++ /dev/null @@ -1,420 +0,0 @@ -@extends('layouts.app') - -@section('content') - - - @include('errors') -
          - -
          -
          -
          -
          -
          - - -
          -
          - - -
          -
          - - -
          -
          - - -
          -
          - - -
          -
          - - -
          -
          - - -
          -
          - - -
          -
          - - -
          -
          - - - {{__("Mevcut Liman Sürüm Kodunu Al")}} -
          -
          - - - {{__("Birden fazla paket yazmak için aralarında boşluk bırakabilirsiniz.")}} -
          -
          - - - {{__("Birden fazla port yazmak için aralarında virgül bırakabilirsiniz.")}} -
          -
          - - -
          -
          - -
          -
          -
          - @include('modal-button',[ - "class" => "btn-success btn-sm", - "target_id" => "add_database", - "text" => "Veri Ekle" - ])

          - @include('table',[ - "value" => collect($extension["database"])->map(function($item){ - $item['required'] = isset($item['required']) && $item['required'] ? 'on' : ''; - $item['global'] = isset($item['global']) && $item['global'] ? 'on' : ''; - $item['writable'] = isset($item['writable']) && $item['writable'] ? 'on' : ''; - return $item; - }), - "title" => [ - "Adı" , "Türü" , "Variable Adı", "*hidden*" , "*hidden*", "*hidden*", "*hidden*", "*hidden*", "*hidden*" - ], - "display" => [ - "name" , "type", "variable", "variable:variable_old", "type:type_old", "name:name_old", "required:required", "global:global", "writable:writable" - ], - "menu" => [ - "Ayarları Düzenle" => [ - "target" => "edit_database", - "icon" => " context-menu-icon-edit" - ], - "Sil" => [ - "target" => "remove_database", - "icon" => " context-menu-icon-delete" - ] - ] - ]) - - @include('modal',[ - "id"=>"add_database", - "title" => "Veri Ekle", - "url" => route('extension_settings_add'), - "next" => "reload", - "inputs" => [ - "Adı" => "name:text:Veri adı oluşturulan formlarda gösterilmek için kullanılır.", - "Türü" => "type:text:Verinizin türü form elemanını belirler. Örneğin text, password vs.", - "Variable Adı" => "variable:text:Eklenti içinden veriye bu isim ile erişirsiniz.", - "Zorunlu Alan" => "required:checkbox", - "Kullanıcılar Arası Paylaşımlı" => "global:checkbox", - "Yazılabilir" => "writable:checkbox", - "table:database" => "table:hidden" - ], - "submit_text" => "Veri Ekle" - ]) - - @include('modal',[ - "id"=>"edit_database", - "title" => "Veri Düzenle", - "url" => route('extension_settings_update'), - "next" => "updateTable", - "inputs" => [ - "Adı" => "name:text", - "Türü" => "type:text", - "Variable Adı" => "variable:text", - "Sayfa Adı:a" => "name_old:hidden", - "Türü:a" => "type_old:hidden", - "Variable Adı:a" => "variable_old:hidden", - "Zorunlu Alan" => "required:checkbox", - "Kullanıcılar Arası Paylaşımlı" => "global:checkbox", - "Yazılabilir" => "writable:checkbox", - "table:database" => "table:hidden" - ], - "submit_text" => "Veri Düzenle" - ]) - @include('modal',[ - "id"=>"remove_database", - "title" => "Veri'yi Sil", - "url" => route('extension_settings_remove'), - "next" => "reload", - "text" => "Veri'yi silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "inputs" => [ - "Sayfa Adı:a" => "name:hidden", - "Türü:a" => "type:hidden", - "Variable Adı:a" => "variable:hidden", - "table:database" => "table:hidden" - ], - "submit_text" => "Veri'yi Sil" - ]) -
          -
          -

          - @include('table',[ - "value" => array_key_exists("functions",$extension) ? $extension["functions"] : [], - "title" => [ - "Fonksiyon Adı" , "Çeviri Anahtarı", "Yetki Sistemi", "Logu Görüntüle" ,"*hidden*" - ], - "display" => [ - "name" , "description", "isActive", "displayLog", "name:old" - ], - "menu" => [ - "İzin Parametreleri" => [ - "target" => "updateFunctionParameters", - "icon" => "fa-cog" - ], - "Ayarları Düzenle" => [ - "target" => "updateFunctionModalHandler", - "icon" => " context-menu-icon-edit" - ], - "Sil" => [ - "target" => "removeFunctionModal", - "icon" => " context-menu-icon-delete" - ] - ] - ]) - - @include('modal',[ - "id"=>"addFunctionModal", - "title" => "Fonksiyon Ekle", - "url" => route('extension_add_function'), - "next" => "reload", - "inputs" => [ - "Fonksiyon Adı" => "name:text", - "Açıklama (Çeviri Anahtarı)" => "description:text", - "Yetki Sistemine Dahil Et" => "isActive:checkbox", - "Sunucu Loglarında Görüntüle" => "displayLog:checkbox", - ], - "submit_text" => "Fonksiyon Ekle" - ]) - - @include('modal',[ - "id"=>"updateFunctionModal", - "title" => "Fonksiyon Duzenle", - "url" => route('extension_update_function'), - "next" => "reload", - "inputs" => [ - "Fonksiyon Adı" => "name:text", - "Açıklama (Çeviri Anahtarı)" => "description:text", - "Yetki Sistemine Dahil Et" => "isActive:checkbox", - "Sunucu Loglarında Görüntüle" => "displayLog:checkbox", - "-:-" => "old:hidden" - ], - "submit_text" => "Fonksiyon Duzenle" - ]) - - @component('modal-component',[ - "id" => "updateFunctionParametersModal", - "title" => "Fonksiyon İzin Parametreleri" - ]) - -
          - @endcomponent - - @include('modal',[ - "id"=>"addFunctionParametersModal", - "title" => "Fonksiyon İzin Parametresi Ekle", - "url" => route('extension_add_function_parameters'), - "next" => "getActiveFunctionParameters", - "inputs" => [ - "Parametre Adı" => "name:text", - "Değişken Adı" => "variable:text", - "Tip:type" => [ - "Yazı" => "text", - "Uzun Metin" => "textarea", - "Sayı" => "number" - ], - "function_name:function_name" => "function_name:hidden", - ], - "submit_text" => "Kaydet" - ]) - - @include('modal',[ - "id"=>"removeFunctionModal", - "title" => "Fonksiyonu Sil", - "url" => route('extension_remove_function'), - "next" => "reload", - "text" => "Fonksiyonu silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "inputs" => [ - "-:-" => "name:hidden" - ], - "submit_text" => "Fonksiyonu Sil" - ]) -
          -
          - @include('table',[ - "value" => array_key_exists("mail_tags",$extension) ? $extension["mail_tags"] : [], - "title" => [ - "Tag Açıklaması" , "Tag" - ], - "display" => [ - "description" , "tag" - ], - "menu" => [ - "Ayarları Düzenle" => [ - "target" => "updateFunctionModalHandler", - "icon" => " context-menu-icon-edit" - ], - "Sil" => [ - "target" => "removeFunctionModal", - "icon" => " context-menu-icon-delete" - ] - ] - ]) -
          -
          -
          -
          - -@endsection diff --git a/resources/views/extension_pages/server.blade.php b/resources/views/extension_pages/server.blade.php deleted file mode 100644 index 60d132e4b..000000000 --- a/resources/views/extension_pages/server.blade.php +++ /dev/null @@ -1,218 +0,0 @@ -@extends('layouts.app') -@php - $dbJson = getExtensionJson(extension()->name); -@endphp -@section('content') - -
          -
          - -
          -
          -
          - - @if(count($tokens) > 0) - - @endif - -
          -
          -
          - -@include('errors') -@if(!isset($dbJson["skeleton"]) || !$dbJson["skeleton"]) -
          -
          -
          -
          -
          -@endif -
          - @if (isset($dbJson["preload"]) && $dbJson["preload"]) - - {!! $extContent !!} - @else -
          -
          - Loading... -
          -
          - @endif -
          - @if(!isset($dbJson["skeleton"]) || !$dbJson["skeleton"]) -
          -
          -
          -
          -
          -@endif - -@if(!isset($dbJson["preload"]) || !$dbJson["preload"]) - -@endif - -@if(count($tokens) > 0) -
          - -
          - -@component('modal-component',[ - "id" => "limanRequestsModal", - "title" => "İstek Kayıtları" -]) -
          -
          -
          -
            - -
          -
          -
          -

          {{__("Aşağıdaki komut ile Liman MYS'ye dışarıdan istek gönderebilirsiniz.Eğer SSL sertifikanız yoksa, komutun sonuna --insecure ekleyebilirsiniz.")}}

          - {{__("Bu sorgu içerisinde ve(ya) sonucunda kurumsal veriler bulunabilir, sorumluluk size aittir.")}} - -
          -
          {{__("Kullanılacak Kişisel Erişim Anahtarı")}}
          -
          - -
          -
          -
          
          -        
          -
          -
          -@endcomponent - - - -@endif -@endsection diff --git a/resources/views/extension_pages/server_restricted.blade.php b/resources/views/extension_pages/server_restricted.blade.php deleted file mode 100644 index 19b77e2ef..000000000 --- a/resources/views/extension_pages/server_restricted.blade.php +++ /dev/null @@ -1,29 +0,0 @@ -@extends('layouts.master') -@include('layouts.navbar') - -@section('body') - -
          -
          -
          -
          -
          -
          -
          - - -@stop \ No newline at end of file diff --git a/resources/views/extension_pages/setup.blade.php b/resources/views/extension_pages/setup.blade.php deleted file mode 100644 index f75b5ab11..000000000 --- a/resources/views/extension_pages/setup.blade.php +++ /dev/null @@ -1,12 +0,0 @@ -@extends('layouts.app') - -@section('content') - - -@include("extension_pages.setup_data") -@endsection diff --git a/resources/views/extension_pages/setup_data.blade.php b/resources/views/extension_pages/setup_data.blade.php deleted file mode 100644 index ba3f67e08..000000000 --- a/resources/views/extension_pages/setup_data.blade.php +++ /dev/null @@ -1,255 +0,0 @@ -@php - $extensionDatabase = $extension["database"]; -@endphp - -@if (collect($extension["database"])->isEmpty()) -
          - -
          -
          {{ __('Bu eklentinin hiçbir ayarı yok.') }} -
          -
          - @include("alert", [ - "title" => "Bilgilendirme", - "message" => "Bazı veriler kasadan tamamlandığı için gösterilmemektedir." - ]) -
          -
          - @if ($extension['database']) - - @endif - -
          -@endif - -
          - @if (isset(collect($extension["database"])->keyBy("required")[1])) -
          - -
          -
          - @csrf -
          - @if (!empty($errors) && count($errors)) - - @elseif(count($similar)) - - @endif - - @if (count($globalVars) && !(bool) user()->status) - - @endif - - @if ($extension['database']) - @foreach ($extension['database'] as $item) - @if (in_array($item['variable'], $globalVars) && !(bool) user()->status) - @continue - @endif - - @if (isset($item['required']) && $item['required'] == false) - @continue - @endif - - @if ($item['variable'] == 'certificate') -
          - -
          -
          - @elseif($item['type'] == 'extension') -
          - - -
          - @elseif($item['type'] == 'server') -
          - - -
          - @else -
          - - -
          - @if ($item['type'] == 'password') -
          - - -
          - @endif - @endif - @endforeach - @else -
          {{ __('Bu eklentinin hiçbir ayarı yok.') }}
          - @endif -
          - - @if ($extensionDatabase) - - @endif -
          -
          - @endif -
          -@if (isset(collect($extension["database"])->keyBy("required")[0])) -
          - -
          -
          - @csrf -
          - @if (!empty($errors) && count($errors)) - - @elseif(count($similar)) - - @endif - - @if (count($globalVars) && !(bool) user()->status) - - @endif - - @if ($extension['database']) - @foreach ($extension['database'] as $item) - @if (in_array($item['variable'], $globalVars) && !(bool) user()->status) - @continue - @endif - - @if ($item['required']) - @continue - @endif - - @if ($item['variable'] == 'certificate') -
          - -
          -
          - @elseif($item['type'] == 'extension') -
          - - -
          - @elseif($item['type'] == 'server') -
          - - -
          - @else -
          - - -
          - @if ($item['type'] == 'password') -
          - - -
          - @endif - @endif - @endforeach - @else -
          {{ __('Bu eklentinin hiçbir ayarı yok.') }}
          - @endif -
          - @if ($extensionDatabase) - - @endif -
          -
          -@endif -
          -
          diff --git a/resources/views/extension_pages/setup_restricted.blade.php b/resources/views/extension_pages/setup_restricted.blade.php deleted file mode 100644 index 6edb8dc0f..000000000 --- a/resources/views/extension_pages/setup_restricted.blade.php +++ /dev/null @@ -1,9 +0,0 @@ -@extends('layouts.master') -@include('layouts.navbar') - -@section('body') - -
          - @include("extension_pages.setup_data") -
          -@stop \ No newline at end of file diff --git a/resources/views/general/error.blade.php b/resources/views/general/error.blade.php deleted file mode 100644 index 920227770..000000000 --- a/resources/views/general/error.blade.php +++ /dev/null @@ -1,28 +0,0 @@ -@extends('layouts.app') - -@section('content_header') -
          -
          -

          -
          -

          {{ __('Uyarı') }}

          -

          - {{ __($message) }} -
          - @if ($status == 403) - {{ __('Kasa') }} - @else - - @endif -

          -
          -
          -
          -@stop - -@section('content') - - - -@endsection diff --git a/resources/views/google2fa/index.blade.php b/resources/views/google2fa/index.blade.php deleted file mode 100644 index 541173a70..000000000 --- a/resources/views/google2fa/index.blade.php +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - {{__("Liman Merkezi Yönetim Sistemi")}} - - - - - - - - - - -
          -
          -
          -
          - - Liman MYS - -

          -
          -

          -
          {{env("BRAND_NAME")}}
          -
          -
          -
          -
          - @if (env("BRANDING") != "") -
          - {{ env('BRAND_NAME') }} -
          - @endif - @if ($errors->count() > 0 ) -
          - {{ __($errors->first()) }} -
          - @endif -
          -

          - {{ __('İki Aşamalı Doğrulama') }} -

          -
          - -

          {{ __('Please enter the OTP generated on your Authenticator App. Ensure you submit the current one because it refreshes every 30 seconds.') }}

          - -
          - @csrf - -
          -
          - - -
          -
          - -
          - -
          -
          - - HAVELSAN Açıklab - -
          -
          -
          -
          -
          -
          - - \ No newline at end of file diff --git a/resources/views/google2fa/register.blade.php b/resources/views/google2fa/register.blade.php deleted file mode 100644 index be5babd4f..000000000 --- a/resources/views/google2fa/register.blade.php +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - {{__("Liman Merkezi Yönetim Sistemi")}} - - - - - - - - - - -
          -
          -
          -
          - - Liman MYS - -

          -
          -

          -
          {{env("BRAND_NAME")}}
          -
          -
          -
          -
          -
          -

          - {{ __('Set up Google Authenticator') }} -

          -
          -
          - @csrf - -

          {{ __('Set up your two factor authentication by scanning the barcode below. Alternatively, you can use the code') }} {{ $secret }}

          -
          - {!! $QR_Image !!} -
          -

          {{ __('You must set up your Google Authenticator app before continuing. You will be unable to login otherwise') }}

          - -
          - -
          -
          - - HAVELSAN Açıklab - -
          -
          -
          -
          -
          -
          - - \ No newline at end of file diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php deleted file mode 100644 index 63ea876f7..000000000 --- a/resources/views/index.blade.php +++ /dev/null @@ -1,229 +0,0 @@ -@extends('layouts.app') - -@section('content') - @include('errors') -
          -
          -
          -
          -
          -
          -
          -
          {{ __('Sunucu Sayısı')}}
          -
          -
          - -
          - -
          -
          -
          -
          -
          -
          {{ __('Eklenti Sayısı')}}
          -
          -
          - -
          -
          -

          {{ $extension_count }}

          - {{ __("Tüm Eklentileri Görüntüle") }} -
          -
          -
          -
          -
          -
          -
          {{ __('Kullanıcı Sayısı')}}
          -
          -
          - -
          - -
          -
          -
          -
          -
          -
          {{ __('Liman Versiyonu')}}
          -
          -
          - -
          -
          -

          {{ $version }}

          -
          -
          -
          -
          -
          -
          -
          -
          - - @if(user()->isAdmin()) -
          -
          -
          -
          - {{ __('Yükleniyor...') }} -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - {{ __('Yükleniyor...') }} -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - {{ __('Yükleniyor...') }} -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - {{ __('Yükleniyor...') }} -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -

          {{ __("Sunucu Durumları") }}

          -
          -
          -
          - {{ __('Yükleniyor...') }} -
          -
          -
          -
            - -
          - -
          -
          - -
          {{ __("Henüz sunucu eklememişsiniz.") }}
          -
          -
          -
          -
          - -
          -
          - @endif -
          - -@stop diff --git a/resources/views/keys/add.blade.php b/resources/views/keys/add.blade.php deleted file mode 100644 index 2476cb381..000000000 --- a/resources/views/keys/add.blade.php +++ /dev/null @@ -1,150 +0,0 @@ -
          - - - -
          - diff --git a/resources/views/keys/index.blade.php b/resources/views/keys/index.blade.php deleted file mode 100644 index affc467c7..000000000 --- a/resources/views/keys/index.blade.php +++ /dev/null @@ -1,221 +0,0 @@ -@extends('layouts.app') - -@section('content') - - @include('errors') -
          -
          -
          -
          -

          {{ __('Kasa') }}

          -

          - {{ __('Bu sayfadan mevcut verilerini görebilirsiniz. Buradaki veriler, eklentiler tarafından kullanılmaktadır.') }} -

          -
          -
          -
          -
          -
          -
          -
          -
          - - - @if (user()->isAdmin()) - - @endif -
          - - @if (user()->isAdmin()) -
          - {{ __("Kullanıcı") }} - -
          - @endif -
          - -
          -
          -
          {{ __('Bilgilendirme!') }}
          - {{ __('Güvenliğiniz için varolan verileriniz gösterilmemektedir.') }} -
          - @include('table', [ - 'value' => $settings, - 'title' => ['Veri Adı', 'Sunucu', '*hidden*', '*hidden*'], - 'display' => ['name', 'server_name', 'id:id', 'type:type'], - 'menu' => [ - 'Güncelle' => [ - 'target' => 'updateSetting', - 'icon' => ' context-menu-icon-edit', - ], - 'Sil' => [ - 'target' => 'delete_settings', - 'icon' => ' context-menu-icon-delete', - ], - ], - ]) -
          -
          -
          -
          -
          - @component('modal-component', [ - 'id' => 'add_settings', - 'title' => 'Anahtar Ekle', - ]) - - @include('keys.add', ['success' => 'addServerKey()']) - @endcomponent - - @if (user()->isAdmin()) - @component('modal-component', [ - 'id' => 'add_setting', - 'title' => 'Ayar Ekle', - ]) - - -
          - - -
          -
          - - -
          - - @endcomponent - @endif - - @include('modal', [ - 'id' => 'update_settings', - 'title' => 'Veriyi Güncelle', - 'url' => route('user_setting_update'), - 'next' => 'reload', - 'inputs' => [ - 'Yeni Değer' => 'new_value:password', - 'id:-' => 'setting_id:hidden', - 'user_id:-' => 'user_id:hidden', - 'type:-' => 'type:hidden', - ], - 'submit_text' => 'Veriyi Güncelle', - ]) - - @include('modal', [ - 'id' => 'delete_settings', - 'title' => 'Veriyi Sil', - 'url' => route('user_setting_remove'), - 'text' => "Veri'yi silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - 'next' => 'reload', - 'inputs' => [ - "Setting Id:'null'" => 'id:hidden', - '-:-' => 'type:hidden', - ], - 'submit_text' => 'Veriyi Sil', - ]) - - -@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php deleted file mode 100644 index b7320ee45..000000000 --- a/resources/views/layouts/app.blade.php +++ /dev/null @@ -1,18 +0,0 @@ -@if(request('partialRequest')) - @include('layouts.content') - @php(die()) -@else - @extends('layouts.master') - - @section('body_class', 'sidebar-mini layout-fixed ' . ((session()->has('collapse')) ? 'sidebar-collapse' : '')) - - @section('body') -
          - @auth - @include('layouts.header') - @endauth - @include('layouts.content') - @include('layouts.footer') -
          - @stop -@endif \ No newline at end of file diff --git a/resources/views/layouts/content.blade.php b/resources/views/layouts/content.blade.php deleted file mode 100644 index 7263b2cc9..000000000 --- a/resources/views/layouts/content.blade.php +++ /dev/null @@ -1,26 +0,0 @@ - -@if(!request('partialRequest')) -
          -@endif - @if(auth()->check() && (bool) user()->status) -
          - {{__("Tam yetkili ana yönetici hesabı ile giriş yaptınız, sisteme zarar verebilirsiniz.")}} {{ __('Yeni bir hesap oluşturup, yetkilendirmeleri ayarlamanızı tavsiye ederiz.') }} -
          - @endif - - @if (trim($__env->yieldContent('content_header'))) -
          - @yield('content_header') -
          - @endif - - -
          -
          - @yield('content') -
          -
          -@if(!request('partialRequest')) -
          -@endif - \ No newline at end of file diff --git a/resources/views/layouts/footer.blade.php b/resources/views/layouts/footer.blade.php deleted file mode 100644 index 8dbab80e6..000000000 --- a/resources/views/layouts/footer.blade.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/resources/views/layouts/header.blade.php b/resources/views/layouts/header.blade.php deleted file mode 100644 index ea240ec99..000000000 --- a/resources/views/layouts/header.blade.php +++ /dev/null @@ -1,191 +0,0 @@ -@include('layouts.navbar') - - diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php deleted file mode 100644 index 2758b076f..000000000 --- a/resources/views/layouts/master.blade.php +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - {{__("Liman Merkezi Yönetim Sistemi")}} - - - - - - - - - - - -@yield('body') - - - - diff --git a/resources/views/layouts/navbar.blade.php b/resources/views/layouts/navbar.blade.php deleted file mode 100644 index 0335ec727..000000000 --- a/resources/views/layouts/navbar.blade.php +++ /dev/null @@ -1,76 +0,0 @@ - diff --git a/resources/views/modules/index.blade.php b/resources/views/modules/index.blade.php deleted file mode 100644 index 3bdf03311..000000000 --- a/resources/views/modules/index.blade.php +++ /dev/null @@ -1,27 +0,0 @@ -@extends('layouts.app') - -@section('content') - -
          -
          -

          {{ __('Modüller') }}

          -
          -
          - @include('errors') - @include('table',[ - "value" => $modules, - "title" => [ - "Adı" , "Durumu", "*hidden*", "*hidden*" - ], - "display" => [ - "name" , "enabled_text", "id:module_id", "enabled:enabled" - ], - ]) -
          -
          -@endsection \ No newline at end of file diff --git a/resources/views/modules/layout.blade.php b/resources/views/modules/layout.blade.php deleted file mode 100644 index ee05bcc1a..000000000 --- a/resources/views/modules/layout.blade.php +++ /dev/null @@ -1,14 +0,0 @@ -@extends('layouts.app') - -@section('content') - - @include('errors') - -{!! $html !!} - -@endsection \ No newline at end of file diff --git a/resources/views/notification/index.blade.php b/resources/views/notification/index.blade.php deleted file mode 100644 index 860622191..000000000 --- a/resources/views/notification/index.blade.php +++ /dev/null @@ -1,119 +0,0 @@ -@extends('layouts.app') - -@section('content') - -
          -
          - @if($system) - - @else - - - @endif - - @include('errors') -
          - @foreach ($notifications as $date => $items) -
          - - {{$date}} - -
          - @foreach ($items as $item) - @php - $notificationTitle = json_decode($item->title); - if (json_last_error() === JSON_ERROR_NONE) { - if (isset($notificationTitle->{app()->getLocale()})) { - $notificationTitle = $notificationTitle->{app()->getLocale()}; - } else { - $notificationTitle = $notificationTitle->en; - } - } else { - $notificationTitle = $item->title; - } - - $notificationContent = json_decode($item->message); - if (json_last_error() === JSON_ERROR_NONE) { - if (isset($notificationContent->{app()->getLocale()})) { - $notificationContent = $notificationContent->{app()->getLocale()}; - } else { - $notificationContent = $notificationContent->en; - } - } else { - $notificationContent = $item->message; - } - @endphp -
          - @if($item->read) - - @else - - @endif -
          - {{\Carbon\Carbon::parse($item->created_at)->format('h:i:s')}} -

          - @if(!$item->read)@endif - {{$notificationTitle}} - @if(!$item->read)@endif -

          - -
          - {!!$notificationContent!!} -
          - -
          -
          - @endforeach - @endforeach - {!! $links !!} -
          -
          -
          - -@endsection diff --git a/resources/views/notification/one.blade.php b/resources/views/notification/one.blade.php deleted file mode 100644 index 10b59eb4f..000000000 --- a/resources/views/notification/one.blade.php +++ /dev/null @@ -1,98 +0,0 @@ - auth()->id(), - "id" => request('notification_id'), -])->first(); -if (!$item) { - return redirect()->back(); -} -?> - -@extends('layouts.app') -@section('content') -
          -
          - @include('errors') -
          -
          - - {{\Carbon\Carbon::parse($item->created_at)->format("d.m.Y")}} - -
          -
          - @php - $notificationTitle = json_decode($item->title); - if (json_last_error() === JSON_ERROR_NONE) { - if (isset($notificationTitle->{app()->getLocale()})) { - $notificationTitle = $notificationTitle->{app()->getLocale()}; - } else { - $notificationTitle = $notificationTitle->en; - } - } else { - $notificationTitle = $item->title; - } - - $notificationContent = json_decode($item->message); - if (json_last_error() === JSON_ERROR_NONE) { - if (isset($notificationContent->{app()->getLocale()})) { - $notificationContent = $notificationContent->{app()->getLocale()}; - } else { - $notificationContent = $notificationContent->en; - } - } else { - $notificationContent = $item->message; - } - @endphp - - @if($item->read) - - @else - - @endif -
          - {{\Carbon\Carbon::parse($item->created_at)->format("h:i:s")}} - -

          - @if(!$item->read)@endif - {{$notificationTitle}} - @if(!$item->read)@endif -

          - -
          - {!! $notificationContent !!} -
          - -
          -
          -
          -
          -
          - -@endsection \ No newline at end of file diff --git a/resources/views/permission/all.blade.php b/resources/views/permission/all.blade.php deleted file mode 100644 index 1d0055821..000000000 --- a/resources/views/permission/all.blade.php +++ /dev/null @@ -1,53 +0,0 @@ -@extends('layouts.app') - -@section('content') - - -
          -
          -

          {{__("Talepleriniz")}}

          -
          -
          - @include('errors') - @include('modal-button',[ - "class" => "btn-success", - "target_id" => "request", - "text" => "Talep Oluştur" - ])

          - @include('table',[ - "value" => $requests, - "title" => [ - "Açıklama" , "Durumu", "Son Guncelleme", "*hidden*" - ], - "display" => [ - "note" , "status", "updated_at", "_id:server_id" - ] - ]) -
          -
          - -@include('modal',[ - "id"=>"request", - "title" => "Talep Oluştur", - "url" => route('request_send'), - "next" => "reload", - "inputs" => [ - "Talep Tipi:type" => [ - "Sunucu" => "server", - "Eklenti" => "extension", - "Diğer" => "other" - ], - "Önem Derecesi:speed" => [ - "Normal" => "normal", - "Acil" => "urgent" - ], - "Açıklama" => "note:text" - ], - "submit_text" => "Oluştur" -]) -@endsection \ No newline at end of file diff --git a/resources/views/permission/list.blade.php b/resources/views/permission/list.blade.php deleted file mode 100644 index abe757070..000000000 --- a/resources/views/permission/list.blade.php +++ /dev/null @@ -1,88 +0,0 @@ -@extends('layouts.app') - -@section('content') - -
          -
          -
          -
          -

          {{__("Yetki Talepleri")}}

          -

          {{ __("Bu sayfadan mevcut yetki taleplerini görebilirsiniz. İşlem yapmak istediğiniz talebe sağ tıklayarak işlem yapabilirsiniz.") }}

          -
          -
          -
          -
          -
          -
          - @include('table',[ - "value" => $requests, - "title" => [ - "Tipi" , "Kullanıcı Adı" , "Not" , "Önem Derecesi", "Durumu", "*hidden*", "*hidden*" - ], - "display" => [ - "type" , "user_name", "note" , "speed", "status", "id:request_id" , "user_id:user_id" - ], - "menu" => [ - "İşleniyor" => [ - "target" => "working", - "icon" => "fa-cog" - ], - "Tamamlandı" => [ - "target" => "completed", - "icon" => "fa-thumbs-up" - ], - "Reddet" => [ - "target" => "deny", - "icon" => "fa-thumbs-down" - ], - "Sil" => [ - "target" => "deleteRequest", - "icon" => " context-menu-icon-delete" - ] - ], - "onclick" => "userSettings" - ]) -
          -
          -
          -
          - - - -@endsection \ No newline at end of file diff --git a/resources/views/server/index.blade.php b/resources/views/server/index.blade.php deleted file mode 100644 index cdf7594fb..000000000 --- a/resources/views/server/index.blade.php +++ /dev/null @@ -1,313 +0,0 @@ -@extends('layouts.app') - -@section('content') - - -
          -
          -
          -
          -

          {{ __('Sunucular') }}

          -

          - {{ __('Bu sayfadan mevcut sunucularını görebilirsiniz. Ayrıca yeni sunucu eklemek için Sunucu Ekle butonunu kullanabilirsiniz.') }} -

          -
          -
          -
          -
          -
          -
          - @if (\App\Models\Permission::can(user()->id, 'liman', 'id', 'add_server')) -

          - @endif - - @include('errors') - extension_count = DB::table('server_extensions') - ->where('server_id', $server->id) - ->count(); - } - ?> - @include('table', [ - 'value' => $servers, - 'title' => ['Sunucu Adı', 'İp Adresi', '*hidden*', 'Kontrol Portu', 'Eklenti Sayısı', '*hidden*', '*hidden*'], - 'display' => ['name', 'ip_address', 'type:type', 'control_port', 'extension_count', 'city:city', 'id:server_id'], - 'menu' => [ - 'Düzenle' => [ - 'target' => 'edit', - 'icon' => ' context-menu-icon-edit', - ], - 'Sil' => [ - 'target' => 'delete', - 'icon' => ' context-menu-icon-delete', - ], - ], - 'onclick' => 'details', - ]) -
          -
          -
          -
          - - - - - - - @include('modal', [ - 'id' => 'delete', - 'title' => 'Sunucuyu Sil', - 'url' => route('server_remove'), - 'text' => 'Sunucuyu silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.', - 'next' => 'reload', - 'inputs' => [ - "Sunucu Id:'null'" => 'server_id:hidden', - ], - 'submit_text' => 'Sunucuyu Sil', - ]) - - @include('modal', [ - 'id' => 'edit', - 'title' => 'Sunucuyu Düzenle', - 'url' => route('server_update'), - 'next' => 'updateTable', - 'inputs' => [ - 'Sunucu Adı' => 'name:text', - 'Kontrol Portu' => 'control_port:number', - "Sunucu Id:''" => 'server_id:hidden', - 'IP Adresi' => 'ip_address:text', - ], - 'submit_text' => 'Düzenle', - ]) -@endsection diff --git a/resources/views/server/one/general/details.blade.php b/resources/views/server/one/general/details.blade.php deleted file mode 100644 index 74417ed72..000000000 --- a/resources/views/server/one/general/details.blade.php +++ /dev/null @@ -1,54 +0,0 @@ -
          -
          -
          -

          -
          - {{strlen($server->name) > 14 ? substr($server->name, 0, 14) . '...' : $server->name}} -
          -
          - @if($favorite) - - - - @else - - - - @endif -
          -

          -
          -
          - @if(server()->canRunCommand()) - {{ __('Hostname') }} -

          {{$outputs["hostname"]}}

          -
          - {{ __('İşletim Sistemi') }} -

          {{$outputs["version"]}}

          -
          - @endif - {{ __('IP Adresi') }} -

          - {{ $server->ip_address }} -

          -
          - @isset($outputs["user"]) - {{ __('Giriş Yapmış Kullanıcı') }} -

          - {{ $outputs["user"] }} -

          -
          - @endisset - @if(server()->canRunCommand()) - {{ __('Açık Kalma') }} -

          {{ $outputs["uptime"] }}

          -
          - {{ __('Servis Sayısı') }} -

          {{$outputs["nofservices"]}}

          -
          - {{ __('İşlem Sayısı') }} -

          {{$outputs["nofprocesses"]}}

          - @endif -
          -
          -
          \ No newline at end of file diff --git a/resources/views/server/one/general/modals.blade.php b/resources/views/server/one/general/modals.blade.php deleted file mode 100644 index dc836291b..000000000 --- a/resources/views/server/one/general/modals.blade.php +++ /dev/null @@ -1,249 +0,0 @@ -@component('modal-component',[ - "id"=>"installPackage", - "title" => "Paket Kur", - "footer" => [ - "class" => "btn-success", - "onclick" => "installPackageButton()", - "text" => "Kur" - ], - ]) - -
          -
          - @include('inputs', [ - 'inputs' => [ - "Paketin Adı" => "package:text:Paketin depodaki adını giriniz. Örneğin: chromium", - ] - ]) -
          -
          - @include('file-input', [ - 'title' => 'Paket (.rpm / .deb)', - 'name' => 'debUpload', - 'callback' => 'onDebUploadSuccess' - ]) -
          -
          - @endcomponent - - @include('modal',[ - "id"=>"delete", - "title" => "Sunucuyu Sil", - "url" => route('server_remove'), - "text" => "$server->name isimli sunucuyu silmek istediğinize emin misiniz? Bu işlem geri alınamayacaktır.", - "type" => "danger", - "next" => "redirect", - "submit_text" => "Sunucuyu Sil" - ]) - - @include('modal',[ - "id"=>"delete_extensions", - "title" => "Eklentileri Sil", - "text" => "Seçili eklentileri silmek istediğinize emin misiniz?", - "type" => "danger", - "onsubmit" => "removeExtensionFunc", - "submit_text" => "Eklentileri Sil" - ]) - - @include('modal',[ - "id"=>"addLocalUser", - "title" => "Kullanıcı Ekle", - "url" => route('server_add_local_user'), - "next" => "reload", - "inputs" => [ - "Kullanıcı Adı" => "user_name:text", - "Şifre" => "user_password:password", - "Şifre Onayı" => "user_password_confirmation:password" - ], - "submit_text" => "Kullanıcı Ekle" - ]) - - @include('modal',[ - "id"=>"addSudoers", - "title" => "Tam Yetkili Kullanıcı Ekle", - "url" => route('server_add_sudoers'), - "next" => "getSudoers", - "inputs" => [ - "İsim" => "name:text:Grup veya kullanıcı ekleyebilirsiniz. Örneğin, kullanıcı adı veya %grupadı" - ], - "submit_text" => "Ekle" - ]) - - @include('modal',[ - "id"=>"addLocalGroup", - "title" => "Grup Ekle", - "url" => route('server_add_local_group'), - "next" => "reload", - "inputs" => [ - "İsim" => "group_name:text" - ], - "submit_text" => "Grup Ekle" - ]) - - @component('modal-component',[ - "id"=>"addLocalGroupUserModal", - "title" => "Gruba Kullanıcı Ekle", - "submit_text" => "Ekle", - "footer" => [ - "class" => "btn-success", - "onclick" => "addLocalGroupUser()", - "text" => "Ekle" - ], - ]) - @include('inputs', [ - "inputs" => [ - "İsim" => "user:text" - ], - ]) - @endcomponent - - - @include('modal',[ - "id"=>"startService", - "title" => "Servisi Başlat", - "text" => "Seçili servisi başlatmak istediğinize emin misiniz?", - "type" => "danger", - "next" => "reload", - "inputs" => [ - "name:-" => "name:hidden", - ], - "url" => route('server_start_service'), - "submit_text" => "Servisi Başlat" - ]) - - @include('modal',[ - "id"=>"stopService", - "title" => "Servisi Durdur", - "text" => "Seçili servisi durdurmak istediğinize emin misiniz?", - "type" => "danger", - "next" => "reload", - "inputs" => [ - "name:-" => "name:hidden", - ], - "url" => route('server_stop_service'), - "submit_text" => "Servisi Durdur" - ]) - - @include('modal',[ - "id"=>"restartService", - "title" => "Servisi Yeniden Başlat", - "text" => "Seçili servisi yeniden başlatmak istediğinize emin misiniz?", - "type" => "danger", - "next" => "reload", - "inputs" => [ - "name:-" => "name:hidden", - ], - "url" => route('server_restart_service'), - "submit_text" => "Servisi Yeniden Başlat" - ]) - - @include('modal',[ - "id"=>"file_upload", - "title" => "Dosya Yükle", - "url" => route('server_upload'), - "next" => "nothing", - "inputs" => [ - "Yüklenecek Dosya" => "file:file", - "Yol" => "path:text", - ], - "submit_text" => "Yükle" - ]) - - @include('modal',[ - "id"=>"file_download", - "onsubmit" => "downloadFile", - "title" => "Dosya İndir", - "next" => "", - "inputs" => [ - "Yol" => "path:text", - ], - "submit_text" => "İndir" - ]) - @include('modal-table',[ - "id" => "log_table", - "title" => "Sunucu Logları", - "table" => [ - "value" => [], - "title" => [ - "Komut" , "User ID", "Tarih", "*hidden*" - ], - "display" => [ - "command" , "username", "created_at", "_id:_id" - ], - "onclick" => "logDetails" - ] - ]) - - @if(count($input_extensions)) - @component('modal-component',[ - "id"=>"install_extension", - "title" => "Eklenti Ekle", - "footer" => [ - "class" => "btn-success", - "onclick" => "server_extension()", - "text" => "Ekle" - ], - ]) - @include('table', [ - "value" => $input_extensions, - "noInitialize" => true, - "title" => [ - "Eklenti", "*hidden*" - ], - "display" => [ - "name", "id:id" - ] - ]) - @endcomponent - @else - - @endif - - @component('modal-component',[ - "id" => "updateLogs", - "title" => "Paket Yükleme Günlüğü" - ]) -
          -            
          -        
          -

          -

          -
          - -
          -
          - @endcomponent - - @component('modal-component',[ - "id" => "serviceStatusModal", - "title" => "Servis Durumu" - ]) -
          
          -    @endcomponent
          -
          -    @component('modal-component',[
          -        "id"=>"logDetailModal",
          -        "title" => "Log Detayı"
          -    ])
          -    
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - @endcomponent \ No newline at end of file diff --git a/resources/views/server/one/general/scripts.blade.php b/resources/views/server/one/general/scripts.blade.php deleted file mode 100644 index 64b60ebb5..000000000 --- a/resources/views/server/one/general/scripts.blade.php +++ /dev/null @@ -1,644 +0,0 @@ - \ No newline at end of file diff --git a/resources/views/server/one/main.blade.php b/resources/views/server/one/main.blade.php deleted file mode 100644 index ef1d93858..000000000 --- a/resources/views/server/one/main.blade.php +++ /dev/null @@ -1,36 +0,0 @@ -@extends('layouts.app') - -@section('content') - - - @include('errors') - - @if (count(server()->extensions()) < 1) -
          -
          {{ __("Tavsiye") }}
          - @if (session('locale') == "tr") - Bu sunucuya hiç eklenti eklememişsiniz. Limanı daha verimli kullanabilmek için eklentiler sekmesinden eklenti ekleyebilirsiniz. - @else - You haven't added any extensions on this server. For using Liman more effectively add extensions. - @endif -
          - @endif - -
          - @include('server.one.general.details',["shell" => false]) - - @include('server.one.one') - -
          - - @include('server.one.general.modals') - - @include('server.one.general.scripts') - -@endsection \ No newline at end of file diff --git a/resources/views/server/one/one.blade.php b/resources/views/server/one/one.blade.php deleted file mode 100755 index a1cb2cc45..000000000 --- a/resources/views/server/one/one.blade.php +++ /dev/null @@ -1,335 +0,0 @@ -
          -
          -
          - -
          -
          -
          - @if (server()->canRunCommand() && server()->isLinux()) -
          -
          -
          -

          {{ __('Kaynak Kullanımı') }}

          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - {{ __('Yükleniyor...') }} -
          -
          -
          -
          -
          - @include('table-card', [ - 'title' => __('CPU Kullanımı'), - 'api' => 'top_cpu_processes', - ]) -
          -
          - @include('table-card', [ - 'title' => __('RAM Kullanımı'), - 'api' => 'top_memory_processes', - ]) -
          -
          - @include('table-card', [ - 'title' => __('Disk Kullanımı'), - 'api' => 'top_disk_usage', - ]) -
          -
          -
          - @endif -
          - @if (auth()->user()->id == server()->user_id || - auth()->user()->isAdmin()) - -

          - @endif - @include('table', [ - 'id' => 'installed_extensions', - 'value' => $installed_extensions, - 'title' => ['Eklenti Adı', 'Versiyon', 'Düzenlenme Tarihi', '*hidden*'], - 'display' => ['name', 'version', 'updated_at', 'id:extension_id'], - 'noInitialize' => 'true', - ]) - -
          - {!! serverModuleViews() !!} - - @if ($server->canRunCommand()) -
          -
          - - -
          -
          - - @if ($server->isLinux()) -
          - -
          - -
          -
          - -
          - @include('modal-button', [ - 'class' => 'btn btn-success mb-2', - 'target_id' => 'addLocalUser', - 'text' => 'Kullanıcı Ekle', - 'icon' => 'fas fa-plus', - ]) -
          -
          - -
          -
          -
          - @include('modal-button', [ - 'class' => 'btn btn-success mb-2', - 'target_id' => 'addLocalGroup', - 'text' => 'Grup Ekle', - 'icon' => 'fas fa-plus', - ]) -
          -
          -
          - @include('modal-button', [ - 'class' => 'btn btn-success mb-2', - 'target_id' => 'addLocalGroupUserModal', - 'text' => 'Kullanıcı Ekle', - 'icon' => 'fas fa-plus', - ]) -
          -
          -
          -
          -
          - @include('modal-button', [ - 'class' => 'btn btn-success mb-2', - 'target_id' => 'addSudoers', - 'text' => 'Tam Yetkili Kullanıcı Ekle', - 'icon' => 'fas fa-plus', - ]) -
          -
          - @endif - - @if (server()->isWindows()) -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          -
          - @endif - @endif -
          -
          -
          -
          - - - -
          -
          - - - -
          -
          - - -
          - - - - -
          -
          -
          -
          -
          -
          -
          -
          -
          - -
          -
          - - - - - - - @if (user()->isAdmin()) - - @endif - - @if (\App\Models\Permission::can(user()->id, 'liman', 'id', 'update_server')) -
          -
          - -
          -
          - @include('modal-button', [ - 'class' => 'btn-danger btn-block', - 'target_id' => 'delete', - 'text' => 'Sunucuyu Sil', - ]) -
          -
          - @endif -
          -
          -
          -
          -
          -
          diff --git a/resources/views/settings/certificate.blade.php b/resources/views/settings/certificate.blade.php deleted file mode 100644 index 043278c76..000000000 --- a/resources/views/settings/certificate.blade.php +++ /dev/null @@ -1,154 +0,0 @@ -@extends('layouts.app') - -@section('content') - -
          -
          -

          {{__("Sisteme SSL Sertifikası Ekleme")}}

          -
          -
          - @if(request('server_id')) -
          {{server()->name . " " . __("sunucusu talebi.")}}
          -
          - @endif -
          -
          - -