Advanced Access Manager - Version 5.4

Version Description

  • Fixed bug with Api Access Control option that when disabled, still denies API Routes
  • Fixed bug when RESTful or XML-RPC disabled but endpoints still listed on API Routes
  • Fixed bug with Secure Login for themes that are not build with jQuery support
  • Fixed bug with posts not been filtered during search in few post types
  • Added ability to manage Admin Toolbar items
  • Added ability to manage premium licenses so now user can transfer license anytime
  • Moved security options (brute force lockout, login timeout etc) to stand-alone Security tab
  • Improved UI for the ACCESS EXPIRATION option on Posts & Terms tab
  • Improved UI for defining temporary user account timespan
  • Removed deprecated "Check Post Visibility" option
Download this release

Release Info

Developer vasyl_m
Plugin Icon 128x128 Advanced Access Manager
Version 5.4
Comparing to
See all releases

Code changes from version 5.3.5 to 5.4

Files changed (39) hide show
  1. Application/Api/Manager.php +17 -21
  2. Application/Backend/Feature/Main/Capability.php +1 -1
  3. Application/Backend/Feature/Main/Post.php +0 -4
  4. Application/Backend/Feature/Main/Route.php +24 -21
  5. Application/Backend/Feature/Main/Toolbar.php +169 -0
  6. Application/Backend/Feature/Settings/Content.php +0 -5
  7. Application/Backend/Feature/Settings/Core.php +3 -3
  8. Application/Backend/Feature/Settings/Security.php +74 -0
  9. Application/Backend/Feature/Subject/User.php +1 -1
  10. Application/Backend/Filter.php +0 -57
  11. Application/Backend/Manager.php +36 -0
  12. Application/Backend/View.php +2 -0
  13. Application/Backend/View/PostOptionList.php +0 -3
  14. Application/Backend/Widget/Login.php +1 -39
  15. Application/Backend/phtml/index.phtml +5 -25
  16. Application/Backend/phtml/main/menu.phtml +1 -1
  17. Application/Backend/phtml/main/toolbar.phtml +90 -0
  18. Application/Backend/phtml/partial/post-advanced-settings.phtml +2 -8
  19. Application/Backend/phtml/settings/security.phtml +21 -0
  20. Application/Backend/phtml/widget/login-backend.phtml +1 -19
  21. Application/Core/Compatibility.php +3 -1
  22. Application/Core/Gateway.php +1 -1
  23. Application/Core/Login.php +3 -3
  24. Application/Core/Object/Toolbar.php +116 -0
  25. Application/Extension/List.php +2 -2
  26. Application/Frontend/Authorization.php +3 -2
  27. Application/Frontend/Filter.php +6 -9
  28. Application/Frontend/Manager.php +5 -1
  29. Application/Shared/Manager.php +55 -22
  30. aam.php +1 -1
  31. media/css/aam.css +381 -0
  32. media/font/fontello.eot +0 -0
  33. media/font/fontello.svg +10 -0
  34. media/font/fontello.ttf +0 -0
  35. media/font/fontello.woff +0 -0
  36. media/font/fontello.woff2 +0 -0
  37. media/js/aam.js +257 -3
  38. media/js/vendor.js +9 -1
  39. readme.txt +42 -20
Application/Api/Manager.php CHANGED
@@ -57,30 +57,26 @@ class AAM_Api_Manager {
57
  * @access public
58
  */
59
  protected function __construct() {
60
- // REST API action authorization. Triggered before call is dispatched
61
- add_filter(
62
- 'rest_request_before_callbacks', array($this, 'beforeDispatch'), 10, 3
63
- );
64
-
65
- // Manage access to the RESTful endpoints
66
- add_filter('rest_pre_dispatch', array($this, 'authorizeRest'), 1, 3);
67
-
68
- // Check if user has ability to perform certain task based on provided
69
- // capability and meta data
70
  if (AAM_Core_Config::get('core.settings.apiAccessControl', true)) {
 
71
  add_filter(
72
- 'user_has_cap',
73
- array(AAM_Shared_Manager::getInstance(), 'userHasCap'),
74
- 999,
75
- 3
76
  );
77
- }
78
-
79
- // Register any additional endpoints with ConfigPress
80
- $additional = AAM_Core_Config::get('rest.manage.endpoint');
81
-
82
- if (!empty($additional) && is_array($additional)) {
83
- $this->resources = array_merge_recursive($this->resources, $additional);
 
 
 
 
 
 
 
 
84
  }
85
  }
86
 
57
  * @access public
58
  */
59
  protected function __construct() {
 
 
 
 
 
 
 
 
 
 
60
  if (AAM_Core_Config::get('core.settings.apiAccessControl', true)) {
61
+ // REST API action authorization. Triggered before call is dispatched
62
  add_filter(
63
+ 'rest_request_before_callbacks', array($this, 'beforeDispatch'), 10, 3
 
 
 
64
  );
65
+
66
+ // Manage access to the RESTful endpoints
67
+ add_filter('rest_pre_dispatch', array($this, 'authorizeRest'), 1, 3);
68
+
69
+ // Check if user has ability to perform certain task based on provided
70
+ // capability and meta data
71
+ $shared = AAM_Shared_Manager::getInstance();
72
+ add_filter('user_has_cap', array($shared, 'userHasCap'), 999, 3);
73
+
74
+ // Register any additional endpoints with ConfigPress
75
+ $additional = AAM_Core_Config::get('rest.manage.endpoint');
76
+
77
+ if (!empty($additional) && is_array($additional)) {
78
+ $this->resources = array_merge_recursive($this->resources, $additional);
79
+ }
80
  }
81
  }
82
 
Application/Backend/Feature/Main/Capability.php CHANGED
@@ -51,7 +51,7 @@ class AAM_Backend_Feature_Main_Capability extends AAM_Backend_Feature_Abstract {
51
  'aam_manage_posts', 'aam_manage_access_denied_redirect', 'aam_create_roles',
52
  'aam_manage_login_redirect', 'aam_manage_logout_redirect', 'aam_manager',
53
  'aam_manage_settings', 'aam_manage_extensions', 'aam_show_notifications',
54
- 'aam_manage_404_redirect', 'aam_manage_ip_check',
55
  'aam_manage_default', 'aam_manage_visitors', 'aam_list_roles',
56
  'aam_edit_roles', 'aam_delete_roles', 'aam_toggle_users', 'aam_switch_users',
57
  'aam_manage_configpress', 'aam_manage_api_routes'
51
  'aam_manage_posts', 'aam_manage_access_denied_redirect', 'aam_create_roles',
52
  'aam_manage_login_redirect', 'aam_manage_logout_redirect', 'aam_manager',
53
  'aam_manage_settings', 'aam_manage_extensions', 'aam_show_notifications',
54
+ 'aam_manage_404_redirect', 'aam_manage_ip_check', 'aam_manage_toolbar',
55
  'aam_manage_default', 'aam_manage_visitors', 'aam_list_roles',
56
  'aam_edit_roles', 'aam_delete_roles', 'aam_toggle_users', 'aam_switch_users',
57
  'aam_manage_configpress', 'aam_manage_api_routes'
Application/Backend/Feature/Main/Post.php CHANGED
@@ -451,10 +451,6 @@ class AAM_Backend_Feature_Main_Post extends AAM_Backend_Feature_Abstract {
451
  $param = AAM_Core_Request::post('param');
452
  $value = AAM_Core_Request::post('value');
453
 
454
- if (strpos($param, '.expire_datetime') !== false) {
455
- $value = date('Y-m-d H:i:s', strtotime($value));
456
- }
457
-
458
  //clear cache
459
  AAM_Core_API::clearCache();
460
 
451
  $param = AAM_Core_Request::post('param');
452
  $value = AAM_Core_Request::post('value');
453
 
 
 
 
 
454
  //clear cache
455
  AAM_Core_API::clearCache();
456
 
Application/Backend/Feature/Main/Route.php CHANGED
@@ -56,35 +56,38 @@ class AAM_Backend_Feature_Main_Route extends AAM_Backend_Feature_Abstract {
56
  protected function retrieveAllRoutes() {
57
  $response = array();
58
  $object = AAM_Backend_Subject::getInstance()->getObject('route');
59
- $routes = rest_get_server()->get_routes();
60
 
61
  //build all RESTful routes
62
- foreach ($routes as $route => $handlers) {
63
- $methods = array();
64
- foreach($handlers as $handler) {
65
- $methods = array_merge($methods, array_keys($handler['methods']));
 
 
 
 
 
 
 
 
 
 
 
66
  }
 
67
 
68
- foreach(array_unique($methods) as $method) {
 
 
69
  $response[] = array(
70
- 'restful',
71
- $method,
72
  htmlspecialchars($route),
73
- $object->has('restful', $route, $method) ? 'checked' : 'unchecked'
74
  );
75
  }
76
  }
77
 
78
- // Build XML RPC routes
79
- foreach(array_keys(AAM_Core_API::getXMLRPCServer()->methods) as $route) {
80
- $response[] = array(
81
- 'xmlrpc',
82
- 'POST',
83
- htmlspecialchars($route),
84
- $object->has('xmlrpc', $route) ? 'checked' : 'unchecked'
85
- );
86
- }
87
-
88
  return $response;
89
  }
90
 
@@ -114,7 +117,7 @@ class AAM_Backend_Feature_Main_Route extends AAM_Backend_Feature_Abstract {
114
  AAM_Backend_Feature::registerFeature((object) array(
115
  'uid' => 'route',
116
  'position' => 50,
117
- 'title' => __('API Routes', AAM_KEY) . ' <span class="badge">NEW</span>',
118
  'capability' => 'aam_manage_api_routes',
119
  'type' => 'main',
120
  'subjects' => array(
@@ -123,7 +126,7 @@ class AAM_Backend_Feature_Main_Route extends AAM_Backend_Feature_Abstract {
123
  AAM_Core_Subject_Visitor::UID,
124
  AAM_Core_Subject_Default::UID
125
  ),
126
- 'option' => 'core.settings.restful',
127
  'view' => __CLASS__
128
  ));
129
  }
56
  protected function retrieveAllRoutes() {
57
  $response = array();
58
  $object = AAM_Backend_Subject::getInstance()->getObject('route');
 
59
 
60
  //build all RESTful routes
61
+ if (AAM::api()->getConfig('core.settings.restful', true)) {
62
+ foreach (rest_get_server()->get_routes() as $route => $handlers) {
63
+ $methods = array();
64
+ foreach($handlers as $handler) {
65
+ $methods = array_merge($methods, array_keys($handler['methods']));
66
+ }
67
+
68
+ foreach(array_unique($methods) as $method) {
69
+ $response[] = array(
70
+ 'restful',
71
+ $method,
72
+ htmlspecialchars($route),
73
+ $object->has('restful', $route, $method) ? 'checked' : 'unchecked'
74
+ );
75
+ }
76
  }
77
+ }
78
 
79
+ // Build XML RPC routes
80
+ if (AAM::api()->getConfig('core.settings.xmlrpc', true)) {
81
+ foreach(array_keys(AAM_Core_API::getXMLRPCServer()->methods) as $route) {
82
  $response[] = array(
83
+ 'xmlrpc',
84
+ 'POST',
85
  htmlspecialchars($route),
86
+ $object->has('xmlrpc', $route) ? 'checked' : 'unchecked'
87
  );
88
  }
89
  }
90
 
 
 
 
 
 
 
 
 
 
 
91
  return $response;
92
  }
93
 
117
  AAM_Backend_Feature::registerFeature((object) array(
118
  'uid' => 'route',
119
  'position' => 50,
120
+ 'title' => __('API Routes', AAM_KEY),
121
  'capability' => 'aam_manage_api_routes',
122
  'type' => 'main',
123
  'subjects' => array(
126
  AAM_Core_Subject_Visitor::UID,
127
  AAM_Core_Subject_Default::UID
128
  ),
129
+ 'option' => 'core.settings.apiAccessControl',
130
  'view' => __CLASS__
131
  ));
132
  }
Application/Backend/Feature/Main/Toolbar.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * ======================================================================
5
+ * LICENSE: This file is subject to the terms and conditions defined in *
6
+ * file 'license.txt', which is part of this source code package. *
7
+ * ======================================================================
8
+ */
9
+
10
+ /**
11
+ * Backend menu manager
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Backend_Feature_Main_Toolbar extends AAM_Backend_Feature_Abstract {
17
+
18
+ /**
19
+ * Undocumented function
20
+ *
21
+ * @return void
22
+ */
23
+ public function save() {
24
+ $items = AAM_Core_Request::post('items', array());
25
+ $status = AAM_Core_Request::post('status');
26
+
27
+ $object = AAM_Backend_Subject::getInstance()->getObject('toolbar');
28
+
29
+ foreach($items as $item) {
30
+ $object->updateOptionItem($item, $status);
31
+ }
32
+
33
+ $object->save();
34
+
35
+ return json_encode(array('status' => 'success'));
36
+ }
37
+
38
+ /**
39
+ * Get subject's menu
40
+ *
41
+ * Based on the list of capabilities that current subject has, prepare
42
+ * complete menu list and return it.
43
+ *
44
+ * @return array
45
+ *
46
+ * @access public
47
+ * @global array $menu
48
+ */
49
+ public function getToolbar() {
50
+ return AAM_Core_API::getOption('aam_toolbar_cache', array());
51
+ }
52
+
53
+ /**
54
+ *
55
+ * @param type $branch
56
+ * @return type
57
+ */
58
+ public function getAllChildren($branch) {
59
+ $children = array();
60
+
61
+ foreach($branch->children as $child) {
62
+ if (empty($child->type) || !in_array($child->type, array('container', 'group'))) {
63
+ $children[] = $child;
64
+ }
65
+ if(!empty($child->children)) {
66
+ $children = array_merge($children, $this->getAllChildren($child));
67
+ }
68
+ }
69
+
70
+ return $children;
71
+ }
72
+
73
+ /**
74
+ *
75
+ * @param type $node
76
+ * @return type
77
+ */
78
+ public function normalizeTitle($node) {
79
+ return ucwords(
80
+ trim(
81
+ preg_replace(
82
+ '/[\d]/',
83
+ '',
84
+ strip_tags(!empty($node->title) ? $node->title : $node->id)
85
+ )
86
+ )
87
+ );
88
+ }
89
+
90
+ /**
91
+ *
92
+ * @return type
93
+ */
94
+ public function refreshList() {
95
+ // reset cache
96
+ AAM_Core_API::deleteOption('aam_toolbar_cache');
97
+
98
+ //grab toolbar itesm
99
+ AAM_Core_API::cURL($this->addHttpPasswd(
100
+ add_query_arg('init', 'toolbar', admin_url('index.php')))
101
+ );
102
+
103
+ return json_encode(array('status' => 'success'));
104
+ }
105
+
106
+ /**
107
+ *
108
+ * @param type $url
109
+ * @return type
110
+ */
111
+ protected function addHttpPasswd($url) {
112
+ $htpasswd = AAM_Core_Config::get('feature.toolbar.htpasswd');
113
+
114
+ if (!empty($htpasswd['user']) && !empty($htpasswd['pass'])) {
115
+ $url = preg_replace(
116
+ '/^(http[s]?:\/\/)/', "$1{$htpasswd['user']}:{$htpasswd['pass']}@", $url
117
+ );
118
+ }
119
+
120
+ return $url;
121
+ }
122
+
123
+ /**
124
+ * @inheritdoc
125
+ */
126
+ public static function getTemplate() {
127
+ return 'main/toolbar.phtml';
128
+ }
129
+
130
+ /**
131
+ * Check inheritance status
132
+ *
133
+ * Check if menu settings are overwritten
134
+ *
135
+ * @return boolean
136
+ *
137
+ * @access protected
138
+ */
139
+ protected function isOverwritten() {
140
+ $object = AAM_Backend_Subject::getInstance()->getObject('toolbar');
141
+
142
+ return $object->isOverwritten();
143
+ }
144
+
145
+ /**
146
+ * Register Menu feature
147
+ *
148
+ * @return void
149
+ *
150
+ * @access public
151
+ */
152
+ public static function register() {
153
+ AAM_Backend_Feature::registerFeature((object) array(
154
+ 'uid' => 'toolbar',
155
+ 'position' => 6,
156
+ 'title' => __('Admin Toolbar', AAM_KEY),
157
+ 'capability' => 'aam_manage_toolbar',
158
+ 'type' => 'main',
159
+ 'subjects' => array(
160
+ AAM_Core_Subject_Role::UID,
161
+ AAM_Core_Subject_User::UID,
162
+ AAM_Core_Subject_Default::UID
163
+ ),
164
+ 'option' => 'core.settings.backendAccessControl,core.settings.frontendAccessControl',
165
+ 'view' => __CLASS__
166
+ ));
167
+ }
168
+
169
+ }
Application/Backend/Feature/Settings/Content.php CHANGED
@@ -33,11 +33,6 @@ class AAM_Backend_Feature_Settings_Content extends AAM_Backend_Feature_Abstract
33
  'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Allow AAM to manage a physically access to all media files located in the defined by the system [uploads] folder. [Note!] This feature requires additional steps as described in %sthis article%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-to-manage-wordpress-media-access" target="_blank">', '</a>'),
34
  'value' => AAM_Core_Config::get('core.settings.mediaAccessControl', false)
35
  ),
36
- 'core.settings.checkPostVisibility' => array(
37
- 'title' => __('Check Post Visibility', AAM_KEY),
38
- 'descr' => __('For performance reasons, keep this option disabled if do not use LIST or LIST TO OTHERS access options on Posts & Terms tab. When it is checked, AAM will filter list of posts that are hidden for a user on frontend, backend and API calls.', AAM_KEY),
39
- 'value' => AAM_Core_Config::get('core.settings.checkPostVisibility', true)
40
- ),
41
  'core.settings.manageHiddenPostTypes' => array(
42
  'title' => __('Manage Hidden Post Types', AAM_KEY),
43
  'descr' => __('By default AAM allows you to manage access only to public post types on Posts & Terms tab. By enabling this feature, you also will be able to manage access to hidden post types like revisions, navigation menus or any other custom post types that are not registered as public.', AAM_KEY),
33
  'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Allow AAM to manage a physically access to all media files located in the defined by the system [uploads] folder. [Note!] This feature requires additional steps as described in %sthis article%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-to-manage-wordpress-media-access" target="_blank">', '</a>'),
34
  'value' => AAM_Core_Config::get('core.settings.mediaAccessControl', false)
35
  ),
 
 
 
 
 
