diff --git a/LibreNMS/Alert/AlertUtil.php b/LibreNMS/Alert/AlertUtil.php index dadf54ef51..393c1afd19 100644 --- a/LibreNMS/Alert/AlertUtil.php +++ b/LibreNMS/Alert/AlertUtil.php @@ -123,18 +123,18 @@ class AlertUtil } } foreach ($users as $user) { - if (empty($user['email'])) { + if (empty($user->email)) { continue; // no email, skip this user } - if (empty($user['realname'])) { - $user['realname'] = $user['username']; - } - if (Config::get('alert.globals') && ($user['level'] >= 5 && $user['level'] < 10)) { - $contacts[$user['email']] = $user['realname']; - } elseif (Config::get('alert.admins') && $user['level'] == 10) { - $contacts[$user['email']] = $user['realname']; - } elseif (Config::get('alert.users') == true && in_array($user['user_id'], $uids)) { - $contacts[$user['email']] = $user['realname']; + + $name = $user->realname ?: $user->username; + + if (Config::get('alert.globals') && $user->hasGlobalRead()) { + $contacts[$user->email] = $name; + } elseif (Config::get('alert.admins') && $user->isAdmin()) { + $contacts[$user->email] = $name; + } elseif (Config::get('alert.users') && in_array($user['user_id'], $uids)) { + $contacts[$user->email] = $name; } } diff --git a/LibreNMS/Authentication/ADAuthorizationAuthorizer.php b/LibreNMS/Authentication/ADAuthorizationAuthorizer.php index 29e2b41d08..a4bad740c4 100644 --- a/LibreNMS/Authentication/ADAuthorizationAuthorizer.php +++ b/LibreNMS/Authentication/ADAuthorizationAuthorizer.php @@ -3,6 +3,7 @@ namespace LibreNMS\Authentication; use LibreNMS\Config; +use LibreNMS\Enum\LegacyAuthLevel; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Exceptions\LdapMissingException; @@ -92,14 +93,13 @@ class ADAuthorizationAuthorizer extends MysqlAuthorizer return false; } - public function getUserlevel($username) + public function getRoles(string $username): array { - $userlevel = $this->authLdapSessionCacheGet('userlevel'); - if ($userlevel) { - return $userlevel; - } else { - $userlevel = 0; + $roles = $this->authLdapSessionCacheGet('roles'); + if ($roles !== null) { + return $roles; } + $roles = []; // Find all defined groups $username is in $search = ldap_search( @@ -110,18 +110,25 @@ class ADAuthorizationAuthorizer extends MysqlAuthorizer ); $entries = ldap_get_entries($this->ldap_connection, $search); - // Loop the list and find the highest level + // collect all roles + $auth_ad_groups = Config::get('auth_ad_groups'); foreach ($entries[0]['memberof'] as $entry) { $group_cn = $this->getCn($entry); - $auth_ad_groups = Config::get('auth_ad_groups'); - if ($auth_ad_groups[$group_cn]['level'] > $userlevel) { - $userlevel = $auth_ad_groups[$group_cn]['level']; + + if (isset($auth_ad_groups[$group_cn]['roles']) && is_array($auth_ad_groups[$group_cn]['roles'])) { + $roles = array_merge($roles, $auth_ad_groups[$group_cn]['roles']); + } elseif (isset($auth_ad_groups[$group_cn]['level'])) { + $role = LegacyAuthLevel::tryFrom($auth_ad_groups[$group_cn]['level'])?->getName(); + if ($role) { + $roles[] = $role; + } } } - $this->authLdapSessionCacheSet('userlevel', $userlevel); + $roles = array_unique($roles); + $this->authLdapSessionCacheSet('roles', $roles); - return $userlevel; + return $roles; } public function getUserid($username) diff --git a/LibreNMS/Authentication/ActiveDirectoryAuthorizer.php b/LibreNMS/Authentication/ActiveDirectoryAuthorizer.php index e209a98a6f..77036cf0e7 100644 --- a/LibreNMS/Authentication/ActiveDirectoryAuthorizer.php +++ b/LibreNMS/Authentication/ActiveDirectoryAuthorizer.php @@ -7,6 +7,7 @@ namespace LibreNMS\Authentication; use LibreNMS\Config; +use LibreNMS\Enum\LegacyAuthLevel; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Exceptions\LdapMissingException; @@ -124,26 +125,33 @@ class ActiveDirectoryAuthorizer extends AuthorizerBase return false; } - public function getUserlevel($username) + public function getRoles(string $username): array { - $userlevel = 0; + $roles = []; if (! Config::get('auth_ad_require_groupmembership', true)) { if (Config::get('auth_ad_global_read', false)) { - $userlevel = 5; + $roles[] = 'global-read'; } } // cycle through defined groups, test for memberOf-ship - foreach (Config::get('auth_ad_groups', []) as $group => $level) { + foreach (Config::get('auth_ad_groups', []) as $group => $data) { try { if ($this->userInGroup($username, $group)) { - $userlevel = max($userlevel, $level['level']); + if (isset($data['roles']) && is_array($data['roles'])) { + $roles = array_merge($roles, $data['roles']); + } elseif (isset($data['level'])) { + $role = LegacyAuthLevel::tryFrom($data['level'])?->getName(); + if ($role) { + $roles[] = $role; + } + } } } catch (AuthenticationException $e) { } } - return $userlevel; + return array_unique($roles); } public function getUserid($username) diff --git a/LibreNMS/Authentication/ActiveDirectoryCommon.php b/LibreNMS/Authentication/ActiveDirectoryCommon.php index 8cf262a122..8c7b04abe4 100644 --- a/LibreNMS/Authentication/ActiveDirectoryCommon.php +++ b/LibreNMS/Authentication/ActiveDirectoryCommon.php @@ -148,32 +148,6 @@ trait ActiveDirectoryCommon return $ldap_groups; } - public function getUserlist() - { - $connection = $this->getConnection(); - - $userlist = []; - $ldap_groups = $this->getGroupList(); - - foreach ($ldap_groups as $ldap_group) { - $search_filter = "(&(memberOf:1.2.840.113556.1.4.1941:=$ldap_group)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))"; - if (Config::get('auth_ad_user_filter')) { - $search_filter = '(&' . Config::get('auth_ad_user_filter') . $search_filter . ')'; - } - $attributes = ['samaccountname', 'displayname', 'objectsid', 'mail']; - $search = ldap_search($connection, Config::get('auth_ad_base_dn'), $search_filter, $attributes); - $results = ldap_get_entries($connection, $search); - - foreach ($results as $result) { - if (isset($result['samaccountname'][0])) { - $userlist[$result['samaccountname'][0]] = $this->userFromAd($result); - } - } - } - - return array_values($userlist); - } - /** * Generate a user array from an AD LDAP entry * Must have the attributes: objectsid, samaccountname, displayname, mail @@ -191,7 +165,6 @@ trait ActiveDirectoryCommon 'realname' => $entry['displayname'][0], 'email' => isset($entry['mail'][0]) ? $entry['mail'][0] : null, 'descr' => '', - 'level' => $this->getUserlevel($entry['samaccountname'][0]), 'can_modify_passwd' => 0, ]; } diff --git a/LibreNMS/Authentication/AuthorizerBase.php b/LibreNMS/Authentication/AuthorizerBase.php index 7a3a1cc4de..f29661a2d9 100644 --- a/LibreNMS/Authentication/AuthorizerBase.php +++ b/LibreNMS/Authentication/AuthorizerBase.php @@ -45,29 +45,11 @@ abstract class AuthorizerBase implements Authorizer return static::$HAS_AUTH_USERMANAGEMENT; } - public function addUser($username, $password, $level = 0, $email = '', $realname = '', $can_modify_passwd = 0, $description = '') - { - //not supported by default - return false; - } - - public function deleteUser($user_id) - { - //not supported by default - return false; - } - public function canUpdateUsers() { return static::$CAN_UPDATE_USER; } - public function updateUser($user_id, $realname, $level, $can_modify_passwd, $email) - { - //not supported by default - return false; - } - public function authIsExternal() { return static::$AUTH_IS_EXTERNAL; @@ -77,4 +59,9 @@ abstract class AuthorizerBase implements Authorizer { return $_SERVER[Config::get('http_auth_header')] ?? $_SERVER['PHP_AUTH_USER'] ?? null; } + + public function getRoles(string $username): array + { + return []; // no roles by default + } } diff --git a/LibreNMS/Authentication/HttpAuthAuthorizer.php b/LibreNMS/Authentication/HttpAuthAuthorizer.php index 215e61317d..fbfc6cbb29 100644 --- a/LibreNMS/Authentication/HttpAuthAuthorizer.php +++ b/LibreNMS/Authentication/HttpAuthAuthorizer.php @@ -34,21 +34,6 @@ class HttpAuthAuthorizer extends MysqlAuthorizer return false; } - public function getUserlevel($username) - { - $user_level = parent::getUserlevel($username); - - if ($user_level) { - return $user_level; - } - - if (Config::has('http_auth_guest')) { - return parent::getUserlevel(Config::get('http_auth_guest')); - } - - return 0; - } - public function getUserid($username) { $user_id = parent::getUserid($username); diff --git a/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php b/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php index fe00b811b2..cd3f3ad7a3 100644 --- a/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php +++ b/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php @@ -26,6 +26,7 @@ namespace LibreNMS\Authentication; use App\Models\User; use LibreNMS\Config; +use LibreNMS\Enum\LegacyAuthLevel; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Exceptions\LdapMissingException; @@ -113,32 +114,38 @@ class LdapAuthorizationAuthorizer extends AuthorizerBase return false; } - public function getUserlevel($username) + public function getRoles(string $username): array { - $userlevel = $this->authLdapSessionCacheGet('userlevel'); - if ($userlevel) { - return $userlevel; - } else { - $userlevel = 0; + $roles = $this->authLdapSessionCacheGet('roles'); + if ($roles !== null) { + return $roles; } + $roles = []; // Find all defined groups $username is in $filter = '(&(|(cn=' . implode(')(cn=', array_keys(Config::get('auth_ldap_groups'))) . '))(' . Config::get('auth_ldap_groupmemberattr') . '=' . $this->getMembername($username) . '))'; $search = ldap_search($this->ldap_connection, Config::get('auth_ldap_groupbase'), $filter); $entries = ldap_get_entries($this->ldap_connection, $search); - // Loop the list and find the highest level + $authLdapGroups = Config::get('auth_ldap_groups'); + // Collect all roles foreach ($entries as $entry) { $groupname = $entry['cn'][0]; - $authLdapGroups = Config::get('auth_ldap_groups'); - if ($authLdapGroups[$groupname]['level'] > $userlevel) { - $userlevel = $authLdapGroups[$groupname]['level']; + + if (isset($authLdapGroups[$groupname]['roles']) && is_array($authLdapGroups[$groupname]['roles'])) { + $roles = array_merge($roles, $authLdapGroups[$groupname]['roles']); + } elseif (isset($authLdapGroups[$groupname]['level'])) { + $role = LegacyAuthLevel::tryFrom($authLdapGroups[$groupname]['level'])?->getName(); + if ($role) { + $roles[] = $role; + } } } - $this->authLdapSessionCacheSet('userlevel', $userlevel); + $roles = array_unique($roles); + $this->authLdapSessionCacheSet('roles', $roles); - return $userlevel; + return $roles; } public function getUserid($username) @@ -173,56 +180,38 @@ class LdapAuthorizationAuthorizer extends AuthorizerBase return $user_id; } - public function getUserlist() + public function getUser($user_id) { - $userlist = []; - - $filter = '(' . Config::get('auth_ldap_prefix') . '*)'; - if (Config::get('auth_ldap_userlist_filter') != null) { - $filter = '(' . Config::get('auth_ldap_userlist_filter') . ')'; - } + $uid_attr = strtolower(Config::get('auth_ldap_uid_attribute', 'uidnumber')); + $filter = "($uid_attr=$user_id)"; $search = ldap_search($this->ldap_connection, trim(Config::get('auth_ldap_suffix'), ','), $filter); $entries = ldap_get_entries($this->ldap_connection, $search); if ($entries['count']) { - foreach ($entries as $entry) { - $username = $entry['uid'][0]; - $realname = $entry['cn'][0]; - $user_id = $entry['uidnumber'][0]; - $email = $entry[Config::get('auth_ldap_emailattr')][0]; - $ldap_groups = $this->getGroupList(); - foreach ($ldap_groups as $ldap_group) { - $ldap_comparison = ldap_compare( - $this->ldap_connection, - $ldap_group, - Config::get('auth_ldap_groupmemberattr'), - $this->getMembername($username) - ); - if (! Config::has('auth_ldap_group') || $ldap_comparison === true) { - $userlist[] = [ - 'username' => $username, - 'realname' => $realname, - 'user_id' => $user_id, - 'email' => $email, - ]; - } + $entry = $entries[0]; + $username = $entry['uid'][0]; + $realname = $entry['cn'][0]; + $user_id = $entry['uidnumber'][0]; + $email = $entry[Config::get('auth_ldap_emailattr')][0]; + $ldap_groups = $this->getGroupList(); + foreach ($ldap_groups as $ldap_group) { + $ldap_comparison = ldap_compare( + $this->ldap_connection, + $ldap_group, + Config::get('auth_ldap_groupmemberattr'), + $this->getMembername($username) + ); + if (! Config::has('auth_ldap_group') || $ldap_comparison === true) { + return [ + 'username' => $username, + 'realname' => $realname, + 'user_id' => $user_id, + 'email' => $email, + ]; } } } - return $userlist; - } - - public function getUser($user_id) - { - foreach ($this->getUserlist() as $user) { - if ($user['user_id'] == $user_id) { - $user['level'] = $this->getUserlevel($user['username']); - - return $user; - } - } - return false; } diff --git a/LibreNMS/Authentication/LdapAuthorizer.php b/LibreNMS/Authentication/LdapAuthorizer.php index 037a7382b6..3d4522484b 100644 --- a/LibreNMS/Authentication/LdapAuthorizer.php +++ b/LibreNMS/Authentication/LdapAuthorizer.php @@ -4,6 +4,7 @@ namespace LibreNMS\Authentication; use ErrorException; use LibreNMS\Config; +use LibreNMS\Enum\LegacyAuthLevel; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Exceptions\LdapMissingException; @@ -101,10 +102,8 @@ class LdapAuthorizer extends AuthorizerBase return false; } - public function getUserlevel($username) + public function getRoles(string $username): array { - $userlevel = 0; - try { $connection = $this->getLdapConnection(); $groups = Config::get('auth_ldap_groups'); @@ -126,18 +125,27 @@ class LdapAuthorizer extends AuthorizerBase $search = ldap_search($connection, Config::get('auth_ldap_groupbase'), $filter); $entries = ldap_get_entries($connection, $search); - // Loop the list and find the highest level + $roles = []; + // Collect all assigned roles foreach ($entries as $entry) { $groupname = $entry['cn'][0]; - if ($groups[$groupname]['level'] > $userlevel) { - $userlevel = $groups[$groupname]['level']; + + if (isset($groups[$groupname]['roles']) && is_array($groups[$groupname]['roles'])) { + $roles = array_merge($roles, $groups[$groupname]['roles']); + } elseif (isset($groups[$groupname]['level'])) { + $role = LegacyAuthLevel::tryFrom($groups[$groupname]['level'])?->getName(); + if ($role) { + $roles[] = $role; + } } } + + return array_unique($roles); } catch (AuthenticationException $e) { echo $e->getMessage() . PHP_EOL; } - return $userlevel; + return []; } public function getUserid($username) @@ -161,65 +169,6 @@ class LdapAuthorizer extends AuthorizerBase return -1; } - public function getUserlist() - { - $userlist = []; - - try { - $connection = $this->getLdapConnection(); - - $ldap_groups = $this->getGroupList(); - if (empty($ldap_groups)) { - d_echo('No groups defined. Cannot search for users.'); - - return []; - } - - $filter = '(' . Config::get('auth_ldap_prefix') . '*)'; - if (Config::get('auth_ldap_userlist_filter') != null) { - $filter = '(' . Config::get('auth_ldap_userlist_filter') . ')'; - } - - // build group filter - $group_filter = ''; - foreach ($ldap_groups as $group) { - $group_filter .= '(memberOf=' . trim($group) . ')'; - } - if (count($ldap_groups) > 1) { - $group_filter = "(|$group_filter)"; - } - - // search using memberOf - $search = ldap_search($connection, trim(Config::get('auth_ldap_suffix'), ','), "(&$filter$group_filter)"); - if (ldap_count_entries($connection, $search)) { - foreach (ldap_get_entries($connection, $search) as $entry) { - $user = $this->ldapToUser($entry); - $userlist[$user['username']] = $user; - } - } else { - // probably doesn't support memberOf, go through all users, this could be slow - $search = ldap_search($connection, trim(Config::get('auth_ldap_suffix'), ','), $filter); - foreach (ldap_get_entries($connection, $search) as $entry) { - foreach ($ldap_groups as $ldap_group) { - if (ldap_compare( - $connection, - $ldap_group, - Config::get('auth_ldap_groupmemberattr', 'memberUid'), - $this->getMembername($entry['uid'][0]) - )) { - $user = $this->ldapToUser($entry); - $userlist[$user['username']] = $user; - } - } - } - } - } catch (AuthenticationException $e) { - echo $e->getMessage() . PHP_EOL; - } - - return $userlist; - } - public function getUser($user_id) { $connection = $this->getLdapConnection(); @@ -362,7 +311,6 @@ class LdapAuthorizer extends AuthorizerBase 'realname' => $entry['cn'][0], 'user_id' => $entry[$uid_attr][0], 'email' => $entry[Config::get('auth_ldap_emailattr', 'mail')][0], - 'level' => $this->getUserlevel($entry['uid'][0]), ]; } diff --git a/LibreNMS/Authentication/MysqlAuthorizer.php b/LibreNMS/Authentication/MysqlAuthorizer.php index 2358146fdb..b774144010 100644 --- a/LibreNMS/Authentication/MysqlAuthorizer.php +++ b/LibreNMS/Authentication/MysqlAuthorizer.php @@ -4,7 +4,6 @@ namespace LibreNMS\Authentication; use App\Models\User; use Illuminate\Support\Facades\Hash; -use LibreNMS\DB\Eloquent; use LibreNMS\Exceptions\AuthenticationException; class MysqlAuthorizer extends AuthorizerBase @@ -55,71 +54,17 @@ class MysqlAuthorizer extends AuthorizerBase } } - public function addUser($username, $password, $level = 0, $email = '', $realname = '', $can_modify_passwd = 1, $descr = '') - { - $user_array = get_defined_vars(); - - // no nulls - $user_array = array_filter($user_array, function ($field) { - return ! is_null($field); - }); - - $new_user = User::thisAuth()->firstOrNew(['username' => $username], $user_array); - - // only update new users - if (! $new_user->user_id) { - $new_user->auth_type = LegacyAuth::getType(); - $new_user->setPassword($password); - $new_user->email = (string) $new_user->email; - - $new_user->save(); - $user_id = $new_user->user_id; - - // set auth_id - $new_user->auth_id = (string) $this->getUserid($username); - $new_user->save(); - - if ($user_id) { - return $user_id; - } - } - - return false; - } - public function userExists($username, $throw_exception = false) { return User::thisAuth()->where('username', $username)->exists(); } - public function getUserlevel($username) - { - return User::thisAuth()->where('username', $username)->value('level'); - } - public function getUserid($username) { // for mysql user_id == auth_id return User::thisAuth()->where('username', $username)->value('user_id'); } - public function deleteUser($user_id) - { - // could be used on cli, use Eloquent helper - Eloquent::DB()->table('bill_perms')->where('user_id', $user_id)->delete(); - Eloquent::DB()->table('devices_perms')->where('user_id', $user_id)->delete(); - Eloquent::DB()->table('devices_group_perms')->where('user_id', $user_id)->delete(); - Eloquent::DB()->table('ports_perms')->where('user_id', $user_id)->delete(); - Eloquent::DB()->table('users_prefs')->where('user_id', $user_id)->delete(); - - return (bool) User::destroy($user_id); - } - - public function getUserlist() - { - return User::thisAuth()->orderBy('username')->get()->toArray(); - } - public function getUser($user_id) { $user = User::find($user_id); @@ -129,16 +74,4 @@ class MysqlAuthorizer extends AuthorizerBase return false; } - - public function updateUser($user_id, $realname, $level, $can_modify_passwd, $email) - { - $user = User::find($user_id); - - $user->realname = $realname; - $user->level = (int) $level; - $user->can_modify_passwd = (int) $can_modify_passwd; - $user->email = $email; - - return $user->save(); - } } diff --git a/LibreNMS/Authentication/RadiusAuthorizer.php b/LibreNMS/Authentication/RadiusAuthorizer.php index bdd3ff42e7..cbca8cd8c9 100644 --- a/LibreNMS/Authentication/RadiusAuthorizer.php +++ b/LibreNMS/Authentication/RadiusAuthorizer.php @@ -2,8 +2,12 @@ namespace LibreNMS\Authentication; +use App\Models\User; use Dapphp\Radius\Radius; +use Illuminate\Support\Arr; +use Illuminate\Support\Str; use LibreNMS\Config; +use LibreNMS\Enum\LegacyAuthLevel; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Util\Debug; @@ -13,8 +17,9 @@ class RadiusAuthorizer extends MysqlAuthorizer protected static $CAN_UPDATE_USER = true; protected static $CAN_UPDATE_PASSWORDS = false; - /** @var Radius */ - protected $radius; + protected Radius $radius; + + private array $roles = []; // temp cache of roles public function __construct() { @@ -33,30 +38,35 @@ class RadiusAuthorizer extends MysqlAuthorizer $password = $credentials['password'] ?? null; if ($this->radius->accessRequest($credentials['username'], $password) === true) { - // attribute 11 is "Filter-Id", apply and enforce user role (level) if set + $user = User::thisAuth()->firstOrNew(['username' => $credentials['username']], [ + 'auth_type' => LegacyAuth::getType(), + 'can_modify_passwd' => 0, + ]); + $user->save(); + $this->roles[$credentials['username']] = $this->getDefaultRoles(); + + // cache a single role from the Filter-ID attribute now because attributes are cleared every accessRequest $filter_id_attribute = $this->radius->getAttribute(11); - $level = match ($filter_id_attribute) { - 'librenms_role_admin' => 10, - 'librenms_role_normal' => 1, - 'librenms_role_global-read' => 5, - default => Config::get('radius.default_level', 1) - }; - - // if Filter-Id was given and the user exists, update the level - if ($filter_id_attribute && $this->userExists($credentials['username'])) { - $user = \App\Models\User::find($this->getUserid($credentials['username'])); - $user->level = $level; - $user->save(); - - return true; + if ($filter_id_attribute && Str::startsWith($filter_id_attribute, 'librenms_role_')) { + $this->roles[$credentials['username']] = [substr($filter_id_attribute, 14)]; } - $this->addUser($credentials['username'], $password, $level, '', $credentials['username'], 0); - return true; } throw new AuthenticationException(); } + + public function getRoles(string $username): array + { + return $this->roles[$username] ?? $this->getDefaultRoles(); + } + + private function getDefaultRoles(): array + { + // return roles or translate from the old radius.default_level + return Config::get('radius.default_roles') + ?: Arr::wrap(LegacyAuthLevel::from(Config::get('radius.default_level') ?? 1)->getName()); + } } diff --git a/LibreNMS/Authentication/SSOAuthorizer.php b/LibreNMS/Authentication/SSOAuthorizer.php index eac3394756..fc4241ff3f 100644 --- a/LibreNMS/Authentication/SSOAuthorizer.php +++ b/LibreNMS/Authentication/SSOAuthorizer.php @@ -25,7 +25,10 @@ namespace LibreNMS\Authentication; +use App\Models\User; +use Illuminate\Support\Arr; use LibreNMS\Config; +use LibreNMS\Enum\LegacyAuthLevel; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Exceptions\InvalidIpException; use LibreNMS\Util\IP; @@ -46,19 +49,21 @@ class SSOAuthorizer extends MysqlAuthorizer throw new AuthenticationException('\'sso.user_attr\' config setting was not found or was empty'); } - // Build the user's details from attributes - $email = $this->authSSOGetAttr(Config::get('sso.email_attr')); - $realname = $this->authSSOGetAttr(Config::get('sso.realname_attr')); - $description = $this->authSSOGetAttr(Config::get('sso.descr_attr')); - $can_modify_passwd = 0; + // User has already been approved by the authenticator so if automatic user create/update is enabled, do it + if (Config::get('sso.create_users') || Config::get('sso.update_users')) { + $user = User::thisAuth()->firstOrNew(['username' => $credentials['username']]); - $level = $this->authSSOCalculateLevel(); + $create = ! $user->exists && Config::get('sso.create_users'); + $update = $user->exists && Config::get('sso.update_users'); - // User has already been approved by the authenicator so if automatic user create/update is enabled, do it - if (Config::get('sso.create_users') && ! $this->userExists($credentials['username'])) { - $this->addUser($credentials['username'], null, $level, $email, $realname, $can_modify_passwd, $description ? $description : 'SSO User'); - } elseif (Config::get('sso.update_users') && $this->userExists($credentials['username'])) { - $this->updateUser($this->getUserid($credentials['username']), $realname, $level, $can_modify_passwd, $email); + if ($create || $update) { + $user->auth_type = LegacyAuth::getType(); + $user->can_modify_passwd = 0; + $user->realname = $this->authSSOGetAttr(Config::get('sso.realname_attr')); + $user->email = $this->authSSOGetAttr(Config::get('sso.email_attr')); + $user->descr = $this->authSSOGetAttr(Config::get('sso.descr_attr')) ?: 'SSO User'; + $user->save(); + } } return true; @@ -147,15 +152,19 @@ class SSOAuthorizer extends MysqlAuthorizer /** * Calculate the privilege level to assign to a user based on the configuration and attributes supplied by the external authenticator. * Returns an integer if the permission is found, or raises an AuthenticationException if the configuration is not valid. + * Converts the legacy level into a role * - * @return int + * @param string $username + * @return array + * + * @throws AuthenticationException */ - public function authSSOCalculateLevel() + public function getRoles(string $username): array { if (Config::get('sso.group_strategy') === 'attribute') { if (Config::get('sso.level_attr')) { if (is_numeric($this->authSSOGetAttr(Config::get('sso.level_attr')))) { - return (int) $this->authSSOGetAttr(Config::get('sso.level_attr')); + return Arr::wrap(LegacyAuthLevel::tryFrom((int) $this->authSSOGetAttr(Config::get('sso.level_attr')))?->getName()); } else { throw new AuthenticationException('group assignment by attribute requested, but httpd is not setting the attribute to a number'); } @@ -164,13 +173,13 @@ class SSOAuthorizer extends MysqlAuthorizer } } elseif (Config::get('sso.group_strategy') === 'map') { if (Config::get('sso.group_level_map') && is_array(Config::get('sso.group_level_map')) && Config::get('sso.group_delimiter') && Config::get('sso.group_attr')) { - return (int) $this->authSSOParseGroups(); + return Arr::wrap(LegacyAuthLevel::tryFrom((int) $this->authSSOParseGroups())?->getName()); } else { throw new AuthenticationException('group assignment by level map requested, but \'sso.group_level_map\', \'sso.group_attr\', or \'sso.group_delimiter\' are not set in your config'); } } elseif (Config::get('sso.group_strategy') === 'static') { if (Config::get('sso.static_level')) { - return (int) Config::get('sso.static_level'); + return Arr::wrap(LegacyAuthLevel::tryFrom((int) Config::get('sso.static_level'))?->getName()); } else { throw new AuthenticationException('group assignment by static level was requested, but \'sso.group_level_map\' was not set in your config'); } diff --git a/LibreNMS/Enum/LegacyAuthLevel.php b/LibreNMS/Enum/LegacyAuthLevel.php new file mode 100644 index 0000000000..a8a1cf6636 --- /dev/null +++ b/LibreNMS/Enum/LegacyAuthLevel.php @@ -0,0 +1,31 @@ + LegacyAuthLevel::admin, + 'user' => LegacyAuthLevel::user, + 'global-read', 'global_read' => LegacyAuthLevel::global_read, + 'demo' => LegacyAuthLevel::demo, + default => null + }; + } + + public function getName(): string + { + if ($this == LegacyAuthLevel::global_read) { + return 'global-read'; + } + + return $this->name; + } +} diff --git a/LibreNMS/IRCBot.php b/LibreNMS/IRCBot.php index 39357c3757..555299a83a 100644 --- a/LibreNMS/IRCBot.php +++ b/LibreNMS/IRCBot.php @@ -20,13 +20,16 @@ namespace LibreNMS; -use LibreNMS\Authentication\LegacyAuth; +use App\Models\Device; +use App\Models\Eventlog; +use App\Models\Port; +use App\Models\Service; +use App\Models\User; use LibreNMS\DB\Eloquent; use LibreNMS\Enum\AlertState; use LibreNMS\Util\Number; use LibreNMS\Util\Time; use LibreNMS\Util\Version; -use Permissions; class IRCBot { @@ -657,18 +660,11 @@ class IRCBot $this->log("HostAuth on irc matching $host to " . $this->getUserHost($this->data)); } if (preg_match("/$host/", $this->getUserHost($this->data))) { - $user_id = LegacyAuth::get()->getUserid($nms_user); - $user = LegacyAuth::get()->getUser($user_id); - $this->user['name'] = $user['username']; - $this->user['id'] = $user_id; - $this->user['level'] = LegacyAuth::get()->getUserlevel($user['username']); + $user = User::firstWhere('username', $nms_user); + $this->user['user'] = $user; $this->user['expire'] = (time() + ($this->config['irc_authtime'] * 3600)); - if ($this->user['level'] < 5) { - $this->user['devices'] = Permissions::devicesForUser($this->user['id'])->toArray(); - $this->user['ports'] = Permissions::portsForUser($this->user['id'])->toArray(); - } if ($this->debug) { - $this->log("HostAuth on irc for '" . $user['username'] . "', ID: '" . $user_id . "', Host: '" . $host); + $this->log("HostAuth on irc for '" . $user->username . "', ID: '" . $user->user_id . "', Host: '" . $host); } return true; @@ -695,31 +691,22 @@ class IRCBot if (strlen($params[0]) == 64) { if ($this->tokens[$this->getUser($this->data)] == $params[0]) { $this->user['expire'] = (time() + ($this->config['irc_authtime'] * 3600)); - $tmp_user = LegacyAuth::get()->getUser($this->user['id']); - $tmp = LegacyAuth::get()->getUserlevel($tmp_user['username']); - $this->user['level'] = $tmp; - if ($this->user['level'] < 5) { - $this->user['devices'] = Permissions::devicesForUser($this->user['id'])->toArray(); - $this->user['ports'] = Permissions::portsForUser($this->user['id'])->toArray(); - } return $this->respond('Authenticated.'); } else { return $this->respond('Nope.'); } } else { - $user_id = LegacyAuth::get()->getUserid($params[0]); - $user = LegacyAuth::get()->getUser($user_id); - if ($user['email'] && $user['username'] == $params[0]) { + $user = User::firstWhere('username', $params[0]); + if ($user->email && $user->username == $params[0]) { $token = hash('gost', openssl_random_pseudo_bytes(1024)); $this->tokens[$this->getUser($this->data)] = $token; - $this->user['name'] = $params[0]; - $this->user['id'] = $user['user_id']; + $this->user['user'] = $user; if ($this->debug) { - $this->log("Auth for '" . $params[0] . "', ID: '" . $user['user_id'] . "', Token: '" . $token . "', Mail: '" . $user['email'] . "'"); + $this->log("Auth for '" . $params[0] . "', ID: '" . $user->user_id . "', Token: '" . $token . "', Mail: '" . $user->email . "'"); } - if (send_mail($user['email'], 'LibreNMS IRC-Bot Authtoken', "Your Authtoken for the IRC-Bot:\r\n\r\n" . $token . "\r\n\r\n") === true) { + if (send_mail($user->email, 'LibreNMS IRC-Bot Authtoken', "Your Authtoken for the IRC-Bot:\r\n\r\n" . $token . "\r\n\r\n") === true) { return $this->respond('Token sent!'); } else { return $this->respond('Sorry, seems like mail doesnt like us.'); @@ -734,7 +721,7 @@ class IRCBot private function _reload($params) { - if ($this->user['level'] == 10) { + if ($this->user['user']->can('irc.reload')) { if ($params == 'external') { $this->respond('Reloading external scripts.'); @@ -756,7 +743,7 @@ class IRCBot private function _join($params) { - if ($this->user['level'] == 10) { + if ($this->user['user']->can('irc.join')) { return $this->joinChan($params); } else { return $this->respond('Permission denied.'); @@ -767,7 +754,7 @@ class IRCBot private function _quit($params) { - if ($this->user['level'] == 10) { + if ($this->user['user']->can('irc.quit')) { $this->ircRaw('QUIT :Requested'); return exit; @@ -812,31 +799,30 @@ class IRCBot if (strlen($params[1]) > 0) { $hostname = preg_replace("/[^A-z0-9\.\-]/", '', $params[1]); } - $hostname = $hostname . '%'; - if ($this->user['level'] < 5) { - $tmp = dbFetchRows('SELECT `event_id`, eventlog.device_id, devices.hostname, `datetime`,`message`, eventlog.type FROM `eventlog`, `devices` WHERE eventlog.device_id=devices.device_id and devices.hostname like "' . $hostname . '" and eventlog.device_id IN (' . implode(',', $this->user['devices']) . ') ORDER BY `event_id` DESC LIMIT ' . (int) $num); - } else { - $tmp = dbFetchRows('SELECT `event_id`, eventlog.device_id, devices.hostname, `datetime`,`message`, eventlog.type FROM `eventlog`, `devices` WHERE eventlog.device_id=devices.device_id and devices.hostname like "' . $hostname . '" ORDER BY `event_id` DESC LIMIT ' . (int) $num); - } + $tmp = Eventlog::with('device')->hasAccess($this->user['user'])->whereIn('device_id', function ($query) use ($hostname) { + return $query->where('hostname', 'like', $hostname . '%')->select('device_id'); + })->select(['event_id', 'datetime', 'type', 'message'])->orderBy('event_id')->limit((int) $num)->get(); + + /** @var Eventlog $logline */ foreach ($tmp as $logline) { - $response = $logline['datetime'] . ' '; - $response .= $this->_color($logline['hostname'], null, null, 'bold') . ' '; + $response = $logline->datetime . ' '; + $response .= $this->_color($logline->device->displayName(), null, null, 'bold') . ' '; if ($this->config['irc_alert_utf8']) { - if (preg_match('/critical alert/', $logline['message'])) { - $response .= preg_replace('/critical alert/', $this->_color('critical alert', 'red'), $logline['message']) . ' '; - } elseif (preg_match('/warning alert/', $logline['message'])) { - $response .= preg_replace('/warning alert/', $this->_color('warning alert', 'yellow'), $logline['message']) . ' '; - } elseif (preg_match('/recovery/', $logline['message'])) { - $response .= preg_replace('/recovery/', $this->_color('recovery', 'green'), $logline['message']) . ' '; + if (preg_match('/critical alert/', $logline->message)) { + $response .= preg_replace('/critical alert/', $this->_color('critical alert', 'red'), $logline->message) . ' '; + } elseif (preg_match('/warning alert/', $logline->message)) { + $response .= preg_replace('/warning alert/', $this->_color('warning alert', 'yellow'), $logline->message) . ' '; + } elseif (preg_match('/recovery/', $logline->message)) { + $response .= preg_replace('/recovery/', $this->_color('recovery', 'green'), $logline->message) . ' '; } else { - $response .= $logline['message'] . ' '; + $response .= $logline->message . ' '; } } else { - $response .= $logline['message'] . ' '; + $response .= $logline->message . ' '; } - if ($logline['type'] != 'NULL') { - $response .= $logline['type'] . ' '; + if ($logline->type != 'NULL') { + $response .= $logline->type . ' '; } if ($this->config['irc_floodlimit'] > 100) { $this->floodcount += strlen($response); @@ -862,23 +848,12 @@ class IRCBot private function _down($params) { - if ($this->user['level'] < 5) { - $tmp = dbFetchRows('SELECT `hostname` FROM `devices` WHERE status=0 AND `device_id` IN (' . implode(',', $this->user['devices']) . ')'); - } else { - $tmp = dbFetchRows('SELECT `hostname` FROM `devices` WHERE status=0'); - } + $devices = Device::hasAccess($this->user['user'])->isDown() + ->select(['device_id', 'hostname', 'sysName', 'display', 'ip'])->get(); - $msg = ''; - foreach ($tmp as $db) { - if ($db['hostname']) { - $msg .= ', ' . $db['hostname']; - } - } + $msg = $devices->map->displayName()->implode(', '); - $msg = substr($msg, 2); - $msg = $msg ? $msg : 'Nothing to show :)'; - - return $this->respond($msg); + return $this->respond($msg ?: 'Nothing to show :)'); } //end _down() @@ -887,20 +862,16 @@ class IRCBot { $params = explode(' ', $params); $hostname = $params[0]; - $device = dbFetchRow('SELECT * FROM `devices` WHERE `hostname` = ?', [$hostname]); + $device = Device::hasAccess($this->user['user'])->firstWhere('hostname', $hostname); if (! $device) { return $this->respond('Error: Bad or Missing hostname, use .listdevices to show all devices.'); } - if ($this->user['level'] < 5 && ! in_array($device['device_id'], $this->user['devices'])) { - return $this->respond('Error: Permission denied.'); - } + $status = $device->status ? 'Up ' . Time::formatInterval($device->uptime) : 'Down'; + $status .= $device->ignore ? '*Ignored*' : ''; + $status .= $device->disabled ? '*Disabled*' : ''; - $status = $device['status'] ? 'Up ' . Time::formatInterval($device['uptime']) : 'Down'; - $status .= $device['ignore'] ? '*Ignored*' : ''; - $status .= $device['disabled'] ? '*Disabled*' : ''; - - return $this->respond($device['os'] . ' ' . $device['version'] . ' ' . $device['features'] . ' ' . $status); + return $this->respond($device->displayName() . ': ' . $device->os . ' ' . $device->version . ' ' . $device->features . ' ' . $status); } //end _device() @@ -914,10 +885,14 @@ class IRCBot return $this->respond('Error: Missing hostname or ifname.'); } - $device = dbFetchRow('SELECT * FROM `devices` WHERE `hostname` = ?', [$hostname]); - $port = dbFetchRow('SELECT * FROM `ports` WHERE (`ifName` = ? OR `ifDescr` = ?) AND device_id = ?', [$ifname, $ifname, $device['device_id']]); - if ($this->user['level'] < 5 && ! in_array($port['port_id'], $this->user['ports']) && ! in_array($device['device_id'], $this->user['devices'])) { - return $this->respond('Error: Permission denied.'); + $device = Device::hasAccess($this->user['user'])->firstWhere('hostname', $hostname); + if (! $device) { + return $this->respond('Error: Bad or Missing hostname, use .listdevices to show all devices.'); + } + + $port = $device->ports()->hasAccess($this->user['user'])->where('ifName', $ifname)->orWhere('ifDescr', $ifname); + if (! $port) { + return $this->respond('Error: Port not found or you do not have access.'); } $bps_in = Number::formatSi($port['ifInOctets_rate'] * 8, 2, 3, 'bps'); @@ -932,21 +907,11 @@ class IRCBot private function _listdevices($params) { - if ($this->user['level'] < 5) { - $tmp = dbFetchRows('SELECT `hostname` FROM `devices` WHERE `device_id` IN (' . implode(',', $this->user['devices']) . ')'); - } else { - $tmp = dbFetchRows('SELECT `hostname` FROM `devices`'); - } + $devices = Device::hasAccess($this->user['user'])->pluck('hostname'); - $msg = ''; - foreach ($tmp as $device) { - $msg .= ', ' . $device['hostname']; - } + $msg = $devices->implode(', '); - $msg = substr($msg, 2); - $msg = $msg ? $msg : 'Nothing to show..?'; - - return $this->respond($msg); + return $this->respond($msg ?: 'Nothing to show..?'); } //end _listdevices() @@ -956,26 +921,15 @@ class IRCBot $params = explode(' ', $params); $statustype = $params[0]; - $d_w = ''; - $d_a = ''; - $p_w = ''; - $p_a = ''; - if ($this->user['level'] < 5) { - $d_w = ' WHERE device_id IN (' . implode(',', $this->user['devices']) . ')'; - $d_a = ' AND device_id IN (' . implode(',', $this->user['devices']) . ')'; - $p_w = ' WHERE port_id IN (' . implode(',', $this->user['ports']) . ') OR device_id IN (' . implode(',', $this->user['devices']) . ')'; - $p_a = ' AND (I.port_id IN (' . implode(',', $this->user['ports']) . ') OR I.device_id IN (' . implode(',', $this->user['devices']) . '))'; - } - switch ($statustype) { case 'devices': case 'device': case 'dev': - $devcount = dbFetchCell('SELECT count(*) FROM devices' . $d_w); - $devup = dbFetchCell("SELECT count(*) FROM devices WHERE status = '1' AND `ignore` = '0'" . $d_a); - $devdown = dbFetchCell("SELECT count(*) FROM devices WHERE status = '0' AND `ignore` = '0'" . $d_a); - $devign = dbFetchCell("SELECT count(*) FROM devices WHERE `ignore` = '1'" . $d_a); - $devdis = dbFetchCell("SELECT count(*) FROM devices WHERE `disabled` = '1'" . $d_a); + $devcount = Device::hasAccess($this->user['user'])->count(); + $devup = Device::hasAccess($this->user['user'])->isUp()->count(); + $devdown = Device::hasAccess($this->user['user'])->isDown()->count(); + $devign = Device::hasAccess($this->user['user'])->isIgnored()->count(); + $devdis = Device::hasAccess($this->user['user'])->isDisabled()->count(); if ($devup > 0) { $devup = $this->_color($devup, 'green'); } @@ -991,11 +945,13 @@ class IRCBot case 'ports': case 'port': case 'prt': - $prtcount = dbFetchCell('SELECT count(*) FROM ports' . $p_w); - $prtup = dbFetchCell("SELECT count(*) FROM ports AS I, devices AS D WHERE I.ifOperStatus = 'up' AND I.ignore = '0' AND I.device_id = D.device_id AND D.ignore = '0'" . $p_a); - $prtdown = dbFetchCell("SELECT count(*) FROM ports AS I, devices AS D WHERE I.ifOperStatus = 'down' AND I.ifAdminStatus = 'up' AND I.ignore = '0' AND D.device_id = I.device_id AND D.ignore = '0'" . $p_a); - $prtsht = dbFetchCell("SELECT count(*) FROM ports AS I, devices AS D WHERE I.ifAdminStatus = 'down' AND I.ignore = '0' AND D.device_id = I.device_id AND D.ignore = '0'" . $p_a); - $prtign = dbFetchCell("SELECT count(*) FROM ports AS I, devices AS D WHERE D.device_id = I.device_id AND (I.ignore = '1' OR D.ignore = '1')" . $p_a); + $prtcount = Port::hasAccess($this->user['user'])->count(); + $prtup = Port::hasAccess($this->user['user'])->isUp()->count(); + $prtdown = Port::hasAccess($this->user['user'])->isDown()->whereHas('device', fn ($q) => $q->where('ignore', 0))->count(); + $prtsht = Port::hasAccess($this->user['user'])->isShutdown()->whereHas('device', fn ($q) => $q->where('ignore', 0))->count(); + $prtign = Port::hasAccess($this->user['user'])->where(function ($query) { + $query->isIgnored()->orWhereHas('device', fn ($q) => $q->where('ignore', 1)); + })->count(); // $prterr = dbFetchCell("SELECT count(*) FROM ports AS I, devices AS D WHERE D.device_id = I.device_id AND (I.ignore = '0' OR D.ignore = '0') AND (I.ifInErrors_delta > '0' OR I.ifOutErrors_delta > '0')".$p_a); if ($prtup > 0) { $prtup = $this->_color($prtup, 'green'); @@ -1014,15 +970,16 @@ class IRCBot case 'srv': $status_counts = []; $status_colors = [0 => 'green', 3 => 'lightblue', 1 => 'yellow', 2 => 'red']; - $srvcount = dbFetchCell('SELECT COUNT(*) FROM services' . $d_w); - $srvign = dbFetchCell('SELECT COUNT(*) FROM services WHERE service_ignore = 1' . $d_a); - $srvdis = dbFetchCell('SELECT COUNT(*) FROM services WHERE service_disabled = 1' . $d_a); - $service_status = dbFetchRows("SELECT `service_status`, COUNT(*) AS `count` FROM `services` WHERE `service_disabled`=0 AND `service_ignore`=0 $d_a GROUP BY `service_status`"); - $service_status = array_column($service_status, 'count', 'service_status'); // key by status + $srvcount = Service::hasAccess($this->user['user'])->count(); + $srvign = Service::hasAccess($this->user['user'])->isIgnored()->count(); + $srvdis = Service::hasAccess($this->user['user'])->isDisabled()->count(); + $service_status = Service::hasAccess($this->user['user'])->isActive()->groupBy('service_status') + ->select('service_status', \DB::raw('count(*) as count'))->get() + ->pluck('count', 'service_status'); foreach ($status_colors as $status => $color) { - if (isset($service_status[$status])) { - $status_counts[$status] = $this->_color($service_status[$status], $color); + if ($service_status->has($status)) { + $status_counts[$status] = $this->_color($service_status->get($status), $color); $srvcount = $this->_color($srvcount, $color, null, 'bold'); // upgrade the main count color } else { $status_counts[$status] = 0; diff --git a/LibreNMS/Interfaces/Authentication/Authorizer.php b/LibreNMS/Interfaces/Authentication/Authorizer.php index a3ba4dcfc4..dd5db5c2eb 100644 --- a/LibreNMS/Interfaces/Authentication/Authorizer.php +++ b/LibreNMS/Interfaces/Authentication/Authorizer.php @@ -26,14 +26,6 @@ interface Authorizer */ public function userExists($username, $throw_exception = false); - /** - * Get the userlevel of $username - * - * @param string $username The username to check - * @return int - */ - public function getUserlevel($username); - /** * Get the user_id of $username * @@ -51,7 +43,6 @@ interface Authorizer * realname * email * descr - * level * can_modify_passwd * * @param int $user_id @@ -59,48 +50,6 @@ interface Authorizer */ public function getUser($user_id); - /** - * Add a new user. - * - * @param string $username - * @param string $password - * @param int $level - * @param string $email - * @param string $realname - * @param int $can_modify_passwd If this user is allowed to edit their password - * @param string $description - * @return int|false Returns the added user_id or false if adding failed - */ - public function addUser($username, $password, $level = 0, $email = '', $realname = '', $can_modify_passwd = 0, $description = ''); - - /** - * Update the some of the fields of a user - * - * @param int $user_id The user_id to update - * @param string $realname - * @param int $level - * @param int $can_modify_passwd - * @param string $email - * @return bool If the update was successful - */ - public function updateUser($user_id, $realname, $level, $can_modify_passwd, $email); - - /** - * Delete a user. - * - * @param int $user_id - * @return bool If the deletion was successful - */ - public function deleteUser($user_id); - - /** - * Get a list of all users in this Authorizer - * !Warning! this could be very slow for some Authorizer types or configurations - * - * @return array - */ - public function getUserlist(); - /** * Check if this Authorizer can add or remove users. * You must also check canUpdateUsers() to see if it can edit users. @@ -140,4 +89,10 @@ interface Authorizer * @return string|null */ public function getExternalUsername(); + + /** + * @param string $username + * @return string[] get a list of roles for the user, they need not exist ahead of time + */ + public function getRoles(string $username): array; } diff --git a/app/Console/Commands/AddUserCommand.php b/app/Console/Commands/AddUserCommand.php index 847ba49b63..c9101b9870 100644 --- a/app/Console/Commands/AddUserCommand.php +++ b/app/Console/Commands/AddUserCommand.php @@ -30,6 +30,7 @@ use App\Models\User; use Illuminate\Validation\Rule; use LibreNMS\Authentication\LegacyAuth; use LibreNMS\Config; +use Silber\Bouncer\Database\Role; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; @@ -50,7 +51,7 @@ class AddUserCommand extends LnmsCommand $this->addArgument('username', InputArgument::REQUIRED); $this->addOption('password', 'p', InputOption::VALUE_REQUIRED); - $this->addOption('role', 'r', InputOption::VALUE_REQUIRED, __('commands.user:add.options.role', ['roles' => '[normal, global-read, admin]']), 'normal'); + $this->addOption('role', 'r', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, __('commands.user:add.options.role', ['roles' => '[user, global-read, admin]']), ['user']); $this->addOption('email', 'e', InputOption::VALUE_REQUIRED); $this->addOption('full-name', 'l', InputOption::VALUE_REQUIRED); $this->addOption('descr', 's', InputOption::VALUE_REQUIRED); @@ -67,16 +68,12 @@ class AddUserCommand extends LnmsCommand $this->warn(__('commands.user:add.wrong-auth')); } - $roles = [ - 'normal' => 1, - 'global-read' => 5, - 'admin' => 10, - ]; + $roles = Role::pluck('name'); $this->validate([ 'username' => ['required', Rule::unique('users', 'username')->where('auth_type', 'mysql')], 'email' => 'nullable|email', - 'role' => Rule::in(array_keys($roles)), + 'role' => Rule::in($roles->keys()), ]); // set get password @@ -87,7 +84,6 @@ class AddUserCommand extends LnmsCommand $user = new User([ 'username' => $this->argument('username'), - 'level' => $roles[$this->option('role')], 'descr' => $this->option('descr'), 'email' => $this->option('email'), 'realname' => $this->option('full-name'), @@ -96,6 +92,7 @@ class AddUserCommand extends LnmsCommand $user->setPassword($password); $user->save(); + $user->allow($this->option('role')); $user->auth_id = (string) LegacyAuth::get()->getUserid($user->username) ?: $user->user_id; $user->save(); diff --git a/app/Http/Controllers/Install/MakeUserController.php b/app/Http/Controllers/Install/MakeUserController.php index c7b40fe8e8..a162feb556 100644 --- a/app/Http/Controllers/Install/MakeUserController.php +++ b/app/Http/Controllers/Install/MakeUserController.php @@ -30,6 +30,7 @@ use Illuminate\Database\QueryException; use Illuminate\Http\Request; use Illuminate\Support\Arr; use LibreNMS\Interfaces\InstallerStep; +use Silber\Bouncer\BouncerFacade as Bouncer; class MakeUserController extends InstallationController implements InstallerStep { @@ -72,10 +73,12 @@ class MakeUserController extends InstallationController implements InstallerStep if (! $this->complete()) { $this->configureDatabase(); $user = new User($request->only(['username', 'password', 'email'])); - $user->level = 10; // admin $user->setPassword($request->get('password')); $res = $user->save(); + Bouncer::allow('admin')->everything(); // make sure admin role exists + $user->assign('admin'); + if ($res) { $message = trans('install.user.success'); $this->markStepComplete(); diff --git a/app/Http/Controllers/Select/RoleController.php b/app/Http/Controllers/Select/RoleController.php new file mode 100644 index 0000000000..626cb5a2d8 --- /dev/null +++ b/app/Http/Controllers/Select/RoleController.php @@ -0,0 +1,46 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2023 Tony Murray + * @author Tony Murray + */ + +namespace App\Http\Controllers\Select; + +use Illuminate\Http\Request; +use Silber\Bouncer\BouncerFacade as Bouncer; + +class RoleController extends SelectController +{ + protected ?string $idField = 'name'; + protected ?string $textField = 'title'; + + protected function searchFields(Request $request) + { + return ['name']; + } + + protected function baseQuery(Request $request) + { + return Bouncer::role() + ->whereRaw('1 = ' . ((int) $request->user()->can('viewAny', Bouncer::role()))); + } +} diff --git a/app/Http/Controllers/Select/SelectController.php b/app/Http/Controllers/Select/SelectController.php index b051f1e8dc..4645cd57ab 100644 --- a/app/Http/Controllers/Select/SelectController.php +++ b/app/Http/Controllers/Select/SelectController.php @@ -27,13 +27,18 @@ namespace App\Http\Controllers\Select; use App\Http\Controllers\PaginatedAjaxController; use Illuminate\Contracts\Pagination\Paginator; +use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Query\Builder; use Illuminate\Http\Request; use Illuminate\Support\Collection; use Illuminate\Support\Str; abstract class SelectController extends PaginatedAjaxController { + protected ?string $idField = null; + protected ?string $textField = null; + final protected function baseRules() { return [ @@ -54,9 +59,11 @@ abstract class SelectController extends PaginatedAjaxController $this->validate($request, $this->rules()); $limit = $request->get('limit', 50); - $query = $this->baseQuery($request)->when($request->has('id'), function ($query) { - return $query->whereKey(request('id')); - }); + $query = $this->baseQuery($request); + if ($this->idField && $this->textField) { + $query->select([$this->idField, $this->textField]); + } + $this->filterById($query, $request->get('id')); $this->filter($request, $query, $this->filterFields($request)); $this->search($request->get('term'), $query, $this->searchFields($request)); $this->sort($request, $query); @@ -88,6 +95,14 @@ abstract class SelectController extends PaginatedAjaxController */ public function formatItem($model) { + if ($this->idField && $this->textField) { + return [ + 'id' => $model->getAttribute($this->idField), + 'text' => $model->getAttribute($this->textField), + ]; + } + + // guess $attributes = collect($model->getAttributes()); return [ @@ -106,4 +121,21 @@ abstract class SelectController extends PaginatedAjaxController return true; } + + protected function filterById(EloquentBuilder|Builder $query, ?string $id): EloquentBuilder|Builder + { + if ($id) { + // multiple + if (str_contains($id, ',')) { + $keys = explode(',', $id); + + return $this->idField ? $query->whereIn($this->idField, $keys) : $query->whereKey($keys); + } + + // use id field if given + return $this->idField ? $query->where($this->idField, $id) : $query->whereKey($id); + } + + return $query; + } } diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index ace4bfe76d..3d62f9eb3c 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -74,7 +74,7 @@ class UserController extends Controller $this->authorize('create', User::class); $tmp_user = new User; - $tmp_user->can_modify_passwd = (int) LegacyAuth::get()->canUpdatePasswords(); // default to true for new users + $tmp_user->can_modify_passwd = LegacyAuth::getType() == 'mysql' ? 1 : 0; // default to true mysql return view('user.create', [ 'user' => $tmp_user, @@ -92,13 +92,14 @@ class UserController extends Controller */ public function store(StoreUserRequest $request, FlasherInterface $flasher) { - $user = $request->only(['username', 'realname', 'email', 'descr', 'level', 'can_modify_passwd']); + $user = $request->only(['username', 'realname', 'email', 'descr', 'can_modify_passwd']); $user['auth_type'] = LegacyAuth::getType(); $user['can_modify_passwd'] = $request->get('can_modify_passwd'); // checkboxes are missing when unchecked $user = User::create($user); $user->setPassword($request->new_password); + $user->setRoles($request->get('roles', [])); $user->auth_id = (string) LegacyAuth::get()->getUserid($user->username) ?: $user->user_id; $this->updateDashboard($user, $request->get('dashboard')); $this->updateTimezone($user, $request->get('timezone')); @@ -184,6 +185,7 @@ class UserController extends Controller } $user->fill($request->validated()); + $user->setRoles($request->get('roles', [])); if ($request->has('dashboard') && $this->updateDashboard($user, $request->get('dashboard'))) { $flasher->addSuccess(__('Updated dashboard for :username', ['username' => $user->username])); diff --git a/app/Http/Requests/StoreUserRequest.php b/app/Http/Requests/StoreUserRequest.php index 7b5f8c456a..79b5fd4661 100644 --- a/app/Http/Requests/StoreUserRequest.php +++ b/app/Http/Requests/StoreUserRequest.php @@ -7,6 +7,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rule; use LibreNMS\Authentication\LegacyAuth; use LibreNMS\Config; +use Silber\Bouncer\BouncerFacade as Bouncer; class StoreUserRequest extends FormRequest { @@ -17,7 +18,15 @@ class StoreUserRequest extends FormRequest */ public function authorize(): bool { - return $this->user()->can('create', User::class); + if ($this->user()->can('create', User::class)) { + if ($this->user()->cannot('manage', Bouncer::role())) { + unset($this['roles']); + } + + return true; + } + + return false; } /** @@ -37,7 +46,8 @@ class StoreUserRequest extends FormRequest 'realname' => 'nullable|max:64|alpha_space', 'email' => 'nullable|email|max:64', 'descr' => 'nullable|max:30|alpha_space', - 'level' => 'int', + 'roles' => 'array', + 'roles.*' => Rule::in(Bouncer::role()->pluck('name')), 'new_password' => 'required|confirmed|min:' . Config::get('password.min_length', 8), 'dashboard' => 'int', ]; diff --git a/app/Http/Requests/UpdateUserRequest.php b/app/Http/Requests/UpdateUserRequest.php index 32e9bb3f55..dcc19b138e 100644 --- a/app/Http/Requests/UpdateUserRequest.php +++ b/app/Http/Requests/UpdateUserRequest.php @@ -2,9 +2,12 @@ namespace App\Http\Requests; +use App\Models\User; use Hash; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Validation\Rule; use LibreNMS\Config; +use Silber\Bouncer\BouncerFacade as Bouncer; class UpdateUserRequest extends FormRequest { @@ -15,14 +18,17 @@ class UpdateUserRequest extends FormRequest */ public function authorize(): bool { - if ($this->user()->isAdmin()) { - return true; - } - + /** @var User|null $user */ $user = $this->route('user'); if ($user && $this->user()->can('update', $user)) { - // normal users cannot edit their level or ability to modify a password - unset($this['level'], $this['can_modify_passwd']); + // normal users cannot update their roles or ability to modify a password + if ($this->user()->cannot('manage', Bouncer::role())) { + unset($this['roles']); + } + + if ($user->is($this->user())) { + unset($this['can_modify_passwd']); + } return true; } @@ -37,7 +43,7 @@ class UpdateUserRequest extends FormRequest */ public function rules(): array { - if ($this->user()->isAdmin()) { + if ($this->user()->can('update', User::class)) { return [ 'realname' => 'nullable|max:64|alpha_space', 'email' => 'nullable|email|max:64', @@ -45,7 +51,8 @@ class UpdateUserRequest extends FormRequest 'new_password' => 'nullable|confirmed|min:' . Config::get('password.min_length', 8), 'new_password_confirmation' => 'nullable|same:new_password', 'dashboard' => 'int', - 'level' => 'int', + 'roles' => 'array', + 'roles.*' => Rule::in(Bouncer::role()->pluck('name')), 'enabled' => 'nullable', 'can_modify_passwd' => 'nullable', ]; @@ -72,7 +79,8 @@ class UpdateUserRequest extends FormRequest { $validator->after(function ($validator) { // if not an admin and new_password is set, check old password matches - if (! $this->user()->isAdmin()) { + $user = $this->route('user'); + if ($user && $this->user()->can('update', $user) && $this->user()->is($user)) { if ($this->has('new_password')) { if ($this->has('old_password')) { $user = $this->route('user'); diff --git a/app/Models/Service.php b/app/Models/Service.php index fa4ae7950e..4b83cec187 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -27,6 +27,18 @@ class Service extends DeviceRelatedModel // ---- Query Scopes ---- + /** + * @param Builder $query + * @return Builder + */ + public function scopeIsActive($query) + { + return $query->where([ + ['service_ignore', '=', 0], + ['service_disabled', '=', 0], + ]); + } + /** * @param Builder $query * @return Builder diff --git a/app/Models/User.php b/app/Models/User.php index 78309f4028..4643969ea9 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -13,16 +13,18 @@ use Illuminate\Support\Facades\Hash; use LibreNMS\Authentication\LegacyAuth; use NotificationChannels\WebPush\HasPushSubscriptions; use Permissions; +use Silber\Bouncer\BouncerFacade as Bouncer; +use Silber\Bouncer\Database\HasRolesAndAbilities; /** * @method static \Database\Factories\UserFactory factory(...$parameters) */ class User extends Authenticatable { - use Notifiable, HasFactory, HasPushSubscriptions; + use HasRolesAndAbilities, Notifiable, HasFactory, HasPushSubscriptions; protected $primaryKey = 'user_id'; - protected $fillable = ['realname', 'username', 'email', 'level', 'descr', 'can_modify_passwd', 'auth_type', 'auth_id', 'enabled']; + protected $fillable = ['realname', 'username', 'email', 'descr', 'can_modify_passwd', 'auth_type', 'auth_id', 'enabled']; protected $hidden = ['password', 'remember_token', 'pivot']; protected $attributes = [ // default values 'descr' => '', @@ -42,31 +44,29 @@ class User extends Authenticatable public function toFlare(): array { - return $this->only(['level', 'auth_type', 'enabled']); + return $this->only(['auth_type', 'enabled']); } // ---- Helper Functions ---- /** * Test if this user has global read access - * these users have a level of 5, 10 or 11 (demo). * * @return bool */ public function hasGlobalRead() { - return $this->hasGlobalAdmin() || $this->level == 5; + return $this->isA('admin', 'global-read'); } /** * Test if this user has global admin access - * these users have a level of 10 or 11 (demo). * * @return bool */ public function hasGlobalAdmin() { - return $this->level >= 10; + return $this->isA('admin', 'demo'); } /** @@ -76,7 +76,7 @@ class User extends Authenticatable */ public function isAdmin() { - return $this->level == 10; + return $this->isA('admin'); } /** @@ -86,7 +86,7 @@ class User extends Authenticatable */ public function isDemo() { - return $this->level == 11; + return $this->isA('demo'); } /** @@ -110,6 +110,20 @@ class User extends Authenticatable $this->attributes['password'] = $password ? Hash::make($password) : null; } + /** + * Set roles and remove extra roles, optionally creating non-existent roles, flush permissions cache for this user if roles changed + */ + public function setRoles(array $roles, bool $create = false): void + { + if ($roles != $this->getRoles()) { + if ($create) { + $this->assign($roles); + } + Bouncer::sync($this)->roles($roles); + Bouncer::refresh($this); + } + } + /** * Check if the given user can set the password for this user * @@ -167,7 +181,7 @@ class User extends Authenticatable public function scopeAdminOnly($query) { - $query->where('level', 10); + $query->whereIs('admin'); } // ---- Accessors/Mutators ---- diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php index 132ff45bea..e5a279a069 100644 --- a/app/Policies/UserPolicy.php +++ b/app/Policies/UserPolicy.php @@ -9,35 +9,15 @@ class UserPolicy { use HandlesAuthorization; - /** - * Determine whether the user can manage users. - * - * @param User $user - */ - public function manage(User $user): bool - { - return $user->isAdmin(); - } - /** * Determine whether the user can view the user. * * @param User $user * @param User $target */ - public function view(User $user, User $target): bool + public function view(User $user, User $target): ?bool { - return $user->isAdmin() || $target->is($user); - } - - /** - * Determine whether the user can view any user. - * - * @param User $user - */ - public function viewAny(User $user): bool - { - return $user->isAdmin(); + return $target->is($user) ?: null; // allow users to view themselves } /** @@ -45,9 +25,14 @@ class UserPolicy * * @param User $user */ - public function create(User $user): bool + public function create(User $user): ?bool { - return $user->isAdmin(); + // if not mysql, forbid, otherwise defer to bouncer + if (\LibreNMS\Config::get('auth_mechanism') != 'mysql') { + return false; + } + + return null; } /** @@ -56,9 +41,13 @@ class UserPolicy * @param User $user * @param User $target */ - public function update(User $user, User $target): bool + public function update(User $user, User $target = null): ?bool { - return $user->isAdmin() || $target->is($user); + if ($target == null) { + return null; + } + + return $target->is($user) ?: null; // allow user to update self or defer to bouncer } /** @@ -67,8 +56,8 @@ class UserPolicy * @param User $user * @param User $target */ - public function delete(User $user, User $target): bool + public function delete(User $user, User $target): ?bool { - return $user->isAdmin(); + return $target->is($user) ? false : null; // do not allow users to delete themselves or defer to bouncer } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index cf45f0e5a2..372aa69a77 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -6,6 +6,7 @@ use App\Guards\ApiTokenGuard; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Gate; +use Silber\Bouncer\BouncerFacade as Bouncer; class AuthServiceProvider extends ServiceProvider { @@ -31,6 +32,8 @@ class AuthServiceProvider extends ServiceProvider */ public function boot(): void { + Bouncer::cache(); + Auth::provider('legacy', function ($app, array $config) { return new LegacyUserProvider(); }); diff --git a/app/Providers/LegacyUserProvider.php b/app/Providers/LegacyUserProvider.php index 188c0b6118..b5c0f2a099 100644 --- a/app/Providers/LegacyUserProvider.php +++ b/app/Providers/LegacyUserProvider.php @@ -208,6 +208,9 @@ class LegacyUserProvider implements UserProvider $user->auth_id = (string) $auth_id; $user->save(); + // create and update roles + $user->setRoles($auth->getRoles($user->username), true); + return $user; } } diff --git a/composer.json b/composer.json index 88ea3a54a3..13571c07c3 100644 --- a/composer.json +++ b/composer.json @@ -48,6 +48,7 @@ "php-flasher/flasher-laravel": "^1.12", "phpmailer/phpmailer": "~6.0", "predis/predis": "^2.0", + "silber/bouncer": "^1.0", "socialiteproviders/manager": "^4.3", "spatie/laravel-ignition": "^2.0", "symfony/yaml": "^6.2", diff --git a/composer.lock b/composer.lock index d2b7499656..b26090101a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ce02f0a79191fafde1a88553b37d0b4e", + "content-hash": "21dbcfec63eafb1ae9172473314a57f8", "packages": [ { "name": "amenadiel/jpgraph", @@ -5169,6 +5169,81 @@ ], "time": "2023-04-15T23:01:58+00:00" }, + { + "name": "silber/bouncer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/JosephSilber/bouncer.git", + "reference": "502221b6724fe806aa01ffe08070edaa10222101" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JosephSilber/bouncer/zipball/502221b6724fe806aa01ffe08070edaa10222101", + "reference": "502221b6724fe806aa01ffe08070edaa10222101", + "shasum": "" + }, + "require": { + "illuminate/auth": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/cache": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/container": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/database": "^6.0|^7.0|^8.0|^9.0|^10.0", + "php": "^7.2|^8.0" + }, + "require-dev": { + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/events": "^6.0|^7.0|^8.0|^9.0|^10.0", + "larapack/dd": "^1.1", + "mockery/mockery": "^1.3.3", + "phpunit/phpunit": "^8.0|^9.0" + }, + "suggest": { + "illuminate/console": "Allows running the bouncer:clean artisan command", + "illuminate/events": "Required for multi-tenancy support" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Silber\\Bouncer\\BouncerServiceProvider" + ], + "aliases": { + "Bouncer": "Silber\\Bouncer\\BouncerFacade" + } + } + }, + "autoload": { + "psr-4": { + "Silber\\Bouncer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joseph Silber", + "email": "contact@josephsilber.com" + } + ], + "description": "Eloquent roles and abilities.", + "keywords": [ + "abilities", + "acl", + "capabilities", + "eloquent", + "laravel", + "permissions", + "roles" + ], + "support": { + "issues": "https://github.com/JosephSilber/bouncer/issues", + "source": "https://github.com/JosephSilber/bouncer/tree/v1.0.1" + }, + "time": "2023-02-10T16:47:25+00:00" + }, { "name": "socialiteproviders/manager", "version": "v4.3.0", diff --git a/database/factories/RoleFactory.php b/database/factories/RoleFactory.php new file mode 100644 index 0000000000..35a2206539 --- /dev/null +++ b/database/factories/RoleFactory.php @@ -0,0 +1,42 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2023 Tony Murray + * @author Tony Murray + */ + +namespace Database\Factories; + +use Illuminate\Database\Eloquent\Factories\Factory; +use Silber\Bouncer\Database\Role; + +class RoleFactory extends Factory +{ + protected $model = Role::class; + + public function definition() + { + return [ + 'name' => $this->faker->text(), + 'title' => $this->faker->text(), + ]; + } +} diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 423fe706e1..9a1c677e55 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -2,10 +2,10 @@ namespace Database\Factories; -use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; +use Silber\Bouncer\BouncerFacade as Bouncer; -/** @extends Factory */ +/** @extends Factory<\App\Models\User> */ class UserFactory extends Factory { /** @@ -21,25 +21,23 @@ class UserFactory extends Factory 'realname' => $this->faker->name(), 'email' => $this->faker->safeEmail(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password - 'level' => 1, ]; } public function admin() { - return $this->state(function () { - return [ - 'level' => '10', - ]; + return $this->afterCreating(function ($user) { + Bouncer::allow('admin')->everything(); + $user->assign('admin'); }); } public function read() { - return $this->state(function () { - return [ - 'level' => '5', - ]; + return $this->afterCreating(function ($user) { + Bouncer::allow(Bouncer::role()->firstOrCreate(['name' => 'global-read'], ['title' => 'Global Read'])) + ->to('viewAny', '*', []); + $user->assign('global-read'); }); } } diff --git a/database/migrations/2023_06_18_195618_create_bouncer_tables.php b/database/migrations/2023_06_18_195618_create_bouncer_tables.php new file mode 100644 index 0000000000..01e5e3534d --- /dev/null +++ b/database/migrations/2023_06_18_195618_create_bouncer_tables.php @@ -0,0 +1,100 @@ +bigIncrements('id'); + $table->string('name'); + $table->string('title')->nullable(); + $table->bigInteger('entity_id')->unsigned()->nullable(); + $table->string('entity_type')->nullable(); + $table->boolean('only_owned')->default(false); + $table->longText('options')->nullable(); + $table->integer('scope')->nullable()->index(); + $table->timestamps(); + }); + } + + if (! Schema::hasTable('roles')) { + Schema::create(Models::table('roles'), function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('name'); + $table->string('title')->nullable(); + $table->integer('scope')->nullable()->index(); + $table->timestamps(); + + $table->unique( + ['name', 'scope'], + 'roles_name_unique' + ); + }); + } + + if (! Schema::hasTable('assigned_roles')) { + Schema::create(Models::table('assigned_roles'), function (Blueprint $table) { + $table->bigIncrements('id'); + $table->bigInteger('role_id')->unsigned()->index(); + $table->bigInteger('entity_id')->unsigned(); + $table->string('entity_type'); + $table->bigInteger('restricted_to_id')->unsigned()->nullable(); + $table->string('restricted_to_type')->nullable(); + $table->integer('scope')->nullable()->index(); + + $table->index( + ['entity_id', 'entity_type', 'scope'], + 'assigned_roles_entity_index' + ); + + $table->foreign('role_id') + ->references('id')->on(Models::table('roles')) + ->onUpdate('cascade')->onDelete('cascade'); + }); + } + + if (! Schema::hasTable('permissions')) { + Schema::create(Models::table('permissions'), function (Blueprint $table) { + $table->bigIncrements('id'); + $table->bigInteger('ability_id')->unsigned()->index(); + $table->bigInteger('entity_id')->unsigned()->nullable(); + $table->string('entity_type')->nullable(); + $table->boolean('forbidden')->default(false); + $table->integer('scope')->nullable()->index(); + + $table->index( + ['entity_id', 'entity_type', 'scope'], + 'permissions_entity_index' + ); + + $table->foreign('ability_id') + ->references('id')->on(Models::table('abilities')) + ->onUpdate('cascade')->onDelete('cascade'); + }); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop(Models::table('permissions')); + Schema::drop(Models::table('assigned_roles')); + Schema::drop(Models::table('roles')); + Schema::drop(Models::table('abilities')); + } +} diff --git a/database/migrations/2023_06_18_201914_migrate_level_to_roles.php b/database/migrations/2023_06_18_201914_migrate_level_to_roles.php new file mode 100644 index 0000000000..798d9ddb6a --- /dev/null +++ b/database/migrations/2023_06_18_201914_migrate_level_to_roles.php @@ -0,0 +1,71 @@ +each(function (User $user) { + $role = match ($user->getAttribute('level')) { + 1 => 'user', + 5 => 'global-read', + 10 => 'admin', + default => null, + }; + + if ($role) { + Bouncer::assign($role)->to($user); + } + }); + + Bouncer::refresh(); // clear cache + + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('level'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + if (! Schema::hasColumn('users', 'level')) { + Schema::table('users', function (Blueprint $table) { + $table->tinyInteger('level')->default(0)->after('descr'); + }); + } + + User::whereIs('admin', 'global-read', 'user')->get()->each(function (User $user) { + $user->setAttribute('level', $this->getLevel($user)); + $user->save(); + }); + + Bouncer::refresh(); + } + + private function getLevel(User $user): int + { + if ($user->isA('admin')) { + return 10; + } + + if ($user->isA('global-read')) { + return 7; + } + + if ($user->isA('user')) { + return 1; + } + + return 0; + } +}; diff --git a/database/seeders/RolesSeeder.php b/database/seeders/RolesSeeder.php new file mode 100644 index 0000000000..58e9d24cbe --- /dev/null +++ b/database/seeders/RolesSeeder.php @@ -0,0 +1,41 @@ +. + * + * @link https://www.librenms.org + * + * @copyright 2023 Tony Murray + * @author Tony Murray + */ + +namespace Database\Seeders; + +use Illuminate\Database\Seeder; +use Silber\Bouncer\BouncerFacade as Bouncer; + +class RolesSeeder extends Seeder +{ + public function run(): void + { + // set abilities for default rules + Bouncer::allow('admin')->everything(); + Bouncer::allow(Bouncer::role()->firstOrCreate(['name' => 'global-read'], ['title' => 'Global Read'])) + ->to('viewAny', '*', []); + Bouncer::role()->firstOrCreate(['name' => 'user'], ['title' => 'User']); + } +} diff --git a/doc/Extensions/Authentication.md b/doc/Extensions/Authentication.md index 8d20ea8882..561fbb73da 100644 --- a/doc/Extensions/Authentication.md +++ b/doc/Extensions/Authentication.md @@ -291,23 +291,23 @@ setsebool -P httpd_can_connect_ldap 1 ## Radius Authentication Please note that a mysql user is created for each user the logs in -successfully. User level 1 is assigned by default to those accounts -unless radius sends a reply attribute with the correct userlevel. +successfully. Users are assigned the `user` role by default, +unless radius sends a reply attribute with a role. -You can change the default userlevel by setting -`radius.userlevel` to something other than 1. +You can change the default role(s) by setting +!!! setting "auth/radius" +```bash +lnms config:set radius.default_roles '["csr"]' +``` The attribute `Filter-ID` is a standard Radius-Reply-Attribute (string) that -can be assigned a value which translates into a userlevel in LibreNMS. +can be assigned a specially formatted string to assign a single role to the user. -The strings to send in `Filter-ID` reply attribute is *one* of the following: - -- `librenms_role_normal` - Sets the value `1`, which is the normal user level. -- `librenms_role_admin` - Sets the value `5`, which is the administrator level. -- `librenms_role_global-read` - Sets the value `10`, which is the global read level. +The string to send in `Filter-ID` reply attribute must start with `librenms_role_` followed by the role name. +For example to set the admin role send `librenms_role_admin` LibreNMS will ignore any other strings sent in `Filter-ID` and revert to default -userlevel that is set in your config. +role that is set in your config. ```php $config['radius']['hostname'] = 'localhost'; @@ -408,9 +408,9 @@ $config['auth_mechanism'] = 'ldap-authorization'; $config['auth_ldap_server'] = 'ldap.example.com'; // Set server(s), space separated. Prefix with ldaps:// for ssl $config['auth_ldap_suffix'] = ',ou=People,dc=example,dc=com'; // appended to usernames $config['auth_ldap_groupbase'] = 'ou=groups,dc=example,dc=com'; // all groups must be inside this -$config['auth_ldap_groups']['admin']['level'] = 10; // set admin group to admin level -$config['auth_ldap_groups']['pfy']['level'] = 5; // set pfy group to global read only level -$config['auth_ldap_groups']['support']['level'] = 1; // set support group as a normal user +$config['auth_ldap_groups']['admin']['roles'] = ['admin']; // set admin group to admin role +$config['auth_ldap_groups']['pfy']['roles'] = ['global-read']; // set pfy group to global read only role +$config['auth_ldap_groups']['support']['roles'] = ['user']; // set support group as a normal user ``` #### Additional options (usually not needed) diff --git a/html/css/app.css b/html/css/app.css index c0832b768f..aa9583f0cb 100644 --- a/html/css/app.css +++ b/html/css/app.css @@ -1,2 +1,2 @@ #flasher-container-top-right{position:fixed;right:12px;top:55px;z-index:999999}#flasher-container-top-right a{font-weight:700}#flasher-container-top-right>div{background-position:10px;background-repeat:no-repeat;min-height:50px;width:304px}.flasher-error{background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bS02IDlhMSAxIDAgMCAxIC43MDcuMjkzTDE2IDE0LjU4Nmw1LjI5My01LjI5M2ExIDEgMCAwIDEgMS40MTQgMCAxIDEgMCAwIDEgMCAxLjQxNEwxNy40MTQgMTZsNS4yOTMgNS4yOTNhMSAxIDAgMCAxIDAgMS40MTQgMSAxIDAgMCAxLTEuNDE0IDBMMTYgMTcuNDE0bC01LjI5MyA1LjI5M2ExIDEgMCAwIDEtMS40MTQgMCAxIDEgMCAwIDEgMC0xLjQxNEwxNC41ODYgMTZsLTUuMjkzLTUuMjkzYTEgMSAwIDAgMSAwLTEuNDE0QTEgMSAwIDAgMSAxMCA5eiIgZmlsbD0iI2RjMjYyNiIvPjwvc3ZnPg==");background-size:32px}.flasher-info{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNmM1LjUxMSAwIDEwIDQuNDg5IDEwIDEwcy00LjQ4OSAxMC0xMCAxMFM2IDIxLjUxMSA2IDE2IDEwLjQ4OSA2IDE2IDZ6bTAgMmMtNC40MyAwLTggMy41Ny04IDhzMy41NyA4IDggOCA4LTMuNTcgOC04LTMuNTctOC04LTh6bTAgM2ExIDEgMCAwIDEgMSAxdjRhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi00YTEgMSAwIDAgMSAxLTF6bTAgOGguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiMyNTYzZWIiLz48L3N2Zz4=");background-size:32px}.flasher-success{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTcgMTBhMSAxIDAgMCAxIC43MDcuMjkzIDEgMSAwIDAgMSAwIDEuNDE0bC0xMCAxMGExIDEgMCAwIDEtMS40MTQgMGwtNC00YTEgMSAwIDAgMSAwLTEuNDE0IDEgMSAwIDAgMSAxLjQxNCAwTDEzIDE5LjU4Nmw5LjI5My05LjI5M0ExIDEgMCAwIDEgMjMgMTB6IiBmaWxsPSIjMDU5NjY5Ii8+PC9zdmc+");background-size:32px}.flasher-warning{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PGNpcmNsZSBjeD0iMTYiIGN5PSIxNiIgcj0iMTUiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTYgMEExNiAxNiAwIDAgMCAwIDE2YTE2IDE2IDAgMCAwIDE2IDE2IDE2IDE2IDAgMCAwIDE2LTE2QTE2IDE2IDAgMCAwIDE2IDB6bTAgNi4xNTZjMS4wMTYgMCAyLjAzMi40OSAyLjU5OCAxLjQ2OWw2LjkyNyAxMmMxLjEzMSAxLjk1OC0uMzM2IDQuNS0yLjU5NyA0LjVIOS4wNzJjLTIuMjYxIDAtMy43MjgtMi41NDItMi41OTctNC41bDYuOTI3LTEyYy41NjYtLjk3OSAxLjU4Mi0xLjQ2OSAyLjU5OC0xLjQ2OXptMCAxLjkzOGMtLjMzIDAtLjY2LjE3Ny0uODY1LjUzMWwtNi45MyAxMmMtLjQwOS43MDguMDQ5IDEuNS44NjcgMS41aDEzLjg1NmMuODE4IDAgMS4yNzYtLjc5Mi44NjctMS41bC02LjkzLTEyYy0uMjA0LS4zNTQtLjUzNC0uNTMxLS44NjUtLjUzMXptMCA0LjAzMWExIDEgMCAwIDEgMSAxdjJhMSAxIDAgMCAxLTEgMSAxIDEgMCAwIDEtMS0xdi0yYTEgMSAwIDAgMSAxLTF6bTAgNmguMDFhMSAxIDAgMCAxIDEgMSAxIDEgMCAwIDEtMSAxSDE2YTEgMSAwIDAgMS0xLTEgMSAxIDAgMCAxIDEtMXoiIGZpbGw9IiNkOTc3MDYiLz48L3N2Zz4=");background-size:32px} -/*! tailwindcss v3.0.15 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family: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;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.tw-relative{position:relative}.tw-z-50{z-index:50}.tw-float-right{float:right}.tw-mx-10{margin-left:2.5rem;margin-right:2.5rem}.tw-mr-3{margin-right:.75rem}.tw-mt-2{margin-top:.5rem}.tw-mr-1{margin-right:.25rem}.tw-ml-2{margin-left:.5rem}.tw-mr-2{margin-right:.5rem}.tw-ml-auto{margin-left:auto}.tw-mt-1{margin-top:.25rem}.tw-mr-0\.5{margin-right:.125rem}.tw-mr-0{margin-right:0}.tw-ml-3{margin-left:.75rem}.tw-mb-0{margin-bottom:0}.tw-mb-2{margin-bottom:.5rem}.tw-mt-5{margin-top:1.25rem}.tw-block{display:block}.tw-inline-block{display:inline-block}.tw-flex{display:flex}.tw-inline-flex{display:inline-flex}.tw-grid{display:grid}.tw-hidden{display:none}.tw-h-1{height:.25rem}.tw-w-full{width:100%}.tw-cursor-pointer{cursor:pointer}.tw-flex-col{flex-direction:column}.tw-flex-wrap{flex-wrap:wrap}.tw-place-items-center{place-items:center}.tw-items-center{align-items:center}.tw-items-baseline{align-items:baseline}.tw-justify-between{justify-content:space-between}.tw-overflow-hidden{overflow:hidden}.tw-rounded-md{border-radius:.375rem}.tw-rounded-lg{border-radius:.5rem}.tw-rounded{border-radius:.25rem}.tw-rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.tw-border-2{border-width:2px}.tw-border{border-width:1px}.tw-border-l-8{border-left-width:8px}.tw-border-t-0\.5{border-top-width:.5px}.tw-border-r-0\.5{border-right-width:.5px}.tw-border-b-0\.5{border-bottom-width:.5px}.tw-border-t-0{border-top-width:0}.tw-border-r-0{border-right-width:0}.tw-border-b-0{border-bottom-width:0}.tw-border-b-2{border-bottom-width:2px}.tw-border-b{border-bottom-width:1px}.tw-border-solid{border-style:solid}.tw-border-current{border-color:currentColor}.tw-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.tw-border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.tw-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.tw-bg-current{background-color:currentColor}.\!tw-p-0{padding:0!important}.tw-p-3{padding:.75rem}.tw-py-4{padding-bottom:1rem;padding-top:1rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-bottom:.5rem;padding-top:.5rem}.tw-pl-20{padding-left:5rem}.tw-pr-2{padding-right:.5rem}.tw-pr-1{padding-right:.25rem}.tw-pl-2{padding-left:.5rem}.tw-text-left{text-align:left}.tw-text-xl{font-size:1.25rem;line-height:1.75rem}.tw-text-base{font-size:1rem;line-height:1.5rem}.tw-text-sm{font-size:.875rem;line-height:1.25rem}.tw-font-bold{font-weight:700}.tw-font-semibold{font-weight:600}.tw-font-normal{font-weight:400}.tw-capitalize{text-transform:capitalize}.tw-leading-7{line-height:1.75rem}.tw-leading-5{line-height:1.25rem}.tw-leading-normal{line-height:1.5}.tw-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.tw-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.tw-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.tw-text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.tw-text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.tw-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.tw-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.tw-no-underline{-webkit-text-decoration-line:none;text-decoration-line:none}.tw-opacity-80{opacity:.8}.tw-opacity-90{opacity:.9}.tw-shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visited\:tw-text-gray-400:visited{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.visited\:tw-text-red-600:visited{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.visited\:tw-text-blue-900:visited{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.hover\:tw-bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.hover\:tw-text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.hover\:tw-opacity-100:hover{opacity:1}.hover\:tw-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgb(0 0 0/0.1),0 8px 10px -6px rgb(0 0 0/0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tw-dark .dark\:tw-border-dark-gray-200{--tw-border-opacity:1;border-color:rgb(62 68 76/var(--tw-border-opacity))}.tw-dark .dark\:tw-bg-dark-gray-300{--tw-bg-opacity:1;background-color:rgb(53 58 65/var(--tw-bg-opacity))}.tw-dark .dark\:tw-text-dark-white-100{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.tw-dark .dark\:tw-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.tw-dark .dark\:visited\:tw-text-dark-white-100:visited{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}@media (min-width:576px){.sm\:tw-w-1\/2{width:50%}}@media (min-width:992px){.lg\:tw-w-1\/4{width:25%}} +/*! tailwindcss v3.0.15 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family: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;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246/0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.tw-relative{position:relative}.tw-z-50{z-index:50}.tw-float-right{float:right}.tw-mx-10{margin-left:2.5rem;margin-right:2.5rem}.tw-mr-1{margin-right:.25rem}.tw-mt-2{margin-top:.5rem}.tw-mt-1{margin-top:.25rem}.tw-mr-0\.5{margin-right:.125rem}.tw-mr-0{margin-right:0}.tw-mr-3{margin-right:.75rem}.tw-ml-2{margin-left:.5rem}.tw-mr-2{margin-right:.5rem}.tw-ml-auto{margin-left:auto}.tw-ml-3{margin-left:.75rem}.tw-mb-0{margin-bottom:0}.tw-mb-2{margin-bottom:.5rem}.tw-mt-5{margin-top:1.25rem}.tw-block{display:block}.tw-inline-block{display:inline-block}.tw-flex{display:flex}.tw-inline-flex{display:inline-flex}.tw-table{display:table}.tw-grid{display:grid}.tw-hidden{display:none}.tw-h-1{height:.25rem}.\!tw-w-auto{width:auto!important}.tw-w-full{width:100%}.tw-flex-grow{flex-grow:1}.tw-cursor-pointer{cursor:pointer}.tw-flex-col{flex-direction:column}.tw-flex-wrap{flex-wrap:wrap}.tw-place-items-center{place-items:center}.tw-items-center{align-items:center}.tw-items-baseline{align-items:baseline}.tw-justify-between{justify-content:space-between}.tw-overflow-hidden{overflow:hidden}.tw-rounded-md{border-radius:.375rem}.tw-rounded{border-radius:.25rem}.tw-rounded-lg{border-radius:.5rem}.tw-rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.tw-border{border-width:1px}.tw-border-2{border-width:2px}.tw-border-l-8{border-left-width:8px}.tw-border-t-0\.5{border-top-width:.5px}.tw-border-r-0\.5{border-right-width:.5px}.tw-border-b-0\.5{border-bottom-width:.5px}.tw-border-t-0{border-top-width:0}.tw-border-r-0{border-right-width:0}.tw-border-b-0{border-bottom-width:0}.tw-border-b{border-bottom-width:1px}.tw-border-b-2{border-bottom-width:2px}.tw-border-solid{border-style:solid}.tw-border-current{border-color:currentColor}.tw-border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.tw-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.tw-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.tw-bg-current{background-color:currentColor}.\!tw-p-0{padding:0!important}.tw-p-3{padding:.75rem}.tw-py-4{padding-bottom:1rem;padding-top:1rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-bottom:.5rem;padding-top:.5rem}.tw-pl-20{padding-left:5rem}.tw-pr-2{padding-right:.5rem}.tw-pr-1{padding-right:.25rem}.tw-pl-2{padding-left:.5rem}.tw-text-left{text-align:left}.tw-text-xl{font-size:1.25rem;line-height:1.75rem}.tw-text-base{font-size:1rem;line-height:1.5rem}.tw-text-sm{font-size:.875rem;line-height:1.25rem}.tw-font-semibold{font-weight:600}.tw-font-bold{font-weight:700}.tw-font-normal{font-weight:400}.tw-capitalize{text-transform:capitalize}.tw-leading-7{line-height:1.75rem}.tw-leading-5{line-height:1.25rem}.tw-leading-normal{line-height:1.5}.tw-text-emerald-600{--tw-text-opacity:1;color:rgb(5 150 105/var(--tw-text-opacity))}.tw-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.tw-text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity))}.tw-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.tw-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.tw-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.tw-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.tw-no-underline{-webkit-text-decoration-line:none;text-decoration-line:none}.tw-opacity-80{opacity:.8}.tw-opacity-90{opacity:.9}.tw-shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visited\:tw-text-gray-400:visited{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.visited\:tw-text-red-600:visited{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.visited\:tw-text-blue-900:visited{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.hover\:tw-bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.hover\:tw-text-gray-100:hover{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.hover\:tw-opacity-100:hover{opacity:1}.hover\:tw-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgb(0 0 0/0.1),0 8px 10px -6px rgb(0 0 0/0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tw-dark .dark\:tw-border-dark-gray-200{--tw-border-opacity:1;border-color:rgb(62 68 76/var(--tw-border-opacity))}.tw-dark .dark\:tw-bg-dark-gray-300{--tw-bg-opacity:1;background-color:rgb(53 58 65/var(--tw-bg-opacity))}.tw-dark .dark\:tw-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.tw-dark .dark\:tw-text-dark-white-100,.tw-dark .dark\:visited\:tw-text-dark-white-100:visited{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}@media (min-width:576px){.sm\:tw-w-1\/2{width:50%}}@media (min-width:992px){.lg\:tw-w-1\/4{width:25%}} diff --git a/html/js/app.js b/html/js/app.js index efed494f5a..7b36e05872 100644 --- a/html/js/app.js +++ b/html/js/app.js @@ -1 +1 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[773],{5377:(t,e,a)=>{"use strict";var n=a(538),s=a(7152);n.Z.use(s.Z);var i=new s.Z({locale:document.querySelector("html").getAttribute("lang"),fallbackLocale:"en",silentFallbackWarn:!0,silentTranslationWarn:!0,messages:window.vuei18nLocales}),o=a(9010),r=a.n(o),l=a(1542),u=a(9938),c=a.n(u),d=a(7907),p=a.n(d),v=a(9283),m=a(7611),f=a.n(m);a(9147),window.Vue=a(538).Z;var h=a(5642);h.keys().map((function(t){return Vue.component(t.split("/").pop().split(".")[0],h(t).default)})),Vue.use(r()),Vue.use(l.ZP),Vue.component("v-select",c()),Vue.component("multiselect",p()),Vue.use(v.ZP),Vue.use(f()),Vue.filter("ucfirst",(function(t){return t?(t=t.toString()).charAt(0).toUpperCase()+t.slice(1):""}));new Vue({el:"#app",i18n:i})},9147:(t,e,a)=>{window._=a(6486);try{window.Popper=a(8981).Z}catch(t){}window.axios=a(9669),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var n=document.head.querySelector('meta[name="csrf-token"]');n?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=n.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token"),a(7097)},6832:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".accordion-item-trigger-icon[data-v-16b90b68]{transition:transform .2s ease}.accordion-item-trigger.collapsed .accordion-item-trigger-icon[data-v-16b90b68]{transform:rotate(-90deg)}",""]);const i=s},7612:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".disable-events[data-v-d23a875a]{pointer-events:none}",""]);const i=s},1973:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,"#settings-search[data-v-c1efd320]{border-radius:4px}#settings-search[data-v-c1efd320]::-webkit-search-cancel-button{-webkit-appearance:searchfield-cancel-button}ul.settings-list[data-v-c1efd320]{list-style-type:none}",""]);const i=s},3594:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".tab-content{width:100%}",""]);const i=s},3485:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".setting-container[data-v-5ab9fce1]{margin-bottom:10px}",""]);const i=s},5319:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".input-group[data-v-588cd6c1]{margin-bottom:3px}.input-group-addon[data-v-588cd6c1]:not(.disabled){cursor:move}",""]);const i=s},514:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".input-group[data-v-dcc80002]{margin-bottom:3px}.input-group-addon[data-v-dcc80002]:not(.disabled){cursor:move}",""]);const i=s},3278:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".form-control[data-v-66aaec8d]{padding-right:12px}",""]);const i=s},5544:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".form-control[data-v-72c868aa]{padding-right:12px}",""]);const i=s},9308:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".input-group[data-v-f290b6f6]{padding-bottom:3px}",""]);const i=s},7873:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,"div[data-v-f45258b0]{color:red}",""]);const i=s},6634:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".expandable[data-v-915dcab0]{height:30px;padding:5px}.buttons[data-v-915dcab0]{padding:0 5px;white-space:nowrap}.new-btn-div[data-v-915dcab0]{margin-bottom:5px}.panel-body[data-v-915dcab0]{padding:5px 0}",""]);const i=s},3938:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".authlevel[data-v-b51be698]{font-size:18px;text-align:left}.fa-minus-circle[data-v-b51be698]{cursor:pointer}.snmp3-add-button[data-v-b51be698]{margin-top:5px}",""]);const i=s},6682:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".panel.with-nav-tabs .panel-heading[data-v-2ac3a533]{padding:5px 5px 0}.panel.with-nav-tabs .nav-tabs[data-v-2ac3a533]{border-bottom:none}.panel.with-nav-tabs .nav-justified[data-v-2ac3a533]{margin-bottom:-1px}.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:hover{color:#777}.with-nav-tabs.panel-default .nav-tabs>.open>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>.open>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>.open>a[data-v-2ac3a533]:hover,.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:hover{background-color:#ddd;border-color:transparent;color:#777}.with-nav-tabs.panel-default .nav-tabs>li.active>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>li.active>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li.active>a[data-v-2ac3a533]:hover{background-color:#fff;border-color:#ddd #ddd transparent;color:#555}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu[data-v-2ac3a533]{background-color:#f5f5f5;border-color:#ddd}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>li>a[data-v-2ac3a533]{color:#777}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>li>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>li>a[data-v-2ac3a533]:hover{background-color:#ddd}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>.active>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>.active>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>.active>a[data-v-2ac3a533]:hover{background-color:#555;color:#fff}",""]);const i=s},1615:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".enter-active[data-v-54390bb4],.leave-active[data-v-54390bb4]{overflow:hidden;transition:height .2s linear}",""]);const i=s},4347:()=>{},3848:()=>{},4304:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"Accordion",props:{multiple:{type:Boolean,default:!1}},methods:{setActive:function(t){this.$children.forEach((function(e){e.slug()===t&&(e.isActive=!0)}))},activeChanged:function(t){this.multiple||this.$children.forEach((function(e){e.slug()!==t&&(e.isActive=!1)}))}},mounted:function(){this.$on("expanded",this.activeChanged)}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"panel-group",attrs:{role:"tablist"}},[t._t("default")],2)}),[],!1,null,"11dcbcb8",null).exports},1217:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"AccordionItem",props:{name:{type:String,required:!0},text:String,active:Boolean,icon:String},data:function(){return{isActive:this.active}},mounted:function(){window.location.hash===this.hash()&&(this.isActive=!0)},watch:{active:function(t){this.isActive=t},isActive:function(t){this.$parent.$emit(t?"expanded":"collapsed",this.slug())}},methods:{slug:function(){return this.name.toString().toLowerCase().replace(/\s+/g,"-")},hash:function(){return"#"+this.slug()}}};var s=a(3379),i=a.n(s),o=a(6832),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading",attrs:{role:"tab",id:t.slug()}},[a("h4",{staticClass:"panel-title"},[a("a",{staticClass:"accordion-item-trigger",class:{collapsed:!t.isActive},attrs:{role:"button","data-parent":"#accordion","data-href":t.hash()},on:{click:function(e){t.isActive=!t.isActive}}},[a("i",{staticClass:"fa fa-chevron-down accordion-item-trigger-icon"}),t._v(" "),t.icon?a("i",{class:["fa","fa-fw",t.icon]}):t._e(),t._v("\n "+t._s(t.text||t.name)+"\n ")])])]),t._v(" "),a("transition-collapse-height",[t.isActive?a("div",{class:["panel-collapse","collapse",{in:t.isActive}],attrs:{id:t.slug()+"-content",role:"tabpanel"}},[a("div",{staticClass:"panel-body"},[t._t("default")],2)]):t._e()])],1)}),[],!1,null,"16b90b68",null).exports},9608:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"BaseSetting",props:{name:{type:String,required:!0},value:{required:!0},disabled:Boolean,required:Boolean,pattern:String,"update-status":String,options:{}}};const s=(0,a(1900).Z)(n,undefined,undefined,!1,null,null,null).exports},6784:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={mounted:function(){console.log("Component mounted.")}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)}),[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("div",{staticClass:"row justify-content-center"},[a("div",{staticClass:"col-md-8"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[t._v("Example Component")]),t._v(" "),a("div",{staticClass:"card-body"},[t._v("\n I'm an example component.\n ")])])])])])}],!1,null,null,null).exports},3460:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>u});const n={name:"LibrenmsSetting",props:{setting:{type:Object,required:!0},prefix:{type:String,default:"settings"},id:{required:!1}},data:function(){return{value:this.setting.value,updateStatus:"none",feedback:""}},methods:{persistValue:function(t){var e=this;this.updateStatus="pending",axios.put(route(this.prefix+".update",this.getRouteParams()),{value:t}).then((function(t){e.value=t.data.value,e.$emit("setting-updated",{name:e.setting.name,value:e.value}),e.updateStatus="success",e.feedback="has-success",setTimeout((function(){return e.feedback=""}),3e3)})).catch((function(t){e.feedback="has-error",e.updateStatus="error",toastr.error(t.response.data.message);["text","email","password"].includes(e.setting.type)||(e.value=t.response.data.value,e.$emit("setting-updated",{name:e.setting.name,value:e.value}),setTimeout((function(){return e.feedback=""}),3e3))}))},debouncePersistValue:_.debounce((function(t){this.persistValue(t)}),500),changeValue:function(t){["select","boolean","multiple"].includes(this.setting.type)?this.persistValue(t):this.debouncePersistValue(t),this.value=t},getUnits:function(){var t=this.prefix+".units."+this.setting.units;return this.$te(t)?this.$t(t):this.setting.units},getDescription:function(){var t=this.prefix+".settings."+this.setting.name+".description";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)?this.$t(t):this.setting.name},getHelp:function(){var t=this.$t(this.prefix+".settings."+this.setting.name+".help");return this.setting.overridden&&(t+="

"+this.$t(this.prefix+".readonly")),t},hasHelp:function(){var t=this.prefix+".settings."+this.setting.name+".help";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)},resetToDefault:function(){var t=this;axios.delete(route(this.prefix+".destroy",this.getRouteParams())).then((function(e){t.value=e.data.value,t.feedback="has-success",setTimeout((function(){return t.feedback=""}),3e3)})).catch((function(e){t.feedback="has-error",setTimeout((function(){return t.feedback=""}),3e3),toastr.error(e.response.data.message)}))},resetToInitial:function(){this.changeValue(this.setting.value)},showResetToDefault:function(){return!this.setting.overridden&&!_.isEqual(this.value,this.setting.default)},showUndo:function(){return!_.isEqual(this.setting.value,this.value)},getRouteParams:function(){var t=[this.setting.name];return this.id&&t.unshift(this.id),t},getComponent:function(){var t="Setting"+this.setting.type.toString().replace(/(-[a-z]|^[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}));return void 0!==Vue.options.components[t]?t:"SettingNull"}}},s=n;var i=a(3379),o=a.n(i),r=a(7612),l={insert:"head",singleton:!1};o()(r.Z,l);r.Z.locals;const u=(0,a(1900).Z)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{class:["form-group","has-feedback",t.setting.class,t.feedback]},[a("label",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.setting.name},expression:"{ content: setting.name }"}],staticClass:"col-sm-5 control-label",attrs:{for:t.setting.name}},[t._v("\n "+t._s(t.getDescription())+"\n "),t.setting.units?a("span",[t._v("("+t._s(t.getUnits())+")")]):t._e()]),t._v(" "),a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:!!t.setting.disabled&&t.$t(this.prefix+".readonly")},expression:"{ content: setting.disabled ? $t(this.prefix + '.readonly') : false }"}],staticClass:"col-sm-5"},[a(t.getComponent(),{tag:"component",attrs:{value:t.value,name:t.setting.name,pattern:t.setting.pattern,disabled:t.setting.overridden,required:t.setting.required,options:t.setting.options,"update-status":t.updateStatus},on:{input:function(e){return t.changeValue(e)},change:function(e){return t.changeValue(e)}}}),t._v(" "),a("span",{staticClass:"form-control-feedback"})],1),t._v(" "),a("div",{staticClass:"col-sm-2"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.$t("Reset to default")},expression:"{ content: $t('Reset to default') }"}],staticClass:"btn btn-default",class:{"disable-events":!t.showResetToDefault()},style:{opacity:t.showResetToDefault()?1:0},attrs:{type:"button"},on:{click:t.resetToDefault}},[a("i",{staticClass:"fa fa-refresh"})]),t._v(" "),a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.$t("Undo")},expression:"{ content: $t('Undo') }"}],staticClass:"btn btn-primary",class:{"disable-events":!t.showUndo()},style:{opacity:t.showUndo()?1:0},attrs:{type:"button"},on:{click:t.resetToInitial}},[a("i",{staticClass:"fa fa-undo"})]),t._v(" "),t.hasHelp()?a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.getHelp(),trigger:"hover click"},expression:"{content: getHelp(), trigger: 'hover click'}"}],staticClass:"fa fa-fw fa-lg fa-question-circle"}):t._e()])])}),[],!1,null,"d23a875a",null).exports},2872:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>c});function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var n,s,i=[],o=!0,r=!1;try{for(a=a.call(t);!(o=(n=a.next()).done)&&(i.push(n.value),!e||i.length!==e);o=!0);}catch(t){r=!0,s=t}finally{try{o||null==a.return||a.return()}finally{if(r)throw s}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return s(t,e)}(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.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a{"use strict";a.r(e),a.d(e,{default:()=>c});const n={name:"PollerSettings",props:{pollers:Object,settings:Object},data:function(){return{advanced:!1}}};var s=a(3379),i=a.n(s),o=a(3594),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;var l=a(3485),u={insert:"head",singleton:!1};i()(l.Z,u);l.Z.locals;const c=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading"},[a("h3",{staticClass:"panel-title"},[t._v("\n "+t._s(t.$t("Poller Settings"))+"\n "),a("span",{staticClass:"pull-right"},[t._v("Advanced "),a("toggle-button",{model:{value:t.advanced,callback:function(e){t.advanced=e},expression:"advanced"}})],1)])]),t._v(" "),a("div",{staticClass:"panel-body"},[a("vue-tabs",{attrs:{direction:"vertical",type:"pills"}},t._l(t.pollers,(function(e,n){return a("v-tab",{key:n,attrs:{title:e.poller_name}},t._l(t.settings[n],(function(n){return!n.advanced||t.advanced?a("div",{key:n.name,staticClass:"setting-container clearfix"},[a("librenms-setting",{attrs:{prefix:"poller.settings",setting:n,id:e.id}})],1):t._e()})),0)})),1)],1)])}),[],!1,null,"5ab9fce1",null).exports},3334:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>d});var n=a(9608),s=a(9980),i=a.n(s);const o={name:"SettingArray",mixins:[n.default],components:{draggable:i()},data:function(){var t;return{localList:null!==(t=this.value)&&void 0!==t?t:[],newItem:""}},methods:{addItem:function(){this.disabled||(this.localList.push(this.newItem),this.$emit("input",this.localList),this.newItem="")},removeItem:function(t){this.disabled||(this.localList.splice(t,1),this.$emit("input",this.localList))},updateItem:function(t,e){this.disabled||this.localList[t]===e||(this.localList[t]=e,this.$emit("input",this.localList))},dragged:function(){this.disabled||this.$emit("input",this.localList)}},watch:{value:function(t){this.localList=t}}};var r=a(3379),l=a.n(r),u=a(5319),c={insert:"head",singleton:!1};l()(u.Z,c);u.Z.locals;const d=(0,a(1900).Z)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}]},[a("draggable",{attrs:{disabled:t.disabled},on:{end:function(e){return t.dragged()}},model:{value:t.localList,callback:function(e){t.localList=e},expression:"localList"}},t._l(t.localList,(function(e,n){return a("div",{staticClass:"input-group"},[a("span",{class:["input-group-addon",t.disabled?"disabled":""]},[t._v(t._s(n+1)+".")]),t._v(" "),a("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:e},on:{blur:function(e){return t.updateItem(n,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateItem(n,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[t.disabled?t._e():a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeItem(n)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])])})),0),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem,expression:"newItem"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newItem},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addItem.apply(null,arguments)},input:function(e){e.target.composing||(t.newItem=e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addItem}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])],1)}),[],!1,null,"588cd6c1",null).exports},2421:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingArraySubKeyed",mixins:[a(9608).default],data:function(){var t;return{localList:null!==(t=this.value)&&void 0!==t?t:new Object,newSubItemKey:{},newSubItemValue:{},newSubArray:""}},methods:{addSubItem:function(t){if(!this.disabled){var e={};e[this.newSubItemKey[t]]=this.newSubItemValue[t],0===Object.keys(this.localList[t]).length&&(this.localList[t]=new Object),Object.assign(this.localList[t],e),this.$emit("input",this.localList),this.newSubItemValue[t]="",this.newSubItemKey[t]=""}},removeSubItem:function(t,e){this.disabled||(delete this.localList[t][e],0===Object.keys(this.localList[t]).length&&delete this.localList[t],this.$emit("input",this.localList))},updateSubItem:function(t,e,a){this.disabled||this.localList[t][e]===a||(this.localList[t][e]=a,this.$emit("input",this.localList))},addSubArray:function(){this.disabled||(this.localList[this.newSubArray]=new Object,this.$emit("input",this.localList),this.newSubArray="")}},watch:{value:function(t){this.localList=t}}};var s=a(3379),i=a.n(s),o=a(514),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}]},[t._l(t.localList,(function(e,n){return a("div",[a("b",[t._v(t._s(n))]),t._v(" "),t._l(e,(function(e,s){return a("div",{staticClass:"input-group"},[a("span",{class:["input-group-addon",t.disabled?"disabled":""]},[t._v(t._s(s))]),t._v(" "),a("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:e},on:{blur:function(e){return t.updateSubItem(n,s,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateSubItem(n,s,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[t.disabled?t._e():a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeSubItem(n,s)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])])})),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-4"},[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newSubItemKey[n],expression:"newSubItemKey[index]"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Key"},domProps:{value:t.newSubItemKey[n]},on:{input:function(e){e.target.composing||t.$set(t.newSubItemKey,n,e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"col-lg-8"},[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newSubItemValue[n],expression:"newSubItemValue[index]"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Value"},domProps:{value:t.newSubItemValue[n]},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addSubItem(n)},input:function(e){e.target.composing||t.$set(t.newSubItemValue,n,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.addSubItem(n)}}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])])]),t._v(" "),a("hr")],2)})),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newSubArray,expression:"newSubArray"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newSubArray},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addSubArray.apply(null,arguments)},input:function(e){e.target.composing||(t.newSubArray=e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addSubArray}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])],2)}),[],!1,null,"dcc80002",null).exports},3554:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingBoolean",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("toggle-button",{attrs:{name:t.name,value:t.value,sync:!0,required:t.required,disabled:t.disabled},on:{change:function(e){return t.$emit("change",e.value)}}})}),[],!1,null,"ab7ed6ee",null).exports},573:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingDirectory",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"text",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"a44ee658",null).exports},543:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingEmail",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"email",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"62ce370c",null).exports},9844:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingExecutable",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"text",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"a93fcd56",null).exports},4517:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingFloat",mixins:[a(9608).default],methods:{parseNumber:function(t){var e=parseFloat(t);return isNaN(e)?t:e}}};var s=a(3379),i=a.n(s),o=a(3278),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"number",name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){t.$emit("input",t.parseNumber(e.target.value))}}})}),[],!1,null,"66aaec8d",null).exports},1707:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingInteger",mixins:[a(9608).default],methods:{parseNumber:function(t){var e=parseFloat(t);return isNaN(e)?t:e}}};var s=a(3379),i=a.n(s),o=a(5544),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"number",name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){t.$emit("input",t.parseNumber(e.target.value))}}})}),[],!1,null,"72c868aa",null).exports},7561:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingLdapGroups",mixins:[a(9608).default],data:function(){return{localList:Array.isArray(this.value)?{}:this.value,newItem:"",newItemLevel:1,lock:!1}},methods:{addItem:function(){this.$set(this.localList,this.newItem,{level:this.newItemLevel}),this.newItem="",this.newItemLevel=1},removeItem:function(t){this.$delete(this.localList,t)},updateItem:function(t,e){var a=this;this.localList=Object.keys(this.localList).reduce((function(n,s){return n[s===t?e:s]=a.localList[s],n}),{})},updateLevel:function(t,e){this.$set(this.localList,t,{level:e})}},watch:{localList:function(){this.lock?this.lock=!1:this.$emit("input",this.localList)},value:function(){this.lock=!0,this.localList=Array.isArray(this.value)?{}:this.value}}};var s=a(3379),i=a.n(s),o=a(9308),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}],staticClass:"form-inline"},[t._l(t.localList,(function(e,n){return a("div",{staticClass:"input-group"},[a("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:n},on:{blur:function(e){return t.updateItem(n,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateItem(n,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn",staticStyle:{width:"0"}}),t._v(" "),a("select",{staticClass:"form-control",on:{change:function(e){return t.updateLevel(n,e.target.value)}}},[a("option",{attrs:{value:"1"},domProps:{selected:1===e.level}},[t._v(t._s(t.$t("Normal")))]),t._v(" "),a("option",{attrs:{value:"5"},domProps:{selected:5===e.level}},[t._v(t._s(t.$t("Global Read")))]),t._v(" "),a("option",{attrs:{value:"10"},domProps:{selected:10===e.level}},[t._v(t._s(t.$t("Admin")))])]),t._v(" "),a("span",{staticClass:"input-group-btn"},[t.disabled?t._e():a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeItem(n)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])])})),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem,expression:"newItem"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newItem},on:{input:function(e){e.target.composing||(t.newItem=e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn",staticStyle:{width:"0"}}),t._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:t.newItemLevel,expression:"newItemLevel"}],staticClass:"form-control",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.newItemLevel=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("Normal")))]),t._v(" "),a("option",{attrs:{value:"5"}},[t._v(t._s(t.$t("Global Read")))]),t._v(" "),a("option",{attrs:{value:"10"}},[t._v(t._s(t.$t("Admin")))])]),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addItem}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])],2)}),[],!1,null,"f290b6f6",null).exports},7732:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var n,s,i=[],o=!0,r=!1;try{for(a=a.call(t);!(o=(n=a.next()).done)&&(i.push(n.value),!e||i.length!==e);o=!0);}catch(t){r=!0,s=t}finally{try{o||null==a.return||a.return()}finally{if(r)throw s}}return i}(t,e)||i(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.")}()}function s(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingNull",props:["name"]};var s=a(3379),i=a.n(s),o=a(7873),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",[t._v("Invalid type for: "+t._s(t.name))])}),[],!1,null,"f45258b0",null).exports},4088:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingOxidizedMaps",mixins:[a(9608).default],data:function(){return{mapModalIndex:null,mapModalSource:null,mapModalMatchType:null,mapModalMatchValue:null,mapModalTarget:null,mapModalReplacement:null}},methods:{showModal:function(t){this.fillForm(t),this.$modal.show("maps")},submitModal:function(){var t=this.maps,e={target:this.mapModalTarget,source:this.mapModalSource,matchType:this.mapModalMatchType,matchValue:this.mapModalMatchValue,replacement:this.mapModalReplacement};this.mapModalIndex?t[this.mapModalIndex]=e:t.push(e),console.log(t,e),this.updateValue(t)},fillForm:function(t){var e=this.maps.hasOwnProperty(t);this.mapModalIndex=t,this.mapModalSource=e?this.maps[t].source:null,this.mapModalMatchType=e?this.maps[t].matchType:null,this.mapModalMatchValue=e?this.maps[t].matchValue:null,this.mapModalTarget=e?this.maps[t].target:null,this.mapModalReplacement=e?this.maps[t].replacement:null},deleteItem:function(t){var e=this.maps;e.splice(t,1),this.updateValue(e)},updateValue:function(t){var e={};t.forEach((function(t){void 0===e[t.target]&&(e[t.target]={}),void 0===e[t.target][t.source]&&(e[t.target][t.source]=[]);var a={};a[t.matchType]=t.matchValue,a.value=t.replacement,e[t.target][t.source].push(a)})),this.$emit("input",e)},formatSource:function(t,e){return e.hasOwnProperty("regex")?t+" ~ "+e.regex:e.hasOwnProperty("match")?t+" = "+e.match:"invalid"},formatTarget:function(t,e){return t+" > "+(e.hasOwnProperty("value")?e.value:e[t])}},watch:{updateStatus:function(){"success"===this.updateStatus&&this.$modal.hide("maps")}},computed:{maps:function(){var t=this,e=[];return Object.keys(this.value).forEach((function(a){Object.keys(t.value[a]).forEach((function(n){t.value[a][n].forEach((function(t){var s=t.hasOwnProperty("regex")?"regex":"match";e.push({target:a,source:n,matchType:s,matchValue:t[s],replacement:t.hasOwnProperty("value")?t.value:t[a]})}))}))})),e}}};var s=a(3379),i=a.n(s),o=a(6634),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{directives:[{name:"show",rawName:"v-show",value:!t.disabled,expression:"! disabled"}],staticClass:"new-btn-div"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.showModal(null)}}},[a("i",{staticClass:"fa fa-plus"}),t._v(" "+t._s(t.$t("New Map Rule")))])]),t._v(" "),t._l(t.maps,(function(e,n){return a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-body"},[a("div",{staticClass:"col-md-5 expandable"},[a("span",[t._v(t._s(e.source)+" "+t._s("regex"===e.matchType?"~":"=")+" "+t._s(e.matchValue))])]),t._v(" "),a("div",{staticClass:"col-md-4 expandable"},[a("span",[t._v(t._s(e.target)+" < "+t._s(e.replacement))])]),t._v(" "),a("div",{staticClass:"col-md-3 buttons"},[a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}],staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("Edit"),expression:"$t('Edit')"}],staticClass:"btn btn-sm btn-info",attrs:{type:"button",disabled:t.disabled},on:{click:function(e){return t.showModal(n)}}},[a("i",{staticClass:"fa fa-lg fa-edit"})]),t._v(" "),a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("Delete"),expression:"$t('Delete')"}],staticClass:"btn btn-sm btn-danger",attrs:{type:"button",disabled:t.disabled},on:{click:function(e){return t.deleteItem(n)}}},[a("i",{staticClass:"fa fa-lg fa-remove"})])])])])])})),t._v(" "),a("modal",{attrs:{name:"maps",height:"auto"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("button",{staticClass:"close",attrs:{type:"button"},on:{click:function(e){return t.$modal.hide("maps")}}},[a("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])]),t._v(" "),a("h4",{staticClass:"modal-title"},[t._v(t._s(t.mapModalIndex?t.$t("Edit Map Rule"):t.$t("New Map Rule")))])]),t._v(" "),a("div",{staticClass:"modal-body"},[a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4 control-label",attrs:{for:"source"}},[t._v("Source")]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.mapModalSource,expression:"mapModalSource"}],staticClass:"form-control",attrs:{id:"source"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.mapModalSource=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"hostname"}},[t._v("hostname")]),t._v(" "),a("option",{attrs:{value:"os"}},[t._v("os")]),t._v(" "),a("option",{attrs:{value:"type"}},[t._v("type")]),t._v(" "),a("option",{attrs:{value:"hardware"}},[t._v("hardware")]),t._v(" "),a("option",{attrs:{value:"sysObjectID"}},[t._v("sysObjectID")]),t._v(" "),a("option",{attrs:{value:"sysName"}},[t._v("sysName")]),t._v(" "),a("option",{attrs:{value:"sysDescr"}},[t._v("sysDescr")]),t._v(" "),a("option",{attrs:{value:"location"}},[t._v("location")]),t._v(" "),a("option",{attrs:{value:"ip"}},[t._v("ip")])])])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4",attrs:{for:"match_value"}},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.mapModalMatchType,expression:"mapModalMatchType"}],staticClass:"form-control",attrs:{id:"match_type"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.mapModalMatchType=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"match"}},[t._v("Match (=)")]),t._v(" "),a("option",{attrs:{value:"regex"}},[t._v("Regex (~)")])])]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.mapModalMatchValue,expression:"mapModalMatchValue"}],staticClass:"form-control",attrs:{type:"text",id:"match_value",placeholder:""},domProps:{value:t.mapModalMatchValue},on:{input:function(e){e.target.composing||(t.mapModalMatchValue=e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form-horizontal",attrs:{role:"form"}},[a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4 control-label",attrs:{for:"target"}},[t._v("Target")]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.mapModalTarget,expression:"mapModalTarget"}],staticClass:"form-control",attrs:{id:"target"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.mapModalTarget=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"os"}},[t._v("os")]),t._v(" "),a("option",{attrs:{value:"group"}},[t._v("group")]),t._v(" "),a("option",{attrs:{value:"ip"}},[t._v("ip")])])])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4 control-label",attrs:{for:"value"}},[t._v("Replacement")]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.mapModalReplacement,expression:"mapModalReplacement"}],staticClass:"form-control",attrs:{type:"text",id:"value",placeholder:""},domProps:{value:t.mapModalReplacement},on:{input:function(e){e.target.composing||(t.mapModalReplacement=e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form-group"},[a("div",{staticClass:"col-sm-8 col-sm-offset-4"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.submitModal}},[t._v(t._s(t.$t("Submit")))])])])])])])])],2)}),[],!1,null,"915dcab0",null).exports},4809:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingPassword",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"password",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"452744d4",null).exports},8269:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingSelect",mixins:[a(9608).default],methods:{getText:function(t,e){var a="settings.settings.".concat(t,".options.").concat(e);return this.$te(a)?this.$t(a):e}}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("select",{staticClass:"form-control",attrs:{name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}},t._l(t.options,(function(e,n){return a("option",{domProps:{value:n,selected:t.value===n,textContent:t._s(t.getText(t.name,e))}})})),0)}),[],!1,null,"a6c05438",null).exports},3484:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingSelectDynamic",mixins:[a(9608).default],data:function(){return{select2:null}},watch:{value:function(t){this.select2.val(t).trigger("change")}},computed:{settings:function(){return{theme:"bootstrap",dropdownAutoWidth:!0,width:"auto",allowClear:Boolean(this.options.allowClear),placeholder:this.options.placeholder,ajax:{url:route("ajax.select."+this.options.target).toString(),delay:250,data:this.options.callback}}}},mounted:function(){var t=this;axios.get(route("ajax.select."+this.options.target),{params:{id:this.value}}).then((function(e){e.data.results.forEach((function(e){e.id==t.value&&t.select2.append(new Option(e.text,e.id,!0,!0)).trigger("change")}))})),this.select2=$(this.$el).find("select").select2(this.settings).on("select2:select select2:unselect",(function(e){t.$emit("change",t.select2.val()),t.$emit("select",e.params.data)}))},beforeDestroy:function(){this.select2.select2("destroy")}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("select",{staticClass:"form-control",attrs:{name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value}})])}),[],!1,null,"b66d587a",null).exports},787:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingSnmp3auth",mixins:[a(9608).default],data:function(){return{localList:this.value,authAlgorithms:["MD5","AES"],cryptoAlgorithms:["AES","DES"]}},mounted:function(){var t=this;axios.get(route("snmp.capabilities")).then((function(e){t.authAlgorithms=e.data.auth,t.cryptoAlgorithms=e.data.crypto}))},methods:{addItem:function(){this.localList.push({authlevel:"noAuthNoPriv",authalgo:"MD5",authname:"",authpass:"",cryptoalgo:"AES",cryptopass:""}),this.$emit("input",this.localList)},removeItem:function(t){this.localList.splice(t,1),this.$emit("input",this.localList)},updateItem:function(t,e,a){this.localList[t][e]=a,this.$emit("input",this.localList)},dragged:function(){this.$emit("input",this.localList)}},watch:{value:function(t){this.localList=t}}};var s=a(3379),i=a.n(s),o=a(3938),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("draggable",{attrs:{disabled:t.disabled},on:{end:function(e){return t.dragged()}},model:{value:t.localList,callback:function(e){t.localList=e},expression:"localList"}},t._l(t.localList,(function(e,n){return a("div",[a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading"},[a("h3",{staticClass:"panel-title"},[t._v(t._s(n+1)+". "),t.disabled?t._e():a("span",{staticClass:"pull-right text-danger",on:{click:function(e){return t.removeItem(n)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])]),t._v(" "),a("div",{staticClass:"panel-body"},[a("form",{on:{onsubmit:function(t){t.preventDefault()}}},[a("div",{staticClass:"form-group"},[a("div",{staticClass:"col-sm-12"},[a("select",{directives:[{name:"model",rawName:"v-model",value:e.authlevel,expression:"item.authlevel"}],staticClass:"form-control",attrs:{id:"authlevel",disabled:t.disabled},on:{change:[function(a){var n=Array.prototype.filter.call(a.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"authlevel",a.target.multiple?n:n[0])},function(e){return t.updateItem(n,e.target.id,e.target.value)}]}},[a("option",{attrs:{value:"noAuthNoPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.noAuthNoPriv"))}}),t._v(" "),a("option",{attrs:{value:"authNoPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.authNoPriv"))}}),t._v(" "),a("option",{attrs:{value:"authPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.authPriv"))}})])])]),t._v(" "),a("fieldset",{directives:[{name:"show",rawName:"v-show",value:"auth"===e.authlevel.toString().substring(0,4),expression:"item.authlevel.toString().substring(0, 4) === 'auth'"}],attrs:{name:"algo",disabled:t.disabled}},[a("legend",{staticClass:"h4",domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.auth"))}}),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authalgo"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authalgo"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("select",{directives:[{name:"model",rawName:"v-model",value:e.authalgo,expression:"item.authalgo"}],staticClass:"form-control",attrs:{id:"authalgo",name:"authalgo"},on:{change:[function(a){var n=Array.prototype.filter.call(a.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"authalgo",a.target.multiple?n:n[0])},function(e){return t.updateItem(n,e.target.id,e.target.value)}]}},t._l(t.authAlgorithms,(function(e){return a("option",{domProps:{value:e,textContent:t._s(e)}})})),0)])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authname"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authname"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("input",{staticClass:"form-control",attrs:{type:"text",id:"authname"},domProps:{value:e.authname},on:{input:function(e){return t.updateItem(n,e.target.id,e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authpass"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authpass"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("input",{staticClass:"form-control",attrs:{type:"text",id:"authpass"},domProps:{value:e.authpass},on:{input:function(e){return t.updateItem(n,e.target.id,e.target.value)}}})])])]),t._v(" "),a("fieldset",{directives:[{name:"show",rawName:"v-show",value:"authPriv"===e.authlevel,expression:"item.authlevel === 'authPriv'"}],attrs:{name:"crypt",disabled:t.disabled}},[a("legend",{staticClass:"h4",domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.crypto"))}}),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"cryptoalgo"}},[t._v("Cryptoalgo")]),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("select",{directives:[{name:"model",rawName:"v-model",value:e.cryptoalgo,expression:"item.cryptoalgo"}],staticClass:"form-control",attrs:{id:"cryptoalgo"},on:{change:[function(a){var n=Array.prototype.filter.call(a.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"cryptoalgo",a.target.multiple?n:n[0])},function(e){return t.updateItem(n,e.target.id,e.target.value)}]}},t._l(t.cryptoAlgorithms,(function(e){return a("option",{domProps:{value:e,textContent:t._s(e)}})})),0)])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"cryptopass"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authpass"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("input",{staticClass:"form-control",attrs:{type:"text",id:"cryptopass"},domProps:{value:e.cryptopass},on:{input:function(e){return t.updateItem(n,e.target.id,e.target.value)}}})])])])])])])])})),0),t._v(" "),t.disabled?t._e():a("div",{staticClass:"row snmp3-add-button"},[a("div",{staticClass:"col-sm-12"},[a("button",{staticClass:"btn btn-primary",on:{click:function(e){return t.addItem()}}},[a("i",{staticClass:"fa fa-plus-circle"}),t._v(" "+t._s(t.$t("New")))])])])],1)}),[],!1,null,"b51be698",null).exports},9997:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingText",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"text",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"8426bf9c",null).exports},3653:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"Tab",props:{name:{required:!0},text:String,selected:{type:Boolean,default:!1},icon:String},data:function(){return{isActive:this.selected}}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"tab-pane",attrs:{role:"tabpanel",id:t.name}},[t._t("default")],2)}),[],!1,null,"1af9694b",null).exports},8872:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"Tabs",props:{selected:String},data:function(){return{tabs:[],activeTab:null}},created:function(){this.tabs=this.$children},mounted:function(){this.activeTab=this.selected},watch:{selected:function(t){this.activeTab=t},activeTab:function(t){this.tabs.forEach((function(e){return e.isActive=e.name===t})),this.$emit("tab-selected",t)}}};var s=a(3379),i=a.n(s),o=a(6682),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"panel with-nav-tabs panel-default"},[a("div",{staticClass:"panel-heading"},[a("ul",{staticClass:"nav nav-tabs",attrs:{role:"tablist"}},[t._l(t.tabs,(function(e){return a("li",{key:e.name,class:{active:e.isActive},attrs:{role:"presentation"}},[a("a",{attrs:{role:"tab","aria-controls":e.name},on:{click:function(a){t.activeTab=e.name}}},[e.icon?a("i",{class:["fa","fa-fw",e.icon]}):t._e(),t._v("\n "+t._s(e.text||e.name)+" \n ")])])})),t._v(" "),a("li",{staticClass:"pull-right"},[t._t("header")],2)],2)]),t._v(" "),a("div",{staticClass:"panel-body"},[t._t("default")],2)])])}),[],!1,null,"2ac3a533",null).exports},5606:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"TransitionCollapseHeight",methods:{beforeEnter:function(t){requestAnimationFrame((function(){t.style.height||(t.style.height="0px"),t.style.display=null}))},enter:function(t){requestAnimationFrame((function(){requestAnimationFrame((function(){t.style.height=t.scrollHeight+"px"}))}))},afterEnter:function(t){t.style.height=null},beforeLeave:function(t){requestAnimationFrame((function(){t.style.height||(t.style.height=t.offsetHeight+"px")}))},leave:function(t){requestAnimationFrame((function(){requestAnimationFrame((function(){t.style.height="0px"}))}))},afterLeave:function(t){t.style.height=null}}};var s=a(3379),i=a.n(s),o=a(1615),r={insert:"head",singleton:!1};i()(o.Z,r);o.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("transition",{attrs:{"enter-active-class":"enter-active","leave-active-class":"leave-active"},on:{"before-enter":t.beforeEnter,enter:t.enter,"after-enter":t.afterEnter,"before-leave":t.beforeLeave,leave:t.leave,"after-leave":t.afterLeave}},[t._t("default")],2)}),[],!1,null,"54390bb4",null).exports},5642:(t,e,a)=>{var n={"./components/Accordion.vue":4304,"./components/AccordionItem.vue":1217,"./components/BaseSetting.vue":9608,"./components/ExampleComponent.vue":6784,"./components/LibrenmsSetting.vue":3460,"./components/LibrenmsSettings.vue":2872,"./components/PollerSettings.vue":707,"./components/SettingArray.vue":3334,"./components/SettingArraySubKeyed.vue":2421,"./components/SettingBoolean.vue":3554,"./components/SettingDirectory.vue":573,"./components/SettingEmail.vue":543,"./components/SettingExecutable.vue":9844,"./components/SettingFloat.vue":4517,"./components/SettingInteger.vue":1707,"./components/SettingLdapGroups.vue":7561,"./components/SettingMultiple.vue":7732,"./components/SettingNull.vue":3493,"./components/SettingOxidizedMaps.vue":4088,"./components/SettingPassword.vue":4809,"./components/SettingSelect.vue":8269,"./components/SettingSelectDynamic.vue":3484,"./components/SettingSnmp3auth.vue":787,"./components/SettingText.vue":9997,"./components/Tab.vue":3653,"./components/Tabs.vue":8872,"./components/TransitionCollapseHeight.vue":5606};function s(t){var e=i(t);return a(e)}function i(t){if(!a.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}s.keys=function(){return Object.keys(n)},s.resolve=i,t.exports=s,s.id=5642}},t=>{var e=e=>t(t.s=e);t.O(0,[213,170,898],(()=>(e(5377),e(4347),e(3848))));t.O()}]); \ No newline at end of file +(self.webpackChunk=self.webpackChunk||[]).push([[773],{5377:(t,e,a)=>{"use strict";var n=a(538),s=a(7152);n.Z.use(s.Z);var i=new s.Z({locale:document.querySelector("html").getAttribute("lang"),fallbackLocale:"en",silentFallbackWarn:!0,silentTranslationWarn:!0,messages:window.vuei18nLocales}),r=a(9010),o=a.n(r),l=a(1542),u=a(9938),c=a.n(u),d=a(7907),p=a.n(d),v=a(9283),m=a(7611),f=a.n(m);a(9147),window.Vue=a(538).Z;var h=a(5642);h.keys().map((function(t){return Vue.component(t.split("/").pop().split(".")[0],h(t).default)})),Vue.use(o()),Vue.use(l.ZP),Vue.component("v-select",c()),Vue.component("multiselect",p()),Vue.use(v.ZP),Vue.use(f()),Vue.filter("ucfirst",(function(t){return t?(t=t.toString()).charAt(0).toUpperCase()+t.slice(1):""}));new Vue({el:"#app",i18n:i})},9147:(t,e,a)=>{window._=a(6486);try{window.Popper=a(8981).Z}catch(t){}window.axios=a(9669),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var n=document.head.querySelector('meta[name="csrf-token"]');n?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=n.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token"),a(7097)},6832:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".accordion-item-trigger-icon[data-v-16b90b68]{transition:transform .2s ease}.accordion-item-trigger.collapsed .accordion-item-trigger-icon[data-v-16b90b68]{transform:rotate(-90deg)}",""]);const i=s},1111:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".disable-events[data-v-abd58c08]{pointer-events:none}",""]);const i=s},1973:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,"#settings-search[data-v-c1efd320]{border-radius:4px}#settings-search[data-v-c1efd320]::-webkit-search-cancel-button{-webkit-appearance:searchfield-cancel-button}ul.settings-list[data-v-c1efd320]{list-style-type:none}",""]);const i=s},3594:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".tab-content{width:100%}",""]);const i=s},3485:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".setting-container[data-v-5ab9fce1]{margin-bottom:10px}",""]);const i=s},5319:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".input-group[data-v-588cd6c1]{margin-bottom:3px}.input-group-addon[data-v-588cd6c1]:not(.disabled){cursor:move}",""]);const i=s},514:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".input-group[data-v-dcc80002]{margin-bottom:3px}.input-group-addon[data-v-dcc80002]:not(.disabled){cursor:move}",""]);const i=s},3278:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".form-control[data-v-66aaec8d]{padding-right:12px}",""]);const i=s},698:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,"div[data-v-4c03d640] .select2-container{flex-grow:1}div[data-v-4c03d640] .select2-selection--multiple .select2-search--inline .select2-search__field{width:.75em!important}",""]);const i=s},5544:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".form-control[data-v-72c868aa]{padding-right:12px}",""]);const i=s},9308:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".input-group[data-v-f290b6f6]{padding-bottom:3px}",""]);const i=s},7873:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,"div[data-v-f45258b0]{color:red}",""]);const i=s},6634:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".expandable[data-v-915dcab0]{height:30px;padding:5px}.buttons[data-v-915dcab0]{padding:0 5px;white-space:nowrap}.new-btn-div[data-v-915dcab0]{margin-bottom:5px}.panel-body[data-v-915dcab0]{padding:5px 0}",""]);const i=s},3938:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".authlevel[data-v-b51be698]{font-size:18px;text-align:left}.fa-minus-circle[data-v-b51be698]{cursor:pointer}.snmp3-add-button[data-v-b51be698]{margin-top:5px}",""]);const i=s},6682:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".panel.with-nav-tabs .panel-heading[data-v-2ac3a533]{padding:5px 5px 0}.panel.with-nav-tabs .nav-tabs[data-v-2ac3a533]{border-bottom:none}.panel.with-nav-tabs .nav-justified[data-v-2ac3a533]{margin-bottom:-1px}.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:hover{color:#777}.with-nav-tabs.panel-default .nav-tabs>.open>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>.open>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>.open>a[data-v-2ac3a533]:hover,.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li>a[data-v-2ac3a533]:hover{background-color:#ddd;border-color:transparent;color:#777}.with-nav-tabs.panel-default .nav-tabs>li.active>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>li.active>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li.active>a[data-v-2ac3a533]:hover{background-color:#fff;border-color:#ddd #ddd transparent;color:#555}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu[data-v-2ac3a533]{background-color:#f5f5f5;border-color:#ddd}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>li>a[data-v-2ac3a533]{color:#777}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>li>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>li>a[data-v-2ac3a533]:hover{background-color:#ddd}.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>.active>a[data-v-2ac3a533],.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>.active>a[data-v-2ac3a533]:focus,.with-nav-tabs.panel-default .nav-tabs>li.dropdown .dropdown-menu>.active>a[data-v-2ac3a533]:hover{background-color:#555;color:#fff}",""]);const i=s},1615:(t,e,a)=>{"use strict";a.d(e,{Z:()=>i});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".enter-active[data-v-54390bb4],.leave-active[data-v-54390bb4]{overflow:hidden;transition:height .2s linear}",""]);const i=s},4347:()=>{},3848:()=>{},4304:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"Accordion",props:{multiple:{type:Boolean,default:!1}},methods:{setActive:function(t){this.$children.forEach((function(e){e.slug()===t&&(e.isActive=!0)}))},activeChanged:function(t){this.multiple||this.$children.forEach((function(e){e.slug()!==t&&(e.isActive=!1)}))}},mounted:function(){this.$on("expanded",this.activeChanged)}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"panel-group",attrs:{role:"tablist"}},[t._t("default")],2)}),[],!1,null,"11dcbcb8",null).exports},1217:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"AccordionItem",props:{name:{type:String,required:!0},text:String,active:Boolean,icon:String},data:function(){return{isActive:this.active}},mounted:function(){window.location.hash===this.hash()&&(this.isActive=!0)},watch:{active:function(t){this.isActive=t},isActive:function(t){this.$parent.$emit(t?"expanded":"collapsed",this.slug())}},methods:{slug:function(){return this.name.toString().toLowerCase().replace(/\s+/g,"-")},hash:function(){return"#"+this.slug()}}};var s=a(3379),i=a.n(s),r=a(6832),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading",attrs:{role:"tab",id:t.slug()}},[a("h4",{staticClass:"panel-title"},[a("a",{staticClass:"accordion-item-trigger",class:{collapsed:!t.isActive},attrs:{role:"button","data-parent":"#accordion","data-href":t.hash()},on:{click:function(e){t.isActive=!t.isActive}}},[a("i",{staticClass:"fa fa-chevron-down accordion-item-trigger-icon"}),t._v(" "),t.icon?a("i",{class:["fa","fa-fw",t.icon]}):t._e(),t._v("\n "+t._s(t.text||t.name)+"\n ")])])]),t._v(" "),a("transition-collapse-height",[t.isActive?a("div",{class:["panel-collapse","collapse",{in:t.isActive}],attrs:{id:t.slug()+"-content",role:"tabpanel"}},[a("div",{staticClass:"panel-body"},[t._t("default")],2)]):t._e()])],1)}),[],!1,null,"16b90b68",null).exports},9608:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"BaseSetting",props:{name:{type:String,required:!0},value:{required:!0},disabled:Boolean,required:Boolean,pattern:String,"update-status":String,options:{}}};const s=(0,a(1900).Z)(n,undefined,undefined,!1,null,null,null).exports},6784:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={mounted:function(){console.log("Component mounted.")}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)}),[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("div",{staticClass:"row justify-content-center"},[a("div",{staticClass:"col-md-8"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[t._v("Example Component")]),t._v(" "),a("div",{staticClass:"card-body"},[t._v("\n I'm an example component.\n ")])])])])])}],!1,null,null,null).exports},2636:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});function n(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return s(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a{"use strict";a.r(e),a.d(e,{default:()=>u});const n={name:"LibrenmsSetting",props:{setting:{type:Object,required:!0},prefix:{type:String,default:"settings"},id:{required:!1}},data:function(){return{value:this.setting.value,updateStatus:"none",feedback:""}},methods:{persistValue:function(t){var e=this;this.updateStatus="pending",axios.put(route(this.prefix+".update",this.getRouteParams()),{value:t}).then((function(t){e.value=t.data.value,e.$emit("setting-updated",{name:e.setting.name,value:e.value}),e.updateStatus="success",e.feedback="has-success",setTimeout((function(){return e.feedback=""}),3e3)})).catch((function(t){e.feedback="has-error",e.updateStatus="error",toastr.error(t.response.data.message);["text","email","password"].includes(e.setting.type)||(e.value=t.response.data.value,e.$emit("setting-updated",{name:e.setting.name,value:e.value}),setTimeout((function(){return e.feedback=""}),3e3))}))},debouncePersistValue:_.debounce((function(t){this.persistValue(t)}),500),changeValue:function(t){["select","boolean","multiple"].includes(this.setting.type)?this.persistValue(t):this.debouncePersistValue(t),this.value=t},getUnits:function(){var t=this.prefix+".units."+this.setting.units;return this.$te(t)?this.$t(t):this.setting.units},getDescription:function(){var t=this.prefix+".settings."+this.setting.name+".description";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)?this.$t(t):this.setting.name},getHelp:function(){var t=this.$t(this.prefix+".settings."+this.setting.name+".help");return this.setting.overridden&&(t+="