36
  'core.settings.manageHiddenPostTypes' => array(
37
  'title' => __('Manage Hidden Post Types', AAM_KEY),
38
  'descr' => __('By default AAM allows you to manage access only to public post types on Posts & Terms tab. By enabling this feature, you also will be able to manage access to hidden post types like revisions, navigation menus or any other custom post types that are not registered as public.', AAM_KEY),
Application/Backend/Feature/Settings/Core.php CHANGED
@@ -35,17 +35,17 @@ class AAM_Backend_Feature_Settings_Core extends AAM_Backend_Feature_Abstract {
35
  ),
36
  'core.settings.backendAccessControl' => array(
37
  'title' => __('Backend Access Control', AAM_KEY),
38
- 'descr' => __('Allow AAM to manage access to the backend. Note! Keep this option disabled if there is no needs to restrict backend features for other users.', AAM_KEY),
39
  'value' => AAM_Core_Config::get('core.settings.backendAccessControl', true)
40
  ),
41
  'core.settings.frontendAccessControl' => array(
42
  'title' => __('Frontend Access Control', AAM_KEY),
43
- 'descr' => __('Allow AAM to manage access to the frontend. Note! Keep this option disabled if there is no needs to restrict frontend resources for users and visitors.', AAM_KEY),
44
  'value' => AAM_Core_Config::get('core.settings.frontendAccessControl', true)
45
  ),
46
  'core.settings.apiAccessControl' => array(
47
  'title' => __('API Access Control', AAM_KEY),
48
- 'descr' => __('Allow AAM to manage access to the website resources that are invoked with WordPress core APIs (currently only for RESTful API). Note! Keep this option disabled if there is no needs to restrict API access.', AAM_KEY),
49
  'value' => AAM_Core_Config::get('core.settings.apiAccessControl', true)
50
  ),
51
  'ui.settings.renderAccessMetabox' => array(
35
  ),
36
  'core.settings.backendAccessControl' => array(
37
  'title' => __('Backend Access Control', AAM_KEY),
38
+ 'descr' => __('Allow AAM to manage access to the backend. Keep this option disabled if there is no needs to restrict backend features for other users.', AAM_KEY),
39
  'value' => AAM_Core_Config::get('core.settings.backendAccessControl', true)
40
  ),
41
  'core.settings.frontendAccessControl' => array(
42
  'title' => __('Frontend Access Control', AAM_KEY),
43
+ 'descr' => __('Allow AAM to manage access to the frontend. Keep this option disabled if there is no needs to restrict frontend resources for users and visitors.', AAM_KEY),
44
  'value' => AAM_Core_Config::get('core.settings.frontendAccessControl', true)
45
  ),
46
  'core.settings.apiAccessControl' => array(
47
  'title' => __('API Access Control', AAM_KEY),
48
+ 'descr' => __('Allow AAM to manage access to the website resources that are invoked with WordPress core APIs. Keep this option disabled if there is no needs to restrict API access.', AAM_KEY),
49
  'value' => AAM_Core_Config::get('core.settings.apiAccessControl', true)
50
  ),
51
  'ui.settings.renderAccessMetabox' => array(
Application/Backend/Feature/Settings/Security.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * ======================================================================
5
+ * LICENSE: This file is subject to the terms and conditions defined in *
6
+ * file 'license.txt', which is part of this source code package. *
7
+ * ======================================================================
8
+ */
9
+
10
+ /**
11
+ * Backend security settings
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Backend_Feature_Settings_Security extends AAM_Backend_Feature_Abstract {
17
+
18
+ /**
19
+ * @inheritdoc
20
+ */
21
+ public static function getTemplate() {
22
+ return 'settings/security.phtml';
23
+ }
24
+
25
+ /**
26
+ *
27
+ * @return type
28
+ */
29
+ protected function getList() {
30
+ $settings = array(
31
+ 'core.settings.loginTimeout' => array(
32
+ 'title' => __('Login Timeout', AAM_KEY),
33
+ 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Delay the login process for 1 second (the value is configurable) to significantly reduce the chance for brute force or dictionary attack. For more information about this option please refer to %sHow does AAM Secure Login works%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'),
34
+ 'value' => AAM_Core_Config::get('core.settings.loginTimeout', false)
35
+ ),
36
+ 'core.settings.loginTimeout' => array(
37
+ 'title' => __('Login Timeout', AAM_KEY),
38
+ 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Delay the login process for 1 second (the value is configurable) to significantly reduce the chance for brute force or dictionary attack. For more information about this option please refer to %sHow does AAM Secure Login works%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'),
39
+ 'value' => AAM_Core_Config::get('core.settings.loginTimeout', false)
40
+ ),
41
+ 'core.settings.singleSession' => array(
42
+ 'title' => __('One Session Per User', AAM_KEY),
43
+ 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Automatically destroy all other sessions for a user if he/she tries to login from different location. For more information about this option please refer to %sHow does AAM Secure Login works%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'),
44
+ 'value' => AAM_Core_Config::get('core.settings.singleSession', false)
45
+ ),
46
+ 'core.settings.bruteForceLockout' => array(
47
+ 'title' => __('Brute Force Lockout', AAM_KEY),
48
+ 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Automatically reject login attempts if number of unsuccessful login attempts is more than 20 over the period of 2 minutes (both values are configurable). For more information about this option please refer to %sHow does AAM Secure Login works%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'),
49
+ 'value' => AAM_Core_Config::get('core.settings.bruteForceLockout', false)
50
+ ),
51
+ );
52
+
53
+ return apply_filters('aam-settings-filter', $settings, 'security');
54
+ }
55
+
56
+ /**
57
+ * Register Contact/Hire feature
58
+ *
59
+ * @return void
60
+ *
61
+ * @access public
62
+ */
63
+ public static function register() {
64
+ AAM_Backend_Feature::registerFeature((object) array(
65
+ 'uid' => 'settings-security',
66
+ 'position' => 6,
67
+ 'title' => __('Security Settings', AAM_KEY),
68
+ 'capability' => 'aam_manage_settings',
69
+ 'type' => 'settings',
70
+ 'view' => __CLASS__
71
+ ));
72
+ }
73
+
74
+ }
Application/Backend/Feature/Subject/User.php CHANGED
@@ -234,7 +234,7 @@ class AAM_Backend_Feature_Subject_User {
234
  update_user_meta(
235
  $user,
236
  'aam_user_expiration',
237
- date('Y-m-d H:i:s', strtotime($expires)) . "|" . ($action ? $action : 'delete') . '|' . $role
238
  );
239
  } else {
240
  delete_user_meta($user, 'aam_user_expiration');
234
  update_user_meta(
235
  $user,
236
  'aam_user_expiration',
237
+ $expires . "|" . ($action ? $action : 'delete') . '|' . $role
238
  );
239
  } else {
240
  delete_user_meta($user, 'aam_user_expiration');
Application/Backend/Filter.php CHANGED
@@ -44,9 +44,6 @@ class AAM_Backend_Filter {
44
  add_action('network_admin_notices', array($this, 'adminNotices'), -1);
45
  add_action('user_admin_notices', array($this, 'adminNotices'), -1);
46
 
47
- //admin bar
48
- add_action('wp_before_admin_bar_render', array($this, 'filterAdminBar'), 999);
49
-
50
  //post restrictions
51
  add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
52
  add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
@@ -137,60 +134,6 @@ class AAM_Backend_Filter {
137
  }
138
  }
139
 
140
- /**
141
- * Filter top admin bar
142
- *
143
- * The filter will be performed based on the Backend Menu access settings
144
- *
145
- * @return void
146
- *
147
- * @access public
148
- * @global WP_Admin_Bar $wp_admin_bar
149
- */
150
- public function filterAdminBar() {
151
- global $wp_admin_bar;
152
-
153
- $menu = AAM::getUser()->getObject('menu');
154
- foreach($wp_admin_bar->get_nodes() as $id => $node) {
155
- if (!empty($node->href)) {
156
- $suffix = str_replace(admin_url(), '', $node->href);
157
- if ($menu->has($suffix, true)) {
158
- if (empty($node->parent) && $this->hasChildren($id)) { //root level
159
- $node->href = '#';
160
- $wp_admin_bar->add_node($node);
161
- } else {
162
- $wp_admin_bar->remove_menu($id);
163
- }
164
- }
165
- }
166
- }
167
- }
168
-
169
- /**
170
- * Check if specified top bar item has children
171
- *
172
- * @param string $id
173
- *
174
- * @return boolean
175
- *
176
- * @access protected
177
- * @global WP_Admin_Bar $wp_admin_bar
178
- */
179
- protected function hasChildren($id) {
180
- global $wp_admin_bar;
181
-
182
- $has = false;
183
-
184
- foreach($wp_admin_bar->get_nodes() as $node) {
185
- if ($node->parent == $id) {
186
- $has = true;
187
- break;
188
- }
189
- }
190
-
191
- return $has;
192
- }
193
-
194
  /**
195
  * Post Quick Menu Actions Filtering
196
  *
44
  add_action('network_admin_notices', array($this, 'adminNotices'), -1);
45
  add_action('user_admin_notices', array($this, 'adminNotices'), -1);
46
 
 
 
 
47
  //post restrictions
48
  add_filter('page_row_actions', array($this, 'postRowActions'), 10, 2);
49
  add_filter('post_row_actions', array($this, 'postRowActions'), 10, 2);
134
  }
135
  }
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  /**
138
  * Post Quick Menu Actions Filtering
139
  *
Application/Backend/Manager.php CHANGED
@@ -107,6 +107,11 @@ class AAM_Backend_Manager {
107
  //control admin area
108
  add_action('admin_init', array($this, 'adminInit'));
109
 
 
 
 
 
 
110
  //register login widget
111
  if (AAM_Core_Config::get('core.settings.secureLogin', true)) {
112
  add_action('widgets_init', array($this, 'registerLoginWidget'));
@@ -384,6 +389,37 @@ class AAM_Backend_Manager {
384
  }
385
  }
386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  /**
388
  *
389
  * @global type $post
107
  //control admin area
108
  add_action('admin_init', array($this, 'adminInit'));
109
 
110
+ //admin toolbar
111
+ if (filter_input(INPUT_GET, 'init') == 'toolbar') {
112
+ add_action('wp_after_admin_bar_render', array($this, 'adminBar'));
113
+ }
114
+
115
  //register login widget
116
  if (AAM_Core_Config::get('core.settings.secureLogin', true)) {
117
  add_action('widgets_init', array($this, 'registerLoginWidget'));
389
  }
390
  }
391
 
392
+ /**
393
+ *
394
+ * @global type $wp_admin_bar
395
+ */
396
+ public function adminBar() {
397
+ global $wp_admin_bar;
398
+
399
+ $reflection = new ReflectionClass(get_class($wp_admin_bar));
400
+
401
+ $prop = $reflection->getProperty('nodes');
402
+ $prop->setAccessible(true);
403
+
404
+ $nodes = $prop->getValue($wp_admin_bar);
405
+
406
+ if (isset($nodes['root'])) {
407
+ $cache = array();
408
+ foreach($nodes['root']->children as $node) {
409
+ $cache = array_merge($cache, $node->children);
410
+ }
411
+
412
+ // do some cleanup
413
+ foreach($cache as $i => $node) {
414
+ if ($node->id == 'menu-toggle') {
415
+ unset($cache[$i]);
416
+ }
417
+ }
418
+
419
+ AAM_Core_API::updateOption('aam_toolbar_cache', array_values($cache));
420
+ }
421
+ }
422
+
423
  /**
424
  *
425
  * @global type $post
Application/Backend/View.php CHANGED
@@ -34,6 +34,7 @@ class AAM_Backend_View {
34
  protected function __construct() {
35
  //register default features
36
  AAM_Backend_Feature_Main_Menu::register();
 
37
  AAM_Backend_Feature_Main_Metabox::register();
38
  AAM_Backend_Feature_Main_Capability::register();
39
  AAM_Backend_Feature_Main_Route::register();
@@ -45,6 +46,7 @@ class AAM_Backend_View {
45
 
46
  AAM_Backend_Feature_Settings_Core::register();
47
  AAM_Backend_Feature_Settings_Content::register();
 
48
  AAM_Backend_Feature_Settings_Tools::register();
49
  AAM_Backend_Feature_Settings_ConfigPress::register();
50
 
34
  protected function __construct() {
35
  //register default features
36
  AAM_Backend_Feature_Main_Menu::register();
37
+ AAM_Backend_Feature_Main_Toolbar::register();
38
  AAM_Backend_Feature_Main_Metabox::register();
39
  AAM_Backend_Feature_Main_Capability::register();
40
  AAM_Backend_Feature_Main_Route::register();
46
 
47
  AAM_Backend_Feature_Settings_Core::register();
48
  AAM_Backend_Feature_Settings_Content::register();
49
+ AAM_Backend_Feature_Settings_Security::register();
50
  AAM_Backend_Feature_Settings_Tools::register();
51
  AAM_Backend_Feature_Settings_ConfigPress::register();
52
 
Application/Backend/View/PostOptionList.php CHANGED
@@ -25,7 +25,6 @@ class AAM_Backend_View_PostOptionList {
25
  'list' => array(
26
  'title' => __('List', AAM_KEY),
27
  'descr' => __('Hide %s however still allow access with direct URL.', AAM_KEY) . sprintf(__(' %sSee in action.%s', AAM_KEY), "<a href='https://youtu.be/2jiu_CL6JJg' target='_blank'>", '</a>'),
28
- 'config' => 'core.settings.checkPostVisibility'
29
  ),
30
  'read' => array(
31
  'title' => __('Read', AAM_KEY),
@@ -91,7 +90,6 @@ class AAM_Backend_View_PostOptionList {
91
  'title' => __('List', AAM_KEY),
92
  'exclude' => array(AAM_Core_Subject_Visitor::UID),
93
  'descr' => __('Hide %s however still allow access with direct URL.', AAM_KEY),
94
- 'config' => 'core.settings.checkPostVisibility'
95
  ),
96
  'edit' => array(
97
  'title' => __('Edit', AAM_KEY),
@@ -113,7 +111,6 @@ class AAM_Backend_View_PostOptionList {
113
  'list' => array(
114
  'title' => __('List', AAM_KEY),
115
  'descr' => __('Hide %s however still allow access to retrieve %s.', AAM_KEY),
116
- 'config' => 'core.settings.checkPostVisibility'
117
  ),
118
  'read' => array(
119
  'title' => __('Read', AAM_KEY),
25
  'list' => array(
26
  'title' => __('List', AAM_KEY),
27
  'descr' => __('Hide %s however still allow access with direct URL.', AAM_KEY) . sprintf(__(' %sSee in action.%s', AAM_KEY), "<a href='https://youtu.be/2jiu_CL6JJg' target='_blank'>", '</a>'),
 
28
  ),
29
  'read' => array(
30
  'title' => __('Read', AAM_KEY),
90
  'title' => __('List', AAM_KEY),
91
  'exclude' => array(AAM_Core_Subject_Visitor::UID),
92
  'descr' => __('Hide %s however still allow access with direct URL.', AAM_KEY),
 
93
  ),
94
  'edit' => array(
95
  'title' => __('Edit', AAM_KEY),
111
  'list' => array(
112
  'title' => __('List', AAM_KEY),
113
  'descr' => __('Hide %s however still allow access to retrieve %s.', AAM_KEY),
 
114
  ),
115
  'read' => array(
116
  'title' => __('Read', AAM_KEY),
Application/Backend/Widget/Login.php CHANGED
@@ -48,51 +48,13 @@ class AAM_Backend_Widget_Login extends WP_Widget {
48
  require(dirname(__FILE__) . '/../phtml/widget/login-backend.phtml');
49
  }
50
 
51
- /**
52
- * Update widget
53
- *
54
- * @param array $new
55
- * @param array $old
56
- *
57
- * @return array
58
- *
59
- * @access public
60
- */
61
- public function update($new, $old) {
62
- $nlt = (isset($new['login-timeout']) ? $new['login-timeout'] : null);
63
- $olt = (isset($old['login-timeout']) ? $old['login-timeout'] : null);
64
-
65
- if ($nlt != $olt) {
66
- AAM_Core_Config::set('login-timeout', $nlt);
67
- }
68
-
69
- $nbl = (isset($new['brute-force-lockout']) ? $new['brute-force-lockout'] : null);
70
- $obl = (isset($old['brute-force-lockout']) ? $old['brute-force-lockout'] : null);
71
-
72
- if ($nbl != $obl) {
73
- AAM_Core_Config::set('brute-force-lockout', $nbl);
74
- }
75
-
76
- $nss = (isset($new['single-session']) ? $new['single-session'] : null);
77
- $oss = (isset($old['single-session']) ? $old['single-session'] : null);
78
-
79
- if ($nss != $oss) {
80
- AAM_Core_Config::set('single-session', $nss);
81
- }
82
-
83
- return parent::update($new, $old);
84
- }
85
-
86
  /**
87
  *
88
  * @param type $instance
89
  * @return type
90
  */
91
  protected function normalize($instance) {
92
- $instance['login-title'] = AAM_Core_Config::get('login-title');
93
- $instance['login-ip-track'] = AAM_Core_Config::get('login-ip-track');
94
- $instance['brute-force-lockout'] = AAM_Core_Config::get('brute-force-lockout');
95
- $instance['single-session'] = AAM_Core_Config::get('single-session');
96
 
97
  if (empty($instance['login-title'])) {
98
  $instance['login-title'] = __('Login', AAM_KEY);
48
  require(dirname(__FILE__) . '/../phtml/widget/login-backend.phtml');
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  /**
52
  *
53
  * @param type $instance
54
  * @return type
55
  */
56
  protected function normalize($instance) {
57
+ $instance['login-title'] = AAM_Core_Config::get('login-title');
 
 
 
58
 
59
  if (empty($instance['login-title'])) {
60
  $instance['login-title'] = __('Login', AAM_KEY);
Application/Backend/phtml/index.phtml CHANGED
@@ -137,7 +137,7 @@
137
  </td>
138
  <td>
139
  <div class="aam-row-actions">
140
- <a href="#transfer-license-modal" data-toggle="modal" class="aam-row-action"><i class="icon-exchange text-warning" data-toggle="tooltip" title="<?php echo __('Transfer License', AAM_KEY); ?>"></i></a>
141
  <?php if (!empty($license['expires'])) { ?>
142
  <a href="https://aamplugin.com/upgrade/<?php echo $license['license']; ?>" data-toggle="tooltip" title="<?php echo __('Upgrade License', AAM_KEY); ?>" class="aam-row-action" target="_blank"><i class="icon-angle-circled-up text-success"></i></a>
143
  <?php } ?>
@@ -151,27 +151,6 @@
151
  </div>
152
  </div>
153
  </div>
154
-
155
- <div class="modal fade" id="transfer-license-modal" tabindex="-1" role="dialog">
156
- <div class="modal-dialog modal-sm" role="document">
157
- <div class="modal-content">
158
- <div class="modal-header">
159
- <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
160
- <h4 class="modal-title"><?php echo __('Transfer license', AAM_KEY); ?></h4>
161
- </div>
162
- <div class="modal-body">
163
- <div class="form-group">
164
- <p class="aam-info">
165
- <?php echo AAM_Backend_View_Helper::preparePhrase('In order to transfer the license to a different domain, please contact us via email [support@aamplugin.com] with a reason for a transfer.', 'b'); ?>
166
- </p>
167
- </div>
168
- </div>
169
- <div class="modal-footer">
170
- <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', AAM_KEY); ?></button>
171
- </div>
172
- </div>
173
- </div>
174
- </div>
175
  <?php } ?>
176
 
177
  <div class="metabox-holder extensions-metabox" style="display:none;">
@@ -328,16 +307,17 @@
328
  </table>
329
 
330
  <div class="modal fade" id="edit-user-expiration-modal" tabindex="-1" role="dialog">
331
- <div class="modal-dialog modal-sm" role="document">
332
  <div class="modal-content">
333
  <div class="modal-header">
334
  <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
335
  <h4 class="modal-title"><?php echo __('Manage User Expiration', AAM_KEY); ?></h4>
336
  </div>
337
  <div class="modal-body">
 
338
  <div class="form-group">
339
- <label for="user-expires"><?php echo __('Expires', AAM_KEY); ?> <a href="https://aamplugin.com/help/how-to-create-temporary-wordpress-user-account" target="_blank" data-toggle="tooltip" title="For how long the user can stay active. Click to learn more."><i class="icon-help-circled"></i></a></label>
340
- <input type="text" class="form-control" id="user-expires" placeholder="<?php echo __('Enter Expiration', AAM_KEY); ?>" />
341
  </div>
342
  <div class="form-group">
343
  <label><?php echo __('Action After Expiration', AAM_KEY); ?> </label>
137
  </td>
138
  <td>
139
  <div class="aam-row-actions">
140
+ <a href="https://aamplugin.com/license/<?php echo $license['license']; ?>" class="aam-row-action"><i class="icon-cog text-success" data-toggle="tooltip" title="<?php echo __('Manage License', AAM_KEY); ?>"></i></a>
141
  <?php if (!empty($license['expires'])) { ?>
142
  <a href="https://aamplugin.com/upgrade/<?php echo $license['license']; ?>" data-toggle="tooltip" title="<?php echo __('Upgrade License', AAM_KEY); ?>" class="aam-row-action" target="_blank"><i class="icon-angle-circled-up text-success"></i></a>
143
  <?php } ?>
151
  </div>
152
  </div>
153
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  <?php } ?>
155
 
156
  <div class="metabox-holder extensions-metabox" style="display:none;">
307
  </table>
308
 
309
  <div class="modal fade" id="edit-user-expiration-modal" tabindex="-1" role="dialog">
310
+ <div class="modal-dialog" role="document">
311
  <div class="modal-content">
312
  <div class="modal-header">
313
  <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', AAM_KEY); ?>"><span aria-hidden="true">&times;</span></button>
314
  <h4 class="modal-title"><?php echo __('Manage User Expiration', AAM_KEY); ?></h4>
315
  </div>
316
  <div class="modal-body">
317
+ <p class="aam-info">To learn more about setting up temporary user accounts, please refer to <a href="https://aamplugin.com/help/how-to-create-temporary-wordpress-user-account" target="_blank">How to create temporary WordPress user account</a> article.</p>
318
  <div class="form-group">
319
+ <div id="user-expiration-datapicker"></div>
320
+ <input type="hidden" id="user-expires" />
321
  </div>
322
  <div class="form-group">
323
  <label><?php echo __('Action After Expiration', AAM_KEY); ?> </label>
Application/Backend/phtml/main/menu.phtml CHANGED
@@ -42,7 +42,7 @@
42
  <div id="menu-<?php echo $i; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="menu-<?php echo $i; ?>-heading">
43
  <div class="panel-body">
44
  <?php if (!empty($menu['submenu'])) { ?>
45
- <div class="row">
46
  <?php echo ($object->has($menu['id']) ? '<div class="aam-lock"></div>' : ''); ?>
47
  <?php foreach ($menu['submenu'] as $j => $submenu) { ?>
48
  <?php if ($submenu['id'] == 'index.php') { ?>
42
  <div id="menu-<?php echo $i; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="menu-<?php echo $i; ?>-heading">
43
  <div class="panel-body">
44
  <?php if (!empty($menu['submenu'])) { ?>
45
+ <div class="row aam-inner-tab">
46
  <?php echo ($object->has($menu['id']) ? '<div class="aam-lock"></div>' : ''); ?>
47
  <?php foreach ($menu['submenu'] as $j => $submenu) { ?>
48
  <?php if ($submenu['id'] == 'index.php') { ?>
Application/Backend/phtml/main/toolbar.phtml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (defined('AAM_KEY')) { ?>
2
+ <div class="aam-feature" id="toolbar-content">
3
+ <div class="row">
4
+ <div class="col-xs-12">
5
+ <p class="aam-info">
6
+ <?php echo AAM_Backend_View_Helper::preparePhrase('[Note!] Admin Toolbar feature is not intended to restrict direct access to URLs and should be used only to remove unnecessary items from the top admin toolbar. Use [Backend Menu] tab to restrict direct access to backend pages or utilize the great power of roles and capabilities.', 'b', 'b'); ?>
7
+ </p>
8
+ </div>
9
+ </div>
10
+
11
+ <div class="aam-feature-top-actions text-right">
12
+ <a href="#" class="btn btn-xs btn-primary" id="refresh-toolbar-list"><i class="icon-arrows-cw"></i> <?php echo __('Refresh', AAM_KEY); ?></a>
13
+ </div>
14
+
15
+ <div class="row">
16
+ <div class="col-xs-12">
17
+ <div class="aam-overwrite" id="aam-toolbar-overwrite" style="display: <?php echo ($this->isOverwritten() ? 'block' : 'none'); ?>">
18
+ <span><i class="icon-check"></i> <?php echo __('Settings are customized', AAM_KEY); ?></span>
19
+ <span><a href="#" id="toolbar-reset" class="btn btn-xs btn-primary"><?php echo __('Reset To Default', AAM_KEY); ?></a>
20
+ </div>
21
+ </div>
22
+ </div>
23
+
24
+ <div class="panel-group" id="toolbar-list" role="tablist" aria-multiselectable="true">
25
+ <?php
26
+ $first = false;
27
+ $toolbar = $this->getToolbar();
28
+ $object = AAM_Backend_Subject::getInstance()->getObject('toolbar');
29
+
30
+ //echo '<pre>'; print_r($toolbar); echo '</pre>';
31
+
32
+ if (!empty($toolbar)) { ?>
33
+ <?php foreach ($toolbar as $i => $branch) { ?>
34
+ <div class="panel panel-default">
35
+ <div class="panel-heading" role="tab" id="toolbar-<?php echo $branch->id; ?>-heading">
36
+ <h4 class="panel-title">
37
+ <a role="button" data-toggle="collapse" data-parent="#toolbar-list" href="#toolbar-<?php echo $branch->id; ?>" aria-controls="toolbar-<?php echo $branch->id; ?>" <?php if (!$first) { echo 'aria-expanded="true"'; } ?>>
38
+ <?php echo $this->normalizeTitle($branch); ?> <small class="aam-menu-capability"><?php echo str_replace(site_url(), '', $branch->href); ?></small>
39
+ </a>
40
+ <?php if ($object->has('toolbar-' . $branch->id)) { ?>
41
+ <i class="aam-panel-title-icon icon-eye-off text-danger"></i>
42
+ <?php } ?>
43
+ </h4>
44
+ </div>
45
+
46
+ <div id="toolbar-<?php echo $branch->id; ?>" class="panel-collapse collapse<?php if (!$first) { echo ' in'; $first = true; } ?>" role="tabpanel" aria-labelledby="toolbar-<?php echo $branch->id; ?>-heading">
47
+ <div class="panel-body">
48
+ <?php if (!empty($branch->children)) { ?>
49
+ <div class="row aam-inner-tab">
50
+ <?php echo ($object->has('toolbar-' . $branch->id) ? '<div class="aam-lock"></div>' : ''); ?>
51
+ <?php foreach($this->getAllChildren($branch) as $child) { ?>
52
+ <div class="col-xs-12 aam-submenu-item">
53
+ <label for="toolbar-<?php echo $child->id; ?>"><u><?php echo $this->normalizeTitle($child); ?></u><small class="aam-menu-capability"><?php echo str_replace(site_url(), '', $child->href); ?></b></small></label>
54
+ <input type="checkbox" class="aam-checkbox-danger" id="toolbar-<?php echo $child->id; ?>" data-toolbar="<?php echo $child->id; ?>"<?php echo ($object->has($child->id) ? ' checked="checked"' : ''); ?> />
55
+ <label for="toolbar-<?php echo $child->id; ?>" data-toggle="tooltip" title="<?php echo ($object->has($child->id) ? __('Uncheck to allow', AAM_KEY) : __('Check to restrict', AAM_KEY)); ?>"></label>
56
+ </div>
57
+ <?php } ?>
58
+ </div>
59
+ <hr class="aam-divider" />
60
+ <?php } ?>
61
+ <div class="row<?php echo (!empty($branch->children) ? ' aam-margin-top-xs' : ''); ?>">
62
+ <div class="col-xs-10 col-md-6 col-xs-offset-1 col-md-offset-3">
63
+ <?php if ($object->has('toolbar-' . $branch->id)) { ?>
64
+ <a href="#" class="btn btn-primary btn-sm btn-block aam-restrict-toolbar" data-toolbar="toolbar-<?php echo $branch->id; ?>" data-target="#toolbar-<?php echo $branch->id; ?>">
65
+ <i class="icon-eye"></i> <?php echo __('Show Menu', AAM_KEY); ?>
66
+ </a>
67
+ <?php } else { ?>
68
+ <a href="#" class="btn btn-danger btn-sm btn-block aam-restrict-toolbar" data-toolbar="toolbar-<?php echo $branch->id; ?>" data-target="#toolbar-<?php echo $branch->id; ?>">
69
+ <i class="icon-eye-off"></i> <?php echo __('Restrict Menu', AAM_KEY); ?>
70
+ </a>
71
+ <?php } ?>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ <?php } ?>
78
+ <?php } else { ?>
79
+ <div class="row">
80
+ <div class="col-xs-12">
81
+ <p class="aam-info">
82
+ <?php echo __('The list of top admin bar items is not initialized. Click "Refresh" button above.', AAM_KEY); ?>
83
+ </p>
84
+ </div>
85
+ </div>
86
+ <?php }
87
+ ?>
88
+ </div>
89
+ </div>
90
+ <?php }
Application/Backend/phtml/partial/post-advanced-settings.phtml CHANGED
@@ -126,15 +126,9 @@
126
  <h4 class="modal-title"><?php echo __('Set Expiration', AAM_KEY); ?></h4>
127
  </div>
128
  <div class="modal-body">
129
- <p class="aam-info">
130
- The expiration criteria expects to be given a string containing a valid <a href="http://php.net/manual/en/datetime.formats.php" target="_blank">date/time format or mathematical expression</a>.
131
- Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed.
132
- To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates whenever possible.<br/><br/>
133
- Examples: +2 weeks (the access will expire in 2 weeks from now); +10 hours (the access will expire in 10 hours from now); January 1st 2018; 10/08/2019
134
- </p>
135
  <div class="form-group">
136
- <label><?php echo __('Enter expiration critiria', AAM_KEY); ?></label>
137
- <input type="text" class="form-control" placeholder="<?php echo __('Enter critiria', AAM_KEY); ?>" id="aam-expire-datetime" />
138
  </div>
139
  </div>
140
  <div class="modal-footer">
126
  <h4 class="modal-title"><?php echo __('Set Expiration', AAM_KEY); ?></h4>
127
  </div>
128
  <div class="modal-body">
 
 
 
 
 
 
129
  <div class="form-group">
130
+ <div id="post-expiration-datapicker"></div>
131
+ <input type="hidden" id="aam-expire-datetime" />
132
  </div>
133
  </div>
134
  <div class="modal-footer">
Application/Backend/phtml/settings/security.phtml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (defined('AAM_KEY')) { ?>
2
+ <div class="aam-feature settings" id="settings-security-content">
3
+ <table class="table table-striped table-bordered">
4
+ <tbody>
5
+ <?php foreach($this->getList() as $id => $option) { ?>
6
+ <tr>
7
+ <td>
8
+ <span class='aam-setting-title'><?php echo $option['title']; ?></span>
9
+ <p class="aam-setting-description">
10
+ <?php echo $option['descr']; ?>
11
+ </p>
12
+ </td>
13
+ <td class="text-center">
14
+ <input data-toggle="toggle" name="<?php echo $id; ?>" id="utility-<?php echo $id; ?>" <?php echo ($option['value'] ? 'checked' : ''); ?> type="checkbox" data-on="Enabled" data-off="Disabled" data-size="small" />
15
+ </td>
16
+ </tr>
17
+ <?php } ?>
18
+ </tbody>
19
+ </table>
20
+ </div>
21
+ <?php }
Application/Backend/phtml/widget/login-backend.phtml CHANGED
@@ -9,25 +9,7 @@
9
  <input type="text" class="widefat" id="<?php echo $this->get_field_id('user-title'); ?>" name="<?php echo $this->get_field_name('user-title'); ?>" value="<?php echo esc_attr($instance['user-title']); ?>" />
10
  </p>
11
 
12
- <p>
13
- <input type="checkbox" id="<?php echo $this->get_field_id('login-timeout'); ?>" name="<?php echo $this->get_field_name('login-timeout'); ?>" value="1" <?php echo !empty($instance['login-timeout']) ? 'checked="checked"' : ""; ?> />
14
- <label for="<?php echo $this->get_field_id('login-timeout'); ?>"><strong><?php echo __('Login Timeout', AAM_KEY); ?></strong></label>
15
- <small style="line-height:1.35em; display:block; margin-top: 5px;"><?php echo __('Delay the login process for 1 second to significantly reduce the chance for brute force or dictionary attack.', AAM_KEY); ?></small>
16
- </p>
17
-
18
- <p style="margin-bottom: 1em;">
19
- <input type="checkbox" id="<?php echo $this->get_field_id('single-session'); ?>" name="<?php echo $this->get_field_name('single-session'); ?>" value="1" <?php echo !empty($instance['single-session']) ? 'checked="checked"' : ""; ?> />
20
- <label for="<?php echo $this->get_field_id('single-session'); ?>"><strong><?php echo __('One session per user', AAM_KEY); ?></strong></label>
21
- <small style="line-height:1.35em; display:block; margin-top: 5px;"><?php echo __('Automatically destroy all other sessions for a user if he/she tries to login from different location.', AAM_KEY); ?></small>
22
- </p>
23
-
24
- <p style="margin-bottom: 1em;">
25
- <input type="checkbox" id="<?php echo $this->get_field_id('brute-force-lockout'); ?>" name="<?php echo $this->get_field_name('brute-force-lockout'); ?>" value="1" <?php echo !empty($instance['brute-force-lockout']) ? 'checked="checked"' : ""; ?> />
26
- <label for="<?php echo $this->get_field_id('brute-force-lockout'); ?>"><strong><?php echo __('Brute Force Lockout', AAM_KEY); ?></strong></label>
27
- <small style="line-height:1.35em; display:block; margin-top: 5px;"><?php echo __('Automatically reject login attempts if number of unsuccessful login attempts is more than 20 over the period of 2 minutes.', AAM_KEY); ?></small>
28
- </p>
29
-
30
  <p style="background-color: #fafafa; border-left: 3px solid #337ab7; font-size: 1em; line-height: 1.35em; margin-bottom: 1em; padding: 10px; font-size: 0.8em;">
31
- <?php echo sprintf(__('For more advanced setup like login/logout redirects or custom styling, please check %sthis article%s.', AAM_KEY), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'); ?>
32
  </p>
33
  <?php }
9
  <input type="text" class="widefat" id="<?php echo $this->get_field_id('user-title'); ?>" name="<?php echo $this->get_field_name('user-title'); ?>" value="<?php echo esc_attr($instance['user-title']); ?>" />
10
  </p>
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <p style="background-color: #fafafa; border-left: 3px solid #337ab7; font-size: 1em; line-height: 1.35em; margin-bottom: 1em; padding: 10px; font-size: 0.8em;">
13
+ <?php echo sprintf(__('For more advanced setup like login/logout redirects, security enhancement or custom styling, please refer to %sHow does AAM Secure Login works%s article.', AAM_KEY), '<a href="https://aamplugin.com/help/how-does-aam-secure-login-works" target="_blank">', '</a>'); ?>
14
  </p>
15
  <?php }
Application/Core/Compatibility.php CHANGED
@@ -59,11 +59,13 @@ class AAM_Core_Compatibility {
59
  $changes += self::normalizeOption('jwt-authentication', 'core.settings.jwtAuthentication', $config);
60
  $changes += self::normalizeOption('ms-member-access', 'core.settings.multisiteMemberAccessControl', $config);
61
  $changes += self::normalizeOption('media-access-control', 'core.settings.mediaAccessControl', $config);
62
- $changes += self::normalizeOption('check-post-visibility', 'core.settings.checkPostVisibility', $config);
63
  $changes += self::normalizeOption('manage-hidden-post-types', 'core.settings.manageHiddenPostTypes', $config);
64
  $changes += self::normalizeOption('page-category', 'core.settings.pageCategory', $config);
65
  $changes += self::normalizeOption('media-category', 'core.settings.mediaCategory', $config);
66
  $changes += self::normalizeOption('multi-category', 'core.settings.multiCategory', $config);
 
 
 
67
  $changes += self::normalizeOption('inherit-parent-post', 'core.settings.inheritParentPost', $config);
68
  //$changes += self::normalizeOption('', '', $config);
69
 
59
  $changes += self::normalizeOption('jwt-authentication', 'core.settings.jwtAuthentication', $config);
60
  $changes += self::normalizeOption('ms-member-access', 'core.settings.multisiteMemberAccessControl', $config);
61
  $changes += self::normalizeOption('media-access-control', 'core.settings.mediaAccessControl', $config);
 
62
  $changes += self::normalizeOption('manage-hidden-post-types', 'core.settings.manageHiddenPostTypes', $config);
63
  $changes += self::normalizeOption('page-category', 'core.settings.pageCategory', $config);
64
  $changes += self::normalizeOption('media-category', 'core.settings.mediaCategory', $config);
65
  $changes += self::normalizeOption('multi-category', 'core.settings.multiCategory', $config);
66
+ $changes += self::normalizeOption('login-timeout', 'core.settings.loginTimeout', $config);
67
+ $changes += self::normalizeOption('single-session', 'core.settings.singleSession', $config);
68
+ $changes += self::normalizeOption('brute-force-lockout', 'core.settings.bruteForceLockout', $config);
69
  $changes += self::normalizeOption('inherit-parent-post', 'core.settings.inheritParentPost', $config);
70
  //$changes += self::normalizeOption('', '', $config);
71
 
Application/Core/Gateway.php CHANGED
@@ -88,7 +88,7 @@ final class AAM_Core_Gateway {
88
  * @access public
89
  */
90
  public function denyAccess($params = null) {
91
- AAM_Core_API::reject();
92
  }
93
 
94
  /**
88
  * @access public
89
  */
90
  public function denyAccess($params = null) {
91
+ AAM_Core_API::reject(AAM_Core_Api_Area::get(), $params);
92
  }
93
 
94
  /**
Application/Core/Login.php CHANGED
@@ -129,7 +129,7 @@ class AAM_Core_Login {
129
  'authentication_failed',
130
  AAM_Backend_View_Helper::preparePhrase($message, 'strong')
131
  );
132
- } elseif (AAM_Core_Config::get('single-session', false)) {
133
  $sessions = WP_Session_Tokens::get_instance($user->ID);
134
 
135
  if (count($sessions->get_all()) > 1) {
@@ -174,12 +174,12 @@ class AAM_Core_Login {
174
  */
175
  public function authenticate($response) {
176
  // Login Timeout
177
- if (AAM_Core_Config::get('login-timeout', false)) {
178
  @sleep(intval(AAM_Core_Config::get('security.login.timeout', 1)));
179
  }
180
 
181
  // Brute Force Lockout
182
- if (AAM_Core_Config::get('brute-force-lockout', false)) {
183
  $this->updateLoginCounter(1);
184
  }
185
 
129
  'authentication_failed',
130
  AAM_Backend_View_Helper::preparePhrase($message, 'strong')
131
  );
132
+ } elseif (AAM_Core_Config::get('core.settings.singleSession', false)) {
133
  $sessions = WP_Session_Tokens::get_instance($user->ID);
134
 
135
  if (count($sessions->get_all()) > 1) {
174
  */
175
  public function authenticate($response) {
176
  // Login Timeout
177
+ if (AAM_Core_Config::get('core.settings.loginTimeout', false)) {
178
  @sleep(intval(AAM_Core_Config::get('security.login.timeout', 1)));
179
  }
180
 
181
  // Brute Force Lockout
182
+ if (AAM_Core_Config::get('core.settings.bruteForceLockout', false)) {
183
  $this->updateLoginCounter(1);
184
  }
185
 
Application/Core/Object/Toolbar.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * ======================================================================
5
+ * LICENSE: This file is subject to the terms and conditions defined in *
6
+ * file 'license.txt', which is part of this source code package. *
7
+ * ======================================================================
8
+ */
9
+
10
+ /**
11
+ * Admin toolbar object
12
+ *
13
+ * @package AAM
14
+ * @author Vasyl Martyniuk <vasyl@vasyltech.com>
15
+ */
16
+ class AAM_Core_Object_Toolbar extends AAM_Core_Object {
17
+
18
+ /**
19
+ * Constructor
20
+ *
21
+ * @param AAM_Core_Subject $subject
22
+ *
23
+ * @return void
24
+ *
25
+ * @access public
26
+ */
27
+ public function __construct(AAM_Core_Subject $subject) {
28
+ parent::__construct($subject);
29
+
30
+ $option = $this->getSubject()->readOption('toolbar');
31
+
32
+ if (empty($option)) {
33
+ $option = $this->getSubject()->inheritFromParent('toolbar');
34
+ } else {
35
+ $this->setOverwritten(true);
36
+ }
37
+
38
+ $this->setOption($option);
39
+ }
40
+
41
+ /**
42
+ * Check is item defined
43
+ *
44
+ * Check if toolbar item defined in options based on the id
45
+ *
46
+ * @param string $item
47
+ *
48
+ * @return boolean
49
+ *
50
+ * @access public
51
+ */
52
+ public function has($item, $both = false) {
53
+ $options = $this->getOption();
54
+
55
+ // Step #1. Check if toolbar item is directly restricted
56
+ $direct = !empty($options[$item]);
57
+
58
+ // Step #2. Check if whole branch is restricted
59
+ $branch = ($both && !empty($options['toolbar-' . $item]));
60
+
61
+ return $direct || $branch;
62
+ }
63
+
64
+ /**
65
+ * Allow access to a specific menu
66
+ *
67
+ * @param string $menu
68
+ *
69
+ * @return boolean
70
+ *
71
+ * @access public
72
+ */
73
+ public function allow($menu) {
74
+ return $this->save($menu, 0);
75
+ }
76
+
77
+ /**
78
+ * Deny access to a specific menu
79
+ *
80
+ * @param string $menu
81
+ *
82
+ * @return boolean
83
+ *
84
+ * @access public
85
+ */
86
+ public function deny($menu) {
87
+ return $this->save($menu, 1);
88
+ }
89
+
90
+ /**
91
+ * Save menu option
92
+ *
93
+ * @return bool
94
+ *
95
+ * @access public
96
+ */
97
+ public function save($item = null, $value = null) {
98
+ if (!is_null($item)) { // keep it compatible with main Manager.save
99
+ $this->updateOptionItem($item, $value);
100
+ }
101
+
102
+ return $this->getSubject()->updateOption($this->getOption(), 'toolbar');
103
+ }
104
+
105
+ /**
106
+ * Reset default settings
107
+ *
108
+ * @return bool
109
+ *
110
+ * @access public
111
+ */
112
+ public function reset() {
113
+ return $this->getSubject()->deleteOption('toolbar');
114
+ }
115
+
116
+ }
Application/Extension/List.php CHANGED
@@ -22,7 +22,7 @@ class AAM_Extension_List {
22
  'description' => 'Get the complete list of all available premium extensions in one package. Any new premium extensions in the future will be available for no additional cost.',
23
  'url' => 'https://aamplugin.com/complete-package',
24
  'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null),
25
- 'latest' => '3.8.2'
26
  ),
27
  'AAM_PLUS_PACKAGE' => array(
28
  'title' => 'Plus Package',
@@ -31,7 +31,7 @@ class AAM_Extension_List {
31
  'description' => 'The best selling extension with the most advanced content management features for the WordPress CMS. Manage granular access to any post, page, custom post type, category, custom hierarchical taxonomy or define the default access to all your content for all users, roles and visitors.',
32
  'url' => 'https://aamplugin.com/extension/plus-package',
33
  'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null),
34
- 'latest' => '3.7.5'
35
  ),
36
  'AAM_IP_CHECK' => array(
37
  'title' => 'IP Check',
22
  'description' => 'Get the complete list of all available premium extensions in one package. Any new premium extensions in the future will be available for no additional cost.',
23
  'url' => 'https://aamplugin.com/complete-package',
24
  'version' => (defined('AAM_COMPLETE_PACKAGE') ? constant('AAM_COMPLETE_PACKAGE') : null),
25
+ 'latest' => '3.8.5'
26
  ),
27
  'AAM_PLUS_PACKAGE' => array(
28
  'title' => 'Plus Package',
31
  'description' => 'The best selling extension with the most advanced content management features for the WordPress CMS. Manage granular access to any post, page, custom post type, category, custom hierarchical taxonomy or define the default access to all your content for all users, roles and visitors.',
32
  'url' => 'https://aamplugin.com/extension/plus-package',
33
  'version' => (defined('AAM_PLUS_PACKAGE') ? constant('AAM_PLUS_PACKAGE') : null),
34
+ 'latest' => '3.7.8'
35
  ),
36
  'AAM_IP_CHECK' => array(
37
  'title' => 'IP Check',
Application/Frontend/Authorization.php CHANGED
@@ -143,13 +143,14 @@ class AAM_Frontend_Authorization {
143
  protected function checkRedirect(AAM_Core_Object_Post $post) {
144
  if ($post->has(AAM_Core_Api_Area::get() . '.redirect')) {
145
  $rule = explode('|', $post->get(AAM_Core_Api_Area::get() . '.location'));
 
146
 
147
  if (count($rule) == 1) { // TODO: legacy. Remove in Jul 2020
148
  AAM_Core_API::redirect($rule[0]);
149
  } elseif ($rule[0] == 'page') {
150
- wp_safe_redirect(get_page_link($rule[1]), 307);
151
  } elseif ($rule[0] == 'url') {
152
- wp_redirect($rule[1], 307);
153
  } elseif (($rule[0] == 'callback') && is_callable($rule[1])) {
154
  call_user_func($rule[1], $post);
155
  }
143
  protected function checkRedirect(AAM_Core_Object_Post $post) {
144
  if ($post->has(AAM_Core_Api_Area::get() . '.redirect')) {
145
  $rule = explode('|', $post->get(AAM_Core_Api_Area::get() . '.location'));
146
+ $code = apply_filters('aam-post-redirect-http-code-filter', 307);
147
 
148
  if (count($rule) == 1) { // TODO: legacy. Remove in Jul 2020
149
  AAM_Core_API::redirect($rule[0]);
150
  } elseif ($rule[0] == 'page') {
151
+ wp_safe_redirect(get_page_link($rule[1]), $code);
152
  } elseif ($rule[0] == 'url') {
153
+ wp_redirect($rule[1], $code);
154
  } elseif (($rule[0] == 'callback') && is_callable($rule[1])) {
155
  call_user_func($rule[1], $post);
156
  }
Application/Frontend/Filter.php CHANGED
@@ -39,15 +39,12 @@ class AAM_Frontend_Filter {
39
  add_action('wp', array($this, 'wp'), 999);
40
  add_action('404_template', array($this, 'themeRedirect'), 999);
41
 
42
- //important to keep this option optional for optimization reasons
43
- if (AAM_Core_Config::get('core.settings.checkPostVisibility', true)) {
44
- // TODO: figure out how to remove these two hooks and inject "visibility"
45
- // object instead
46
- //filter navigation pages & taxonomies
47
- add_filter('wp_get_nav_menu_items', array($this, 'getNavigationMenu'), 999);
48
- // filter navigation pages & taxonomies
49
- add_filter('get_pages', array($this, 'filterPages'), 999);
50
- }
51
 
52
  //widget filters
53
  add_filter('sidebars_widgets', array($this, 'filterWidgets'), 999);
39
  add_action('wp', array($this, 'wp'), 999);
40
  add_action('404_template', array($this, 'themeRedirect'), 999);
41
 
42
+ // TODO: figure out how to remove these two hooks and inject "visibility"
43
+ // object instead
44
+ //filter navigation pages & taxonomies
45
+ add_filter('wp_get_nav_menu_items', array($this, 'getNavigationMenu'), 999);
46
+ // filter navigation pages & taxonomies
47
+ add_filter('get_pages', array($this, 'filterPages'), 999);
 
 
 
48
 
49
  //widget filters
50
  add_filter('sidebars_widgets', array($this, 'filterWidgets'), 999);
Application/Frontend/Manager.php CHANGED
@@ -110,7 +110,11 @@ class AAM_Frontend_Manager {
110
  */
111
  public function printJavascript() {
112
  if (AAM_Core_Config::get('core.settings.secureLogin', true)) {
113
- wp_enqueue_script('aam-login', AAM_MEDIA . '/js/aam-login.js');
 
 
 
 
114
 
115
  //add plugin localization
116
  $locals = array(
110
  */
111
  public function printJavascript() {
112
  if (AAM_Core_Config::get('core.settings.secureLogin', true)) {
113
+ wp_enqueue_script(
114
+ 'aam-login',
115
+ AAM_MEDIA . '/js/aam-login.js',
116
+ array('jquery')
117
+ );
118
 
119
  //add plugin localization
120
  $locals = array(
Application/Shared/Manager.php CHANGED
@@ -64,23 +64,60 @@ class AAM_Shared_Manager {
64
  }
65
 
66
  // Control post visibility
67
- //important to keep this option optional for optimization reasons
68
- if (AAM_Core_Config::get('core.settings.checkPostVisibility', true)) {
69
- add_filter(
70
- 'posts_clauses_request',
71
- array(self::$_instance, 'filterPostQuery'),
72
- 999,
73
- 2
74
- );
75
- }
76
-
77
  //filter post content
78
- add_filter('the_content', array(self::$_instance, 'filterPostContent'), 999);
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
 
81
  return self::$_instance;
82
  }
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  /**
85
  *
86
  * @param type $method
@@ -132,16 +169,12 @@ class AAM_Shared_Manager {
132
  * @return type
133
  */
134
  protected function isPostFilterEnabled() {
135
- $visibility = AAM_Core_Config::get('core.settings.checkPostVisibility', true);
136
-
137
- if ($visibility) {
138
- if (AAM_Core_Api_Area::isBackend()) {
139
- $visibility = AAM_Core_Config::get('core.settings.backendAccessControl', true);
140
- } elseif (AAM_Core_Api_Area::isAPI()) {
141
- $visibility = AAM_Core_Config::get('core.settings.apiAccessControl', true);
142
- } else {
143
- $visibility = AAM_Core_Config::get('core.settings.frontendAccessControl', true);
144
- }
145
  }
146
 
147
  return $visibility;
@@ -166,7 +199,7 @@ class AAM_Shared_Manager {
166
  } elseif ($wpQuery->is_page) {
167
  $postType = 'page';
168
  } else {
169
- $postType = 'post';
170
  }
171
 
172
  if ($postType == 'any') {
64
  }
65
 
66
  // Control post visibility
67
+ add_filter(
68
+ 'posts_clauses_request',
69
+ array(self::$_instance, 'filterPostQuery'),
70
+ 999,
71
+ 2
72
+ );
73
+
 
 
 
74
  //filter post content
75
+ add_filter(
76
+ 'the_content', array(self::$_instance, 'filterPostContent'), 999
77
+ );
78
+
79
+ //filter admin toolbar
80
+ if (AAM_Core_Config::get('core.settings.backendAccessControl', true)) {
81
+ if (filter_input(INPUT_GET, 'init') !== 'toolbar') {
82
+ add_action(
83
+ 'wp_before_admin_bar_render',
84
+ array(self::$_instance, 'filterToolbar'),
85
+ 999
86
+ );
87
+ }
88
+ }
89
  }
90
 
91
  return self::$_instance;
92
  }
93
 
94
+ /**
95
+ *
96
+ * @global type $wp_admin_bar
97
+ */
98
+ public function filterToolbar() {
99
+ global $wp_admin_bar;
100
+
101
+ $toolbar = AAM::api()->getUser()->getObject('toolbar');
102
+
103
+ //echo '<pre>'; print_r($wp_admin_bar->get_nodes()); die();
104
+
105
+ foreach($wp_admin_bar->get_nodes() as $id => $node) {
106
+ if ($toolbar->has($id, true)) {
107
+ if (!empty($node->parent)) { // update parent node with # link
108
+ $parent = $wp_admin_bar->get_node($node->parent);
109
+ if ($parent && ($parent->href == $node->href)) {
110
+ $wp_admin_bar->add_node(array(
111
+ 'id' => $parent->id,
112
+ 'href' => '#'
113
+ ));
114
+ }
115
+ }
116
+ $wp_admin_bar->remove_node($id);
117
+ }
118
+ }
119
+ }
120
+
121
  /**
122
  *
123
  * @param type $method
169
  * @return type
170
  */
171
  protected function isPostFilterEnabled() {
172
+ if (AAM_Core_Api_Area::isBackend()) {
173
+ $visibility = AAM_Core_Config::get('core.settings.backendAccessControl', true);
174
+ } elseif (AAM_Core_Api_Area::isAPI()) {
175
+ $visibility = AAM_Core_Config::get('core.settings.apiAccessControl', true);
176
+ } else {
177
+ $visibility = AAM_Core_Config::get('core.settings.frontendAccessControl', true);
 
 
 
 
178
  }
179
 
180
  return $visibility;
199
  } elseif ($wpQuery->is_page) {
200
  $postType = 'page';
201
  } else {
202
+ $postType = 'any';
203
  }
204
 
205
  if ($postType == 'any') {
aam.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: All you need to manage access to your WordPress website
6
- Version: 5.3.5
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
3
  /**
4
  Plugin Name: Advanced Access Manager
5
  Description: All you need to manage access to your WordPress website
6
+ Version: 5.4
7
  Author: Vasyl Martyniuk <vasyl@vasyltech.com>
8
  Author URI: https://vasyltech.com
9
 
media/css/aam.css CHANGED
@@ -53,6 +53,11 @@
53
  }
54
 
55
  .icon-clock:before { content: '\e800' !important; } /* '' */
 
 
 
 
 
56
  .icon-asterisk:before { content: '\e801' !important; } /* '' */
57
  .icon-spin4:before { content: '\e802' !important; } /* '' */
58
  .icon-user-secret:before { content: '\e803' !important; } /* '' */
@@ -1473,6 +1478,382 @@ div.CodeMirror-dragcursors {
1473
  /* Help users use markselection to safely style text background */
1474
  span.CodeMirror-selectedtext { background: none; }
1475
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1476
  /* COVER KNOWN CSS ISSUES CASED BY OTHER PLUGINS OR THEMES */
1477
 
1478
  /* Bridge theme */
53
  }
54
 
55
  .icon-clock:before { content: '\e800' !important; } /* '' */
56
+ .icon-calendar:before { content: '\e80f' !important; } /* '' */
57
+ .icon-angle-left:before { content: '\f104' !important; } /* '' */
58
+ .icon-angle-right:before { content: '\f105' !important; } /* '' */
59
+ .icon-angle-up:before { content: '\f106' !important; } /* '' */
60
+ .icon-angle-down:before { content: '\f107' !important; } /* '' */
61
  .icon-asterisk:before { content: '\e801' !important; } /* '' */
62
  .icon-spin4:before { content: '\e802' !important; } /* '' */
63
  .icon-user-secret:before { content: '\e803' !important; } /* '' */
1478
  /* Help users use markselection to safely style text background */
1479
  span.CodeMirror-selectedtext { background: none; }
1480
 
1481
+ /*!
1482
+ * Datetimepicker for Bootstrap 3
1483
+ * version : 4.17.47
1484
+ * https://github.com/Eonasdan/bootstrap-datetimepicker/
1485
+ */
1486
+ .bootstrap-datetimepicker-widget {
1487
+ list-style: none;
1488
+ }
1489
+ .bootstrap-datetimepicker-widget.dropdown-menu {
1490
+ display: block;
1491
+ margin: 2px 0;
1492
+ padding: 4px;
1493
+ width: 19em;
1494
+ }
1495
+ @media (min-width: 768px) {
1496
+ .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
1497
+ width: 38em;
1498
+ }
1499
+ }
1500
+ @media (min-width: 992px) {
1501
+ .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
1502
+ width: 38em;
1503
+ }
1504
+ }
1505
+ @media (min-width: 1200px) {
1506
+ .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
1507
+ width: 38em;
1508
+ }
1509
+ }
1510
+ .bootstrap-datetimepicker-widget.dropdown-menu:before,
1511
+ .bootstrap-datetimepicker-widget.dropdown-menu:after {
1512
+ content: '';
1513
+ display: inline-block;
1514
+ position: absolute;
1515
+ }
1516
+ .bootstrap-datetimepicker-widget.dropdown-menu.bottom:before {
1517
+ border-left: 7px solid transparent;
1518
+ border-right: 7px solid transparent;
1519
+ border-bottom: 7px solid #ccc;
1520
+ border-bottom-color: rgba(0, 0, 0, 0.2);
1521
+ top: -7px;
1522
+ left: 7px;
1523
+ }
1524
+ .bootstrap-datetimepicker-widget.dropdown-menu.bottom:after {
1525
+ border-left: 6px solid transparent;
1526
+ border-right: 6px solid transparent;
1527
+ border-bottom: 6px solid white;
1528
+ top: -6px;
1529
+ left: 8px;
1530
+ }
1531
+ .bootstrap-datetimepicker-widget.dropdown-menu.top:before {
1532
+ border-left: 7px solid transparent;
1533
+ border-right: 7px solid transparent;
1534
+ border-top: 7px solid #ccc;
1535
+ border-top-color: rgba(0, 0, 0, 0.2);
1536
+ bottom: -7px;
1537
+ left: 6px;
1538
+ }
1539
+ .bootstrap-datetimepicker-widget.dropdown-menu.top:after {
1540
+ border-left: 6px solid transparent;
1541
+ border-right: 6px solid transparent;
1542
+ border-top: 6px solid white;
1543
+ bottom: -6px;
1544
+ left: 7px;
1545
+ }
1546
+ .bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before {
1547
+ left: auto;
1548
+ right: 6px;
1549
+ }
1550
+ .bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after {
1551
+ left: auto;
1552
+ right: 7px;
1553
+ }
1554
+ .bootstrap-datetimepicker-widget .list-unstyled {
1555
+ margin: 0;
1556
+ }
1557
+ .bootstrap-datetimepicker-widget a[data-action] {
1558
+ padding: 6px 0;
1559
+ }
1560
+ .bootstrap-datetimepicker-widget a[data-action]:active {
1561
+ box-shadow: none;
1562
+ }
1563
+ .bootstrap-datetimepicker-widget .timepicker-hour,
1564
+ .bootstrap-datetimepicker-widget .timepicker-minute,
1565
+ .bootstrap-datetimepicker-widget .timepicker-second {
1566
+ width: 54px;
1567
+ font-weight: bold;
1568
+ font-size: 1.2em;
1569
+ margin: 0;
1570
+ }
1571
+ .bootstrap-datetimepicker-widget button[data-action] {
1572
+ padding: 6px;
1573
+ }
1574
+ .bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after {
1575
+ position: absolute;
1576
+ width: 1px;
1577
+ height: 1px;
1578
+ margin: -1px;
1579
+ padding: 0;
1580
+ overflow: hidden;
1581
+ clip: rect(0, 0, 0, 0);
1582
+ border: 0;
1583
+ content: "Increment Hours";
1584
+ }
1585
+ .bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after {
1586
+ position: absolute;
1587
+ width: 1px;
1588
+ height: 1px;
1589
+ margin: -1px;
1590
+ padding: 0;
1591
+ overflow: hidden;
1592
+ clip: rect(0, 0, 0, 0);
1593
+ border: 0;
1594
+ content: "Increment Minutes";
1595
+ }
1596
+ .bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after {
1597
+ position: absolute;
1598
+ width: 1px;
1599
+ height: 1px;
1600
+ margin: -1px;
1601
+ padding: 0;
1602
+ overflow: hidden;
1603
+ clip: rect(0, 0, 0, 0);
1604
+ border: 0;
1605
+ content: "Decrement Hours";
1606
+ }
1607
+ .bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after {
1608
+ position: absolute;
1609
+ width: 1px;
1610
+ height: 1px;
1611
+ margin: -1px;
1612
+ padding: 0;
1613
+ overflow: hidden;
1614
+ clip: rect(0, 0, 0, 0);
1615
+ border: 0;
1616
+ content: "Decrement Minutes";
1617
+ }
1618
+ .bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after {
1619
+ position: absolute;
1620
+ width: 1px;
1621
+ height: 1px;
1622
+ margin: -1px;
1623
+ padding: 0;
1624
+ overflow: hidden;
1625
+ clip: rect(0, 0, 0, 0);
1626
+ border: 0;
1627
+ content: "Show Hours";
1628
+ }
1629
+ .bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after {
1630
+ position: absolute;
1631
+ width: 1px;
1632
+ height: 1px;
1633
+ margin: -1px;
1634
+ padding: 0;
1635
+ overflow: hidden;
1636
+ clip: rect(0, 0, 0, 0);
1637
+ border: 0;
1638
+ content: "Show Minutes";
1639
+ }
1640
+ .bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after {
1641
+ position: absolute;
1642
+ width: 1px;
1643
+ height: 1px;
1644
+ margin: -1px;
1645
+ padding: 0;
1646
+ overflow: hidden;
1647
+ clip: rect(0, 0, 0, 0);
1648
+ border: 0;
1649
+ content: "Toggle AM/PM";
1650
+ }
1651
+ .bootstrap-datetimepicker-widget .btn[data-action="clear"]::after {
1652
+ position: absolute;
1653
+ width: 1px;
1654
+ height: 1px;
1655
+ margin: -1px;
1656
+ padding: 0;
1657
+ overflow: hidden;
1658
+ clip: rect(0, 0, 0, 0);
1659
+ border: 0;
1660
+ content: "Clear the picker";
1661
+ }
1662
+ .bootstrap-datetimepicker-widget .btn[data-action="today"]::after {
1663
+ position: absolute;
1664
+ width: 1px;
1665
+ height: 1px;
1666
+ margin: -1px;
1667
+ padding: 0;
1668
+ overflow: hidden;
1669
+ clip: rect(0, 0, 0, 0);
1670
+ border: 0;
1671
+ content: "Set the date to today";
1672
+ }
1673
+ .bootstrap-datetimepicker-widget .picker-switch {
1674
+ text-align: center;
1675
+ }
1676
+ .bootstrap-datetimepicker-widget .picker-switch::after {
1677
+ position: absolute;
1678
+ width: 1px;
1679
+ height: 1px;
1680
+ margin: -1px;
1681
+ padding: 0;
1682
+ overflow: hidden;
1683
+ clip: rect(0, 0, 0, 0);
1684
+ border: 0;
1685
+ content: "Toggle Date and Time Screens";
1686
+ }
1687
+ .bootstrap-datetimepicker-widget .picker-switch td {
1688
+ padding: 0;
1689
+ margin: 0;
1690
+ height: auto;
1691
+ width: auto;
1692
+ line-height: inherit;
1693
+ }
1694
+ .bootstrap-datetimepicker-widget .picker-switch td span {
1695
+ line-height: 2.5;
1696
+ height: 2.5em;
1697
+ width: 100%;
1698
+ }
1699
+ .bootstrap-datetimepicker-widget table {
1700
+ width: 100%;
1701
+ margin: 0;
1702
+ }
1703
+ .bootstrap-datetimepicker-widget table td,
1704
+ .bootstrap-datetimepicker-widget table th {
1705
+ text-align: center;
1706
+ border-radius: 4px;
1707
+ }
1708
+ .bootstrap-datetimepicker-widget table th {
1709
+ height: 20px;
1710
+ line-height: 20px;
1711
+ width: 20px;
1712
+ }
1713
+ .bootstrap-datetimepicker-widget table th.picker-switch {
1714
+ width: 145px;
1715
+ }
1716
+ .bootstrap-datetimepicker-widget table th.disabled,
1717
+ .bootstrap-datetimepicker-widget table th.disabled:hover {
1718
+ background: none;
1719
+ color: #777777;
1720
+ cursor: not-allowed;
1721
+ }
1722
+ .bootstrap-datetimepicker-widget table th.prev::after {
1723
+ position: absolute;
1724
+ width: 1px;
1725
+ height: 1px;
1726
+ margin: -1px;
1727
+ padding: 0;
1728
+ overflow: hidden;
1729
+ clip: rect(0, 0, 0, 0);
1730
+ border: 0;
1731
+ content: "Previous Month";
1732
+ }
1733
+ .bootstrap-datetimepicker-widget table th.next::after {
1734
+ position: absolute;
1735
+ width: 1px;
1736
+ height: 1px;
1737
+ margin: -1px;
1738
+ padding: 0;
1739
+ overflow: hidden;
1740
+ clip: rect(0, 0, 0, 0);
1741
+ border: 0;
1742
+ content: "Next Month";
1743
+ }
1744
+ .bootstrap-datetimepicker-widget table thead tr:first-child th {
1745
+ cursor: pointer;
1746
+ }
1747
+ .bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
1748
+ background: #eeeeee;
1749
+ }
1750
+ .bootstrap-datetimepicker-widget table td {
1751
+ height: 54px;
1752
+ line-height: 54px;
1753
+ width: 54px;
1754
+ }
1755
+ .bootstrap-datetimepicker-widget table td.cw {
1756
+ font-size: .8em;
1757
+ height: 20px;
1758
+ line-height: 20px;
1759
+ color: #777777;
1760
+ }
1761
+ .bootstrap-datetimepicker-widget table td.day {
1762
+ height: 20px;
1763
+ line-height: 20px;
1764
+ width: 20px;
1765
+ }
1766
+ .bootstrap-datetimepicker-widget table td.day:hover,
1767
+ .bootstrap-datetimepicker-widget table td.hour:hover,
1768
+ .bootstrap-datetimepicker-widget table td.minute:hover,
1769
+ .bootstrap-datetimepicker-widget table td.second:hover {
1770
+ background: #eeeeee;
1771
+ cursor: pointer;
1772
+ }
1773
+ .bootstrap-datetimepicker-widget table td.old,
1774
+ .bootstrap-datetimepicker-widget table td.new {
1775
+ color: #777777;
1776
+ }
1777
+ .bootstrap-datetimepicker-widget table td.today {
1778
+ position: relative;
1779
+ }
1780
+ .bootstrap-datetimepicker-widget table td.today:before {
1781
+ content: '';
1782
+ display: inline-block;
1783
+ border: solid transparent;
1784
+ border-width: 0 0 7px 7px;
1785
+ border-bottom-color: #337ab7;
1786
+ border-top-color: rgba(0, 0, 0, 0.2);
1787
+ position: absolute;
1788
+ bottom: 4px;
1789
+ right: 4px;
1790
+ }
1791
+ .bootstrap-datetimepicker-widget table td.active,
1792
+ .bootstrap-datetimepicker-widget table td.active:hover {
1793
+ background-color: #337ab7;
1794
+ color: #fff;
1795
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
1796
+ }
1797
+ .bootstrap-datetimepicker-widget table td.active.today:before {
1798
+ border-bottom-color: #fff;
1799
+ }
1800
+ .bootstrap-datetimepicker-widget table td.disabled,
1801
+ .bootstrap-datetimepicker-widget table td.disabled:hover {
1802
+ background: none;
1803
+ color: #777777;
1804
+ cursor: not-allowed;
1805
+ }
1806
+ .bootstrap-datetimepicker-widget table td span {
1807
+ display: inline-block;
1808
+ width: 54px;
1809
+ height: 54px;
1810
+ line-height: 54px;
1811
+ margin: 2px 1.5px;
1812
+ cursor: pointer;
1813
+ color: #000000;
1814
+ border-radius: 4px;
1815
+ }
1816
+ .bootstrap-datetimepicker-widget table td span:hover {
1817
+ background: #eeeeee;
1818
+ }
1819
+ .bootstrap-datetimepicker-widget table td span.active {
1820
+ background-color: #337ab7;
1821
+ color: #fff;
1822
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
1823
+ }
1824
+ .bootstrap-datetimepicker-widget table td span.old {
1825
+ color: #777777;
1826
+ }
1827
+ .bootstrap-datetimepicker-widget table td span.disabled,
1828
+ .bootstrap-datetimepicker-widget table td span.disabled:hover {
1829
+ background: none;
1830
+ color: #777777;
1831
+ cursor: not-allowed;
1832
+ }
1833
+ .bootstrap-datetimepicker-widget.usetwentyfour td.hour {
1834
+ height: 27px;
1835
+ line-height: 27px;
1836
+ }
1837
+ .bootstrap-datetimepicker-widget.wider {
1838
+ width: 21em;
1839
+ }
1840
+ .bootstrap-datetimepicker-widget .datepicker-decades .decade {
1841
+ line-height: 1.8em !important;
1842
+ }
1843
+ .input-group.date .input-group-addon {
1844
+ cursor: pointer;
1845
+ }
1846
+ .sr-only {
1847
+ position: absolute;
1848
+ width: 1px;
1849
+ height: 1px;
1850
+ margin: -1px;
1851
+ padding: 0;
1852
+ overflow: hidden;
1853
+ clip: rect(0, 0, 0, 0);
1854
+ border: 0;
1855
+ }
1856
+
1857
  /* COVER KNOWN CSS ISSUES CASED BY OTHER PLUGINS OR THEMES */
1858
 
1859
  /* Bridge theme */
media/font/fontello.eot CHANGED
Binary file
media/font/fontello.svg CHANGED
@@ -36,6 +36,8 @@
36
 
37
  <glyph glyph-name="wrench" unicode="&#xe80e;" d="M214 29q0 14-10 25t-25 10-25-10-11-25 11-25 25-11 25 11 10 25z m360 234l-381-381q-21-20-50-20-29 0-51 20l-59 61q-21 20-21 50 0 29 21 51l380 380q22-55 64-97t97-64z m354 243q0-22-13-59-27-75-92-122t-144-46q-104 0-177 73t-73 177 73 176 177 74q32 0 67-10t60-26q9-6 9-15t-9-16l-163-94v-125l108-60q2 2 44 27t75 45 40 20q8 0 13-5t5-14z" horiz-adv-x="928.6" />
38
 
 
 
39
  <glyph glyph-name="sort-down" unicode="&#xe810;" d="M571 243q0-15-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 10-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
40
 
41
  <glyph glyph-name="pencil" unicode="&#xe811;" d="M203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
@@ -96,6 +98,14 @@
96
 
97
  <glyph glyph-name="exchange" unicode="&#xf0ec;" d="M1000 189v-107q0-7-5-12t-13-6h-768v-107q0-7-5-12t-13-6q-6 0-13 6l-178 178q-5 6-5 13 0 8 5 13l179 178q5 5 12 5 8 0 13-5t5-13v-107h768q7 0 13-5t5-13z m0 304q0-8-5-13l-179-178q-5-6-12-6-8 0-13 6t-5 12v107h-768q-7 0-13 6t-5 12v107q0 8 5 13t13 5h768v107q0 8 5 13t13 5q6 0 13-5l178-178q5-5 5-13z" horiz-adv-x="1000" />
98
 
 
 
 
 
 
 
 
 
99
  <glyph glyph-name="circle" unicode="&#xf111;" d="M857 350q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
100
 
101
  <glyph glyph-name="angle-circled-up" unicode="&#xf139;" d="M650 214l57 57q11 11 11 25t-11 26l-253 253q-11 11-25 11t-25-11l-254-253q-10-11-10-26t10-25l57-57q11-10 25-10t25 10l172 172 171-172q11-10 25-10t25 10z m207 136q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
36
 
37
  <glyph glyph-name="wrench" unicode="&#xe80e;" d="M214 29q0 14-10 25t-25 10-25-10-11-25 11-25 25-11 25 11 10 25z m360 234l-381-381q-21-20-50-20-29 0-51 20l-59 61q-21 20-21 50 0 29 21 51l380 380q22-55 64-97t97-64z m354 243q0-22-13-59-27-75-92-122t-144-46q-104 0-177 73t-73 177 73 176 177 74q32 0 67-10t60-26q9-6 9-15t-9-16l-163-94v-125l108-60q2 2 44 27t75 45 40 20q8 0 13-5t5-14z" horiz-adv-x="928.6" />
38
 
39
+ <glyph glyph-name="calendar" unicode="&#xe80f;" d="M71-79h161v161h-161v-161z m197 0h178v161h-178v-161z m-197 197h161v178h-161v-178z m197 0h178v178h-178v-178z m-197 214h161v161h-161v-161z m411-411h179v161h-179v-161z m-214 411h178v161h-178v-161z m428-411h161v161h-161v-161z m-214 197h179v178h-179v-178z m-196 482v161q0 7-6 12t-12 6h-36q-7 0-12-6t-6-12v-161q0-7 6-13t12-5h36q7 0 12 5t6 13z m410-482h161v178h-161v-178z m-214 214h179v161h-179v-161z m214 0h161v161h-161v-161z m18 268v161q0 7-5 12t-13 6h-35q-7 0-13-6t-5-12v-161q0-7 5-13t13-5h35q8 0 13 5t5 13z m215 36v-715q0-29-22-50t-50-21h-786q-29 0-50 21t-21 50v715q0 29 21 50t50 21h72v54q0 37 26 63t63 26h36q37 0 63-26t26-63v-54h214v54q0 37 27 63t63 26h35q37 0 64-26t26-63v-54h71q29 0 50-21t22-50z" horiz-adv-x="928.6" />
40
+
41
  <glyph glyph-name="sort-down" unicode="&#xe810;" d="M571 243q0-15-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 10-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
42
 
43
  <glyph glyph-name="pencil" unicode="&#xe811;" d="M203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
98
 
99
  <glyph glyph-name="exchange" unicode="&#xf0ec;" d="M1000 189v-107q0-7-5-12t-13-6h-768v-107q0-7-5-12t-13-6q-6 0-13 6l-178 178q-5 6-5 13 0 8 5 13l179 178q5 5 12 5 8 0 13-5t5-13v-107h768q7 0 13-5t5-13z m0 304q0-8-5-13l-179-178q-5-6-12-6-8 0-13 6t-5 12v107h-768q-7 0-13 6t-5 12v107q0 8 5 13t13 5h768v107q0 8 5 13t13 5q6 0 13-5l178-178q5-5 5-13z" horiz-adv-x="1000" />
100
 
101
+ <glyph glyph-name="angle-left" unicode="&#xf104;" d="M350 546q0-7-6-12l-219-220 219-219q6-6 6-13t-6-13l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="357.1" />
102
+
103
+ <glyph glyph-name="angle-right" unicode="&#xf105;" d="M332 314q0-7-5-12l-261-261q-5-5-12-5t-13 5l-28 28q-6 6-6 13t6 13l219 219-219 220q-6 5-6 12t6 13l28 28q5 6 13 6t12-6l261-260q5-5 5-13z" horiz-adv-x="357.1" />
104
+
105
+ <glyph glyph-name="angle-up" unicode="&#xf106;" d="M600 189q0-7-6-12l-28-28q-5-6-12-6t-13 6l-220 219-219-219q-5-6-13-6t-12 6l-28 28q-6 5-6 12t6 13l260 260q5 6 12 6t13-6l260-260q6-5 6-13z" horiz-adv-x="642.9" />
106
+
107
+ <glyph glyph-name="angle-down" unicode="&#xf107;" d="M600 439q0-7-6-12l-260-261q-5-5-13-5t-12 5l-260 261q-6 5-6 12t6 13l28 28q5 6 12 6t13-6l219-219 220 219q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="642.9" />
108
+
109
  <glyph glyph-name="circle" unicode="&#xf111;" d="M857 350q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
110
 
111
  <glyph glyph-name="angle-circled-up" unicode="&#xf139;" d="M650 214l57 57q11 11 11 25t-11 26l-253 253q-11 11-25 11t-25-11l-254-253q-10-11-10-26t10-25l57-57q11-10 25-10t25 10l172 172 171-172q11-10 25-10t25 10z m207 136q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
media/font/fontello.ttf CHANGED
Binary file
media/font/fontello.woff CHANGED
Binary file
media/font/fontello.woff2 CHANGED
Binary file
media/js/aam.js CHANGED
@@ -691,7 +691,7 @@
691
  },
692
  success: function (response) {
693
  $('#user-list-filter').html(
694
- '<option value="">' + aam.__('Select Role') + '</option>'
695
  );
696
  for (var i in response) {
697
  $('#user-list-filter').append(
@@ -865,6 +865,41 @@
865
  }
866
  });
867
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
868
  //edit role button
869
  $('#edit-user-expiration-btn').bind('click', function () {
870
  var _this = this;
@@ -1096,7 +1131,7 @@
1096
  $('#aam-menu-overwrite').show();
1097
 
1098
  if (status) { //locked the menu
1099
- $('.aam-bordered', target).append(
1100
  $('<div/>', {'class': 'aam-lock'})
1101
  );
1102
  _this.removeClass('btn-danger').addClass('btn-primary');
@@ -1154,6 +1189,193 @@
1154
  aam.addHook('init', initialize);
1155
 
1156
  })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1157
 
1158
 
1159
  /**
@@ -1590,7 +1812,7 @@
1590
 
1591
 
1592
  /**
1593
- * Posts & Pages Interface
1594
  *
1595
  * @param {jQuery} $
1596
  *
@@ -2119,6 +2341,37 @@
2119
  $('#post-redirect-rule').val(val.join('|'));
2120
  });
2121
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2122
  }
2123
  }
2124
 
@@ -2499,6 +2752,7 @@
2499
  searchPlaceholder: aam.__('Search Route'),
2500
  info: aam.__('_TOTAL_ route(s)'),
2501
  infoFiltered: '',
 
2502
  infoEmpty: aam.__('Nothing to show'),
2503
  lengthMenu: '_MENU_'
2504
  },
691
  },
692
  success: function (response) {
693
  $('#user-list-filter').html(
694
+ '<option value="">' + aam.__('Filter By Role') + '</option>'
695
  );
696
  for (var i in response) {
697
  $('#user-list-filter').append(
865
  }
866
  });
867
 
868
+ $('#user-expiration-datapicker').datetimepicker({
869
+ icons: {
870
+ time: "icon-clock",
871
+ date: "icon-calendar",
872
+ up: "icon-angle-up",
873
+ down: "icon-angle-down",
874
+ previous: "icon-angle-left",
875
+ next: "icon-angle-right"
876
+ },
877
+ inline: true,
878
+ sideBySide: true
879
+ });
880
+
881
+ $('#edit-user-expiration-modal').on('show.bs.modal', function() {
882
+ try{
883
+ if ($.trim($('#user-expires').val())) {
884
+ $('#user-expiration-datapicker').data('DateTimePicker').defaultDate(
885
+ $('#user-expires').val()
886
+ );
887
+ } else {
888
+ $('#user-expiration-datapicker').data('DateTimePicker').defaultDate(
889
+ new Date()
890
+ );
891
+ }
892
+ } catch(e) {
893
+ // do nothing. Prevent from any kind of corrupted data
894
+ }
895
+ });
896
+
897
+ $('#user-expiration-datapicker').on('dp.change', function(res) {
898
+ $('#user-expires').val(
899
+ res.date.format('MM/DD/YYYY, h:mm a')
900
+ );
901
+ });
902
+
903
  //edit role button
904
  $('#edit-user-expiration-btn').bind('click', function () {
905
  var _this = this;
1131
  $('#aam-menu-overwrite').show();
1132
 
1133
  if (status) { //locked the menu
1134
+ $('.aam-inner-tab', target).append(
1135
  $('<div/>', {'class': 'aam-lock'})
1136
  );
1137
  _this.removeClass('btn-danger').addClass('btn-primary');
1189
  aam.addHook('init', initialize);
1190
 
1191
  })(jQuery);
1192
+
1193
+ /**
1194
+ * Toolbar Interface
1195
+ *
1196
+ * @param {jQuery} $
1197
+ *
1198
+ * @returns {void}
1199
+ */
1200
+ (function ($) {
1201
+
1202
+ /**
1203
+ *
1204
+ * @param {type} param
1205
+ * @param {type} value
1206
+ * @returns {undefined}
1207
+ */
1208
+ function save(items, status, successCallback) {
1209
+ $.ajax(aamLocal.ajaxurl, {
1210
+ type: 'POST',
1211
+ dataType: 'json',
1212
+ data: {
1213
+ action: 'aam',
1214
+ sub_action: 'Main_Toolbar.save',
1215
+ subject: aam.getSubject().type,
1216
+ subjectId: aam.getSubject().id,
1217
+ _ajax_nonce: aamLocal.nonce,
1218
+ items: items,
1219
+ status: status
1220
+ },
1221
+ success: function(response) {
1222
+ successCallback(response);
1223
+ },
1224
+ error: function () {
1225
+ aam.notification('danger', aam.__('Application Error'));
1226
+ }
1227
+ });
1228
+ }
1229
+
1230
+ /**
1231
+ *
1232
+ * @returns {undefined}
1233
+ */
1234
+ function getContent() {
1235
+ $.ajax(aamLocal.ajaxurl, {
1236
+ type: 'POST',
1237
+ dataType: 'html',
1238
+ data: {
1239
+ action: 'aam',
1240
+ sub_action: 'Main_Toolbar.getContent',
1241
+ _ajax_nonce: aamLocal.nonce,
1242
+ subject: aam.getSubject().type,
1243
+ subjectId: aam.getSubject().id
1244
+ },
1245
+ success: function (response) {
1246
+ $('#toolbar-content').replaceWith(response);
1247
+ $('#toolbar-content').addClass('active');
1248
+ initialize();
1249
+ },
1250
+ error: function () {
1251
+ aam.notification('danger', aam.__('Application error'));
1252
+ }
1253
+ });
1254
+ }
1255
+
1256
+ /**
1257
+ *
1258
+ * @returns {undefined}
1259
+ */
1260
+ function initialize() {
1261
+ if ($('#toolbar-content').length) {
1262
+ $('.aam-restrict-toolbar').each(function () {
1263
+ $(this).bind('click', function () {
1264
+ var _this = $(this);
1265
+ var status = ($('i', $(this)).hasClass('icon-eye-off') ? 1 : 0);
1266
+ var target = _this.data('target');
1267
+
1268
+ $('i', _this).attr('class', 'icon-spin4 animate-spin');
1269
+
1270
+ var items = new Array(_this.data('toolbar'));
1271
+
1272
+ $('input', target).each(function () {
1273
+ $(this).attr('checked', status ? true : false);
1274
+ items.push($(this).data('toolbar'));
1275
+ });
1276
+
1277
+ save(items, status, function(result) {
1278
+ if (result.status === 'success') {
1279
+ $('#aam-toolbar-overwrite').show();
1280
+
1281
+ if (status) { //locked the menu
1282
+ $('.aam-inner-tab', target).append(
1283
+ $('<div/>', {'class': 'aam-lock'})
1284
+ );
1285
+ _this.removeClass('btn-danger').addClass('btn-primary');
1286
+ _this.html('<i class="icon-eye"></i>' + aam.__('Show Menu'));
1287
+ //add menu restricted indicator
1288
+ var ind = $('<i/>', {
1289
+ 'class': 'aam-panel-title-icon icon-eye-off text-danger'
1290
+ });
1291
+ $('.panel-title', target + '-heading').append(ind);
1292
+ } else {
1293
+ $('.aam-lock', target).remove();
1294
+ _this.removeClass('btn-primary').addClass('btn-danger');
1295
+ _this.html(
1296
+ '<i class="icon-eye-off"></i>' + aam.__('Restrict Menu')
1297
+ );
1298
+ $('.panel-title .icon-eye-off', target + '-heading').remove();
1299
+ }
1300
+ } else {
1301
+ _this.attr('checked', !status);
1302
+ }
1303
+ });
1304
+ });
1305
+ });
1306
+
1307
+ //init refresh list button
1308
+ $('#refresh-toolbar-list').bind('click', function () {
1309
+ $.ajax(aamLocal.ajaxurl, {
1310
+ type: 'POST',
1311
+ dataType: 'json',
1312
+ data: {
1313
+ action: 'aam',
1314
+ sub_action: 'Main_Toolbar.refreshList',
1315
+ _ajax_nonce: aamLocal.nonce
1316
+ },
1317
+ beforeSend: function () {
1318
+ $('i', '#refresh-toolbar-list').attr(
1319
+ 'class', 'icon-spin4 animate-spin'
1320
+ );
1321
+ },
1322
+ success: function (response) {
1323
+ if (response.status === 'success') {
1324
+ getContent();
1325
+ } else {
1326
+ aam.notification(
1327
+ 'danger',
1328
+ aam.__('Failed to retrieve toolbar')
1329
+ );
1330
+ }
1331
+ },
1332
+ error: function () {
1333
+ aam.notification(
1334
+ 'danger',
1335
+ aam.__('Application error')
1336
+ );
1337
+ },
1338
+ complete: function () {
1339
+ $('i', '#refresh-toolbar-list').attr(
1340
+ 'class', 'icon-arrows-cw'
1341
+ );
1342
+ }
1343
+ });
1344
+ });
1345
+
1346
+ //reset button
1347
+ $('#toolbar-reset').bind('click', function () {
1348
+ aam.reset('toolbar', $(this));
1349
+ });
1350
+
1351
+ $('input[type="checkbox"]', '#toolbar-list').each(function () {
1352
+ $(this).bind('click', function () {
1353
+ var _this = $(this);
1354
+ aam.save(
1355
+ $(this).data('toolbar'),
1356
+ $(this).attr('checked') ? 1 : 0,
1357
+ 'toolbar',
1358
+ null,
1359
+ function(result) {
1360
+ if (result.status === 'success') {
1361
+ $('#aam-toolbar-overwrite').show();
1362
+
1363
+ if (_this.attr('checked')) {
1364
+ _this.next().attr('data-original-title', aam.__('Uncheck to show'));
1365
+ } else {
1366
+ _this.next().attr('data-original-title', aam.__('Check to hide'));
1367
+ }
1368
+ }
1369
+ }
1370
+ );
1371
+ });
1372
+ });
1373
+ }
1374
+ }
1375
+
1376
+ aam.addHook('init', initialize);
1377
+
1378
+ })(jQuery);
1379
 
1380
 
1381
  /**
1812
 
1813
 
1814
  /**
1815
+ * Posts & Terms Interface
1816
  *
1817
  * @param {jQuery} $
1818
  *
2341
  $('#post-redirect-rule').val(val.join('|'));
2342
  });
2343
  });
2344
+
2345
+ $('#post-expiration-datapicker').datetimepicker({
2346
+ icons: {
2347
+ time: "icon-clock",
2348
+ date: "icon-calendar",
2349
+ up: "icon-angle-up",
2350
+ down: "icon-angle-down",
2351
+ previous: "icon-angle-left",
2352
+ next: "icon-angle-right"
2353
+ },
2354
+ inline: true,
2355
+ sideBySide: true
2356
+ });
2357
+
2358
+ $('#modal-access-expires').on('show.bs.modal', function() {
2359
+ if ($.trim($('#aam-expire-datetime').val())) {
2360
+ $('#post-expiration-datapicker').data('DateTimePicker').defaultDate(
2361
+ $('#aam-expire-datetime').val()
2362
+ );
2363
+ } else {
2364
+ $('#post-expiration-datapicker').data('DateTimePicker').defaultDate(
2365
+ new Date()
2366
+ );
2367
+ }
2368
+ });
2369
+
2370
+ $('#post-expiration-datapicker').on('dp.change', function(res) {
2371
+ $('#aam-expire-datetime').val(
2372
+ res.date.format('MM/DD/YYYY, h:mm a')
2373
+ );
2374
+ });
2375
  }
2376
  }
2377
 
2752
  searchPlaceholder: aam.__('Search Route'),
2753
  info: aam.__('_TOTAL_ route(s)'),
2754
  infoFiltered: '',
2755
+ emptyTable: aam.__('No API enpoints found. You might have APIs disabled.'),
2756
  infoEmpty: aam.__('Nothing to show'),
2757
  lengthMenu: '_MENU_'
2758
  },
media/js/vendor.js CHANGED
@@ -558,4 +558,12 @@ za;a.rmClass=Ua;a.keyNames=Ga})(F);F.version="5.34.0";return F});
558
 
559
  // Codemirror INI
560
  (function(X){"object"==typeof exports&&"object"==typeof module?X(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],X):X(CodeMirror)})(function(X){X.defineMode("properties",function(){return{token:function(I,D){var u=I.sol()||D.afterSection,U=I.eol();D.afterSection=!1;u&&(D.nextMultiline?(D.inMultiline=!0,D.nextMultiline=!1):D.position="def");U&&!D.nextMultiline&&(D.inMultiline=!1,D.position="def");if(u)for(;I.eatSpace(););U=I.next();if(!u||"#"!==
561
- U&&"!"!==U&&";"!==U){if(u&&"["===U)return D.afterSection=!0,I.skipTo("]"),I.eat("]"),"header";if("="===U||":"===U)return D.position="quote",null;"\\"===U&&"quote"===D.position&&I.eol()&&(D.nextMultiline=!0)}else return D.position="comment",I.skipToEnd(),"comment";return D.position},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}});X.defineMIME("text/x-properties","properties");X.defineMIME("text/x-ini","properties")});
 
 
 
 
 
 
 
 
558
 
559
  // Codemirror INI
560
  (function(X){"object"==typeof exports&&"object"==typeof module?X(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],X):X(CodeMirror)})(function(X){X.defineMode("properties",function(){return{token:function(I,D){var u=I.sol()||D.afterSection,U=I.eol();D.afterSection=!1;u&&(D.nextMultiline?(D.inMultiline=!0,D.nextMultiline=!1):D.position="def");U&&!D.nextMultiline&&(D.inMultiline=!1,D.position="def");if(u)for(;I.eatSpace(););U=I.next();if(!u||"#"!==
561
+ U&&"!"!==U&&";"!==U){if(u&&"["===U)return D.afterSection=!0,I.skipTo("]"),I.eat("]"),"header";if("="===U||":"===U)return D.position="quote",null;"\\"===U&&"quote"===D.position&&I.eol()&&(D.nextMultiline=!0)}else return D.position="comment",I.skipToEnd(),"comment";return D.position},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}});X.defineMIME("text/x-properties","properties");X.defineMIME("text/x-ini","properties")});
562
+
563
+ // Moment.js
564
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+"s"]=W[t]=e}function R(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\d/,z=/\d\d/,$=/\d{3}/,q=/\d{4}/,J=/[+-]?\d{6}/,B=/\d\d?/,Q=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ce(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),H("year","y"),L("year",1),ue("Y",se),ue("YY",B,z),ue("YYYY",ee,q),ue("YYYYY",te,J),ue("YYYYYY",te,J),ce(["YYYYY","YYYYYY"],me),ce("YYYY",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce("YY",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce("Y",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te("FullYear",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),H("month","M"),L("month",8),ue("M",B),ue("MM",B,z),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),ce(["M","MM"],function(e,t){t[_e]=k(e)-1}),ce(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,"Month")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,require("./locale/"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split("-")).length,n=(n=rt(e[r+1]))?n.split("-"):null;0<t;){if(s=at(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=""+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&""===r?v({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ue("Z",re),ue("ZZ",re),ce(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n=(t||"").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+"").match(Lt)||["-",0,0],i=60*s[1]+k(s[2]);return 0===i?0:"+"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,At(e="string"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,"Month")+a*n),r&&be(e,"Date",xe(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,"add"),Jt=zt(-1,"subtract");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",B,z),ue("gg",B,z),ue("GGGG",ee,q),ue("gggg",ee,q),ue("GGGGG",te,J),ue("ggggg",te,J),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe(["gg","GG"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),H("quarter","Q"),L("quarter",7),ue("Q",Z),ce("Q",function(e,t){t[_e]=3*(k(e)-1)}),I("D",["DD",2],"Do","date"),H("date","D"),L("date",9),ue("D",B),ue("DD",B,z),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],ye),ce("Do",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),L("dayOfYear",4),ue("DDD",K),ue("DDDD",$),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),I("m",["mm",2],0,"minute"),H("minute","m"),L("minute",14),ue("m",B),ue("mm",B,z),ce(["m","mm"],pe);var sn=Te("Minutes",!1);I("s",["ss",2],0,"second"),H("second","s"),L("second",15),ue("s",B),ue("ss",B,z),ce(["s","ss"],ve);var rn,an=Te("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),L("millisecond",16),ue("S",K,Z),ue("SS",K,z),ue("SSS",K,$),rn="SSSS";rn.length<=9;rn+="S")ue(rn,ne);function on(e,t){t[we]=k(1e3*("0."+e))}for(rn="S";rn.length<=9;rn+="S")ce(rn,on);var un=Te("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf("day"),i=c.calendarFormat(this,s)||"sameElse",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case"year":r=Bt(this,s)/12;break;case"month":r=Bt(this,s);break;case"quarter":r=Bt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),"string"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,"month");return i}function mn(e,t,n,s){"boolean"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||"";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,"day");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",ot),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn("ms"),Sn=wn("s"),Dn=wn("m"),kn=wn("h"),Yn=wn("d"),On=wn("w"),Tn=wn("M"),xn=wn("y");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn("milliseconds"),Wn=bn("seconds"),Hn=bn("minutes"),Rn=bn("hours"),Cn=bn("days"),Fn=bn("months"),Ln=bn("years");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",m=Vn(this._days)!==Vn(h)?"-":"",_=Vn(this._milliseconds)!==Vn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||l||d?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(d?_+d+"S":"")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+pn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as("s")),a=Un(i.as("m")),o=Un(i.as("h")),u=Un(i.as("d")),l=Un(i.as("M")),d=Un(i.as("y")),(h=r<=Nn.ss&&["s",r]||r<Nn.s&&["ss",r]||a<=1&&["m"]||a<Nn.m&&["mm",a]||o<=1&&["h"]||o<Nn.h&&["hh",o]||u<=1&&["d"]||u<Nn.d&&["dd",u]||l<=1&&["M"]||l<Nn.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",En),In.lang=Xt,I("X",0,0,"unix"),I("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce("x",function(e,t,n){n._d=new Date(k(e))}),c.version="2.22.2",e=Tt,c.fn=ln,c.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},c.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,"months")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,"monthsShort")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,"s"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},c});
565
+
566
+ // Bootstrap datapicker
567
+ // https://eonasdan.github.io/bootstrap-datetimepicker/
568
+ !function(a){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],a);else if("object"==typeof exports)module.exports=a(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";a(jQuery,moment)}}(function(a,b){"use strict";if(!b)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var c=function(c,d){var e,f,g,h,i,j,k,l={},m=!0,n=!1,o=!1,p=0,q=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],r=["days","months","years","decades"],s=["top","bottom","auto"],t=["left","right","auto"],u=["default","top","bottom"],v={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},w={},x=function(){return void 0!==b.tz&&void 0!==d.timeZone&&null!==d.timeZone&&""!==d.timeZone},y=function(a){var c;return c=void 0===a||null===a?b():b.isDate(a)||b.isMoment(a)?b(a):x()?b.tz(a,j,d.useStrict,d.timeZone):b(a,j,d.useStrict),x()&&c.tz(d.timeZone),c},z=function(a){if("string"!=typeof a||a.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return i.indexOf("Y")!==-1;case"M":return i.indexOf("M")!==-1;case"d":return i.toLowerCase().indexOf("d")!==-1;case"h":case"H":return i.toLowerCase().indexOf("h")!==-1;case"m":return i.indexOf("m")!==-1;case"s":return i.indexOf("s")!==-1;default:return!1}},A=function(){return z("h")||z("m")||z("s")},B=function(){return z("y")||z("M")||z("d")},C=function(){var b=a("<thead>").append(a("<tr>").append(a("<th>").addClass("prev").attr("data-action","previous").append(a("<span>").addClass(d.icons.previous))).append(a("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",d.calendarWeeks?"6":"5")).append(a("<th>").addClass("next").attr("data-action","next").append(a("<span>").addClass(d.icons.next)))),c=a("<tbody>").append(a("<tr>").append(a("<td>").attr("colspan",d.calendarWeeks?"8":"7")));return[a("<div>").addClass("datepicker-days").append(a("<table>").addClass("table-condensed").append(b).append(a("<tbody>"))),a("<div>").addClass("datepicker-months").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-years").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-decades").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone()))]},D=function(){var b=a("<tr>"),c=a("<tr>"),e=a("<tr>");return z("h")&&(b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:d.tooltips.pickHour}).attr("data-action","showHours"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(a("<span>").addClass(d.icons.down))))),z("m")&&(z("h")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:d.tooltips.pickMinute}).attr("data-action","showMinutes"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(a("<span>").addClass(d.icons.down))))),z("s")&&(z("m")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:d.tooltips.pickSecond}).attr("data-action","showSeconds"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(a("<span>").addClass(d.icons.down))))),h||(b.append(a("<td>").addClass("separator")),c.append(a("<td>").append(a("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:d.tooltips.togglePeriod}))),e.append(a("<td>").addClass("separator"))),a("<div>").addClass("timepicker-picker").append(a("<table>").addClass("table-condensed").append([b,c,e]))},E=function(){var b=a("<div>").addClass("timepicker-hours").append(a("<table>").addClass("table-condensed")),c=a("<div>").addClass("timepicker-minutes").append(a("<table>").addClass("table-condensed")),d=a("<div>").addClass("timepicker-seconds").append(a("<table>").addClass("table-condensed")),e=[D()];return z("h")&&e.push(b),z("m")&&e.push(c),z("s")&&e.push(d),e},F=function(){var b=[];return d.showTodayButton&&b.push(a("<td>").append(a("<a>").attr({"data-action":"today",title:d.tooltips.today}).append(a("<span>").addClass(d.icons.today)))),!d.sideBySide&&B()&&A()&&b.push(a("<td>").append(a("<a>").attr({"data-action":"togglePicker",title:d.tooltips.selectTime}).append(a("<span>").addClass(d.icons.time)))),d.showClear&&b.push(a("<td>").append(a("<a>").attr({"data-action":"clear",title:d.tooltips.clear}).append(a("<span>").addClass(d.icons.clear)))),d.showClose&&b.push(a("<td>").append(a("<a>").attr({"data-action":"close",title:d.tooltips.close}).append(a("<span>").addClass(d.icons.close)))),a("<table>").addClass("table-condensed").append(a("<tbody>").append(a("<tr>").append(b)))},G=function(){var b=a("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),c=a("<div>").addClass("datepicker").append(C()),e=a("<div>").addClass("timepicker").append(E()),f=a("<ul>").addClass("list-unstyled"),g=a("<li>").addClass("picker-switch"+(d.collapse?" accordion-toggle":"")).append(F());return d.inline&&b.removeClass("dropdown-menu"),h&&b.addClass("usetwentyfour"),z("s")&&!h&&b.addClass("wider"),d.sideBySide&&B()&&A()?(b.addClass("timepicker-sbs"),"top"===d.toolbarPlacement&&b.append(g),b.append(a("<div>").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))),"bottom"===d.toolbarPlacement&&b.append(g),b):("top"===d.toolbarPlacement&&f.append(g),B()&&f.append(a("<li>").addClass(d.collapse&&A()?"collapse in":"").append(c)),"default"===d.toolbarPlacement&&f.append(g),A()&&f.append(a("<li>").addClass(d.collapse&&B()?"collapse":"").append(e)),"bottom"===d.toolbarPlacement&&f.append(g),b.append(f))},H=function(){var b,e={};return b=c.is("input")||d.inline?c.data():c.find("input").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},I=function(){var b,e=(n||c).position(),f=(n||c).offset(),g=d.widgetPositioning.vertical,h=d.widgetPositioning.horizontal;if(d.widgetParent)b=d.widgetParent.append(o);else if(c.is("input"))b=c.after(o).parent();else{if(d.inline)return void(b=c.append(o));b=c,c.children().first().after(o)}if("auto"===g&&(g=f.top+1.5*o.height()>=a(window).height()+a(window).scrollTop()&&o.height()+c.outerHeight()<f.top?"top":"bottom"),"auto"===h&&(h=b.width()<f.left+o.outerWidth()/2&&f.left+o.outerWidth()>a(window).width()?"right":"left"),"top"===g?o.addClass("top").removeClass("bottom"):o.addClass("bottom").removeClass("top"),"right"===h?o.addClass("pull-right"):o.removeClass("pull-right"),"static"===b.css("position")&&(b=b.parents().filter(function(){return"static"!==a(this).css("position")}).first()),0===b.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");o.css({top:"top"===g?"auto":e.top+c.outerHeight(),bottom:"top"===g?b.outerHeight()-(b===c?0:e.top):"auto",left:"left"===h?b===c?0:e.left:"auto",right:"left"===h?"auto":b.outerWidth()-c.outerWidth()-(b===c?0:e.left)})},J=function(a){"dp.change"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},K=function(a){"y"===a&&(a="YYYY"),J({type:"dp.update",change:a,viewDate:f.clone()})},L=function(a){o&&(a&&(k=Math.max(p,Math.min(3,k+a))),o.find(".datepicker > div").hide().filter(".datepicker-"+q[k].clsName).show())},M=function(){var b=a("<tr>"),c=f.clone().startOf("w").startOf("d");for(d.calendarWeeks===!0&&b.append(a("<th>").addClass("cw").text("#"));c.isBefore(f.clone().endOf("w"));)b.append(a("<th>").addClass("dow").text(c.format("dd"))),c.add(1,"d");o.find(".datepicker-days thead").append(b)},N=function(a){return d.disabledDates[a.format("YYYY-MM-DD")]===!0},O=function(a){return d.enabledDates[a.format("YYYY-MM-DD")]===!0},P=function(a){return d.disabledHours[a.format("H")]===!0},Q=function(a){return d.enabledHours[a.format("H")]===!0},R=function(b,c){if(!b.isValid())return!1;if(d.disabledDates&&"d"===c&&N(b))return!1;if(d.enabledDates&&"d"===c&&!O(b))return!1;if(d.minDate&&b.isBefore(d.minDate,c))return!1;if(d.maxDate&&b.isAfter(d.maxDate,c))return!1;if(d.daysOfWeekDisabled&&"d"===c&&d.daysOfWeekDisabled.indexOf(b.day())!==-1)return!1;if(d.disabledHours&&("h"===c||"m"===c||"s"===c)&&P(b))return!1;if(d.enabledHours&&("h"===c||"m"===c||"s"===c)&&!Q(b))return!1;if(d.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var e=!1;if(a.each(d.disabledTimeIntervals,function(){if(b.isBetween(this[0],this[1]))return e=!0,!1}),e)return!1}return!0},S=function(){for(var b=[],c=f.clone().startOf("y").startOf("d");c.isSame(f,"y");)b.push(a("<span>").attr("data-action","selectMonth").addClass("month").text(c.format("MMM"))),c.add(1,"M");o.find(".datepicker-months td").empty().append(b)},T=function(){var b=o.find(".datepicker-months"),c=b.find("th"),g=b.find("tbody").find("span");c.eq(0).find("span").attr("title",d.tooltips.prevYear),c.eq(1).attr("title",d.tooltips.selectYear),c.eq(2).find("span").attr("title",d.tooltips.nextYear),b.find(".disabled").removeClass("disabled"),R(f.clone().subtract(1,"y"),"y")||c.eq(0).addClass("disabled"),c.eq(1).text(f.year()),R(f.clone().add(1,"y"),"y")||c.eq(2).addClass("disabled"),g.removeClass("active"),e.isSame(f,"y")&&!m&&g.eq(e.month()).addClass("active"),g.each(function(b){R(f.clone().month(b),"M")||a(this).addClass("disabled")})},U=function(){var a=o.find(".datepicker-years"),b=a.find("th"),c=f.clone().subtract(5,"y"),g=f.clone().add(6,"y"),h="";for(b.eq(0).find("span").attr("title",d.tooltips.prevDecade),b.eq(1).attr("title",d.tooltips.selectDecade),b.eq(2).find("span").attr("title",d.tooltips.nextDecade),a.find(".disabled").removeClass("disabled"),d.minDate&&d.minDate.isAfter(c,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(c.year()+"-"+g.year()),d.maxDate&&d.maxDate.isBefore(g,"y")&&b.eq(2).addClass("disabled");!c.isAfter(g,"y");)h+='<span data-action="selectYear" class="year'+(c.isSame(e,"y")&&!m?" active":"")+(R(c,"y")?"":" disabled")+'">'+c.year()+"</span>",c.add(1,"y");a.find("td").html(h)},V=function(){var a,c=o.find(".datepicker-decades"),g=c.find("th"),h=b({y:f.year()-f.year()%100-1}),i=h.clone().add(100,"y"),j=h.clone(),k=!1,l=!1,m="";for(g.eq(0).find("span").attr("title",d.tooltips.prevCentury),g.eq(2).find("span").attr("title",d.tooltips.nextCentury),c.find(".disabled").removeClass("disabled"),(h.isSame(b({y:1900}))||d.minDate&&d.minDate.isAfter(h,"y"))&&g.eq(0).addClass("disabled"),g.eq(1).text(h.year()+"-"+i.year()),(h.isSame(b({y:2e3}))||d.maxDate&&d.maxDate.isBefore(i,"y"))&&g.eq(2).addClass("disabled");!h.isAfter(i,"y");)a=h.year()+12,k=d.minDate&&d.minDate.isAfter(h,"y")&&d.minDate.year()<=a,l=d.maxDate&&d.maxDate.isAfter(h,"y")&&d.maxDate.year()<=a,m+='<span data-action="selectDecade" class="decade'+(e.isAfter(h)&&e.year()<=a?" active":"")+(R(h,"y")||k||l?"":" disabled")+'" data-selection="'+(h.year()+6)+'">'+(h.year()+1)+" - "+(h.year()+12)+"</span>",h.add(12,"y");m+="<span></span><span></span><span></span>",c.find("td").html(m),g.eq(1).text(j.year()+1+"-"+h.year())},W=function(){var b,c,g,h=o.find(".datepicker-days"),i=h.find("th"),j=[],k=[];if(B()){for(i.eq(0).find("span").attr("title",d.tooltips.prevMonth),i.eq(1).attr("title",d.tooltips.selectMonth),i.eq(2).find("span").attr("title",d.tooltips.nextMonth),h.find(".disabled").removeClass("disabled"),i.eq(1).text(f.format(d.dayViewHeaderFormat)),R(f.clone().subtract(1,"M"),"M")||i.eq(0).addClass("disabled"),R(f.clone().add(1,"M"),"M")||i.eq(2).addClass("disabled"),b=f.clone().startOf("M").startOf("w").startOf("d"),g=0;g<42;g++)0===b.weekday()&&(c=a("<tr>"),d.calendarWeeks&&c.append('<td class="cw">'+b.week()+"</td>"),j.push(c)),k=["day"],b.isBefore(f,"M")&&k.push("old"),b.isAfter(f,"M")&&k.push("new"),b.isSame(e,"d")&&!m&&k.push("active"),R(b,"d")||k.push("disabled"),b.isSame(y(),"d")&&k.push("today"),0!==b.day()&&6!==b.day()||k.push("weekend"),J({type:"dp.classify",date:b,classNames:k}),c.append('<td data-action="selectDay" data-day="'+b.format("L")+'" class="'+k.join(" ")+'">'+b.date()+"</td>"),b.add(1,"d");h.find("tbody").empty().append(j),T(),U(),V()}},X=function(){var b=o.find(".timepicker-hours table"),c=f.clone().startOf("d"),d=[],e=a("<tr>");for(f.hour()>11&&!h&&c.hour(12);c.isSame(f,"d")&&(h||f.hour()<12&&c.hour()<12||f.hour()>11);)c.hour()%4===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectHour" class="hour'+(R(c,"h")?"":" disabled")+'">'+c.format(h?"HH":"hh")+"</td>"),c.add(1,"h");b.empty().append(d)},Y=function(){for(var b=o.find(".timepicker-minutes table"),c=f.clone().startOf("h"),e=[],g=a("<tr>"),h=1===d.stepping?5:d.stepping;f.isSame(c,"h");)c.minute()%(4*h)===0&&(g=a("<tr>"),e.push(g)),g.append('<td data-action="selectMinute" class="minute'+(R(c,"m")?"":" disabled")+'">'+c.format("mm")+"</td>"),c.add(h,"m");b.empty().append(e)},Z=function(){for(var b=o.find(".timepicker-seconds table"),c=f.clone().startOf("m"),d=[],e=a("<tr>");f.isSame(c,"m");)c.second()%20===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectSecond" class="second'+(R(c,"s")?"":" disabled")+'">'+c.format("ss")+"</td>"),c.add(5,"s");b.empty().append(d)},$=function(){var a,b,c=o.find(".timepicker span[data-time-component]");h||(a=o.find(".timepicker [data-action=togglePeriod]"),b=e.clone().add(e.hours()>=12?-12:12,"h"),a.text(e.format("A")),R(b,"h")?a.removeClass("disabled"):a.addClass("disabled")),c.filter("[data-time-component=hours]").text(e.format(h?"HH":"hh")),c.filter("[data-time-component=minutes]").text(e.format("mm")),c.filter("[data-time-component=seconds]").text(e.format("ss")),X(),Y(),Z()},_=function(){o&&(W(),$())},aa=function(a){var b=m?null:e;if(!a)return m=!0,g.val(""),c.data("date",""),J({type:"dp.change",date:!1,oldDate:b}),void _();if(a=a.clone().locale(d.locale),x()&&a.tz(d.timeZone),1!==d.stepping)for(a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping).seconds(0);d.minDate&&a.isBefore(d.minDate);)a.add(d.stepping,"minutes");R(a)?(e=a,f=e.clone(),g.val(e.format(i)),c.data("date",e.format(i)),m=!1,_(),J({type:"dp.change",date:e.clone(),oldDate:b})):(d.keepInvalid?J({type:"dp.change",date:a,oldDate:b}):g.val(m?"":e.format(i)),J({type:"dp.error",date:a,oldDate:b}))},ba=function(){var b=!1;return o?(o.find(".collapse").each(function(){var c=a(this).data("collapse");return!c||!c.transitioning||(b=!0,!1)}),b?l:(n&&n.hasClass("btn")&&n.toggleClass("active"),o.hide(),a(window).off("resize",I),o.off("click","[data-action]"),o.off("mousedown",!1),o.remove(),o=!1,J({type:"dp.hide",date:e.clone()}),g.blur(),f=e.clone(),l)):l},ca=function(){aa(null)},da=function(a){return void 0===d.parseInputDate?(!b.isMoment(a)||a instanceof Date)&&(a=y(a)):a=d.parseInputDate(a),a},ea={next:function(){var a=q[k].navFnc;f.add(q[k].navStep,a),W(),K(a)},previous:function(){var a=q[k].navFnc;f.subtract(q[k].navStep,a),W(),K(a)},pickerSwitch:function(){L(1)},selectMonth:function(b){var c=a(b.target).closest("tbody").find("span").index(a(b.target));f.month(c),k===p?(aa(e.clone().year(f.year()).month(f.month())),d.inline||ba()):(L(-1),W()),K("M")},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDecade:function(b){var c=parseInt(a(b.target).data("selection"),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDay:function(b){var c=f.clone();a(b.target).is(".old")&&c.subtract(1,"M"),a(b.target).is(".new")&&c.add(1,"M"),aa(c.date(parseInt(a(b.target).text(),10))),A()||d.keepOpen||d.inline||ba()},incrementHours:function(){var a=e.clone().add(1,"h");R(a,"h")&&aa(a)},incrementMinutes:function(){var a=e.clone().add(d.stepping,"m");R(a,"m")&&aa(a)},incrementSeconds:function(){var a=e.clone().add(1,"s");R(a,"s")&&aa(a)},decrementHours:function(){var a=e.clone().subtract(1,"h");R(a,"h")&&aa(a)},decrementMinutes:function(){var a=e.clone().subtract(d.stepping,"m");R(a,"m")&&aa(a)},decrementSeconds:function(){var a=e.clone().subtract(1,"s");R(a,"s")&&aa(a)},togglePeriod:function(){aa(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(b){var c,e=a(b.target),f=e.closest("ul"),g=f.find(".in"),h=f.find(".collapse:not(.in)");if(g&&g.length){if(c=g.data("collapse"),c&&c.transitioning)return;g.collapse?(g.collapse("hide"),h.collapse("show")):(g.removeClass("in"),h.addClass("in")),e.is("span")?e.toggleClass(d.icons.time+" "+d.icons.date):e.find("span").toggleClass(d.icons.time+" "+d.icons.date)}},showPicker:function(){o.find(".timepicker > div:not(.timepicker-picker)").hide(),o.find(".timepicker .timepicker-picker").show()},showHours:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-hours").show()},showMinutes:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-seconds").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);h||(e.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),aa(e.clone().hours(c)),ea.showPicker.call(l)},selectMinute:function(b){aa(e.clone().minutes(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},selectSecond:function(b){aa(e.clone().seconds(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},clear:ca,today:function(){var a=y();R(a,"d")&&aa(a)},close:ba},fa=function(b){return!a(b.currentTarget).is(".disabled")&&(ea[a(b.currentTarget).data("action")].apply(l,arguments),!1)},ga=function(){var b,c={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return g.prop("disabled")||!d.ignoreReadonly&&g.prop("readonly")||o?l:(void 0!==g.val()&&0!==g.val().trim().length?aa(da(g.val().trim())):m&&d.useCurrent&&(d.inline||g.is("input")&&0===g.val().trim().length)&&(b=y(),"string"==typeof d.useCurrent&&(b=c[d.useCurrent](b)),aa(b)),o=G(),M(),S(),o.find(".timepicker-hours").hide(),o.find(".timepicker-minutes").hide(),o.find(".timepicker-seconds").hide(),_(),L(),a(window).on("resize",I),o.on("click","[data-action]",fa),o.on("mousedown",!1),n&&n.hasClass("btn")&&n.toggleClass("active"),I(),o.show(),d.focusOnShow&&!g.is(":focus")&&g.focus(),J({type:"dp.show"}),l)},ha=function(){return o?ba():ga()},ia=function(a){var b,c,e,f,g=null,h=[],i={},j=a.which,k="p";w[j]=k;for(b in w)w.hasOwnProperty(b)&&w[b]===k&&(h.push(b),parseInt(b,10)!==j&&(i[b]=!0));for(b in d.keyBinds)if(d.keyBinds.hasOwnProperty(b)&&"function"==typeof d.keyBinds[b]&&(e=b.split(" "),e.length===h.length&&v[j]===e[e.length-1])){for(f=!0,c=e.length-2;c>=0;c--)if(!(v[e[c]]in i)){f=!1;break}if(f){g=d.keyBinds[b];break}}g&&(g.call(l,o),a.stopPropagation(),a.preventDefault())},ja=function(a){w[a.which]="r",a.stopPropagation(),a.preventDefault()},ka=function(b){var c=a(b.target).val().trim(),d=c?da(c):null;return aa(d),b.stopImmediatePropagation(),!1},la=function(){g.on({change:ka,blur:d.debug?"":ba,keydown:ia,keyup:ja,focus:d.allowInputToggle?ga:""}),c.is("input")?g.on({focus:ga}):n&&(n.on("click",ha),n.on("mousedown",!1))},ma=function(){g.off({change:ka,blur:blur,keydown:ia,keyup:ja,focus:d.allowInputToggle?ba:""}),c.is("input")?g.off({focus:ga}):n&&(n.off("click",ha),n.off("mousedown",!1))},na=function(b){var c={};return a.each(b,function(){var a=da(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),!!Object.keys(c).length&&c},oa=function(b){var c={};return a.each(b,function(){c[this]=!0}),!!Object.keys(c).length&&c},pa=function(){var a=d.format||"L LT";i=a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=e.localeData().longDateFormat(a)||a;return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return e.localeData().longDateFormat(a)||a})}),j=d.extraFormats?d.extraFormats.slice():[],j.indexOf(a)<0&&j.indexOf(i)<0&&j.push(i),h=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,z("y")&&(p=2),z("M")&&(p=1),z("d")&&(p=0),k=Math.max(p,k),m||aa(e)};if(l.destroy=function(){ba(),ma(),c.removeData("DateTimePicker"),c.removeData("date")},l.toggle=ha,l.show=ga,l.hide=ba,l.disable=function(){return ba(),n&&n.hasClass("btn")&&n.addClass("disabled"),g.prop("disabled",!0),l},l.enable=function(){return n&&n.hasClass("btn")&&n.removeClass("disabled"),g.prop("disabled",!1),l},l.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");return d.ignoreReadonly=a,l},l.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError("options() options parameter should be an object");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===l[a])throw new TypeError("option "+a+" is not recognized!");l[a](b)}),l},l.date=function(a){if(0===arguments.length)return m?null:e.clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return aa(null===a?null:da(a)),l},l.format=function(a){if(0===arguments.length)return d.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a string or boolean:false parameter "+a);return d.format=a,i&&pa(),l},l.timeZone=function(a){if(0===arguments.length)return d.timeZone;if("string"!=typeof a)throw new TypeError("newZone() expects a string parameter");return d.timeZone=a,l},l.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return d.dayViewHeaderFormat=a,l},l.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return d.extraFormats=a,j&&pa(),l},l.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return d.disabledDates=na(b),d.enabledDates=!1,_(),l},l.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return d.enabledDates=na(b),d.disabledDates=!1,_(),l},l.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return d.daysOfWeekDisabled=!1,_(),l;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||b<0||isNaN(b)?a:(a.indexOf(b)===-1&&a.push(b),a)},[]).sort(),d.useCurrent&&!d.keepInvalid){for(var b=0;!R(e,"d");){if(e.add(1,"d"),31===b)throw"Tried 31 times to find a valid date";b++}aa(e)}return _(),l},l.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if("boolean"==typeof a&&a===!1)return d.maxDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+a);if(d.minDate&&b.isBefore(d.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+b.format(i));return d.maxDate=b,d.useCurrent&&!d.keepInvalid&&e.isAfter(a)&&aa(d.maxDate),f.isAfter(b)&&(f=b.clone().subtract(d.stepping,"m")),_(),l},l.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if("boolean"==typeof a&&a===!1)return d.minDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("minDate() Could not parse date parameter: "+a);if(d.maxDate&&b.isAfter(d.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+b.format(i));return d.minDate=b,d.useCurrent&&!d.keepInvalid&&e.isBefore(a)&&aa(d.minDate),f.isBefore(b)&&(f=b.clone().add(d.stepping,"m")),_(),l},l.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,l;"string"==typeof a&&(a="now"===a||"moment"===a?y():y(a));var b=da(a);if(!b.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+a);if(!R(b))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return d.defaultDate=b,(d.defaultDate&&d.inline||""===g.val().trim())&&aa(d.defaultDate),l},l.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError("locale() locale "+a+" is not loaded from moment locales!");return d.locale=a,e.locale(d.locale),f.locale(d.locale),i&&pa(),o&&(ba(),ga()),l},l.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||a<1)&&(a=1),d.stepping=a,l)},l.useCurrent=function(a){var b=["year","month","day","hour","minute"];if(0===arguments.length)return d.useCurrent;if("boolean"!=typeof a&&"string"!=typeof a)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof a&&b.indexOf(a.toLowerCase())===-1)throw new TypeError("useCurrent() expects a string parameter of "+b.join(", "));return d.useCurrent=a,l},l.collapse=function(a){if(0===arguments.length)return d.collapse;if("boolean"!=typeof a)throw new TypeError("collapse() expects a boolean parameter");return d.collapse===a?l:(d.collapse=a,o&&(ba(),ga()),l)},l.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return a.extend(d.icons,b),o&&(ba(),ga()),l},l.tooltips=function(b){if(0===arguments.length)return a.extend({},d.tooltips);if(!(b instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return a.extend(d.tooltips,b),o&&(ba(),ga()),l},l.useStrict=function(a){if(0===arguments.length)return d.useStrict;if("boolean"!=typeof a)throw new TypeError("useStrict() expects a boolean parameter");return d.useStrict=a,l},l.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if("boolean"!=typeof a)throw new TypeError("sideBySide() expects a boolean parameter");return d.sideBySide=a,o&&(ba(),ga()),l},l.viewMode=function(a){if(0===arguments.length)return d.viewMode;if("string"!=typeof a)throw new TypeError("viewMode() expects a string parameter");if(r.indexOf(a)===-1)throw new TypeError("viewMode() parameter must be one of ("+r.join(", ")+") value");return d.viewMode=a,k=Math.max(r.indexOf(a),p),L(),l},l.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(u.indexOf(a)===-1)throw new TypeError("toolbarPlacement() parameter must be one of ("+u.join(", ")+") value");return d.toolbarPlacement=a,o&&(ba(),ga()),l},l.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if("[object Object]"!=={}.toString.call(b))throw new TypeError("widgetPositioning() expects an object variable");if(b.horizontal){if("string"!=typeof b.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(b.horizontal=b.horizontal.toLowerCase(),t.indexOf(b.horizontal)===-1)throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+t.join(", ")+")");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if("string"!=typeof b.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(b.vertical=b.vertical.toLowerCase(),s.indexOf(b.vertical)===-1)throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+s.join(", ")+")");d.widgetPositioning.vertical=b.vertical}return _(),l},l.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if("boolean"!=typeof a)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return d.calendarWeeks=a,_(),l},l.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if("boolean"!=typeof a)throw new TypeError("showTodayButton() expects a boolean parameter");return d.showTodayButton=a,o&&(ba(),ga()),l},l.showClear=function(a){if(0===arguments.length)return d.showClear;if("boolean"!=typeof a)throw new TypeError("showClear() expects a boolean parameter");return d.showClear=a,o&&(ba(),ga()),l},l.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if("string"==typeof b&&(b=a(b)),null!==b&&"string"!=typeof b&&!(b instanceof a))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return d.widgetParent=b,o&&(ba(),ga()),l},l.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if("boolean"!=typeof a)throw new TypeError("keepOpen() expects a boolean parameter");return d.keepOpen=a,l},l.focusOnShow=function(a){if(0===arguments.length)return d.focusOnShow;if("boolean"!=typeof a)throw new TypeError("focusOnShow() expects a boolean parameter");return d.focusOnShow=a,l},l.inline=function(a){if(0===arguments.length)return d.inline;if("boolean"!=typeof a)throw new TypeError("inline() expects a boolean parameter");return d.inline=a,l},l.clear=function(){return ca(),l},l.keyBinds=function(a){return 0===arguments.length?d.keyBinds:(d.keyBinds=a,l)},l.getMoment=function(a){return y(a)},l.debug=function(a){if("boolean"!=typeof a)throw new TypeError("debug() expects a boolean parameter");return d.debug=a,l},l.allowInputToggle=function(a){if(0===arguments.length)return d.allowInputToggle;if("boolean"!=typeof a)throw new TypeError("allowInputToggle() expects a boolean parameter");return d.allowInputToggle=a,l},l.showClose=function(a){if(0===arguments.length)return d.showClose;if("boolean"!=typeof a)throw new TypeError("showClose() expects a boolean parameter");return d.showClose=a,l},l.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if("boolean"!=typeof a)throw new TypeError("keepInvalid() expects a boolean parameter");
569
+ return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if("string"!=typeof a)throw new TypeError("datepickerInput() expects a string parameter");return d.datepickerInput=a,l},l.parseInputDate=function(a){if(0===arguments.length)return d.parseInputDate;if("function"!=typeof a)throw new TypeError("parseInputDate() sholud be as function");return d.parseInputDate=a,l},l.disabledTimeIntervals=function(b){if(0===arguments.length)return d.disabledTimeIntervals?a.extend({},d.disabledTimeIntervals):d.disabledTimeIntervals;if(!b)return d.disabledTimeIntervals=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return d.disabledTimeIntervals=b,_(),l},l.disabledHours=function(b){if(0===arguments.length)return d.disabledHours?a.extend({},d.disabledHours):d.disabledHours;if(!b)return d.disabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(d.disabledHours=oa(b),d.enabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.enabledHours=function(b){if(0===arguments.length)return d.enabledHours?a.extend({},d.enabledHours):d.enabledHours;if(!b)return d.enabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(d.enabledHours=oa(b),d.disabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.viewDate=function(a){if(0===arguments.length)return f.clone();if(!a)return f=e.clone(),l;if(!("string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return f=da(a),K(),l},c.is("input"))g=c;else if(g=c.find(d.datepickerInput),0===g.length)g=c.find("input");else if(!g.is("input"))throw new Error('CSS class "'+d.datepickerInput+'" cannot be applied to non input element');if(c.hasClass("input-group")&&(n=0===c.find(".datepickerbutton").length?c.find(".input-group-addon"):c.find(".datepickerbutton")),!d.inline&&!g.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return e=y(),f=e.clone(),a.extend(!0,d,H()),l.options(d),pa(),la(),g.prop("disabled")&&l.disable(),g.is("input")&&0!==g.val().trim().length?aa(da(g.val().trim())):d.defaultDate&&void 0===g.attr("placeholder")&&aa(d.defaultDate),d.inline&&ga(),l};return a.fn.datetimepicker=function(b){b=b||{};var d,e=Array.prototype.slice.call(arguments,1),f=!0,g=["destroy","hide","show","toggle"];if("object"==typeof b)return this.each(function(){var d,e=a(this);e.data("DateTimePicker")||(d=a.extend(!0,{},a.fn.datetimepicker.defaults,b),e.data("DateTimePicker",c(e,d)))});if("string"==typeof b)return this.each(function(){var c=a(this),g=c.data("DateTimePicker");if(!g)throw new Error('bootstrap-datetimepicker("'+b+'") method was called on an element that is not using DateTimePicker');d=g[b].apply(g,e),f=d===g}),f||a.inArray(b,g)>-1?this:d;throw new TypeError("Invalid arguments for DateTimePicker: "+b)},a.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:b.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(7,"d")):this.date(b.clone().add(this.stepping(),"m"))}},down:function(a){if(!a)return void this.show();var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(7,"d")):this.date(b.clone().subtract(this.stepping(),"m"))},"control up":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(1,"y")):this.date(b.clone().add(1,"h"))}},"control down":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(1,"y")):this.date(b.clone().subtract(1,"h"))}},left:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"d"))}},right:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"d"))}},pageUp:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"M"))}},pageDown:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(a){a&&a.find(".timepicker").is(":visible")&&a.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},a.fn.datetimepicker});
readme.txt CHANGED
@@ -1,48 +1,58 @@
1
  === Advanced Access Manager ===
2
  Contributors: vasyltech
3
- Tags: access, role, user, capability, page access, post access, content access, comments, security, login redirect, membership, backend lockdown, wp-admin, 404, rest api, xml rpc
4
  Requires at least: 4.0
5
- Tested up to: 4.9.6
6
- Stable tag: 5.3.5
7
 
8
- The most powerful access management plugin for WordPress websites.
9
 
10
  == Description ==
11
 
12
  > Advanced Access Manager (aka AAM) is all you need to manage access to your website frontend and backend for any user, role or visitors.
13
 
14
- https://www.youtube.com/watch?v=yiOhjaacNJc
15
 
16
  = Few Quick Facts =
17
 
18
- * Bullet-proven plugin with over a 1 million downloads where all features are well-tested and [documented](https://aamplugin.com/help). Very low amount of support tickets in comparison to similar plugins;
19
- * AAM contains the most powerful and flexible set of features to manage access to your WordPress website and most of them are absolutely free;
20
- * It is the only plugin in the world that gives you the ability to manage access to your website content for any role, individual user and visitors or even define the default access to all posts, pages, custom post types, categories and custom taxonomies;
21
- * AAM is developer oriented plugin. It has countless number of hooks, integrated with WordPress RESTful API and has numerous abstract layers to simplify programmatic access management;
22
  * No ads or other promotional crap. The UI is clean and well crafted so you can focus only on what matters;
23
  * No need to be a "paid" customer to get help. Request support via email or start chat with Google Hangout;
24
- * Some features are limited or available only with [premium extensions](https://aamplugin.com/store). AAM functionality is transparent and you will absolute know when you need to purchase our premium features;
25
  * There are some bad reviews however most of them where posted years ago and are unrelated to current AAM version; or were posted by users that did not bother reading the bullet-point above.
26
 
27
- = The most popular features =
 
 
 
 
 
 
 
 
 
28
 
29
  * [free] Manage Backend Menu. Manage access to the backend menu for any user or role. Find out more from [How to manage WordPress backend menu](https://aamplugin.com/help/how-to-manage-wordpress-backend-menu) article;
30
  * [free] Manage Roles & Capabilities. Manage all your WordPress role and capabilities.
31
- * [free] Manage temporary user accounts. Create and manage temporary user accounts. Find out more from [How to create temporary WordPress user account](https://aamplugin.com/help/how-to-create-temporary-wordpress-user-account);
 
 
32
  * [free] Backend Lockdown. Restrict access to your website backend side for any user or role. Find out more from [How to lockdown WordPress backend](https://aamplugin.com/help/how-to-lockdown-wordpress-backend) article;
33
  * [free] Secure Login Widget & Shortcode. Drop AJAX login widget or shortcode anywhere on your website. Find out more from [How does AAM Secure Login works](https://aamplugin.com/help/how-does-aam-secure-login-works) article;
34
- * [free] Ability to enable/disable REST API and XML-RPC.
35
- * [free] Manage access to REST API individual endpoints for any role, user or visitor.
36
- * [free] JWT Authentication. Authenticate user through WordPress API and use received JWT token for further requests. Fid out more from [Hot to authenticate WordPress user with JWT token](https://aamplugin.com/help/how-to-authenticate-wordpress-user-with-jwt-token)
37
- * [limited] Content Access. Very granular access to unlimited number of post, page or custom post type ([19 different options](https://aamplugin.com/help#posts-and-pages)). With premium [Plus Package](https://aamplugin.com/extension/plus-package) extension also manage access to hierarchical taxonomies or setup the default access to all post types and taxonomies. Find out more from [How to manage access to the WordPress content](https://aamplugin.com/help/how-to-manage-access-to-the-wordpress-content) article;
38
  * [free] Content Filter. Filter or replace parts of your content with AAM shortcodes. Find out more from [How to filter WordPress post content](https://aamplugin.com/help/how-to-filter-wordpress-post-content) article;
39
  * [free] Login/Logout Redirects. Define custom login and logout redirect for any user or role;
40
  * [free] 404 Redirect. Redefine where user should be redirected when page does not exist. Find out more from [How to redirect on WordPress 404 error](https://aamplugin.com/help/how-to-redirect-on-wordpress-404-error);
41
  * [free] Access Denied Redirect. Define custom redirect for any role, user or visitors when access is denied for restricted area on your website;
42
- * [free] Manage Metaboxes and Widgets. Filter out restricted or unnecessary metaboxes and widgets on both frontend and backend for any user, role or visitors. Find out more from [How to hide WordPress metaboxes & widgets](https://aamplugin.com/help/how-to-hide-wordpress-metaboxes-and-widgets) article;
43
- * [paid] Manage Access Based On IP Address or Referred Domain. Manage access to your website for all visitors based on referred host, IP address or geographical location. Find out more from [How to manage access to WordPress website by IP address](https://aamplugin.com/help/how-to-manage-access-to-wordpress-website-by-ip-address) article;
44
- * [paid] Monetize Access To You Content. Start selling access to your website content with premium [E-Commerce](https://aamplugin.com/extension/ecommerce) extension. Find out more from [How to monetize access to the WordPress content](https://aamplugin.com/help/how-to-monetize-access-to-the-wordpress-content) article;
45
- * [free] Multisite Support. Sync access settings across your network or even restrict none-members from accessing one of your sites. Find out more from [AAM and WordPress Multisite support](https://aamplugin.com/help/aam-and-wordpress-multisite-support);
46
  * [and even more...] Check our [help page](https://aamplugin.com/help) to learn more about AAM
47
 
48
  == Installation ==
@@ -66,6 +76,18 @@ https://www.youtube.com/watch?v=yiOhjaacNJc
66
 
67
  == Changelog ==
68
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  = 5.3.5 =
70
  * Fixed bug with post LIST & LIST TO OTHERS when access is set to term in odd order
71
  * Fixed bug that potentially did not filter posts during search
1
  === Advanced Access Manager ===
2
  Contributors: vasyltech
3
+ Tags: access-control, membership, access, user role, restricted content
4
  Requires at least: 4.0
5
+ Tested up to: 4.9.7
6
+ Stable tag: 5.4
7
 
8
+ All you need to manage access to you WordPress websites on frontend, backend and API levels for any role, user or visitors.
9
 
10
  == Description ==
11
 
12
  > Advanced Access Manager (aka AAM) is all you need to manage access to your website frontend and backend for any user, role or visitors.
13
 
14
+ https://www.youtube.com/watch?v=mj5Xa_Wc16Y
15
 
16
  = Few Quick Facts =
17
 
18
+ * Bullet-proven plugin that is used on over 90,000 websites where all features are well-tested and [documented](https://aamplugin.com/help). Very low amount of support tickets speaks for quality;
19
+ * AAM contains the most powerful and flexible set of features to manage access to your WordPress website and were majority of them are absolutely free;
20
+ * It is the only plugin that gives you the ability to manage access to your website content for any role, individual user and visitors or even define the default access to all posts, pages, custom post types, categories and custom hierarchical taxonomies;
21
+ * AAM is [developer oriented plugin](https://aamplugin.com/developers). It has dozens of hooks and configurations. It is integrated with WordPress RESTful and XML-RPC APIs and has numerous abstract layers to simplify coding;
22
  * No ads or other promotional crap. The UI is clean and well crafted so you can focus only on what matters;
23
  * No need to be a "paid" customer to get help. Request support via email or start chat with Google Hangout;
24
+ * Some features are limited or available only with [premium extensions](https://aamplugin.com/store). AAM functionality is transparent and you will absolute know when you need to get a premium extension;
25
  * There are some bad reviews however most of them where posted years ago and are unrelated to current AAM version; or were posted by users that did not bother reading the bullet-point above.
26
 
27
+ = Main Areas Of Focus =
28
+
29
+ * Content access control on frontend, backend and API sides to posts, pages, custom post types, categories, custom hierarchical taxonomies and CPTs for any role, user and visitors;
30
+ * Roles & capabilities management with ability to create new roles and capabilities, edit, clone or delete existing;
31
+ * Access control to backend area including backend menu, toolbar, metaboxes & widgets;
32
+ * Access control to RESTful & XML-RPC APIs;
33
+ * Developer friendly API so it can be used by other developers to work with AAM core;
34
+ * And all necessary features to setup smooth user flow during login, logout, access denied even, 404 etc.
35
+
36
+ = The Most Popular Features =
37
 
38
  * [free] Manage Backend Menu. Manage access to the backend menu for any user or role. Find out more from [How to manage WordPress backend menu](https://aamplugin.com/help/how-to-manage-wordpress-backend-menu) article;
39
  * [free] Manage Roles & Capabilities. Manage all your WordPress role and capabilities.
40
+ * [free] Create temporary user accounts. Create and manage temporary user accounts. Find out more from [How to create temporary WordPress user account](https://aamplugin.com/help/how-to-create-temporary-wordpress-user-account);
41
+ * [limited] Content access. Very granular access to unlimited number of post, page or custom post type ([19 different options](https://aamplugin.com/help#posts-and-terms)). With premium [Plus Package](https://aamplugin.com/extension/plus-package) extension also manage access to hierarchical taxonomies or setup the default access to all post types and taxonomies. Find out more from [How to manage access to the WordPress content](https://aamplugin.com/help/how-to-manage-access-to-the-wordpress-content) article;
42
+ * [free] Manage Admin Toolbar. Filter out unnecessary items from the top admin toolbar for any role or user.
43
  * [free] Backend Lockdown. Restrict access to your website backend side for any user or role. Find out more from [How to lockdown WordPress backend](https://aamplugin.com/help/how-to-lockdown-wordpress-backend) article;
44
  * [free] Secure Login Widget & Shortcode. Drop AJAX login widget or shortcode anywhere on your website. Find out more from [How does AAM Secure Login works](https://aamplugin.com/help/how-does-aam-secure-login-works) article;
45
+ * [free] Ability to enable/disable RESTful and XML-RPC APIs.
46
+ * [free] Manage access to RESTful or XML-RPC individual endpoints for any role, user or visitors.
47
+ * [free] JWT authentication. Authenticate user with WordPress RESTful API and use received JWT token for further requests. Fid out more from [Hot to authenticate WordPress user with JWT token](https://aamplugin.com/help/how-to-authenticate-wordpress-user-with-jwt-token)
 
48
  * [free] Content Filter. Filter or replace parts of your content with AAM shortcodes. Find out more from [How to filter WordPress post content](https://aamplugin.com/help/how-to-filter-wordpress-post-content) article;
49
  * [free] Login/Logout Redirects. Define custom login and logout redirect for any user or role;
50
  * [free] 404 Redirect. Redefine where user should be redirected when page does not exist. Find out more from [How to redirect on WordPress 404 error](https://aamplugin.com/help/how-to-redirect-on-wordpress-404-error);
51
  * [free] Access Denied Redirect. Define custom redirect for any role, user or visitors when access is denied for restricted area on your website;
52
+ * [free] Manage Metaboxes & Widgets. Filter out restricted or unnecessary metaboxes and widgets on both frontend and backend for any user, role or visitors. Find out more from [How to hide WordPress metaboxes & widgets](https://aamplugin.com/help/how-to-hide-wordpress-metaboxes-and-widgets) article;
53
+ * [paid] Manage access based on IP address or referred domain. Manage access to your website for all visitors based on referred host or IP address. Find out more from [How to manage access to WordPress website by IP address](https://aamplugin.com/help/how-to-manage-access-to-wordpress-website-by-ip-address) article;
54
+ * [paid] Monetize access to you content. Start selling access to your website content with premium [E-Commerce](https://aamplugin.com/extension/ecommerce) extension. Find out more from [How to monetize access to the WordPress content](https://aamplugin.com/help/how-to-monetize-access-to-the-wordpress-content) article;
55
+ * [free] Multisite support. Sync access settings across your network or even restrict none-members from accessing one of your sites. Find out more from [AAM and WordPress Multisite support](https://aamplugin.com/help/aam-and-wordpress-multisite-support);
56
  * [and even more...] Check our [help page](https://aamplugin.com/help) to learn more about AAM
57
 
58
  == Installation ==
76
 
77
  == Changelog ==
78
 
79
+ = 5.4 =
80
+ * Fixed bug with Api Access Control option that when disabled, still denies API Routes
81
+ * Fixed bug when RESTful or XML-RPC disabled but endpoints still listed on API Routes
82
+ * Fixed bug with Secure Login for themes that are not build with jQuery support
83
+ * Fixed bug with posts not been filtered during search in few post types
84
+ * Added ability to manage Admin Toolbar items
85
+ * Added ability to manage premium licenses so now user can transfer license anytime
86
+ * Moved security options (brute force lockout, login timeout etc) to stand-alone Security tab
87
+ * Improved UI for the ACCESS EXPIRATION option on Posts & Terms tab
88
+ * Improved UI for defining temporary user account timespan
89
+ * Removed deprecated "Check Post Visibility" option
90
+
91
  = 5.3.5 =
92
  * Fixed bug with post LIST & LIST TO OTHERS when access is set to term in odd order
93
  * Fixed bug that potentially did not filter posts during search