"+this.$t(this.prefix+".readonly")),t},hasHelp:function(){var t=this.prefix+".settings."+this.setting.name+".help";return this.$te(t)||this.$te(t,this.$i18n.fallbackLocale)},resetToDefault:function(){var t=this;axios.delete(route(this.prefix+".destroy",this.getRouteParams())).then((function(e){t.value=e.data.value,t.feedback="has-success",setTimeout((function(){return t.feedback=""}),3e3)})).catch((function(e){t.feedback="has-error",setTimeout((function(){return t.feedback=""}),3e3),toastr.error(e.response.data.message)}))},resetToInitial:function(){this.changeValue(this.setting.value)},showResetToDefault:function(){return!this.setting.overridden&&!_.isEqual(this.value,this.setting.default)},showUndo:function(){return!_.isEqual(this.setting.value,this.value)},getRouteParams:function(){var t=[this.setting.name];return this.id&&t.unshift(this.id),t},getComponent:function(){var t="Setting"+this.setting.type.toString().replace(/(-[a-z]|^[a-z])/g,(function(t){return t.toUpperCase().replace("-","")}));return void 0!==Vue.options.components[t]?t:"SettingNull"}}},s=n;var i=a(3379),r=a.n(i),o=a(1111),l={insert:"head",singleton:!1};r()(o.Z,l);o.Z.locals;const u=(0,a(1900).Z)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{class:["form-group","row","has-feedback",t.setting.class,t.feedback]},[a("label",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.setting.name},expression:"{ content: setting.name }"}],staticClass:"col-sm-5 col-md-3 col-form-label",attrs:{for:t.setting.name}},[t._v("\n "+t._s(t.getDescription())+"\n "),t.setting.units?a("span",[t._v("("+t._s(t.getUnits())+")")]):t._e()]),t._v(" "),a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:!!t.setting.disabled&&t.$t(this.prefix+".readonly")},expression:"{ content: setting.disabled ? $t(this.prefix + '.readonly') : false }"}],staticClass:"col-sm-5"},[a(t.getComponent(),{tag:"component",attrs:{value:t.value,name:t.setting.name,pattern:t.setting.pattern,disabled:t.setting.overridden,required:t.setting.required,options:t.setting.options,"update-status":t.updateStatus},on:{input:function(e){return t.changeValue(e)},change:function(e){return t.changeValue(e)}}}),t._v(" "),a("span",{staticClass:"form-control-feedback"})],1),t._v(" "),a("div",[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.$t("Reset to default")},expression:"{ content: $t('Reset to default') }"}],staticClass:"btn btn-default",class:{"disable-events":!t.showResetToDefault()},style:{opacity:t.showResetToDefault()?1:0},attrs:{type:"button"},on:{click:t.resetToDefault}},[a("i",{staticClass:"fa fa-refresh"})]),t._v(" "),a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.$t("Undo")},expression:"{ content: $t('Undo') }"}],staticClass:"btn btn-primary",class:{"disable-events":!t.showUndo()},style:{opacity:t.showUndo()?1:0},attrs:{type:"button"},on:{click:t.resetToInitial}},[a("i",{staticClass:"fa fa-undo"})]),t._v(" "),t.hasHelp()?a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:t.getHelp(),trigger:"hover click"},expression:"{content: getHelp(), trigger: 'hover click'}"}],staticClass:"fa fa-fw fa-lg fa-question-circle"}):t._e()])])}),[],!1,null,"abd58c08",null).exports},2872:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>c});function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var n,s,i=[],r=!0,o=!1;try{for(a=a.call(t);!(r=(n=a.next()).done)&&(i.push(n.value),!e||i.length!==e);r=!0);}catch(t){o=!0,s=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw s}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return s(t,e)}(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.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a{"use strict";a.r(e),a.d(e,{default:()=>c});const n={name:"PollerSettings",props:{pollers:Object,settings:Object},data:function(){return{advanced:!1}}};var s=a(3379),i=a.n(s),r=a(3594),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;var l=a(3485),u={insert:"head",singleton:!1};i()(l.Z,u);l.Z.locals;const c=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading"},[a("h3",{staticClass:"panel-title"},[t._v("\n "+t._s(t.$t("Poller Settings"))+"\n "),a("span",{staticClass:"pull-right"},[t._v("Advanced "),a("toggle-button",{model:{value:t.advanced,callback:function(e){t.advanced=e},expression:"advanced"}})],1)])]),t._v(" "),a("div",{staticClass:"panel-body"},[a("vue-tabs",{attrs:{direction:"vertical",type:"pills"}},t._l(t.pollers,(function(e,n){return a("v-tab",{key:n,attrs:{title:e.poller_name}},t._l(t.settings[n],(function(n){return!n.advanced||t.advanced?a("div",{key:n.name,staticClass:"setting-container clearfix"},[a("librenms-setting",{attrs:{prefix:"poller.settings",setting:n,id:e.id}})],1):t._e()})),0)})),1)],1)])}),[],!1,null,"5ab9fce1",null).exports},3334:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>d});var n=a(9608),s=a(9980),i=a.n(s);const r={name:"SettingArray",mixins:[n.default],components:{draggable:i()},data:function(){var t;return{localList:null!==(t=this.value)&&void 0!==t?t:[],newItem:""}},methods:{addItem:function(){this.disabled||(this.localList.push(this.newItem),this.$emit("input",this.localList),this.newItem="")},removeItem:function(t){this.disabled||(this.localList.splice(t,1),this.$emit("input",this.localList))},updateItem:function(t,e){this.disabled||this.localList[t]===e||(this.localList[t]=e,this.$emit("input",this.localList))},dragged:function(){this.disabled||this.$emit("input",this.localList)}},watch:{value:function(t){this.localList=t}}};var o=a(3379),l=a.n(o),u=a(5319),c={insert:"head",singleton:!1};l()(u.Z,c);u.Z.locals;const d=(0,a(1900).Z)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}]},[a("draggable",{attrs:{disabled:t.disabled},on:{end:function(e){return t.dragged()}},model:{value:t.localList,callback:function(e){t.localList=e},expression:"localList"}},t._l(t.localList,(function(e,n){return a("div",{staticClass:"input-group"},[a("span",{class:["input-group-addon",t.disabled?"disabled":""]},[t._v(t._s(n+1)+".")]),t._v(" "),a("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:e},on:{blur:function(e){return t.updateItem(n,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateItem(n,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[t.disabled?t._e():a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeItem(n)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])])})),0),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem,expression:"newItem"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newItem},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addItem.apply(null,arguments)},input:function(e){e.target.composing||(t.newItem=e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addItem}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])],1)}),[],!1,null,"588cd6c1",null).exports},2421:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingArraySubKeyed",mixins:[a(9608).default],data:function(){var t;return{localList:null!==(t=this.value)&&void 0!==t?t:new Object,newSubItemKey:{},newSubItemValue:{},newSubArray:""}},methods:{addSubItem:function(t){if(!this.disabled){var e={};e[this.newSubItemKey[t]]=this.newSubItemValue[t],0===Object.keys(this.localList[t]).length&&(this.localList[t]=new Object),Object.assign(this.localList[t],e),this.$emit("input",this.localList),this.newSubItemValue[t]="",this.newSubItemKey[t]=""}},removeSubItem:function(t,e){this.disabled||(delete this.localList[t][e],0===Object.keys(this.localList[t]).length&&delete this.localList[t],this.$emit("input",this.localList))},updateSubItem:function(t,e,a){this.disabled||this.localList[t][e]===a||(this.localList[t][e]=a,this.$emit("input",this.localList))},addSubArray:function(){this.disabled||(this.localList[this.newSubArray]=new Object,this.$emit("input",this.localList),this.newSubArray="")}},watch:{value:function(t){this.localList=t}}};var s=a(3379),i=a.n(s),r=a(514),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}]},[t._l(t.localList,(function(e,n){return a("div",[a("b",[t._v(t._s(n))]),t._v(" "),t._l(e,(function(e,s){return a("div",{staticClass:"input-group"},[a("span",{class:["input-group-addon",t.disabled?"disabled":""]},[t._v(t._s(s))]),t._v(" "),a("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:e},on:{blur:function(e){return t.updateSubItem(n,s,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateSubItem(n,s,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[t.disabled?t._e():a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeSubItem(n,s)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])])})),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-4"},[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newSubItemKey[n],expression:"newSubItemKey[index]"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Key"},domProps:{value:t.newSubItemKey[n]},on:{input:function(e){e.target.composing||t.$set(t.newSubItemKey,n,e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"col-lg-8"},[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newSubItemValue[n],expression:"newSubItemValue[index]"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Value"},domProps:{value:t.newSubItemValue[n]},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addSubItem(n)},input:function(e){e.target.composing||t.$set(t.newSubItemValue,n,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.addSubItem(n)}}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])])]),t._v(" "),a("hr")],2)})),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newSubArray,expression:"newSubArray"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newSubArray},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addSubArray.apply(null,arguments)},input:function(e){e.target.composing||(t.newSubArray=e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addSubArray}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])],2)}),[],!1,null,"dcc80002",null).exports},3554:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingBoolean",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("toggle-button",{attrs:{name:t.name,value:t.value,sync:!0,required:t.required,disabled:t.disabled},on:{change:function(e){return t.$emit("change",e.value)}}})}),[],!1,null,"ab7ed6ee",null).exports},573:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingDirectory",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"text",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"a44ee658",null).exports},543:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingEmail",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"email",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"62ce370c",null).exports},9844:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingExecutable",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"text",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"a93fcd56",null).exports},4517:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingFloat",mixins:[a(9608).default],methods:{parseNumber:function(t){var e=parseFloat(t);return isNaN(e)?t:e}}};var s=a(3379),i=a.n(s),r=a(3278),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"number",name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){t.$emit("input",t.parseNumber(e.target.value))}}})}),[],!1,null,"66aaec8d",null).exports},1185:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>u});var n=a(9608);const s={name:"SettingGroupRoleMap",components:{LibrenmsSelect:a(2636).default},mixins:[n.default],data:function(){return{newItem:"",newItemRoles:[],localList:this.parseValue(this.value)}},methods:{addItem:function(){this.localList[this.newItem]={roles:this.newItemRoles},this.newItem="",this.newItemRoles=[],this.$emit("input",this.localList)},removeItem:function(t){delete this.localList[t],this.$emit("input",this.localList)},updateItem:function(t,e){var a=this;this.localList=Object.keys(this.localList).reduce((function(n,s){return n[s===t?e:s]=a.localList[s],n}),{}),this.$emit("input",this.localList)},updateRoles:function(t,e){console.log(t,e,this.lock),this.localList[t].roles=e,this.$emit("input",this.localList)},parseValue:function(t){if(Array.isArray(t))return{};for(var e={1:"user",5:"global-read",10:"admin"},a=0,n=Object.keys(t);a{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingInteger",mixins:[a(9608).default],methods:{parseNumber:function(t){var e=parseFloat(t);return isNaN(e)?t:e}}};var s=a(3379),i=a.n(s),r=a(5544),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"number",name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){t.$emit("input",t.parseNumber(e.target.value))}}})}),[],!1,null,"72c868aa",null).exports},7561:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingLdapGroups",mixins:[a(9608).default],data:function(){return{localList:Array.isArray(this.value)?{}:this.value,newItem:"",newItemLevel:1,lock:!1}},methods:{addItem:function(){this.$set(this.localList,this.newItem,{level:this.newItemLevel}),this.newItem="",this.newItemLevel=1},removeItem:function(t){this.$delete(this.localList,t)},updateItem:function(t,e){var a=this;this.localList=Object.keys(this.localList).reduce((function(n,s){return n[s===t?e:s]=a.localList[s],n}),{})},updateLevel:function(t,e){this.$set(this.localList,t,{level:e})}},watch:{localList:function(){this.lock?this.lock=!1:this.$emit("input",this.localList)},value:function(){this.lock=!0,this.localList=Array.isArray(this.value)?{}:this.value}}};var s=a(3379),i=a.n(s),r=a(9308),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}],staticClass:"form-inline"},[t._l(t.localList,(function(e,n){return a("div",{staticClass:"input-group"},[a("input",{staticClass:"form-control",attrs:{type:"text",readonly:t.disabled},domProps:{value:n},on:{blur:function(e){return t.updateItem(n,e.target.value)},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.updateItem(n,e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn",staticStyle:{width:"0"}}),t._v(" "),a("select",{staticClass:"form-control",on:{change:function(e){return t.updateLevel(n,e.target.value)}}},[a("option",{attrs:{value:"1"},domProps:{selected:1===e.level}},[t._v(t._s(t.$t("Normal")))]),t._v(" "),a("option",{attrs:{value:"5"},domProps:{selected:5===e.level}},[t._v(t._s(t.$t("Global Read")))]),t._v(" "),a("option",{attrs:{value:"10"},domProps:{selected:10===e.level}},[t._v(t._s(t.$t("Admin")))])]),t._v(" "),a("span",{staticClass:"input-group-btn"},[t.disabled?t._e():a("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){return t.removeItem(n)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])])})),t._v(" "),t.disabled?t._e():a("div",[a("div",{staticClass:"input-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.newItem,expression:"newItem"}],staticClass:"form-control",attrs:{type:"text"},domProps:{value:t.newItem},on:{input:function(e){e.target.composing||(t.newItem=e.target.value)}}}),t._v(" "),a("span",{staticClass:"input-group-btn",staticStyle:{width:"0"}}),t._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:t.newItemLevel,expression:"newItemLevel"}],staticClass:"form-control",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.newItemLevel=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"1"}},[t._v(t._s(t.$t("Normal")))]),t._v(" "),a("option",{attrs:{value:"5"}},[t._v(t._s(t.$t("Global Read")))]),t._v(" "),a("option",{attrs:{value:"10"}},[t._v(t._s(t.$t("Admin")))])]),t._v(" "),a("span",{staticClass:"input-group-btn"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.addItem}},[a("i",{staticClass:"fa fa-plus-circle"})])])])])],2)}),[],!1,null,"f290b6f6",null).exports},7732:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var n,s,i=[],r=!0,o=!1;try{for(a=a.call(t);!(r=(n=a.next()).done)&&(i.push(n.value),!e||i.length!==e);r=!0);}catch(t){o=!0,s=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw s}}return i}(t,e)||i(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.")}()}function s(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return r(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingNull",props:["name"]};var s=a(3379),i=a.n(s),r=a(7873),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",[t._v("Invalid type for: "+t._s(t.name))])}),[],!1,null,"f45258b0",null).exports},4088:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingOxidizedMaps",mixins:[a(9608).default],data:function(){return{mapModalIndex:null,mapModalSource:null,mapModalMatchType:null,mapModalMatchValue:null,mapModalTarget:null,mapModalReplacement:null}},methods:{showModal:function(t){this.fillForm(t),this.$modal.show("maps")},submitModal:function(){var t=this.maps,e={target:this.mapModalTarget,source:this.mapModalSource,matchType:this.mapModalMatchType,matchValue:this.mapModalMatchValue,replacement:this.mapModalReplacement};this.mapModalIndex?t[this.mapModalIndex]=e:t.push(e),console.log(t,e),this.updateValue(t)},fillForm:function(t){var e=this.maps.hasOwnProperty(t);this.mapModalIndex=t,this.mapModalSource=e?this.maps[t].source:null,this.mapModalMatchType=e?this.maps[t].matchType:null,this.mapModalMatchValue=e?this.maps[t].matchValue:null,this.mapModalTarget=e?this.maps[t].target:null,this.mapModalReplacement=e?this.maps[t].replacement:null},deleteItem:function(t){var e=this.maps;e.splice(t,1),this.updateValue(e)},updateValue:function(t){var e={};t.forEach((function(t){void 0===e[t.target]&&(e[t.target]={}),void 0===e[t.target][t.source]&&(e[t.target][t.source]=[]);var a={};a[t.matchType]=t.matchValue,a.value=t.replacement,e[t.target][t.source].push(a)})),this.$emit("input",e)},formatSource:function(t,e){return e.hasOwnProperty("regex")?t+" ~ "+e.regex:e.hasOwnProperty("match")?t+" = "+e.match:"invalid"},formatTarget:function(t,e){return t+" > "+(e.hasOwnProperty("value")?e.value:e[t])}},watch:{updateStatus:function(){"success"===this.updateStatus&&this.$modal.hide("maps")}},computed:{maps:function(){var t=this,e=[];return Object.keys(this.value).forEach((function(a){Object.keys(t.value[a]).forEach((function(n){t.value[a][n].forEach((function(t){var s=t.hasOwnProperty("regex")?"regex":"match";e.push({target:a,source:n,matchType:s,matchValue:t[s],replacement:t.hasOwnProperty("value")?t.value:t[a]})}))}))})),e}}};var s=a(3379),i=a.n(s),r=a(6634),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{directives:[{name:"show",rawName:"v-show",value:!t.disabled,expression:"! disabled"}],staticClass:"new-btn-div"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.showModal(null)}}},[a("i",{staticClass:"fa fa-plus"}),t._v(" "+t._s(t.$t("New Map Rule")))])]),t._v(" "),t._l(t.maps,(function(e,n){return a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-body"},[a("div",{staticClass:"col-md-5 expandable"},[a("span",[t._v(t._s(e.source)+" "+t._s("regex"===e.matchType?"~":"=")+" "+t._s(e.matchValue))])]),t._v(" "),a("div",{staticClass:"col-md-4 expandable"},[a("span",[t._v(t._s(e.target)+" < "+t._s(e.replacement))])]),t._v(" "),a("div",{staticClass:"col-md-3 buttons"},[a("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:!!t.disabled&&t.$t("settings.readonly"),expression:"disabled ? $t('settings.readonly') : false"}],staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("Edit"),expression:"$t('Edit')"}],staticClass:"btn btn-sm btn-info",attrs:{type:"button",disabled:t.disabled},on:{click:function(e){return t.showModal(n)}}},[a("i",{staticClass:"fa fa-lg fa-edit"})]),t._v(" "),a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.$t("Delete"),expression:"$t('Delete')"}],staticClass:"btn btn-sm btn-danger",attrs:{type:"button",disabled:t.disabled},on:{click:function(e){return t.deleteItem(n)}}},[a("i",{staticClass:"fa fa-lg fa-remove"})])])])])])})),t._v(" "),a("modal",{attrs:{name:"maps",height:"auto"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("button",{staticClass:"close",attrs:{type:"button"},on:{click:function(e){return t.$modal.hide("maps")}}},[a("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])]),t._v(" "),a("h4",{staticClass:"modal-title"},[t._v(t._s(t.mapModalIndex?t.$t("Edit Map Rule"):t.$t("New Map Rule")))])]),t._v(" "),a("div",{staticClass:"modal-body"},[a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4 control-label",attrs:{for:"source"}},[t._v("Source")]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.mapModalSource,expression:"mapModalSource"}],staticClass:"form-control",attrs:{id:"source"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.mapModalSource=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"hostname"}},[t._v("hostname")]),t._v(" "),a("option",{attrs:{value:"os"}},[t._v("os")]),t._v(" "),a("option",{attrs:{value:"type"}},[t._v("type")]),t._v(" "),a("option",{attrs:{value:"hardware"}},[t._v("hardware")]),t._v(" "),a("option",{attrs:{value:"sysObjectID"}},[t._v("sysObjectID")]),t._v(" "),a("option",{attrs:{value:"sysName"}},[t._v("sysName")]),t._v(" "),a("option",{attrs:{value:"sysDescr"}},[t._v("sysDescr")]),t._v(" "),a("option",{attrs:{value:"location"}},[t._v("location")]),t._v(" "),a("option",{attrs:{value:"ip"}},[t._v("ip")])])])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4",attrs:{for:"match_value"}},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.mapModalMatchType,expression:"mapModalMatchType"}],staticClass:"form-control",attrs:{id:"match_type"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.mapModalMatchType=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"match"}},[t._v("Match (=)")]),t._v(" "),a("option",{attrs:{value:"regex"}},[t._v("Regex (~)")])])]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.mapModalMatchValue,expression:"mapModalMatchValue"}],staticClass:"form-control",attrs:{type:"text",id:"match_value",placeholder:""},domProps:{value:t.mapModalMatchValue},on:{input:function(e){e.target.composing||(t.mapModalMatchValue=e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form-horizontal",attrs:{role:"form"}},[a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4 control-label",attrs:{for:"target"}},[t._v("Target")]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("select",{directives:[{name:"model",rawName:"v-model",value:t.mapModalTarget,expression:"mapModalTarget"}],staticClass:"form-control",attrs:{id:"target"},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.mapModalTarget=e.target.multiple?a:a[0]}}},[a("option",{attrs:{value:"os"}},[t._v("os")]),t._v(" "),a("option",{attrs:{value:"group"}},[t._v("group")]),t._v(" "),a("option",{attrs:{value:"ip"}},[t._v("ip")])])])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-4 control-label",attrs:{for:"value"}},[t._v("Replacement")]),t._v(" "),a("div",{staticClass:"col-sm-8"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.mapModalReplacement,expression:"mapModalReplacement"}],staticClass:"form-control",attrs:{type:"text",id:"value",placeholder:""},domProps:{value:t.mapModalReplacement},on:{input:function(e){e.target.composing||(t.mapModalReplacement=e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form-group"},[a("div",{staticClass:"col-sm-8 col-sm-offset-4"},[a("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:t.submitModal}},[t._v(t._s(t.$t("Submit")))])])])])])])])],2)}),[],!1,null,"915dcab0",null).exports},4809:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingPassword",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"password",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"452744d4",null).exports},8269:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingSelect",mixins:[a(9608).default],methods:{getText:function(t,e){var a="settings.settings.".concat(t,".options.").concat(e);return this.$te(a)?this.$t(a):e}}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("select",{staticClass:"form-control",attrs:{name:t.name,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}},t._l(t.options,(function(e,n){return a("option",{domProps:{value:n,selected:t.value===n,textContent:t._s(t.getText(t.name,e))}})})),0)}),[],!1,null,"a6c05438",null).exports},66:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>i});var n=a(9608);const s={name:"SettingSelectDynamic",components:{LibrenmsSelect:a(2636).default},mixins:[n.default]};const i=(0,a(1900).Z)(s,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("librenms-select",{staticClass:"form-control",attrs:{value:t.value,"route-name":"ajax.select."+this.options.target,placeholder:this.options.placeholder,"allow-clear":this.options.allowClear,required:t.required,disabled:t.disabled},on:{change:function(e){return t.$emit("change",e)}}})],1)}),[],!1,null,"ef26c772",null).exports},787:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"SettingSnmp3auth",mixins:[a(9608).default],data:function(){return{localList:this.value,authAlgorithms:["MD5","AES"],cryptoAlgorithms:["AES","DES"]}},mounted:function(){var t=this;axios.get(route("snmp.capabilities")).then((function(e){t.authAlgorithms=e.data.auth,t.cryptoAlgorithms=e.data.crypto}))},methods:{addItem:function(){this.localList.push({authlevel:"noAuthNoPriv",authalgo:"MD5",authname:"",authpass:"",cryptoalgo:"AES",cryptopass:""}),this.$emit("input",this.localList)},removeItem:function(t){this.localList.splice(t,1),this.$emit("input",this.localList)},updateItem:function(t,e,a){this.localList[t][e]=a,this.$emit("input",this.localList)},dragged:function(){this.$emit("input",this.localList)}},watch:{value:function(t){this.localList=t}}};var s=a(3379),i=a.n(s),r=a(3938),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("draggable",{attrs:{disabled:t.disabled},on:{end:function(e){return t.dragged()}},model:{value:t.localList,callback:function(e){t.localList=e},expression:"localList"}},t._l(t.localList,(function(e,n){return a("div",[a("div",{staticClass:"panel panel-default"},[a("div",{staticClass:"panel-heading"},[a("h3",{staticClass:"panel-title"},[t._v(t._s(n+1)+". "),t.disabled?t._e():a("span",{staticClass:"pull-right text-danger",on:{click:function(e){return t.removeItem(n)}}},[a("i",{staticClass:"fa fa-minus-circle"})])])]),t._v(" "),a("div",{staticClass:"panel-body"},[a("form",{on:{onsubmit:function(t){t.preventDefault()}}},[a("div",{staticClass:"form-group"},[a("div",{staticClass:"col-sm-12"},[a("select",{directives:[{name:"model",rawName:"v-model",value:e.authlevel,expression:"item.authlevel"}],staticClass:"form-control",attrs:{id:"authlevel",disabled:t.disabled},on:{change:[function(a){var n=Array.prototype.filter.call(a.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"authlevel",a.target.multiple?n:n[0])},function(e){return t.updateItem(n,e.target.id,e.target.value)}]}},[a("option",{attrs:{value:"noAuthNoPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.noAuthNoPriv"))}}),t._v(" "),a("option",{attrs:{value:"authNoPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.authNoPriv"))}}),t._v(" "),a("option",{attrs:{value:"authPriv"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.level.authPriv"))}})])])]),t._v(" "),a("fieldset",{directives:[{name:"show",rawName:"v-show",value:"auth"===e.authlevel.toString().substring(0,4),expression:"item.authlevel.toString().substring(0, 4) === 'auth'"}],attrs:{name:"algo",disabled:t.disabled}},[a("legend",{staticClass:"h4",domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.auth"))}}),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authalgo"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authalgo"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("select",{directives:[{name:"model",rawName:"v-model",value:e.authalgo,expression:"item.authalgo"}],staticClass:"form-control",attrs:{id:"authalgo",name:"authalgo"},on:{change:[function(a){var n=Array.prototype.filter.call(a.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"authalgo",a.target.multiple?n:n[0])},function(e){return t.updateItem(n,e.target.id,e.target.value)}]}},t._l(t.authAlgorithms,(function(e){return a("option",{domProps:{value:e,textContent:t._s(e)}})})),0)])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authname"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authname"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("input",{staticClass:"form-control",attrs:{type:"text",id:"authname"},domProps:{value:e.authname},on:{input:function(e){return t.updateItem(n,e.target.id,e.target.value)}}})])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"authpass"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authpass"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("input",{staticClass:"form-control",attrs:{type:"text",id:"authpass"},domProps:{value:e.authpass},on:{input:function(e){return t.updateItem(n,e.target.id,e.target.value)}}})])])]),t._v(" "),a("fieldset",{directives:[{name:"show",rawName:"v-show",value:"authPriv"===e.authlevel,expression:"item.authlevel === 'authPriv'"}],attrs:{name:"crypt",disabled:t.disabled}},[a("legend",{staticClass:"h4",domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.crypto"))}}),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"cryptoalgo"}},[t._v("Cryptoalgo")]),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("select",{directives:[{name:"model",rawName:"v-model",value:e.cryptoalgo,expression:"item.cryptoalgo"}],staticClass:"form-control",attrs:{id:"cryptoalgo"},on:{change:[function(a){var n=Array.prototype.filter.call(a.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(e,"cryptoalgo",a.target.multiple?n:n[0])},function(e){return t.updateItem(n,e.target.id,e.target.value)}]}},t._l(t.cryptoAlgorithms,(function(e){return a("option",{domProps:{value:e,textContent:t._s(e)}})})),0)])]),t._v(" "),a("div",{staticClass:"form-group"},[a("label",{staticClass:"col-sm-3 control-label",attrs:{for:"cryptopass"},domProps:{textContent:t._s(t.$t("settings.settings.snmp.v3.fields.authpass"))}}),t._v(" "),a("div",{staticClass:"col-sm-9"},[a("input",{staticClass:"form-control",attrs:{type:"text",id:"cryptopass"},domProps:{value:e.cryptopass},on:{input:function(e){return t.updateItem(n,e.target.id,e.target.value)}}})])])])])])])])})),0),t._v(" "),t.disabled?t._e():a("div",{staticClass:"row snmp3-add-button"},[a("div",{staticClass:"col-sm-12"},[a("button",{staticClass:"btn btn-primary",on:{click:function(e){return t.addItem()}}},[a("i",{staticClass:"fa fa-plus-circle"}),t._v(" "+t._s(t.$t("New")))])])])],1)}),[],!1,null,"b51be698",null).exports},9997:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"SettingText",mixins:[a(9608).default]};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("input",{staticClass:"form-control",attrs:{type:"text",name:t.name,pattern:t.pattern,required:t.required,disabled:t.disabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("input",e.target.value)}}})}),[],!1,null,"8426bf9c",null).exports},3653:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const n={name:"Tab",props:{name:{required:!0},text:String,selected:{type:Boolean,default:!1},icon:String},data:function(){return{isActive:this.selected}}};const s=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{directives:[{name:"show",rawName:"v-show",value:t.isActive,expression:"isActive"}],staticClass:"tab-pane",attrs:{role:"tabpanel",id:t.name}},[t._t("default")],2)}),[],!1,null,"1af9694b",null).exports},8872:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"Tabs",props:{selected:String},data:function(){return{tabs:[],activeTab:null}},created:function(){this.tabs=this.$children},mounted:function(){this.activeTab=this.selected},watch:{selected:function(t){this.activeTab=t},activeTab:function(t){this.tabs.forEach((function(e){return e.isActive=e.name===t})),this.$emit("tab-selected",t)}}};var s=a(3379),i=a.n(s),r=a(6682),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"panel with-nav-tabs panel-default"},[a("div",{staticClass:"panel-heading"},[a("ul",{staticClass:"nav nav-tabs",attrs:{role:"tablist"}},[t._l(t.tabs,(function(e){return a("li",{key:e.name,class:{active:e.isActive},attrs:{role:"presentation"}},[a("a",{attrs:{role:"tab","aria-controls":e.name},on:{click:function(a){t.activeTab=e.name}}},[e.icon?a("i",{class:["fa","fa-fw",e.icon]}):t._e(),t._v("\n "+t._s(e.text||e.name)+" \n ")])])})),t._v(" "),a("li",{staticClass:"pull-right"},[t._t("header")],2)],2)]),t._v(" "),a("div",{staticClass:"panel-body"},[t._t("default")],2)])])}),[],!1,null,"2ac3a533",null).exports},5606:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>l});const n={name:"TransitionCollapseHeight",methods:{beforeEnter:function(t){requestAnimationFrame((function(){t.style.height||(t.style.height="0px"),t.style.display=null}))},enter:function(t){requestAnimationFrame((function(){requestAnimationFrame((function(){t.style.height=t.scrollHeight+"px"}))}))},afterEnter:function(t){t.style.height=null},beforeLeave:function(t){requestAnimationFrame((function(){t.style.height||(t.style.height=t.offsetHeight+"px")}))},leave:function(t){requestAnimationFrame((function(){requestAnimationFrame((function(){t.style.height="0px"}))}))},afterLeave:function(t){t.style.height=null}}};var s=a(3379),i=a.n(s),r=a(1615),o={insert:"head",singleton:!1};i()(r.Z,o);r.Z.locals;const l=(0,a(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("transition",{attrs:{"enter-active-class":"enter-active","leave-active-class":"leave-active"},on:{"before-enter":t.beforeEnter,enter:t.enter,"after-enter":t.afterEnter,"before-leave":t.beforeLeave,leave:t.leave,"after-leave":t.afterLeave}},[t._t("default")],2)}),[],!1,null,"54390bb4",null).exports},5642:(t,e,a)=>{var n={"./components/Accordion.vue":4304,"./components/AccordionItem.vue":1217,"./components/BaseSetting.vue":9608,"./components/ExampleComponent.vue":6784,"./components/LibrenmsSelect.vue":2636,"./components/LibrenmsSetting.vue":1997,"./components/LibrenmsSettings.vue":2872,"./components/PollerSettings.vue":707,"./components/SettingArray.vue":3334,"./components/SettingArraySubKeyed.vue":2421,"./components/SettingBoolean.vue":3554,"./components/SettingDirectory.vue":573,"./components/SettingEmail.vue":543,"./components/SettingExecutable.vue":9844,"./components/SettingFloat.vue":4517,"./components/SettingGroupRoleMap.vue":1185,"./components/SettingInteger.vue":1707,"./components/SettingLdapGroups.vue":7561,"./components/SettingMultiple.vue":7732,"./components/SettingNull.vue":3493,"./components/SettingOxidizedMaps.vue":4088,"./components/SettingPassword.vue":4809,"./components/SettingSelect.vue":8269,"./components/SettingSelectDynamic.vue":66,"./components/SettingSnmp3auth.vue":787,"./components/SettingText.vue":9997,"./components/Tab.vue":3653,"./components/Tabs.vue":8872,"./components/TransitionCollapseHeight.vue":5606};function s(t){var e=i(t);return a(e)}function i(t){if(!a.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}s.keys=function(){return Object.keys(n)},s.resolve=i,t.exports=s,s.id=5642}},t=>{var e=e=>t(t.s=e);t.O(0,[213,170,898],(()=>(e(5377),e(4347),e(3848))));t.O()}]); \ No newline at end of file diff --git a/html/js/vendor.js b/html/js/vendor.js index 3f57c06f0d..ca952963a7 100644 --- a/html/js/vendor.js +++ b/html/js/vendor.js @@ -1,2 +1,2 @@ /*! For license information please see vendor.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[898],{9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(4372),a=n(5327),s=n(4097),u=n(4109),c=n(7985),l=n(5061),f=n(5655),p=n(5263);t.exports=function(t){return new Promise((function(e,n){var d,h=t.data,v=t.headers,m=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}r.isFormData(h)&&delete v["Content-Type"];var y=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",_=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";v.Authorization="Basic "+btoa(b+":"+_)}var w=s(t.baseURL,t.url);function x(){if(y){var r="getAllResponseHeaders"in y?u(y.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y};i((function(t){e(t),g()}),(function(t){n(t),g()}),o),y=null}}if(y.open(t.method.toUpperCase(),a(w,t.params,t.paramsSerializer),!0),y.timeout=t.timeout,"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(x)},y.onabort=function(){y&&(n(l("Request aborted",t,"ECONNABORTED",y)),y=null)},y.onerror=function(){n(l("Network Error",t,null,y)),y=null},y.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||f.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},r.isStandardBrowserEnv()){var O=(t.withCredentials||c(w))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;O&&(v[t.xsrfHeaderName]=O)}"setRequestHeader"in y&&r.forEach(v,(function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete v[e]:y.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(y.withCredentials=!!t.withCredentials),m&&"json"!==m&&(y.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&y.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(t){y&&(n(!t||t&&t.type?new p("canceled"):t),y.abort(),y=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),h||(h=null),y.send(h)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),a=n(7185);var s=function t(e){var n=new o(e),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return t(a(e,n))},s}(n(5655));s.Axios=o,s.Cancel=n(5263),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.all=function(t){return Promise.all(t)},s.spread=n(8713),s.isAxiosError=n(6268),t.exports=s,t.exports.default=s},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),a=n(3572),s=n(7185),u=n(4875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new o,response:new o}}l.prototype.request=function(t,e){if("string"==typeof t?(e=e||{}).url=t:e=t||{},!e.url)throw new Error("Provided config url is not valid");(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var n=e.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(i=i&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)})),!i){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(l),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var p=e;r.length;){var d=r.shift(),h=r.shift();try{p=d(p)}catch(t){h(t);break}}try{o=a(p)}catch(t){return Promise.reject(t)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},l.prototype.getUri=function(t){if(!t.url)throw new Error("Provided config url is not valid");return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(s(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),a=n(5655),s=n(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)})),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4155),i=n(4867),o=n(6016),a=n(481),s={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(c=n(5448)),c),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)||e&&"application/json"===e["Content-Type"]?(u(e,"application/json"),function(t,e,n){if(i.isString(t))try{return(e||JSON.parse)(t),i.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||l.transitional,n=e&&e.silentJSONParsing,r=e&&e.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&i.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw a(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){l.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){l.headers[t]=i.merge(s)})),t.exports=l},7288:t=>{t.exports={version:"0.25.0"}},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},6268:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t){return r.isObject(t)&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],a=e[o];if(a){var s=t[o],u=void 0===s||a(s,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function o(t){return Array.isArray(t)}function a(t){return void 0===t}function s(t){return"[object ArrayBuffer]"===i.call(t)}function u(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function l(t){return"[object Function]"===i.call(t)}function f(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n{var e=/^(attrs|props|on|nativeOn|class|style|hook)$/;function n(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}}t.exports=function(t){return t.reduce((function(t,r){var i,o,a,s,u;for(a in r)if(i=t[a],o=r[a],i&&e.test(a))if("class"===a&&("string"==typeof i&&(u=i,t[a]=i={},i[u]=!0),"string"==typeof o&&(u=o,r[a]=o={},o[u]=!0)),"on"===a||"nativeOn"===a||"hook"===a)for(s in o)i[s]=n(i[s],o[s]);else if(Array.isArray(i))t[a]=i.concat(o);else if(Array.isArray(o))t[a]=[i].concat(o);else for(s in o)i[s]=o[s];else t[a]=r[a];return t}),{})}},7097:(t,e,n)=>{"use strict";n(8091).polyfill()},8091:t=>{"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var n=Object(t),r=1;r{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(7040),i=n(4125),o=n(2117),a=n(7518),s=n(4705);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),u=n(4309);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},6874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),u=n(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),f=!n&&!l&&a(t),p=!n&&!l&&!f&&u(t),d=n||l||f||p,h=d?r(t.length,String):[],v=h.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||f&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,v))||h.push(m);return h}},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n{var r=n(9465),i=n(7813);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},4865:(t,e,n)=>{var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9465:(t,e,n)=>{var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},3118:(t,e,n)=>{var r=n(3218),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},8866:(t,e,n)=>{var r=n(2488),i=n(1469);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},4239:(t,e,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},9454:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),i=n(7005);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},2492:(t,e,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),u=n(1469),c=n(4144),l=n(6719),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,m,g){var y=u(t),b=u(e),_=y?p:s(t),w=b?p:s(e),x=(_=_==f?d:_)==d,O=(w=w==f?d:w)==d,S=_==w;if(S&&c(t)){if(!c(e))return!1;y=!0,x=!1}if(S&&!x)return g||(g=new r),y||l(t)?i(t,e,n,v,m,g):o(t,e,_,n,v,m,g);if(!(1&n)){var C=x&&h.call(t,"__wrapped__"),E=O&&h.call(e,"__wrapped__");if(C||E){var T=C?t.value():t,k=E?e.value():e;return g||(g=new r),m(T,k,n,v,g)}}return!!S&&(g||(g=new r),a(t,e,n,v,m,g))}},8458:(t,e,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?p:s).test(a(t))}},8749:(t,e,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},280:(t,e,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},313:(t,e,n)=>{var r=n(3218),i=n(5726),o=n(3498),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},2980:(t,e,n)=>{var r=n(6384),i=n(6556),o=n(8483),a=n(9783),s=n(3218),u=n(1704),c=n(6390);t.exports=function t(e,n,l,f,p){e!==n&&o(n,(function(o,u){if(p||(p=new r),s(o))a(e,n,u,l,t,f,p);else{var d=f?f(c(e,u),o,u+"",e,n,p):void 0;void 0===d&&(d=o),i(e,u,d)}}),u)}},9783:(t,e,n)=>{var r=n(6556),i=n(4626),o=n(7133),a=n(278),s=n(8517),u=n(5694),c=n(1469),l=n(9246),f=n(4144),p=n(3560),d=n(3218),h=n(8630),v=n(6719),m=n(6390),g=n(9881);t.exports=function(t,e,n,y,b,_,w){var x=m(t,n),O=m(e,n),S=w.get(O);if(S)r(t,n,S);else{var C=_?_(x,O,n+"",t,e,w):void 0,E=void 0===C;if(E){var T=c(O),k=!T&&f(O),$=!T&&!k&&v(O);C=O,T||k||$?c(x)?C=x:l(x)?C=a(x):k?(E=!1,C=i(O,!0)):$?(E=!1,C=o(O,!0)):C=[]:h(O)||u(O)?(C=x,u(x)?C=g(x):d(x)&&!p(x)||(C=s(O))):E=!1}E&&(w.set(O,C),b(C,O,y,_,w),w.delete(O)),r(t,n,C)}}},5976:(t,e,n)=>{var r=n(6557),i=n(5357),o=n(61);t.exports=function(t,e){return o(i(t,e,r),t+"")}},6560:(t,e,n)=>{var r=n(5703),i=n(8777),o=n(6557),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n{t.exports=function(t){return function(e){return t(e)}}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4318:(t,e,n)=>{var r=n(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},4626:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},7133:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n{var r=n(4865),i=n(9465);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s{var r=n(5639)["__core-js_shared__"];t.exports=r},1463:(t,e,n)=>{var r=n(5976),i=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r{t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},8777:(t,e,n)=>{var r=n(852),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},7114:(t,e,n)=>{var r=n(8668),i=n(2908),o=n(4757);t.exports=function(t,e,n,a,s,u){var c=1&n,l=t.length,f=e.length;if(l!=f&&!(c&&f>l))return!1;var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var h=-1,v=!0,m=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),u=n(1814),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,f,p){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=u),t.size!=e.size&&!h)return!1;var v=p.get(t);if(v)return v==e;r|=2,p.set(t,e);var m=a(d(t),d(e),r,c,f,p);return p.delete(t),m;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var u=1&n,c=r(t),l=c.length;if(l!=r(e).length&&!u)return!1;for(var f=l;f--;){var p=c[f];if(!(u?p in e:i.call(e,p)))return!1}var d=s.get(t),h=s.get(e);if(d&&h)return d==e&&h==t;var v=!0;s.set(t,e),s.set(e,t);for(var m=u;++f{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),i=n(9551),o=n(3674);t.exports=function(t){return r(t,o,i)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},852:(t,e,n)=>{var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},9607:(t,e,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},9551:(t,e,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},4160:(t,e,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),u=n(4239),c=n(346),l="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",v=c(r),m=c(i),g=c(o),y=c(a),b=c(s),_=u;(r&&_(new r(new ArrayBuffer(1)))!=h||i&&_(new i)!=l||o&&_(o.resolve())!=f||a&&_(new a)!=p||s&&_(new s)!=d)&&(_=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return h;case m:return l;case g:return f;case y:return p;case b:return d}return e}),t.exports=_},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},8517:(t,e,n)=>{var r=n(3118),i=n(5924),o=n(5726);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t{var r=n(7813),i=n(8612),o=n(5776),a=n(3218);t.exports=function(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),i=n(8407),o=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5357:(t,e,n)=>{var r=n(6874),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},61:(t,e,n)=>{var r=n(6560),i=n(1275)(r);t.exports=i},1275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),i=n(7071),o=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},5703:t=>{t.exports=function(t){return function(){return t}}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},9246:(t,e,n)=>{var r=n(8612),i=n(7005);t.exports=function(t){return i(t)&&r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=n(5062),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u},8446:(t,e,n)=>{var r=n(939);t.exports=function(t,e){return r(t,e)}},3560:(t,e,n)=>{var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,n)=>{var r=n(4239),i=n(5924),o=n(7005),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},6719:(t,e,n)=>{var r=n(8749),i=n(1717),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},3674:(t,e,n)=>{var r=n(4636),i=n(280),o=n(8612);t.exports=function(t){return o(t)?r(t):i(t)}},1704:(t,e,n)=>{var r=n(4636),i=n(313),o=n(8612);t.exports=function(t){return o(t)?r(t,!0):i(t)}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,f=128,p=256,d=1/0,h=9007199254740991,v=NaN,m=4294967295,g=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",p]],y="[object Arguments]",b="[object Array]",_="[object Boolean]",w="[object Date]",x="[object Error]",O="[object Function]",S="[object GeneratorFunction]",C="[object Map]",E="[object Number]",T="[object Object]",k="[object Promise]",$="[object RegExp]",A="[object Set]",j="[object String]",D="[object Symbol]",L="[object WeakMap]",M="[object ArrayBuffer]",N="[object DataView]",P="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",F="[object Int16Array]",B="[object Int32Array]",z="[object Uint8Array]",V="[object Uint8ClampedArray]",H="[object Uint16Array]",U="[object Uint32Array]",W=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,K=RegExp(X.source),J=RegExp(Y.source),Z=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),at=/^\s+/,st=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,lt=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,mt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,_t=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xt=/($^)/,Ot=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ct="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",$t="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",At="['’]",jt="[\\ud800-\\udfff]",Dt="["+$t+"]",Lt="["+St+"]",Mt="\\d+",Nt="[\\u2700-\\u27bf]",Pt="["+Et+"]",It="[^\\ud800-\\udfff"+$t+Mt+Ct+Et+Tt+"]",Rt="\\ud83c[\\udffb-\\udfff]",Ft="[^\\ud800-\\udfff]",Bt="(?:\\ud83c[\\udde6-\\uddff]){2}",zt="[\\ud800-\\udbff][\\udc00-\\udfff]",Vt="["+Tt+"]",Ht="(?:"+Pt+"|"+It+")",Ut="(?:"+Vt+"|"+It+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Gt="(?:"+Lt+"|"+Rt+")"+"?",Xt="[\\ufe0e\\ufe0f]?",Yt=Xt+Gt+("(?:\\u200d(?:"+[Ft,Bt,zt].join("|")+")"+Xt+Gt+")*"),Kt="(?:"+[Nt,Bt,zt].join("|")+")"+Yt,Jt="(?:"+[Ft+Lt+"?",Lt,Bt,zt,jt].join("|")+")",Zt=RegExp(At,"g"),Qt=RegExp(Lt,"g"),te=RegExp(Rt+"(?="+Rt+")|"+Jt+Yt,"g"),ee=RegExp([Vt+"?"+Pt+"+"+Wt+"(?="+[Dt,Vt,"$"].join("|")+")",Ut+"+"+qt+"(?="+[Dt,Vt+Ht,"$"].join("|")+")",Vt+"?"+Ht+"+"+Wt,Vt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mt,Kt].join("|"),"g"),ne=RegExp("[\\u200d\\ud800-\\udfff"+St+kt+"]"),re=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ie=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ae={};ae[P]=ae[I]=ae[R]=ae[F]=ae[B]=ae[z]=ae[V]=ae[H]=ae[U]=!0,ae[y]=ae[b]=ae[M]=ae[_]=ae[N]=ae[w]=ae[x]=ae[O]=ae[C]=ae[E]=ae[T]=ae[$]=ae[A]=ae[j]=ae[L]=!1;var se={};se[y]=se[b]=se[M]=se[N]=se[_]=se[w]=se[P]=se[I]=se[R]=se[F]=se[B]=se[C]=se[E]=se[T]=se[$]=se[A]=se[j]=se[D]=se[z]=se[V]=se[H]=se[U]=!0,se[x]=se[O]=se[L]=!1;var ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ce=parseFloat,le=parseInt,fe="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pe="object"==typeof self&&self&&self.Object===Object&&self,de=fe||pe||Function("return this")(),he=e&&!e.nodeType&&e,ve=he&&t&&!t.nodeType&&t,me=ve&&ve.exports===he,ge=me&&fe.process,ye=function(){try{var t=ve&&ve.require&&ve.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),be=ye&&ye.isArrayBuffer,_e=ye&&ye.isDate,we=ye&&ye.isMap,xe=ye&&ye.isRegExp,Oe=ye&&ye.isSet,Se=ye&&ye.isTypedArray;function Ce(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function De(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function en(t,e){for(var n=t.length;n--&&ze(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var rn=qe({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),on=qe({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(t){return"\\"+ue[t]}function sn(t){return ne.test(t)}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function cn(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var gn=function t(e){var n,r=(e=null==e?de:gn.defaults(de.Object(),e,gn.pick(de,ie))).Array,st=e.Date,St=e.Error,Ct=e.Function,Et=e.Math,Tt=e.Object,kt=e.RegExp,$t=e.String,At=e.TypeError,jt=r.prototype,Dt=Ct.prototype,Lt=Tt.prototype,Mt=e["__core-js_shared__"],Nt=Dt.toString,Pt=Lt.hasOwnProperty,It=0,Rt=(n=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ft=Lt.toString,Bt=Nt.call(Tt),zt=de._,Vt=kt("^"+Nt.call(Pt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=me?e.Buffer:i,Ut=e.Symbol,Wt=e.Uint8Array,qt=Ht?Ht.allocUnsafe:i,Gt=cn(Tt.getPrototypeOf,Tt),Xt=Tt.create,Yt=Lt.propertyIsEnumerable,Kt=jt.splice,Jt=Ut?Ut.isConcatSpreadable:i,te=Ut?Ut.iterator:i,ne=Ut?Ut.toStringTag:i,ue=function(){try{var t=ho(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),fe=e.clearTimeout!==de.clearTimeout&&e.clearTimeout,pe=st&&st.now!==de.Date.now&&st.now,he=e.setTimeout!==de.setTimeout&&e.setTimeout,ve=Et.ceil,ge=Et.floor,ye=Tt.getOwnPropertySymbols,Re=Ht?Ht.isBuffer:i,qe=e.isFinite,yn=jt.join,bn=cn(Tt.keys,Tt),_n=Et.max,wn=Et.min,xn=st.now,On=e.parseInt,Sn=Et.random,Cn=jt.reverse,En=ho(e,"DataView"),Tn=ho(e,"Map"),kn=ho(e,"Promise"),$n=ho(e,"Set"),An=ho(e,"WeakMap"),jn=ho(Tt,"create"),Dn=An&&new An,Ln={},Mn=zo(En),Nn=zo(Tn),Pn=zo(kn),In=zo($n),Rn=zo(An),Fn=Ut?Ut.prototype:i,Bn=Fn?Fn.valueOf:i,zn=Fn?Fn.toString:i;function Vn(t){if(is(t)&&!Ga(t)&&!(t instanceof qn)){if(t instanceof Wn)return t;if(Pt.call(t,"__wrapped__"))return Vo(t)}return new Wn(t)}var Hn=function(){function t(){}return function(e){if(!rs(e))return{};if(Xt)return Xt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Un(){}function Wn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function qn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function lr(t,e,n,r,o,a){var s,u=1&e,c=2&e,l=4&e;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!rs(t))return t;var f=Ga(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Pt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return ji(t,s)}else{var p=go(t),d=p==O||p==S;if(Ja(t))return Ci(t,u);if(p==T||p==y||d&&!o){if(s=c||d?{}:bo(t),!u)return c?function(t,e){return Di(t,mo(t),e)}(t,function(t,e){return t&&Di(e,Ns(e),t)}(s,t)):function(t,e){return Di(t,vo(t),e)}(t,ar(s,t))}else{if(!se[p])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case M:return Ei(t);case _:case w:return new r(+t);case N:return function(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case P:case I:case R:case F:case B:case z:case V:case H:case U:return Ti(t,n);case C:case A:return new r;case E:case j:return new r(t);case $:return function(t){var e=new t.constructor(t.source,vt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case D:return i=t,Bn?Tt(Bn.call(i)):{}}var i}(t,p,u)}}a||(a=new Jn);var h=a.get(t);if(h)return h;a.set(t,s),cs(t)?t.forEach((function(r){s.add(lr(r,e,n,r,t,a))})):os(t)&&t.forEach((function(r,i){s.set(i,lr(r,e,n,i,t,a))}));var v=f?i:(l?c?ao:oo:c?Ns:Ms)(t);return Te(v||t,(function(r,i){v&&(r=t[i=r]),rr(s,i,lr(r,e,n,i,t,a))})),s}function fr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function pr(t,e,n){if("function"!=typeof t)throw new At(o);return Mo((function(){t.apply(i,n)}),e)}function dr(t,e,n,r){var i=-1,o=je,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=Le(e,Je(n))),r?(o=De,a=!1):e.length>=200&&(o=Qe,a=!1,e=new Kn(e));t:for(;++i-1},Xn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(Tn||Xn),string:new Gn}},Yn.prototype.delete=function(t){var e=fo(this,t).delete(t);return this.size-=e?1:0,e},Yn.prototype.get=function(t){return fo(this,t).get(t)},Yn.prototype.has=function(t){return fo(this,t).has(t)},Yn.prototype.set=function(t,e){var n=fo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(t){return this.__data__.set(t,a),this},Kn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Jn.prototype.get=function(t){return this.__data__.get(t)},Jn.prototype.has=function(t){return this.__data__.has(t)},Jn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Xn){var r=n.__data__;if(!Tn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(t,e),this.size=n.size,this};var hr=Ni(xr),vr=Ni(Or,!0);function mr(t,e){var n=!0;return hr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,n){for(var r=-1,o=t.length;++r0&&n(s)?e>1?br(s,e-1,n,r,i):Me(i,s):r||(i[i.length]=s)}return i}var _r=Pi(),wr=Pi(!0);function xr(t,e){return t&&_r(t,e,Ms)}function Or(t,e){return t&&wr(t,e,Ms)}function Sr(t,e){return Ae(e,(function(e){return ts(t[e])}))}function Cr(t,e){for(var n=0,r=(e=wi(e,t)).length;null!=t&&ne}function $r(t,e){return null!=t&&Pt.call(t,e)}function Ar(t,e){return null!=t&&e in Tt(t)}function jr(t,e,n){for(var o=n?De:je,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=t[u];u&&e&&(p=Le(p,Je(e))),l=wn(p.length,l),c[u]=!n&&(e||a>=120&&p.length>=120)?new Kn(u&&p):i}p=t[0];var d=-1,h=c[0];t:for(;++d=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Gr(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&Kt.call(s,u,1),Kt.call(t,u,1);return t}function Yr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;wo(i)?Kt.call(t,i,1):di(t,i)}}return t}function Kr(t,e){return t+ge(Sn()*(e-t+1))}function Jr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Zr(t,e){return No($o(t,e,au),t+"")}function Qr(t){return Qn(Hs(t))}function ti(t,e){var n=Hs(t);return Ro(n,cr(e,0,n.length))}function ei(t,e,n,r){if(!rs(t))return t;for(var o=-1,a=(e=wi(e,t)).length,s=a-1,u=t;null!=u&&++oo?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i>>1,a=t[o];null!==a&&!fs(a)&&(n?a<=e:a=200){var c=e?null:Ji(t);if(c)return fn(c);a=!1,i=Qe,u=new Kn}else u=e?[]:s;t:for(;++r=r?t:oi(t,e,n)}var Si=fe||function(t){return de.clearTimeout(t)};function Ci(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function Ei(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Ti(t,e){var n=e?Ei(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=fs(t),s=e!==i,u=null===e,c=e==e,l=fs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&t1?n[o-1]:i,s=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,s&&xo(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=Tt(e);++r-1?o[a?e[s]:s]:i}}function zi(t){return io((function(e){var n=e.length,r=n,a=Wn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new At(o);if(a&&!u&&"wrapper"==uo(s))var u=new Wn([],!0)}for(r=u?r:n;++r1&&b.reverse(),d&&lu))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,h=2&n?new Kn:i;for(a.set(t,e),a.set(e,t);++p-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Te(g,(function(n){var r="_."+n[0];e&n[1]&&!je(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(lt):[]}(r),n)))}function Io(t){var e=0,n=0;return function(){var r=xn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ro(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,ua(t,n)}));function va(t){var e=Vn(t);return e.__chain__=!0,e}function ma(t,e){return e(t)}var ga=io((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return ur(e,t)};return!(e>1||this.__actions__.length)&&r instanceof qn&&wo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ma,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var ya=Li((function(t,e,n){Pt.call(t,n)?++t[n]:sr(t,n,1)}));var ba=Bi(qo),_a=Bi(Go);function wa(t,e){return(Ga(t)?Te:hr)(t,lo(e,3))}function xa(t,e){return(Ga(t)?ke:vr)(t,lo(e,3))}var Oa=Li((function(t,e,n){Pt.call(t,n)?t[n].push(e):sr(t,n,[e])}));var Sa=Zr((function(t,e,n){var i=-1,o="function"==typeof e,a=Ya(t)?r(t.length):[];return hr(t,(function(t){a[++i]=o?Ce(e,t,n):Dr(t,e,n)})),a})),Ca=Li((function(t,e,n){sr(t,n,e)}));function Ea(t,e){return(Ga(t)?Le:zr)(t,lo(e,3))}var Ta=Li((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ka=Zr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&xo(t,e[0],e[1])?e=[]:n>2&&xo(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,br(e,1),[])})),$a=pe||function(){return de.Date.now()};function Aa(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Qi(t,f,i,i,i,i,e)}function ja(t,e){var n;if("function"!=typeof e)throw new At(o);return t=gs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Da=Zr((function(t,e,n){var r=1;if(n.length){var i=ln(n,co(Da));r|=c}return Qi(t,r,e,n,i)})),La=Zr((function(t,e,n){var r=3;if(n.length){var i=ln(n,co(La));r|=c}return Qi(e,r,t,n,i)}));function Ma(t,e,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new At(o);function v(e){var n=r,o=a;return r=a=i,f=e,u=t.apply(o,n)}function m(t){return f=t,c=Mo(y,e),p?v(t):u}function g(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=s}function y(){var t=$a();if(g(t))return b(t);c=Mo(y,function(t){var n=e-(t-l);return d?wn(n,s-(t-f)):n}(t))}function b(t){return c=i,h&&r?v(t):(r=a=i,u)}function _(){var t=$a(),n=g(t);if(r=arguments,a=this,l=t,n){if(c===i)return m(l);if(d)return Si(c),c=Mo(y,e),v(l)}return c===i&&(c=Mo(y,e)),u}return e=bs(e)||0,rs(n)&&(p=!!n.leading,s=(d="maxWait"in n)?_n(bs(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h),_.cancel=function(){c!==i&&Si(c),f=0,r=l=a=c=i},_.flush=function(){return c===i?u:b($a())},_}var Na=Zr((function(t,e){return pr(t,1,e)})),Pa=Zr((function(t,e,n){return pr(t,bs(e)||0,n)}));function Ia(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new At(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ia.Cache||Yn),n}function Ra(t){if("function"!=typeof t)throw new At(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ia.Cache=Yn;var Fa=xi((function(t,e){var n=(e=1==e.length&&Ga(e[0])?Le(e[0],Je(lo())):Le(br(e,1),Je(lo()))).length;return Zr((function(r){for(var i=-1,o=wn(r.length,n);++i=e})),qa=Lr(function(){return arguments}())?Lr:function(t){return is(t)&&Pt.call(t,"callee")&&!Yt.call(t,"callee")},Ga=r.isArray,Xa=be?Je(be):function(t){return is(t)&&Tr(t)==M};function Ya(t){return null!=t&&ns(t.length)&&!ts(t)}function Ka(t){return is(t)&&Ya(t)}var Ja=Re||bu,Za=_e?Je(_e):function(t){return is(t)&&Tr(t)==w};function Qa(t){if(!is(t))return!1;var e=Tr(t);return e==x||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var e=Tr(t);return e==O||e==S||"[object AsyncFunction]"==e||"[object Proxy]"==e}function es(t){return"number"==typeof t&&t==gs(t)}function ns(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function rs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function is(t){return null!=t&&"object"==typeof t}var os=we?Je(we):function(t){return is(t)&&go(t)==C};function as(t){return"number"==typeof t||is(t)&&Tr(t)==E}function ss(t){if(!is(t)||Tr(t)!=T)return!1;var e=Gt(t);if(null===e)return!0;var n=Pt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==Bt}var us=xe?Je(xe):function(t){return is(t)&&Tr(t)==$};var cs=Oe?Je(Oe):function(t){return is(t)&&go(t)==A};function ls(t){return"string"==typeof t||!Ga(t)&&is(t)&&Tr(t)==j}function fs(t){return"symbol"==typeof t||is(t)&&Tr(t)==D}var ps=Se?Je(Se):function(t){return is(t)&&ns(t.length)&&!!ae[Tr(t)]};var ds=Xi(Br),hs=Xi((function(t,e){return t<=e}));function vs(t){if(!t)return[];if(Ya(t))return ls(t)?hn(t):ji(t);if(te&&t[te])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[te]());var e=go(t);return(e==C?un:e==A?fn:Hs)(t)}function ms(t){return t?(t=bs(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=ms(t),n=e%1;return e==e?n?e-n:e:0}function ys(t){return t?cr(gs(t),0,m):0}function bs(t){if("number"==typeof t)return t;if(fs(t))return v;if(rs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=gt.test(t);return n||bt.test(t)?le(t.slice(2),n?2:8):mt.test(t)?v:+t}function _s(t){return Di(t,Ns(t))}function ws(t){return null==t?"":fi(t)}var xs=Mi((function(t,e){if(Eo(e)||Ya(e))Di(e,Ms(e),t);else for(var n in e)Pt.call(e,n)&&rr(t,n,e[n])})),Os=Mi((function(t,e){Di(e,Ns(e),t)})),Ss=Mi((function(t,e,n,r){Di(e,Ns(e),t,r)})),Cs=Mi((function(t,e,n,r){Di(e,Ms(e),t,r)})),Es=io(ur);var Ts=Zr((function(t,e){t=Tt(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&xo(e[0],e[1],o)&&(r=1);++n1),e})),Di(t,ao(t),n),r&&(n=lr(n,7,no));for(var i=e.length;i--;)di(n,e[i]);return n}));var Fs=io((function(t,e){return null==t?{}:function(t,e){return Gr(t,e,(function(e,n){return As(t,n)}))}(t,e)}));function Bs(t,e){if(null==t)return{};var n=Le(ao(t),(function(t){return[t]}));return e=lo(e),Gr(t,n,(function(t,n){return e(t,n[0])}))}var zs=Zi(Ms),Vs=Zi(Ns);function Hs(t){return null==t?[]:Ze(t,Ms(t))}var Us=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?Ws(e):e)}));function Ws(t){return Qs(ws(t).toLowerCase())}function qs(t){return(t=ws(t))&&t.replace(wt,rn).replace(Qt,"")}var Gs=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Xs=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ys=Ii("toLowerCase");var Ks=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Js=Ri((function(t,e,n){return t+(n?" ":"")+Qs(e)}));var Zs=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qs=Ii("toUpperCase");function tu(t,e,n){return t=ws(t),(e=n?i:e)===i?function(t){return re.test(t)}(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.match(ft)||[]}(t):t.match(e)||[]}var eu=Zr((function(t,e){try{return Ce(t,i,e)}catch(t){return Qa(t)?t:new St(t)}})),nu=io((function(t,e){return Te(e,(function(e){e=Bo(e),sr(t,e,Da(t[e],t))})),t}));function ru(t){return function(){return t}}var iu=zi(),ou=zi(!0);function au(t){return t}function su(t){return Ir("function"==typeof t?t:lr(t,1))}var uu=Zr((function(t,e){return function(n){return Dr(n,t,e)}})),cu=Zr((function(t,e){return function(n){return Dr(t,n,e)}}));function lu(t,e,n){var r=Ms(e),i=Sr(e,r);null!=n||rs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Sr(e,Ms(e)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=ts(t);return Te(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=ji(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Me([this.value()],arguments))})})),t}function fu(){}var pu=Wi(Le),du=Wi($e),hu=Wi(Ie);function vu(t){return Oo(t)?We(Bo(t)):function(t){return function(e){return Cr(e,t)}}(t)}var mu=Gi(),gu=Gi(!0);function yu(){return[]}function bu(){return!1}var _u=Ui((function(t,e){return t+e}),0),wu=Ki("ceil"),xu=Ui((function(t,e){return t/e}),1),Ou=Ki("floor");var Su,Cu=Ui((function(t,e){return t*e}),1),Eu=Ki("round"),Tu=Ui((function(t,e){return t-e}),0);return Vn.after=function(t,e){if("function"!=typeof e)throw new At(o);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},Vn.ary=Aa,Vn.assign=xs,Vn.assignIn=Os,Vn.assignInWith=Ss,Vn.assignWith=Cs,Vn.at=Es,Vn.before=ja,Vn.bind=Da,Vn.bindAll=nu,Vn.bindKey=La,Vn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},Vn.chain=va,Vn.chunk=function(t,e,n){e=(n?xo(t,e,n):e===i)?1:_n(gs(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,s=0,u=r(ve(o/e));ao?0:o+n),(r=r===i||r>o?o:gs(r))<0&&(r+=o),r=n>r?0:ys(r);n>>0)?(t=ws(t))&&("string"==typeof e||null!=e&&!us(e))&&!(e=fi(e))&&sn(t)?Oi(hn(t),0,n):t.split(e,n):[]},Vn.spread=function(t,e){if("function"!=typeof t)throw new At(o);return e=null==e?0:_n(gs(e),0),Zr((function(n){var r=n[e],i=Oi(n,0,e);return r&&Me(i,r),Ce(t,this,i)}))},Vn.tail=function(t){var e=null==t?0:t.length;return e?oi(t,1,e):[]},Vn.take=function(t,e,n){return t&&t.length?oi(t,0,(e=n||e===i?1:gs(e))<0?0:e):[]},Vn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?oi(t,(e=r-(e=n||e===i?1:gs(e)))<0?0:e,r):[]},Vn.takeRightWhile=function(t,e){return t&&t.length?vi(t,lo(e,3),!1,!0):[]},Vn.takeWhile=function(t,e){return t&&t.length?vi(t,lo(e,3)):[]},Vn.tap=function(t,e){return e(t),t},Vn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new At(o);return rs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ma(t,e,{leading:r,maxWait:e,trailing:i})},Vn.thru=ma,Vn.toArray=vs,Vn.toPairs=zs,Vn.toPairsIn=Vs,Vn.toPath=function(t){return Ga(t)?Le(t,Bo):fs(t)?[t]:ji(Fo(ws(t)))},Vn.toPlainObject=_s,Vn.transform=function(t,e,n){var r=Ga(t),i=r||Ja(t)||ps(t);if(e=lo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:rs(t)&&ts(o)?Hn(Gt(t)):{}}return(i?Te:xr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Vn.unary=function(t){return Aa(t,1)},Vn.union=ia,Vn.unionBy=oa,Vn.unionWith=aa,Vn.uniq=function(t){return t&&t.length?pi(t):[]},Vn.uniqBy=function(t,e){return t&&t.length?pi(t,lo(e,2)):[]},Vn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?pi(t,i,e):[]},Vn.unset=function(t,e){return null==t||di(t,e)},Vn.unzip=sa,Vn.unzipWith=ua,Vn.update=function(t,e,n){return null==t?t:hi(t,e,_i(n))},Vn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:hi(t,e,_i(n),r)},Vn.values=Hs,Vn.valuesIn=function(t){return null==t?[]:Ze(t,Ns(t))},Vn.without=ca,Vn.words=tu,Vn.wrap=function(t,e){return Ba(_i(e),t)},Vn.xor=la,Vn.xorBy=fa,Vn.xorWith=pa,Vn.zip=da,Vn.zipObject=function(t,e){return yi(t||[],e||[],rr)},Vn.zipObjectDeep=function(t,e){return yi(t||[],e||[],ei)},Vn.zipWith=ha,Vn.entries=zs,Vn.entriesIn=Vs,Vn.extend=Os,Vn.extendWith=Ss,lu(Vn,Vn),Vn.add=_u,Vn.attempt=eu,Vn.camelCase=Us,Vn.capitalize=Ws,Vn.ceil=wu,Vn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=bs(n))==n?n:0),e!==i&&(e=(e=bs(e))==e?e:0),cr(bs(t),e,n)},Vn.clone=function(t){return lr(t,4)},Vn.cloneDeep=function(t){return lr(t,5)},Vn.cloneDeepWith=function(t,e){return lr(t,5,e="function"==typeof e?e:i)},Vn.cloneWith=function(t,e){return lr(t,4,e="function"==typeof e?e:i)},Vn.conformsTo=function(t,e){return null==e||fr(t,e,Ms(e))},Vn.deburr=qs,Vn.defaultTo=function(t,e){return null==t||t!=t?e:t},Vn.divide=xu,Vn.endsWith=function(t,e,n){t=ws(t),e=fi(e);var r=t.length,o=n=n===i?r:cr(gs(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Vn.eq=Ha,Vn.escape=function(t){return(t=ws(t))&&J.test(t)?t.replace(Y,on):t},Vn.escapeRegExp=function(t){return(t=ws(t))&&ot.test(t)?t.replace(it,"\\$&"):t},Vn.every=function(t,e,n){var r=Ga(t)?$e:mr;return n&&xo(t,e,n)&&(e=i),r(t,lo(e,3))},Vn.find=ba,Vn.findIndex=qo,Vn.findKey=function(t,e){return Fe(t,lo(e,3),xr)},Vn.findLast=_a,Vn.findLastIndex=Go,Vn.findLastKey=function(t,e){return Fe(t,lo(e,3),Or)},Vn.floor=Ou,Vn.forEach=wa,Vn.forEachRight=xa,Vn.forIn=function(t,e){return null==t?t:_r(t,lo(e,3),Ns)},Vn.forInRight=function(t,e){return null==t?t:wr(t,lo(e,3),Ns)},Vn.forOwn=function(t,e){return t&&xr(t,lo(e,3))},Vn.forOwnRight=function(t,e){return t&&Or(t,lo(e,3))},Vn.get=$s,Vn.gt=Ua,Vn.gte=Wa,Vn.has=function(t,e){return null!=t&&yo(t,e,$r)},Vn.hasIn=As,Vn.head=Yo,Vn.identity=au,Vn.includes=function(t,e,n,r){t=Ya(t)?t:Hs(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=_n(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ze(t,e,n)>-1},Vn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=_n(r+i,0)),ze(t,e,i)},Vn.inRange=function(t,e,n){return e=ms(e),n===i?(n=e,e=0):n=ms(n),function(t,e,n){return t>=wn(e,n)&&t<_n(e,n)}(t=bs(t),e,n)},Vn.invoke=Ls,Vn.isArguments=qa,Vn.isArray=Ga,Vn.isArrayBuffer=Xa,Vn.isArrayLike=Ya,Vn.isArrayLikeObject=Ka,Vn.isBoolean=function(t){return!0===t||!1===t||is(t)&&Tr(t)==_},Vn.isBuffer=Ja,Vn.isDate=Za,Vn.isElement=function(t){return is(t)&&1===t.nodeType&&!ss(t)},Vn.isEmpty=function(t){if(null==t)return!0;if(Ya(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Ja(t)||ps(t)||qa(t)))return!t.length;var e=go(t);if(e==C||e==A)return!t.size;if(Eo(t))return!Rr(t).length;for(var n in t)if(Pt.call(t,n))return!1;return!0},Vn.isEqual=function(t,e){return Mr(t,e)},Vn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Mr(t,e,i,n):!!r},Vn.isError=Qa,Vn.isFinite=function(t){return"number"==typeof t&&qe(t)},Vn.isFunction=ts,Vn.isInteger=es,Vn.isLength=ns,Vn.isMap=os,Vn.isMatch=function(t,e){return t===e||Nr(t,e,po(e))},Vn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Nr(t,e,po(e),n)},Vn.isNaN=function(t){return as(t)&&t!=+t},Vn.isNative=function(t){if(Co(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pr(t)},Vn.isNil=function(t){return null==t},Vn.isNull=function(t){return null===t},Vn.isNumber=as,Vn.isObject=rs,Vn.isObjectLike=is,Vn.isPlainObject=ss,Vn.isRegExp=us,Vn.isSafeInteger=function(t){return es(t)&&t>=-9007199254740991&&t<=h},Vn.isSet=cs,Vn.isString=ls,Vn.isSymbol=fs,Vn.isTypedArray=ps,Vn.isUndefined=function(t){return t===i},Vn.isWeakMap=function(t){return is(t)&&go(t)==L},Vn.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==Tr(t)},Vn.join=function(t,e){return null==t?"":yn.call(t,e)},Vn.kebabCase=Gs,Vn.last=Qo,Vn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=gs(n))<0?_n(r+o,0):wn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Be(t,He,o,!0)},Vn.lowerCase=Xs,Vn.lowerFirst=Ys,Vn.lt=ds,Vn.lte=hs,Vn.max=function(t){return t&&t.length?gr(t,au,kr):i},Vn.maxBy=function(t,e){return t&&t.length?gr(t,lo(e,2),kr):i},Vn.mean=function(t){return Ue(t,au)},Vn.meanBy=function(t,e){return Ue(t,lo(e,2))},Vn.min=function(t){return t&&t.length?gr(t,au,Br):i},Vn.minBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Br):i},Vn.stubArray=yu,Vn.stubFalse=bu,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=Cu,Vn.nth=function(t,e){return t&&t.length?Wr(t,gs(e)):i},Vn.noConflict=function(){return de._===this&&(de._=zt),this},Vn.noop=fu,Vn.now=$a,Vn.pad=function(t,e,n){t=ws(t);var r=(e=gs(e))?dn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return qi(ge(i),n)+t+qi(ve(i),n)},Vn.padEnd=function(t,e,n){t=ws(t);var r=(e=gs(e))?dn(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var o=Sn();return wn(t+o*(e-t+ce("1e-"+((o+"").length-1))),e)}return Kr(t,e)},Vn.reduce=function(t,e,n){var r=Ga(t)?Ne:Ge,i=arguments.length<3;return r(t,lo(e,4),n,i,hr)},Vn.reduceRight=function(t,e,n){var r=Ga(t)?Pe:Ge,i=arguments.length<3;return r(t,lo(e,4),n,i,vr)},Vn.repeat=function(t,e,n){return e=(n?xo(t,e,n):e===i)?1:gs(e),Jr(ws(t),e)},Vn.replace=function(){var t=arguments,e=ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Vn.result=function(t,e,n){var r=-1,o=(e=wi(e,t)).length;for(o||(o=1,t=i);++rh)return[];var n=m,r=wn(t,m);e=lo(e),t-=m;for(var i=Ye(r,e);++n=a)return t;var u=n-dn(r);if(u<1)return r;var c=s?Oi(s,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),us(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=kt(o.source,ws(vt.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(t.indexOf(fi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Vn.unescape=function(t){return(t=ws(t))&&K.test(t)?t.replace(X,mn):t},Vn.uniqueId=function(t){var e=++It;return ws(t)+e},Vn.upperCase=Zs,Vn.upperFirst=Qs,Vn.each=wa,Vn.eachRight=xa,Vn.first=Yo,lu(Vn,(Su={},xr(Vn,(function(t,e){Pt.call(Vn.prototype,e)||(Su[e]=t)})),Su),{chain:!1}),Vn.VERSION="4.17.21",Te(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Vn[t].placeholder=Vn})),Te(["drop","take"],(function(t,e){qn.prototype[t]=function(n){n=n===i?1:_n(gs(n),0);var r=this.__filtered__&&!e?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(n,r.__takeCount__):r.__views__.push({size:wn(n,m),type:t+(r.__dir__<0?"Right":"")}),r},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Te(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;qn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:lo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Te(["head","last"],(function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}})),Te(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");qn.prototype[t]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(au)},qn.prototype.find=function(t){return this.filter(t).head()},qn.prototype.findLast=function(t){return this.reverse().find(t)},qn.prototype.invokeMap=Zr((function(t,e){return"function"==typeof t?new qn(this):this.map((function(n){return Dr(n,t,e)}))})),qn.prototype.reject=function(t){return this.filter(Ra(lo(t)))},qn.prototype.slice=function(t,e){t=gs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new qn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=gs(e))<0?n.dropRight(-e):n.take(e-t)),n)},qn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qn.prototype.toArray=function(){return this.take(m)},xr(qn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Vn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(Vn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof qn,c=s[0],l=u||Ga(e),f=function(t){var e=o.apply(Vn,Me([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,v=u&&!d;if(!a&&l){e=v?e:new qn(this);var m=t.apply(e,s);return m.__actions__.push({func:ma,args:[f],thisArg:i}),new Wn(m,p)}return h&&v?t.apply(this,s):(m=this.thru(f),h?r?m.value()[0]:m.value():m)})})),Te(["pop","push","shift","sort","splice","unshift"],(function(t){var e=jt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Vn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n]((function(n){return e.apply(Ga(n)?n:[],t)}))}})),xr(qn.prototype,(function(t,e){var n=Vn[e];if(n){var r=n.name+"";Pt.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:e,func:n})}})),Ln[Vi(i,2).name]=[{name:"wrapper",func:i}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=ji(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ji(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ji(this.__views__),t},qn.prototype.reverse=function(){if(this.__filtered__){var t=new qn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Vn.prototype.plant=function(t){for(var e,n=this;n instanceof Un;){var r=Vo(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Vn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var e=t;return this.__actions__.length&&(e=new qn(this)),(e=e.reverse()).__actions__.push({func:ma,args:[ra],thisArg:i}),new Wn(e,this.__chain__)}return this.thru(ra)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,te&&(Vn.prototype[te]=function(){return this}),Vn}();de._=gn,(r=function(){return gn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},3857:(t,e,n)=>{var r=n(2980),i=n(1463)((function(t,e,n){r(t,e,n)}));t.exports=i},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},9881:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t){return r(t,i(t))}},8981:(t,e,n)=>{"use strict";n.d(e,{Z:()=>lt});var r="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,i=function(){for(var t=["Edge","Trident","Firefox"],e=0;e=0)return 1;return 0}();var o=r&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),i))}};function a(t){return t&&"[object Function]"==={}.toString.call(t)}function s(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=s(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?t:c(u(t))}function l(t){return t&&t.referenceNode?t.referenceNode:t}var f=r&&!(!window.MSInputMethodContext||!document.documentMode),p=r&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?f:10===t?p:f||p}function h(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===s(n,"position")?h(n):n:t?t.ownerDocument.documentElement:document.documentElement}function v(t){return null!==t.parentNode?v(t.parentNode):t}function m(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,u=o.commonAncestorContainer;if(t!==u&&e!==u||r.contains(i))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&h(a.firstElementChild)!==a?h(u):u;var c=v(t);return c.host?m(c.host,e):m(t,v(e).host)}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var i=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||i;return o[n]}return t[n]}function y(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(e,"top"),i=g(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}function b(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+r+"Width"])}function _(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],d(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,n=t.documentElement,r=d(10)&&getComputedStyle(n);return{height:_("Height",e,n,r),width:_("Width",e,n,r)}}var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},O=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=d(10),i="HTML"===e.nodeName,o=T(t),a=T(e),u=c(t),l=s(e),f=parseFloat(l.borderTopWidth),p=parseFloat(l.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var h=E({top:o.top-a.top-f,left:o.left-a.left-p,width:o.width,height:o.height});if(h.marginTop=0,h.marginLeft=0,!r&&i){var v=parseFloat(l.marginTop),m=parseFloat(l.marginLeft);h.top-=f-v,h.bottom-=f-v,h.left-=p-m,h.right-=p-m,h.marginTop=v,h.marginLeft=m}return(r&&!n?e.contains(u):e===u&&"BODY"!==u.nodeName)&&(h=y(h,e)),h}function $(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=k(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:g(n),s=e?0:g(n,"left"),u={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return E(u)}function A(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===s(t,"position"))return!0;var n=u(t);return!!n&&A(n)}function j(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===s(e,"transform");)e=e.parentElement;return e||document.documentElement}function D(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?j(t):m(t,l(e));if("viewport"===r)o=$(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=c(u(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===r?t.ownerDocument.documentElement:r;var f=k(s,a,i);if("HTML"!==s.nodeName||A(a))o=f;else{var p=w(t.ownerDocument),d=p.height,h=p.width;o.top+=f.top-f.marginTop,o.bottom=d+f.top,o.left+=f.left-f.marginLeft,o.right=h+f.left}}var v="number"==typeof(n=n||0);return o.left+=v?n:n.left||0,o.top+=v?n:n.top||0,o.right-=v?n:n.right||0,o.bottom-=v?n:n.bottom||0,o}function L(t){return t.width*t.height}function M(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=D(n,r,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map((function(t){return C({key:t},s[t],{area:L(s[t])})})).sort((function(t,e){return e.area-t.area})),c=u.filter((function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight})),l=c.length>0?c[0].key:u[0].key,f=t.split("-")[1];return l+(f?"-"+f:"")}function N(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?j(e):m(e,l(n));return k(n,i,r)}function P(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function I(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function R(t,e,n){n=n.split("-")[0];var r=P(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",c=o?"width":"height";return i[a]=e[a]+e[u]/2-r[u]/2,i[s]=n===s?e[s]-r[c]:e[I(s)],i}function F(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function B(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var r=F(t,(function(t){return t[e]===n}));return t.indexOf(r)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&a(n)&&(e.offsets.popper=E(e.offsets.popper),e.offsets.reference=E(e.offsets.reference),e=n(e,t))})),e}function z(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=N(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=M(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=R(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=B(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function V(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function H(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=et.indexOf(t),r=et.slice(n+1).concat(et.slice(0,n));return e?r.reverse():r}var rt="flip",it="clockwise",ot="counterclockwise";function at(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(F(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return c=c.map((function(t,r){var i=(1===r?!o:o)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){return E("%p"===a?n:r)[e]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,i,e,n)}))})),c.forEach((function(t,e){t.forEach((function(n,r){K(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))}))})),i}var st={shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",c=s?"width":"height",l={start:S({},u,o[u]),end:S({},u,o[u]+o[c]-a[c])};t.offsets.popper=C({},a,l[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=K(+n)?[+n,0]:at(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||h(t.instance.popper);t.instance.reference===n&&(n=h(n));var r=H("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=D(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=a,i[r]=s,e.boundaries=u;var c=e.priority,l=t.offsets.popper,f={primary:function(t){var n=l[t];return l[t]u[t]&&!e.escapeWithReference&&(r=Math.min(l[n],u[t]-("right"===t?l.width:l.height))),S({},n,r)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=C({},l,f[e](t))})),t.offsets.popper=l,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,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",c=a?"width":"height";return n[s]o(r[s])&&(t.offsets.popper[u]=o(r[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!Q(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,u=o.reference,c=-1!==["left","right"].indexOf(i),l=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",v=P(r)[l];u[h]-va[h]&&(t.offsets.popper[p]+=u[p]+v-a[h]),t.offsets.popper=E(t.offsets.popper);var m=u[p]+u[l]/2-v/2,g=s(t.instance.popper),y=parseFloat(g["margin"+f]),b=parseFloat(g["border"+f+"Width"]),_=m-t.offsets.popper[p]-y-b;return _=Math.max(Math.min(a[l]-v,_),0),t.arrowElement=r,t.offsets.arrow=(S(n={},p,Math.round(_)),S(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(V(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=D(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=I(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case rt:a=[r,i];break;case it:a=nt(r);break;case ot:a=nt(r,!0);break;default:a=e.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return t;r=t.placement.split("-")[0],i=I(r);var c=t.offsets.popper,l=t.offsets.reference,f=Math.floor,p="left"===r&&f(c.right)>f(l.left)||"right"===r&&f(c.left)f(l.top)||"bottom"===r&&f(c.top)f(n.right),v=f(c.top)f(n.bottom),g="left"===r&&d||"right"===r&&h||"top"===r&&v||"bottom"===r&&m,y=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(y&&"start"===o&&d||y&&"end"===o&&h||!y&&"start"===o&&v||!y&&"end"===o&&m),_=!!e.flipVariationsByContent&&(y&&"start"===o&&h||y&&"end"===o&&d||!y&&"start"===o&&m||!y&&"end"===o&&v),w=b||_;(p||g||w)&&(t.flipped=!0,(p||g)&&(r=a[u+1]),w&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=C({},t.offsets.popper,R(t.instance.popper,t.offsets.reference,t.placement)),t=B(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),t.placement=I(e),t.offsets.popper=E(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Q(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=F(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};x(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=o(this.update.bind(this)),this.options=C({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(C({},t.Defaults.modifiers,i.modifiers)).forEach((function(e){r.options.modifiers[e]=C({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return C({name:t},r.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&a(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return O(t,[{key:"update",value:function(){return z.call(this)}},{key:"destroy",value:function(){return U.call(this)}},{key:"enableEventListeners",value:function(){return X.call(this)}},{key:"disableEventListeners",value:function(){return Y.call(this)}}]),t}();ct.Utils=("undefined"!=typeof window?window:n.g).PopperUtils,ct.placements=tt,ct.Defaults=ut;const lt=ct},4155:t=>{var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=u.length;e;){for(s=u,u=[];++l1)for(var n=1;n{"use strict";function r(t){return r="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},r(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(){return o=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function u(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);exe,MultiDrag:()=>be,Sortable:()=>Bt,Swap:()=>ue});function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var l=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),f=c(/Edge/i),p=c(/firefox/i),d=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),h=c(/iP(ad|od|hone)/i),v=c(/chrome/i)&&c(/android/i),m={capture:!1,passive:!1};function g(t,e,n){t.addEventListener(e,n,!l&&m)}function y(t,e,n){t.removeEventListener(e,n,!l&&m)}function b(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&b(t,e):b(t,e))||r&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var x,O=/\s+/g;function S(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(O," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(O," ")}}function C(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function E(t,e){var n="";if("string"==typeof t)n=t;else do{var r=C(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function T(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i=o:i<=o))return r;if(r===k())break;r=N(r,!1)}return!1}function j(t,e,n){for(var r=0,i=0,o=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=s(n,["evt"]);q.pluginEvent.bind(Bt)(t,e,a({dragEl:K,parentEl:J,ghostEl:Z,rootEl:Q,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:rt,dragStarted:mt,putSortable:ct,activeSortable:Bt.active,originalEvent:r,oldIndex:it,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st,hideGhostForTarget:Pt,unhideGhostForTarget:It,cloneNowHidden:function(){rt=!0},cloneNowShown:function(){rt=!1},dispatchSortableEvent:function(t){Y({sortable:e,name:t,originalEvent:r})}},i))};function Y(t){G(a({putSortable:ct,cloneEl:nt,targetEl:K,rootEl:Q,oldIndex:it,oldDraggableIndex:at,newIndex:ot,newDraggableIndex:st},t))}var K,J,Z,Q,tt,et,nt,rt,it,ot,at,st,ut,ct,lt,ft,pt,dt,ht,vt,mt,gt,yt,bt,_t,wt=!1,xt=!1,Ot=[],St=!1,Ct=!1,Et=[],Tt=!1,kt=[],$t="undefined"!=typeof document,At=h,jt=f||l?"cssFloat":"float",Dt=$t&&!v&&!h&&"draggable"in document.createElement("div"),Lt=function(){if($t){if(l)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Mt=function(t,e){var n=C(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=j(t,0,e),o=j(t,1,e),a=i&&C(i),s=o&&C(o),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+$(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+$(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var l="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==l?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=r&&"none"===n[jt]||o&&"none"===n[jt]&&u+c>r)?"vertical":"horizontal"},Nt=function(t){function e(t,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var u=(n?r:i).options.group.name;return!0===t||"string"==typeof t&&t===u||t.join&&t.indexOf(u)>-1}}var n={},i=t.group;i&&"object"==r(i)||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Pt=function(){!Lt&&Z&&C(Z,"display","none")},It=function(){!Lt&&Z&&C(Z,"display","")};$t&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var Rt=function(t){if(K){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,o=t.clientY,Ot.some((function(t){if(!D(t)){var e=$(t),n=t[V].options.emptyInsertThreshold,r=i>=e.left-n&&i<=e.right+n,s=o>=e.top-n&&o<=e.bottom+n;return n&&r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[V]._onDragOver(n)}}var i,o,a},Ft=function(t){K&&K.parentNode[V]._isOutsideThisEl(t.target)};function Bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=o({},e),t[V]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Mt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in q.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Nt(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Dt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?g(t,"pointerdown",this._onTapStart):(g(t,"mousedown",this._onTapStart),g(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(t,"dragover",this),g(t,"dragenter",this)),Ot.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),o(this,H())}function zt(t,e,n,r,i,o,a,s){var u,c,p=t[V],d=p.options.onMove;return!window.CustomEvent||l||f?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=r,u.related=i||e,u.relatedRect=o||$(e),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),d&&(c=d.call(p,u,a)),c}function Vt(t){t.draggable=!1}function Ht(){Tt=!1}function Ut(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Wt(t){return setTimeout(t,0)}function qt(t){return clearTimeout(t)}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,K):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=r.filter;if(function(t){kt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&kt.push(r)}}(n),!K&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled||u.isContentEditable||(s=w(s,r.draggable,n,!1))&&s.animated||et===s)){if(it=L(s),at=L(s,r.draggable),"function"==typeof c){if(c.call(this,t,s,this))return Y({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),X("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=w(u,r.trim(),n,!1))return Y({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),X("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());r.handle&&!w(u,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!K&&n.parentNode===o){var u=$(n);if(Q=o,J=(K=n).parentNode,tt=K.nextSibling,et=n,ut=a.group,Bt.dragged=K,lt={target:K,clientX:(e||t).clientX,clientY:(e||t).clientY},ht=lt.clientX-u.left,vt=lt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,K.style["will-change"]="all",r=function(){X("delayEnded",i,{evt:t}),Bt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!p&&i.nativeDraggable&&(K.draggable=!0),i._triggerDragStart(t,e),Y({sortable:i,name:"choose",originalEvent:t}),S(K,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){T(K,t.trim(),Vt)})),g(s,"dragover",Rt),g(s,"mousemove",Rt),g(s,"touchmove",Rt),g(s,"mouseup",i._onDrop),g(s,"touchend",i._onDrop),g(s,"touchcancel",i._onDrop),p&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),X("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(f||l))r();else{if(Bt.eventCanceled)return void this._onDrop();g(s,"mouseup",i._disableDelayedDrag),g(s,"touchend",i._disableDelayedDrag),g(s,"touchcancel",i._disableDelayedDrag),g(s,"mousemove",i._delayedDragTouchMoveHandler),g(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&g(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Vt(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._disableDelayedDrag),y(t,"touchend",this._disableDelayedDrag),y(t,"touchcancel",this._disableDelayedDrag),y(t,"mousemove",this._delayedDragTouchMoveHandler),y(t,"touchmove",this._delayedDragTouchMoveHandler),y(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?g(document,"pointermove",this._onTouchMove):g(document,e?"touchmove":"mousemove",this._onTouchMove):(g(K,"dragend",this),g(Q,"dragstart",this._onDragStart));try{document.selection?Wt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(wt=!1,Q&&K){X("dragStarted",this,{evt:e}),this.nativeDraggable&&g(document,"dragover",Ft);var n=this.options;!t&&S(K,n.dragClass,!1),S(K,n.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),Y({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ft){this._lastX=ft.clientX,this._lastY=ft.clientY,Pt();for(var t=document.elementFromPoint(ft.clientX,ft.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ft.clientX,ft.clientY))!==e;)e=t;if(K.parentNode[V]._isOutsideThisEl(t),e)do{if(e[V]){if(e[V]._onDragOver({clientX:ft.clientX,clientY:ft.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);It()}},_onTouchMove:function(t){if(lt){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Z&&E(Z,!0),a=Z&&o&&o.a,s=Z&&o&&o.d,u=At&&_t&&M(_t),c=(i.clientX-lt.clientX+r.x)/(a||1)+(u?u[0]-Et[0]:0)/(a||1),l=(i.clientY-lt.clientY+r.y)/(s||1)+(u?u[1]-Et[1]:0)/(s||1);if(!Bt.active&&!wt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))r.right+i||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+i}(t,i,this)&&!m.animated){if(m===K)return F(!1);if(m&&o===t.target&&(s=m),s&&(n=$(s)),!1!==zt(Q,o,K,e,s,n,t,!!s))return I(),o.appendChild(K),J=o,B(),F(!0)}else if(s.parentNode===o){n=$(s);var g,y,b,_=K.parentNode!==o,x=!function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,u=n?e.width:e.height;return r===a||i===s||r+o/2===a+u/2}(K.animated&&K.toRect||e,s.animated&&s.toRect||n,i),O=i?"top":"left",E=A(s,"top","top")||A(K,"top","top"),T=E?E.scrollTop:void 0;if(gt!==s&&(y=n[O],St=!1,Ct=!x&&u.invertSwap||_),g=function(t,e,n,r,i,o,a,s){var u=r?t.clientY:t.clientX,c=r?n.height:n.width,l=r?n.top:n.left,f=r?n.bottom:n.right,p=!1;if(!a)if(s&&btl+c*o/2:uf-bt)return-yt}else if(u>l+c*(1-i)/2&&uf-c*o/2))return u>l+c/2?1:-1;return 0}(t,s,n,i,x?1:u.swapThreshold,null==u.invertedSwapThreshold?u.swapThreshold:u.invertedSwapThreshold,Ct,gt===s),0!==g){var k=L(K);do{k-=g,b=J.children[k]}while(b&&("none"===C(b,"display")||b===Z))}if(0===g||b===s)return F(!1);gt=s,yt=g;var j=s.nextElementSibling,M=!1,N=zt(Q,o,K,e,s,n,t,M=1===g);if(!1!==N)return 1!==N&&-1!==N||(M=1===N),Tt=!0,setTimeout(Ht,30),I(),M&&!j?o.appendChild(K):s.parentNode.insertBefore(K,M?j:s),E&&R(E,0,T-E.scrollTop),J=K.parentNode,void 0===y||Ct||(bt=Math.abs(y-$(s)[O])),B(),F(!0)}if(o.contains(K))return F(!1)}return!1}function P(u,c){X(u,h,a({evt:t,isOwner:f,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:p,fromSortable:d,target:s,completed:F,onMove:function(n,r){return zt(Q,o,K,e,n,$(n),t,r)},changed:B},c))}function I(){P("dragOverAnimationCapture"),h.captureAnimationState(),h!==d&&d.captureAnimationState()}function F(e){return P("dragOverCompleted",{insertion:e}),e&&(f?l._hideClone():l._showClone(h),h!==d&&(S(K,ct?ct.options.ghostClass:l.options.ghostClass,!1),S(K,u.ghostClass,!0)),ct!==h&&h!==Bt.active?ct=h:h===Bt.active&&ct&&(ct=null),d===h&&(h._ignoreWhileAnimating=s),h.animateAll((function(){P("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(s===K&&!K.animated||s===o&&!s.animated)&&(gt=null),u.dragoverBubble||t.rootEl||s===document||(K.parentNode[V]._isOutsideThisEl(t.target),!e&&Rt(t)),!u.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),v=!0}function B(){ot=L(K),st=L(K,u.draggable),Y({sortable:h,name:"change",toEl:o,newIndex:ot,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Rt),y(document,"mousemove",Rt),y(document,"touchmove",Rt)},_offUpEvents:function(){var t=this.el.ownerDocument;y(t,"mouseup",this._onDrop),y(t,"touchend",this._onDrop),y(t,"pointerup",this._onDrop),y(t,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;ot=L(K),st=L(K,n.draggable),X("drop",this,{evt:t}),J=K&&K.parentNode,ot=L(K),st=L(K,n.draggable),Bt.eventCanceled||(wt=!1,Ct=!1,St=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&C(document.body,"user-select",""),C(K,"transform",""),t&&(mt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Z&&Z.parentNode&&Z.parentNode.removeChild(Z),(Q===J||ct&&"clone"!==ct.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),K&&(this.nativeDraggable&&y(K,"dragend",this),Vt(K),K.style["will-change"]="",mt&&!wt&&S(K,ct?ct.options.ghostClass:this.options.ghostClass,!1),S(K,this.options.chosenClass,!1),Y({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==J?(ot>=0&&(Y({rootEl:J,name:"add",toEl:J,fromEl:Q,originalEvent:t}),Y({sortable:this,name:"remove",toEl:J,originalEvent:t}),Y({rootEl:J,name:"sort",toEl:J,fromEl:Q,originalEvent:t}),Y({sortable:this,name:"sort",toEl:J,originalEvent:t})),ct&&ct.save()):ot!==it&&ot>=0&&(Y({sortable:this,name:"update",toEl:J,originalEvent:t}),Y({sortable:this,name:"sort",toEl:J,originalEvent:t})),Bt.active&&(null!=ot&&-1!==ot||(ot=it,st=at),Y({sortable:this,name:"end",toEl:J,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){X("nulling",this),Q=K=J=Z=tt=nt=et=rt=lt=ft=mt=ot=st=it=at=gt=yt=ct=ut=Bt.dragged=Bt.ghost=Bt.clone=Bt.active=null,kt.forEach((function(t){t.checked=!0})),kt.length=pt=dt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":K&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r1&&(he.forEach((function(t){r.addAnimationState({target:t,rect:ge?$(t):i}),z(t),t.fromRect=i,e.removeAnimationState(t)})),ge=!1,function(t,e){he.forEach((function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,r=t.insertion,i=t.activeSortable,o=t.parentEl,a=t.putSortable,s=this.options;if(r){if(n&&i._hideClone(),me=!1,s.animation&&he.length>1&&(ge||!n&&!i.options.sort&&!a)){var u=$(fe,!1,!0,!0);he.forEach((function(t){t!==fe&&(B(t,u),o.appendChild(t))})),ge=!0}if(!n)if(ge||we(),he.length>1){var c=de;i._showClone(e),i.options.animation&&!de&&c&&ve.forEach((function(t){i.addAnimationState({target:t,rect:pe}),t.fromRect=pe,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,r=t.activeSortable;if(he.forEach((function(t){t.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){pe=o({},e);var i=E(fe,!0);pe.top-=i.f,pe.left-=i.e}},dragOverAnimationComplete:function(){ge&&(ge=!1,we())},drop:function(t){var e=t.originalEvent,n=t.rootEl,r=t.parentEl,i=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,u=s||this.sortable;if(e){var c=this.options,l=r.children;if(!ye)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),S(fe,c.selectedClass,!~he.indexOf(fe)),~he.indexOf(fe))he.splice(he.indexOf(fe),1),ce=null,G({sortable:i,rootEl:n,name:"deselect",targetEl:fe,originalEvt:e});else{if(he.push(fe),G({sortable:i,rootEl:n,name:"select",targetEl:fe,originalEvt:e}),e.shiftKey&&ce&&i.el.contains(ce)){var f,p,d=L(ce),h=L(fe);if(~d&&~h&&d!==h)for(h>d?(p=d,f=h):(p=h,f=d+1);p1){var v=$(fe),m=L(fe,":not(."+this.options.selectedClass+")");if(!me&&c.animation&&(fe.thisAnimationDuration=null),u.captureAnimationState(),!me&&(c.animation&&(fe.fromRect=v,he.forEach((function(t){if(t.thisAnimationDuration=null,t!==fe){var e=ge?$(t):v;t.fromRect=e,u.addAnimationState({target:t,rect:e})}}))),we(),he.forEach((function(t){l[m]?r.insertBefore(t,l[m]):r.appendChild(t),m++})),a===L(fe))){var g=!1;he.forEach((function(t){t.sortableIndex===L(t)||(g=!0)})),g&&o("update")}he.forEach((function(t){z(t)})),u.animateAll()}le=u}(n===r||s&&"clone"!==s.lastPutMode)&&ve.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,ve.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||le!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;he.length;){var e=he[0];S(e,this.options.selectedClass,!1),he.shift(),G({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},o(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[V];e&&e.options.multiDrag&&!~he.indexOf(t)&&(le&&le!==e&&(le.multiDrag._deselectMultiDrag(),le=e),S(t,e.options.selectedClass,!0),he.push(t))},deselect:function(t){var e=t.parentNode[V],n=he.indexOf(t);e&&e.options.multiDrag&&~n&&(S(t,e.options.selectedClass,!1),he.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return he.forEach((function(r){var i;e.push({multiDragElement:r,index:r.sortableIndex}),i=ge&&r!==fe?-1:ge?L(r,":not(."+t.options.selectedClass+")"):L(r),n.push({multiDragElement:r,index:i})})),{items:u(he),clones:[].concat(ve),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function _e(t,e){ve.forEach((function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function we(){he.forEach((function(t){t!==fe&&t.parentNode&&t.parentNode.removeChild(t)}))}Bt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):this.options.supportPointer?g(document,"pointermove",this._handleFallbackAutoScroll):e.touches?g(document,"touchmove",this._handleFallbackAutoScroll):g(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),ne(),ee(),clearTimeout(x),x=void 0},nulling:function(){Jt=Xt=Gt=te=Zt=Yt=Kt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Jt=t,e||f||l||d){ie(t,this.options,o,e);var a=N(o,!0);!te||Zt&&r===Yt&&i===Kt||(Zt&&ne(),Zt=setInterval((function(){var o=N(document.elementFromPoint(r,i),!0);o!==a&&(a=o,ee()),ie(t,n.options,o,e)}),10),Yt=r,Kt=i)}else{if(!this.options.bubbleScroll||N(o,!0)===k())return void ee();ie(t,this.options,N(o,!1),!1)}}},o(t,{pluginName:"scroll",initializeByDefault:!0})}),Bt.mount(se,ae);const xe=Bt},3379:(t,e,n)=>{"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n{"use strict";function r(t){return r="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},r(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){for(var n=0;nut});var a,s=n(8981),u=n(8446),c=n.n(u);function l(){l.init||(l.init=!0,a=-1!==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 r=t.indexOf("Edge/");return r>0?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1}())}function f(t,e,n,r,i,o,a,s,u,c){"boolean"!=typeof a&&(u=s,s=a,a=!1);var l,f="function"==typeof n?n.options:n;if(t&&t.render&&(f.render=t.render,f.staticRenderFns=t.staticRenderFns,f._compiled=!0,i&&(f.functional=!0)),r&&(f._scopeId=r),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,u(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},f._ssrRegister=l):e&&(l=a?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),l)if(f.functional){var p=f.render;f.render=function(t,e){return l.call(e),p(t,e)}}else{var d=f.beforeCreate;f.beforeCreate=d?[].concat(d,l):[l]}return n}var p={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},mounted:function(){var t=this;l(),this.$nextTick((function(){t._w=t.$el.offsetWidth,t._h=t.$el.offsetHeight,t.emitOnMount&&t.emitSize()}));var e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",a&&this.$el.appendChild(e),e.data="about:blank",a||this.$el.appendChild(e)},beforeDestroy:function(){this.removeResizeHandlers()},methods:{compareAndNotify:function(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize:function(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!a&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},d=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})};d._withStripped=!0;var h=f({render:d,staticRenderFns:[]},undefined,p,"data-v-8859cc6c",false,undefined,!1,void 0,void 0,void 0);var v={version:"1.0.1",install:function(t){t.component("resize-observer",h),t.component("ResizeObserver",h)}},m=null;"undefined"!=typeof window?m=window.Vue:void 0!==n.g&&(m=n.g.Vue),m&&m.use(v);var g=n(3857),y=n.n(g),b=function(){};function _(t){return"string"==typeof t&&(t=t.split(" ")),t}function w(t,e){var n,r=_(e);n=t.className instanceof b?_(t.className.baseVal):_(t.className),r.forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),t instanceof SVGElement?t.setAttribute("class",n.join(" ")):t.className=n.join(" ")}function x(t,e){var n,r=_(e);n=t.className instanceof b?_(t.className.baseVal):_(t.className),r.forEach((function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})),t instanceof SVGElement?t.setAttribute("class",n.join(" ")):t.className=n.join(" ")}"undefined"!=typeof window&&(b=window.SVGAnimatedString);var O=!1;if("undefined"!=typeof window){O=!1;try{var S=Object.defineProperty({},"passive",{get:function(){O=!0}});window.addEventListener("test",null,S)}catch(t){}}function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e

',trigger:"hover focus",offset:0},k=[],$=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"_events",[]),i(this,"_setTooltipNodeEvent",(function(t,e,n,i){var o=t.relatedreference||t.toElement||t.relatedTarget;return!!r._tooltipNode.contains(o)&&(r._tooltipNode.addEventListener(t.type,(function n(o){var a=o.relatedreference||o.toElement||o.relatedTarget;r._tooltipNode.removeEventListener(t.type,n),e.contains(a)||r._scheduleHide(e,i.delay,i,o)})),!0)})),n=E(E({},T),n),e.jquery&&(e=e[0]),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.reference=e,this.options=n,this._isOpen=!1,this._init()}var e,n,r;return e=t,(n=[{key:"show",value:function(){this._show(this.reference,this.options)}},{key:"hide",value:function(){this._hide()}},{key:"dispose",value:function(){this._dispose()}},{key:"toggle",value:function(){return this._isOpen?this.hide():this.show()}},{key:"setClasses",value:function(t){this._classes=t}},{key:"setContent",value:function(t){this.options.title=t,this._tooltipNode&&this._setContent(t,this.options)}},{key:"setOptions",value:function(t){var e=!1,n=t&&t.classes||B.options.defaultClass;c()(this._classes,n)||(this.setClasses(n),e=!0),t=N(t);var r=!1,i=!1;for(var o in this.options.offset===t.offset&&this.options.placement===t.placement||(r=!0),(this.options.template!==t.template||this.options.trigger!==t.trigger||this.options.container!==t.container||e)&&(i=!0),t)this.options[o]=t[o];if(this._tooltipNode)if(i){var a=this._isOpen;this.dispose(),this._init(),a&&this.show()}else r&&this.popperInstance.update()}},{key:"_init",value:function(){var t="string"==typeof this.options.trigger?this.options.trigger.split(" "):[];this._isDisposed=!1,this._enableDocumentTouch=-1===t.indexOf("manual"),t=t.filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})),this._setEventListeners(this.reference,t,this.options),this.$_originalTitle=this.reference.getAttribute("title"),this.reference.removeAttribute("title"),this.reference.setAttribute("data-original-title",this.$_originalTitle)}},{key:"_create",value:function(t,e){var n=this,r=window.document.createElement("div");r.innerHTML=e.trim();var i=r.childNodes[0];return i.id=this.options.ariaId||"tooltip_".concat(Math.random().toString(36).substr(2,10)),i.setAttribute("aria-hidden","true"),this.options.autoHide&&-1!==this.options.trigger.indexOf("hover")&&(i.addEventListener("mouseenter",(function(e){return n._scheduleHide(t,n.options.delay,n.options,e)})),i.addEventListener("click",(function(e){return n._scheduleHide(t,n.options.delay,n.options,e)}))),i}},{key:"_setContent",value:function(t,e){var n=this;this.asyncContent=!1,this._applyContent(t,e).then((function(){n.popperInstance&&n.popperInstance.update()}))}},{key:"_applyContent",value:function(t,e){var n=this;return new Promise((function(r,i){var o=e.html,a=n._tooltipNode;if(a){var s=a.querySelector(n.options.innerSelector);if(1===t.nodeType){if(o){for(;s.firstChild;)s.removeChild(s.firstChild);s.appendChild(t)}}else{if("function"==typeof t){var u=t();return void(u&&"function"==typeof u.then?(n.asyncContent=!0,e.loadingClass&&w(a,e.loadingClass),e.loadingContent&&n._applyContent(e.loadingContent,e),u.then((function(t){return e.loadingClass&&x(a,e.loadingClass),n._applyContent(t,e)})).then(r).catch(i)):n._applyContent(u,e).then(r).catch(i))}o?s.innerHTML=t:s.innerText=t}r()}}))}},{key:"_show",value:function(t,e){if(!e||"string"!=typeof e.container||document.querySelector(e.container)){clearTimeout(this._disposeTimer),delete(e=Object.assign({},e)).offset;var n=!0;this._tooltipNode&&(w(this._tooltipNode,this._classes),n=!1);var r=this._ensureShown(t,e);return n&&this._tooltipNode&&w(this._tooltipNode,this._classes),w(t,["v-tooltip-open"]),r}}},{key:"_ensureShown",value:function(t,e){var n=this;if(this._isOpen)return this;if(this._isOpen=!0,k.push(this),this._tooltipNode)return this._tooltipNode.style.display="",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.enableEventListeners(),this.popperInstance.update(),this.asyncContent&&this._setContent(e.title,e),this;var r=t.getAttribute("title")||e.title;if(!r)return this;var i=this._create(t,e.template);this._tooltipNode=i,t.setAttribute("aria-describedby",i.id);var o=this._findContainer(e.container,t);this._append(i,o);var a=E(E({},e.popperOptions),{},{placement:e.placement});return a.modifiers=E(E({},a.modifiers),{},{arrow:{element:this.options.arrowSelector}}),e.boundariesElement&&(a.modifiers.preventOverflow={boundariesElement:e.boundariesElement}),this.popperInstance=new s.Z(t,i,a),this._setContent(r,e),requestAnimationFrame((function(){!n._isDisposed&&n.popperInstance?(n.popperInstance.update(),requestAnimationFrame((function(){n._isDisposed?n.dispose():n._isOpen&&i.setAttribute("aria-hidden","false")}))):n.dispose()})),this}},{key:"_noLongerOpen",value:function(){var t=k.indexOf(this);-1!==t&&k.splice(t,1)}},{key:"_hide",value:function(){var t=this;if(!this._isOpen)return this;this._isOpen=!1,this._noLongerOpen(),this._tooltipNode.style.display="none",this._tooltipNode.setAttribute("aria-hidden","true"),this.popperInstance&&this.popperInstance.disableEventListeners(),clearTimeout(this._disposeTimer);var e=B.options.disposeTimeout;return null!==e&&(this._disposeTimer=setTimeout((function(){t._tooltipNode&&(t._tooltipNode.removeEventListener("mouseenter",t.hide),t._tooltipNode.removeEventListener("click",t.hide),t._removeTooltipNode())}),e)),x(this.reference,["v-tooltip-open"]),this}},{key:"_removeTooltipNode",value:function(){if(this._tooltipNode){var t=this._tooltipNode.parentNode;t&&(t.removeChild(this._tooltipNode),this.reference.removeAttribute("aria-describedby")),this._tooltipNode=null}}},{key:"_dispose",value:function(){var t=this;return this._isDisposed=!0,this.reference.removeAttribute("data-original-title"),this.$_originalTitle&&this.reference.setAttribute("title",this.$_originalTitle),this._events.forEach((function(e){var n=e.func,r=e.event;t.reference.removeEventListener(r,n)})),this._events=[],this._tooltipNode?(this._hide(),this._tooltipNode.removeEventListener("mouseenter",this.hide),this._tooltipNode.removeEventListener("click",this.hide),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||this._removeTooltipNode()):this._noLongerOpen(),this}},{key:"_findContainer",value:function(t,e){return"string"==typeof t?t=window.document.querySelector(t):!1===t&&(t=e.parentNode),t}},{key:"_append",value:function(t,e){e.appendChild(t)}},{key:"_setEventListeners",value:function(t,e,n){var r=this,i=[],o=[];e.forEach((function(t){switch(t){case"hover":i.push("mouseenter"),o.push("mouseleave"),r.options.hideOnTargetClick&&o.push("click");break;case"focus":i.push("focus"),o.push("blur"),r.options.hideOnTargetClick&&o.push("click");break;case"click":i.push("click"),o.push("click")}})),i.forEach((function(e){var i=function(e){!0!==r._isOpen&&(e.usedByTooltip=!0,r._scheduleShow(t,n.delay,n,e))};r._events.push({event:e,func:i}),t.addEventListener(e,i)})),o.forEach((function(e){var i=function(e){!0!==e.usedByTooltip&&r._scheduleHide(t,n.delay,n,e)};r._events.push({event:e,func:i}),t.addEventListener(e,i)}))}},{key:"_onDocumentTouch",value:function(t){this._enableDocumentTouch&&this._scheduleHide(this.reference,this.options.delay,this.options,t)}},{key:"_scheduleShow",value:function(t,e,n){var r=this,i=e&&e.show||e||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout((function(){return r._show(t,n)}),i)}},{key:"_scheduleHide",value:function(t,e,n,r){var i=this,o=e&&e.hide||e||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout((function(){if(!1!==i._isOpen&&i._tooltipNode.ownerDocument.body.contains(i._tooltipNode)){if("mouseleave"===r.type&&i._setTooltipNodeEvent(r,t,e,n))return;i._hide(t,n)}}),o)}}])&&o(e.prototype,n),r&&o(e,r),t}();function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e
',defaultArrowSelector:".tooltip-arrow, .tooltip__arrow",defaultInnerSelector:".tooltip-inner, .tooltip__inner",defaultDelay:0,defaultTrigger:"hover focus",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},defaultLoadingClass:"tooltip-loading",defaultLoadingContent:"...",autoHide:!0,defaultHideOnTargetClick:!0,disposeTimeout:5e3,popover:{defaultPlacement:"bottom",defaultClass:"vue-popover-theme",defaultBaseClass:"tooltip popover",defaultWrapperClass:"wrapper",defaultInnerClass:"tooltip-inner popover-inner",defaultArrowClass:"tooltip-arrow popover-arrow",defaultOpenClass:"open",defaultDelay:0,defaultTrigger:"click",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},defaultAutoHide:!0,defaultHandleResize:!0}};function N(t){var e={placement:void 0!==t.placement?t.placement:B.options.defaultPlacement,delay:void 0!==t.delay?t.delay:B.options.defaultDelay,html:void 0!==t.html?t.html:B.options.defaultHtml,template:void 0!==t.template?t.template:B.options.defaultTemplate,arrowSelector:void 0!==t.arrowSelector?t.arrowSelector:B.options.defaultArrowSelector,innerSelector:void 0!==t.innerSelector?t.innerSelector:B.options.defaultInnerSelector,trigger:void 0!==t.trigger?t.trigger:B.options.defaultTrigger,offset:void 0!==t.offset?t.offset:B.options.defaultOffset,container:void 0!==t.container?t.container:B.options.defaultContainer,boundariesElement:void 0!==t.boundariesElement?t.boundariesElement:B.options.defaultBoundariesElement,autoHide:void 0!==t.autoHide?t.autoHide:B.options.autoHide,hideOnTargetClick:void 0!==t.hideOnTargetClick?t.hideOnTargetClick:B.options.defaultHideOnTargetClick,loadingClass:void 0!==t.loadingClass?t.loadingClass:B.options.defaultLoadingClass,loadingContent:void 0!==t.loadingContent?t.loadingContent:B.options.defaultLoadingContent,popperOptions:j({},void 0!==t.popperOptions?t.popperOptions:B.options.defaultPopperOptions)};if(e.offset){var n=r(e.offset),i=e.offset;("number"===n||"string"===n&&-1===i.indexOf(","))&&(i="0, ".concat(i)),e.popperOptions.modifiers||(e.popperOptions.modifiers={}),e.popperOptions.modifiers.offset={offset:i}}return e.trigger&&-1!==e.trigger.indexOf("click")&&(e.hideOnTargetClick=!1),e}function P(t,e){for(var n=t.placement,r=0;r2&&void 0!==arguments[2]?arguments[2]:{},i=I(e),o=void 0!==e.classes?e.classes:B.options.defaultClass,a=j({title:i},N(j(j({},"object"===r(e)?e:{}),{},{placement:P(e,n)}))),s=t._tooltip=new $(t,a);s.setClasses(o),s._vueEl=t;var u=void 0!==e.targetClasses?e.targetClasses:B.options.defaultTargetClass;return t._tooltipTargetClasses=u,w(t,u),s}(t,n,o),void 0!==n.show&&n.show!==t._tooltipOldShow&&(t._tooltipOldShow=n.show,n.show?i.show():i.hide())):R(t)}var B={options:M,bind:F,update:F,unbind:function(t){R(t)}};function z(t){t.addEventListener("click",H),t.addEventListener("touchstart",U,!!O&&{passive:!0})}function V(t){t.removeEventListener("click",H),t.removeEventListener("touchstart",U),t.removeEventListener("touchend",W),t.removeEventListener("touchcancel",q)}function H(t){var e=t.currentTarget;t.closePopover=!e.$_vclosepopover_touch,t.closeAllPopover=e.$_closePopoverModifiers&&!!e.$_closePopoverModifiers.all}function U(t){if(1===t.changedTouches.length){var e=t.currentTarget;e.$_vclosepopover_touch=!0;var n=t.changedTouches[0];e.$_vclosepopover_touchPoint=n,e.addEventListener("touchend",W),e.addEventListener("touchcancel",q)}}function W(t){var e=t.currentTarget;if(e.$_vclosepopover_touch=!1,1===t.changedTouches.length){var n=t.changedTouches[0],r=e.$_vclosepopover_touchPoint;t.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,t.closeAllPopover=e.$_closePopoverModifiers&&!!e.$_closePopoverModifiers.all}}function q(t){t.currentTarget.$_vclosepopover_touch=!1}var G={bind:function(t,e){var n=e.value,r=e.modifiers;t.$_closePopoverModifiers=r,(void 0===n||n)&&z(t)},update:function(t,e){var n=e.value,r=e.oldValue,i=e.modifiers;t.$_closePopoverModifiers=i,n!==r&&(void 0===n||n?z(t):V(t))},unbind:function(t){V(t)}};function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Y(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=e.event;e.skipDelay;var r=e.force,i=void 0!==r&&r;!i&&this.disabled||(this.$_scheduleShow(n),this.$emit("show")),this.$emit("update:open",!0),this.$_beingShowed=!0,requestAnimationFrame((function(){t.$_beingShowed=!1}))},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.event;t.skipDelay,this.$_scheduleHide(e),this.$emit("hide"),this.$emit("update:open",!1)},dispose:function(){if(this.$_isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.popperInstance&&(this.popperInstance.destroy(),!this.popperInstance.options.removeOnDestroy)){var t=this.$refs.popover;t.parentNode&&t.parentNode.removeChild(t)}this.$_mounted=!1,this.popperInstance=null,this.isOpen=!1,this.$emit("dispose")},$_init:function(){-1===this.trigger.indexOf("manual")&&this.$_addEventListeners()},$_show:function(){var t=this,e=this.$refs.trigger,n=this.$refs.popover;if(clearTimeout(this.$_disposeTimer),!this.isOpen){if(this.popperInstance&&(this.isOpen=!0,this.popperInstance.enableEventListeners(),this.popperInstance.scheduleUpdate()),!this.$_mounted){var r=this.$_findContainer(this.container,e);if(!r)return void console.warn("No container for popover",this);r.appendChild(n),this.$_mounted=!0,this.isOpen=!1,this.popperInstance&&requestAnimationFrame((function(){t.hidden||(t.isOpen=!0)}))}if(!this.popperInstance){var i=Y(Y({},this.popperOptions),{},{placement:this.placement});if(i.modifiers=Y(Y({},i.modifiers),{},{arrow:Y(Y({},i.modifiers&&i.modifiers.arrow),{},{element:this.$refs.arrow})}),this.offset){var o=this.$_getOffset();i.modifiers.offset=Y(Y({},i.modifiers&&i.modifiers.offset),{},{offset:o})}this.boundariesElement&&(i.modifiers.preventOverflow=Y(Y({},i.modifiers&&i.modifiers.preventOverflow),{},{boundariesElement:this.boundariesElement})),this.popperInstance=new s.Z(e,n,i),requestAnimationFrame((function(){if(t.hidden)return t.hidden=!1,void t.$_hide();!t.$_isDisposed&&t.popperInstance?(t.popperInstance.scheduleUpdate(),requestAnimationFrame((function(){if(t.hidden)return t.hidden=!1,void t.$_hide();t.$_isDisposed?t.dispose():t.isOpen=!0}))):t.dispose()}))}var a=this.openGroup;if(a)for(var u,c=0;c1&&void 0!==arguments[1]&&arguments[1];if(clearTimeout(this.$_scheduleTimer),t)this.$_show();else{var e=parseInt(this.delay&&this.delay.show||this.delay||0);this.$_scheduleTimer=setTimeout(this.$_show.bind(this),e)}},$_scheduleHide:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(clearTimeout(this.$_scheduleTimer),n)this.$_hide();else{var r=parseInt(this.delay&&this.delay.hide||this.delay||0);this.$_scheduleTimer=setTimeout((function(){if(t.isOpen){if(e&&"mouseleave"===e.type)if(t.$_setTooltipNodeEvent(e))return;t.$_hide()}}),r)}},$_setTooltipNodeEvent:function(t){var e=this,n=this.$refs.trigger,r=this.$refs.popover,i=t.relatedreference||t.toElement||t.relatedTarget;return!!r.contains(i)&&(r.addEventListener(t.type,(function i(o){var a=o.relatedreference||o.toElement||o.relatedTarget;r.removeEventListener(t.type,i),n.contains(a)||e.hide({event:o})})),!0)},$_removeEventListeners:function(){var t=this.$refs.trigger;this.$_events.forEach((function(e){var n=e.func,r=e.event;t.removeEventListener(r,n)})),this.$_events=[]},$_updatePopper:function(t){this.popperInstance&&(t(),this.isOpen&&this.popperInstance.scheduleUpdate())},$_restartPopper:function(){if(this.popperInstance){var t=this.isOpen;this.dispose(),this.$_isDisposed=!1,this.$_init(),t&&this.show({skipDelay:!0,force:!0})}},$_handleGlobalClose:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.$_beingShowed||(this.hide({event:t}),t.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),n&&(this.$_preventOpen=!0,setTimeout((function(){e.$_preventOpen=!1}),300)))},$_handleResize:function(){this.isOpen&&this.popperInstance&&(this.popperInstance.scheduleUpdate(),this.$emit("resize"))}}};function et(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(n){var r=Z[n];if(r.$refs.popover){var i=r.$refs.popover.contains(t.target);requestAnimationFrame((function(){(t.closeAllPopover||t.closePopover&&i||r.autoHide&&!i)&&r.$_handleGlobalClose(t,e)}))}},r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(!t.installed){t.installed=!0;var r={};y()(r,M,n),at.options=r,B.options=r,e.directive("tooltip",B),e.directive("close-popover",G),e.component("VPopover",ot)}},get enabled(){return D.enabled},set enabled(t){D.enabled=t}},st=null;"undefined"!=typeof window?st=window.Vue:void 0!==n.g&&(st=n.g.Vue),st&&st.use(at);const ut=at},7152:(t,e,n)=>{"use strict";n.d(e,{Z:()=>K});var r=["compactDisplay","currency","currencyDisplay","currencySign","localeMatcher","notation","numberingSystem","signDisplay","style","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"];function i(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var o=Array.isArray;function a(t){return null!==t&&"object"==typeof t}function s(t){return"string"==typeof t}var u=Object.prototype.toString;function c(t){return"[object Object]"===u.call(t)}function l(t){return null==t}function f(t){return"function"==typeof t}function p(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=null,r=null;return 1===t.length?a(t[0])||o(t[0])?r=t[0]:"string"==typeof t[0]&&(n=t[0]):2===t.length&&("string"==typeof t[0]&&(n=t[0]),(a(t[1])||o(t[1]))&&(r=t[1])),{locale:n,params:r}}function d(t){return JSON.parse(JSON.stringify(t))}function h(t,e){return!!~t.indexOf(e)}var v=Object.prototype.hasOwnProperty;function m(t,e){return v.call(t,e)}function g(t){for(var e=arguments,n=Object(t),r=1;r/g,">").replace(/"/g,""").replace(/'/g,"'"))})),t}var _={name:"i18n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},path:{type:String,required:!0},locale:{type:String},places:{type:[Array,Object]}},render:function(t,e){var n=e.data,r=e.parent,i=e.props,o=e.slots,a=r.$i18n;if(a){var s=i.path,u=i.locale,c=i.places,l=o(),f=a.i(s,u,function(t){var e;for(e in t)if("default"!==e)return!1;return Boolean(e)}(l)||c?function(t,e){var n=e?function(t){0;return Array.isArray(t)?t.reduce(x,{}):Object.assign({},t)}(e):{};if(!t)return n;var r=(t=t.filter((function(t){return t.tag||""!==t.text.trim()}))).every(O);0;return t.reduce(r?w:x,n)}(l.default,c):l),p=i.tag&&!0!==i.tag||!1===i.tag?i.tag:"span";return p?t(p,n,f):f}}};function w(t,e){return e.data&&e.data.attrs&&e.data.attrs.place&&(t[e.data.attrs.place]=e),t}function x(t,e,n){return t[n]=e,t}function O(t){return Boolean(t.data&&t.data.attrs&&t.data.attrs.place)}var S,C={name:"i18n-n",functional:!0,props:{tag:{type:[String,Boolean,Object],default:"span"},value:{type:Number,required:!0},format:{type:[String,Object]},locale:{type:String}},render:function(t,e){var n=e.props,i=e.parent,o=e.data,u=i.$i18n;if(!u)return null;var c=null,l=null;s(n.format)?c=n.format:a(n.format)&&(n.format.key&&(c=n.format.key),l=Object.keys(n.format).reduce((function(t,e){var i;return h(r,e)?Object.assign({},t,((i={})[e]=n.format[e],i)):t}),null));var f=n.locale||u.locale,p=u._ntp(n.value,f,c,l),d=p.map((function(t,e){var n,r=o.scopedSlots&&o.scopedSlots[t.type];return r?r(((n={})[t.type]=t.value,n.index=e,n.parts=p,n)):t.value})),v=n.tag&&!0!==n.tag||!1===n.tag?n.tag:"span";return v?t(v,{attrs:o.attrs,class:o.class,staticClass:o.staticClass},d):d}};function E(t,e,n){$(t,n)&&A(t,e,n)}function T(t,e,n,r){if($(t,n)){var i=n.context.$i18n;(function(t,e){var n=e.context;return t._locale===n.$i18n.locale})(t,n)&&y(e.value,e.oldValue)&&y(t._localeMessage,i.getLocaleMessage(i.locale))||A(t,e,n)}}function k(t,e,n,r){if(n.context){var o=n.context.$i18n||{};e.modifiers.preserve||o.preserveDirectiveContent||(t.textContent=""),t._vt=void 0,delete t._vt,t._locale=void 0,delete t._locale,t._localeMessage=void 0,delete t._localeMessage}else i("Vue instance does not exists in VNode context")}function $(t,e){var n=e.context;return n?!!n.$i18n||(i("VueI18n instance does not exists in Vue instance"),!1):(i("Vue instance does not exists in VNode context"),!1)}function A(t,e,n){var r,o,a=function(t){var e,n,r,i;s(t)?e=t:c(t)&&(e=t.path,n=t.locale,r=t.args,i=t.choice);return{path:e,locale:n,args:r,choice:i}}(e.value),u=a.path,l=a.locale,f=a.args,p=a.choice;if(u||l||f)if(u){var d=n.context;t._vt=t.textContent=null!=p?(r=d.$i18n).tc.apply(r,[u,p].concat(j(l,f))):(o=d.$i18n).t.apply(o,[u].concat(j(l,f))),t._locale=d.$i18n.locale,t._localeMessage=d.$i18n.getLocaleMessage(d.$i18n.locale)}else i("`path` is required in v-t directive");else i("value type not supported")}function j(t,e){var n=[];return t&&n.push(t),e&&(Array.isArray(e)||c(e))&&n.push(e),n}function D(t,e){void 0===e&&(e={bridge:!1}),D.installed=!0;(S=t).version&&Number(S.version.split(".")[0]);(function(t){t.prototype.hasOwnProperty("$i18n")||Object.defineProperty(t.prototype,"$i18n",{get:function(){return this._i18n}}),t.prototype.$t=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var i=this.$i18n;return i._tc.apply(i,[t,i.locale,i._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}})(S),S.mixin(function(t){function e(){this!==this.$root&&this.$options.__INTLIFY_META__&&this.$el&&this.$el.setAttribute("data-intlify",this.$options.__INTLIFY_META__)}return void 0===t&&(t=!1),t?{mounted:e}:{beforeCreate:function(){var t=this.$options;if(t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n){if(t.i18n instanceof X){if(t.__i18nBridge||t.__i18n)try{var e=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach((function(t){e=g(e,JSON.parse(t))})),Object.keys(e).forEach((function(n){t.i18n.mergeLocaleMessage(n,e[n])}))}catch(t){}this._i18n=t.i18n,this._i18nWatcher=this._i18n.watchI18nData()}else if(c(t.i18n)){var n=this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof X?this.$root.$i18n:null;if(n&&(t.i18n.root=this.$root,t.i18n.formatter=n.formatter,t.i18n.fallbackLocale=n.fallbackLocale,t.i18n.formatFallbackMessages=n.formatFallbackMessages,t.i18n.silentTranslationWarn=n.silentTranslationWarn,t.i18n.silentFallbackWarn=n.silentFallbackWarn,t.i18n.pluralizationRules=n.pluralizationRules,t.i18n.preserveDirectiveContent=n.preserveDirectiveContent),t.__i18nBridge||t.__i18n)try{var r=t.i18n&&t.i18n.messages?t.i18n.messages:{};(t.__i18nBridge||t.__i18n).forEach((function(t){r=g(r,JSON.parse(t))})),t.i18n.messages=r}catch(t){}var i=t.i18n.sharedMessages;i&&c(i)&&(t.i18n.messages=g(t.i18n.messages,i)),this._i18n=new X(t.i18n),this._i18nWatcher=this._i18n.watchI18nData(),(void 0===t.i18n.sync||t.i18n.sync)&&(this._localeWatcher=this.$i18n.watchLocale()),n&&n.onComponentInstanceCreated(this._i18n)}}else this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof X?this._i18n=this.$root.$i18n:t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof X&&(this._i18n=t.parent.$i18n)},beforeMount:function(){var t=this.$options;t.i18n=t.i18n||(t.__i18nBridge||t.__i18n?{}:null),t.i18n?(t.i18n instanceof X||c(t.i18n))&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0):(this.$root&&this.$root.$i18n&&this.$root.$i18n instanceof X||t.parent&&t.parent.$i18n&&t.parent.$i18n instanceof X)&&(this._i18n.subscribeDataChanging(this),this._subscribing=!0)},mounted:e,beforeDestroy:function(){if(this._i18n){var t=this;this.$nextTick((function(){t._subscribing&&(t._i18n.unsubscribeDataChanging(t),delete t._subscribing),t._i18nWatcher&&(t._i18nWatcher(),t._i18n.destroyVM(),delete t._i18nWatcher),t._localeWatcher&&(t._localeWatcher(),delete t._localeWatcher)}))}}}}(e.bridge)),S.directive("t",{bind:E,update:T,unbind:k}),S.component(_.name,_),S.component(C.name,C),S.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}var L=function(){this._caches=Object.create(null)};L.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=function(t){var e=[],n=0,r="";for(;n0)f--,l=4,p[0]();else{if(f=0,void 0===n)return!1;if(!1===(n=F(n)))return!1;p[1]()}};null!==l;)if(c++,"\\"!==(e=t[c])||!d()){if(i=R(e),8===(o=(s=P[l])[i]||s.else||8))return;if(l=o[0],(a=p[o[1]])&&(r=void 0===(r=o[2])?e:r,!1===a()))return;if(7===l)return u}}(t),e&&(this._cache[t]=e)),e||[]},B.prototype.getPathValue=function(t,e){if(!a(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var r=n.length,i=t,o=0;o/,H=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|./]+|\([\w\-_|./]+\)))/g,U=/^@(?:\.([a-z]+))?:/,W=/[()]/g,q={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},G=new L,X=function(t){var e=this;void 0===t&&(t={}),!S&&"undefined"!=typeof window&&window.Vue&&D(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),i=t.messages||{},o=t.dateTimeFormats||t.datetimeFormats||{},a=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||G,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new B,this._dataListeners=new Set,this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this._escapeParameterHtml=t.escapeParameterHtml||!1,"__VUE_I18N_BRIDGE__"in t&&(this.__VUE_I18N_BRIDGE__=t.__VUE_I18N_BRIDGE__),this.getChoiceIndex=function(t,n){var r=Object.getPrototypeOf(e);if(r&&r.getChoiceIndex)return r.getChoiceIndex.call(e,t,n);var i,o;return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):(i=t,o=n,i=Math.abs(i),2===o?i?i>1?1:0:1:i?Math.min(i,2):0)},this._exist=function(t,n){return!(!t||!n)&&(!l(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(i).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,i[t])})),this._initVM({locale:n,fallbackLocale:r,messages:i,dateTimeFormats:o,numberFormats:a})},Y={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0},sync:{configurable:!0}};X.prototype._checkLocaleMessage=function(t,e,n){var r=function(t,e,n,a){if(c(n))Object.keys(n).forEach((function(i){var o=n[i];c(o)?(a.push(i),a.push("."),r(t,e,o,a),a.pop(),a.pop()):(a.push(i),r(t,e,o,a),a.pop())}));else if(o(n))n.forEach((function(n,i){c(n)?(a.push("["+i+"]"),a.push("."),r(t,e,n,a),a.pop(),a.pop()):(a.push("["+i+"]"),r(t,e,n,a),a.pop())}));else if(s(n)){if(V.test(n)){var u="Detected HTML in message '"+n+"' of keypath '"+a.join("")+"' at '"+e+"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?i(u):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(u)}}};r(e,t,n,[])},X.prototype._initVM=function(t){var e=S.config.silent;S.config.silent=!0,this._vm=new S({data:t,__VUE18N__INSTANCE__:!0}),S.config.silent=e},X.prototype.destroyVM=function(){this._vm.$destroy()},X.prototype.subscribeDataChanging=function(t){this._dataListeners.add(t)},X.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.delete(e));}(this._dataListeners,t)},X.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",(function(){for(var e,n,r=(e=t._dataListeners,n=[],e.forEach((function(t){return n.push(t)})),n),i=r.length;i--;)S.nextTick((function(){r[i]&&r[i].$forceUpdate()}))}),{deep:!0})},X.prototype.watchLocale=function(t){if(t){if(!this.__VUE_I18N_BRIDGE__)return null;var e=this,n=this._vm;return this.vm.$watch("locale",(function(r){n.$set(n,"locale",r),e.__VUE_I18N_BRIDGE__&&t&&(t.locale.value=r),n.$forceUpdate()}),{immediate:!0})}if(!this._sync||!this._root)return null;var r=this._vm;return this._root.$i18n.vm.$watch("locale",(function(t){r.$set(r,"locale",t),r.$forceUpdate()}),{immediate:!0})},X.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},Y.vm.get=function(){return this._vm},Y.messages.get=function(){return d(this._getMessages())},Y.dateTimeFormats.get=function(){return d(this._getDateTimeFormats())},Y.numberFormats.get=function(){return d(this._getNumberFormats())},Y.availableLocales.get=function(){return Object.keys(this.messages).sort()},Y.locale.get=function(){return this._vm.locale},Y.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},Y.fallbackLocale.get=function(){return this._vm.fallbackLocale},Y.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},Y.formatFallbackMessages.get=function(){return this._formatFallbackMessages},Y.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},Y.missing.get=function(){return this._missing},Y.missing.set=function(t){this._missing=t},Y.formatter.get=function(){return this._formatter},Y.formatter.set=function(t){this._formatter=t},Y.silentTranslationWarn.get=function(){return this._silentTranslationWarn},Y.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},Y.silentFallbackWarn.get=function(){return this._silentFallbackWarn},Y.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},Y.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},Y.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},Y.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},Y.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach((function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])}))}},Y.postTranslation.get=function(){return this._postTranslation},Y.postTranslation.set=function(t){this._postTranslation=t},Y.sync.get=function(){return this._sync},Y.sync.set=function(t){this._sync=t},X.prototype._getMessages=function(){return this._vm.messages},X.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},X.prototype._getNumberFormats=function(){return this._vm.numberFormats},X.prototype._warnDefault=function(t,e,n,r,i,o){if(!l(n))return n;if(this._missing){var a=this._missing.apply(null,[t,e,r,i]);if(s(a))return a}else 0;if(this._formatFallbackMessages){var u=p.apply(void 0,i);return this._render(e,o,u.params,e)}return e},X.prototype._isFallbackRoot=function(t){return!t&&!l(this._root)&&this._fallbackRoot},X.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},X.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},X.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},X.prototype._interpolate=function(t,e,n,r,i,a,u){if(!e)return null;var p,d=this._path.getPathValue(e,n);if(o(d)||c(d))return d;if(l(d)){if(!c(e))return null;if(!s(p=e[n])&&!f(p))return null}else{if(!s(d)&&!f(d))return null;p=d}return s(p)&&(p.indexOf("@:")>=0||p.indexOf("@.")>=0)&&(p=this._link(t,e,p,r,"raw",a,u)),this._render(p,i,a,n)},X.prototype._link=function(t,e,n,r,i,a,s){var u=n,c=u.match(H);for(var l in c)if(c.hasOwnProperty(l)){var f=c[l],p=f.match(U),d=p[0],v=p[1],m=f.replace(d,"").replace(W,"");if(h(s,m))return u;s.push(m);var g=this._interpolate(t,e,m,r,"raw"===i?"string":i,"raw"===i?void 0:a,s);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");var y=this._root.$i18n;g=y._translate(y._getMessages(),y.locale,y.fallbackLocale,m,r,i,a)}g=this._warnDefault(t,m,g,r,o(a)?a:[a],i),this._modifiers.hasOwnProperty(v)?g=this._modifiers[v](g):q.hasOwnProperty(v)&&(g=q[v](g)),s.pop(),u=g?u.replace(f,g):u}return u},X.prototype._createMessageContext=function(t,e,n,r){var i=this,s=o(t)?t:[],u=a(t)?t:{},c=this._getMessages(),l=this.locale;return{list:function(t){return s[t]},named:function(t){return u[t]},values:t,formatter:e,path:n,messages:c,locale:l,linked:function(t){return i._interpolate(l,c[l]||{},t,null,r,void 0,[t])}}},X.prototype._render=function(t,e,n,r){if(f(t))return t(this._createMessageContext(n,this._formatter||G,r,e));var i=this._formatter.interpolate(t,n,r);return i||(i=G.interpolate(t,n,r)),"string"!==e||s(i)?i:i.join("")},X.prototype._appendItemToChain=function(t,e,n){var r=!1;return h(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},X.prototype._appendLocaleToChain=function(t,e,n){var r,i=e.split("-");do{var o=i.join("-");r=this._appendItemToChain(t,o,n),i.splice(-1,1)}while(i.length&&!0===r);return r},X.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,i=0;i0;)o[a]=arguments[a+4];if(!t)return"";var s=p.apply(void 0,o);this._escapeParameterHtml&&(s.params=b(s.params));var u=s.locale||e,c=this._translate(n,u,this.fallbackLocale,t,r,"string",s.params);if(this._isFallbackRoot(c)){if(!this._root)throw Error("unexpected error");return(i=this._root).$t.apply(i,[t].concat(o))}return c=this._warnDefault(u,t,c,r,o,"string"),this._postTranslation&&null!=c&&(c=this._postTranslation(c,t)),c},X.prototype.t=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},X.prototype._i=function(t,e,n,r,i){var o=this._translate(n,e,this.fallbackLocale,t,r,"raw",i);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,i)}return this._warnDefault(e,t,o,r,[i],"raw")},X.prototype.i=function(t,e,n){return t?(s(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},X.prototype._tc=function(t,e,n,r,i){for(var o,a=[],s=arguments.length-5;s-- >0;)a[s]=arguments[s+5];if(!t)return"";void 0===i&&(i=1);var u={count:i,n:i},c=p.apply(void 0,a);return c.params=Object.assign(u,c.params),a=null===c.locale?[c.params]:[c.locale,c.params],this.fetchChoice((o=this)._t.apply(o,[t,e,n,r].concat(a)),i)},X.prototype.fetchChoice=function(t,e){if(!t||!s(t))return null;var n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t},X.prototype.tc=function(t,e){for(var n,r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},X.prototype._te=function(t,e,n){for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var o=p.apply(void 0,r).locale||e;return this._exist(n[o],t)},X.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},X.prototype.getLocaleMessage=function(t){return d(this._vm.messages[t]||{})},X.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},X.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,g(void 0!==this._vm.messages[t]&&Object.keys(this._vm.messages[t]).length?Object.assign({},this._vm.messages[t]):{},e))},X.prototype.getDateTimeFormat=function(t){return d(this._vm.dateTimeFormats[t]||{})},X.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},X.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,g(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},X.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},X.prototype._localizeDateTime=function(t,e,n,r,i){for(var o=e,a=r[o],s=this._getLocaleChain(e,n),u=0;u0;)e[n]=arguments[n+1];var r=this.locale,i=null;return 1===e.length?s(e[0])?i=e[0]:a(e[0])&&(e[0].locale&&(r=e[0].locale),e[0].key&&(i=e[0].key)):2===e.length&&(s(e[0])&&(i=e[0]),s(e[1])&&(r=e[1])),this._d(t,r,i)},X.prototype.getNumberFormat=function(t){return d(this._vm.numberFormats[t]||{})},X.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},X.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,g(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},X.prototype._clearNumberFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},X.prototype._getNumberFormatter=function(t,e,n,r,i,o){for(var a=e,s=r[a],u=this._getLocaleChain(e,n),c=0;c0;)e[n]=arguments[n+1];var i=this.locale,o=null,u=null;return 1===e.length?s(e[0])?o=e[0]:a(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(o=e[0].key),u=Object.keys(e[0]).reduce((function(t,n){var i;return h(r,n)?Object.assign({},t,((i={})[n]=e[0][n],i)):t}),null)):2===e.length&&(s(e[0])&&(o=e[0]),s(e[1])&&(i=e[1])),this._n(t,i,o,u)},X.prototype._ntp=function(t,e,n,r){if(!X.availabilities.numberFormat)return[];if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).formatToParts(t);var i=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),o=i&&i.formatToParts(t);if(this._isFallbackRoot(o)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return o||[]},Object.defineProperties(X.prototype,Y),Object.defineProperty(X,"availabilities",{get:function(){if(!z){var t="undefined"!=typeof Intl;z={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return z}}),X.install=D,X.version="8.26.8";const K=X},7611:t=>{window,t.exports=function(){return n={},t.m=e=[function(t,e,n){var r=n(7);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n(4).default)("d763679c",r,!1,{})},function(t,e,n){var r=n(10);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n(4).default)("6b9cc0e0",r,!1,{})},function(t,e,n){var r=n(12);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n(4).default)("663c004e",r,!1,{})},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r),o=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;ithis.viewportWidth||t.clientX<0)&&!(t.clientY>this.viewportHeight||t.clientY<0)&&e){switch(this.targetClass){case"vue-modal-right":n-=e.offsetLeft,r=a;break;case"vue-modal-left":r=a,n=i+(this.initialX-t.clientX);break;case"vue-modal-top":n=i,r=a+(this.initialY-t.clientY);break;case"vue-modal-bottom":n=i,r-=e.offsetTop;break;case"vue-modal-bottomRight":n-=e.offsetLeft,r-=e.offsetTop;break;case"vue-modal-topRight":n-=e.offsetLeft,r=a+(this.initialY-t.clientY);break;case"vue-modal-bottomLeft":n=i+(this.initialX-t.clientX),r-=e.offsetTop;break;case"vue-modal-topLeft":n=i+(this.initialX-t.clientX),r=a+(this.initialY-t.clientY);break;default:console.error("Incorrrect/no resize direction.")}var s=Math.min(u(),this.maxWidth),c=Math.min(window.innerHeight,this.maxHeight);n=o(this.minWidth,s,n),r=o(this.minHeight,c,r),this.initialX=t.clientX,this.initialY=t.clientY,this.size={width:n,height:r};var l={width:n-i,height:r-a};e.style.width=n+"px",e.style.height=r+"px",this.$emit("resize",{element:e,size:this.size,direction:this.targetClass,dimGrowth:l})}}}};function h(t,e,n,r,i,o,a,s){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=u):i&&(u=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}n(6);var v=h(d,i,[],!1,null,null,null);v.options.__file="src/components/Resizer.vue";var m=v.exports;function g(t){return(g="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})(t)}function y(t){switch(g(t)){case"number":return{type:"px",value:t};case"string":return function(t){if("auto"===t)return{type:t,value:0};var e=w.find((function(e){return e.regexp.test(t)}));return e?{type:e.name,value:parseFloat(t)}:{type:"",value:t}}(t);default:return{type:"",value:t}}}function b(t){if("string"!=typeof t)return 0<=t;var e=y(t);return("%"===e.type||"px"===e.type)&&0=this.viewportHeight?Math.max(this.minHeight,this.viewportHeight)+"px":"auto"},containerClass:function(){return["vm--container",this.scrollable&&this.isAutoHeight&&"scrollable"]},modalClass:function(){return["vm--modal",this.classes]},stylesProp:function(){return"string"==typeof this.styles?c(this.styles):this.styles},modalStyle:function(){return[this.stylesProp,{top:this.position.top+"px",left:this.position.left+"px",width:this.trueModalWidth+"px",height:this.isAutoHeight?this.autoHeight:this.trueModalHeight+"px"}]},isComponentReadyToBeDestroyed:function(){return this.overlayTransitionState===M&&this.modalTransitionState===M}},watch:{isComponentReadyToBeDestroyed:function(t){t&&(this.visible=!1)}},methods:{startTransitionEnter:function(){this.visibility.overlay=!0,this.visibility.modal=!0},startTransitionLeave:function(){this.visibility.overlay=!1,this.visibility.modal=!1},beforeOverlayTransitionEnter:function(){this.overlayTransitionState=L},afterOverlayTransitionEnter:function(){this.overlayTransitionState=D},beforeOverlayTransitionLeave:function(){this.overlayTransitionState=N},afterOverlayTransitionLeave:function(){this.overlayTransitionState=M},beforeModalTransitionEnter:function(){var t=this;this.modalTransitionState=L,this.$nextTick((function(){t.resizeObserver.observe(t.$refs.modal)}))},afterModalTransitionEnter:function(){this.modalTransitionState=D,this.draggable&&this.addDraggableListeners(),this.focusTrap&&this.$focusTrap.enable(this.$refs.modal);var t=this.createModalEvent({state:"opened"});this.$emit("opened",t)},beforeModalTransitionLeave:function(){this.modalTransitionState=N,this.resizeObserver.unobserve(this.$refs.modal),this.$focusTrap.enabled()&&this.$focusTrap.disable()},afterModalTransitionLeave:function(){this.modalTransitionState=M;var t=this.createModalEvent({state:"closed"});this.$emit("closed",t)},onToggle:function(t,e,n){if(this.name===t){var r=void 0===e?!this.visible:e;this.toggle(r,n)}},setInitialSize:function(){var t=y(this.width),e=y(this.height);this.modal.width=t.value,this.modal.widthType=t.type,this.modal.height=e.value,this.modal.heightType=e.type},onEscapeKeyUp:function(t){27===t.which&&this.visible&&this.$modal.hide(this.name)},onWindowResize:function(){this.viewportWidth=u(),this.viewportHeight=window.innerHeight,this.ensureShiftInWindowBounds()},createModalEvent:function(t){var e=02&&void 0!==arguments[2]?arguments[2]:"0px";return"translate3d("+t+", "+e+", "+n+")"}},function(t,e,n){(t.exports=n(5)()).push([t.i,".vue-js-switch[data-v-25adc6c0]{display:inline-block;position:relative;vertical-align:middle;user-select:none;font-size:10px;cursor:pointer}.vue-js-switch .v-switch-input[data-v-25adc6c0]{opacity:0;position:absolute;width:1px;height:1px}.vue-js-switch .v-switch-label[data-v-25adc6c0]{position:absolute;top:0;font-weight:600;color:#fff;z-index:1}.vue-js-switch .v-switch-label.v-left[data-v-25adc6c0]{left:10px}.vue-js-switch .v-switch-label.v-right[data-v-25adc6c0]{right:10px}.vue-js-switch .v-switch-core[data-v-25adc6c0]{display:block;position:relative;box-sizing:border-box;outline:0;margin:0;transition:border-color .3s,background-color .3s;user-select:none}.vue-js-switch .v-switch-core .v-switch-button[data-v-25adc6c0]{display:block;position:absolute;overflow:hidden;top:0;left:0;border-radius:100%;background-color:#fff;z-index:2}.vue-js-switch.disabled[data-v-25adc6c0]{pointer-events:none;opacity:.6}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;en.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i{"use strict";function r(t,e,n,r,i,o,a,s){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=u):i&&(u=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}n.d(e,{Z:()=>r})},7907:function(t){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=60)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(49)("wks"),i=n(30),o=n(0).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(0),i=n(10),o=n(8),a=n(6),s=n(11),u=function(t,e,n){var c,l,f,p,d=t&u.F,h=t&u.G,v=t&u.S,m=t&u.P,g=t&u.B,y=h?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,b=h?i:i[e]||(i[e]={}),_=b.prototype||(b.prototype={});for(c in h&&(n=e),n)f=((l=!d&&y&&void 0!==y[c])?y:n)[c],p=g&&l?s(f,r):m&&"function"==typeof f?s(Function.call,f):f,y&&a(y,c,f,t&u.U),b[c]!=f&&o(b,c,p),m&&_[c]!=f&&(_[c]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){t.exports=!n(7)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(0),i=n(8),o=n(12),a=n(30)("src"),s=Function.toString,u=(""+s).split("toString");n(10).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,a)||i(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(13),i=n(25);t.exports=n(4)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(14);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(2),i=n(41),o=n(29),a=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports={}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){var r=n(23),i=n(16);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(53),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(11),i=n(23),o=n(28),a=n(19),s=n(64);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var v,m,g=o(e),y=i(g),b=r(s,h,3),_=a(y.length),w=0,x=n?d(e,_):u?d(e,0):void 0;_>w;w++)if((p||w in y)&&(m=b(v=y[w],w,g),t))if(n)x[w]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(l)return!1;return f?-1:c||l?l:x}}},function(t,e,n){var r=n(5),i=n(0).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(9);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(13).f,i=n(12),o=n(1)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(49)("keys"),i=n(30);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";var r=n(0),i=n(12),o=n(9),a=n(67),s=n(29),u=n(7),c=n(77).f,l=n(45).f,f=n(13).f,p=n(51).trim,d=r.Number,h=d,v=d.prototype,m="Number"==o(n(44)(v)),g="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),c=0,l=u.length;ci)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(m?u((function(){v.valueOf.call(n)})):"Number"!=o(n))?a(new h(y(e)),n,d):y(e)};for(var b,_=n(4)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;_.length>w;w++)i(h,b=_[w])&&!i(d,b)&&f(d,b,l(h,b));d.prototype=v,v.constructor=d,n(6)(r,"Number",d)}},function(t,e,n){"use strict";function r(t){return!(0===t||(!Array.isArray(t)||0!==t.length)&&t)}function i(t){return function(){return!t.apply(void 0,arguments)}}function o(t,e){return void 0===t&&(t="undefined"),null===t&&(t="null"),!1===t&&(t="false"),-1!==t.toString().toLowerCase().indexOf(e.trim())}function a(t,e,n,r){return t.filter((function(t){return o(r(t,n),e)}))}function s(t){return t.filter((function(t){return!t.$isLabel}))}function u(t,e){return function(n){return n.reduce((function(n,r){return r[t]&&r[t].length?(n.push({$groupLabel:r[e],$isLabel:!0}),n.concat(r[t])):n}),[])}}function c(t,e,r,i,o){return function(s){return s.map((function(s){var u;if(!s[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];var c=a(s[r],t,e,o);return c.length?(u={},n.i(h.a)(u,i,s[i]),n.i(h.a)(u,r,c),u):[]}))}}var l=n(59),f=n(54),p=(n.n(f),n(95)),d=(n.n(p),n(31)),h=(n.n(d),n(58)),v=n(91),m=(n.n(v),n(98)),g=(n.n(m),n(92)),y=(n.n(g),n(88)),b=(n.n(y),n(97)),_=(n.n(b),n(89)),w=(n.n(_),n(96)),x=(n.n(w),n(93)),O=(n.n(x),n(90)),S=(n.n(O),function(){for(var t=arguments.length,e=new Array(t),n=0;n-1},isSelected:function(t){var e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled:function(t){return!!t.$isDisabled},getOptionLabel:function(t){if(r(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;var e=this.customLabel(t,this.label);return r(e)?"":e},select:function(t,e){if(t.$isLabel&&this.groupSelect)this.selectGroup(t);else if(!(-1!==this.blockKeys.indexOf(e)||this.disabled||t.$isDisabled||t.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==e||this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t))return void("Tab"!==e&&this.removeElement(t));this.$emit("select",t,this.id),this.multiple?this.$emit("input",this.internalValue.concat([t]),this.id):this.$emit("input",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup:function(t){var e=this,n=this.options.find((function(n){return n[e.groupLabel]===t.$groupLabel}));if(n)if(this.wholeGroupSelected(n)){this.$emit("remove",n[this.groupValues],this.id);var r=this.internalValue.filter((function(t){return-1===n[e.groupValues].indexOf(t)}));this.$emit("input",r,this.id)}else{var i=n[this.groupValues].filter((function(t){return!(e.isOptionDisabled(t)||e.isSelected(t))}));this.$emit("select",i,this.id),this.$emit("input",this.internalValue.concat(i),this.id)}},wholeGroupSelected:function(t){var e=this;return t[this.groupValues].every((function(t){return e.isSelected(t)||e.isOptionDisabled(t)}))},wholeGroupDisabled:function(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.disabled&&!t.$isDisabled){if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();var r="object"===n.i(l.a)(t)?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.$emit("remove",t,this.id),this.multiple){var i=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("input",i,this.id)}else this.$emit("input",null,this.id);this.closeOnSelect&&e&&this.deactivate()}},removeLastElement:function(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate:function(){var t=this;this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick((function(){return t.$refs.search.focus()}))):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle:function(){this.isOpen?this.deactivate():this.activate()},adjustPosition:function(){if("undefined"!=typeof window){var t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||"below"===this.openDirection||"bottom"===this.openDirection?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))}}}}},function(t,e,n){"use strict";var r=n(54),i=(n.n(r),n(31));n.n(i),e.a={data:function(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight},visibleElements:function(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()},isOpen:function(){this.pointerDirty=!1}},methods:{optionHighlight:function(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight:function(t,e){var n=this;if(!this.groupSelect)return["multiselect__option--group","multiselect__option--disabled"];var r=this.options.find((function(t){return t[n.groupLabel]===e.$groupLabel}));return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Enter").key;this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward:function(){this.pointer0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet:function(t){this.pointer=t,this.pointerDirty=!0}}}},function(t,e,n){"use strict";var r=n(36),i=n(74),o=n(15),a=n(18);t.exports=n(72)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(31),i=(n.n(r),n(32)),o=n(33);e.a={name:"vue-multiselect",mixins:[i.a,o.a],props:{name:{type:String,default:""},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:function(t){return"and ".concat(t," more")}},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible:function(){return(this.singleValue||0===this.singleValue)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible:function(){return!(this.internalValue.length||this.searchable&&this.isOpen)},visibleValues:function(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue:function(){return this.internalValue[0]},deselectLabelText:function(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText:function(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText:function(){return this.showLabels?this.selectLabel:""},selectGroupLabelText:function(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText:function(){return this.showLabels?this.selectedLabel:""},inputStyle:function(){if(this.searchable||this.multiple&&this.value&&this.value.length)return this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}},contentStyle:function(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove:function(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.preferredOpenDirection},showSearchInput:function(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)}}}},function(t,e,n){var r=n(1)("unscopables"),i=Array.prototype;null==i[r]&&n(8)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(18),i=n(19),o=n(85);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(9),i=n(1)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){t.exports=!n(4)&&!n(7)((function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(9);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=i(e),this.reject=i(n)}var i=n(14);t.exports.f=function(t){return new r(t)}},function(t,e,n){var r=n(2),i=n(76),o=n(22),a=n(27)("IE_PROTO"),s=function(){},u=function(){var t,e=n(21)("iframe"),r=o.length;for(e.style.display="none",n(40).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" + + diff --git a/resources/js/components/LibrenmsSetting.vue b/resources/js/components/LibrenmsSetting.vue index 02b860e661..2ade6bc4ab 100644 --- a/resources/js/components/LibrenmsSetting.vue +++ b/resources/js/components/LibrenmsSetting.vue @@ -23,8 +23,8 @@ -->