Version Description
- Fixed the bug with user lock functionality
- Dropped support for PHP 5.2.x version. Minimum required version is 5.3.0
- Merged ConfigPress extension to the core
- Added JWT Authentication
- Added Register link to the Secure Login Widget
Download this release
Release Info
Developer | vasyl_m |
Plugin | Advanced Access Manager |
Version | 5.2 |
Comparing to | |
See all releases |
Code changes from version 5.1.1 to 5.2
- Application/Backend/Feature/Settings/ConfigPress.php +66 -0
- Application/Backend/Feature/Settings/Core.php +5 -0
- Application/Backend/Feature/Subject/User.php +1 -1
- Application/Backend/Manager.php +6 -0
- Application/Backend/View.php +1 -0
- Application/Backend/phtml/settings/configpress.phtml +13 -0
- Application/Backend/phtml/widget/login-frontend.phtml +8 -1
- Application/Core/Compatibility.php +1 -0
- Application/Core/Config.php +2 -6
- Application/Core/ConfigPress.php +91 -30
- Application/Core/ConfigPress/Evaluator.php +304 -0
- Application/Core/ConfigPress/Reader.php +148 -0
- Application/Core/Exporter.php +5 -0
- Application/Core/JwtAuth.php +195 -0
- Application/Core/Login.php +7 -1
- Application/Extension/List.php +0 -8
- Application/Frontend/phtml/login.phtml +7 -0
- Lang/advanced-access-manager-en_US.mo +0 -0
- Lang/advanced-access-manager-en_US.po +250 -165
- Lang/advanced-access-manager.pot +250 -165
- aam.php +34 -14
- media/css/aam.css +350 -0
- media/js/aam.js +31 -2
- media/js/vendor.js +329 -1
- readme.txt +9 -1
- vendor/autoload.php +15 -0
- vendor/firebase/BeforeValidException.php +7 -0
- vendor/firebase/ExpiredException.php +7 -0
- vendor/firebase/JWT.php +379 -0
- vendor/firebase/SignatureInvalidException.php +7 -0
Application/Backend/Feature/Settings/ConfigPress.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 ConfigPress
|
12 |
+
*
|
13 |
+
* @package AAM
|
14 |
+
* @author Vasyl Martyniuk <vasyl@vasyltech.com>
|
15 |
+
*/
|
16 |
+
class AAM_Backend_Feature_Settings_ConfigPress extends AAM_Backend_Feature_Abstract {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @inheritdoc
|
20 |
+
*/
|
21 |
+
public static function getTemplate() {
|
22 |
+
return 'settings/configpress.phtml';
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Save config
|
27 |
+
*
|
28 |
+
* @return boolean
|
29 |
+
*
|
30 |
+
* @access protected
|
31 |
+
*/
|
32 |
+
public function save() {
|
33 |
+
$blog = (defined('BLOG_ID_CURRENT_SITE') ? BLOG_ID_CURRENT_SITE : 1);
|
34 |
+
$config = filter_input(INPUT_POST, 'config');
|
35 |
+
|
36 |
+
//normalize
|
37 |
+
$data = str_replace(array('“', '”'), '"', $config);
|
38 |
+
|
39 |
+
return AAM_Core_API::updateOption('aam-configpress', $data, $blog);
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Register Contact/Hire feature
|
44 |
+
*
|
45 |
+
* @return void
|
46 |
+
*
|
47 |
+
* @access public
|
48 |
+
*/
|
49 |
+
public static function register() {
|
50 |
+
AAM_Backend_Feature::registerFeature((object) array(
|
51 |
+
'uid' => 'configpress',
|
52 |
+
'position' => 90,
|
53 |
+
'title' => __('ConfigPress', AAM_KEY),
|
54 |
+
'capability' => 'aam_manage_configpress',
|
55 |
+
'type' => 'settings',
|
56 |
+
'subjects' => array(
|
57 |
+
AAM_Core_Subject_Role::UID,
|
58 |
+
AAM_Core_Subject_User::UID,
|
59 |
+
AAM_Core_Subject_Visitor::UID,
|
60 |
+
AAM_Core_Subject_Default::UID
|
61 |
+
),
|
62 |
+
'view' => __CLASS__
|
63 |
+
));
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
Application/Backend/Feature/Settings/Core.php
CHANGED
@@ -57,6 +57,11 @@ class AAM_Backend_Feature_Settings_Core extends AAM_Backend_Feature_Abstract {
|
|
57 |
'title' => __('Secure Login', AAM_KEY),
|
58 |
'descr' => __('AAM comes with its own user login handler. With this feature you can add AJAX login widget to your frontend page that significantly enhance your website security.', AAM_KEY),
|
59 |
'value' => AAM_Core_Config::get('secure-login', true)
|
|
|
|
|
|
|
|
|
|
|
60 |
)
|
61 |
);
|
62 |
|
57 |
'title' => __('Secure Login', AAM_KEY),
|
58 |
'descr' => __('AAM comes with its own user login handler. With this feature you can add AJAX login widget to your frontend page that significantly enhance your website security.', AAM_KEY),
|
59 |
'value' => AAM_Core_Config::get('secure-login', true)
|
60 |
+
),
|
61 |
+
'jwt-authentication' => array(
|
62 |
+
'title' => __('JWT Authentication', AAM_KEY),
|
63 |
+
'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('[Note!] PHP 5.4 or higher is required for this feature. Enable the ability to authenticate user with WordPress RESTfull API and JWT token. For more information, check %sHow to authenticate WordPress user with JWT token%s article', 'b'), '<a href="https://aamplugin.com/help/how-to-authenticate-wordpress-user-with-jwt-token">', '</a>'),
|
64 |
+
'value' => AAM_Core_Config::get('jwt-authentication', false)
|
65 |
)
|
66 |
);
|
67 |
|
Application/Backend/Feature/Subject/User.php
CHANGED
@@ -119,7 +119,7 @@ class AAM_Backend_Feature_Subject_User {
|
|
119 |
public function block() {
|
120 |
$result = false;
|
121 |
|
122 |
-
if (current_user_can('aam_toggle_users') &&
|
123 |
$subject = AAM_Backend_Subject::getInstance();
|
124 |
|
125 |
if ($this->isAllowed($subject->get())) {
|
119 |
public function block() {
|
120 |
$result = false;
|
121 |
|
122 |
+
if (current_user_can('aam_toggle_users') && current_user_can('edit_users')) {
|
123 |
$subject = AAM_Backend_Subject::getInstance();
|
124 |
|
125 |
if ($this->isAllowed($subject->get())) {
|
Application/Backend/Manager.php
CHANGED
@@ -113,6 +113,12 @@ class AAM_Backend_Manager {
|
|
113 |
}
|
114 |
|
115 |
AAM_Extension_Repository::getInstance()->hasUpdates();
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
117 |
|
118 |
/**
|
113 |
}
|
114 |
|
115 |
AAM_Extension_Repository::getInstance()->hasUpdates();
|
116 |
+
|
117 |
+
if (version_compare(PHP_VERSION, '5.3.0') == -1) {
|
118 |
+
AAM_Core_Console::add(
|
119 |
+
__('AAM requires PHP version 5.3.0 or higher to function properly', AAM_KEY)
|
120 |
+
);
|
121 |
+
}
|
122 |
}
|
123 |
|
124 |
/**
|
Application/Backend/View.php
CHANGED
@@ -45,6 +45,7 @@ class AAM_Backend_View {
|
|
45 |
AAM_Backend_Feature_Settings_Core::register();
|
46 |
AAM_Backend_Feature_Settings_Content::register();
|
47 |
AAM_Backend_Feature_Settings_Tools::register();
|
|
|
48 |
|
49 |
//feature registration hook
|
50 |
do_action('aam-feature-registration-action');
|
45 |
AAM_Backend_Feature_Settings_Core::register();
|
46 |
AAM_Backend_Feature_Settings_Content::register();
|
47 |
AAM_Backend_Feature_Settings_Tools::register();
|
48 |
+
AAM_Backend_Feature_Settings_ConfigPress::register();
|
49 |
|
50 |
//feature registration hook
|
51 |
do_action('aam-feature-registration-action');
|
Application/Backend/phtml/settings/configpress.phtml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if (defined('AAM_KEY')) { ?>
|
2 |
+
<div class="aam-feature" id="configpress-content">
|
3 |
+
<div class="row">
|
4 |
+
<div class="col-xs-12">
|
5 |
+
<p class="aam-info">
|
6 |
+
Fore more information about AAM configurations check <a href="https://aamplugin.com/help/aam-configurations">this article</a>
|
7 |
+
</p>
|
8 |
+
</div>
|
9 |
+
</div>
|
10 |
+
|
11 |
+
<textarea id="configpress-editor" class="configpress-editor" rows="10"><?php echo AAM_Core_ConfigPress::getInstance()->read(); ?></textarea>
|
12 |
+
</div>
|
13 |
+
<?php }
|
Application/Backend/phtml/widget/login-frontend.phtml
CHANGED
@@ -44,7 +44,14 @@
|
|
44 |
</div>
|
45 |
|
46 |
<p id="<?php echo $this->get_field_id('nav'); ?>">
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
</p>
|
49 |
<?php } else { ?>
|
50 |
<div style="display: table; width: 100%;">
|
44 |
</div>
|
45 |
|
46 |
<p id="<?php echo $this->get_field_id('nav'); ?>">
|
47 |
+
<?php
|
48 |
+
if ( get_option( 'users_can_register' ) ) {
|
49 |
+
$registration_url = sprintf('<a href="%s">%s</a>', esc_url(wp_registration_url()), __('Register'));
|
50 |
+
echo apply_filters( 'register', $registration_url );
|
51 |
+
echo esc_html(apply_filters('login_link_separator', ' | '));
|
52 |
+
}
|
53 |
+
?>
|
54 |
+
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php echo __('Lost your password?'); ?></a>
|
55 |
</p>
|
56 |
<?php } else { ?>
|
57 |
<div style="display: table; width: 100%;">
|
Application/Core/Compatibility.php
CHANGED
@@ -27,6 +27,7 @@ class AAM_Core_Compatibility {
|
|
27 |
define('AAM_REDIRECT', '99');
|
28 |
define('AAM_CONTENT_TEASER', '99');
|
29 |
define('AAM_LOGIN_REDIRECT', '99');
|
|
|
30 |
//TODO - Remove this in Jul 2018
|
31 |
|
32 |
//caching filter & action
|
27 |
define('AAM_REDIRECT', '99');
|
28 |
define('AAM_CONTENT_TEASER', '99');
|
29 |
define('AAM_LOGIN_REDIRECT', '99');
|
30 |
+
define('AAM_CONFIGPRESS', '99');
|
31 |
//TODO - Remove this in Jul 2018
|
32 |
|
33 |
//caching filter & action
|
Application/Core/Config.php
CHANGED
@@ -144,12 +144,8 @@ class AAM_Core_Config {
|
|
144 |
* @static
|
145 |
*/
|
146 |
protected static function readConfigPress($param, $default = null) {
|
147 |
-
|
148 |
-
|
149 |
-
} else {
|
150 |
-
$config = $default;
|
151 |
-
}
|
152 |
-
|
153 |
if (is_array($config) && isset($config['userFunc'])) {
|
154 |
if (is_callable($config['userFunc'])) {
|
155 |
$response = call_user_func($config['userFunc']);
|
144 |
* @static
|
145 |
*/
|
146 |
protected static function readConfigPress($param, $default = null) {
|
147 |
+
$config = AAM_Core_ConfigPress::get('aam.' . $param, $default);
|
148 |
+
|
|
|
|
|
|
|
|
|
149 |
if (is_array($config) && isset($config['userFunc'])) {
|
150 |
if (is_callable($config['userFunc'])) {
|
151 |
$response = call_user_func($config['userFunc']);
|
Application/Core/ConfigPress.php
CHANGED
@@ -12,54 +12,115 @@
|
|
12 |
*
|
13 |
* @package AAM
|
14 |
* @author Vasyl Martyniuk <vasyl@vasyltech.com>
|
15 |
-
* @todo Deprecated - Remove in May 2018
|
16 |
*/
|
17 |
final class AAM_Core_ConfigPress {
|
18 |
-
|
19 |
/**
|
20 |
-
*
|
21 |
*
|
22 |
-
* @
|
23 |
-
* @param mixed $default
|
24 |
*
|
25 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
26 |
*
|
27 |
-
* @
|
28 |
-
*
|
|
|
29 |
*/
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
return
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
-
*
|
42 |
*
|
43 |
-
*
|
44 |
-
*
|
|
|
|
|
45 |
*
|
46 |
* @return mixed
|
47 |
*
|
48 |
-
* @access
|
49 |
-
* @static
|
50 |
*/
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
}
|
58 |
} else {
|
59 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
-
|
62 |
-
return $
|
63 |
}
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
12 |
*
|
13 |
* @package AAM
|
14 |
* @author Vasyl Martyniuk <vasyl@vasyltech.com>
|
|
|
15 |
*/
|
16 |
final class AAM_Core_ConfigPress {
|
17 |
+
|
18 |
/**
|
19 |
+
* Instance of itself
|
20 |
*
|
21 |
+
* @var AAM_Core_ConfigPress
|
|
|
22 |
*
|
23 |
+
* @access private
|
24 |
+
*/
|
25 |
+
protected static $instance = null;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Parsed config
|
29 |
*
|
30 |
+
* @var array
|
31 |
+
*
|
32 |
+
* @access protected
|
33 |
*/
|
34 |
+
protected $config = null;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Raw config text
|
38 |
+
*
|
39 |
+
* @var string
|
40 |
+
*
|
41 |
+
* @access protected
|
42 |
+
*/
|
43 |
+
protected $rawConfig = null;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Constructor
|
47 |
+
*
|
48 |
+
* @return void
|
49 |
+
*
|
50 |
+
* @access protected
|
51 |
+
*/
|
52 |
+
protected function __construct() {
|
53 |
+
try {
|
54 |
+
$reader = new AAM_Core_ConfigPress_Reader;
|
55 |
+
$this->config = $reader->parseString($this->read());
|
56 |
+
} catch (Exception $e) {
|
57 |
+
AAM_Core_Console::add($e->getMessage());
|
58 |
+
$this->config = array();
|
59 |
}
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Read config from the database
|
64 |
+
*
|
65 |
+
* @return string
|
66 |
+
*
|
67 |
+
* @access protected
|
68 |
+
*/
|
69 |
+
public function read() {
|
70 |
+
$blog = (defined('BLOG_ID_CURRENT_SITE') ? BLOG_ID_CURRENT_SITE : 1);
|
71 |
+
$config = AAM_Core_API::getOption('aam-configpress', 'null', $blog);
|
72 |
|
73 |
+
return ($config === 'null' ? '' : $config);
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
+
* Get configuration option/setting
|
78 |
*
|
79 |
+
* If $option is defined, return it, otherwise return the $default value
|
80 |
+
*
|
81 |
+
* @param string $option
|
82 |
+
* @param mixed $default
|
83 |
*
|
84 |
* @return mixed
|
85 |
*
|
86 |
+
* @access public
|
|
|
87 |
*/
|
88 |
+
public static function get($option = null, $default = null) {
|
89 |
+
//init config only when requested and only one time
|
90 |
+
$instance = self::getInstance();
|
91 |
+
|
92 |
+
if (is_null($option)) {
|
93 |
+
$value = $instance->config;
|
|
|
94 |
} else {
|
95 |
+
$chunks = explode('.', $option);
|
96 |
+
$value = $instance->config;
|
97 |
+
foreach ($chunks as $chunk) {
|
98 |
+
if (isset($value[$chunk])) {
|
99 |
+
$value = $value[$chunk];
|
100 |
+
} else {
|
101 |
+
$value = $default;
|
102 |
+
break;
|
103 |
+
}
|
104 |
+
}
|
105 |
}
|
106 |
+
|
107 |
+
return $value;
|
108 |
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Get single instance of itself
|
112 |
+
*
|
113 |
+
* @return AAM_Core_ConfigPress
|
114 |
+
*
|
115 |
+
* @access public
|
116 |
+
* @static
|
117 |
+
*/
|
118 |
+
public static function getInstance() {
|
119 |
+
if (is_null(self::$instance)) {
|
120 |
+
self::$instance = new self;
|
121 |
+
}
|
122 |
+
|
123 |
+
return self::$instance;
|
124 |
+
}
|
125 |
+
|
126 |
}
|
Application/Core/ConfigPress/Evaluator.php
ADDED
@@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* ConfigPress section evaluator
|
12 |
+
*
|
13 |
+
* Parse configuration section and evaluate an expression. At this point it
|
14 |
+
* does not take in consideration the operator's precedence but you can force
|
15 |
+
* the order with parenthesises.
|
16 |
+
*
|
17 |
+
* @package ConfigPress
|
18 |
+
* @author Vasyl Martyniuk <vasyl@vasyltech.com>
|
19 |
+
* @copyright Copyright Vasyl Martyniuk
|
20 |
+
*/
|
21 |
+
class AAM_Core_ConfigPress_Evaluator {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Accepted operators
|
25 |
+
*
|
26 |
+
* @var array
|
27 |
+
*
|
28 |
+
* @access private
|
29 |
+
*/
|
30 |
+
private $_operators = array(
|
31 |
+
array('*', '/'), //the highest priority
|
32 |
+
array('+', '-'),
|
33 |
+
array('==', '!=', '===', '!==', '<', '>', '>=', '<=', '<>'),
|
34 |
+
array('&&', '||'),
|
35 |
+
array('as') //the lowest priority
|
36 |
+
);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Expression to parse
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*
|
43 |
+
* @access protected
|
44 |
+
*/
|
45 |
+
protected $expression;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Parsing expression alias
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*
|
52 |
+
* @access protected
|
53 |
+
*/
|
54 |
+
protected $alias;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Current expression part index
|
58 |
+
*
|
59 |
+
* @var array
|
60 |
+
*
|
61 |
+
* @access protected
|
62 |
+
*/
|
63 |
+
protected $index = array(0);
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Prepare expression evaluation
|
67 |
+
*
|
68 |
+
* @param string $expression
|
69 |
+
*
|
70 |
+
* @return void
|
71 |
+
*/
|
72 |
+
public function __construct($expression) {
|
73 |
+
$this->alias = $expression;
|
74 |
+
|
75 |
+
$regexp = '/(===|!==|==|>=|<=|<>|<|>|\+|\-|\*|\/|&&|\|\||\(|\)|\sas\s)/';
|
76 |
+
$this->expression = preg_split(
|
77 |
+
$regexp, $expression, -1, PREG_SPLIT_DELIM_CAPTURE
|
78 |
+
);
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Evaluate the expression
|
83 |
+
*
|
84 |
+
* @return mixed
|
85 |
+
*
|
86 |
+
* @access public
|
87 |
+
*/
|
88 |
+
public function evaluate() {
|
89 |
+
$queue = array();
|
90 |
+
|
91 |
+
$index = &$this->index[count($this->index) - 1];
|
92 |
+
|
93 |
+
for ($index; $index < count($this->expression); $index++) {
|
94 |
+
$chunk = trim($this->expression[$index]);
|
95 |
+
|
96 |
+
if (empty($chunk)) {
|
97 |
+
continue; //skip empty part
|
98 |
+
} elseif ($chunk == '(') {
|
99 |
+
$this->index[] = ++$index;
|
100 |
+
$queue[] = $this->evaluate();
|
101 |
+
} elseif ($chunk == ')') {
|
102 |
+
array_pop($this->index);
|
103 |
+
$this->index[count($this->index) - 1] = ++$index;
|
104 |
+
break;
|
105 |
+
} else { //evaluate operand or operator
|
106 |
+
$queue[] = $this->evaluateOperand($chunk);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
//compute the queue
|
111 |
+
return $this->computeQueue($queue);
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Evaluate an operand
|
116 |
+
*
|
117 |
+
* @param string $operand
|
118 |
+
*
|
119 |
+
* @return mixed
|
120 |
+
*
|
121 |
+
* @access protected
|
122 |
+
*/
|
123 |
+
protected function evaluateOperand($operand) {
|
124 |
+
if (strpos($operand, '$') === 0) { //variable
|
125 |
+
$operand = $this->parseVariable(substr($operand, 1));
|
126 |
+
} elseif (strpos($operand, '@') === 0) { //callback function
|
127 |
+
$operand = $this->parseCallback(substr($operand, 1));
|
128 |
+
}
|
129 |
+
|
130 |
+
return $operand;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Evaluate variable
|
135 |
+
*
|
136 |
+
* @param string $variable
|
137 |
+
*
|
138 |
+
* @return mixed
|
139 |
+
*
|
140 |
+
* @access protected
|
141 |
+
*/
|
142 |
+
protected function parseVariable($variable) {
|
143 |
+
$value = null;
|
144 |
+
|
145 |
+
$xpath = explode('.', $variable);
|
146 |
+
$root = array_shift($xpath);
|
147 |
+
|
148 |
+
if (isset($GLOBALS[$root])) {
|
149 |
+
$value = $GLOBALS[$root];
|
150 |
+
foreach ($xpath as $level) {
|
151 |
+
if (is_array($value) && isset($value[$level])) {
|
152 |
+
$value = $value[$level];
|
153 |
+
} elseif (is_object($value) && property_exists($value, $level)) {
|
154 |
+
$value = $value->{$level};
|
155 |
+
} else {
|
156 |
+
break;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
return $value;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Evaluate callback function
|
166 |
+
*
|
167 |
+
* @param string $callback
|
168 |
+
*
|
169 |
+
* @return mixed
|
170 |
+
*/
|
171 |
+
protected function parseCallback($callback) {
|
172 |
+
$value = null;
|
173 |
+
|
174 |
+
if (is_callable($callback)) {
|
175 |
+
$value = call_user_func($callback);
|
176 |
+
}
|
177 |
+
|
178 |
+
return $value;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Compute parsed expression
|
183 |
+
*
|
184 |
+
* @param array $queue
|
185 |
+
*
|
186 |
+
* @return mixed
|
187 |
+
*
|
188 |
+
* @access protected
|
189 |
+
*/
|
190 |
+
protected function computeQueue($queue) {
|
191 |
+
$value = $queue[0]; //defaule value
|
192 |
+
|
193 |
+
foreach ($this->_operators as $operators) {
|
194 |
+
$i = 0;
|
195 |
+
while ($i < count($queue)) {
|
196 |
+
if (!is_bool($queue[$i]) && in_array($queue[$i], $operators)) {
|
197 |
+
$value = $this->processOperation(
|
198 |
+
$queue[$i], $queue[$i - 1], $queue[$i + 1]
|
199 |
+
);
|
200 |
+
//replace just calculated value
|
201 |
+
array_splice($queue, --$i, 3, $value);
|
202 |
+
} else {
|
203 |
+
$i++;
|
204 |
+
}
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
return $value;
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Process the calculation
|
213 |
+
*
|
214 |
+
* @param string $operation
|
215 |
+
* @param mixed $operandA
|
216 |
+
* @param mixed $operandB
|
217 |
+
*
|
218 |
+
* @return mixed
|
219 |
+
*
|
220 |
+
* @access protected
|
221 |
+
*/
|
222 |
+
protected function processOperation($operation, $operandA, $operandB) {
|
223 |
+
switch ($operation) {
|
224 |
+
case '+':
|
225 |
+
$operandA += $operandB;
|
226 |
+
break;
|
227 |
+
|
228 |
+
case '-':
|
229 |
+
$operandA -= $operandB;
|
230 |
+
break;
|
231 |
+
|
232 |
+
case '*':
|
233 |
+
$operandA *= $operandB;
|
234 |
+
break;
|
235 |
+
|
236 |
+
case '/';
|
237 |
+
$operandA /= $operandB;
|
238 |
+
break;
|
239 |
+
|
240 |
+
case '==':
|
241 |
+
$operandA = ($operandA == $operandB);
|
242 |
+
break;
|
243 |
+
|
244 |
+
case '===':
|
245 |
+
$operandA = ($operandA === $operandB);
|
246 |
+
break;
|
247 |
+
|
248 |
+
case '!=':
|
249 |
+
case '<>':
|
250 |
+
$operandA = ($operandA != $operandB);
|
251 |
+
break;
|
252 |
+
|
253 |
+
case '!==':
|
254 |
+
$operandA = ($operandA !== $operandB);
|
255 |
+
break;
|
256 |
+
|
257 |
+
case '<':
|
258 |
+
$operandA = ($operandA < $operandB);
|
259 |
+
break;
|
260 |
+
|
261 |
+
case '>':
|
262 |
+
$operandA = ($operandA > $operandB);
|
263 |
+
break;
|
264 |
+
|
265 |
+
case '<=':
|
266 |
+
$operandA = ($operandA <= $operandB);
|
267 |
+
break;
|
268 |
+
|
269 |
+
case '>=':
|
270 |
+
$operandA = ($operandA >= $operandB);
|
271 |
+
break;
|
272 |
+
|
273 |
+
case '&&':
|
274 |
+
$operandA = ($operandA && $operandB);
|
275 |
+
break;
|
276 |
+
|
277 |
+
case '||':
|
278 |
+
$operandA = ($operandA || $operandB);
|
279 |
+
break;
|
280 |
+
|
281 |
+
case 'as':
|
282 |
+
$this->alias = $operandB;
|
283 |
+
break;
|
284 |
+
|
285 |
+
default:
|
286 |
+
$operandA = false;
|
287 |
+
break;
|
288 |
+
}
|
289 |
+
|
290 |
+
return $operandA;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Get section alias
|
295 |
+
*
|
296 |
+
* @return string
|
297 |
+
*
|
298 |
+
* @access public
|
299 |
+
*/
|
300 |
+
public function getAlias() {
|
301 |
+
return $this->alias;
|
302 |
+
}
|
303 |
+
|
304 |
+
}
|
Application/Core/ConfigPress/Reader.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* ConfigPress Reader
|
12 |
+
*
|
13 |
+
* Parse configuration string
|
14 |
+
*
|
15 |
+
* @package ConfigPress
|
16 |
+
* @author Vasyl Martyniuk <vasyl@vasyltech.com>
|
17 |
+
* @copyright Copyright Vasyl Martyniuk
|
18 |
+
*/
|
19 |
+
class AAM_Core_ConfigPress_Reader {
|
20 |
+
|
21 |
+
/**
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
const SEPARATOR = '.';
|
25 |
+
|
26 |
+
/**
|
27 |
+
*
|
28 |
+
*/
|
29 |
+
const INHERIT_KEY = ':';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Parse INI config
|
33 |
+
*
|
34 |
+
* Parse configuration string
|
35 |
+
*
|
36 |
+
* @param string $string
|
37 |
+
*
|
38 |
+
* @return array|bool
|
39 |
+
*
|
40 |
+
* @throws Exception
|
41 |
+
*/
|
42 |
+
public function parseString($string) {
|
43 |
+
if (!empty($string)) {
|
44 |
+
//parse the string
|
45 |
+
set_error_handler(array($this, 'parserError'));
|
46 |
+
$ini = parse_ini_string($string, true);
|
47 |
+
restore_error_handler();
|
48 |
+
|
49 |
+
$response = $this->process(is_array($ini) ? $ini : array());
|
50 |
+
} else {
|
51 |
+
$response = array();
|
52 |
+
}
|
53 |
+
|
54 |
+
return $response;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
*
|
59 |
+
* @param type $error
|
60 |
+
* @param type $message
|
61 |
+
* @throws Exception
|
62 |
+
*/
|
63 |
+
public function parserError($error, $message = '') {
|
64 |
+
AAM_Core_Console::add(
|
65 |
+
sprintf('Error parsing config string: %s', $message), $error
|
66 |
+
);
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Process data from the parsed ini file.
|
71 |
+
*
|
72 |
+
* @param array $data
|
73 |
+
* @return array
|
74 |
+
*/
|
75 |
+
protected function process(array $data) {
|
76 |
+
$config = array();
|
77 |
+
|
78 |
+
foreach ($data as $section => $data) {
|
79 |
+
//check if section has parent section or property
|
80 |
+
if (preg_match('/[\s\w]{1}' . self::INHERIT_KEY . '[\s\w]{1}/', $section)) {
|
81 |
+
$section = $this->inherit($section, $config);
|
82 |
+
} else {
|
83 |
+
//evaluate the section and if not false move forward
|
84 |
+
$evaluator = new AAM_Core_ConfigPress_Evaluator($section);
|
85 |
+
if ($evaluator->evaluate()) {
|
86 |
+
$section = $evaluator->getAlias();
|
87 |
+
$config[$section] = array();
|
88 |
+
} else {
|
89 |
+
continue; //conditional section that did not meet condition
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
if (is_array($data)) { //this is a INI section, build the nested tree
|
94 |
+
$this->buildNestedSection($data, $config[$section]);
|
95 |
+
} else { //single property, no need to do anything
|
96 |
+
$config[$section] = $this->parseValue($data);
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
return $config;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
*
|
105 |
+
* @param type $section
|
106 |
+
* @param type $config
|
107 |
+
* @return type
|
108 |
+
*/
|
109 |
+
protected function inherit($section, &$config) {
|
110 |
+
$sections = explode(self::INHERIT_KEY, $section);
|
111 |
+
$target = trim($sections[0]);
|
112 |
+
$parent = trim($sections[1]);
|
113 |
+
|
114 |
+
if (isset($config[$parent])) {
|
115 |
+
$config[$target] = $config[$parent];
|
116 |
+
}
|
117 |
+
|
118 |
+
return $target;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
*
|
123 |
+
* @param type $data
|
124 |
+
* @param type $config
|
125 |
+
*/
|
126 |
+
protected function buildNestedSection($data, &$config) {
|
127 |
+
foreach ($data as $key => $value) {
|
128 |
+
$root = &$config;
|
129 |
+
foreach (explode(self::SEPARATOR, $key) as $level) {
|
130 |
+
if (!isset($root[$level])) {
|
131 |
+
$root[$level] = array();
|
132 |
+
}
|
133 |
+
$root = &$root[$level];
|
134 |
+
}
|
135 |
+
$root = $this->parseValue($value);
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
*
|
141 |
+
* @param type $value
|
142 |
+
* @return type
|
143 |
+
*/
|
144 |
+
protected function parseValue($value) {
|
145 |
+
return trim($value);
|
146 |
+
}
|
147 |
+
|
148 |
+
}
|
Application/Core/Exporter.php
CHANGED
@@ -99,6 +99,11 @@ class AAM_Core_Exporter {
|
|
99 |
AAM_Core_Config::OPTION,
|
100 |
serialize(AAM_Core_API::getOption(AAM_Core_Config::OPTION)
|
101 |
));
|
|
|
|
|
|
|
|
|
|
|
102 |
} else {
|
103 |
do_action('aam-export', 'system', $feature, $this);
|
104 |
}
|
99 |
AAM_Core_Config::OPTION,
|
100 |
serialize(AAM_Core_API::getOption(AAM_Core_Config::OPTION)
|
101 |
));
|
102 |
+
} elseif ($feature == 'configpress') {
|
103 |
+
$this->add(
|
104 |
+
'aam-configpress',
|
105 |
+
AAM_Core_ConfigPress::getInstance()->read()
|
106 |
+
);
|
107 |
} else {
|
108 |
do_action('aam-export', 'system', $feature, $this);
|
109 |
}
|
Application/Core/JwtAuth.php
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* AAM JWT Authentication
|
12 |
+
*
|
13 |
+
* @package AAM
|
14 |
+
* @author Vasyl Martyniuk <vasyl@vasyltech.com>
|
15 |
+
*/
|
16 |
+
class AAM_Core_JWTAuth {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Single instance of itself
|
20 |
+
*
|
21 |
+
* @var AAM_Core_JWTAuth
|
22 |
+
*
|
23 |
+
* @access protected
|
24 |
+
* @static
|
25 |
+
*/
|
26 |
+
protected static $instance = null;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructor
|
30 |
+
*
|
31 |
+
* @return void
|
32 |
+
*
|
33 |
+
* @access protected
|
34 |
+
*/
|
35 |
+
protected function __construct() {
|
36 |
+
//register API endpoint
|
37 |
+
add_action('rest_api_init', array($this, 'registerAPI'));
|
38 |
+
|
39 |
+
//register authentication hook
|
40 |
+
add_filter('determine_current_user', array($this, 'determineCurrentUser'), 1);
|
41 |
+
|
42 |
+
//load firebase vendor
|
43 |
+
require AAM_BASEDIR . '/vendor/autoload.php';
|
44 |
+
|
45 |
+
if (is_admin()) {
|
46 |
+
$this->checkRequirements();
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Check JWT requirements
|
52 |
+
*/
|
53 |
+
protected function checkRequirements() {
|
54 |
+
$secret = AAM_Core_Config::get('authentication.jwt.secret');
|
55 |
+
|
56 |
+
if (empty($secret)) {
|
57 |
+
AAM_Core_Console::add(
|
58 |
+
__('JWT Authentication is enabled but secret key is not defined', AAM_KEY)
|
59 |
+
);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Register APIs
|
65 |
+
*
|
66 |
+
* @return void
|
67 |
+
*
|
68 |
+
* @access public
|
69 |
+
*/
|
70 |
+
public function registerAPI() {
|
71 |
+
register_rest_route('aam/v1', '/authenticate', array(
|
72 |
+
'methods' => 'POST',
|
73 |
+
'callback' => array($this, 'authenticate'),
|
74 |
+
'args' => array(
|
75 |
+
'username' => array(
|
76 |
+
'description' => __('Valid username.', AAM_KEY),
|
77 |
+
'type' => 'string',
|
78 |
+
),
|
79 |
+
'password' => array(
|
80 |
+
'description' => __('Valid password.', AAM_KEY),
|
81 |
+
'type' => 'string',
|
82 |
+
)
|
83 |
+
),
|
84 |
+
));
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Authenticate user
|
89 |
+
*
|
90 |
+
* @param WP_REST_Request $request
|
91 |
+
*
|
92 |
+
* @return WP_REST_Response
|
93 |
+
*
|
94 |
+
* @access public
|
95 |
+
*/
|
96 |
+
public function authenticate(WP_REST_Request $request) {
|
97 |
+
$username = $request->get_param('username');
|
98 |
+
$password = $request->get_param('password');
|
99 |
+
|
100 |
+
// try to authenticate user
|
101 |
+
$result = AAM_Core_Login::getInstance()->execute(array(
|
102 |
+
'user_login' => $username,
|
103 |
+
'user_password' => $password
|
104 |
+
), false);
|
105 |
+
|
106 |
+
$response = new WP_REST_Response();
|
107 |
+
|
108 |
+
if ($result['status'] == 'success') { // generate token
|
109 |
+
$key = AAM_Core_Config::get('authentication.jwt.secret');
|
110 |
+
$expire = AAM_Core_Config::get('authentication.jwt.expires', 86400);
|
111 |
+
|
112 |
+
$claims = array(
|
113 |
+
"iat" => time(),
|
114 |
+
'exp' => time() + $expire, // by default expires in 1 day
|
115 |
+
'userId' => $result['user']->ID,
|
116 |
+
);
|
117 |
+
|
118 |
+
$response->data = array(
|
119 |
+
'token' => Firebase\JWT\JWT::encode(
|
120 |
+
apply_filters('aam-jwt-claims-filter', $claims), $key
|
121 |
+
),
|
122 |
+
'token_expires' => $claims['exp'],
|
123 |
+
'user' => $result['user']
|
124 |
+
);
|
125 |
+
$response->status = 200;
|
126 |
+
} else {
|
127 |
+
$response->data = $result['error'];
|
128 |
+
$response->status = 403;
|
129 |
+
}
|
130 |
+
|
131 |
+
return apply_filters('aam-jwt-response-filter', $response);
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
*
|
136 |
+
* @param type $result
|
137 |
+
*/
|
138 |
+
public function determineCurrentUser($result) {
|
139 |
+
// get Authentication header
|
140 |
+
$token = null;
|
141 |
+
|
142 |
+
if (isset($_SERVER['HTTP_AUTHENTICATION'])) {
|
143 |
+
$token = preg_replace('/^Bearer /', '', $_SERVER['HTTP_AUTHENTICATION']);
|
144 |
+
}
|
145 |
+
|
146 |
+
$token = apply_filters('aam-authentication-header-filter', $token);
|
147 |
+
$key = AAM_Core_Config::get('authentication.jwt.secret');
|
148 |
+
|
149 |
+
if ($token) {
|
150 |
+
try {
|
151 |
+
$claims = Firebase\JWT\JWT::decode(
|
152 |
+
$token, $key, array_keys(Firebase\JWT\JWT::$supported_algs)
|
153 |
+
);
|
154 |
+
|
155 |
+
if (isset($claims->userId)) {
|
156 |
+
$result = $claims->userId;
|
157 |
+
}
|
158 |
+
} catch (Exception $ex) {
|
159 |
+
echo $ex->getMessage();
|
160 |
+
// Do nothing
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
return $result;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Get single instance of itself
|
169 |
+
*
|
170 |
+
* @return AAM_Core_JWTAuth
|
171 |
+
*
|
172 |
+
* @access public
|
173 |
+
* @static
|
174 |
+
*/
|
175 |
+
public static function getInstance() {
|
176 |
+
if (is_null(self::$instance)) {
|
177 |
+
self::$instance = new self;
|
178 |
+
}
|
179 |
+
|
180 |
+
return self::$instance;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Bootstrap AAM JWT Authentication feature
|
185 |
+
*
|
186 |
+
* @return AAM_Core_JWTAuth
|
187 |
+
*
|
188 |
+
* @access public
|
189 |
+
* @static
|
190 |
+
*/
|
191 |
+
public static function bootstrap() {
|
192 |
+
return self::getInstance();
|
193 |
+
}
|
194 |
+
|
195 |
+
}
|
Application/Core/Login.php
CHANGED
@@ -241,9 +241,13 @@ class AAM_Core_Login {
|
|
241 |
*
|
242 |
* @access public
|
243 |
*/
|
244 |
-
public function execute($credentials = array()) {
|
245 |
$this->aamLogin = true;
|
246 |
|
|
|
|
|
|
|
|
|
247 |
$response = array(
|
248 |
'status' => 'failure',
|
249 |
'redirect' => AAM_Core_Request::post('redirect')
|
@@ -264,7 +268,9 @@ class AAM_Core_Login {
|
|
264 |
}
|
265 |
|
266 |
$response['status'] = 'success';
|
|
|
267 |
} catch (Exception $ex) {
|
|
|
268 |
$response['reason'] = $ex->getMessage();
|
269 |
}
|
270 |
|
241 |
*
|
242 |
* @access public
|
243 |
*/
|
244 |
+
public function execute($credentials = array(), $set_cookie = true) {
|
245 |
$this->aamLogin = true;
|
246 |
|
247 |
+
if ($set_cookie === false) {
|
248 |
+
add_filter('send_auth_cookies', function() { return false; });
|
249 |
+
}
|
250 |
+
|
251 |
$response = array(
|
252 |
'status' => 'failure',
|
253 |
'redirect' => AAM_Core_Request::post('redirect')
|
268 |
}
|
269 |
|
270 |
$response['status'] = 'success';
|
271 |
+
$response['user'] = $user;
|
272 |
} catch (Exception $ex) {
|
273 |
+
$response['error'] = $user;
|
274 |
$response['reason'] = $ex->getMessage();
|
275 |
}
|
276 |
|
Application/Extension/List.php
CHANGED
@@ -72,14 +72,6 @@ class AAM_Extension_List {
|
|
72 |
'description' => 'Convenient way to navigate between different sites in the Network Admin Panel. This is the open source solution and you can find it on the <a href="https://github.com/aamplugin/multisite-extension" target="_blank">Github here</a>.',
|
73 |
'version' => (defined('AAM_MULTISITE') ? constant('AAM_MULTISITE') : null)
|
74 |
),
|
75 |
-
'AAM_CONFIGPRESS' => array(
|
76 |
-
'title' => 'ConfigPress',
|
77 |
-
'id' => 'AAM_CONFIGPRESS',
|
78 |
-
'type' => 'GNU',
|
79 |
-
'license' => 'AAMCONFIGPRESS',
|
80 |
-
'description' => 'Extension to manage AAM core functionality with advanced configuration settings. This is the open source solution and you can find it on the <a href="https://github.com/aamplugin/configpress-extension" target="_blank">Github here</a>.',
|
81 |
-
'version' => (defined('AAM_CONFIGPRESS') ? constant('AAM_CONFIGPRESS') : null)
|
82 |
-
),
|
83 |
'AAM_USER_ACTIVITY' => array(
|
84 |
'title' => 'User Activities',
|
85 |
'id' => 'AAM_USER_ACTIVITY',
|
72 |
'description' => 'Convenient way to navigate between different sites in the Network Admin Panel. This is the open source solution and you can find it on the <a href="https://github.com/aamplugin/multisite-extension" target="_blank">Github here</a>.',
|
73 |
'version' => (defined('AAM_MULTISITE') ? constant('AAM_MULTISITE') : null)
|
74 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
'AAM_USER_ACTIVITY' => array(
|
76 |
'title' => 'User Activities',
|
77 |
'id' => 'AAM_USER_ACTIVITY',
|
Application/Frontend/phtml/login.phtml
CHANGED
@@ -30,6 +30,13 @@
|
|
30 |
</div>
|
31 |
|
32 |
<p id="<?php echo $this->args['id'] . '-nav'; ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php echo __('Lost your password?', AAM_KEY); ?></a>
|
34 |
</p>
|
35 |
<?php } else { ?>
|
30 |
</div>
|
31 |
|
32 |
<p id="<?php echo $this->args['id'] . '-nav'; ?>">
|
33 |
+
<?php
|
34 |
+
if (get_option('users_can_register')) {
|
35 |
+
$registration_url = sprintf('<a href="%s">%s</a>', esc_url(wp_registration_url()), __('Register'));
|
36 |
+
echo apply_filters( 'register', $registration_url );
|
37 |
+
echo esc_html(apply_filters('login_link_separator', ' | '));
|
38 |
+
}
|
39 |
+
?>
|
40 |
<a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php echo __('Lost your password?', AAM_KEY); ?></a>
|
41 |
</p>
|
42 |
<?php } else { ?>
|
Lang/advanced-access-manager-en_US.mo
CHANGED
Binary file
|
Lang/advanced-access-manager-en_US.po
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: AAM\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Language-Team: WP AAM <vasyl@vasyltech.com>\n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"X-Generator: Poedit 2.0.
|
11 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
12 |
"X-Poedit-SourceCharset: UTF-8\n"
|
13 |
"X-Poedit-KeywordsList: __;preparePhrase\n"
|
@@ -16,12 +16,11 @@ msgstr ""
|
|
16 |
"Language: en_US\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
-
#: Application/Backend/Feature/Extension/Manager.php:
|
20 |
-
|
21 |
-
msgid "To install extension manually, check %sthis article%s."
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: Application/Backend/Feature/Extension/Manager.php:
|
25 |
msgid "Enter license key to update extension."
|
26 |
msgstr ""
|
27 |
|
@@ -77,11 +76,11 @@ msgstr ""
|
|
77 |
msgid "Logout Redirect"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: Application/Backend/Feature/Main/Menu.php:
|
81 |
msgid "Backend Menu"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: Application/Backend/Feature/Main/Metabox.php:
|
85 |
msgid "Metaboxes & Widgets"
|
86 |
msgstr ""
|
87 |
|
@@ -89,6 +88,10 @@ msgstr ""
|
|
89 |
msgid "Access Denied Redirect"
|
90 |
msgstr ""
|
91 |
|
|
|
|
|
|
|
|
|
92 |
#: Application/Backend/Feature/Settings/Content.php:32
|
93 |
msgid "Media Files Access Control"
|
94 |
msgstr ""
|
@@ -193,7 +196,20 @@ msgid ""
|
|
193 |
"website security."
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
msgid "Core Settings"
|
198 |
msgstr ""
|
199 |
|
@@ -201,71 +217,84 @@ msgstr ""
|
|
201 |
msgid "Tools"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: Application/Backend/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
msgid "Access Manager"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: Application/Backend/Manager.php:
|
209 |
-
#: Application/Backend/Manager.php:
|
210 |
msgid "Access"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: Application/Backend/Manager.php:
|
214 |
#: Application/Core/API.php:247
|
215 |
msgid "Access Denied"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: Application/Backend/View/Localization.php:26 media/js/aam.js:
|
219 |
msgid "Search Capability"
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: Application/Backend/View/Localization.php:27 media/js/aam.js:
|
223 |
msgid "_TOTAL_ capability(s)"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: Application/Backend/View/Localization.php:28 media/js/aam.js:
|
227 |
-
#: media/js/aam.js:
|
228 |
-
#: media/js/aam.js:
|
229 |
msgid "Saving..."
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: Application/Backend/View/Localization.php:29 media/js/aam.js:
|
233 |
msgid "Failed to add new capability"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: Application/Backend/View/Localization.php:30 media/js/aam.js:
|
237 |
-
#: media/js/aam.js:
|
238 |
-
#: media/js/aam.js:
|
239 |
-
#: media/js/aam.js:
|
240 |
-
#: media/js/aam.js:
|
241 |
-
#: media/js/aam.js:
|
242 |
-
#: media/js/aam.js:
|
|
|
243 |
msgid "Application error"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: Application/Backend/View/Localization.php:31 media/js/aam.js:
|
247 |
msgid "Add Capability"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: Application/Backend/View/Localization.php:32 media/js/aam.js:
|
251 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
252 |
msgid "Show Menu"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: Application/Backend/View/Localization.php:33 media/js/aam.js:
|
256 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
257 |
msgid "Restrict Menu"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: Application/Backend/View/Localization.php:34 media/js/aam.js:
|
261 |
msgid "Failed to retrieve mataboxes"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: Application/Backend/View/Localization.php:35 media/js/aam.js:
|
265 |
msgid "Search"
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: Application/Backend/View/Localization.php:36 media/js/aam.js:
|
269 |
msgid "_TOTAL_ object(s)"
|
270 |
msgstr ""
|
271 |
|
@@ -281,43 +310,43 @@ msgstr ""
|
|
281 |
msgid "No Role"
|
282 |
msgstr ""
|
283 |
|
284 |
-
#: Application/Backend/View/Localization.php:40 media/js/aam.js:
|
285 |
msgid "Search Role"
|
286 |
msgstr ""
|
287 |
|
288 |
-
#: Application/Backend/View/Localization.php:41 media/js/aam.js:
|
289 |
msgid "_TOTAL_ role(s)"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: Application/Backend/View/Localization.php:42 media/js/aam.js:
|
293 |
-
#: media/js/aam.js:
|
294 |
#: Application/Backend/phtml/main/capability.phtml:26
|
295 |
#: Application/Backend/phtml/main/capability.phtml:64
|
296 |
msgid "Create"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: Application/Backend/View/Localization.php:43 media/js/aam.js:
|
300 |
-
#: Application/Backend/phtml/index.phtml:
|
301 |
-
#: Application/Backend/phtml/index.phtml:
|
302 |
msgid "Users"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: Application/Backend/View/Localization.php:44 media/js/aam.js:
|
306 |
msgid "Failed to add new role"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: Application/Backend/View/Localization.php:45 media/js/aam.js:
|
310 |
msgid "Add Role"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: Application/Backend/View/Localization.php:46 media/js/aam.js:
|
314 |
msgid "Failed to update role"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: Application/Backend/View/Localization.php:47 media/js/aam.js:
|
318 |
#: Application/Backend/phtml/extensions.phtml:51
|
319 |
#: Application/Backend/phtml/extensions.phtml:78
|
320 |
-
#: Application/Backend/phtml/index.phtml:
|
321 |
#: Application/Backend/phtml/main/capability.phtml:86
|
322 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
|
323 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
|
@@ -327,41 +356,41 @@ msgstr ""
|
|
327 |
msgid "Update"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: Application/Backend/View/Localization.php:48 media/js/aam.js:
|
331 |
-
#: media/js/aam.js:
|
332 |
msgid "Deleting..."
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: Application/Backend/View/Localization.php:49 media/js/aam.js:
|
336 |
msgid "Failed to delete role"
|
337 |
msgstr ""
|
338 |
|
339 |
#: Application/Backend/View/Localization.php:50
|
340 |
-
#: Application/Backend/View/Localization.php:62 media/js/aam.js:
|
341 |
-
#: media/js/aam.js:
|
342 |
msgid "Delete Role"
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: Application/Backend/View/Localization.php:51 media/js/aam.js:
|
346 |
msgid "Failed to block user"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: Application/Backend/View/Localization.php:52 media/js/aam.js:
|
350 |
msgid "Search User"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: Application/Backend/View/Localization.php:53 media/js/aam.js:
|
354 |
msgid "_TOTAL_ user(s)"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: Application/Backend/View/Localization.php:54 media/js/aam.js:
|
358 |
#: Application/Backend/phtml/frame.phtml:46
|
359 |
-
#: Application/Backend/phtml/index.phtml:
|
360 |
msgid "Role"
|
361 |
msgstr ""
|
362 |
|
363 |
#: Application/Backend/View/Localization.php:55
|
364 |
-
#: Application/Core/Subject/Visitor.php:79 media/js/aam.js:
|
365 |
msgid "Anonymous"
|
366 |
msgstr ""
|
367 |
|
@@ -373,38 +402,38 @@ msgstr ""
|
|
373 |
msgid "Current role"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: Application/Backend/View/Localization.php:58 media/js/aam.js:
|
377 |
msgid "Manage Access"
|
378 |
msgstr ""
|
379 |
|
380 |
#: Application/Backend/View/Localization.php:59
|
381 |
-
#: Application/Backend/View/PostOptionList.php:91 media/js/aam.js:
|
382 |
msgid "Edit"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: Application/Backend/View/Localization.php:60 media/js/aam.js:
|
386 |
msgid "Manage Role"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: Application/Backend/View/Localization.php:61 media/js/aam.js:
|
390 |
msgid "Edit Role"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: Application/Backend/View/Localization.php:63 media/js/aam.js:
|
394 |
msgid "Manage User"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: Application/Backend/View/Localization.php:64 media/js/aam.js:
|
398 |
msgid "Edit User"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: Application/Backend/View/Localization.php:65 media/js/aam.js:
|
402 |
-
#: media/js/aam.js:
|
403 |
msgid "Lock User"
|
404 |
msgstr ""
|
405 |
|
406 |
-
#: Application/Backend/View/Localization.php:66 media/js/aam.js:
|
407 |
-
#: media/js/aam.js:
|
408 |
msgid "Unlock User"
|
409 |
msgstr ""
|
410 |
|
@@ -517,6 +546,7 @@ msgid "Access Expiration"
|
|
517 |
msgstr ""
|
518 |
|
519 |
#: Application/Backend/View/PostOptionList.php:69
|
|
|
520 |
msgid "Expires"
|
521 |
msgstr ""
|
522 |
|
@@ -570,7 +600,7 @@ msgid ""
|
|
570 |
msgstr ""
|
571 |
|
572 |
#: Application/Backend/View/PostOptionList.php:96
|
573 |
-
#: Application/Backend/phtml/index.phtml:
|
574 |
#: Application/Backend/phtml/main/capability.phtml:104
|
575 |
msgid "Delete"
|
576 |
msgstr ""
|
@@ -595,25 +625,33 @@ msgstr ""
|
|
595 |
msgid "AAM Secure Login Widget"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: Application/Backend/Widget/Login.php:
|
599 |
-
#: Application/Frontend/phtml/login.phtml:
|
600 |
msgid "Login"
|
601 |
msgstr ""
|
602 |
|
603 |
-
#: Application/Backend/Widget/Login.php:
|
604 |
#: Application/Shortcode/Strategy/Login.php:55
|
605 |
msgid "Howdy, %username%"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: Application/Core/
|
609 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: Application/Core/Login.php:
|
613 |
-
msgid "
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: Application/Core/Subject/Default.php:78 media/js/aam.js:
|
617 |
msgid "All Users, Roles and Visitor"
|
618 |
msgstr ""
|
619 |
|
@@ -631,12 +669,12 @@ msgid ""
|
|
631 |
"more.%s"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: Application/Extension/Repository.php:
|
635 |
#, php-format
|
636 |
msgid "Failed to create %s"
|
637 |
msgstr ""
|
638 |
|
639 |
-
#: Application/Extension/Repository.php:
|
640 |
#, php-format
|
641 |
msgid "Directory %s is not writable"
|
642 |
msgstr ""
|
@@ -649,106 +687,123 @@ msgstr ""
|
|
649 |
msgid "No valid strategy found for the given context"
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: aam.php:
|
653 |
-
msgid "PHP 5.
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: aam.php:
|
657 |
msgid "WP 3.8 or higher is required."
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: media/js/aam.js:
|
661 |
msgid "Clone Role"
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: media/js/aam.js:
|
|
|
|
|
|
|
|
|
665 |
msgid "Switch To User"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: media/js/aam.js:
|
669 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
670 |
msgid "Application Error"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: media/js/aam.js:
|
674 |
msgid "Uncheck to allow"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: media/js/aam.js:
|
678 |
msgid "Check to restrict"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: media/js/aam.js:
|
682 |
msgid "Processing"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: media/js/aam.js:
|
686 |
msgid "Failed to initialize URL"
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: media/js/aam.js:
|
690 |
msgid "Initialize"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: media/js/aam.js:
|
694 |
msgid "Uncheck to show"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: media/js/aam.js:
|
698 |
msgid "Check to hide"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: media/js/aam.js:
|
702 |
msgid "WordPress core does not allow to grant this capability"
|
703 |
msgstr ""
|
704 |
|
705 |
-
#: media/js/aam.js:
|
706 |
msgid "Nothing to show"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: media/js/aam.js:
|
710 |
msgid "Failed to update capability"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: media/js/aam.js:
|
714 |
msgid "Update Capability"
|
715 |
msgstr ""
|
716 |
|
717 |
-
#: media/js/aam.js:
|
718 |
msgid "Failed to delete capability"
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: media/js/aam.js:
|
722 |
msgid "Delete Capability"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: media/js/aam.js:
|
726 |
msgid "Drill-Down"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: media/js/aam.js:
|
730 |
msgid "Extension status was updated successfully"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: media/js/aam.js:
|
734 |
-
#: media/js/aam.js:
|
735 |
msgid "Wait..."
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: media/js/aam.js:
|
739 |
msgid "All settings were cleared successfully"
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: media/js/aam.js:
|
743 |
#: Application/Backend/phtml/settings/tools.phtml:66
|
744 |
msgid "Clear"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: media/js/aam.js:
|
748 |
msgid "The cache was cleared successfully"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: media/js/aam.js:
|
752 |
msgid "Invalid data format"
|
753 |
msgstr ""
|
754 |
|
@@ -823,19 +878,21 @@ msgstr ""
|
|
823 |
#: Application/Backend/phtml/extensions.phtml:97
|
824 |
#: Application/Backend/phtml/extensions.phtml:128
|
825 |
#: Application/Backend/phtml/extensions.phtml:139
|
826 |
-
#: Application/Backend/phtml/index.phtml:
|
827 |
-
#: Application/Backend/phtml/index.phtml:
|
828 |
-
#: Application/Backend/phtml/index.phtml:
|
829 |
-
#: Application/Backend/phtml/index.phtml:
|
830 |
-
#: Application/Backend/phtml/index.phtml:
|
831 |
-
#: Application/Backend/phtml/index.phtml:
|
|
|
|
|
832 |
#: Application/Backend/phtml/main/capability.phtml:54
|
833 |
#: Application/Backend/phtml/main/capability.phtml:65
|
834 |
#: Application/Backend/phtml/main/capability.phtml:75
|
835 |
#: Application/Backend/phtml/main/capability.phtml:87
|
836 |
#: Application/Backend/phtml/main/capability.phtml:97
|
837 |
#: Application/Backend/phtml/main/capability.phtml:105
|
838 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
839 |
#: Application/Backend/phtml/main/metabox.phtml:89
|
840 |
#: Application/Backend/phtml/main/metabox.phtml:103
|
841 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
|
@@ -907,7 +964,7 @@ msgid ""
|
|
907 |
msgstr ""
|
908 |
|
909 |
#: Application/Backend/phtml/frame.phtml:62
|
910 |
-
#: Application/Backend/phtml/index.phtml:
|
911 |
msgid "Username"
|
912 |
msgstr ""
|
913 |
|
@@ -917,7 +974,7 @@ msgid "Manage access to %s for visitors (any user that is not authenticated)"
|
|
917 |
msgstr ""
|
918 |
|
919 |
#: Application/Backend/phtml/frame.phtml:75
|
920 |
-
#: Application/Backend/phtml/index.phtml:
|
921 |
msgid "Manage Visitors"
|
922 |
msgstr ""
|
923 |
|
@@ -929,7 +986,7 @@ msgid ""
|
|
929 |
msgstr ""
|
930 |
|
931 |
#: Application/Backend/phtml/frame.phtml:84
|
932 |
-
#: Application/Backend/phtml/index.phtml:
|
933 |
msgid "Manage Default Access"
|
934 |
msgstr ""
|
935 |
|
@@ -1028,108 +1085,128 @@ msgstr ""
|
|
1028 |
#: Application/Backend/phtml/index.phtml:101
|
1029 |
msgid ""
|
1030 |
"Install free [AAM Multisite extension] in order to manage all your sites "
|
1031 |
-
"from Network Admin"
|
1032 |
-
msgstr ""
|
1033 |
-
|
1034 |
-
#: Application/Backend/phtml/index.phtml:102
|
1035 |
-
msgid "Install AAM Multisite"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
-
#: Application/Backend/phtml/index.phtml:
|
1039 |
msgid "Users/Roles Manager"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
-
#: Application/Backend/phtml/index.phtml:
|
1043 |
-
#: Application/Backend/phtml/index.phtml:
|
1044 |
msgid "Roles"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: Application/Backend/phtml/index.phtml:
|
1048 |
-
#: Application/Backend/phtml/index.phtml:
|
1049 |
msgid "Visitor"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: Application/Backend/phtml/index.phtml:
|
1053 |
-
#: Application/Backend/phtml/index.phtml:
|
1054 |
msgid "Default"
|
1055 |
msgstr ""
|
1056 |
|
1057 |
-
#: Application/Backend/phtml/index.phtml:
|
1058 |
-
#: Application/Backend/phtml/index.phtml:
|
1059 |
msgid "Action"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
-
#: Application/Backend/phtml/index.phtml:
|
1063 |
msgid "Create Role"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
-
#: Application/Backend/phtml/index.phtml:
|
1067 |
-
#: Application/Backend/phtml/index.phtml:
|
1068 |
msgid "Role Name"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: Application/Backend/phtml/index.phtml:
|
1072 |
-
#: Application/Backend/phtml/index.phtml:
|
1073 |
msgid "Enter Role Name"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: Application/Backend/phtml/index.phtml:
|
1077 |
-
#: Application/Backend/phtml/index.phtml:
|
1078 |
msgid "Role Expiration"
|
1079 |
msgstr ""
|
1080 |
|
1081 |
-
#: Application/Backend/phtml/index.phtml:
|
1082 |
-
#: Application/Backend/phtml/index.phtml:
|
1083 |
msgid "Enter Expiration Rule"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: Application/Backend/phtml/index.phtml:
|
1087 |
msgid "Update Role"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: Application/Backend/phtml/index.phtml:
|
1091 |
#, php-format
|
1092 |
msgid "Are you sure that you want to delete the %s role?"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: Application/Backend/phtml/index.phtml:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
msgid ""
|
1097 |
"Manage access to your website for visitors (any user that is not "
|
1098 |
"authenticated)"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
-
#: Application/Backend/phtml/index.phtml:
|
1102 |
msgid ""
|
1103 |
"Manage default access to your website resources for all users, roles and "
|
1104 |
"visitor. This includes Administrator role and your user"
|
1105 |
msgstr ""
|
1106 |
|
1107 |
-
#: Application/Backend/phtml/index.phtml:
|
1108 |
msgid ""
|
1109 |
"Manage access for your users, roles and visitors. Be careful with "
|
1110 |
"[Administrator] role as well as your admin user. [Database backup is "
|
1111 |
"strongly recommended]."
|
1112 |
msgstr ""
|
1113 |
|
1114 |
-
#: Application/Backend/phtml/index.phtml:
|
1115 |
msgid ""
|
1116 |
"With Roles tab you can manage access for any defined role, edit role's name, "
|
1117 |
"create new role or even delete existing (but only when there is no users "
|
1118 |
"assigned to it). You are not allowed to delete Administrator role."
|
1119 |
msgstr ""
|
1120 |
|
1121 |
-
#: Application/Backend/phtml/index.phtml:
|
1122 |
msgid ""
|
1123 |
"Manage access for any user. As a bonus feature, you can block user. It means "
|
1124 |
"that user will be not able to login to your website anymore."
|
1125 |
msgstr ""
|
1126 |
|
1127 |
-
#: Application/Backend/phtml/index.phtml:
|
1128 |
msgid ""
|
1129 |
"Visitor can be considered any user that is not authenticated to your website."
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: Application/Backend/phtml/index.phtml:
|
1133 |
msgid ""
|
1134 |
"Manage default access settings to your website resources for all users, "
|
1135 |
"roles and visitors."
|
@@ -1302,14 +1379,20 @@ msgid ""
|
|
1302 |
msgstr ""
|
1303 |
|
1304 |
#: Application/Backend/phtml/main/menu.phtml:87
|
|
|
|
|
|
|
|
|
|
|
|
|
1305 |
msgid "Dashboard Lockdown"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
1309 |
msgid "You cannot restrict access to Dashboard home page."
|
1310 |
msgstr ""
|
1311 |
|
1312 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
1313 |
#, php-format
|
1314 |
msgid ""
|
1315 |
"The [Home] is the default page every user is redirected after login. To "
|
@@ -1317,7 +1400,7 @@ msgid ""
|
|
1317 |
"WordPress backend%s article."
|
1318 |
msgstr ""
|
1319 |
|
1320 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
1321 |
msgid "OK"
|
1322 |
msgstr ""
|
1323 |
|
@@ -1529,10 +1612,6 @@ msgstr ""
|
|
1529 |
msgid "Enter your teaser"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:107
|
1533 |
-
msgid "Save"
|
1534 |
-
msgstr ""
|
1535 |
-
|
1536 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:119
|
1537 |
msgid "E-Commerce Setup"
|
1538 |
msgstr ""
|
@@ -1640,18 +1719,28 @@ msgid ""
|
|
1640 |
"please check %sthis article%s."
|
1641 |
msgstr ""
|
1642 |
|
1643 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
|
|
|
|
|
|
|
|
|
|
1644 |
#: Application/Frontend/phtml/login.phtml:40
|
|
|
|
|
|
|
|
|
|
|
1645 |
msgid "Dashboard"
|
1646 |
msgstr ""
|
1647 |
|
1648 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1649 |
-
#: Application/Frontend/phtml/login.phtml:
|
1650 |
msgid "Edit My Profile"
|
1651 |
msgstr ""
|
1652 |
|
1653 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1654 |
-
#: Application/Frontend/phtml/login.phtml:
|
1655 |
msgid "Log Out"
|
1656 |
msgstr ""
|
1657 |
|
@@ -1659,10 +1748,6 @@ msgstr ""
|
|
1659 |
msgid "Username or Email Address"
|
1660 |
msgstr ""
|
1661 |
|
1662 |
-
#: Application/Frontend/phtml/login.phtml:
|
1663 |
msgid "Remember Me"
|
1664 |
msgstr ""
|
1665 |
-
|
1666 |
-
#: Application/Frontend/phtml/login.phtml:31
|
1667 |
-
msgid "Lost your password?"
|
1668 |
-
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: AAM\n"
|
4 |
+
"POT-Creation-Date: 2018-03-20 18:40-0400\n"
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Language-Team: WP AAM <vasyl@vasyltech.com>\n"
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"X-Generator: Poedit 2.0.6\n"
|
11 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
12 |
"X-Poedit-SourceCharset: UTF-8\n"
|
13 |
"X-Poedit-KeywordsList: __;preparePhrase\n"
|
16 |
"Language: en_US\n"
|
17 |
"X-Poedit-SearchPath-0: .\n"
|
18 |
|
19 |
+
#: Application/Backend/Feature/Extension/Manager.php:59
|
20 |
+
msgid "You may try to install extension manually."
|
|
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: Application/Backend/Feature/Extension/Manager.php:108
|
24 |
msgid "Enter license key to update extension."
|
25 |
msgstr ""
|
26 |
|
76 |
msgid "Logout Redirect"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: Application/Backend/Feature/Main/Menu.php:197
|
80 |
msgid "Backend Menu"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: Application/Backend/Feature/Main/Metabox.php:241
|
84 |
msgid "Metaboxes & Widgets"
|
85 |
msgstr ""
|
86 |
|
88 |
msgid "Access Denied Redirect"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: Application/Backend/Feature/Settings/ConfigPress.php:53
|
92 |
+
msgid "ConfigPress"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
#: Application/Backend/Feature/Settings/Content.php:32
|
96 |
msgid "Media Files Access Control"
|
97 |
msgstr ""
|
196 |
"website security."
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: Application/Backend/Feature/Settings/Core.php:62
|
200 |
+
msgid "JWT Authentication"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: Application/Backend/Feature/Settings/Core.php:63
|
204 |
+
#, php-format
|
205 |
+
msgid ""
|
206 |
+
"[Note!] PHP 5.4 or higher is required for this feature. Enable the ability "
|
207 |
+
"to authenticate user with WordPress RESTfull API and JWT token. For more "
|
208 |
+
"information, check %sHow to authenticate WordPress user with JWT token%s "
|
209 |
+
"article"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: Application/Backend/Feature/Settings/Core.php:82
|
213 |
msgid "Core Settings"
|
214 |
msgstr ""
|
215 |
|
217 |
msgid "Tools"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: Application/Backend/Feature/Subject/User.php:63
|
221 |
+
msgid "Operation is not permitted"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: Application/Backend/Feature/Subject/User.php:77
|
225 |
+
msgid "You cannot set expiration to yourself"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: Application/Backend/Manager.php:119
|
229 |
+
msgid "AAM requires PHP version 5.3.0 or higher to function properly"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: Application/Backend/Manager.php:357
|
233 |
msgid "Access Manager"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: Application/Backend/Manager.php:444 Application/Backend/Manager.php:462
|
237 |
+
#: Application/Backend/Manager.php:485
|
238 |
msgid "Access"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: Application/Backend/Manager.php:635 Application/Backend/Manager.php:658
|
242 |
#: Application/Core/API.php:247
|
243 |
msgid "Access Denied"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: Application/Backend/View/Localization.php:26 media/js/aam.js:1236
|
247 |
msgid "Search Capability"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: Application/Backend/View/Localization.php:27 media/js/aam.js:1237
|
251 |
msgid "_TOTAL_ capability(s)"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: Application/Backend/View/Localization.php:28 media/js/aam.js:327
|
255 |
+
#: media/js/aam.js:388 media/js/aam.js:766 media/js/aam.js:1339
|
256 |
+
#: media/js/aam.js:1383 media/js/aam.js:1901
|
257 |
msgid "Saving..."
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: Application/Backend/View/Localization.php:29 media/js/aam.js:1347
|
261 |
msgid "Failed to add new capability"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: Application/Backend/View/Localization.php:30 media/js/aam.js:347
|
265 |
+
#: media/js/aam.js:400 media/js/aam.js:437 media/js/aam.js:531
|
266 |
+
#: media/js/aam.js:563 media/js/aam.js:776 media/js/aam.js:809
|
267 |
+
#: media/js/aam.js:1054 media/js/aam.js:1090 media/js/aam.js:1124
|
268 |
+
#: media/js/aam.js:1352 media/js/aam.js:1396 media/js/aam.js:1435
|
269 |
+
#: media/js/aam.js:1518 media/js/aam.js:1663 media/js/aam.js:2167
|
270 |
+
#: media/js/aam.js:2243 media/js/aam.js:2272 media/js/aam.js:2646
|
271 |
+
#: media/js/aam.js:2990 media/js/aam.js:3015
|
272 |
msgid "Application error"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: Application/Backend/View/Localization.php:31 media/js/aam.js:1355
|
276 |
msgid "Add Capability"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: Application/Backend/View/Localization.php:32 media/js/aam.js:968
|
280 |
+
#: Application/Backend/phtml/main/menu.phtml:70
|
281 |
msgid "Show Menu"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: Application/Backend/View/Localization.php:33 media/js/aam.js:978
|
285 |
+
#: Application/Backend/phtml/main/menu.phtml:74
|
286 |
msgid "Restrict Menu"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: Application/Backend/View/Localization.php:34 media/js/aam.js:1085
|
290 |
msgid "Failed to retrieve mataboxes"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: Application/Backend/View/Localization.php:35 media/js/aam.js:1706
|
294 |
msgid "Search"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: Application/Backend/View/Localization.php:36 media/js/aam.js:1707
|
298 |
msgid "_TOTAL_ object(s)"
|
299 |
msgstr ""
|
300 |
|
310 |
msgid "No Role"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: Application/Backend/View/Localization.php:40 media/js/aam.js:121
|
314 |
msgid "Search Role"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: Application/Backend/View/Localization.php:41 media/js/aam.js:122
|
318 |
msgid "_TOTAL_ role(s)"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: Application/Backend/View/Localization.php:42 media/js/aam.js:130
|
322 |
+
#: media/js/aam.js:604 Application/Backend/phtml/index.phtml:168
|
323 |
#: Application/Backend/phtml/main/capability.phtml:26
|
324 |
#: Application/Backend/phtml/main/capability.phtml:64
|
325 |
msgid "Create"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: Application/Backend/View/Localization.php:43 media/js/aam.js:154
|
329 |
+
#: Application/Backend/phtml/index.phtml:122
|
330 |
+
#: Application/Backend/phtml/index.phtml:296
|
331 |
msgid "Users"
|
332 |
msgstr ""
|
333 |
|
334 |
+
#: Application/Backend/View/Localization.php:44 media/js/aam.js:342
|
335 |
msgid "Failed to add new role"
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: Application/Backend/View/Localization.php:45 media/js/aam.js:350
|
339 |
msgid "Add Role"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: Application/Backend/View/Localization.php:46 media/js/aam.js:395
|
343 |
msgid "Failed to update role"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: Application/Backend/View/Localization.php:47 media/js/aam.js:404
|
347 |
#: Application/Backend/phtml/extensions.phtml:51
|
348 |
#: Application/Backend/phtml/extensions.phtml:78
|
349 |
+
#: Application/Backend/phtml/index.phtml:194
|
350 |
#: Application/Backend/phtml/main/capability.phtml:86
|
351 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
|
352 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
|
356 |
msgid "Update"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: Application/Backend/View/Localization.php:48 media/js/aam.js:427
|
360 |
+
#: media/js/aam.js:1422
|
361 |
msgid "Deleting..."
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: Application/Backend/View/Localization.php:49 media/js/aam.js:433
|
365 |
msgid "Failed to delete role"
|
366 |
msgstr ""
|
367 |
|
368 |
#: Application/Backend/View/Localization.php:50
|
369 |
+
#: Application/Backend/View/Localization.php:62 media/js/aam.js:252
|
370 |
+
#: media/js/aam.js:441 Application/Backend/phtml/index.phtml:206
|
371 |
msgid "Delete Role"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: Application/Backend/View/Localization.php:51 media/js/aam.js:527
|
375 |
msgid "Failed to block user"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: Application/Backend/View/Localization.php:52 media/js/aam.js:595
|
379 |
msgid "Search User"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: Application/Backend/View/Localization.php:53 media/js/aam.js:596
|
383 |
msgid "_TOTAL_ user(s)"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: Application/Backend/View/Localization.php:54 media/js/aam.js:621
|
387 |
#: Application/Backend/phtml/frame.phtml:46
|
388 |
+
#: Application/Backend/phtml/index.phtml:139
|
389 |
msgid "Role"
|
390 |
msgstr ""
|
391 |
|
392 |
#: Application/Backend/View/Localization.php:55
|
393 |
+
#: Application/Core/Subject/Visitor.php:79 media/js/aam.js:854
|
394 |
msgid "Anonymous"
|
395 |
msgstr ""
|
396 |
|
402 |
msgid "Current role"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: Application/Backend/View/Localization.php:58 media/js/aam.js:1795
|
406 |
msgid "Manage Access"
|
407 |
msgstr ""
|
408 |
|
409 |
#: Application/Backend/View/Localization.php:59
|
410 |
+
#: Application/Backend/View/PostOptionList.php:91 media/js/aam.js:1807
|
411 |
msgid "Edit"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: Application/Backend/View/Localization.php:60 media/js/aam.js:193
|
415 |
msgid "Manage Role"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: Application/Backend/View/Localization.php:61 media/js/aam.js:215
|
419 |
msgid "Edit Role"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: Application/Backend/View/Localization.php:63 media/js/aam.js:653
|
423 |
msgid "Manage User"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: Application/Backend/View/Localization.php:64 media/js/aam.js:693
|
427 |
msgid "Edit User"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: Application/Backend/View/Localization.php:65 media/js/aam.js:522
|
431 |
+
#: media/js/aam.js:523 media/js/aam.js:706
|
432 |
msgid "Lock User"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: Application/Backend/View/Localization.php:66 media/js/aam.js:516
|
436 |
+
#: media/js/aam.js:517 media/js/aam.js:719
|
437 |
msgid "Unlock User"
|
438 |
msgstr ""
|
439 |
|
546 |
msgstr ""
|
547 |
|
548 |
#: Application/Backend/View/PostOptionList.php:69
|
549 |
+
#: Application/Backend/phtml/index.phtml:245
|
550 |
msgid "Expires"
|
551 |
msgstr ""
|
552 |
|
600 |
msgstr ""
|
601 |
|
602 |
#: Application/Backend/View/PostOptionList.php:96
|
603 |
+
#: Application/Backend/phtml/index.phtml:212
|
604 |
#: Application/Backend/phtml/main/capability.phtml:104
|
605 |
msgid "Delete"
|
606 |
msgstr ""
|
625 |
msgid "AAM Secure Login Widget"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: Application/Backend/Widget/Login.php:90
|
629 |
+
#: Application/Frontend/phtml/login.phtml:27
|
630 |
msgid "Login"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: Application/Backend/Widget/Login.php:94
|
634 |
#: Application/Shortcode/Strategy/Login.php:55
|
635 |
msgid "Howdy, %username%"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: Application/Core/JwtAuth.php:58
|
639 |
+
msgid "JWT Authentication is enabled but secret key is not defined"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: Application/Core/JwtAuth.php:76
|
643 |
+
msgid "Valid username."
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: Application/Core/JwtAuth.php:80
|
647 |
+
msgid "Valid password."
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: Application/Core/Login.php:152
|
651 |
+
msgid "Access denied. Please login to get access."
|
652 |
msgstr ""
|
653 |
|
654 |
+
#: Application/Core/Subject/Default.php:78 media/js/aam.js:885
|
655 |
msgid "All Users, Roles and Visitor"
|
656 |
msgstr ""
|
657 |
|
669 |
"more.%s"
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: Application/Extension/Repository.php:326
|
673 |
#, php-format
|
674 |
msgid "Failed to create %s"
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: Application/Extension/Repository.php:330
|
678 |
#, php-format
|
679 |
msgid "Directory %s is not writable"
|
680 |
msgstr ""
|
687 |
msgid "No valid strategy found for the given context"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: aam.php:190
|
691 |
+
msgid "PHP 5.3.0 or higher is required."
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: aam.php:192
|
695 |
msgid "WP 3.8 or higher is required."
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: media/js/aam.js:231
|
699 |
msgid "Clone Role"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: media/js/aam.js:678
|
703 |
+
msgid "User Expiration"
|
704 |
+
msgstr ""
|
705 |
+
|
706 |
+
#: media/js/aam.js:732
|
707 |
msgid "Switch To User"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: media/js/aam.js:780 Application/Backend/phtml/index.phtml:259
|
711 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:107
|
712 |
+
msgid "Save"
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: media/js/aam.js:799
|
716 |
+
msgid "Reseting..."
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: media/js/aam.js:813 Application/Backend/phtml/index.phtml:258
|
720 |
+
msgid "Reset"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: media/js/aam.js:933 media/js/aam.js:2442 media/js/aam.js:2487
|
724 |
+
#: media/js/aam.js:2518 media/js/aam.js:2551 media/js/aam.js:2603
|
725 |
msgid "Application Error"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: media/js/aam.js:1002 Application/Backend/phtml/main/menu.phtml:57
|
729 |
msgid "Uncheck to allow"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: media/js/aam.js:1004 Application/Backend/phtml/main/menu.phtml:57
|
733 |
msgid "Check to restrict"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: media/js/aam.js:1111
|
737 |
msgid "Processing"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: media/js/aam.js:1119
|
741 |
msgid "Failed to initialize URL"
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: media/js/aam.js:1127 Application/Backend/phtml/main/metabox.phtml:102
|
745 |
msgid "Initialize"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: media/js/aam.js:1151 Application/Backend/phtml/main/metabox.phtml:65
|
749 |
msgid "Uncheck to show"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: media/js/aam.js:1153 Application/Backend/phtml/main/metabox.phtml:65
|
753 |
msgid "Check to hide"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: media/js/aam.js:1199
|
757 |
msgid "WordPress core does not allow to grant this capability"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: media/js/aam.js:1239
|
761 |
msgid "Nothing to show"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: media/js/aam.js:1391
|
765 |
msgid "Failed to update capability"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: media/js/aam.js:1399 Application/Backend/phtml/main/capability.phtml:76
|
769 |
msgid "Update Capability"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: media/js/aam.js:1430
|
773 |
msgid "Failed to delete capability"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: media/js/aam.js:1438 Application/Backend/phtml/main/capability.phtml:98
|
777 |
msgid "Delete Capability"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: media/js/aam.js:1781
|
781 |
msgid "Drill-Down"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: media/js/aam.js:2265
|
785 |
msgid "Extension status was updated successfully"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: media/js/aam.js:2477 media/js/aam.js:2508 media/js/aam.js:2539
|
789 |
+
#: media/js/aam.js:2592
|
790 |
msgid "Wait..."
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: media/js/aam.js:2481
|
794 |
msgid "All settings were cleared successfully"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: media/js/aam.js:2491 media/js/aam.js:2522
|
798 |
#: Application/Backend/phtml/settings/tools.phtml:66
|
799 |
msgid "Clear"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: media/js/aam.js:2512
|
803 |
msgid "The cache was cleared successfully"
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: media/js/aam.js:2599
|
807 |
msgid "Invalid data format"
|
808 |
msgstr ""
|
809 |
|
878 |
#: Application/Backend/phtml/extensions.phtml:97
|
879 |
#: Application/Backend/phtml/extensions.phtml:128
|
880 |
#: Application/Backend/phtml/extensions.phtml:139
|
881 |
+
#: Application/Backend/phtml/index.phtml:152
|
882 |
+
#: Application/Backend/phtml/index.phtml:169
|
883 |
+
#: Application/Backend/phtml/index.phtml:179
|
884 |
+
#: Application/Backend/phtml/index.phtml:195
|
885 |
+
#: Application/Backend/phtml/index.phtml:205
|
886 |
+
#: Application/Backend/phtml/index.phtml:213
|
887 |
+
#: Application/Backend/phtml/index.phtml:240
|
888 |
+
#: Application/Backend/phtml/index.phtml:260
|
889 |
#: Application/Backend/phtml/main/capability.phtml:54
|
890 |
#: Application/Backend/phtml/main/capability.phtml:65
|
891 |
#: Application/Backend/phtml/main/capability.phtml:75
|
892 |
#: Application/Backend/phtml/main/capability.phtml:87
|
893 |
#: Application/Backend/phtml/main/capability.phtml:97
|
894 |
#: Application/Backend/phtml/main/capability.phtml:105
|
895 |
+
#: Application/Backend/phtml/main/menu.phtml:98
|
896 |
#: Application/Backend/phtml/main/metabox.phtml:89
|
897 |
#: Application/Backend/phtml/main/metabox.phtml:103
|
898 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
|
964 |
msgstr ""
|
965 |
|
966 |
#: Application/Backend/phtml/frame.phtml:62
|
967 |
+
#: Application/Backend/phtml/index.phtml:227
|
968 |
msgid "Username"
|
969 |
msgstr ""
|
970 |
|
974 |
msgstr ""
|
975 |
|
976 |
#: Application/Backend/phtml/frame.phtml:75
|
977 |
+
#: Application/Backend/phtml/index.phtml:271
|
978 |
msgid "Manage Visitors"
|
979 |
msgstr ""
|
980 |
|
986 |
msgstr ""
|
987 |
|
988 |
#: Application/Backend/phtml/frame.phtml:84
|
989 |
+
#: Application/Backend/phtml/index.phtml:279
|
990 |
msgid "Manage Default Access"
|
991 |
msgstr ""
|
992 |
|
1085 |
#: Application/Backend/phtml/index.phtml:101
|
1086 |
msgid ""
|
1087 |
"Install free [AAM Multisite extension] in order to manage all your sites "
|
1088 |
+
"from the Network Admin."
|
|
|
|
|
|
|
|
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: Application/Backend/phtml/index.phtml:112
|
1092 |
msgid "Users/Roles Manager"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: Application/Backend/phtml/index.phtml:119
|
1096 |
+
#: Application/Backend/phtml/index.phtml:291
|
1097 |
msgid "Roles"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: Application/Backend/phtml/index.phtml:125
|
1101 |
+
#: Application/Backend/phtml/index.phtml:301
|
1102 |
msgid "Visitor"
|
1103 |
msgstr ""
|
1104 |
|
1105 |
+
#: Application/Backend/phtml/index.phtml:128
|
1106 |
+
#: Application/Backend/phtml/index.phtml:306
|
1107 |
msgid "Default"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
+
#: Application/Backend/phtml/index.phtml:140
|
1111 |
+
#: Application/Backend/phtml/index.phtml:228
|
1112 |
msgid "Action"
|
1113 |
msgstr ""
|
1114 |
|
1115 |
+
#: Application/Backend/phtml/index.phtml:153
|
1116 |
msgid "Create Role"
|
1117 |
msgstr ""
|
1118 |
|
1119 |
+
#: Application/Backend/phtml/index.phtml:157
|
1120 |
+
#: Application/Backend/phtml/index.phtml:184
|
1121 |
msgid "Role Name"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: Application/Backend/phtml/index.phtml:158
|
1125 |
+
#: Application/Backend/phtml/index.phtml:185
|
1126 |
msgid "Enter Role Name"
|
1127 |
msgstr ""
|
1128 |
|
1129 |
+
#: Application/Backend/phtml/index.phtml:161
|
1130 |
+
#: Application/Backend/phtml/index.phtml:188
|
1131 |
msgid "Role Expiration"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
+
#: Application/Backend/phtml/index.phtml:162
|
1135 |
+
#: Application/Backend/phtml/index.phtml:189
|
1136 |
msgid "Enter Expiration Rule"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: Application/Backend/phtml/index.phtml:180
|
1140 |
msgid "Update Role"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: Application/Backend/phtml/index.phtml:209
|
1144 |
#, php-format
|
1145 |
msgid "Are you sure that you want to delete the %s role?"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: Application/Backend/phtml/index.phtml:241
|
1149 |
+
msgid "Manage User Expiration"
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: Application/Backend/phtml/index.phtml:246
|
1153 |
+
msgid "Enter Expiration"
|
1154 |
+
msgstr ""
|
1155 |
+
|
1156 |
+
#: Application/Backend/phtml/index.phtml:249
|
1157 |
+
msgid "Action After Expiration"
|
1158 |
+
msgstr ""
|
1159 |
+
|
1160 |
+
#: Application/Backend/phtml/index.phtml:251
|
1161 |
+
msgid "Select Action"
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: Application/Backend/phtml/index.phtml:252
|
1165 |
+
msgid "Delete Account"
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: Application/Backend/phtml/index.phtml:253
|
1169 |
+
msgid "Lock Account"
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: Application/Backend/phtml/index.phtml:270
|
1173 |
msgid ""
|
1174 |
"Manage access to your website for visitors (any user that is not "
|
1175 |
"authenticated)"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
+
#: Application/Backend/phtml/index.phtml:278
|
1179 |
msgid ""
|
1180 |
"Manage default access to your website resources for all users, roles and "
|
1181 |
"visitor. This includes Administrator role and your user"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: Application/Backend/phtml/index.phtml:287
|
1185 |
msgid ""
|
1186 |
"Manage access for your users, roles and visitors. Be careful with "
|
1187 |
"[Administrator] role as well as your admin user. [Database backup is "
|
1188 |
"strongly recommended]."
|
1189 |
msgstr ""
|
1190 |
|
1191 |
+
#: Application/Backend/phtml/index.phtml:292
|
1192 |
msgid ""
|
1193 |
"With Roles tab you can manage access for any defined role, edit role's name, "
|
1194 |
"create new role or even delete existing (but only when there is no users "
|
1195 |
"assigned to it). You are not allowed to delete Administrator role."
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: Application/Backend/phtml/index.phtml:297
|
1199 |
msgid ""
|
1200 |
"Manage access for any user. As a bonus feature, you can block user. It means "
|
1201 |
"that user will be not able to login to your website anymore."
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: Application/Backend/phtml/index.phtml:302
|
1205 |
msgid ""
|
1206 |
"Visitor can be considered any user that is not authenticated to your website."
|
1207 |
msgstr ""
|
1208 |
|
1209 |
+
#: Application/Backend/phtml/index.phtml:307
|
1210 |
msgid ""
|
1211 |
"Manage default access settings to your website resources for all users, "
|
1212 |
"roles and visitors."
|
1379 |
msgstr ""
|
1380 |
|
1381 |
#: Application/Backend/phtml/main/menu.phtml:87
|
1382 |
+
msgid ""
|
1383 |
+
"Current user does not have enough capabilities to access any available "
|
1384 |
+
"dashboard page."
|
1385 |
+
msgstr ""
|
1386 |
+
|
1387 |
+
#: Application/Backend/phtml/main/menu.phtml:99
|
1388 |
msgid "Dashboard Lockdown"
|
1389 |
msgstr ""
|
1390 |
|
1391 |
+
#: Application/Backend/phtml/main/menu.phtml:103
|
1392 |
msgid "You cannot restrict access to Dashboard home page."
|
1393 |
msgstr ""
|
1394 |
|
1395 |
+
#: Application/Backend/phtml/main/menu.phtml:104
|
1396 |
#, php-format
|
1397 |
msgid ""
|
1398 |
"The [Home] is the default page every user is redirected after login. To "
|
1400 |
"WordPress backend%s article."
|
1401 |
msgstr ""
|
1402 |
|
1403 |
+
#: Application/Backend/phtml/main/menu.phtml:108
|
1404 |
msgid "OK"
|
1405 |
msgstr ""
|
1406 |
|
1612 |
msgid "Enter your teaser"
|
1613 |
msgstr ""
|
1614 |
|
|
|
|
|
|
|
|
|
1615 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:119
|
1616 |
msgid "E-Commerce Setup"
|
1617 |
msgstr ""
|
1719 |
"please check %sthis article%s."
|
1720 |
msgstr ""
|
1721 |
|
1722 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:49
|
1723 |
+
#: Application/Frontend/phtml/login.phtml:35
|
1724 |
+
msgid "Register"
|
1725 |
+
msgstr ""
|
1726 |
+
|
1727 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:54
|
1728 |
#: Application/Frontend/phtml/login.phtml:40
|
1729 |
+
msgid "Lost your password?"
|
1730 |
+
msgstr ""
|
1731 |
+
|
1732 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:64
|
1733 |
+
#: Application/Frontend/phtml/login.phtml:51
|
1734 |
msgid "Dashboard"
|
1735 |
msgstr ""
|
1736 |
|
1737 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:65
|
1738 |
+
#: Application/Frontend/phtml/login.phtml:52
|
1739 |
msgid "Edit My Profile"
|
1740 |
msgstr ""
|
1741 |
|
1742 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:67
|
1743 |
+
#: Application/Frontend/phtml/login.phtml:54
|
1744 |
msgid "Log Out"
|
1745 |
msgstr ""
|
1746 |
|
1748 |
msgid "Username or Email Address"
|
1749 |
msgstr ""
|
1750 |
|
1751 |
+
#: Application/Frontend/phtml/login.phtml:22
|
1752 |
msgid "Remember Me"
|
1753 |
msgstr ""
|
|
|
|
|
|
|
|
Lang/advanced-access-manager.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: AAM\n"
|
5 |
-
"POT-Creation-Date:
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: WPAAM <support@wpaam.com>\n"
|
8 |
"Language-Team: WP AAM <vasyl@vasyltech.com>\n"
|
@@ -10,19 +10,18 @@ msgstr ""
|
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 2.0.
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
"X-Poedit-KeywordsList: __;preparePhrase\n"
|
17 |
"X-Poedit-Basepath: ..\n"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
|
20 |
-
#: Application/Backend/Feature/Extension/Manager.php:
|
21 |
-
|
22 |
-
msgid "To install extension manually, check %sthis article%s."
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: Application/Backend/Feature/Extension/Manager.php:
|
26 |
msgid "Enter license key to update extension."
|
27 |
msgstr ""
|
28 |
|
@@ -78,11 +77,11 @@ msgstr ""
|
|
78 |
msgid "Logout Redirect"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: Application/Backend/Feature/Main/Menu.php:
|
82 |
msgid "Backend Menu"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: Application/Backend/Feature/Main/Metabox.php:
|
86 |
msgid "Metaboxes & Widgets"
|
87 |
msgstr ""
|
88 |
|
@@ -90,6 +89,10 @@ msgstr ""
|
|
90 |
msgid "Access Denied Redirect"
|
91 |
msgstr ""
|
92 |
|
|
|
|
|
|
|
|
|
93 |
#: Application/Backend/Feature/Settings/Content.php:32
|
94 |
msgid "Media Files Access Control"
|
95 |
msgstr ""
|
@@ -194,7 +197,20 @@ msgid ""
|
|
194 |
"website security."
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: Application/Backend/Feature/Settings/Core.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
msgid "Core Settings"
|
199 |
msgstr ""
|
200 |
|
@@ -202,71 +218,84 @@ msgstr ""
|
|
202 |
msgid "Tools"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: Application/Backend/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
msgid "Access Manager"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: Application/Backend/Manager.php:
|
210 |
-
#: Application/Backend/Manager.php:
|
211 |
msgid "Access"
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: Application/Backend/Manager.php:
|
215 |
#: Application/Core/API.php:247
|
216 |
msgid "Access Denied"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: Application/Backend/View/Localization.php:26 media/js/aam.js:
|
220 |
msgid "Search Capability"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: Application/Backend/View/Localization.php:27 media/js/aam.js:
|
224 |
msgid "_TOTAL_ capability(s)"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: Application/Backend/View/Localization.php:28 media/js/aam.js:
|
228 |
-
#: media/js/aam.js:
|
229 |
-
#: media/js/aam.js:
|
230 |
msgid "Saving..."
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: Application/Backend/View/Localization.php:29 media/js/aam.js:
|
234 |
msgid "Failed to add new capability"
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: Application/Backend/View/Localization.php:30 media/js/aam.js:
|
238 |
-
#: media/js/aam.js:
|
239 |
-
#: media/js/aam.js:
|
240 |
-
#: media/js/aam.js:
|
241 |
-
#: media/js/aam.js:
|
242 |
-
#: media/js/aam.js:
|
243 |
-
#: media/js/aam.js:
|
|
|
244 |
msgid "Application error"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: Application/Backend/View/Localization.php:31 media/js/aam.js:
|
248 |
msgid "Add Capability"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: Application/Backend/View/Localization.php:32 media/js/aam.js:
|
252 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
253 |
msgid "Show Menu"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: Application/Backend/View/Localization.php:33 media/js/aam.js:
|
257 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
258 |
msgid "Restrict Menu"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: Application/Backend/View/Localization.php:34 media/js/aam.js:
|
262 |
msgid "Failed to retrieve mataboxes"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: Application/Backend/View/Localization.php:35 media/js/aam.js:
|
266 |
msgid "Search"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: Application/Backend/View/Localization.php:36 media/js/aam.js:
|
270 |
msgid "_TOTAL_ object(s)"
|
271 |
msgstr ""
|
272 |
|
@@ -282,43 +311,43 @@ msgstr ""
|
|
282 |
msgid "No Role"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: Application/Backend/View/Localization.php:40 media/js/aam.js:
|
286 |
msgid "Search Role"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: Application/Backend/View/Localization.php:41 media/js/aam.js:
|
290 |
msgid "_TOTAL_ role(s)"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: Application/Backend/View/Localization.php:42 media/js/aam.js:
|
294 |
-
#: media/js/aam.js:
|
295 |
#: Application/Backend/phtml/main/capability.phtml:26
|
296 |
#: Application/Backend/phtml/main/capability.phtml:64
|
297 |
msgid "Create"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: Application/Backend/View/Localization.php:43 media/js/aam.js:
|
301 |
-
#: Application/Backend/phtml/index.phtml:
|
302 |
-
#: Application/Backend/phtml/index.phtml:
|
303 |
msgid "Users"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: Application/Backend/View/Localization.php:44 media/js/aam.js:
|
307 |
msgid "Failed to add new role"
|
308 |
msgstr ""
|
309 |
|
310 |
-
#: Application/Backend/View/Localization.php:45 media/js/aam.js:
|
311 |
msgid "Add Role"
|
312 |
msgstr ""
|
313 |
|
314 |
-
#: Application/Backend/View/Localization.php:46 media/js/aam.js:
|
315 |
msgid "Failed to update role"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: Application/Backend/View/Localization.php:47 media/js/aam.js:
|
319 |
#: Application/Backend/phtml/extensions.phtml:51
|
320 |
#: Application/Backend/phtml/extensions.phtml:78
|
321 |
-
#: Application/Backend/phtml/index.phtml:
|
322 |
#: Application/Backend/phtml/main/capability.phtml:86
|
323 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
|
324 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
|
@@ -328,41 +357,41 @@ msgstr ""
|
|
328 |
msgid "Update"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: Application/Backend/View/Localization.php:48 media/js/aam.js:
|
332 |
-
#: media/js/aam.js:
|
333 |
msgid "Deleting..."
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: Application/Backend/View/Localization.php:49 media/js/aam.js:
|
337 |
msgid "Failed to delete role"
|
338 |
msgstr ""
|
339 |
|
340 |
#: Application/Backend/View/Localization.php:50
|
341 |
-
#: Application/Backend/View/Localization.php:62 media/js/aam.js:
|
342 |
-
#: media/js/aam.js:
|
343 |
msgid "Delete Role"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: Application/Backend/View/Localization.php:51 media/js/aam.js:
|
347 |
msgid "Failed to block user"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: Application/Backend/View/Localization.php:52 media/js/aam.js:
|
351 |
msgid "Search User"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: Application/Backend/View/Localization.php:53 media/js/aam.js:
|
355 |
msgid "_TOTAL_ user(s)"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: Application/Backend/View/Localization.php:54 media/js/aam.js:
|
359 |
#: Application/Backend/phtml/frame.phtml:46
|
360 |
-
#: Application/Backend/phtml/index.phtml:
|
361 |
msgid "Role"
|
362 |
msgstr ""
|
363 |
|
364 |
#: Application/Backend/View/Localization.php:55
|
365 |
-
#: Application/Core/Subject/Visitor.php:79 media/js/aam.js:
|
366 |
msgid "Anonymous"
|
367 |
msgstr ""
|
368 |
|
@@ -374,38 +403,38 @@ msgstr ""
|
|
374 |
msgid "Current role"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: Application/Backend/View/Localization.php:58 media/js/aam.js:
|
378 |
msgid "Manage Access"
|
379 |
msgstr ""
|
380 |
|
381 |
#: Application/Backend/View/Localization.php:59
|
382 |
-
#: Application/Backend/View/PostOptionList.php:91 media/js/aam.js:
|
383 |
msgid "Edit"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: Application/Backend/View/Localization.php:60 media/js/aam.js:
|
387 |
msgid "Manage Role"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: Application/Backend/View/Localization.php:61 media/js/aam.js:
|
391 |
msgid "Edit Role"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: Application/Backend/View/Localization.php:63 media/js/aam.js:
|
395 |
msgid "Manage User"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: Application/Backend/View/Localization.php:64 media/js/aam.js:
|
399 |
msgid "Edit User"
|
400 |
msgstr ""
|
401 |
|
402 |
-
#: Application/Backend/View/Localization.php:65 media/js/aam.js:
|
403 |
-
#: media/js/aam.js:
|
404 |
msgid "Lock User"
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: Application/Backend/View/Localization.php:66 media/js/aam.js:
|
408 |
-
#: media/js/aam.js:
|
409 |
msgid "Unlock User"
|
410 |
msgstr ""
|
411 |
|
@@ -518,6 +547,7 @@ msgid "Access Expiration"
|
|
518 |
msgstr ""
|
519 |
|
520 |
#: Application/Backend/View/PostOptionList.php:69
|
|
|
521 |
msgid "Expires"
|
522 |
msgstr ""
|
523 |
|
@@ -571,7 +601,7 @@ msgid ""
|
|
571 |
msgstr ""
|
572 |
|
573 |
#: Application/Backend/View/PostOptionList.php:96
|
574 |
-
#: Application/Backend/phtml/index.phtml:
|
575 |
#: Application/Backend/phtml/main/capability.phtml:104
|
576 |
msgid "Delete"
|
577 |
msgstr ""
|
@@ -596,25 +626,33 @@ msgstr ""
|
|
596 |
msgid "AAM Secure Login Widget"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: Application/Backend/Widget/Login.php:
|
600 |
-
#: Application/Frontend/phtml/login.phtml:
|
601 |
msgid "Login"
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: Application/Backend/Widget/Login.php:
|
605 |
#: Application/Shortcode/Strategy/Login.php:55
|
606 |
msgid "Howdy, %username%"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: Application/Core/
|
610 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: Application/Core/Login.php:
|
614 |
-
msgid "
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: Application/Core/Subject/Default.php:78 media/js/aam.js:
|
618 |
msgid "All Users, Roles and Visitor"
|
619 |
msgstr ""
|
620 |
|
@@ -632,12 +670,12 @@ msgid ""
|
|
632 |
"more.%s"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: Application/Extension/Repository.php:
|
636 |
#, php-format
|
637 |
msgid "Failed to create %s"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: Application/Extension/Repository.php:
|
641 |
#, php-format
|
642 |
msgid "Directory %s is not writable"
|
643 |
msgstr ""
|
@@ -650,106 +688,123 @@ msgstr ""
|
|
650 |
msgid "No valid strategy found for the given context"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: aam.php:
|
654 |
-
msgid "PHP 5.
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: aam.php:
|
658 |
msgid "WP 3.8 or higher is required."
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: media/js/aam.js:
|
662 |
msgid "Clone Role"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: media/js/aam.js:
|
|
|
|
|
|
|
|
|
666 |
msgid "Switch To User"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: media/js/aam.js:
|
670 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
msgid "Application Error"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: media/js/aam.js:
|
675 |
msgid "Uncheck to allow"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: media/js/aam.js:
|
679 |
msgid "Check to restrict"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: media/js/aam.js:
|
683 |
msgid "Processing"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: media/js/aam.js:
|
687 |
msgid "Failed to initialize URL"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: media/js/aam.js:
|
691 |
msgid "Initialize"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: media/js/aam.js:
|
695 |
msgid "Uncheck to show"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: media/js/aam.js:
|
699 |
msgid "Check to hide"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: media/js/aam.js:
|
703 |
msgid "WordPress core does not allow to grant this capability"
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: media/js/aam.js:
|
707 |
msgid "Nothing to show"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: media/js/aam.js:
|
711 |
msgid "Failed to update capability"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: media/js/aam.js:
|
715 |
msgid "Update Capability"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: media/js/aam.js:
|
719 |
msgid "Failed to delete capability"
|
720 |
msgstr ""
|
721 |
|
722 |
-
#: media/js/aam.js:
|
723 |
msgid "Delete Capability"
|
724 |
msgstr ""
|
725 |
|
726 |
-
#: media/js/aam.js:
|
727 |
msgid "Drill-Down"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: media/js/aam.js:
|
731 |
msgid "Extension status was updated successfully"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: media/js/aam.js:
|
735 |
-
#: media/js/aam.js:
|
736 |
msgid "Wait..."
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: media/js/aam.js:
|
740 |
msgid "All settings were cleared successfully"
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: media/js/aam.js:
|
744 |
#: Application/Backend/phtml/settings/tools.phtml:66
|
745 |
msgid "Clear"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: media/js/aam.js:
|
749 |
msgid "The cache was cleared successfully"
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: media/js/aam.js:
|
753 |
msgid "Invalid data format"
|
754 |
msgstr ""
|
755 |
|
@@ -824,19 +879,21 @@ msgstr ""
|
|
824 |
#: Application/Backend/phtml/extensions.phtml:97
|
825 |
#: Application/Backend/phtml/extensions.phtml:128
|
826 |
#: Application/Backend/phtml/extensions.phtml:139
|
827 |
-
#: Application/Backend/phtml/index.phtml:
|
828 |
-
#: Application/Backend/phtml/index.phtml:
|
829 |
-
#: Application/Backend/phtml/index.phtml:
|
830 |
-
#: Application/Backend/phtml/index.phtml:
|
831 |
-
#: Application/Backend/phtml/index.phtml:
|
832 |
-
#: Application/Backend/phtml/index.phtml:
|
|
|
|
|
833 |
#: Application/Backend/phtml/main/capability.phtml:54
|
834 |
#: Application/Backend/phtml/main/capability.phtml:65
|
835 |
#: Application/Backend/phtml/main/capability.phtml:75
|
836 |
#: Application/Backend/phtml/main/capability.phtml:87
|
837 |
#: Application/Backend/phtml/main/capability.phtml:97
|
838 |
#: Application/Backend/phtml/main/capability.phtml:105
|
839 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
840 |
#: Application/Backend/phtml/main/metabox.phtml:89
|
841 |
#: Application/Backend/phtml/main/metabox.phtml:103
|
842 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
|
@@ -908,7 +965,7 @@ msgid ""
|
|
908 |
msgstr ""
|
909 |
|
910 |
#: Application/Backend/phtml/frame.phtml:62
|
911 |
-
#: Application/Backend/phtml/index.phtml:
|
912 |
msgid "Username"
|
913 |
msgstr ""
|
914 |
|
@@ -918,7 +975,7 @@ msgid "Manage access to %s for visitors (any user that is not authenticated)"
|
|
918 |
msgstr ""
|
919 |
|
920 |
#: Application/Backend/phtml/frame.phtml:75
|
921 |
-
#: Application/Backend/phtml/index.phtml:
|
922 |
msgid "Manage Visitors"
|
923 |
msgstr ""
|
924 |
|
@@ -930,7 +987,7 @@ msgid ""
|
|
930 |
msgstr ""
|
931 |
|
932 |
#: Application/Backend/phtml/frame.phtml:84
|
933 |
-
#: Application/Backend/phtml/index.phtml:
|
934 |
msgid "Manage Default Access"
|
935 |
msgstr ""
|
936 |
|
@@ -1029,108 +1086,128 @@ msgstr ""
|
|
1029 |
#: Application/Backend/phtml/index.phtml:101
|
1030 |
msgid ""
|
1031 |
"Install free [AAM Multisite extension] in order to manage all your sites "
|
1032 |
-
"from Network Admin"
|
1033 |
-
msgstr ""
|
1034 |
-
|
1035 |
-
#: Application/Backend/phtml/index.phtml:102
|
1036 |
-
msgid "Install AAM Multisite"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: Application/Backend/phtml/index.phtml:
|
1040 |
msgid "Users/Roles Manager"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: Application/Backend/phtml/index.phtml:
|
1044 |
-
#: Application/Backend/phtml/index.phtml:
|
1045 |
msgid "Roles"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: Application/Backend/phtml/index.phtml:
|
1049 |
-
#: Application/Backend/phtml/index.phtml:
|
1050 |
msgid "Visitor"
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: Application/Backend/phtml/index.phtml:
|
1054 |
-
#: Application/Backend/phtml/index.phtml:
|
1055 |
msgid "Default"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
-
#: Application/Backend/phtml/index.phtml:
|
1059 |
-
#: Application/Backend/phtml/index.phtml:
|
1060 |
msgid "Action"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
-
#: Application/Backend/phtml/index.phtml:
|
1064 |
msgid "Create Role"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: Application/Backend/phtml/index.phtml:
|
1068 |
-
#: Application/Backend/phtml/index.phtml:
|
1069 |
msgid "Role Name"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: Application/Backend/phtml/index.phtml:
|
1073 |
-
#: Application/Backend/phtml/index.phtml:
|
1074 |
msgid "Enter Role Name"
|
1075 |
msgstr ""
|
1076 |
|
1077 |
-
#: Application/Backend/phtml/index.phtml:
|
1078 |
-
#: Application/Backend/phtml/index.phtml:
|
1079 |
msgid "Role Expiration"
|
1080 |
msgstr ""
|
1081 |
|
1082 |
-
#: Application/Backend/phtml/index.phtml:
|
1083 |
-
#: Application/Backend/phtml/index.phtml:
|
1084 |
msgid "Enter Expiration Rule"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#: Application/Backend/phtml/index.phtml:
|
1088 |
msgid "Update Role"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#: Application/Backend/phtml/index.phtml:
|
1092 |
#, php-format
|
1093 |
msgid "Are you sure that you want to delete the %s role?"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: Application/Backend/phtml/index.phtml:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1097 |
msgid ""
|
1098 |
"Manage access to your website for visitors (any user that is not "
|
1099 |
"authenticated)"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
-
#: Application/Backend/phtml/index.phtml:
|
1103 |
msgid ""
|
1104 |
"Manage default access to your website resources for all users, roles and "
|
1105 |
"visitor. This includes Administrator role and your user"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
-
#: Application/Backend/phtml/index.phtml:
|
1109 |
msgid ""
|
1110 |
"Manage access for your users, roles and visitors. Be careful with "
|
1111 |
"[Administrator] role as well as your admin user. [Database backup is "
|
1112 |
"strongly recommended]."
|
1113 |
msgstr ""
|
1114 |
|
1115 |
-
#: Application/Backend/phtml/index.phtml:
|
1116 |
msgid ""
|
1117 |
"With Roles tab you can manage access for any defined role, edit role's name, "
|
1118 |
"create new role or even delete existing (but only when there is no users "
|
1119 |
"assigned to it). You are not allowed to delete Administrator role."
|
1120 |
msgstr ""
|
1121 |
|
1122 |
-
#: Application/Backend/phtml/index.phtml:
|
1123 |
msgid ""
|
1124 |
"Manage access for any user. As a bonus feature, you can block user. It means "
|
1125 |
"that user will be not able to login to your website anymore."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: Application/Backend/phtml/index.phtml:
|
1129 |
msgid ""
|
1130 |
"Visitor can be considered any user that is not authenticated to your website."
|
1131 |
msgstr ""
|
1132 |
|
1133 |
-
#: Application/Backend/phtml/index.phtml:
|
1134 |
msgid ""
|
1135 |
"Manage default access settings to your website resources for all users, "
|
1136 |
"roles and visitors."
|
@@ -1303,14 +1380,20 @@ msgid ""
|
|
1303 |
msgstr ""
|
1304 |
|
1305 |
#: Application/Backend/phtml/main/menu.phtml:87
|
|
|
|
|
|
|
|
|
|
|
|
|
1306 |
msgid "Dashboard Lockdown"
|
1307 |
msgstr ""
|
1308 |
|
1309 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
1310 |
msgid "You cannot restrict access to Dashboard home page."
|
1311 |
msgstr ""
|
1312 |
|
1313 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
1314 |
#, php-format
|
1315 |
msgid ""
|
1316 |
"The [Home] is the default page every user is redirected after login. To "
|
@@ -1318,7 +1401,7 @@ msgid ""
|
|
1318 |
"WordPress backend%s article."
|
1319 |
msgstr ""
|
1320 |
|
1321 |
-
#: Application/Backend/phtml/main/menu.phtml:
|
1322 |
msgid "OK"
|
1323 |
msgstr ""
|
1324 |
|
@@ -1530,10 +1613,6 @@ msgstr ""
|
|
1530 |
msgid "Enter your teaser"
|
1531 |
msgstr ""
|
1532 |
|
1533 |
-
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:107
|
1534 |
-
msgid "Save"
|
1535 |
-
msgstr ""
|
1536 |
-
|
1537 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:119
|
1538 |
msgid "E-Commerce Setup"
|
1539 |
msgstr ""
|
@@ -1641,18 +1720,28 @@ msgid ""
|
|
1641 |
"please check %sthis article%s."
|
1642 |
msgstr ""
|
1643 |
|
1644 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
|
|
|
|
|
|
|
|
|
|
1645 |
#: Application/Frontend/phtml/login.phtml:40
|
|
|
|
|
|
|
|
|
|
|
1646 |
msgid "Dashboard"
|
1647 |
msgstr ""
|
1648 |
|
1649 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1650 |
-
#: Application/Frontend/phtml/login.phtml:
|
1651 |
msgid "Edit My Profile"
|
1652 |
msgstr ""
|
1653 |
|
1654 |
-
#: Application/Backend/phtml/widget/login-frontend.phtml:
|
1655 |
-
#: Application/Frontend/phtml/login.phtml:
|
1656 |
msgid "Log Out"
|
1657 |
msgstr ""
|
1658 |
|
@@ -1660,10 +1749,6 @@ msgstr ""
|
|
1660 |
msgid "Username or Email Address"
|
1661 |
msgstr ""
|
1662 |
|
1663 |
-
#: Application/Frontend/phtml/login.phtml:
|
1664 |
msgid "Remember Me"
|
1665 |
msgstr ""
|
1666 |
-
|
1667 |
-
#: Application/Frontend/phtml/login.phtml:31
|
1668 |
-
msgid "Lost your password?"
|
1669 |
-
msgstr ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: AAM\n"
|
5 |
+
"POT-Creation-Date: 2018-03-20 18:40-0400\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: WPAAM <support@wpaam.com>\n"
|
8 |
"Language-Team: WP AAM <vasyl@vasyltech.com>\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.0.6\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
"X-Poedit-KeywordsList: __;preparePhrase\n"
|
17 |
"X-Poedit-Basepath: ..\n"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
|
20 |
+
#: Application/Backend/Feature/Extension/Manager.php:59
|
21 |
+
msgid "You may try to install extension manually."
|
|
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: Application/Backend/Feature/Extension/Manager.php:108
|
25 |
msgid "Enter license key to update extension."
|
26 |
msgstr ""
|
27 |
|
77 |
msgid "Logout Redirect"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: Application/Backend/Feature/Main/Menu.php:197
|
81 |
msgid "Backend Menu"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: Application/Backend/Feature/Main/Metabox.php:241
|
85 |
msgid "Metaboxes & Widgets"
|
86 |
msgstr ""
|
87 |
|
89 |
msgid "Access Denied Redirect"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: Application/Backend/Feature/Settings/ConfigPress.php:53
|
93 |
+
msgid "ConfigPress"
|
94 |
+
msgstr ""
|
95 |
+
|
96 |
#: Application/Backend/Feature/Settings/Content.php:32
|
97 |
msgid "Media Files Access Control"
|
98 |
msgstr ""
|
197 |
"website security."
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: Application/Backend/Feature/Settings/Core.php:62
|
201 |
+
msgid "JWT Authentication"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: Application/Backend/Feature/Settings/Core.php:63
|
205 |
+
#, php-format
|
206 |
+
msgid ""
|
207 |
+
"[Note!] PHP 5.4 or higher is required for this feature. Enable the ability "
|
208 |
+
"to authenticate user with WordPress RESTfull API and JWT token. For more "
|
209 |
+
"information, check %sHow to authenticate WordPress user with JWT token%s "
|
210 |
+
"article"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: Application/Backend/Feature/Settings/Core.php:82
|
214 |
msgid "Core Settings"
|
215 |
msgstr ""
|
216 |
|
218 |
msgid "Tools"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: Application/Backend/Feature/Subject/User.php:63
|
222 |
+
msgid "Operation is not permitted"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: Application/Backend/Feature/Subject/User.php:77
|
226 |
+
msgid "You cannot set expiration to yourself"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: Application/Backend/Manager.php:119
|
230 |
+
msgid "AAM requires PHP version 5.3.0 or higher to function properly"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: Application/Backend/Manager.php:357
|
234 |
msgid "Access Manager"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: Application/Backend/Manager.php:444 Application/Backend/Manager.php:462
|
238 |
+
#: Application/Backend/Manager.php:485
|
239 |
msgid "Access"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: Application/Backend/Manager.php:635 Application/Backend/Manager.php:658
|
243 |
#: Application/Core/API.php:247
|
244 |
msgid "Access Denied"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: Application/Backend/View/Localization.php:26 media/js/aam.js:1236
|
248 |
msgid "Search Capability"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: Application/Backend/View/Localization.php:27 media/js/aam.js:1237
|
252 |
msgid "_TOTAL_ capability(s)"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: Application/Backend/View/Localization.php:28 media/js/aam.js:327
|
256 |
+
#: media/js/aam.js:388 media/js/aam.js:766 media/js/aam.js:1339
|
257 |
+
#: media/js/aam.js:1383 media/js/aam.js:1901
|
258 |
msgid "Saving..."
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: Application/Backend/View/Localization.php:29 media/js/aam.js:1347
|
262 |
msgid "Failed to add new capability"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: Application/Backend/View/Localization.php:30 media/js/aam.js:347
|
266 |
+
#: media/js/aam.js:400 media/js/aam.js:437 media/js/aam.js:531
|
267 |
+
#: media/js/aam.js:563 media/js/aam.js:776 media/js/aam.js:809
|
268 |
+
#: media/js/aam.js:1054 media/js/aam.js:1090 media/js/aam.js:1124
|
269 |
+
#: media/js/aam.js:1352 media/js/aam.js:1396 media/js/aam.js:1435
|
270 |
+
#: media/js/aam.js:1518 media/js/aam.js:1663 media/js/aam.js:2167
|
271 |
+
#: media/js/aam.js:2243 media/js/aam.js:2272 media/js/aam.js:2646
|
272 |
+
#: media/js/aam.js:2990 media/js/aam.js:3015
|
273 |
msgid "Application error"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: Application/Backend/View/Localization.php:31 media/js/aam.js:1355
|
277 |
msgid "Add Capability"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: Application/Backend/View/Localization.php:32 media/js/aam.js:968
|
281 |
+
#: Application/Backend/phtml/main/menu.phtml:70
|
282 |
msgid "Show Menu"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: Application/Backend/View/Localization.php:33 media/js/aam.js:978
|
286 |
+
#: Application/Backend/phtml/main/menu.phtml:74
|
287 |
msgid "Restrict Menu"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: Application/Backend/View/Localization.php:34 media/js/aam.js:1085
|
291 |
msgid "Failed to retrieve mataboxes"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: Application/Backend/View/Localization.php:35 media/js/aam.js:1706
|
295 |
msgid "Search"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: Application/Backend/View/Localization.php:36 media/js/aam.js:1707
|
299 |
msgid "_TOTAL_ object(s)"
|
300 |
msgstr ""
|
301 |
|
311 |
msgid "No Role"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: Application/Backend/View/Localization.php:40 media/js/aam.js:121
|
315 |
msgid "Search Role"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: Application/Backend/View/Localization.php:41 media/js/aam.js:122
|
319 |
msgid "_TOTAL_ role(s)"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: Application/Backend/View/Localization.php:42 media/js/aam.js:130
|
323 |
+
#: media/js/aam.js:604 Application/Backend/phtml/index.phtml:168
|
324 |
#: Application/Backend/phtml/main/capability.phtml:26
|
325 |
#: Application/Backend/phtml/main/capability.phtml:64
|
326 |
msgid "Create"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: Application/Backend/View/Localization.php:43 media/js/aam.js:154
|
330 |
+
#: Application/Backend/phtml/index.phtml:122
|
331 |
+
#: Application/Backend/phtml/index.phtml:296
|
332 |
msgid "Users"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: Application/Backend/View/Localization.php:44 media/js/aam.js:342
|
336 |
msgid "Failed to add new role"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: Application/Backend/View/Localization.php:45 media/js/aam.js:350
|
340 |
msgid "Add Role"
|
341 |
msgstr ""
|
342 |
|
343 |
+
#: Application/Backend/View/Localization.php:46 media/js/aam.js:395
|
344 |
msgid "Failed to update role"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: Application/Backend/View/Localization.php:47 media/js/aam.js:404
|
348 |
#: Application/Backend/phtml/extensions.phtml:51
|
349 |
#: Application/Backend/phtml/extensions.phtml:78
|
350 |
+
#: Application/Backend/phtml/index.phtml:194
|
351 |
#: Application/Backend/phtml/main/capability.phtml:86
|
352 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:16
|
353 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:37
|
357 |
msgid "Update"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: Application/Backend/View/Localization.php:48 media/js/aam.js:427
|
361 |
+
#: media/js/aam.js:1422
|
362 |
msgid "Deleting..."
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: Application/Backend/View/Localization.php:49 media/js/aam.js:433
|
366 |
msgid "Failed to delete role"
|
367 |
msgstr ""
|
368 |
|
369 |
#: Application/Backend/View/Localization.php:50
|
370 |
+
#: Application/Backend/View/Localization.php:62 media/js/aam.js:252
|
371 |
+
#: media/js/aam.js:441 Application/Backend/phtml/index.phtml:206
|
372 |
msgid "Delete Role"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: Application/Backend/View/Localization.php:51 media/js/aam.js:527
|
376 |
msgid "Failed to block user"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: Application/Backend/View/Localization.php:52 media/js/aam.js:595
|
380 |
msgid "Search User"
|
381 |
msgstr ""
|
382 |
|
383 |
+
#: Application/Backend/View/Localization.php:53 media/js/aam.js:596
|
384 |
msgid "_TOTAL_ user(s)"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: Application/Backend/View/Localization.php:54 media/js/aam.js:621
|
388 |
#: Application/Backend/phtml/frame.phtml:46
|
389 |
+
#: Application/Backend/phtml/index.phtml:139
|
390 |
msgid "Role"
|
391 |
msgstr ""
|
392 |
|
393 |
#: Application/Backend/View/Localization.php:55
|
394 |
+
#: Application/Core/Subject/Visitor.php:79 media/js/aam.js:854
|
395 |
msgid "Anonymous"
|
396 |
msgstr ""
|
397 |
|
403 |
msgid "Current role"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: Application/Backend/View/Localization.php:58 media/js/aam.js:1795
|
407 |
msgid "Manage Access"
|
408 |
msgstr ""
|
409 |
|
410 |
#: Application/Backend/View/Localization.php:59
|
411 |
+
#: Application/Backend/View/PostOptionList.php:91 media/js/aam.js:1807
|
412 |
msgid "Edit"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: Application/Backend/View/Localization.php:60 media/js/aam.js:193
|
416 |
msgid "Manage Role"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: Application/Backend/View/Localization.php:61 media/js/aam.js:215
|
420 |
msgid "Edit Role"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: Application/Backend/View/Localization.php:63 media/js/aam.js:653
|
424 |
msgid "Manage User"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: Application/Backend/View/Localization.php:64 media/js/aam.js:693
|
428 |
msgid "Edit User"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: Application/Backend/View/Localization.php:65 media/js/aam.js:522
|
432 |
+
#: media/js/aam.js:523 media/js/aam.js:706
|
433 |
msgid "Lock User"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: Application/Backend/View/Localization.php:66 media/js/aam.js:516
|
437 |
+
#: media/js/aam.js:517 media/js/aam.js:719
|
438 |
msgid "Unlock User"
|
439 |
msgstr ""
|
440 |
|
547 |
msgstr ""
|
548 |
|
549 |
#: Application/Backend/View/PostOptionList.php:69
|
550 |
+
#: Application/Backend/phtml/index.phtml:245
|
551 |
msgid "Expires"
|
552 |
msgstr ""
|
553 |
|
601 |
msgstr ""
|
602 |
|
603 |
#: Application/Backend/View/PostOptionList.php:96
|
604 |
+
#: Application/Backend/phtml/index.phtml:212
|
605 |
#: Application/Backend/phtml/main/capability.phtml:104
|
606 |
msgid "Delete"
|
607 |
msgstr ""
|
626 |
msgid "AAM Secure Login Widget"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: Application/Backend/Widget/Login.php:90
|
630 |
+
#: Application/Frontend/phtml/login.phtml:27
|
631 |
msgid "Login"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: Application/Backend/Widget/Login.php:94
|
635 |
#: Application/Shortcode/Strategy/Login.php:55
|
636 |
msgid "Howdy, %username%"
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: Application/Core/JwtAuth.php:58
|
640 |
+
msgid "JWT Authentication is enabled but secret key is not defined"
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: Application/Core/JwtAuth.php:76
|
644 |
+
msgid "Valid username."
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: Application/Core/JwtAuth.php:80
|
648 |
+
msgid "Valid password."
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: Application/Core/Login.php:152
|
652 |
+
msgid "Access denied. Please login to get access."
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: Application/Core/Subject/Default.php:78 media/js/aam.js:885
|
656 |
msgid "All Users, Roles and Visitor"
|
657 |
msgstr ""
|
658 |
|
670 |
"more.%s"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: Application/Extension/Repository.php:326
|
674 |
#, php-format
|
675 |
msgid "Failed to create %s"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: Application/Extension/Repository.php:330
|
679 |
#, php-format
|
680 |
msgid "Directory %s is not writable"
|
681 |
msgstr ""
|
688 |
msgid "No valid strategy found for the given context"
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: aam.php:190
|
692 |
+
msgid "PHP 5.3.0 or higher is required."
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: aam.php:192
|
696 |
msgid "WP 3.8 or higher is required."
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: media/js/aam.js:231
|
700 |
msgid "Clone Role"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: media/js/aam.js:678
|
704 |
+
msgid "User Expiration"
|
705 |
+
msgstr ""
|
706 |
+
|
707 |
+
#: media/js/aam.js:732
|
708 |
msgid "Switch To User"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: media/js/aam.js:780 Application/Backend/phtml/index.phtml:259
|
712 |
+
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:107
|
713 |
+
msgid "Save"
|
714 |
+
msgstr ""
|
715 |
+
|
716 |
+
#: media/js/aam.js:799
|
717 |
+
msgid "Reseting..."
|
718 |
+
msgstr ""
|
719 |
+
|
720 |
+
#: media/js/aam.js:813 Application/Backend/phtml/index.phtml:258
|
721 |
+
msgid "Reset"
|
722 |
+
msgstr ""
|
723 |
+
|
724 |
+
#: media/js/aam.js:933 media/js/aam.js:2442 media/js/aam.js:2487
|
725 |
+
#: media/js/aam.js:2518 media/js/aam.js:2551 media/js/aam.js:2603
|
726 |
msgid "Application Error"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: media/js/aam.js:1002 Application/Backend/phtml/main/menu.phtml:57
|
730 |
msgid "Uncheck to allow"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: media/js/aam.js:1004 Application/Backend/phtml/main/menu.phtml:57
|
734 |
msgid "Check to restrict"
|
735 |
msgstr ""
|
736 |
|
737 |
+
#: media/js/aam.js:1111
|
738 |
msgid "Processing"
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: media/js/aam.js:1119
|
742 |
msgid "Failed to initialize URL"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: media/js/aam.js:1127 Application/Backend/phtml/main/metabox.phtml:102
|
746 |
msgid "Initialize"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: media/js/aam.js:1151 Application/Backend/phtml/main/metabox.phtml:65
|
750 |
msgid "Uncheck to show"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: media/js/aam.js:1153 Application/Backend/phtml/main/metabox.phtml:65
|
754 |
msgid "Check to hide"
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: media/js/aam.js:1199
|
758 |
msgid "WordPress core does not allow to grant this capability"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: media/js/aam.js:1239
|
762 |
msgid "Nothing to show"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: media/js/aam.js:1391
|
766 |
msgid "Failed to update capability"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: media/js/aam.js:1399 Application/Backend/phtml/main/capability.phtml:76
|
770 |
msgid "Update Capability"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: media/js/aam.js:1430
|
774 |
msgid "Failed to delete capability"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: media/js/aam.js:1438 Application/Backend/phtml/main/capability.phtml:98
|
778 |
msgid "Delete Capability"
|
779 |
msgstr ""
|
780 |
|
781 |
+
#: media/js/aam.js:1781
|
782 |
msgid "Drill-Down"
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: media/js/aam.js:2265
|
786 |
msgid "Extension status was updated successfully"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: media/js/aam.js:2477 media/js/aam.js:2508 media/js/aam.js:2539
|
790 |
+
#: media/js/aam.js:2592
|
791 |
msgid "Wait..."
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: media/js/aam.js:2481
|
795 |
msgid "All settings were cleared successfully"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: media/js/aam.js:2491 media/js/aam.js:2522
|
799 |
#: Application/Backend/phtml/settings/tools.phtml:66
|
800 |
msgid "Clear"
|
801 |
msgstr ""
|
802 |
|
803 |
+
#: media/js/aam.js:2512
|
804 |
msgid "The cache was cleared successfully"
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: media/js/aam.js:2599
|
808 |
msgid "Invalid data format"
|
809 |
msgstr ""
|
810 |
|
879 |
#: Application/Backend/phtml/extensions.phtml:97
|
880 |
#: Application/Backend/phtml/extensions.phtml:128
|
881 |
#: Application/Backend/phtml/extensions.phtml:139
|
882 |
+
#: Application/Backend/phtml/index.phtml:152
|
883 |
+
#: Application/Backend/phtml/index.phtml:169
|
884 |
+
#: Application/Backend/phtml/index.phtml:179
|
885 |
+
#: Application/Backend/phtml/index.phtml:195
|
886 |
+
#: Application/Backend/phtml/index.phtml:205
|
887 |
+
#: Application/Backend/phtml/index.phtml:213
|
888 |
+
#: Application/Backend/phtml/index.phtml:240
|
889 |
+
#: Application/Backend/phtml/index.phtml:260
|
890 |
#: Application/Backend/phtml/main/capability.phtml:54
|
891 |
#: Application/Backend/phtml/main/capability.phtml:65
|
892 |
#: Application/Backend/phtml/main/capability.phtml:75
|
893 |
#: Application/Backend/phtml/main/capability.phtml:87
|
894 |
#: Application/Backend/phtml/main/capability.phtml:97
|
895 |
#: Application/Backend/phtml/main/capability.phtml:105
|
896 |
+
#: Application/Backend/phtml/main/menu.phtml:98
|
897 |
#: Application/Backend/phtml/main/metabox.phtml:89
|
898 |
#: Application/Backend/phtml/main/metabox.phtml:103
|
899 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:6
|
965 |
msgstr ""
|
966 |
|
967 |
#: Application/Backend/phtml/frame.phtml:62
|
968 |
+
#: Application/Backend/phtml/index.phtml:227
|
969 |
msgid "Username"
|
970 |
msgstr ""
|
971 |
|
975 |
msgstr ""
|
976 |
|
977 |
#: Application/Backend/phtml/frame.phtml:75
|
978 |
+
#: Application/Backend/phtml/index.phtml:271
|
979 |
msgid "Manage Visitors"
|
980 |
msgstr ""
|
981 |
|
987 |
msgstr ""
|
988 |
|
989 |
#: Application/Backend/phtml/frame.phtml:84
|
990 |
+
#: Application/Backend/phtml/index.phtml:279
|
991 |
msgid "Manage Default Access"
|
992 |
msgstr ""
|
993 |
|
1086 |
#: Application/Backend/phtml/index.phtml:101
|
1087 |
msgid ""
|
1088 |
"Install free [AAM Multisite extension] in order to manage all your sites "
|
1089 |
+
"from the Network Admin."
|
|
|
|
|
|
|
|
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: Application/Backend/phtml/index.phtml:112
|
1093 |
msgid "Users/Roles Manager"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: Application/Backend/phtml/index.phtml:119
|
1097 |
+
#: Application/Backend/phtml/index.phtml:291
|
1098 |
msgid "Roles"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
+
#: Application/Backend/phtml/index.phtml:125
|
1102 |
+
#: Application/Backend/phtml/index.phtml:301
|
1103 |
msgid "Visitor"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: Application/Backend/phtml/index.phtml:128
|
1107 |
+
#: Application/Backend/phtml/index.phtml:306
|
1108 |
msgid "Default"
|
1109 |
msgstr ""
|
1110 |
|
1111 |
+
#: Application/Backend/phtml/index.phtml:140
|
1112 |
+
#: Application/Backend/phtml/index.phtml:228
|
1113 |
msgid "Action"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: Application/Backend/phtml/index.phtml:153
|
1117 |
msgid "Create Role"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: Application/Backend/phtml/index.phtml:157
|
1121 |
+
#: Application/Backend/phtml/index.phtml:184
|
1122 |
msgid "Role Name"
|
1123 |
msgstr ""
|
1124 |
|
1125 |
+
#: Application/Backend/phtml/index.phtml:158
|
1126 |
+
#: Application/Backend/phtml/index.phtml:185
|
1127 |
msgid "Enter Role Name"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: Application/Backend/phtml/index.phtml:161
|
1131 |
+
#: Application/Backend/phtml/index.phtml:188
|
1132 |
msgid "Role Expiration"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
+
#: Application/Backend/phtml/index.phtml:162
|
1136 |
+
#: Application/Backend/phtml/index.phtml:189
|
1137 |
msgid "Enter Expiration Rule"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: Application/Backend/phtml/index.phtml:180
|
1141 |
msgid "Update Role"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: Application/Backend/phtml/index.phtml:209
|
1145 |
#, php-format
|
1146 |
msgid "Are you sure that you want to delete the %s role?"
|
1147 |
msgstr ""
|
1148 |
|
1149 |
+
#: Application/Backend/phtml/index.phtml:241
|
1150 |
+
msgid "Manage User Expiration"
|
1151 |
+
msgstr ""
|
1152 |
+
|
1153 |
+
#: Application/Backend/phtml/index.phtml:246
|
1154 |
+
msgid "Enter Expiration"
|
1155 |
+
msgstr ""
|
1156 |
+
|
1157 |
+
#: Application/Backend/phtml/index.phtml:249
|
1158 |
+
msgid "Action After Expiration"
|
1159 |
+
msgstr ""
|
1160 |
+
|
1161 |
+
#: Application/Backend/phtml/index.phtml:251
|
1162 |
+
msgid "Select Action"
|
1163 |
+
msgstr ""
|
1164 |
+
|
1165 |
+
#: Application/Backend/phtml/index.phtml:252
|
1166 |
+
msgid "Delete Account"
|
1167 |
+
msgstr ""
|
1168 |
+
|
1169 |
+
#: Application/Backend/phtml/index.phtml:253
|
1170 |
+
msgid "Lock Account"
|
1171 |
+
msgstr ""
|
1172 |
+
|
1173 |
+
#: Application/Backend/phtml/index.phtml:270
|
1174 |
msgid ""
|
1175 |
"Manage access to your website for visitors (any user that is not "
|
1176 |
"authenticated)"
|
1177 |
msgstr ""
|
1178 |
|
1179 |
+
#: Application/Backend/phtml/index.phtml:278
|
1180 |
msgid ""
|
1181 |
"Manage default access to your website resources for all users, roles and "
|
1182 |
"visitor. This includes Administrator role and your user"
|
1183 |
msgstr ""
|
1184 |
|
1185 |
+
#: Application/Backend/phtml/index.phtml:287
|
1186 |
msgid ""
|
1187 |
"Manage access for your users, roles and visitors. Be careful with "
|
1188 |
"[Administrator] role as well as your admin user. [Database backup is "
|
1189 |
"strongly recommended]."
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: Application/Backend/phtml/index.phtml:292
|
1193 |
msgid ""
|
1194 |
"With Roles tab you can manage access for any defined role, edit role's name, "
|
1195 |
"create new role or even delete existing (but only when there is no users "
|
1196 |
"assigned to it). You are not allowed to delete Administrator role."
|
1197 |
msgstr ""
|
1198 |
|
1199 |
+
#: Application/Backend/phtml/index.phtml:297
|
1200 |
msgid ""
|
1201 |
"Manage access for any user. As a bonus feature, you can block user. It means "
|
1202 |
"that user will be not able to login to your website anymore."
|
1203 |
msgstr ""
|
1204 |
|
1205 |
+
#: Application/Backend/phtml/index.phtml:302
|
1206 |
msgid ""
|
1207 |
"Visitor can be considered any user that is not authenticated to your website."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: Application/Backend/phtml/index.phtml:307
|
1211 |
msgid ""
|
1212 |
"Manage default access settings to your website resources for all users, "
|
1213 |
"roles and visitors."
|
1380 |
msgstr ""
|
1381 |
|
1382 |
#: Application/Backend/phtml/main/menu.phtml:87
|
1383 |
+
msgid ""
|
1384 |
+
"Current user does not have enough capabilities to access any available "
|
1385 |
+
"dashboard page."
|
1386 |
+
msgstr ""
|
1387 |
+
|
1388 |
+
#: Application/Backend/phtml/main/menu.phtml:99
|
1389 |
msgid "Dashboard Lockdown"
|
1390 |
msgstr ""
|
1391 |
|
1392 |
+
#: Application/Backend/phtml/main/menu.phtml:103
|
1393 |
msgid "You cannot restrict access to Dashboard home page."
|
1394 |
msgstr ""
|
1395 |
|
1396 |
+
#: Application/Backend/phtml/main/menu.phtml:104
|
1397 |
#, php-format
|
1398 |
msgid ""
|
1399 |
"The [Home] is the default page every user is redirected after login. To "
|
1401 |
"WordPress backend%s article."
|
1402 |
msgstr ""
|
1403 |
|
1404 |
+
#: Application/Backend/phtml/main/menu.phtml:108
|
1405 |
msgid "OK"
|
1406 |
msgstr ""
|
1407 |
|
1613 |
msgid "Enter your teaser"
|
1614 |
msgstr ""
|
1615 |
|
|
|
|
|
|
|
|
|
1616 |
#: Application/Backend/phtml/partial/post-advanced-settings.phtml:119
|
1617 |
msgid "E-Commerce Setup"
|
1618 |
msgstr ""
|
1720 |
"please check %sthis article%s."
|
1721 |
msgstr ""
|
1722 |
|
1723 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:49
|
1724 |
+
#: Application/Frontend/phtml/login.phtml:35
|
1725 |
+
msgid "Register"
|
1726 |
+
msgstr ""
|
1727 |
+
|
1728 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:54
|
1729 |
#: Application/Frontend/phtml/login.phtml:40
|
1730 |
+
msgid "Lost your password?"
|
1731 |
+
msgstr ""
|
1732 |
+
|
1733 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:64
|
1734 |
+
#: Application/Frontend/phtml/login.phtml:51
|
1735 |
msgid "Dashboard"
|
1736 |
msgstr ""
|
1737 |
|
1738 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:65
|
1739 |
+
#: Application/Frontend/phtml/login.phtml:52
|
1740 |
msgid "Edit My Profile"
|
1741 |
msgstr ""
|
1742 |
|
1743 |
+
#: Application/Backend/phtml/widget/login-frontend.phtml:67
|
1744 |
+
#: Application/Frontend/phtml/login.phtml:54
|
1745 |
msgid "Log Out"
|
1746 |
msgstr ""
|
1747 |
|
1749 |
msgid "Username or Email Address"
|
1750 |
msgstr ""
|
1751 |
|
1752 |
+
#: Application/Frontend/phtml/login.phtml:22
|
1753 |
msgid "Remember Me"
|
1754 |
msgstr ""
|
|
|
|
|
|
|
|
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.
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
@@ -94,6 +94,31 @@ class AAM {
|
|
94 |
|
95 |
return (is_admin() && count($intersect));
|
96 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
/**
|
99 |
* Initialize the AAM plugin
|
@@ -113,26 +138,18 @@ class AAM {
|
|
113 |
//load AAM cache
|
114 |
AAM_Core_Cache::bootstrap();
|
115 |
|
116 |
-
//load AAM core config
|
117 |
-
AAM_Core_Config::bootstrap();
|
118 |
-
|
119 |
//load all installed extension
|
120 |
AAM_Extension_Repository::getInstance()->load();
|
121 |
|
|
|
|
|
|
|
122 |
//bootstrap the correct interface
|
123 |
if (is_admin()) {
|
124 |
AAM_Backend_Manager::bootstrap();
|
125 |
} else {
|
126 |
AAM_Frontend_Manager::bootstrap();
|
127 |
}
|
128 |
-
|
129 |
-
//load media control
|
130 |
-
AAM_Core_Media::bootstrap();
|
131 |
-
|
132 |
-
//login control
|
133 |
-
if (AAM_Core_Config::get('secure-login', true)) {
|
134 |
-
AAM_Core_Login::bootstrap();
|
135 |
-
}
|
136 |
}
|
137 |
|
138 |
return self::$_instance;
|
@@ -169,8 +186,8 @@ class AAM {
|
|
169 |
global $wp_version;
|
170 |
|
171 |
//check PHP Version
|
172 |
-
if (version_compare(PHP_VERSION, '5.
|
173 |
-
exit(__('PHP 5.
|
174 |
} elseif (version_compare($wp_version, '3.8') == -1) {
|
175 |
exit(__('WP 3.8 or higher is required.', AAM_KEY));
|
176 |
}
|
@@ -209,11 +226,14 @@ if (defined('ABSPATH')) {
|
|
209 |
);
|
210 |
define('AAM_KEY', 'advanced-access-manager');
|
211 |
define('AAM_EXTENSION_BASE', WP_CONTENT_DIR . '/aam/extension');
|
|
|
212 |
|
213 |
//register autoloader
|
214 |
require (dirname(__FILE__) . '/autoloader.php');
|
215 |
AAM_Autoloader::register();
|
216 |
|
|
|
|
|
217 |
//the highest priority (higher the core)
|
218 |
//this is important to have to catch events like register core post types
|
219 |
add_action('init', 'AAM::getInstance', -1);
|
3 |
/**
|
4 |
Plugin Name: Advanced Access Manager
|
5 |
Description: All you need to manage access to your WordPress website
|
6 |
+
Version: 5.2
|
7 |
Author: Vasyl Martyniuk <vasyl@vasyltech.com>
|
8 |
Author URI: https://vasyltech.com
|
9 |
|
94 |
|
95 |
return (is_admin() && count($intersect));
|
96 |
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Bootstrap AAM
|
100 |
+
*
|
101 |
+
* @return void
|
102 |
+
*
|
103 |
+
* @access public
|
104 |
+
* @static
|
105 |
+
*/
|
106 |
+
public static function bootstrap() {
|
107 |
+
if (is_null(self::$_instance)) {
|
108 |
+
//load AAM core config
|
109 |
+
AAM_Core_Config::bootstrap();
|
110 |
+
|
111 |
+
//login control
|
112 |
+
if (AAM_Core_Config::get('secure-login', true)) {
|
113 |
+
AAM_Core_Login::bootstrap();
|
114 |
+
}
|
115 |
+
|
116 |
+
//JWT Authentication
|
117 |
+
if (AAM_Core_Config::get('jwt-authentication', false)) {
|
118 |
+
AAM_Core_JWTAuth::bootstrap();
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
|
123 |
/**
|
124 |
* Initialize the AAM plugin
|
138 |
//load AAM cache
|
139 |
AAM_Core_Cache::bootstrap();
|
140 |
|
|
|
|
|
|
|
141 |
//load all installed extension
|
142 |
AAM_Extension_Repository::getInstance()->load();
|
143 |
|
144 |
+
//load media control
|
145 |
+
AAM_Core_Media::bootstrap();
|
146 |
+
|
147 |
//bootstrap the correct interface
|
148 |
if (is_admin()) {
|
149 |
AAM_Backend_Manager::bootstrap();
|
150 |
} else {
|
151 |
AAM_Frontend_Manager::bootstrap();
|
152 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
return self::$_instance;
|
186 |
global $wp_version;
|
187 |
|
188 |
//check PHP Version
|
189 |
+
if (version_compare(PHP_VERSION, '5.3.0') == -1) {
|
190 |
+
exit(__('PHP 5.3.0 or higher is required.', AAM_KEY));
|
191 |
} elseif (version_compare($wp_version, '3.8') == -1) {
|
192 |
exit(__('WP 3.8 or higher is required.', AAM_KEY));
|
193 |
}
|
226 |
);
|
227 |
define('AAM_KEY', 'advanced-access-manager');
|
228 |
define('AAM_EXTENSION_BASE', WP_CONTENT_DIR . '/aam/extension');
|
229 |
+
define('AAM_BASEDIR', dirname(__FILE__));
|
230 |
|
231 |
//register autoloader
|
232 |
require (dirname(__FILE__) . '/autoloader.php');
|
233 |
AAM_Autoloader::register();
|
234 |
|
235 |
+
add_action('plugins_loaded', 'AAM::bootstrap', 1);
|
236 |
+
|
237 |
//the highest priority (higher the core)
|
238 |
//this is important to have to catch events like register core post types
|
239 |
add_action('init', 'AAM::getInstance', -1);
|
media/css/aam.css
CHANGED
@@ -1068,6 +1068,356 @@ input[type=radio]:checked + label:before {
|
|
1068 |
.autocomplete-suggestion.selected { background: #f0f0f0; }
|
1069 |
|
1070 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1071 |
/* COVER KNOWN CSS ISSUES CASED BY OTHER PLUGINS OR THEMES */
|
1072 |
|
1073 |
/* Bridge theme */
|
1068 |
.autocomplete-suggestion.selected { background: #f0f0f0; }
|
1069 |
|
1070 |
|
1071 |
+
/* CODEMIRROR CSS RULES */
|
1072 |
+
/* BASICS */
|
1073 |
+
|
1074 |
+
.CodeMirror {
|
1075 |
+
/* Set height, width, borders, and global font properties here */
|
1076 |
+
font-family: monospace;
|
1077 |
+
height: 300px;
|
1078 |
+
color: black;
|
1079 |
+
direction: ltr;
|
1080 |
+
border: 1px solid #EEEEEE;
|
1081 |
+
padding: 5px;
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
/* PADDING */
|
1085 |
+
|
1086 |
+
.CodeMirror-lines {
|
1087 |
+
padding: 4px 0; /* Vertical padding around content */
|
1088 |
+
}
|
1089 |
+
.CodeMirror pre {
|
1090 |
+
padding: 0 4px; /* Horizontal padding of content */
|
1091 |
+
}
|
1092 |
+
|
1093 |
+
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
1094 |
+
background-color: white; /* The little square between H and V scrollbars */
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
/* GUTTER */
|
1098 |
+
|
1099 |
+
.CodeMirror-gutters {
|
1100 |
+
border-right: 1px solid #ddd;
|
1101 |
+
background-color: #f7f7f7;
|
1102 |
+
white-space: nowrap;
|
1103 |
+
}
|
1104 |
+
.CodeMirror-linenumbers {}
|
1105 |
+
.CodeMirror-linenumber {
|
1106 |
+
padding: 0 3px 0 5px;
|
1107 |
+
min-width: 20px;
|
1108 |
+
text-align: right;
|
1109 |
+
color: #999;
|
1110 |
+
white-space: nowrap;
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
.CodeMirror-guttermarker { color: black; }
|
1114 |
+
.CodeMirror-guttermarker-subtle { color: #999; }
|
1115 |
+
|
1116 |
+
/* CURSOR */
|
1117 |
+
|
1118 |
+
.CodeMirror-cursor {
|
1119 |
+
border-left: 1px solid black;
|
1120 |
+
border-right: none;
|
1121 |
+
width: 0;
|
1122 |
+
}
|
1123 |
+
/* Shown when moving in bi-directional text */
|
1124 |
+
.CodeMirror div.CodeMirror-secondarycursor {
|
1125 |
+
border-left: 1px solid silver;
|
1126 |
+
}
|
1127 |
+
.cm-fat-cursor .CodeMirror-cursor {
|
1128 |
+
width: auto;
|
1129 |
+
border: 0 !important;
|
1130 |
+
background: #7e7;
|
1131 |
+
}
|
1132 |
+
.cm-fat-cursor div.CodeMirror-cursors {
|
1133 |
+
z-index: 1;
|
1134 |
+
}
|
1135 |
+
.cm-fat-cursor-mark {
|
1136 |
+
background-color: rgba(20, 255, 20, 0.5);
|
1137 |
+
-webkit-animation: blink 1.06s steps(1) infinite;
|
1138 |
+
-moz-animation: blink 1.06s steps(1) infinite;
|
1139 |
+
animation: blink 1.06s steps(1) infinite;
|
1140 |
+
}
|
1141 |
+
.cm-animate-fat-cursor {
|
1142 |
+
width: auto;
|
1143 |
+
border: 0;
|
1144 |
+
-webkit-animation: blink 1.06s steps(1) infinite;
|
1145 |
+
-moz-animation: blink 1.06s steps(1) infinite;
|
1146 |
+
animation: blink 1.06s steps(1) infinite;
|
1147 |
+
background-color: #7e7;
|
1148 |
+
}
|
1149 |
+
@-moz-keyframes blink {
|
1150 |
+
0% {}
|
1151 |
+
50% { background-color: transparent; }
|
1152 |
+
100% {}
|
1153 |
+
}
|
1154 |
+
@-webkit-keyframes blink {
|
1155 |
+
0% {}
|
1156 |
+
50% { background-color: transparent; }
|
1157 |
+
100% {}
|
1158 |
+
}
|
1159 |
+
@keyframes blink {
|
1160 |
+
0% {}
|
1161 |
+
50% { background-color: transparent; }
|
1162 |
+
100% {}
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
/* Can style cursor different in overwrite (non-insert) mode */
|
1166 |
+
.CodeMirror-overwrite .CodeMirror-cursor {}
|
1167 |
+
|
1168 |
+
.cm-tab { display: inline-block; text-decoration: inherit; }
|
1169 |
+
|
1170 |
+
.CodeMirror-rulers {
|
1171 |
+
position: absolute;
|
1172 |
+
left: 0; right: 0; top: -50px; bottom: -20px;
|
1173 |
+
overflow: hidden;
|
1174 |
+
}
|
1175 |
+
.CodeMirror-ruler {
|
1176 |
+
border-left: 1px solid #ccc;
|
1177 |
+
top: 0; bottom: 0;
|
1178 |
+
position: absolute;
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
/* DEFAULT THEME */
|
1182 |
+
|
1183 |
+
.cm-s-default .cm-header {color: blue;}
|
1184 |
+
.cm-s-default .cm-quote {color: #090;}
|
1185 |
+
.cm-negative {color: #d44;}
|
1186 |
+
.cm-positive {color: #292;}
|
1187 |
+
.cm-header, .cm-strong {font-weight: bold;}
|
1188 |
+
.cm-em {font-style: italic;}
|
1189 |
+
.cm-link {text-decoration: underline;}
|
1190 |
+
.cm-strikethrough {text-decoration: line-through;}
|
1191 |
+
|
1192 |
+
.cm-s-default .cm-keyword {color: #708;}
|
1193 |
+
.cm-s-default .cm-atom {color: #219;}
|
1194 |
+
.cm-s-default .cm-number {color: #164;}
|
1195 |
+
.cm-s-default .cm-def {color: #00f;}
|
1196 |
+
.cm-s-default .cm-variable,
|
1197 |
+
.cm-s-default .cm-punctuation,
|
1198 |
+
.cm-s-default .cm-property,
|
1199 |
+
.cm-s-default .cm-operator {}
|
1200 |
+
.cm-s-default .cm-variable-2 {color: #05a;}
|
1201 |
+
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
1202 |
+
.cm-s-default .cm-comment {color: #a50;}
|
1203 |
+
.cm-s-default .cm-string {color: #a11;}
|
1204 |
+
.cm-s-default .cm-string-2 {color: #f50;}
|
1205 |
+
.cm-s-default .cm-meta {color: #555;}
|
1206 |
+
.cm-s-default .cm-qualifier {color: #555;}
|
1207 |
+
.cm-s-default .cm-builtin {color: #30a;}
|
1208 |
+
.cm-s-default .cm-bracket {color: #997;}
|
1209 |
+
.cm-s-default .cm-tag {color: #170;}
|
1210 |
+
.cm-s-default .cm-attribute {color: #00c;}
|
1211 |
+
.cm-s-default .cm-hr {color: #999;}
|
1212 |
+
.cm-s-default .cm-link {color: #00c;}
|
1213 |
+
|
1214 |
+
.cm-s-default .cm-error {color: #f00;}
|
1215 |
+
.cm-invalidchar {color: #f00;}
|
1216 |
+
|
1217 |
+
.CodeMirror-composing { border-bottom: 2px solid; }
|
1218 |
+
|
1219 |
+
/* Default styles for common addons */
|
1220 |
+
|
1221 |
+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
1222 |
+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
1223 |
+
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
1224 |
+
.CodeMirror-activeline-background {background: #e8f2ff;}
|
1225 |
+
|
1226 |
+
/* STOP */
|
1227 |
+
|
1228 |
+
/* The rest of this file contains styles related to the mechanics of
|
1229 |
+
the editor. You probably shouldn't touch them. */
|
1230 |
+
|
1231 |
+
.CodeMirror {
|
1232 |
+
position: relative;
|
1233 |
+
overflow: hidden;
|
1234 |
+
background: white;
|
1235 |
+
}
|
1236 |
+
|
1237 |
+
.CodeMirror-scroll {
|
1238 |
+
overflow: scroll !important; /* Things will break if this is overridden */
|
1239 |
+
/* 30px is the magic margin used to hide the element's real scrollbars */
|
1240 |
+
/* See overflow: hidden in .CodeMirror */
|
1241 |
+
margin-bottom: -30px; margin-right: -30px;
|
1242 |
+
padding-bottom: 30px;
|
1243 |
+
height: 100%;
|
1244 |
+
outline: none; /* Prevent dragging from highlighting the element */
|
1245 |
+
position: relative;
|
1246 |
+
}
|
1247 |
+
.CodeMirror-sizer {
|
1248 |
+
position: relative;
|
1249 |
+
border-right: 30px solid transparent;
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
1253 |
+
before actual scrolling happens, thus preventing shaking and
|
1254 |
+
flickering artifacts. */
|
1255 |
+
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
1256 |
+
position: absolute;
|
1257 |
+
z-index: 6;
|
1258 |
+
display: none;
|
1259 |
+
}
|
1260 |
+
.CodeMirror-vscrollbar {
|
1261 |
+
right: 0; top: 0;
|
1262 |
+
overflow-x: hidden;
|
1263 |
+
overflow-y: scroll;
|
1264 |
+
}
|
1265 |
+
.CodeMirror-hscrollbar {
|
1266 |
+
bottom: 0; left: 0;
|
1267 |
+
overflow-y: hidden;
|
1268 |
+
overflow-x: scroll;
|
1269 |
+
}
|
1270 |
+
.CodeMirror-scrollbar-filler {
|
1271 |
+
right: 0; bottom: 0;
|
1272 |
+
}
|
1273 |
+
.CodeMirror-gutter-filler {
|
1274 |
+
left: 0; bottom: 0;
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
.CodeMirror-gutters {
|
1278 |
+
position: absolute; left: 0; top: 0;
|
1279 |
+
min-height: 100%;
|
1280 |
+
z-index: 3;
|
1281 |
+
}
|
1282 |
+
.CodeMirror-gutter {
|
1283 |
+
white-space: normal;
|
1284 |
+
height: 100%;
|
1285 |
+
display: inline-block;
|
1286 |
+
vertical-align: top;
|
1287 |
+
margin-bottom: -30px;
|
1288 |
+
}
|
1289 |
+
.CodeMirror-gutter-wrapper {
|
1290 |
+
position: absolute;
|
1291 |
+
z-index: 4;
|
1292 |
+
background: none !important;
|
1293 |
+
border: none !important;
|
1294 |
+
}
|
1295 |
+
.CodeMirror-gutter-background {
|
1296 |
+
position: absolute;
|
1297 |
+
top: 0; bottom: 0;
|
1298 |
+
z-index: 4;
|
1299 |
+
}
|
1300 |
+
.CodeMirror-gutter-elt {
|
1301 |
+
position: absolute;
|
1302 |
+
cursor: default;
|
1303 |
+
z-index: 4;
|
1304 |
+
}
|
1305 |
+
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
1306 |
+
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
1307 |
+
|
1308 |
+
.CodeMirror-lines {
|
1309 |
+
cursor: text;
|
1310 |
+
min-height: 1px; /* prevents collapsing before first draw */
|
1311 |
+
}
|
1312 |
+
.CodeMirror pre {
|
1313 |
+
/* Reset some styles that the rest of the page might have set */
|
1314 |
+
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
1315 |
+
border-width: 0;
|
1316 |
+
background: transparent;
|
1317 |
+
font-family: inherit;
|
1318 |
+
font-size: inherit;
|
1319 |
+
margin: 0;
|
1320 |
+
white-space: pre;
|
1321 |
+
word-wrap: normal;
|
1322 |
+
line-height: inherit;
|
1323 |
+
color: inherit;
|
1324 |
+
z-index: 2;
|
1325 |
+
position: relative;
|
1326 |
+
overflow: visible;
|
1327 |
+
-webkit-tap-highlight-color: transparent;
|
1328 |
+
-webkit-font-variant-ligatures: contextual;
|
1329 |
+
font-variant-ligatures: contextual;
|
1330 |
+
}
|
1331 |
+
.CodeMirror-wrap pre {
|
1332 |
+
word-wrap: break-word;
|
1333 |
+
white-space: pre-wrap;
|
1334 |
+
word-break: normal;
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
.CodeMirror-linebackground {
|
1338 |
+
position: absolute;
|
1339 |
+
left: 0; right: 0; top: 0; bottom: 0;
|
1340 |
+
z-index: 0;
|
1341 |
+
}
|
1342 |
+
|
1343 |
+
.CodeMirror-linewidget {
|
1344 |
+
position: relative;
|
1345 |
+
z-index: 2;
|
1346 |
+
padding: 0.1px; /* Force widget margins to stay inside of the container */
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
.CodeMirror-widget {}
|
1350 |
+
|
1351 |
+
.CodeMirror-rtl pre { direction: rtl; }
|
1352 |
+
|
1353 |
+
.CodeMirror-code {
|
1354 |
+
outline: none;
|
1355 |
+
}
|
1356 |
+
|
1357 |
+
/* Force content-box sizing for the elements where we expect it */
|
1358 |
+
.CodeMirror-scroll,
|
1359 |
+
.CodeMirror-sizer,
|
1360 |
+
.CodeMirror-gutter,
|
1361 |
+
.CodeMirror-gutters,
|
1362 |
+
.CodeMirror-linenumber {
|
1363 |
+
-moz-box-sizing: content-box;
|
1364 |
+
box-sizing: content-box;
|
1365 |
+
}
|
1366 |
+
|
1367 |
+
.CodeMirror-measure {
|
1368 |
+
position: absolute;
|
1369 |
+
width: 100%;
|
1370 |
+
height: 0;
|
1371 |
+
overflow: hidden;
|
1372 |
+
visibility: hidden;
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
.CodeMirror-cursor {
|
1376 |
+
position: absolute;
|
1377 |
+
pointer-events: none;
|
1378 |
+
}
|
1379 |
+
.CodeMirror-measure pre { position: static; }
|
1380 |
+
|
1381 |
+
div.CodeMirror-cursors {
|
1382 |
+
visibility: hidden;
|
1383 |
+
position: relative;
|
1384 |
+
z-index: 3;
|
1385 |
+
}
|
1386 |
+
div.CodeMirror-dragcursors {
|
1387 |
+
visibility: visible;
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
.CodeMirror-focused div.CodeMirror-cursors {
|
1391 |
+
visibility: visible;
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
.CodeMirror-selected { background: #d9d9d9; }
|
1395 |
+
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
1396 |
+
.CodeMirror-crosshair { cursor: crosshair; }
|
1397 |
+
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
1398 |
+
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
1399 |
+
|
1400 |
+
.cm-searching {
|
1401 |
+
background-color: #ffa;
|
1402 |
+
background-color: rgba(255, 255, 0, .4);
|
1403 |
+
}
|
1404 |
+
|
1405 |
+
/* Used to force a border model for a node */
|
1406 |
+
.cm-force-border { padding-right: .1px; }
|
1407 |
+
|
1408 |
+
@media print {
|
1409 |
+
/* Hide the cursor when printing */
|
1410 |
+
.CodeMirror div.CodeMirror-cursors {
|
1411 |
+
visibility: hidden;
|
1412 |
+
}
|
1413 |
+
}
|
1414 |
+
|
1415 |
+
/* See issue #2901 */
|
1416 |
+
.cm-tab-wrap-hack:after { content: ''; }
|
1417 |
+
|
1418 |
+
/* Help users use markselection to safely style text background */
|
1419 |
+
span.CodeMirror-selectedtext { background: none; }
|
1420 |
+
|
1421 |
/* COVER KNOWN CSS ISSUES CASED BY OTHER PLUGINS OR THEMES */
|
1422 |
|
1423 |
/* Bridge theme */
|
media/js/aam.js
CHANGED
@@ -2412,14 +2412,14 @@
|
|
2412 |
|
2413 |
|
2414 |
/**
|
2415 |
-
*
|
2416 |
*
|
2417 |
* @param {type} $
|
2418 |
*
|
2419 |
* @returns {undefined}
|
2420 |
*/
|
2421 |
(function ($) {
|
2422 |
-
|
2423 |
/**
|
2424 |
*
|
2425 |
* @param {type} param
|
@@ -2621,6 +2621,35 @@
|
|
2621 |
}
|
2622 |
|
2623 |
aam.addHook('init', initialize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2624 |
|
2625 |
})(jQuery);
|
2626 |
|
2412 |
|
2413 |
|
2414 |
/**
|
2415 |
+
* Settings Interface
|
2416 |
*
|
2417 |
* @param {type} $
|
2418 |
*
|
2419 |
* @returns {undefined}
|
2420 |
*/
|
2421 |
(function ($) {
|
2422 |
+
|
2423 |
/**
|
2424 |
*
|
2425 |
* @param {type} param
|
2621 |
}
|
2622 |
|
2623 |
aam.addHook('init', initialize);
|
2624 |
+
|
2625 |
+
//ConfigPress hook
|
2626 |
+
aam.addHook('menu-feature-click', function(feature) {
|
2627 |
+
if (feature === 'configpress'
|
2628 |
+
&& !$('#configpress-editor').next().hasClass('CodeMirror')) {
|
2629 |
+
var editor = CodeMirror.fromTextArea(
|
2630 |
+
document.getElementById("configpress-editor"), {}
|
2631 |
+
);
|
2632 |
+
|
2633 |
+
editor.on("blur", function(){
|
2634 |
+
$.ajax(aamLocal.ajaxurl, {
|
2635 |
+
type: 'POST',
|
2636 |
+
dataType: 'json',
|
2637 |
+
data: {
|
2638 |
+
action: 'aam',
|
2639 |
+
sub_action: 'Settings_ConfigPress.save',
|
2640 |
+
_ajax_nonce: aamLocal.nonce,
|
2641 |
+
config: editor.getValue()
|
2642 |
+
},
|
2643 |
+
error: function () {
|
2644 |
+
aam.notification(
|
2645 |
+
'danger',
|
2646 |
+
aam.__('Application error')
|
2647 |
+
);
|
2648 |
+
}
|
2649 |
+
});
|
2650 |
+
});
|
2651 |
+
}
|
2652 |
+
});
|
2653 |
|
2654 |
})(jQuery);
|
2655 |
|
media/js/vendor.js
CHANGED
@@ -230,4 +230,332 @@ o(jQuery,jQuery.fn.dataTable)})(window,document);
|
|
230 |
|
231 |
// jQuery autoComplete v1.0.7
|
232 |
// https://github.com/Pixabay/jQuery-autoComplete
|
233 |
-
!function(e){e.fn.autoComplete=function(t){var o=e.extend({},e.fn.autoComplete.defaults,t);return"string"==typeof t?(this.each(function(){var o=e(this);"destroy"==t&&(e(window).off("resize.autocomplete",o.updateSC),o.off("blur.autocomplete focus.autocomplete keydown.autocomplete keyup.autocomplete"),o.data("autocomplete")?o.attr("autocomplete",o.data("autocomplete")):o.removeAttr("autocomplete"),e(o.data("sc")).remove(),o.removeData("sc").removeData("autocomplete"))}),this):this.each(function(){function t(e){var t=s.val();if(s.cache[t]=e,e.length&&t.length>=o.minChars){for(var a="",c=0;c<e.length;c++)a+=o.renderItem(e[c],t);s.sc.html(a),s.updateSC(0)}else s.sc.hide()}var s=e(this);s.sc=e('<div class="autocomplete-suggestions '+o.menuClass+'"></div>'),s.data("sc",s.sc).data("autocomplete",s.attr("autocomplete")),s.attr("autocomplete","off"),s.cache={},s.last_val="",s.updateSC=function(t,o){if(s.sc.css({top:s.offset().top+s.outerHeight(),left:s.offset().left,width:s.outerWidth()}),!t&&(s.sc.show(),s.sc.maxHeight||(s.sc.maxHeight=parseInt(s.sc.css("max-height"))),s.sc.suggestionHeight||(s.sc.suggestionHeight=e(".autocomplete-suggestion",s.sc).first().outerHeight()),s.sc.suggestionHeight))if(o){var a=s.sc.scrollTop(),c=o.offset().top-s.sc.offset().top;c+s.sc.suggestionHeight-s.sc.maxHeight>0?s.sc.scrollTop(c+s.sc.suggestionHeight+a-s.sc.maxHeight):0>c&&s.sc.scrollTop(c+a)}else s.sc.scrollTop(0)},e(window).on("resize.autocomplete",s.updateSC),s.sc.appendTo("body"),s.sc.on("mouseleave",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected")}),s.sc.on("mouseenter",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected"),e(this).addClass("selected")}),s.sc.on("mousedown click",".autocomplete-suggestion",function(t){var a=e(this),c=a.data("val");return(c||a.hasClass("autocomplete-suggestion"))&&(s.val(c),o.onSelect(t,c,a),s.sc.hide()),!1}),s.on("blur.autocomplete",function(){try{over_sb=e(".autocomplete-suggestions:hover").length}catch(t){over_sb=0}over_sb?s.is(":focus")||setTimeout(function(){s.focus()},20):(s.last_val=s.val(),s.sc.hide(),setTimeout(function(){s.sc.hide()},350))}),o.minChars||s.on("focus.autocomplete",function(){s.last_val="\n",s.trigger("keyup.autocomplete")}),s.on("keydown.autocomplete",function(t){if((40==t.which||38==t.which)&&s.sc.html()){var a,c=e(".autocomplete-suggestion.selected",s.sc);return c.length?(a=40==t.which?c.next(".autocomplete-suggestion"):c.prev(".autocomplete-suggestion"),a.length?(c.removeClass("selected"),s.val(a.addClass("selected").data("val"))):(c.removeClass("selected"),s.val(s.last_val),a=0)):(a=40==t.which?e(".autocomplete-suggestion",s.sc).first():e(".autocomplete-suggestion",s.sc).last(),s.val(a.addClass("selected").data("val"))),s.updateSC(0,a),!1}if(27==t.which)s.val(s.last_val).sc.hide();else if(13==t.which||9==t.which){var c=e(".autocomplete-suggestion.selected",s.sc);c.length&&s.sc.is(":visible")&&(o.onSelect(t,c.data("val"),c),setTimeout(function(){s.sc.hide()},20))}}),s.on("keyup.autocomplete",function(a){if(!~e.inArray(a.which,[13,27,35,36,37,38,39,40])){var c=s.val();if(c.length>=o.minChars){if(c!=s.last_val){if(s.last_val=c,clearTimeout(s.timer),o.cache){if(c in s.cache)return void t(s.cache[c]);for(var l=1;l<c.length-o.minChars;l++){var i=c.slice(0,c.length-l);if(i in s.cache&&!s.cache[i].length)return void t([])}}s.timer=setTimeout(function(){o.source(c,t)},o.delay)}}else s.last_val=c,s.sc.hide()}})})},e.fn.autoComplete.defaults={source:0,minChars:3,delay:150,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+e+'">'+e.replace(o,"<b>$1</b>")+"</div>"},onSelect:function(e,t,o){}}}(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
// jQuery autoComplete v1.0.7
|
232 |
// https://github.com/Pixabay/jQuery-autoComplete
|
233 |
+
!function(e){e.fn.autoComplete=function(t){var o=e.extend({},e.fn.autoComplete.defaults,t);return"string"==typeof t?(this.each(function(){var o=e(this);"destroy"==t&&(e(window).off("resize.autocomplete",o.updateSC),o.off("blur.autocomplete focus.autocomplete keydown.autocomplete keyup.autocomplete"),o.data("autocomplete")?o.attr("autocomplete",o.data("autocomplete")):o.removeAttr("autocomplete"),e(o.data("sc")).remove(),o.removeData("sc").removeData("autocomplete"))}),this):this.each(function(){function t(e){var t=s.val();if(s.cache[t]=e,e.length&&t.length>=o.minChars){for(var a="",c=0;c<e.length;c++)a+=o.renderItem(e[c],t);s.sc.html(a),s.updateSC(0)}else s.sc.hide()}var s=e(this);s.sc=e('<div class="autocomplete-suggestions '+o.menuClass+'"></div>'),s.data("sc",s.sc).data("autocomplete",s.attr("autocomplete")),s.attr("autocomplete","off"),s.cache={},s.last_val="",s.updateSC=function(t,o){if(s.sc.css({top:s.offset().top+s.outerHeight(),left:s.offset().left,width:s.outerWidth()}),!t&&(s.sc.show(),s.sc.maxHeight||(s.sc.maxHeight=parseInt(s.sc.css("max-height"))),s.sc.suggestionHeight||(s.sc.suggestionHeight=e(".autocomplete-suggestion",s.sc).first().outerHeight()),s.sc.suggestionHeight))if(o){var a=s.sc.scrollTop(),c=o.offset().top-s.sc.offset().top;c+s.sc.suggestionHeight-s.sc.maxHeight>0?s.sc.scrollTop(c+s.sc.suggestionHeight+a-s.sc.maxHeight):0>c&&s.sc.scrollTop(c+a)}else s.sc.scrollTop(0)},e(window).on("resize.autocomplete",s.updateSC),s.sc.appendTo("body"),s.sc.on("mouseleave",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected")}),s.sc.on("mouseenter",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected"),e(this).addClass("selected")}),s.sc.on("mousedown click",".autocomplete-suggestion",function(t){var a=e(this),c=a.data("val");return(c||a.hasClass("autocomplete-suggestion"))&&(s.val(c),o.onSelect(t,c,a),s.sc.hide()),!1}),s.on("blur.autocomplete",function(){try{over_sb=e(".autocomplete-suggestions:hover").length}catch(t){over_sb=0}over_sb?s.is(":focus")||setTimeout(function(){s.focus()},20):(s.last_val=s.val(),s.sc.hide(),setTimeout(function(){s.sc.hide()},350))}),o.minChars||s.on("focus.autocomplete",function(){s.last_val="\n",s.trigger("keyup.autocomplete")}),s.on("keydown.autocomplete",function(t){if((40==t.which||38==t.which)&&s.sc.html()){var a,c=e(".autocomplete-suggestion.selected",s.sc);return c.length?(a=40==t.which?c.next(".autocomplete-suggestion"):c.prev(".autocomplete-suggestion"),a.length?(c.removeClass("selected"),s.val(a.addClass("selected").data("val"))):(c.removeClass("selected"),s.val(s.last_val),a=0)):(a=40==t.which?e(".autocomplete-suggestion",s.sc).first():e(".autocomplete-suggestion",s.sc).last(),s.val(a.addClass("selected").data("val"))),s.updateSC(0,a),!1}if(27==t.which)s.val(s.last_val).sc.hide();else if(13==t.which||9==t.which){var c=e(".autocomplete-suggestion.selected",s.sc);c.length&&s.sc.is(":visible")&&(o.onSelect(t,c.data("val"),c),setTimeout(function(){s.sc.hide()},20))}}),s.on("keyup.autocomplete",function(a){if(!~e.inArray(a.which,[13,27,35,36,37,38,39,40])){var c=s.val();if(c.length>=o.minChars){if(c!=s.last_val){if(s.last_val=c,clearTimeout(s.timer),o.cache){if(c in s.cache)return void t(s.cache[c]);for(var l=1;l<c.length-o.minChars;l++){var i=c.slice(0,c.length-l);if(i in s.cache&&!s.cache[i].length)return void t([])}}s.timer=setTimeout(function(){o.source(c,t)},o.delay)}}else s.last_val=c,s.sc.hide()}})})},e.fn.autoComplete.defaults={source:0,minChars:3,delay:150,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+e+'">'+e.replace(o,"<b>$1</b>")+"</div>"},onSelect:function(e,t,o){}}}(jQuery);
|
234 |
+
|
235 |
+
/*
|
236 |
+
* Codemirror 5.34.0
|
237 |
+
*/
|
238 |
+
(function(X,I){"object"===typeof exports&&"undefined"!==typeof module?module.exports=I():"function"===typeof define&&define.amd?define(I):X.CodeMirror=I()})(this,function(){function X(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function I(a){for(var b=a.childNodes.length;0<b;--b)a.removeChild(a.firstChild);return a}function D(a,b){return I(a).appendChild(b)}function u(a,b,c,d){a=document.createElement(a);c&&(a.className=c);d&&(a.style.cssText=d);if("string"==typeof b)a.appendChild(document.createTextNode(b));
|
239 |
+
else if(b)for(c=0;c<b.length;++c)a.appendChild(b[c]);return a}function U(a,b,c,d){a=u(a,b,c,d);a.setAttribute("role","presentation");return a}function za(a,b){3==b.nodeType&&(b=b.parentNode);if(a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)}function va(){try{var a=document.activeElement}catch(b){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function Ha(a,b){var c=a.className;X(b).test(c)||
|
240 |
+
(a.className+=(c?" ":"")+b)}function Nc(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!X(c[d]).test(b)&&(b+=" "+c[d]);return b}function Oc(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Ia(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||!1===c&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function ia(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));d=d||0;for(e=e||0;;){var f=a.indexOf("\t",d);if(0>f||f>=b)return e+(b-
|
241 |
+
d);e+=f-d;e+=c-e%c;d=f+1}}function P(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function Pc(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);-1==f&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);e+=f-d;e+=c-e%c;d=f+1;if(e>=b)return d}}function Qc(a){for(;gc.length<=a;)gc.push(z(gc)+" ");return gc[a]}function z(a){return a[a.length-1]}function hc(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function hg(a,b,c){for(var d=0,e=c(b);d<a.length&&
|
242 |
+
c(a[d])<=e;)d++;a.splice(d,0,b)}function Wd(){}function Xd(a,b){if(Object.create)var c=Object.create(a);else Wd.prototype=a,c=new Wd;b&&Ia(b,c);return c}function Rc(a){return/\w/.test(a)||"\u0080"<a&&(a.toUpperCase()!=a.toLowerCase()||ig.test(a))}function ic(a,b){return b?-1<b.source.indexOf("\\w")&&Rc(a)?!0:b.test(a):Rc(a)}function Yd(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Sc(a){return 768<=a.charCodeAt(0)&&jg.test(a)}function Zd(a,b,c){for(;(0>c?0<b:b<a.length)&&
|
243 |
+
Sc(a.charAt(b));)b+=c;return b}function rb(a,b,c){for(var d=b>c?-1:1;;){if(b==c)return b;var e=(b+c)/2;e=0>d?Math.ceil(e):Math.floor(e);if(e==b)return a(e)?b:c;a(e)?c=e:b=e+d}}function kg(a,b,c){this.input=c;this.scrollbarFiller=u("div",null,"CodeMirror-scrollbar-filler");this.scrollbarFiller.setAttribute("cm-not-content","true");this.gutterFiller=u("div",null,"CodeMirror-gutter-filler");this.gutterFiller.setAttribute("cm-not-content","true");this.lineDiv=U("div",null,"CodeMirror-code");this.selectionDiv=
|
244 |
+
u("div",null,null,"position: relative; z-index: 1");this.cursorDiv=u("div",null,"CodeMirror-cursors");this.measure=u("div",null,"CodeMirror-measure");this.lineMeasure=u("div",null,"CodeMirror-measure");this.lineSpace=U("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var d=U("div",[this.lineSpace],"CodeMirror-lines");this.mover=u("div",[d],null,"position: relative");this.sizer=u("div",[this.mover],"CodeMirror-sizer");this.sizerWidth=
|
245 |
+
null;this.heightForcer=u("div",null,null,"position: absolute; height: 30px; width: 1px;");this.gutters=u("div",null,"CodeMirror-gutters");this.lineGutter=null;this.scroller=u("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll");this.scroller.setAttribute("tabIndex","-1");this.wrapper=u("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror");B&&8>E&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0);T||Aa&&sb||(this.scroller.draggable=!0);a&&(a.appendChild?
|
246 |
+
a.appendChild(this.wrapper):a(this.wrapper));this.reportedViewFrom=this.reportedViewTo=this.viewFrom=this.viewTo=b.first;this.view=[];this.externalMeasured=this.renderedView=null;this.lastWrapHeight=this.lastWrapWidth=this.viewOffset=0;this.updateLineNumbers=null;this.nativeBarWidth=this.barHeight=this.barWidth=0;this.scrollbarsClipped=!1;this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null;this.alignWidgets=!1;this.maxLine=this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=
|
247 |
+
null;this.maxLineLength=0;this.maxLineChanged=!1;this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null;this.shift=!1;this.activeTouch=this.selForContextMenu=null;c.init(this)}function t(a,b){b-=a.first;if(0>b||b>=a.size)throw Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b<f){c=e;break}b-=f}return c.lines[b]}function Ja(a,b,c){var d=[],e=b.line;a.iter(b.line,c.line+1,function(a){a=a.text;e==c.line&&
|
248 |
+
(a=a.slice(0,c.ch));e==b.line&&(a=a.slice(b.ch));d.push(a);++e});return d}function Tc(a,b,c){var d=[];a.iter(b,c,function(a){d.push(a.text)});return d}function pa(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function C(a){if(null==a.parent)return null;var b=a.parent;a=P(b.lines,a);for(var c=b.parent;c;b=c,c=c.parent)for(var d=0;c.children[d]!=b;++d)a+=c.children[d].chunkSize();return a+b.first}function Ka(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],
|
249 |
+
f=e.height;if(b<f){a=e;continue a}b-=f;c+=e.chunkSize()}return c}while(!a.lines);for(d=0;d<a.lines.length;++d){e=a.lines[d].height;if(b<e)break;b-=e}return c+d}function tb(a,b){return b>=a.first&&b<a.first+a.size}function Uc(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function p(a,b,c){void 0===c&&(c=null);if(!(this instanceof p))return new p(a,b,c);this.line=a;this.ch=b;this.sticky=c}function x(a,b){return a.line-b.line||a.ch-b.ch}function Vc(a,b){return a.sticky==b.sticky&&0==
|
250 |
+
x(a,b)}function Wc(a){return p(a.line,a.ch)}function jc(a,b){return 0>x(a,b)?b:a}function kc(a,b){return 0>x(a,b)?a:b}function v(a,b){if(b.line<a.first)return p(a.first,0);var c=a.first+a.size-1;if(b.line>c)return p(c,t(a,c).text.length);c=t(a,b.line).text.length;var d=b.ch;c=null==d||d>c?p(b.line,c):0>d?p(b.line,0):b;return c}function $d(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=v(a,b[d]);return c}function lc(a,b,c){this.marker=a;this.from=b;this.to=c}function ub(a,b){if(a)for(var c=0;c<a.length;++c){var d=
|
251 |
+
a[c];if(d.marker==b)return d}}function Xc(a,b){if(b.full)return null;var c=tb(a,b.from.line)&&t(a,b.from.line).markedSpans,d=tb(a,b.to.line)&&t(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==x(b.from,b.to),h;if(c)for(var k=0;k<c.length;++k){var l=c[k],m=l.marker;if(null==l.from||(m.inclusiveLeft?l.from<=e:l.from<e)||!(l.from!=e||"bookmark"!=m.type||g&&l.marker.insertLeft)){var r=null==l.to||(m.inclusiveRight?l.to>=e:l.to>e);(h||(h=[])).push(new lc(m,l.from,r?null:l.to))}}c=
|
252 |
+
h;var n;if(d)for(h=0;h<d.length;++h)if(k=d[h],l=k.marker,null==k.to||(l.inclusiveRight?k.to>=f:k.to>f)||k.from==f&&"bookmark"==l.type&&(!g||k.marker.insertLeft))m=null==k.from||(l.inclusiveLeft?k.from<=f:k.from<f),(n||(n=[])).push(new lc(l,m?null:k.from-f,null==k.to?null:k.to-f));d=n;f=1==b.text.length;g=z(b.text).length+(f?e:0);if(c)for(n=0;n<c.length;++n)if(h=c[n],null==h.to)(k=ub(d,h.marker),k)?f&&(h.to=null==k.to?null:k.to+g):h.to=e;if(d)for(e=0;e<d.length;++e)n=d[e],null!=n.to&&(n.to+=g),null==
|
253 |
+
n.from?ub(c,n.marker)||(n.from=g,f&&(c||(c=[])).push(n)):(n.from+=g,f&&(c||(c=[])).push(n));c&&(c=ae(c));d&&d!=c&&(d=ae(d));e=[c];if(!f){f=b.text.length-2;var q;if(0<f&&c)for(g=0;g<c.length;++g)null==c[g].to&&(q||(q=[])).push(new lc(c[g].marker,null,null));for(c=0;c<f;++c)e.push(q);e.push(d)}return e}function ae(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&!1!==c.marker.clearWhenEmpty&&a.splice(b--,1)}return a.length?a:null}function lg(a,b,c){var d=null;a.iter(b.line,c.line+
|
254 |
+
1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=P(d,c)||(d||(d=[])).push(c)}});if(!d)return null;a=[{from:b,to:c}];for(b=0;b<d.length;++b){c=d[b];for(var e=c.find(0),f=0;f<a.length;++f){var g=a[f];if(!(0>x(g.to,e.from)||0<x(g.from,e.to))){var h=[f,1],k=x(g.from,e.from),l=x(g.to,e.to);(0>k||!c.inclusiveLeft&&!k)&&h.push({from:g.from,to:e.from});(0<l||!c.inclusiveRight&&!l)&&h.push({from:e.to,to:g.to});a.splice.apply(a,h);f+=h.length-
|
255 |
+
3}}}return a}function be(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function ce(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function de(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;c=a.find();var d=b.find(),e=x(c.from,d.from)||(a.inclusiveLeft?-1:0)-(b.inclusiveLeft?-1:0);return e?-e:(c=x(c.to,d.to)||(a.inclusiveRight?1:0)-(b.inclusiveRight?1:0))?c:b.id-a.id}function La(a,b){var c=Ba&&a.markedSpans;
|
256 |
+
if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed&&null==(b?d.from:d.to)&&(!f||0>de(f,d.marker)))var f=d.marker;return f}function ee(a,b,c,d,e){a=t(a,b);if(a=Ba&&a.markedSpans)for(b=0;b<a.length;++b){var f=a[b];if(f.marker.collapsed){var g=f.marker.find(0),h=x(g.from,c)||(f.marker.inclusiveLeft?-1:0)-(e.inclusiveLeft?-1:0),k=x(g.to,d)||(f.marker.inclusiveRight?1:0)-(e.inclusiveRight?1:0);if(!(0<=h&&0>=k||0>=h&&0<=k)&&(0>=h&&(f.marker.inclusiveRight&&e.inclusiveLeft?0<=x(g.to,c):0<x(g.to,
|
257 |
+
c))||0<=h&&(f.marker.inclusiveRight&&e.inclusiveLeft?0>=x(g.from,d):0>x(g.from,d))))return!0}}}function qa(a){for(var b;b=La(a,!0);)a=b.find(-1,!0).line;return a}function Yc(a,b){var c=t(a,b),d=qa(c);return c==d?b:C(d)}function fe(a,b){if(b>a.lastLine())return b;var c=t(a,b),d;if(!Ma(a,c))return b;for(;d=La(c,!1);)c=d.find(1,!0).line;return C(c)+1}function Ma(a,b){var c=Ba&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed&&(null==d.from||!d.marker.widgetNode&&0==d.from&&
|
258 |
+
d.marker.inclusiveLeft&&Zc(a,b,d)))return!0}function Zc(a,b,c){if(null==c.to)return b=c.marker.find(1,!0),Zc(a,b.line,ub(b.line.markedSpans,c.marker));if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var d,e=0;e<b.markedSpans.length;++e)if(d=b.markedSpans[e],d.marker.collapsed&&!d.marker.widgetNode&&d.from==c.to&&(null==d.to||d.to!=c.from)&&(d.marker.inclusiveLeft||c.marker.inclusiveRight)&&Zc(a,b,d))return!0}function ra(a){a=qa(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=
|
259 |
+
c.lines[d];if(e==a)break;else b+=e.height}for(a=c.parent;a;c=a,a=c.parent)for(d=0;d<a.children.length&&(e=a.children[d],e!=c);++d)b+=e.height;return b}function mc(a){if(0==a.height)return 0;for(var b=a.text.length,c,d=a;c=La(d,!0);)c=c.find(0,!0),d=c.from.line,b+=c.from.ch-c.to.ch;for(d=a;c=La(d,!1);)a=c.find(0,!0),b-=d.text.length-a.from.ch,d=a.to.line,b+=d.text.length-a.to.ch;return b}function $c(a){var b=a.display;a=a.doc;b.maxLine=t(a,a.first);b.maxLineLength=mc(b.maxLine);b.maxLineChanged=!0;
|
260 |
+
a.iter(function(a){var d=mc(a);d>b.maxLineLength&&(b.maxLineLength=d,b.maxLine=a)})}function mg(a,b,c,d){if(!a)return d(b,c,"ltr",0);for(var e=!1,f=0;f<a.length;++f){var g=a[f];if(g.from<c&&g.to>b||b==c&&g.to==b)d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr",f),e=!0}e||d(b,c,"ltr")}function vb(a,b,c){var d;wb=null;for(var e=0;e<a.length;++e){var f=a[e];if(f.from<b&&f.to>b)return e;f.to==b&&(f.from!=f.to&&"before"==c?d=e:wb=e);f.from==b&&(f.from!=f.to&&"before"!=c?d=e:wb=e)}return null!=
|
261 |
+
d?d:wb}function wa(a,b){var c=a.order;null==c&&(c=a.order=ng(a.text,b));return c}function ea(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=(a=a._handlers)&&a[b];d&&(c=P(d,c),-1<c&&(a[b]=d.slice(0,c).concat(d.slice(c+1))))}}function J(a,b){var c=a._handlers&&a._handlers[b]||nc;if(c.length)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)}function M(a,b,c){"string"==typeof b&&(b={type:b,preventDefault:function(){this.defaultPrevented=
|
262 |
+
!0}});J(a,c||b.type,a,b);return ad(b)||b.codemirrorIgnore}function ge(a){var b=a._handlers&&a._handlers.cursorActivity;if(b){a=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]);for(var c=0;c<b.length;++c)-1==P(a,b[c])&&a.push(b[c])}}function ja(a,b){return 0<(a._handlers&&a._handlers[b]||nc).length}function bb(a){a.prototype.on=function(a,c){w(this,a,c)};a.prototype.off=function(a,c){ea(this,a,c)}}function Y(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function he(a){a.stopPropagation?
|
263 |
+
a.stopPropagation():a.cancelBubble=!0}function ad(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function xb(a){Y(a);he(a)}function ie(a){var b=a.which;null==b&&(a.button&1?b=1:a.button&2?b=3:a.button&4&&(b=2));ka&&a.ctrlKey&&1==b&&(b=3);return b}function og(a){if(null==bd){var b=u("span","\u200b");D(a,u("span",[b,document.createTextNode("x")]));0!=a.firstChild.offsetHeight&&(bd=1>=b.offsetWidth&&2<b.offsetHeight&&!(B&&8>E))}a=bd?u("span","\u200b"):u("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");
|
264 |
+
a.setAttribute("cm-text","");return a}function pg(a,b){2<arguments.length&&(b.dependencies=Array.prototype.slice.call(arguments,2));cd[a]=b}function oc(a){if("string"==typeof a&&cb.hasOwnProperty(a))a=cb[a];else if(a&&"string"==typeof a.name&&cb.hasOwnProperty(a.name)){var b=cb[a.name];"string"==typeof b&&(b={name:b});a=Xd(b,a);a.name=b.name}else{if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return oc("application/xml");if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return oc("application/json")}return"string"==
|
265 |
+
typeof a?{name:a}:a||{name:"null"}}function dd(a,b){b=oc(b);var c=cd[b.name];if(!c)return dd(a,"text/plain");c=c(a,b);if(db.hasOwnProperty(b.name)){var d=db[b.name],e;for(e in d)d.hasOwnProperty(e)&&(c.hasOwnProperty(e)&&(c["_"+e]=c[e]),c[e]=d[e])}c.name=b.name;b.helperType&&(c.helperType=b.helperType);if(b.modeProps)for(var f in b.modeProps)c[f]=b.modeProps[f];return c}function qg(a,b){var c=db.hasOwnProperty(a)?db[a]:db[a]={};Ia(b,c)}function Na(a,b){if(!0===b)return b;if(a.copyState)return a.copyState(b);
|
266 |
+
var c={},d;for(d in b){var e=b[d];e instanceof Array&&(e=e.concat([]));c[d]=e}return c}function ed(a,b){for(var c;a.innerMode;){c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state;a=c.mode}return c||{mode:a,state:b}}function je(a,b,c){return a.startState?a.startState(b,c):!0}function ke(a,b,c,d){var e=[a.state.modeGen],f={};le(a,b.text,a.doc.mode,c,function(a,b){return e.push(a,b)},f,d);var g=c.state;d=function(d){c.baseTokens=e;var h=a.state.overlays[d],k=1,r=0;c.state=!0;le(a,b.text,h.mode,c,function(a,
|
267 |
+
b){for(var d=k;r<a;){var c=e[k];c>a&&e.splice(k,1,a,e[k+1],c);k+=2;r=Math.min(a,c)}if(b)if(h.opaque)e.splice(d,k-d,a,"overlay "+b),k=d+2;else for(;d<k;d+=2)c=e[d+1],e[d+1]=(c?c+" ":"")+"overlay "+b},f);c.state=g;c.baseTokens=null;c.baseTokenPos=1};for(var h=0;h<a.state.overlays.length;++h)d(h);return{styles:e,classes:f.bgClass||f.textClass?f:null}}function me(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=yb(a,C(b)),e=b.text.length>a.options.maxHighlightLength&&Na(a.doc.mode,d.state),f=
|
268 |
+
ke(a,b,d);e&&(d.state=e);b.stateAfter=d.save(!e);b.styles=f.styles;f.classes?b.styleClasses=f.classes:b.styleClasses&&(b.styleClasses=null);c===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return b.styles}function yb(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return new sa(d,!0,b);var f=rg(a,b,c),g=f>d.first&&t(d,f-1).stateAfter,h=g?sa.fromSaved(d,g,f):new sa(d,je(d.mode),f);d.iter(f,b,function(d){fd(a,d.text,h);var c=h.line;d.stateAfter=
|
269 |
+
c==b-1||0==c%5||c>=e.viewFrom&&c<e.viewTo?h.save():null;h.nextLine()});c&&(d.modeFrontier=h.line);return h}function fd(a,b,c,d){var e=a.doc.mode;a=new K(b,a.options.tabSize,c);a.start=a.pos=d||0;for(""==b&&ne(e,c.state);!a.eol();)gd(e,a,c.state),a.start=a.pos}function ne(a,b){if(a.blankLine)return a.blankLine(b);if(a.innerMode){var c=ed(a,b);if(c.mode.blankLine)return c.mode.blankLine(c.state)}}function gd(a,b,c,d){for(var e=0;10>e;e++){d&&(d[0]=ed(a,c).mode);var f=a.token(b,c);if(b.pos>b.start)return f}throw Error("Mode "+
|
270 |
+
a.name+" failed to advance stream.");}function oe(a,b,c,d){var e=a.doc,f=e.mode;b=v(e,b);var g=t(e,b.line);c=yb(a,b.line,c);a=new K(g.text,a.options.tabSize,c);var h;for(d&&(h=[]);(d||a.pos<b.ch)&&!a.eol();){a.start=a.pos;var k=gd(f,a,c.state);d&&h.push(new pe(a,k,Na(e.mode,c.state)))}return d?h:new pe(a,k,c.state)}function qe(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?
|
271 |
+
b[d]=c[2]:(new RegExp("(?:^|s)"+c[2]+"(?:$|s)")).test(b[d])||(b[d]+=" "+c[2])}return a}function le(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var k=0,l=null,m=new K(b,a.options.tabSize,d),r=a.options.addModeClass&&[null];for(""==b&&qe(ne(c,d.state),f);!m.eol();){if(m.pos>a.options.maxHighlightLength){h=!1;g&&fd(a,b,d,m.pos);m.pos=b.length;var n=null}else n=qe(gd(c,m,d.state,r),f);if(r){var q=r[0].name;q&&(n="m-"+(n?q+" "+n:q))}if(!h||l!=n){for(;k<m.start;)k=Math.min(m.start,
|
272 |
+
k+5E3),e(k,l);l=n}m.start=m.pos}for(;k<m.pos;)a=Math.min(m.pos,k+5E3),e(a,l),k=a}function rg(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1E3:100);b>g;--b){if(b<=f.first)return f.first;var h=t(f,b-1),k=h.stateAfter;if(k&&(!c||b+(k instanceof pc?k.lookAhead:0)<=f.modeFrontier))return b;h=ia(h.text,null,a.options.tabSize);if(null==e||d>h)e=b-1,d=h}return e}function sg(a,b){a.modeFrontier=Math.min(a.modeFrontier,b);if(!(a.highlightFrontier<b-10)){for(var c=a.first,d=b-1;d>c;d--){var e=t(a,
|
273 |
+
d).stateAfter;if(e&&(!(e instanceof pc)||d+e.lookAhead<b)){c=d+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,c)}}function re(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?tg:ug;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function se(a,b){var c=U("span",null,null,T?"padding-right: .1px":null);c={pre:U("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:(B||T)&&a.getOption("lineWrapping")};b.measure={};for(var d=0;d<=(b.rest?b.rest.length:
|
274 |
+
0);d++){var e=d?b.rest[d-1]:b.line,f=void 0;c.pos=0;c.addToken=vg;var g=a.display.measure;if(null!=hd)g=hd;else{var h=D(g,document.createTextNode("A\u062eA")),k=zb(h,0,1).getBoundingClientRect();h=zb(h,1,2).getBoundingClientRect();I(g);g=k&&k.left!=k.right?hd=3>h.right-k.right:!1}g&&(f=wa(e,a.doc.direction))&&(c.addToken=wg(c.addToken,f));c.map=[];var l=b!=a.display.externalMeasured&&C(e);a:{var m=h=k=g=void 0,r=void 0,n=void 0,q=void 0;f=c;l=me(a,e,l);var H=e.markedSpans,p=e.text,t=0;if(H)for(var u=
|
275 |
+
p.length,G=0,w=1,x="",v=0;;){if(v==G){r=m=h=k=n="";g=null;v=Infinity;for(var A=[],ba=void 0,z=0;z<H.length;++z){var Q=H[z],y=Q.marker;"bookmark"==y.type&&Q.from==G&&y.widgetNode?A.push(y):Q.from<=G&&(null==Q.to||Q.to>G||y.collapsed&&Q.to==G&&Q.from==G)?(null!=Q.to&&Q.to!=G&&v>Q.to&&(v=Q.to,m=""),y.className&&(r+=" "+y.className),y.css&&(n=(n?n+";":"")+y.css),y.startStyle&&Q.from==G&&(h+=" "+y.startStyle),y.endStyle&&Q.to==v&&(ba||(ba=[])).push(y.endStyle,Q.to),y.title&&!k&&(k=y.title),y.collapsed&&
|
276 |
+
(!g||0>de(g.marker,y))&&(g=Q)):Q.from>G&&v>Q.from&&(v=Q.from)}if(ba)for(z=0;z<ba.length;z+=2)ba[z+1]==v&&(m+=" "+ba[z]);if(!g||g.from==G)for(ba=0;ba<A.length;++ba)te(f,0,A[ba]);if(g&&(g.from||0)==G){te(f,(null==g.to?u+1:g.to)-G,g.marker,null==g.from);if(null==g.to)break a;g.to==G&&(g=!1)}}if(G>=u)break;for(A=Math.min(u,v);;){if(x){ba=G+x.length;g||(z=ba>A?x.slice(0,A-G):x,f.addToken(f,z,q?q+r:r,h,G+z.length==v?m:"",k,n));if(ba>=A){x=x.slice(A-G);G=A;break}G=ba;h=""}x=p.slice(t,t=l[w++]);q=re(l[w++],
|
277 |
+
f.cm.options)}}else for(g=1;g<l.length;g+=2)f.addToken(f,p.slice(t,t=l[g]),re(l[g+1],f.cm.options))}e.styleClasses&&(e.styleClasses.bgClass&&(c.bgClass=Nc(e.styleClasses.bgClass,c.bgClass||"")),e.styleClasses.textClass&&(c.textClass=Nc(e.styleClasses.textClass,c.textClass||"")));0==c.map.length&&c.map.push(0,0,c.content.appendChild(og(a.display.measure)));0==d?(b.measure.map=c.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(c.map),(b.measure.caches||(b.measure.caches=[])).push({}))}T&&
|
278 |
+
(d=c.content.lastChild,/\bcm-tab\b/.test(d.className)||d.querySelector&&d.querySelector(".cm-tab"))&&(c.content.className="cm-tab-wrap-hack");J(a,"renderLine",a,b.line,c.pre);c.pre.className&&(c.textClass=Nc(c.pre.className,c.textClass||""));return c}function xg(a){var b=u("span","\u2022","cm-invalidchar");b.title="\\u"+a.charCodeAt(0).toString(16);b.setAttribute("aria-label",b.title);return b}function vg(a,b,c,d,e,f,g){if(b){if(a.splitSpaces){var h=a.trailingSpace;if(1<b.length&&!/ /.test(b))h=
|
279 |
+
b;else{for(var k="",l=0;l<b.length;l++){var m=b.charAt(l);" "!=m||!h||l!=b.length-1&&32!=b.charCodeAt(l+1)||(m="\u00a0");k+=m;h=" "==m}h=k}}else h=b;k=h;l=a.cm.state.specialChars;m=!1;if(l.test(b)){h=document.createDocumentFragment();for(var r=0;;){l.lastIndex=r;var n=l.exec(b),q=n?n.index-r:b.length-r;if(q){var H=document.createTextNode(k.slice(r,r+q));B&&9>E?h.appendChild(u("span",[H])):h.appendChild(H);a.map.push(a.pos,a.pos+q,H);a.col+=q;a.pos+=q}if(!n)break;r+=q+1;"\t"==n[0]?(n=a.cm.options.tabSize,
|
280 |
+
n-=a.col%n,q=h.appendChild(u("span",Qc(n),"cm-tab")),q.setAttribute("role","presentation"),q.setAttribute("cm-text","\t"),a.col+=n):("\r"==n[0]||"\n"==n[0]?(q=h.appendChild(u("span","\r"==n[0]?"\u240d":"\u2424","cm-invalidchar")),q.setAttribute("cm-text",n[0])):(q=a.cm.options.specialCharPlaceholder(n[0]),q.setAttribute("cm-text",n[0]),B&&9>E?h.appendChild(u("span",[q])):h.appendChild(q)),a.col+=1);a.map.push(a.pos,a.pos+1,q);a.pos++}}else a.col+=b.length,h=document.createTextNode(k),a.map.push(a.pos,
|
281 |
+
a.pos+b.length,h),B&&9>E&&(m=!0),a.pos+=b.length;a.trailingSpace=32==k.charCodeAt(b.length-1);if(c||d||e||m||g)return b=c||"",d&&(b+=d),e&&(b+=e),d=u("span",[h],b,g),f&&(d.title=f),a.content.appendChild(d);a.content.appendChild(h)}}function wg(a,b){return function(c,d,e,f,g,h,k){e=e?e+" cm-force-border":"cm-force-border";for(var l=c.pos,m=l+d.length;;){for(var r=void 0,n=0;n<b.length&&!(r=b[n],r.to>l&&r.from<=l);n++);if(r.to>=m)return a(c,d,e,f,g,h,k);a(c,d.slice(0,r.to-l),e,f,null,h,k);f=null;d=
|
282 |
+
d.slice(r.to-l);l=r.to}}}function te(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e);!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id));e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e));a.pos+=b;a.trailingSpace=!1}function ue(a,b,c){for(var d=this.line=b,e;d=La(d,!1);)d=d.find(1,!0).line,(e||(e=[])).push(d);this.size=(this.rest=e)?C(z(this.rest))-c+1:1;this.node=this.text=null;
|
283 |
+
this.hidden=Ma(a,b)}function qc(a,b,c){var d=[],e;for(e=b;e<c;)b=new ue(a.doc,t(a.doc,e),e),e+=b.size,d.push(b);return d}function yg(a,b){var c=a.ownsGroup;if(c)try{var d=c.delayedCallbacks,e=0;do{for(;e<d.length;e++)d[e].call(null);for(var f=0;f<c.ops.length;f++){var g=c.ops[f];if(g.cursorActivityHandlers)for(;g.cursorActivityCalled<g.cursorActivityHandlers.length;)g.cursorActivityHandlers[g.cursorActivityCalled++].call(null,g.cm)}}while(e<d.length)}finally{eb=null,b(c)}}function R(a,b){var c=a._handlers&&
|
284 |
+
a._handlers[b]||nc;if(c.length){var d=Array.prototype.slice.call(arguments,2);if(eb)var e=eb.delayedCallbacks;else Ab?e=Ab:(e=Ab=[],setTimeout(zg,0));for(var f=function(a){e.push(function(){return c[a].apply(null,d)})},g=0;g<c.length;++g)f(g)}}function zg(){var a=Ab;Ab=null;for(var b=0;b<a.length;++b)a[b]()}function ve(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];if("text"==f){f=a;var g=b,h=g.text.className,k=we(f,g);g.text==g.node&&(g.node=k.pre);g.text.parentNode.replaceChild(k.pre,
|
285 |
+
g.text);g.text=k.pre;k.bgClass!=g.bgClass||k.textClass!=g.textClass?(g.bgClass=k.bgClass,g.textClass=k.textClass,id(f,g)):h&&(g.text.className=h)}else if("gutter"==f)xe(a,b,c,d);else if("class"==f)id(a,b);else if("widget"==f){f=a;g=b;h=d;g.alignable&&(g.alignable=null);k=g.node.firstChild;for(var l;k;k=l)l=k.nextSibling,"CodeMirror-linewidget"==k.className&&g.node.removeChild(k);ye(f,g,h)}}b.changes=null}function Bb(a){a.node==a.text&&(a.node=u("div",null,null,"position: relative"),a.text.parentNode&&
|
286 |
+
a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),B&&8>E&&(a.node.style.zIndex=2));return a.node}function we(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):se(a,b)}function id(a,b){var c=b.bgClass?b.bgClass+" "+(b.line.bgClass||""):b.line.bgClass;c&&(c+=" CodeMirror-linebackground");if(b.background)c?b.background.className=c:(b.background.parentNode.removeChild(b.background),b.background=null);else if(c){var d=
|
287 |
+
Bb(b);b.background=d.insertBefore(u("div",null,c),d.firstChild);a.display.input.setUneditable(b.background)}b.line.wrapClass?Bb(b).className=b.line.wrapClass:b.node!=b.text&&(b.node.className="");b.text.className=(b.textClass?b.textClass+" "+(b.line.textClass||""):b.line.textClass)||""}function xe(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);b.gutterBackground&&(b.node.removeChild(b.gutterBackground),b.gutterBackground=null);if(b.line.gutterClass){var e=Bb(b);b.gutterBackground=
|
288 |
+
u("div",null,"CodeMirror-gutter-background "+b.line.gutterClass,"left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px");a.display.input.setUneditable(b.gutterBackground);e.insertBefore(b.gutterBackground,b.text)}e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=Bb(b),g=b.gutter=u("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px");a.display.input.setUneditable(g);f.insertBefore(g,b.text);
|
289 |
+
b.line.gutterClass&&(g.className+=" "+b.line.gutterClass);!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(u("div",Uc(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px")));if(e)for(b=0;b<a.options.gutters.length;++b)c=a.options.gutters[b],(f=e.hasOwnProperty(c)&&e[c])&&g.appendChild(u("div",[f],"CodeMirror-gutter-elt","left: "+d.gutterLeft[c]+"px; width: "+d.gutterWidth[c]+
|
290 |
+
"px"))}}function Ag(a,b,c,d){var e=we(a,b);b.text=b.node=e.pre;e.bgClass&&(b.bgClass=e.bgClass);e.textClass&&(b.textClass=e.textClass);id(a,b);xe(a,b,c,d);ye(a,b,d);return b.node}function ye(a,b,c){ze(a,b.line,b,c,!0);if(b.rest)for(var d=0;d<b.rest.length;d++)ze(a,b.rest[d],b,c,!1)}function ze(a,b,c,d,e){if(b.widgets){var f=Bb(c),g=0;for(b=b.widgets;g<b.length;++g){var h=b[g],k=u("div",[h.node],"CodeMirror-linewidget");h.handleMouseEvents||k.setAttribute("cm-ignore-events","true");var l=h,m=k,r=d;
|
291 |
+
if(l.noHScroll){(c.alignable||(c.alignable=[])).push(m);var n=r.wrapperWidth;m.style.left=r.fixedPos+"px";l.coverGutter||(n-=r.gutterTotalWidth,m.style.paddingLeft=r.gutterTotalWidth+"px");m.style.width=n+"px"}l.coverGutter&&(m.style.zIndex=5,m.style.position="relative",l.noHScroll||(m.style.marginLeft=-r.gutterTotalWidth+"px"));a.display.input.setUneditable(k);e&&h.above?f.insertBefore(k,c.gutter||c.text):f.appendChild(k);R(h,"redraw")}}}function Cb(a){if(null!=a.height)return a.height;var b=a.doc.cm;
|
292 |
+
if(!b)return 0;if(!za(document.body,a.node)){var c="position: relative;";a.coverGutter&&(c+="margin-left: -"+b.display.gutters.offsetWidth+"px;");a.noHScroll&&(c+="width: "+b.display.wrapper.clientWidth+"px;");D(b.display.measure,u("div",[a.node],null,c))}return a.height=a.node.parentNode.offsetHeight}function xa(a,b){for(var c=b.target||b.srcElement;c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}function jd(a){return a.mover.offsetHeight-
|
293 |
+
a.lineSpace.offsetHeight}function Ae(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=D(a.measure,u("pre","x"));b=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle;b={left:parseInt(b.paddingLeft),right:parseInt(b.paddingRight)};isNaN(b.left)||isNaN(b.right)||(a.cachedPaddingH=b);return b}function ta(a){return 30-a.display.nativeBarWidth}function Oa(a){return a.display.scroller.clientWidth-ta(a)-a.display.barWidth}function kd(a){return a.display.scroller.clientHeight-ta(a)-a.display.barHeight}
|
294 |
+
function Be(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(b=0;b<a.rest.length;b++)if(C(a.rest[b])>c)return{map:a.measure.maps[b],cache:a.measure.caches[b],before:!0}}function ld(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Pa(a,b)];var c=a.display.externalMeasured;if(c&&b>=c.lineN&&b<c.lineN+c.size)return c}function Qa(a,b){var c=C(b),d=ld(a,
|
295 |
+
c);d&&!d.text?d=null:d&&d.changes&&(ve(a,d,c,md(a)),a.curOp.forceUpdate=!0);if(!d){var e=qa(b);d=C(e);e=a.display.externalMeasured=new ue(a.doc,e,d);e.lineN=d;d=e.built=se(a,e);e.text=d.pre;D(a.display.lineMeasure,d.pre);d=e}c=Be(d,b,c);return{line:b,view:d,rect:null,map:c.map,cache:c.cache,before:c.before,hasHeights:!1}}function la(a,b,c,d,e){b.before&&(c=-1);var f=c+(d||"");if(b.cache.hasOwnProperty(f))a=b.cache[f];else{b.rect||(b.rect=b.view.text.getBoundingClientRect());if(!b.hasHeights){var g=
|
296 |
+
b.view,h=b.rect,k=a.options.lineWrapping,l=k&&Oa(a);if(!g.measure.heights||k&&g.measure.width!=l){var m=g.measure.heights=[];if(k)for(g.measure.width=l,g=g.text.firstChild.getClientRects(),k=0;k<g.length-1;k++){l=g[k];var r=g[k+1];2<Math.abs(l.bottom-r.bottom)&&m.push((l.bottom+r.top)/2-h.top)}m.push(h.bottom-h.top)}b.hasHeights=!0}m=d;g=Ce(b.map,c,m);d=g.node;h=g.start;k=g.end;c=g.collapse;if(3==d.nodeType){for(var n=0;4>n;n++){for(;h&&Sc(b.line.text.charAt(g.coverStart+h));)--h;for(;g.coverStart+
|
297 |
+
k<g.coverEnd&&Sc(b.line.text.charAt(g.coverStart+k));)++k;if(B&&9>E&&0==h&&k==g.coverEnd-g.coverStart)var q=d.parentNode.getBoundingClientRect();else{q=zb(d,h,k).getClientRects();k=De;if("left"==m)for(l=0;l<q.length&&(k=q[l]).left==k.right;l++);else for(l=q.length-1;0<=l&&(k=q[l]).left==k.right;l--);q=k}if(q.left||q.right||0==h)break;k=h;--h;c="right"}B&&11>E&&((n=!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI)||(null!=nd?n=nd:(m=D(a.display.measure,u("span","x")),
|
298 |
+
n=m.getBoundingClientRect(),m=zb(m,0,1).getBoundingClientRect(),n=nd=1<Math.abs(n.left-m.left)),n=!n),n||(n=screen.logicalXDPI/screen.deviceXDPI,m=screen.logicalYDPI/screen.deviceYDPI,q={left:q.left*n,right:q.right*n,top:q.top*m,bottom:q.bottom*m}))}else 0<h&&(c=m="right"),q=a.options.lineWrapping&&1<(n=d.getClientRects()).length?n["right"==m?n.length-1:0]:d.getBoundingClientRect();!(B&&9>E)||h||q&&(q.left||q.right)||(q=(q=d.parentNode.getClientRects()[0])?{left:q.left,right:q.left+Db(a.display),
|
299 |
+
top:q.top,bottom:q.bottom}:De);d=q.top-b.rect.top;h=q.bottom-b.rect.top;n=(d+h)/2;m=b.view.measure.heights;for(g=0;g<m.length-1&&!(n<m[g]);g++);c={left:("right"==c?q.right:q.left)-b.rect.left,right:("left"==c?q.left:q.right)-b.rect.left,top:g?m[g-1]:0,bottom:m[g]};q.left||q.right||(c.bogus=!0);a.options.singleCursorHeightPerLine||(c.rtop=d,c.rbottom=h);a=c;a.bogus||(b.cache[f]=a)}return{left:a.left,right:a.right,top:e?a.rtop:a.top,bottom:e?a.rbottom:a.bottom}}function Ce(a,b,c){for(var d,e,f,g,h,
|
300 |
+
k,l=0;l<a.length;l+=3){h=a[l];k=a[l+1];if(b<h)e=0,f=1,g="left";else if(b<k)e=b-h,f=e+1;else if(l==a.length-3||b==k&&a[l+3]>b)f=k-h,e=f-1,b>=k&&(g="right");if(null!=e){d=a[l+2];h==k&&c==(d.insertLeft?"left":"right")&&(g=c);if("left"==c&&0==e)for(;l&&a[l-2]==a[l-3]&&a[l-1].insertLeft;)d=a[(l-=3)+2],g="left";if("right"==c&&e==k-h)for(;l<a.length-3&&a[l+3]==a[l+4]&&!a[l+5].insertLeft;)d=a[(l+=3)+2],g="right";break}}return{node:d,start:e,end:f,collapse:g,coverStart:h,coverEnd:k}}function Ee(a){if(a.measure&&
|
301 |
+
(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function Fe(a){a.display.externalMeasure=null;I(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)Ee(a.display.view[b])}function Eb(a){Fe(a);a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null;a.options.lineWrapping||(a.display.maxLineChanged=!0);a.display.lineNumChars=null}function Ge(){return rc&&sc?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):
|
302 |
+
window.pageXOffset||(document.documentElement||document.body).scrollLeft}function He(){return rc&&sc?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function od(a){var b=0;if(a.widgets)for(var c=0;c<a.widgets.length;++c)a.widgets[c].above&&(b+=Cb(a.widgets[c]));return b}function tc(a,b,c,d,e){e||(e=od(b),c.top+=e,c.bottom+=e);if("line"==d)return c;d||(d="local");b=ra(b);b="local"==
|
303 |
+
d?b+a.display.lineSpace.offsetTop:b-a.display.viewOffset;if("page"==d||"window"==d)a=a.display.lineSpace.getBoundingClientRect(),b+=a.top+("window"==d?0:He()),d=a.left+("window"==d?0:Ge()),c.left+=d,c.right+=d;c.top+=b;c.bottom+=b;return c}function Ie(a,b,c){if("div"==c)return b;var d=b.left;b=b.top;"page"==c?(d-=Ge(),b-=He()):"local"!=c&&c||(c=a.display.sizer.getBoundingClientRect(),d+=c.left,b+=c.top);a=a.display.lineSpace.getBoundingClientRect();return{left:d-a.left,top:b-a.top}}function pd(a,
|
304 |
+
b,c,d,e){d||(d=t(a.doc,b.line));var f=d;b=b.ch;d=la(a,Qa(a,d),b,e);return tc(a,f,d,c)}function ma(a,b,c,d,e,f){function g(b,g){var h=la(a,e,b,g?"right":"left",f);g?h.left=h.right:h.right=h.left;return tc(a,d,h,c)}function h(a,b,d){return g(d?a-1:a,1==k[b].level!=d)}d=d||t(a.doc,b.line);e||(e=Qa(a,d));var k=wa(d,a.doc.direction),l=b.ch;b=b.sticky;l>=d.text.length?(l=d.text.length,b="before"):0>=l&&(l=0,b="after");if(!k)return g("before"==b?l-1:l,"before"==b);var m=vb(k,l,b),r=wb;m=h(l,m,"before"==
|
305 |
+
b);null!=r&&(m.other=h(l,r,"before"!=b));return m}function Je(a,b){var c=0;b=v(a.doc,b);a.options.lineWrapping||(c=Db(a.display)*b.ch);var d=t(a.doc,b.line),e=ra(d)+a.display.lineSpace.offsetTop;return{left:c,right:c,top:e,bottom:e+d.height}}function qd(a,b,c,d,e){a=p(a,b,c);a.xRel=e;d&&(a.outside=!0);return a}function rd(a,b,c){var d=a.doc;c+=a.display.viewOffset;if(0>c)return qd(d.first,0,null,!0,-1);var e=Ka(d,c),f=d.first+d.size-1;if(e>f)return qd(d.first+d.size-1,t(d,f).text.length,null,!0,1);
|
306 |
+
0>b&&(b=0);for(d=t(d,e);;)if(e=Bg(a,d,e,b,c),f=(d=La(d,!1))&&d.find(0,!0),d&&(e.ch>f.from.ch||e.ch==f.from.ch&&0<e.xRel))e=C(d=f.to.line);else return e}function Ke(a,b,c,d){d-=od(b);b=b.text.length;var e=rb(function(b){return la(a,c,b-1).bottom<=d},b,0);b=rb(function(b){return la(a,c,b).top>d},e,b);return{begin:e,end:b}}function Le(a,b,c,d){c||(c=Qa(a,b));d=tc(a,b,la(a,c,d),"line").top;return Ke(a,b,c,d)}function sd(a,b,c,d){return a.bottom<=c?!1:a.top>c?!0:(d?a.left:a.right)>b}function Bg(a,b,c,
|
307 |
+
d,e){e-=ra(b);var f=Qa(a,b),g=od(b),h=0,k=b.text.length,l=!0,m=wa(b,a.doc.direction);m&&(m=(a.options.lineWrapping?Cg:Dg)(a,b,c,f,m,d,e),h=(l=1!=m.level)?m.from:m.to-1,k=l?m.to:m.from-1);var r=null,n=null;m=rb(function(b){var c=la(a,f,b);c.top+=g;c.bottom+=g;if(!sd(c,d,e,!1))return!1;c.top<=e&&c.left<=d&&(r=b,n=c);return!0},h,k);var q=!1;n?(h=d-n.left<n.right-d,l=h==l,m=r+(l?0:1),l=l?"after":"before",h=h?n.left:n.right):(l||m!=k&&m!=h||m++,l=0==m?"after":m==b.text.length?"before":la(a,f,m-(l?1:0)).bottom+
|
308 |
+
g<=e==l?"after":"before",q=ma(a,p(c,m,l),"line",b,f),h=q.left,q=e<q.top||e>=q.bottom);m=Zd(b.text,m,1);return qd(c,m,l,q,d-h)}function Dg(a,b,c,d,e,f,g){var h=rb(function(h){h=e[h];var k=1!=h.level;return sd(ma(a,p(c,k?h.to:h.from,k?"before":"after"),"line",b,d),f,g,!0)},0,e.length-1),k=e[h];if(0<h){var l=1!=k.level;l=ma(a,p(c,l?k.from:k.to,l?"after":"before"),"line",b,d);sd(l,f,g,!0)&&l.top>g&&(k=e[h-1])}return k}function Cg(a,b,c,d,e,f,g){g=Ke(a,b,d,g);c=g.begin;g=g.end;/\s/.test(b.text.charAt(g-
|
309 |
+
1))&&g--;for(var h=b=null,k=0;k<e.length;k++){var l=e[k];if(!(l.from>=g||l.to<=c)){var m=la(a,d,1!=l.level?Math.min(g,l.to)-1:Math.max(c,l.from)).right;m=m<f?f-m+1E9:m-f;if(!b||h>m)b=l,h=m}}b||(b=e[e.length-1]);b.from<c&&(b={from:c,to:b.to,level:b.level});b.to>g&&(b={from:b.from,to:g,level:b.level});return b}function Ra(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==Sa){Sa=u("pre");for(var b=0;49>b;++b)Sa.appendChild(document.createTextNode("x")),Sa.appendChild(u("br"));Sa.appendChild(document.createTextNode("x"))}D(a.measure,
|
310 |
+
Sa);b=Sa.offsetHeight/50;3<b&&(a.cachedTextHeight=b);I(a.measure);return b||1}function Db(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=u("span","xxxxxxxxxx"),c=u("pre",[b]);D(a.measure,c);b=b.getBoundingClientRect();b=(b.right-b.left)/10;2<b&&(a.cachedCharWidth=b);return b||10}function md(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;
|
311 |
+
return{fixedPos:td(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function td(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Me(a){var b=Ra(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/Db(a.display)-3);return function(e){if(Ma(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?
|
312 |
+
f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function ud(a){var b=a.doc,c=Me(a);b.iter(function(a){var b=c(a);b!=a.height&&pa(a,b)})}function Ta(a,b,c,d){var e=a.display;if(!c&&"true"==(b.target||b.srcElement).getAttribute("cm-not-content"))return null;c=e.lineSpace.getBoundingClientRect();try{var f=b.clientX-c.left;var g=b.clientY-c.top}catch(k){return null}b=rd(a,f,g);var h;d&&1==b.xRel&&(h=t(a.doc,b.line).text).length==b.ch&&(d=ia(h,h.length,a.options.tabSize)-h.length,b=p(b.line,Math.max(0,Math.round((f-
|
313 |
+
Ae(a.display).left)/Db(a.display))-d)));return b}function Pa(a,b){if(b>=a.display.viewTo)return null;b-=a.display.viewFrom;if(0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function Fb(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ne(a,b){void 0===b&&(b=!0);for(var c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),f=d.selection=document.createDocumentFragment(),g=0;g<c.sel.ranges.length;g++)if(b||g!=c.sel.primIndex){var h=
|
314 |
+
c.sel.ranges[g];if(!(h.from().line>=a.display.viewTo||h.to().line<a.display.viewFrom)){var k=h.empty();(k||a.options.showCursorWhenSelecting)&&Oe(a,h.head,e);k||Eg(a,h,f)}}return d}function Oe(a,b,c){b=ma(a,b,"div",null,null,!a.options.singleCursorHeightPerLine);var d=c.appendChild(u("div","\u00a0","CodeMirror-cursor"));d.style.left=b.left+"px";d.style.top=b.top+"px";d.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px";b.other&&(a=c.appendChild(u("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor")),
|
315 |
+
a.style.display="",a.style.left=b.other.left+"px",a.style.top=b.other.top+"px",a.style.height=.85*(b.other.bottom-b.other.top)+"px")}function uc(a,b){return a.top-b.top||a.left-b.left}function Eg(a,b,c){function d(a,b,d,c){0>b&&(b=0);b=Math.round(b);c=Math.round(c);h.appendChild(u("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px;\n top: "+b+"px; width: "+(null==d?m-a:d)+"px;\n height: "+(c-b)+"px"))}function e(b,c,e){function f(d,
|
316 |
+
c){return pd(a,p(b,d),"div",k,c)}function h(b,d,c){b=Le(a,k,null,b);d="ltr"==d==("after"==c)?"left":"right";c="after"==c?b.begin:b.end-(/\s/.test(k.text.charAt(b.end-1))?2:1);return f(c,d)[d]}var k=t(g,b),n=k.text.length,q,H,u=wa(k,g.direction);mg(u,c||0,null==e?n:e,function(a,b,g,k){var p="ltr"==g,t=f(a,p?"left":"right"),v=f(b-1,p?"right":"left"),x=null==c&&0==a,w=null==e&&b==n,G=0==k;k=!u||k==u.length-1;3>=v.top-t.top?(b=(r?x:w)&&G?l:(p?t:v).left,d(b,t.top,((r?w:x)&&k?m:(p?v:t).right)-b,t.bottom)):
|
317 |
+
(p?(p=r&&x&&G?l:t.left,x=r?m:h(a,g,"before"),a=r?l:h(b,g,"after"),w=r&&w&&k?m:v.right):(p=r?h(a,g,"before"):l,x=!r&&x&&G?m:t.right,a=!r&&w&&k?l:v.left,w=r?h(b,g,"after"):m),d(p,t.top,x-p,t.bottom),t.bottom<v.top&&d(l,t.bottom,null,v.top),d(a,v.top,w-a,v.bottom));if(!q||0>uc(t,q))q=t;0>uc(v,q)&&(q=v);if(!H||0>uc(t,H))H=t;0>uc(v,H)&&(H=v)});return{start:q,end:H}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),k=Ae(a.display),l=k.left,m=Math.max(f.sizerWidth,Oa(a)-f.sizer.offsetLeft)-k.right,
|
318 |
+
r="ltr"==g.direction;f=b.from();b=b.to();if(f.line==b.line)e(f.line,f.ch,b.ch);else{var n=t(g,f.line);k=t(g,b.line);k=qa(n)==qa(k);f=e(f.line,f.ch,k?n.text.length+1:null).end;b=e(b.line,k?0:null,b.ch).start;k&&(f.top<b.top-2?(d(f.right,f.top,null,f.bottom),d(l,b.top,b.left,b.bottom)):d(f.right,f.top,b.left-f.right,f.bottom));f.bottom<b.top&&d(l,f.bottom,null,b.top)}c.appendChild(h)}function vd(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="";
|
319 |
+
0<a.options.cursorBlinkRate?b.blinker=setInterval(function(){return b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):0>a.options.cursorBlinkRate&&(b.cursorDiv.style.visibility="hidden")}}function Pe(a){a.state.focused||(a.display.input.focus(),wd(a))}function Qe(a){a.state.delayingBlurEvent=!0;setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Gb(a))},100)}function wd(a,b){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1);"nocursor"!=
|
320 |
+
a.options.readOnly&&(a.state.focused||(J(a,"focus",a,b),a.state.focused=!0,Ha(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),T&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),vd(a))}function Gb(a,b){a.state.delayingBlurEvent||(a.state.focused&&(J(a,"blur",a,b),a.state.focused=!1,Ua(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||
|
321 |
+
(a.display.shift=!1)},150))}function vc(a){a=a.display;for(var b=a.lineDiv.offsetTop,c=0;c<a.view.length;c++){var d=a.view[c];if(!d.hidden){if(B&&8>E){var e=d.node.offsetTop+d.node.offsetHeight;var f=e-b;b=e}else f=d.node.getBoundingClientRect(),f=f.bottom-f.top;e=d.line.height-f;2>f&&(f=Ra(a));if(.005<e||-.005>e)if(pa(d.line,f),Re(d.line),d.rest)for(f=0;f<d.rest.length;f++)Re(d.rest[f])}}}function Re(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b){var c=a.widgets[b],d=c.node.parentNode;d&&(c.height=
|
322 |
+
d.offsetHeight)}}function xd(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-a.lineSpace.offsetTop);var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight;d=Ka(b,d);e=Ka(b,e);if(c&&c.ensure){var f=c.ensure.from.line;c=c.ensure.to.line;f<d?(d=f,e=Ka(b,ra(t(b,f))+a.wrapper.clientHeight)):Math.min(c,b.lastLine())>=e&&(d=Ka(b,ra(t(b,c))-a.wrapper.clientHeight),e=c)}return{from:d,to:Math.max(e,d+1)}}function Se(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&
|
323 |
+
a.options.fixedGutter){for(var d=td(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&(c[g].gutter&&(c[g].gutter.style.left=f),c[g].gutterBackground&&(c[g].gutterBackground.style.left=f));var h=c[g].alignable;if(h)for(var k=0;k<h.length;k++)h[k].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function Te(a){if(!a.options.lineNumbers)return!1;var b=a.doc;b=Uc(a.options,b.first+b.size-1);var c=a.display;
|
324 |
+
if(b.length!=c.lineNumChars){var d=c.measure.appendChild(u("div",[u("div",b)],"CodeMirror-linenumber CodeMirror-gutter-elt")),e=d.firstChild.offsetWidth;d=d.offsetWidth-e;c.lineGutter.style.width="";c.lineNumInnerWidth=Math.max(e,c.lineGutter.offsetWidth-d)+1;c.lineNumWidth=c.lineNumInnerWidth+d;c.lineNumChars=c.lineNumInnerWidth?b.length:-1;c.lineGutter.style.width=c.lineNumWidth+"px";yd(a);return!0}return!1}function zd(a,b){var c=a.display,d=Ra(a.display);0>b.top&&(b.top=0);var e=a.curOp&&null!=
|
325 |
+
a.curOp.scrollTop?a.curOp.scrollTop:c.scroller.scrollTop,f=kd(a),g={};b.bottom-b.top>f&&(b.bottom=b.top+f);var h=a.doc.height+jd(c),k=b.top<d;d=b.bottom>h-d;b.top<e?g.scrollTop=k?0:b.top:b.bottom>e+f&&(f=Math.min(b.top,(d?h:b.bottom)-f),f!=e&&(g.scrollTop=f));e=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:c.scroller.scrollLeft;c=Oa(a)-(a.options.fixedGutter?c.gutters.offsetWidth:0);if(f=b.right-b.left>c)b.right=b.left+c;10>b.left?g.scrollLeft=0:b.left<e?g.scrollLeft=Math.max(0,b.left-(f?0:
|
326 |
+
10)):b.right>c+e-3&&(g.scrollLeft=b.right+(f?0:10)-c);return g}function wc(a,b){null!=b&&(xc(a),a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+b)}function fb(a){xc(a);var b=a.getCursor();a.curOp.scrollToPos={from:b,to:b,margin:a.options.cursorScrollMargin}}function Hb(a,b,c){null==b&&null==c||xc(a);null!=b&&(a.curOp.scrollLeft=b);null!=c&&(a.curOp.scrollTop=c)}function xc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=Je(a,b.from),d=Je(a,b.to);Ue(a,
|
327 |
+
c,d,b.margin)}}function Ue(a,b,c,d){b=zd(a,{left:Math.min(b.left,c.left),top:Math.min(b.top,c.top)-d,right:Math.max(b.right,c.right),bottom:Math.max(b.bottom,c.bottom)+d});Hb(a,b.scrollLeft,b.scrollTop)}function Ib(a,b){2>Math.abs(a.doc.scrollTop-b)||(Aa||Ad(a,{top:b}),Ve(a,b,!0),Aa&&Ad(a),Jb(a,100))}function Ve(a,b,c){b=Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,b);if(a.display.scroller.scrollTop!=b||c)a.doc.scrollTop=b,a.display.scrollbars.setScrollTop(b),a.display.scroller.scrollTop!=
|
328 |
+
b&&(a.display.scroller.scrollTop=b)}function Va(a,b,c,d){b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth);(c?b==a.doc.scrollLeft:2>Math.abs(a.doc.scrollLeft-b))&&!d||(a.doc.scrollLeft=b,Se(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function Kb(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+jd(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,
|
329 |
+
clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+ta(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function gb(a,b){b||(b=Kb(a));var c=a.display.barWidth,d=a.display.barHeight;We(a,b);for(var e=0;4>e&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&vc(a),We(a,Kb(a)),c=a.display.barWidth,d=a.display.barHeight}function We(a,b){var c=a.display,d=c.scrollbars.update(b);
|
330 |
+
c.sizer.style.paddingRight=(c.barWidth=d.right)+"px";c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px";c.heightForcer.style.borderBottom=d.bottom+"px solid transparent";d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="";d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+
|
331 |
+
"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function Xe(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&Ua(a.display.wrapper,a.display.scrollbars.addClass));a.display.scrollbars=new Ye[a.options.scrollbarStyle](function(b){a.display.wrapper.insertBefore(b,a.display.scrollbarFiller);w(b,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)});b.setAttribute("cm-not-content","true")},
|
332 |
+
function(b,c){"horizontal"==c?Va(a,b):Ib(a,b)},a);a.display.scrollbars.addClass&&Ha(a.display.wrapper,a.display.scrollbars.addClass)}function Wa(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Fg};a=a.curOp;eb?eb.ops.push(a):a.ownsGroup=eb={ops:[a],delayedCallbacks:[]}}function Xa(a){yg(a.curOp,
|
333 |
+
function(a){for(var b=0;b<a.ops.length;b++)a.ops[b].cm.curOp=null;a=a.ops;for(b=0;b<a.length;b++){var d=a[b],e=d.cm,f=e.display,g=e.display;!g.scrollbarsClipped&&g.scroller.offsetWidth&&(g.nativeBarWidth=g.scroller.offsetWidth-g.scroller.clientWidth,g.heightForcer.style.height=ta(e)+"px",g.sizer.style.marginBottom=-g.nativeBarWidth+"px",g.sizer.style.borderRightWidth=ta(e)+"px",g.scrollbarsClipped=!0);d.updateMaxLine&&$c(e);d.mustUpdate=d.viewChanged||d.forceUpdate||null!=d.scrollTop||d.scrollToPos&&
|
334 |
+
(d.scrollToPos.from.line<f.viewFrom||d.scrollToPos.to.line>=f.viewTo)||f.maxLineChanged&&e.options.lineWrapping;d.update=d.mustUpdate&&new yc(e,d.mustUpdate&&{top:d.scrollTop,ensure:d.scrollToPos},d.forceUpdate)}for(b=0;b<a.length;b++)d=a[b],d.updatedDisplay=d.mustUpdate&&Bd(d.cm,d.update);for(b=0;b<a.length;b++)if(d=a[b],e=d.cm,f=e.display,d.updatedDisplay&&vc(e),d.barMeasure=Kb(e),f.maxLineChanged&&!e.options.lineWrapping&&(g=f.maxLine.text.length,g=la(e,Qa(e,f.maxLine),g,void 0),d.adjustWidthTo=
|
335 |
+
g.left+3,e.display.sizerWidth=d.adjustWidthTo,d.barMeasure.scrollWidth=Math.max(f.scroller.clientWidth,f.sizer.offsetLeft+d.adjustWidthTo+ta(e)+e.display.barWidth),d.maxScrollLeft=Math.max(0,f.sizer.offsetLeft+d.adjustWidthTo-Oa(e))),d.updatedDisplay||d.selectionChanged)d.preparedSelection=f.input.prepareSelection();for(b=0;b<a.length;b++)d=a[b],e=d.cm,null!=d.adjustWidthTo&&(e.display.sizer.style.minWidth=d.adjustWidthTo+"px",d.maxScrollLeft<e.doc.scrollLeft&&Va(e,Math.min(e.display.scroller.scrollLeft,
|
336 |
+
d.maxScrollLeft),!0),e.display.maxLineChanged=!1),f=d.focus&&d.focus==va(),d.preparedSelection&&e.display.input.showSelection(d.preparedSelection,f),(d.updatedDisplay||d.startHeight!=e.doc.height)&&gb(e,d.barMeasure),d.updatedDisplay&&Cd(e,d.barMeasure),d.selectionChanged&&vd(e),e.state.focused&&d.updateInput&&e.display.input.reset(d.typing),f&&Pe(d.cm);for(b=0;b<a.length;b++){var h=void 0;d=a[b];e=d.cm;f=e.display;g=e.doc;d.updatedDisplay&&Ze(e,d.update);null==f.wheelStartX||null==d.scrollTop&&null==
|
337 |
+
d.scrollLeft&&!d.scrollToPos||(f.wheelStartX=f.wheelStartY=null);null!=d.scrollTop&&Ve(e,d.scrollTop,d.forceScroll);null!=d.scrollLeft&&Va(e,d.scrollLeft,!0,!0);if(d.scrollToPos){var k=v(g,d.scrollToPos.from);var l=v(g,d.scrollToPos.to);var m=d.scrollToPos.margin;null==m&&(m=0);e.options.lineWrapping||k!=l||(k=k.ch?p(k.line,"before"==k.sticky?k.ch-1:k.ch,"after"):k,l="before"==k.sticky?p(k.line,k.ch+1,"before"):k);for(var r=0;5>r;r++){var n=!1;h=ma(e,k);var q=l&&l!=k?ma(e,l):h;h={left:Math.min(h.left,
|
338 |
+
q.left),top:Math.min(h.top,q.top)-m,right:Math.max(h.left,q.left),bottom:Math.max(h.bottom,q.bottom)+m};q=zd(e,h);var H=e.doc.scrollTop,t=e.doc.scrollLeft;null!=q.scrollTop&&(Ib(e,q.scrollTop),1<Math.abs(e.doc.scrollTop-H)&&(n=!0));null!=q.scrollLeft&&(Va(e,q.scrollLeft),1<Math.abs(e.doc.scrollLeft-t)&&(n=!0));if(!n)break}l=h;M(e,"scrollCursorIntoView")||(m=e.display,r=m.sizer.getBoundingClientRect(),k=null,0>l.top+r.top?k=!0:l.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&
|
339 |
+
(k=!1),null==k||Gg||(l=u("div","\u200b",null,"position: absolute;\n top: "+(l.top-m.viewOffset-e.display.lineSpace.offsetTop)+"px;\n height: "+(l.bottom-l.top+ta(e)+m.barHeight)+"px;\n left: "+l.left+"px; width: "+Math.max(2,l.right-l.left)+"px;"),e.display.lineSpace.appendChild(l),l.scrollIntoView(k),e.display.lineSpace.removeChild(l)))}l=d.maybeHiddenMarkers;k=d.maybeUnhiddenMarkers;if(l)for(m=0;m<l.length;++m)l[m].lines.length||
|
340 |
+
J(l[m],"hide");if(k)for(l=0;l<k.length;++l)k[l].lines.length&&J(k[l],"unhide");f.wrapper.offsetHeight&&(g.scrollTop=e.display.scroller.scrollTop);d.changeObjs&&J(e,"changes",e,d.changeObjs);d.update&&d.update.finish()}})}function ca(a,b){if(a.curOp)return b();Wa(a);try{return b()}finally{Xa(a)}}function N(a,b){return function(){if(a.curOp)return b.apply(a,arguments);Wa(a);try{return b.apply(a,arguments)}finally{Xa(a)}}}function V(a){return function(){if(this.curOp)return a.apply(this,arguments);Wa(this);
|
341 |
+
try{return a.apply(this,arguments)}finally{Xa(this)}}}function O(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);Wa(b);try{return a.apply(this,arguments)}finally{Xa(b)}}}function Z(a,b,c,d){null==b&&(b=a.doc.first);null==c&&(c=a.doc.first+a.doc.size);d||(d=0);var e=a.display;d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b);a.curOp.viewChanged=!0;if(b>=e.viewTo)Ba&&Yc(a.doc,b)<e.viewTo&&Ca(a);else if(c<=e.viewFrom)Ba&&fe(a.doc,
|
342 |
+
c+d)>e.viewFrom?Ca(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Ca(a);else if(b<=e.viewFrom){var f=zc(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Ca(a)}else if(c>=e.viewTo)(f=zc(a,b,b,-1))?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Ca(a);else{f=zc(a,b,b,-1);var g=zc(a,c,c+d,1);f&&g?(e.view=e.view.slice(0,f.index).concat(qc(a,f.lineN,g.lineN)).concat(e.view.slice(g.index)),e.viewTo+=d):Ca(a)}if(a=e.externalMeasured)c<a.lineN?a.lineN+=d:b<a.lineN+
|
343 |
+
a.size&&(e.externalMeasured=null)}function Da(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null);b<d.viewFrom||b>=d.viewTo||(a=d.view[Pa(a,b)],null!=a.node&&(a=a.changes||(a.changes=[]),-1==P(a,c)&&a.push(c)))}function Ca(a){a.display.viewFrom=a.display.viewTo=a.doc.first;a.display.view=[];a.display.viewOffset=0}function zc(a,b,c,d){var e=Pa(a,b),f=a.display.view;if(!Ba||c==a.doc.first+a.doc.size)return{index:e,lineN:c};
|
344 |
+
for(var g=a.display.viewFrom,h=0;h<e;h++)g+=f[h].size;if(g!=b){if(0<d){if(e==f.length-1)return null;b=g+f[e].size-b;e++}else b=g-b;c+=b}for(;Yc(a.doc,c)!=c;){if(e==(0>d?0:f.length-1))return null;c+=d*f[e-(0>d?1:0)].size;e+=d}return{index:e,lineN:c}}function $e(a){a=a.display.view;for(var b=0,c=0;c<a.length;c++){var d=a[c];d.hidden||d.node&&!d.changes||++b}return b}function Jb(a,b){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(b,Oc(Hg,a))}function Hg(a){var b=a.doc;if(!(b.highlightFrontier>=
|
345 |
+
a.display.viewTo)){var c=+new Date+a.options.workTime,d=yb(a,b.highlightFrontier),e=[];b.iter(d.line,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(d.line>=a.display.viewFrom){var g=f.styles,h=f.text.length>a.options.maxHighlightLength?Na(b.mode,d.state):null,k=ke(a,f,d,!0);h&&(d.state=h);f.styles=k.styles;h=f.styleClasses;(k=k.classes)?f.styleClasses=k:h&&(f.styleClasses=null);k=!g||g.length!=f.styles.length||h!=k&&(!h||!k||h.bgClass!=k.bgClass||h.textClass!=k.textClass);for(h=0;!k&&
|
346 |
+
h<g.length;++h)k=g[h]!=f.styles[h];k&&e.push(d.line);f.stateAfter=d.save()}else f.text.length<=a.options.maxHighlightLength&&fd(a,f.text,d),f.stateAfter=0==d.line%5?d.save():null;d.nextLine();if(+new Date>c)return Jb(a,a.options.workDelay),!0});b.highlightFrontier=d.line;b.modeFrontier=Math.max(b.modeFrontier,d.line);e.length&&ca(a,function(){for(var b=0;b<e.length;b++)Da(a,e[b],"text")})}}function Bd(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return Ca(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&
|
347 |
+
b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==$e(a))return!1;Te(a)&&(Ca(a),b.dims=md(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<f&&20>f-c.viewFrom&&(f=Math.max(d.first,c.viewFrom));c.viewTo>g&&20>c.viewTo-g&&(g=Math.min(e,c.viewTo));Ba&&(f=Yc(a.doc,f),g=fe(a.doc,g));d=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||
|
348 |
+
c.lastWrapWidth!=b.wrapperWidth;e=a.display;0==e.view.length||f>=e.viewTo||g<=e.viewFrom?(e.view=qc(a,f,g),e.viewFrom=f):(e.viewFrom>f?e.view=qc(a,f,e.viewFrom).concat(e.view):e.viewFrom<f&&(e.view=e.view.slice(Pa(a,f))),e.viewFrom=f,e.viewTo<g?e.view=e.view.concat(qc(a,e.viewTo,g)):e.viewTo>g&&(e.view=e.view.slice(0,Pa(a,g))));e.viewTo=g;c.viewOffset=ra(t(a.doc,c.viewFrom));a.display.mover.style.top=c.viewOffset+"px";g=$e(a);if(!d&&0==g&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||
|
349 |
+
c.updateLineNumbers>=c.viewTo))return!1;a.hasFocus()?f=null:(f=va())&&za(a.display.lineDiv,f)?(f={activeElt:f},window.getSelection&&(e=window.getSelection(),e.anchorNode&&e.extend&&za(a.display.lineDiv,e.anchorNode)&&(f.anchorNode=e.anchorNode,f.anchorOffset=e.anchorOffset,f.focusNode=e.focusNode,f.focusOffset=e.focusOffset))):f=null;4<g&&(c.lineDiv.style.display="none");Ig(a,c.updateLineNumbers,b.dims);4<g&&(c.lineDiv.style.display="");c.renderedView=c.view;(g=f)&&g.activeElt&&g.activeElt!=va()&&
|
350 |
+
(g.activeElt.focus(),g.anchorNode&&za(document.body,g.anchorNode)&&za(document.body,g.focusNode)&&(f=window.getSelection(),e=document.createRange(),e.setEnd(g.anchorNode,g.anchorOffset),e.collapse(!1),f.removeAllRanges(),f.addRange(e),f.extend(g.focusNode,g.focusOffset)));I(c.cursorDiv);I(c.selectionDiv);c.gutters.style.height=c.sizer.style.minHeight=0;d&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Jb(a,400));c.updateLineNumbers=null;return!0}function Ze(a,b){for(var c=b.viewport,
|
351 |
+
d=!0;;d=!1){if(!d||!a.options.lineWrapping||b.oldDisplayWidth==Oa(a))if(c&&null!=c.top&&(c={top:Math.min(a.doc.height+jd(a.display)-kd(a),c.top)}),b.visible=xd(a.display,a.doc,c),b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)break;if(!Bd(a,b))break;vc(a);d=Kb(a);Fb(a);gb(a,d);Cd(a,d);b.force=!1}b.signal(a,"update",a);if(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),
|
352 |
+
a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo}function Ad(a,b){var c=new yc(a,b);if(Bd(a,c)){vc(a);Ze(a,c);var d=Kb(a);Fb(a);gb(a,d);Cd(a,d);c.finish()}}function Ig(a,b,c){function d(b){var d=b.nextSibling;T&&ka&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b);return d}var e=a.display,f=a.options.lineNumbers,g=e.lineDiv,h=g.firstChild,k=e.view;e=e.viewFrom;for(var l=0;l<k.length;l++){var m=k[l];if(!m.hidden)if(m.node&&m.node.parentNode==
|
353 |
+
g){for(;h!=m.node;)h=d(h);h=f&&null!=b&&b<=e&&m.lineNumber;m.changes&&(-1<P(m.changes,"gutter")&&(h=!1),ve(a,m,e,c));h&&(I(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(Uc(a.options,e))));h=m.node.nextSibling}else{var r=Ag(a,m,e,c);g.insertBefore(r,h)}e+=m.size}for(;h;)h=d(h)}function yd(a){a.display.sizer.style.marginLeft=a.display.gutters.offsetWidth+"px"}function Cd(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";a.display.heightForcer.style.top=b.docHeight+"px";a.display.gutters.style.height=
|
354 |
+
b.docHeight+a.display.barHeight+ta(a)+"px"}function af(a){var b=a.display.gutters,c=a.options.gutters;I(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(u("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none";yd(a)}function Dd(a){var b=P(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):-1<b&&!a.lineNumbers&&(a.gutters=
|
355 |
+
a.gutters.slice(0),a.gutters.splice(b,1))}function bf(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail);null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta);return{x:b,y:c}}function Jg(a){a=bf(a);a.x*=fa;a.y*=fa;return a}function cf(a,b){var c=bf(b),d=c.x;c=c.y;var e=a.display,f=e.scroller,g=f.scrollWidth>f.clientWidth,h=f.scrollHeight>f.clientHeight;if(d&&g||c&&h){if(c&&ka&&T){g=b.target;var k=e.view;a:for(;g!=f;g=g.parentNode)for(var l=
|
356 |
+
0;l<k.length;l++)if(k[l].node==g){a.display.currentWheelTarget=g;break a}}!d||Aa||na||null==fa?(c&&null!=fa&&(h=c*fa,g=a.doc.scrollTop,k=g+e.wrapper.clientHeight,0>h?g=Math.max(0,g+h-50):k=Math.min(a.doc.height,k+h+50),Ad(a,{top:g,bottom:k})),20>Ac&&(null==e.wheelStartX?(e.wheelStartX=f.scrollLeft,e.wheelStartY=f.scrollTop,e.wheelDX=d,e.wheelDY=c,setTimeout(function(){if(null!=e.wheelStartX){var a=f.scrollLeft-e.wheelStartX,b=f.scrollTop-e.wheelStartY;a=b&&e.wheelDY&&b/e.wheelDY||a&&e.wheelDX&&a/
|
357 |
+
e.wheelDX;e.wheelStartX=e.wheelStartY=null;a&&(fa=(fa*Ac+a)/(Ac+1),++Ac)}},200)):(e.wheelDX+=d,e.wheelDY+=c))):(c&&h&&Ib(a,Math.max(0,f.scrollTop+c*fa)),Va(a,Math.max(0,f.scrollLeft+d*fa)),(!c||c&&h)&&Y(b),e.wheelStartX=null)}}function oa(a,b){var c=a[b];a.sort(function(a,b){return x(a.from(),b.from())});b=P(a,c);for(c=1;c<a.length;c++){var d=a[c],e=a[c-1];if(0<=x(e.to(),d.from())){var f=kc(e.from(),d.from()),g=jc(e.to(),d.to());d=e.empty()?d.from()==d.head:e.from()==e.head;c<=b&&--b;a.splice(--c,
|
358 |
+
2,new A(d?g:f,d?f:g))}}return new ha(a,b)}function ya(a,b){return new ha([new A(a,b||a)],0)}function Ea(a){return a.text?p(a.from.line+a.text.length-1,z(a.text).length+(1==a.text.length?a.from.ch:0)):a.to}function df(a,b){if(0>x(a,b.from))return a;if(0>=x(a,b.to))return Ea(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;a.line==b.to.line&&(d+=Ea(b).ch-b.to.ch);return p(c,d)}function Ed(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new A(df(e.anchor,b),
|
359 |
+
df(e.head,b)))}return oa(c,a.sel.primIndex)}function ef(a,b,c){return a.line==b.line?p(c.line,a.ch-b.ch+c.ch):p(c.line+(a.line-b.line),a.ch)}function Fd(a){a.doc.mode=dd(a.options,a.doc.modeOption);Lb(a)}function Lb(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=null)});a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first;Jb(a,100);a.state.modeGen++;a.curOp&&Z(a)}function ff(a,b){return 0==b.from.ch&&0==b.to.ch&&""==z(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}
|
360 |
+
function Gd(a,b,c,d){function e(a,c,e){a.text=c;a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=null);null!=a.order&&(a.order=null);be(a);ce(a,e);c=d?d(a):1;c!=a.height&&pa(a,c);R(a,"change",a,b)}function f(a,b){for(var e=[],f=a;f<b;++f)e.push(new hb(k[f],c?c[f]:null,d));return e}var g=b.from,h=b.to,k=b.text,l=t(a,g.line),m=t(a,h.line),r=z(k),n=c?c[k.length-1]:null,q=h.line-g.line;b.full?(a.insert(0,f(0,k.length)),a.remove(k.length,a.size-k.length)):ff(a,b)?(h=f(0,k.length-1),e(m,m.text,n),
|
361 |
+
q&&a.remove(g.line,q),h.length&&a.insert(g.line,h)):l==m?1==k.length?e(l,l.text.slice(0,g.ch)+r+l.text.slice(h.ch),n):(q=f(1,k.length-1),q.push(new hb(r+l.text.slice(h.ch),n,d)),e(l,l.text.slice(0,g.ch)+k[0],c?c[0]:null),a.insert(g.line+1,q)):1==k.length?(e(l,l.text.slice(0,g.ch)+k[0]+m.text.slice(h.ch),c?c[0]:null),a.remove(g.line+1,q)):(e(l,l.text.slice(0,g.ch)+k[0],c?c[0]:null),e(m,r+m.text.slice(h.ch),n),n=f(1,k.length-1),1<q&&a.remove(g.line+1,q-1),a.insert(g.line+1,n));R(a,"change",a,b)}function Ya(a,
|
362 |
+
b,c){function d(a,f,g){if(a.linked)for(var e=0;e<a.linked.length;++e){var k=a.linked[e];if(k.doc!=f){var l=g&&k.sharedHist;if(!c||l)b(k.doc,l),d(k.doc,a,l)}}}d(a,null,!0)}function gf(a,b){if(b.cm)throw Error("This document is already in use.");a.doc=b;b.cm=a;ud(a);Fd(a);hf(a);a.options.lineWrapping||$c(a);a.options.mode=b.modeOption;Z(a)}function hf(a){("rtl"==a.doc.direction?Ha:Ua)(a.display.lineDiv,"CodeMirror-rtl")}function Kg(a){ca(a,function(){hf(a);Z(a)})}function Bc(a){this.done=[];this.undone=
|
363 |
+
[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOrigin=this.lastSelOrigin=this.lastOp=this.lastSelOp=null;this.generation=this.maxGeneration=a||1}function Hd(a,b){var c={from:Wc(b.from),to:Ea(b),text:Ja(a,b.from,b.to)};jf(a,c,b.from.line,b.to.line+1);Ya(a,function(a){return jf(a,c,b.from.line,b.to.line+1)},!0);return c}function kf(a){for(;a.length;)if(z(a).ranges)a.pop();else break}function lf(a,b,c,d){var e=a.history;e.undone.length=0;var f=+new Date,g;if(g=e.lastOp==d||e.lastOrigin==
|
364 |
+
b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>f-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0))){if(e.lastOp==d){kf(e.done);var h=z(e.done)}else e.done.length&&!z(e.done).ranges?h=z(e.done):1<e.done.length&&!e.done[e.done.length-2].ranges?(e.done.pop(),h=z(e.done)):h=void 0;g=h}if(g){var k=z(h.changes);0==x(b.from,b.to)&&0==x(b.from,k.to)?k.to=Ea(b):h.changes.push(Hd(a,b))}else for((h=z(e.done))&&h.ranges||Cc(a.sel,e.done),h={changes:[Hd(a,b)],generation:e.generation},
|
365 |
+
e.done.push(h);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift();e.done.push(c);e.generation=++e.maxGeneration;e.lastModTime=e.lastSelTime=f;e.lastOp=e.lastSelOp=d;e.lastOrigin=e.lastSelOrigin=b.origin;k||J(a,"historyAdded")}function Cc(a,b){var c=z(b);c&&c.ranges&&c.equals(a)||b.push(a)}function jf(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(d){d.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=d.markedSpans);++f})}function Lg(a){if(!a)return null;
|
366 |
+
for(var b,c=0;c<a.length;++c)a[c].marker.explicitlyCleared?b||(b=a.slice(0,c)):b&&b.push(a[c]);return b?b.length?b:null:a}function mf(a,b){var c;if(c=b["spans_"+a.id]){for(var d=[],e=0;e<b.text.length;++e)d.push(Lg(c[e]));c=d}else c=null;d=Xc(a,b);if(!c)return d;if(!d)return c;for(e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g){var h=0;a:for(;h<g.length;++h){for(var k=g[h],l=0;l<f.length;++l)if(f[l].marker==k.marker)continue a;f.push(k)}}else g&&(c[e]=g)}return c}function ib(a,b,c){for(var d=[],e=
|
367 |
+
0;e<a.length;++e){var f=a[e];if(f.ranges)d.push(c?ha.prototype.deepCopy.call(f):f);else{f=f.changes;var g=[];d.push({changes:g});for(var h=0;h<f.length;++h){var k=f[h],l;g.push({from:k.from,to:k.to,text:k.text});if(b)for(var m in k)(l=m.match(/^spans_(\d+)$/))&&-1<P(b,Number(l[1]))&&(z(g)[m]=k[m],delete k[m])}}}return d}function Id(a,b,c,d){return d?(a=a.anchor,c&&(d=0>x(b,a),d!=0>x(c,a)?(a=b,b=c):d!=0>x(b,c)&&(b=c)),new A(a,b)):new A(c||b,b)}function Dc(a,b,c,d,e){null==e&&(e=a.cm&&(a.cm.display.shift||
|
368 |
+
a.extend));S(a,new ha([Id(a.sel.primary(),b,c,e)],0),d)}function nf(a,b,c){for(var d=[],e=a.cm&&(a.cm.display.shift||a.extend),f=0;f<a.sel.ranges.length;f++)d[f]=Id(a.sel.ranges[f],b[f],null,e);b=oa(d,a.sel.primIndex);S(a,b,c)}function Jd(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c;S(a,oa(e,a.sel.primIndex),d)}function Mg(a,b,c){c={ranges:b.ranges,update:function(b){this.ranges=[];for(var d=0;d<b.length;d++)this.ranges[d]=new A(v(a,b[d].anchor),v(a,b[d].head))},origin:c&&c.origin};J(a,"beforeSelectionChange",
|
369 |
+
a,c);a.cm&&J(a.cm,"beforeSelectionChange",a.cm,c);return c.ranges!=b.ranges?oa(c.ranges,c.ranges.length-1):b}function of(a,b,c){var d=a.history.done,e=z(d);e&&e.ranges?(d[d.length-1]=b,Ec(a,b,c)):S(a,b,c)}function S(a,b,c){Ec(a,b,c);b=a.sel;var d=a.cm?a.cm.curOp.id:NaN,e=a.history,f=c&&c.origin,g;if(!(g=d==e.lastSelOp)&&(g=f&&e.lastSelOrigin==f)&&!(g=e.lastModTime==e.lastSelTime&&e.lastOrigin==f)){g=z(e.done);var h=f.charAt(0);g="*"==h||"+"==h&&g.ranges.length==b.ranges.length&&g.somethingSelected()==
|
370 |
+
b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}g?e.done[e.done.length-1]=b:Cc(b,e.done);e.lastSelTime=+new Date;e.lastSelOrigin=f;e.lastSelOp=d;c&&!1!==c.clearRedo&&kf(e.undone)}function Ec(a,b,c){if(ja(a,"beforeSelectionChange")||a.cm&&ja(a.cm,"beforeSelectionChange"))b=Mg(a,b,c);var d=c&&c.bias||(0>x(b.primary().head,a.sel.primary().head)?-1:1);pf(a,qf(a,b,d,!0));c&&!1===c.scroll||!a.cm||fb(a.cm)}function pf(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&
|
371 |
+
(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,ge(a.cm)),R(a,"cursorActivity",a))}function rf(a){pf(a,qf(a,a.sel,null,!1))}function qf(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=b.ranges.length==a.sel.ranges.length&&a.sel.ranges[f],k=Kd(a,g.anchor,h&&h.anchor,c,d);h=Kd(a,g.head,h&&h.head,c,d);if(e||k!=g.anchor||h!=g.head)e||(e=b.ranges.slice(0,f)),e[f]=new A(k,h)}return e?oa(e,b.primIndex):b}function jb(a,b,c,d,e){var f=t(a,b.line);if(f.markedSpans)for(var g=0;g<f.markedSpans.length;++g){var h=
|
372 |
+
f.markedSpans[g],k=h.marker;if((null==h.from||(k.inclusiveLeft?h.from<=b.ch:h.from<b.ch))&&(null==h.to||(k.inclusiveRight?h.to>=b.ch:h.to>b.ch))){if(e&&(J(k,"beforeCursorEnter"),k.explicitlyCleared))if(f.markedSpans){--g;continue}else break;if(k.atomic){if(c){g=k.find(0>d?1:-1);h=void 0;if(0>d?k.inclusiveRight:k.inclusiveLeft)g=sf(a,g,-d,g&&g.line==b.line?f:null);if(g&&g.line==b.line&&(h=x(g,c))&&(0>d?0>h:0<h))return jb(a,g,b,d,e)}c=k.find(0>d?-1:1);if(0>d?k.inclusiveLeft:k.inclusiveRight)c=sf(a,
|
373 |
+
c,d,c.line==b.line?f:null);return c?jb(a,c,b,d,e):null}}}return b}function Kd(a,b,c,d,e){d=d||1;b=jb(a,b,c,d,e)||!e&&jb(a,b,c,d,!0)||jb(a,b,c,-d,e)||!e&&jb(a,b,c,-d,!0);return b?b:(a.cantEdit=!0,p(a.first,0))}function sf(a,b,c,d){return 0>c&&0==b.ch?b.line>a.first?v(a,p(b.line-1)):null:0<c&&b.ch==(d||t(a,b.line)).text.length?b.line<a.first+a.size-1?p(b.line+1,0):null:new p(b.line,b.ch+c)}function tf(a){a.setSelection(p(a.firstLine(),0),p(a.lastLine()),ua)}function uf(a,b,c){var d={canceled:!1,from:b.from,
|
374 |
+
to:b.to,text:b.text,origin:b.origin,cancel:function(){return d.canceled=!0}};c&&(d.update=function(b,c,g,h){b&&(d.from=v(a,b));c&&(d.to=v(a,c));g&&(d.text=g);void 0!==h&&(d.origin=h)});J(a,"beforeChange",a,d);a.cm&&J(a.cm,"beforeChange",a.cm,d);return d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function kb(a,b,c){if(a.cm){if(!a.cm.curOp)return N(a.cm,kb)(a,b,c);if(a.cm.state.suppressEdits)return}if(ja(a,"beforeChange")||a.cm&&ja(a.cm,"beforeChange"))if(b=uf(a,b,!0),!b)return;
|
375 |
+
if(c=vf&&!c&&lg(a,b.from,b.to))for(var d=c.length-1;0<=d;--d)wf(a,{from:c[d].from,to:c[d].to,text:d?[""]:b.text,origin:b.origin});else wf(a,b)}function wf(a,b){if(1!=b.text.length||""!=b.text[0]||0!=x(b.from,b.to)){var c=Ed(a,b);lf(a,b,c,a.cm?a.cm.curOp.id:NaN);Mb(a,b,c,Xc(a,b));var d=[];Ya(a,function(a,c){c||-1!=P(d,a.history)||(xf(a.history,b),d.push(a.history));Mb(a,b,null,Xc(a,b))})}}function Fc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits||c){for(var d=a.history,e,f=a.sel,g="undo"==b?d.done:d.undone,
|
376 |
+
h="undo"==b?d.undone:d.done,k=0;k<g.length&&(e=g[k],c?!e.ranges||e.equals(a.sel):e.ranges);k++);if(k!=g.length){for(d.lastOrigin=d.lastSelOrigin=null;;)if(e=g.pop(),e.ranges){Cc(e,h);if(c&&!e.equals(a.sel)){S(a,e,{clearRedo:!1});return}f=e}else break;var l=[];Cc(f,h);h.push({changes:l,generation:d.generation});d.generation=e.generation||++d.maxGeneration;var m=ja(a,"beforeChange")||a.cm&&ja(a.cm,"beforeChange");c=function(d){var c=e.changes[d];c.origin=b;if(m&&!uf(a,c,!1))return g.length=0,{};l.push(Hd(a,
|
377 |
+
c));var f=d?Ed(a,c):z(g);Mb(a,c,f,mf(a,c));!d&&a.cm&&a.cm.scrollIntoView({from:c.from,to:Ea(c)});var h=[];Ya(a,function(a,b){b||-1!=P(h,a.history)||(xf(a.history,c),h.push(a.history));Mb(a,c,null,mf(a,c))})};for(d=e.changes.length-1;0<=d;--d)if(f=c(d))return f.v}}}function yf(a,b){if(0!=b&&(a.first+=b,a.sel=new ha(hc(a.sel.ranges,function(a){return new A(p(a.anchor.line+b,a.anchor.ch),p(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Z(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<
|
378 |
+
c.viewTo;d++)Da(a.cm,d,"gutter")}}function Mb(a,b,c,d){if(a.cm&&!a.cm.curOp)return N(a.cm,Mb)(a,b,c,d);if(b.to.line<a.first)yf(a,b.text.length-1-(b.to.line-b.from.line));else if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);yf(a,e);b={from:p(a.first,0),to:p(b.to.line+e,b.to.ch),text:[z(b.text)],origin:b.origin}}e=a.lastLine();b.to.line>e&&(b={from:b.from,to:p(e,t(a,e).text.length),text:[b.text[0]],origin:b.origin});b.removed=Ja(a,b.from,b.to);c||
|
379 |
+
(c=Ed(a,b));a.cm?Ng(a.cm,b,d):Gd(a,b,d);Ec(a,c,ua)}}function Ng(a,b,c){var d=a.doc,e=a.display,f=b.from,g=b.to,h=!1,k=f.line;a.options.lineWrapping||(k=C(qa(t(d,f.line))),d.iter(k,g.line+1,function(a){if(a==e.maxLine)return h=!0}));-1<d.sel.contains(b.from,b.to)&&ge(a);Gd(d,b,c,Me(a));a.options.lineWrapping||(d.iter(k,f.line+b.text.length,function(a){var b=mc(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,h=!1)}),h&&(a.curOp.updateMaxLine=!0));sg(d,f.line);Jb(a,400);c=b.text.length-
|
380 |
+
(g.line-f.line)-1;b.full?Z(a):f.line!=g.line||1!=b.text.length||ff(a.doc,b)?Z(a,f.line,g.line+1,c):Da(a,f.line,"text");c=ja(a,"changes");if((d=ja(a,"change"))||c)b={from:f,to:g,text:b.text,removed:b.removed,origin:b.origin},d&&R(a,"change",a,b),c&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(b);a.display.selForContextMenu=null}function lb(a,b,c,d,e){d||(d=c);if(0>x(d,c)){var f=[d,c];c=f[0];d=f[1];f}"string"==typeof b&&(b=a.splitLines(b));kb(a,{from:c,to:d,text:b,origin:e})}function zf(a,b,c,
|
381 |
+
d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function Af(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e],g=!0;if(f.ranges)for(f.copied||(f=a[e]=f.deepCopy(),f.copied=!0),g=0;g<f.ranges.length;g++)zf(f.ranges[g].anchor,b,c,d),zf(f.ranges[g].head,b,c,d);else{for(var h=0;h<f.changes.length;++h){var k=f.changes[h];if(c<k.from.line)k.from=p(k.from.line+d,k.from.ch),k.to=p(k.to.line+d,k.to.ch);else if(b<=k.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function xf(a,b){var c=b.from.line,d=b.to.line,
|
382 |
+
e=b.text.length-(d-c)-1;Af(a.done,c,d,e);Af(a.undone,c,d,e)}function Nb(a,b,c,d){var e=b,f=b;"number"==typeof b?f=t(a,Math.max(a.first,Math.min(b,a.first+a.size-1))):e=C(b);if(null==e)return null;d(f,e)&&a.cm&&Da(a.cm,e,c);return f}function Ob(a){this.lines=a;this.parent=null;for(var b=0,c=0;c<a.length;++c)a[c].parent=this,b+=a[c].height;this.height=b}function Pb(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize();c+=e.height;e.parent=this}this.size=b;this.height=c;
|
383 |
+
this.parent=null}function Og(a,b,c,d){var e=new Qb(a,c,d),f=a.cm;f&&e.noHScroll&&(f.display.alignWidgets=!0);Nb(a,b,"widget",function(b){var d=b.widgets||(b.widgets=[]);null==e.insertAt?d.push(e):d.splice(Math.min(d.length-1,Math.max(0,e.insertAt)),0,e);e.line=b;f&&!Ma(a,b)&&(d=ra(b)<a.scrollTop,pa(b,b.height+Cb(e)),d&&wc(f,e.height),f.curOp.forceUpdate=!0);return!0});R(f,"lineWidgetAdded",f,e,"number"==typeof b?b:C(b));return e}function mb(a,b,c,d,e){if(d&&d.shared)return Pg(a,b,c,d,e);if(a.cm&&
|
384 |
+
!a.cm.curOp)return N(a.cm,mb)(a,b,c,d,e);var f=new Fa(a,e);e=x(b,c);d&&Ia(d,f,!1);if(0<e||0==e&&!1!==f.clearWhenEmpty)return f;f.replacedWith&&(f.collapsed=!0,f.widgetNode=U("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0));if(f.collapsed){if(ee(a,b.line,b,c,f)||b.line!=c.line&&ee(a,c.line,b,c,f))throw Error("Inserting collapsed marker partially overlapping an existing one");Ba=!0}f.addToHistory&&
|
385 |
+
lf(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var g=b.line,h=a.cm,k;a.iter(g,c.line+1,function(a){h&&f.collapsed&&!h.options.lineWrapping&&qa(a)==h.display.maxLine&&(k=!0);f.collapsed&&g!=b.line&&pa(a,0);var d=new lc(f,g==b.line?b.ch:null,g==c.line?c.ch:null);a.markedSpans=a.markedSpans?a.markedSpans.concat([d]):[d];d.marker.attachLine(a);++g});f.collapsed&&a.iter(b.line,c.line+1,function(b){Ma(a,b)&&pa(b,0)});f.clearOnEnter&&w(f,"beforeCursorEnter",function(){return f.clear()});f.readOnly&&(vf=
|
386 |
+
!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory());f.collapsed&&(f.id=++Bf,f.atomic=!0);if(h){k&&(h.curOp.updateMaxLine=!0);if(f.collapsed)Z(h,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(d=b.line;d<=c.line;d++)Da(h,d,"text");f.atomic&&rf(h.doc);R(h,"markerAdded",h,f)}return f}function Pg(a,b,c,d,e){d=Ia(d);d.shared=!1;var f=[mb(a,b,c,d,e)],g=f[0],h=d.widgetNode;Ya(a,function(a){h&&(d.widgetNode=h.cloneNode(!0));f.push(mb(a,v(a,b),v(a,c),d,
|
387 |
+
e));for(var k=0;k<a.linked.length;++k)if(a.linked[k].isParent)return;g=z(f)});return new Rb(f,g)}function Cf(a){return a.findMarks(p(a.first,0),a.clipPos(p(a.lastLine())),function(a){return a.parent})}function Qg(a){for(var b=function(b){b=a[b];var d=[b.primary.doc];Ya(b.primary.doc,function(a){return d.push(a)});for(var c=0;c<b.markers.length;c++){var g=b.markers[c];-1==P(d,g.doc)&&(g.parent=null,b.markers.splice(c--,1))}},c=0;c<a.length;c++)b(c)}function Rg(a){var b=this;Df(b);if(!M(b,a)&&!xa(b.display,
|
388 |
+
a)){Y(a);B&&(Ef=+new Date);var c=Ta(b,a,!0),d=a.dataTransfer.files;if(c&&!b.isReadOnly())if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){if(!b.options.allowDropFileTypes||-1!=P(b.options.allowDropFileTypes,a.type)){var h=new FileReader;h.onload=N(b,function(){var a=h.result;/[\x00-\x08\x0e-\x1f]{2}/.test(a)&&(a="");f[d]=a;++g==e&&(c=v(b.doc,c),a={from:c,to:c,text:b.doc.splitLines(f.join(b.doc.lineSeparator())),origin:"paste"},kb(b.doc,a),of(b.doc,ya(c,
|
389 |
+
Ea(a))))});h.readAsText(a)}},k=0;k<e;++k)h(d[k],k);else if(b.state.draggingText&&-1<b.doc.sel.contains(c))b.state.draggingText(a),setTimeout(function(){return b.display.input.focus()},20);else try{if(h=a.dataTransfer.getData("Text")){b.state.draggingText&&!b.state.draggingText.copy&&(k=b.listSelections());Ec(b.doc,ya(c,c));if(k)for(d=0;d<k.length;++d)lb(b.doc,"",k[d].anchor,k[d].head,"drag");b.replaceSelection(h,"around","paste");b.display.input.focus()}}catch(l){}}}function Df(a){a.display.dragCursor&&
|
390 |
+
(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function Ff(a){if(document.getElementsByClassName)for(var b=document.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function Sg(){var a;w(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null;Ff(Tg)},100))});w(window,"blur",function(){return Ff(Gb)})}function Tg(a){var b=a.display;if(b.lastWrapHeight!=b.wrapper.clientHeight||b.lastWrapWidth!=b.wrapper.clientWidth)b.cachedCharWidth=
|
391 |
+
b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize()}function Ug(a){var b=a.split(/-(?!$)/);a=b[b.length-1];for(var c,d,e,f,g=0;g<b.length-1;g++){var h=b[g];if(/^(cmd|meta|m)$/i.test(h))f=!0;else if(/^a(lt)?$/i.test(h))c=!0;else if(/^(c|ctrl|control)$/i.test(h))d=!0;else if(/^s(hift)?$/i.test(h))e=!0;else throw Error("Unrecognized modifier name: "+h);}c&&(a="Alt-"+a);d&&(a="Ctrl-"+a);f&&(a="Cmd-"+a);e&&(a="Shift-"+a);return a}function Vg(a){var b={},c;for(c in a)if(a.hasOwnProperty(c)){var d=
|
392 |
+
a[c];if(!/^(name|fallthrough|(de|at)tach)$/.test(c)){if("..."!=d)for(var e=hc(c.split(" "),Ug),f=0;f<e.length;f++){if(f==e.length-1){var g=e.join(" ");var h=d}else g=e.slice(0,f+1).join(" "),h="...";var k=b[g];if(!k)b[g]=h;else if(k!=h)throw Error("Inconsistent bindings for "+g);}delete a[c]}}for(var l in b)a[l]=b[l];return a}function nb(a,b,c,d){b=Gc(b);var e=b.call?b.call(a,d):b[a];if(!1===e)return"nothing";if("..."===e)return"multi";if(null!=e&&c(e))return"handled";if(b.fallthrough){if("[object Array]"!=
|
393 |
+
Object.prototype.toString.call(b.fallthrough))return nb(a,b.fallthrough,c,d);for(e=0;e<b.fallthrough.length;e++){var f=nb(a,b.fallthrough[e],c,d);if(f)return f}}}function Gf(a){a="string"==typeof a?a:Ga[a.keyCode];return"Ctrl"==a||"Alt"==a||"Shift"==a||"Mod"==a}function Hf(a,b,c){var d=a;b.altKey&&"Alt"!=d&&(a="Alt-"+a);(If?b.metaKey:b.ctrlKey)&&"Ctrl"!=d&&(a="Ctrl-"+a);(If?b.ctrlKey:b.metaKey)&&"Cmd"!=d&&(a="Cmd-"+a);!c&&b.shiftKey&&"Shift"!=d&&(a="Shift-"+a);return a}function Jf(a,b){if(na&&34==
|
394 |
+
a.keyCode&&a["char"])return!1;var c=Ga[a.keyCode];if(null==c||a.altGraphKey)return!1;3==a.keyCode&&a.code&&(c=a.code);return Hf(c,a,b)}function Gc(a){return"string"==typeof a?Sb[a]:a}function ob(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&0>=x(f.from,z(d).to);){var g=d.pop();if(0>x(g.from,f.from)){f.from=g.from;break}}d.push(f)}ca(a,function(){for(var b=d.length-1;0<=b;b--)lb(a.doc,"",d[b].from,d[b].to,"+delete");fb(a)})}function Ld(a,b,c){b=Zd(a.text,b+c,
|
395 |
+
c);return 0>b||b>a.text.length?null:b}function Md(a,b,c){a=Ld(a,b.ch,c);return null==a?null:new p(b.line,a,0>c?"after":"before")}function Nd(a,b,c,d,e){if(a&&(a=wa(c,b.doc.direction))){a=0>e?z(a):a[0];var f=0>e==(1==a.level)?"after":"before";if(0<a.level||"rtl"==b.doc.direction){var g=Qa(b,c);var h=0>e?c.text.length-1:0;var k=la(b,g,h).top;h=rb(function(a){return la(b,g,a).top==k},0>e==(1==a.level)?a.from:a.to-1,h);"before"==f&&(h=Ld(c,h,1))}else h=0>e?a.to:a.from;return new p(d,h,f)}return new p(d,
|
396 |
+
0>e?c.text.length:0,0>e?"before":"after")}function Wg(a,b,c,d){var e=wa(b,a.doc.direction);if(!e)return Md(b,c,d);c.ch>=b.text.length?(c.ch=b.text.length,c.sticky="before"):0>=c.ch&&(c.ch=0,c.sticky="after");var f=vb(e,c.ch,c.sticky),g=e[f];if("ltr"==a.doc.direction&&0==g.level%2&&(0<d?g.to>c.ch:g.from<c.ch))return Md(b,c,d);var h=function(a,d){return Ld(b,a instanceof p?a.ch:a,d)},k,l=function(d){if(!a.options.lineWrapping)return{begin:0,end:b.text.length};k=k||Qa(a,b);return Le(a,b,k,d)},m=l("before"==
|
397 |
+
c.sticky?h(c,-1):c.ch);if("rtl"==a.doc.direction||1==g.level){var r=1==g.level==0>d,n=h(c,r?1:-1);if(null!=n&&(r?n<=g.to&&n<=m.end:n>=g.from&&n>=m.begin))return new p(c.line,n,r?"before":"after")}g=function(a,b,d){for(var f=function(a,b){return b?new p(c.line,h(a,1),"before"):new p(c.line,a,"after")};0<=a&&a<e.length;a+=b){var g=e[a],k=0<b==(1!=g.level),l=k?d.begin:h(d.end,-1);if(g.from<=l&&l<g.to)return f(l,k);l=k?g.from:h(g.to,-1);if(d.begin<=l&&l<d.end)return f(l,k)}};if(f=g(f+d,d,m))return f;
|
398 |
+
m=0<d?m.end:h(m.begin,-1);return null==m||0<d&&m==b.text.length||!(f=g(0<d?0:e.length-1,d,l(m)))?null:f}function Kf(a,b){var c=t(a.doc,b),d=qa(c);d!=c&&(b=C(d));return Nd(!0,a,d,b,1)}function Lf(a,b){var c=Kf(a,b.line),d=t(a.doc,c.line),e=wa(d,a.doc.direction);return e&&0!=e[0].level?c:(d=Math.max(0,d.text.search(/\S/)),p(c.line,b.line==c.line&&b.ch<=d&&b.ch?0:d,c.sticky))}function Hc(a,b,c){if("string"==typeof b&&(b=Tb[b],!b))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{a.isReadOnly()&&
|
399 |
+
(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Ic}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function Ub(a,b,c,d){var e=a.state.keySeq;if(e){if(Gf(b))return"handled";/'$/.test(b)?a.state.keySeq=null:Xg.set(50,function(){a.state.keySeq==e&&(a.state.keySeq=null,a.display.input.reset())});if(Mf(a,e+" "+b,c,d))return!0}return Mf(a,b,c,d)}function Mf(a,b,c,d){a:{for(var e=0;e<a.state.keyMaps.length;e++){var f=nb(b,a.state.keyMaps[e],d,a);if(f){d=f;break a}}d=a.options.extraKeys&&
|
400 |
+
nb(b,a.options.extraKeys,d,a)||nb(b,a.options.keyMap,d,a)}"multi"==d&&(a.state.keySeq=b);"handled"==d&&R(a,"keyHandled",a,b,c);if("handled"==d||"multi"==d)Y(c),vd(a);return!!d}function Nf(a,b){var c=Jf(b,!0);return c?b.shiftKey&&!a.state.keySeq?Ub(a,"Shift-"+c,b,function(b){return Hc(a,b,!0)})||Ub(a,c,b,function(b){if("string"==typeof b?/^go[A-Z]/.test(b):b.motion)return Hc(a,b)}):Ub(a,c,b,function(b){return Hc(a,b)}):!1}function Yg(a,b,c){return Ub(a,"'"+c+"'",b,function(b){return Hc(a,b,!0)})}function Of(a){this.curOp.focus=
|
401 |
+
va();if(!M(this,a)){B&&11>E&&27==a.keyCode&&(a.returnValue=!1);var b=a.keyCode;this.display.shift=16==b||a.shiftKey;var c=Nf(this,a);na&&(Od=c?b:null,!c&&88==b&&!Zg&&(ka?a.metaKey:a.ctrlKey)&&this.replaceSelection("",null,"cut"));18!=b||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||$g(this)}}function $g(a){function b(a){18!=a.keyCode&&a.altKey||(Ua(c,"CodeMirror-crosshair"),ea(document,"keyup",b),ea(document,"mouseover",b))}var c=a.display.lineDiv;Ha(c,"CodeMirror-crosshair");w(document,
|
402 |
+
"keyup",b);w(document,"mouseover",b)}function Pf(a){16==a.keyCode&&(this.doc.sel.shift=!1);M(this,a)}function Qf(a){if(!(xa(this.display,a)||M(this,a)||a.ctrlKey&&!a.altKey||ka&&a.metaKey)){var b=a.keyCode,c=a.charCode;if(na&&b==Od)Od=null,Y(a);else if(!na||a.which&&!(10>a.which)||!Nf(this,a))if(b=String.fromCharCode(null==c?b:c),"\b"!=b&&!Yg(this,a,b))this.display.input.onKeyPress(a)}}function ah(a,b){var c=+new Date;if(Vb&&Vb.compare(c,a,b))return Wb=Vb=null,"triple";if(Wb&&Wb.compare(c,a,b))return Vb=
|
403 |
+
new Pd(c,a,b),Wb=null,"double";Wb=new Pd(c,a,b);Vb=null;return"single"}function Rf(a){var b=this.display;if(!(M(this,a)||b.activeTouch&&b.input.supportsTouch()))if(b.input.ensurePolled(),b.shift=a.shiftKey,xa(b,a))T||(b.scroller.draggable=!1,setTimeout(function(){return b.scroller.draggable=!0},100));else if(!Jc(this,a,"gutterClick",!0)){var c=Ta(this,a),d=ie(a),e=c?ah(c,d):"single";window.focus();1==d&&this.state.selectingText&&this.state.selectingText(a);c&&bh(this,d,c,e,a)||(1==d?c?ch(this,c,e,
|
404 |
+
a):(a.target||a.srcElement)==b.scroller&&Y(a):2==d?(c&&Dc(this.doc,c),setTimeout(function(){return b.input.focus()},20)):3==d&&(Qd?Sf(this,a):Qe(this)))}}function bh(a,b,c,d,e){var f="Click";"double"==d?f="Double"+f:"triple"==d&&(f="Triple"+f);return Ub(a,Hf((1==b?"Left":2==b?"Middle":"Right")+f,e),e,function(b){"string"==typeof b&&(b=Tb[b]);if(!b)return!1;var d=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),d=b(a,c)!=Ic}finally{a.state.suppressEdits=!1}return d})}function ch(a,b,c,d){B?setTimeout(Oc(Pe,
|
405 |
+
a),0):a.curOp.focus=va();var e=a.getOption("configureMouse");e=e?e(a,c,d):{};null==e.unit&&(e.unit=(dh?d.shiftKey&&d.metaKey:d.altKey)?"rectangle":"single"==c?"char":"double"==c?"word":"line");if(null==e.extend||a.doc.extend)e.extend=a.doc.extend||d.shiftKey;null==e.addNew&&(e.addNew=ka?d.metaKey:d.ctrlKey);null==e.moveOnDrag&&(e.moveOnDrag=!(ka?d.altKey:d.ctrlKey));var f=a.doc.sel,g;a.options.dragDrop&&eh&&!a.isReadOnly()&&"single"==c&&-1<(g=f.contains(b))&&(0>x((g=f.ranges[g]).from(),b)||0<b.xRel)&&
|
406 |
+
(0<x(g.to(),b)||0>b.xRel)?fh(a,d,b,e):gh(a,d,b,e)}function fh(a,b,c,d){var e=a.display,f=!1,g=N(a,function(b){T&&(e.scroller.draggable=!1);a.state.draggingText=!1;ea(document,"mouseup",g);ea(document,"mousemove",h);ea(e.scroller,"dragstart",k);ea(e.scroller,"drop",g);f||(Y(b),d.addNew||Dc(a.doc,c,null,null,d.extend),T||B&&9==E?setTimeout(function(){document.body.focus();e.input.focus()},20):e.input.focus())}),h=function(a){f=f||10<=Math.abs(b.clientX-a.clientX)+Math.abs(b.clientY-a.clientY)},k=function(){return f=
|
407 |
+
!0};T&&(e.scroller.draggable=!0);a.state.draggingText=g;g.copy=!d.moveOnDrag;e.scroller.dragDrop&&e.scroller.dragDrop();w(document,"mouseup",g);w(document,"mousemove",h);w(e.scroller,"dragstart",k);w(e.scroller,"drop",g);Qe(a);setTimeout(function(){return e.input.focus()},20)}function Tf(a,b,c){if("char"==c)return new A(b,b);if("word"==c)return a.findWordAt(b);if("line"==c)return new A(p(b.line,0),v(a.doc,p(b.line+1,0)));a=c(a,b);return new A(a.from,a.to)}function gh(a,b,c,d){function e(b){if(0!=
|
408 |
+
x(q,b))if(q=b,"rectangle"==d.unit){var e=[],f=a.options.tabSize,g=ia(t(k,c.line).text,c.ch,f),h=ia(t(k,b.line).text,b.ch,f),m=Math.min(g,h);g=Math.max(g,h);h=Math.min(c.line,b.line);for(var u=Math.min(a.lastLine(),Math.max(c.line,b.line));h<=u;h++){var H=t(k,h).text,w=Pc(H,m,f);m==g?e.push(new A(p(h,w),p(h,w))):H.length>w&&e.push(new A(p(h,w),p(h,Pc(H,g,f))))}e.length||e.push(new A(c,c));S(k,oa(l.ranges.slice(0,r).concat(e),r),{origin:"*mouse",scroll:!1});a.scrollIntoView(b)}else e=n,m=Tf(a,b,d.unit),
|
409 |
+
b=e.anchor,0<x(m.anchor,b)?(f=m.head,b=kc(e.from(),m.anchor)):(f=m.anchor,b=jc(e.to(),m.head)),e=l.ranges.slice(0),e[r]=hh(a,new A(v(k,b),f)),S(k,oa(e,r),Rd)}function f(b){var c=++u,g=Ta(a,b,!0,"rectangle"==d.unit);if(g)if(0!=x(g,q)){a.curOp.focus=va();e(g);var l=xd(h,k);(g.line>=l.to||g.line<l.from)&&setTimeout(N(a,function(){u==c&&f(b)}),150)}else{var m=b.clientY<H.top?-20:b.clientY>H.bottom?20:0;m&&setTimeout(N(a,function(){u==c&&(h.scroller.scrollTop+=m,f(b))}),50)}}function g(b){a.state.selectingText=
|
410 |
+
!1;u=Infinity;Y(b);h.input.focus();ea(document,"mousemove",y);ea(document,"mouseup",z);k.history.lastSelOrigin=null}var h=a.display,k=a.doc;Y(b);var l=k.sel,m=l.ranges;if(d.addNew&&!d.extend){var r=k.sel.contains(c);var n=-1<r?m[r]:new A(c,c)}else n=k.sel.primary(),r=k.sel.primIndex;"rectangle"==d.unit?(d.addNew||(n=new A(c,c)),c=Ta(a,b,!0,!0),r=-1):(b=Tf(a,c,d.unit),n=d.extend?Id(n,b.anchor,b.head,d.extend):b);d.addNew?-1==r?(r=m.length,S(k,oa(m.concat([n]),r),{scroll:!1,origin:"*mouse"})):1<m.length&&
|
411 |
+
m[r].empty()&&"char"==d.unit&&!d.extend?(S(k,oa(m.slice(0,r).concat(m.slice(r+1)),0),{scroll:!1,origin:"*mouse"}),l=k.sel):Jd(k,r,n,Rd):(r=0,S(k,new ha([n],0),Rd),l=k.sel);var q=c,H=h.wrapper.getBoundingClientRect(),u=0,y=N(a,function(a){ie(a)?f(a):g(a)}),z=N(a,g);a.state.selectingText=z;w(document,"mousemove",y);w(document,"mouseup",z)}function hh(a,b){var c=b.anchor,d=b.head,e=t(a.doc,c.line);if(0==x(c,d)&&c.sticky==d.sticky)return b;e=wa(e);if(!e)return b;var f=vb(e,c.ch,c.sticky),g=e[f];if(g.from!=
|
412 |
+
c.ch&&g.to!=c.ch)return b;var h=f+(g.from==c.ch==(1!=g.level)?0:1);if(0==h||h==e.length)return b;if(d.line!=c.line)var k=0<(d.line-c.line)*("ltr"==a.doc.direction?1:-1);else k=vb(e,d.ch,d.sticky),f=k-f||(d.ch-c.ch)*(1==g.level?-1:1),k=k==h-1||k==h?0>f:0<f;e=e[h+(k?-1:0)];e=(h=k==(1==e.level))?e.from:e.to;h=h?"after":"before";return c.ch==e&&c.sticky==h?b:new A(new p(c.line,e,h),d)}function Jc(a,b,c,d){if(b.touches){var e=b.touches[0].clientX;var f=b.touches[0].clientY}else try{e=b.clientX,f=b.clientY}catch(k){return!1}if(e>=
|
413 |
+
Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&Y(b);d=a.display;var g=d.lineDiv.getBoundingClientRect();if(f>g.bottom||!ja(a,c))return ad(b);f-=g.top-d.viewOffset;for(g=0;g<a.options.gutters.length;++g){var h=d.gutters.childNodes[g];if(h&&h.getBoundingClientRect().right>=e)return e=Ka(a.doc,f),J(a,c,a,e,a.options.gutters[g],b),ad(b)}}function Sf(a,b){var c;(c=xa(a.display,b))||(c=ja(a,"gutterContextMenu")?Jc(a,b,"gutterContextMenu",!1):!1);if(!c&&!M(a,b,"contextmenu"))a.display.input.onContextMenu(b)}
|
414 |
+
function Uf(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-");Eb(a)}function Xb(a){af(a);Z(a);Se(a)}function ih(a,b,c){!b!=!(c&&c!=pb)&&(c=a.display.dragFunctions,b=b?w:ea,b(a.display.scroller,"dragstart",c.start),b(a.display.scroller,"dragenter",c.enter),b(a.display.scroller,"dragover",c.over),b(a.display.scroller,"dragleave",c.leave),b(a.display.scroller,"drop",c.drop))}function jh(a){a.options.lineWrapping?(Ha(a.display.wrapper,
|
415 |
+
"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Ua(a.display.wrapper,"CodeMirror-wrap"),$c(a));ud(a);Z(a);Eb(a);setTimeout(function(){return gb(a)},100)}function F(a,b){var c=this;if(!(this instanceof F))return new F(a,b);this.options=b=b?Ia(b):{};Ia(Vf,b,!1);Dd(b);var d=b.value;"string"==typeof d&&(d=new aa(d,b.mode,null,b.lineSeparator,b.direction));this.doc=d;var e=new F.inputStyles[b.inputStyle](this);e=this.display=new kg(a,d,e);e.wrapper.CodeMirror=this;af(this);
|
416 |
+
Uf(this);b.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");Xe(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Za,keySeq:null,specialChars:null};b.autofocus&&!sb&&e.input.focus();B&&11>E&&setTimeout(function(){return c.display.input.reset(!0)},20);kh(this);Wf||(Sg(),Wf=!0);Wa(this);this.curOp.forceUpdate=!0;gf(this,d);b.autofocus&&!sb||this.hasFocus()?
|
417 |
+
setTimeout(Oc(wd,this),20):Gb(this);for(var f in Kc)if(Kc.hasOwnProperty(f))Kc[f](c,b[f],pb);Te(this);b.finishInit&&b.finishInit(this);for(d=0;d<Sd.length;++d)Sd[d](c);Xa(this);T&&b.lineWrapping&&"optimizelegibility"==getComputedStyle(e.lineDiv).textRendering&&(e.lineDiv.style.textRendering="auto")}function kh(a){function b(){d.activeTouch&&(e=setTimeout(function(){return d.activeTouch=null},1E3),f=d.activeTouch,f.end=+new Date)}function c(a,b){if(null==b.left)return!0;var d=b.left-a.left,c=b.top-
|
418 |
+
a.top;return 400<d*d+c*c}var d=a.display;w(d.scroller,"mousedown",N(a,Rf));B&&11>E?w(d.scroller,"dblclick",N(a,function(b){if(!M(a,b)){var d=Ta(a,b);!d||Jc(a,b,"gutterClick",!0)||xa(a.display,b)||(Y(b),b=a.findWordAt(d),Dc(a.doc,b.anchor,b.head))}})):w(d.scroller,"dblclick",function(b){return M(a,b)||Y(b)});Qd||w(d.scroller,"contextmenu",function(b){return Sf(a,b)});var e,f={end:0};w(d.scroller,"touchstart",function(b){var c;if(c=!M(a,b))1!=b.touches.length?c=!1:(c=b.touches[0],c=1>=c.radiusX&&1>=
|
419 |
+
c.radiusY),c=!c;c&&!Jc(a,b,"gutterClick",!0)&&(d.input.ensurePolled(),clearTimeout(e),c=+new Date,d.activeTouch={start:c,moved:!1,prev:300>=c-f.end?f:null},1==b.touches.length&&(d.activeTouch.left=b.touches[0].pageX,d.activeTouch.top=b.touches[0].pageY))});w(d.scroller,"touchmove",function(){d.activeTouch&&(d.activeTouch.moved=!0)});w(d.scroller,"touchend",function(e){var f=d.activeTouch;if(f&&!xa(d,e)&&null!=f.left&&!f.moved&&300>new Date-f.start){var g=a.coordsChar(d.activeTouch,"page");f=!f.prev||
|
420 |
+
c(f,f.prev)?new A(g,g):!f.prev.prev||c(f,f.prev.prev)?a.findWordAt(g):new A(p(g.line,0),v(a.doc,p(g.line+1,0)));a.setSelection(f.anchor,f.head);a.focus();Y(e)}b()});w(d.scroller,"touchcancel",b);w(d.scroller,"scroll",function(){d.scroller.clientHeight&&(Ib(a,d.scroller.scrollTop),Va(a,d.scroller.scrollLeft,!0),J(a,"scroll",a))});w(d.scroller,"mousewheel",function(b){return cf(a,b)});w(d.scroller,"DOMMouseScroll",function(b){return cf(a,b)});w(d.wrapper,"scroll",function(){return d.wrapper.scrollTop=
|
421 |
+
d.wrapper.scrollLeft=0});d.dragFunctions={enter:function(b){M(a,b)||xb(b)},over:function(b){if(!M(a,b)){var d=Ta(a,b);if(d){var c=document.createDocumentFragment();Oe(a,d,c);a.display.dragCursor||(a.display.dragCursor=u("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv));D(a.display.dragCursor,c)}xb(b)}},start:function(b){if(B&&(!a.state.draggingText||100>+new Date-Ef))xb(b);else if(!M(a,b)&&!xa(a.display,b)&&(b.dataTransfer.setData("Text",
|
422 |
+
a.getSelection()),b.dataTransfer.effectAllowed="copyMove",b.dataTransfer.setDragImage&&!Xf)){var d=u("img",null,null,"position: fixed; left: 0; top: 0;");d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";na&&(d.width=d.height=1,a.display.wrapper.appendChild(d),d._top=d.offsetTop);b.dataTransfer.setDragImage(d,0,0);na&&d.parentNode.removeChild(d)}},drop:N(a,Rg),leave:function(b){M(a,b)||Df(a)}};var g=d.input.getField();w(g,"keyup",function(b){return Pf.call(a,b)});
|
423 |
+
w(g,"keydown",N(a,Of));w(g,"keypress",N(a,Qf));w(g,"focus",function(b){return wd(a,b)});w(g,"blur",function(b){return Gb(a,b)})}function Yb(a,b,c,d){var e=a.doc,f;null==c&&(c="add");"smart"==c&&(e.mode.indent?f=yb(a,b).state:c="prev");var g=a.options.tabSize,h=t(e,b),k=ia(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var l=h.text.match(/^\s*/)[0];if(!d&&!/\S/.test(h.text)){var m=0;c="not"}else if("smart"==c&&(m=e.mode.indent(f,h.text.slice(l.length),h.text),m==Ic||150<m)){if(!d)return;c="prev"}"prev"==
|
424 |
+
c?m=b>e.first?ia(t(e,b-1).text,null,g):0:"add"==c?m=k+a.options.indentUnit:"subtract"==c?m=k-a.options.indentUnit:"number"==typeof c&&(m=k+c);m=Math.max(0,m);c="";d=0;if(a.options.indentWithTabs)for(a=Math.floor(m/g);a;--a)d+=g,c+="\t";d<m&&(c+=Qc(m-d));if(c!=l)return lb(e,c,p(b,0),p(b,l.length),"+input"),h.stateAfter=null,!0;for(g=0;g<e.sel.ranges.length;g++)if(h=e.sel.ranges[g],h.head.line==b&&h.head.ch<l.length){b=p(b,l.length);Jd(e,g,new A(b,b));break}}function Td(a,b,c,d,e){var f=a.doc;a.display.shift=
|
425 |
+
!1;d||(d=f.sel);var g=a.state.pasteIncoming||"paste"==e,h=Ud(b),k=null;if(g&&1<d.ranges.length)if(da&&da.text.join("\n")==b){if(0==d.ranges.length%da.text.length){k=[];for(var l=0;l<da.text.length;l++)k.push(f.splitLines(da.text[l]))}}else h.length==d.ranges.length&&a.options.pasteLinesPerSelection&&(k=hc(h,function(a){return[a]}));for(l=d.ranges.length-1;0<=l;l--){var m=d.ranges[l];var r=m.from(),n=m.to();m.empty()&&(c&&0<c?r=p(r.line,r.ch-c):a.state.overwrite&&!g?n=p(n.line,Math.min(t(f,n.line).text.length,
|
426 |
+
n.ch+z(h).length)):da&&da.lineWise&&da.text.join("\n")==b&&(r=n=p(r.line,0)));m=a.curOp.updateInput;r={from:r,to:n,text:k?k[l%k.length]:h,origin:e||(g?"paste":a.state.cutIncoming?"cut":"+input")};kb(a.doc,r);R(a,"inputRead",a,r)}b&&!g&&Yf(a,b);fb(a);a.curOp.updateInput=m;a.curOp.typing=!0;a.state.pasteIncoming=a.state.cutIncoming=!1}function Zf(a,b){var c=a.clipboardData&&a.clipboardData.getData("Text");if(c)return a.preventDefault(),b.isReadOnly()||b.options.disableInput||ca(b,function(){return Td(b,
|
427 |
+
c,0,null,"paste")}),!0}function Yf(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;0<=d;d--){var e=c.ranges[d];if(!(100<e.head.ch||d&&c.ranges[d-1].head.line==e.head.line)){var f=a.getModeAt(e.head),g=!1;if(f.electricChars)for(var h=0;h<f.electricChars.length;h++){if(-1<b.indexOf(f.electricChars.charAt(h))){g=Yb(a,e.head.line,"smart");break}}else f.electricInput&&f.electricInput.test(t(a.doc,e.head.line).text.slice(0,e.head.ch))&&(g=Yb(a,e.head.line,
|
428 |
+
"smart"));g&&R(a,"electricInput",a,e.head.line)}}}function $f(a){for(var b=[],c=[],d=0;d<a.doc.sel.ranges.length;d++){var e=a.doc.sel.ranges[d].head.line;e={anchor:p(e,0),head:p(e+1,0)};c.push(e);b.push(a.getRange(e.anchor,e.head))}return{text:b,ranges:c}}function ag(a,b){a.setAttribute("autocorrect","off");a.setAttribute("autocapitalize","off");a.setAttribute("spellcheck",!!b)}function bg(){var a=u("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),
|
429 |
+
b=u("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");T?a.style.width="1000px":a.setAttribute("wrap","off");Zb&&(a.style.border="1px solid black");ag(a);return b}function Vd(a,b,c,d,e){function f(d){var f=e?Wg(a.cm,k,b,c):Md(k,b,c);if(null==f){if(d=!d)d=b.line+c,d<a.first||d>=a.first+a.size?d=!1:(b=new p(d,b.ch,b.sticky),d=k=t(a,d));if(d)b=Nd(e,a.cm,k,b.line,c);else return!1}else b=f;return!0}var g=b,h=c,k=t(a,b.line);if("char"==d)f();else if("column"==d)f(!0);else if("word"==
|
430 |
+
d||"group"==d){var l=null;d="group"==d;for(var m=a.cm&&a.cm.getHelper(b,"wordChars"),r=!0;!(0>c)||f(!r);r=!1){var n=k.text.charAt(b.ch)||"\n";n=ic(n,m)?"w":d&&"\n"==n?"n":!d||/\s/.test(n)?null:"p";!d||r||n||(n="s");if(l&&l!=n){0>c&&(c=1,f(),b.sticky="after");break}n&&(l=n);if(0<c&&!f(!r))break}}h=Kd(a,b,g,h,!0);Vc(g,h)&&(h.hitSide=!0);return h}function cg(a,b,c,d){var e=a.doc,f=b.left;if("page"==d){var g=Math.max(Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight)-
|
431 |
+
.5*Ra(a.display),3);g=(0<c?b.bottom:b.top)+c*g}else"line"==d&&(g=0<c?b.bottom+3:b.top-3);for(;;){b=rd(a,f,g);if(!b.outside)break;if(0>c?0>=g:g>=e.height){b.hitSide=!0;break}g+=5*c}return b}function dg(a,b){var c=ld(a,b.line);if(!c||c.hidden)return null;var d=t(a.doc,b.line);c=Be(c,d,b.line);d=wa(d,a.doc.direction);var e="left";d&&(e=vb(d,b.ch)%2?"right":"left");c=Ce(c.map,b.ch,e);c.offset="right"==c.collapse?c.end:c.start;return c}function lh(a){for(;a;a=a.parentNode)if(/CodeMirror-gutter-wrapper/.test(a.className))return!0;
|
432 |
+
return!1}function qb(a,b){b&&(a.bad=!0);return a}function mh(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(a){a&&(l&&(k+=m,l=!1),k+=a)}function h(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)g(c||b.textContent.replace(/\u200b/g,""));else{c=b.getAttribute("cm-marker");var q;if(c)b=a.findMarks(p(d,0),p(e+1,0),f(+c)),b.length&&(q=b[0].find(0))&&g(Ja(a.doc,q.from,q.to).join(m));else if("false"!=b.getAttribute("contenteditable")){(q=/^(pre|div|p)$/i.test(b.nodeName))&&
|
433 |
+
l&&(k+=m,l=!1);for(c=0;c<b.childNodes.length;c++)h(b.childNodes[c]);q&&(l=!0)}}}else 3==b.nodeType&&g(b.nodeValue)}for(var k="",l=!1,m=a.doc.lineSeparator();;){h(b);if(b==c)break;b=b.nextSibling}return k}function Lc(a,b,c){if(b==a.display.lineDiv){var d=a.display.lineDiv.childNodes[c];if(!d)return qb(a.clipPos(p(a.display.viewTo-1)),!0);b=null;c=0}else for(d=b;;d=d.parentNode){if(!d||d==a.display.lineDiv)return null;if(d.parentNode&&d.parentNode==a.display.lineDiv)break}for(var e=0;e<a.display.view.length;e++){var f=
|
434 |
+
a.display.view[e];if(f.node==d)return nh(f,b,c)}}function nh(a,b,c){function d(b,d,c){for(var e=-1;e<(l?l.length:0);e++)for(var f=0>e?k.map:l[e],g=0;g<f.length;g+=3){var h=f[g+2];if(h==b||h==d){d=C(0>e?a.line:a.rest[e]);e=f[g]+c;if(0>c||h!=b)e=f[g+(c?1:0)];return p(d,e)}}}var e=a.text.firstChild,f=!1;if(!b||!za(e,b))return qb(p(C(a.line),0),!0);if(b==e&&(f=!0,b=e.childNodes[c],c=0,!b))return c=a.rest?z(a.rest):a.line,qb(p(C(c),c.text.length),f);var g=3==b.nodeType?b:null,h=b;g||1!=b.childNodes.length||
|
435 |
+
3!=b.firstChild.nodeType||(g=b.firstChild,c&&(c=g.nodeValue.length));for(;h.parentNode!=e;)h=h.parentNode;var k=a.measure,l=k.maps;if(b=d(g,h,c))return qb(b,f);e=h.nextSibling;for(g=g?g.nodeValue.length-c:0;e;e=e.nextSibling){if(b=d(e,e.firstChild,0))return qb(p(b.line,b.ch-g),f);g+=e.textContent.length}for(h=h.previousSibling;h;h=h.previousSibling){if(b=d(h,h.firstChild,-1))return qb(p(b.line,b.ch+c),f);c+=h.textContent.length}}var W=navigator.userAgent,eg=navigator.platform,Aa=/gecko\/\d/i.test(W),
|
436 |
+
fg=/MSIE \d/.test(W),gg=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(W),$b=/Edge\/(\d+)/.exec(W),B=fg||gg||$b,E=B&&(fg?document.documentMode||6:+($b||gg)[1]),T=!$b&&/WebKit\//.test(W),oh=T&&/Qt\/\d+\.\d+/.test(W),rc=!$b&&/Chrome\//.test(W),na=/Opera\//.test(W),Xf=/Apple Computer/.test(navigator.vendor),ph=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(W),Gg=/PhantomJS/.test(W),Zb=!$b&&/AppleWebKit/.test(W)&&/Mobile\/\w+/.test(W),sc=/Android/.test(W),sb=Zb||sc||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(W),
|
437 |
+
ka=Zb||/Mac/.test(eg),dh=/\bCrOS\b/.test(W),qh=/win/i.test(eg),$a=na&&W.match(/Version\/(\d*\.\d*)/);$a&&($a=Number($a[1]));$a&&15<=$a&&(na=!1,T=!0);var If=ka&&(oh||na&&(null==$a||12.11>$a)),Qd=Aa||B&&9<=E,Ua=function(a,b){var c=a.className,d=X(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}};var zb=document.createRange?function(a,b,c,d){var e=document.createRange();e.setEnd(d||a,c);e.setStart(a,b);return e}:function(a,b,c){var d=document.body.createTextRange();
|
438 |
+
try{d.moveToElementText(a.parentNode)}catch(e){return d}d.collapse(!0);d.moveEnd("character",c);d.moveStart("character",b);return d};var ac=function(a){a.select()};Zb?ac=function(a){a.selectionStart=0;a.selectionEnd=a.value.length}:B&&(ac=function(a){try{a.select()}catch(b){}});var Za=function(){this.id=null};Za.prototype.set=function(a,b){clearTimeout(this.id);this.id=setTimeout(b,a)};var Ic={toString:function(){return"CodeMirror.Pass"}},ua={scroll:!1},Rd={origin:"*mouse"},bc={origin:"+move"},gc=
|
439 |
+
[""],ig=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,jg=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,
|
440 |
+
vf=!1,Ba=!1,wb=null,ng=function(){function a(a){return 247>=a?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(a):1424<=a&&1524>=a?"R":1536<=a&&1785>=a?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(a-
|
441 |
+
1536):1774<=a&&2220>=a?"r":8192<=a&&8203>=a?"w":8204==a?"b":"L"}function b(a,b,d){this.level=a;this.from=b;this.to=d}var c=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,e=/[LRr]/,f=/[Lb1n]/,g=/[1n]/;return function(h,k){var l="ltr"==k?"L":"R";if(0==h.length||"ltr"==k&&!c.test(h))return!1;for(var m=h.length,r=[],n=0;n<m;++n)r.push(a(h.charCodeAt(n)));n=0;for(var q=l;n<m;++n){var p=r[n];"m"==p?r[n]=q:q=p}n=0;for(q=l;n<m;++n)p=r[n],"1"==p&&"r"==q?r[n]="n":e.test(p)&&(q=p,"r"==p&&(r[n]="R"));
|
442 |
+
n=1;for(q=r[0];n<m-1;++n)p=r[n],"+"==p&&"1"==q&&"1"==r[n+1]?r[n]="1":","!=p||q!=r[n+1]||"1"!=q&&"n"!=q||(r[n]=q),q=p;for(n=0;n<m;++n)if(q=r[n],","==q)r[n]="N";else if("%"==q){for(q=n+1;q<m&&"%"==r[q];++q);for(p=n&&"!"==r[n-1]||q<m&&"1"==r[q]?"1":"N";n<q;++n)r[n]=p;n=q-1}n=0;for(q=l;n<m;++n)p=r[n],"L"==q&&"1"==p?r[n]="L":e.test(p)&&(q=p);for(q=0;q<m;++q)if(d.test(r[q])){for(n=q+1;n<m&&d.test(r[n]);++n);p="L"==(q?r[q-1]:l);for(p=p==("L"==(n<m?r[n]:l))?p?"L":"R":l;q<n;++q)r[q]=p;q=n-1}l=[];var t;for(n=
|
443 |
+
0;n<m;)if(f.test(r[n])){q=n;for(++n;n<m&&f.test(r[n]);++n);l.push(new b(0,q,n))}else{var u=n;q=l.length;for(++n;n<m&&"L"!=r[n];++n);for(p=u;p<n;)if(g.test(r[p])){u<p&&l.splice(q,0,new b(1,u,p));u=p;for(++p;p<n&&g.test(r[p]);++p);l.splice(q,0,new b(2,u,p));u=p}else++p;u<n&&l.splice(q,0,new b(1,u,n))}"ltr"==k&&(1==l[0].level&&(t=h.match(/^\s+/))&&(l[0].from=t[0].length,l.unshift(new b(0,0,t[0].length))),1==z(l).level&&(t=h.match(/\s+$/))&&(z(l).to-=t[0].length,l.push(new b(0,m-t[0].length,m))));return"rtl"==
|
444 |
+
k?l.reverse():l}}(),nc=[],w=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):(a=a._handlers||(a._handlers={}),a[b]=(a[b]||nc).concat(c))},eh=function(){if(B&&9>E)return!1;var a=u("div");return"draggable"in a||"dragDrop"in a}(),bd,hd,Ud=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+
|
445 |
+
1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},rh=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},Zg=function(){var a=u("div");if("oncopy"in a)return!0;a.setAttribute("oncopy","return;");return"function"==typeof a.oncopy}(),nd=null,cd={},cb={},db={},K=function(a,b,c){this.pos=this.start=
|
446 |
+
0;this.string=a;this.tabSize=b||8;this.lineStart=this.lastColumnPos=this.lastColumnValue=0;this.lineOracle=c};K.prototype.eol=function(){return this.pos>=this.string.length};K.prototype.sol=function(){return this.pos==this.lineStart};K.prototype.peek=function(){return this.string.charAt(this.pos)||void 0};K.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)};K.prototype.eat=function(a){var b=this.string.charAt(this.pos);if("string"==typeof a?b==a:b&&(a.test?
|
447 |
+
a.test(b):a(b)))return++this.pos,b};K.prototype.eatWhile=function(a){for(var b=this.pos;this.eat(a););return this.pos>b};K.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a};K.prototype.skipToEnd=function(){this.pos=this.string.length};K.prototype.skipTo=function(a){a=this.string.indexOf(a,this.pos);if(-1<a)return this.pos=a,!0};K.prototype.backUp=function(a){this.pos-=a};K.prototype.column=function(){this.lastColumnPos<
|
448 |
+
this.start&&(this.lastColumnValue=ia(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start);return this.lastColumnValue-(this.lineStart?ia(this.string,this.lineStart,this.tabSize):0)};K.prototype.indentation=function(){return ia(this.string,null,this.tabSize)-(this.lineStart?ia(this.string,this.lineStart,this.tabSize):0)};K.prototype.match=function(a,b,c){if("string"==typeof a){var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,
|
449 |
+
a.length);if(d(e)==d(a))return!1!==b&&(this.pos+=a.length),!0}else{if((a=this.string.slice(this.pos).match(a))&&0<a.index)return null;a&&!1!==b&&(this.pos+=a[0].length);return a}};K.prototype.current=function(){return this.string.slice(this.start,this.pos)};K.prototype.hideFirstChars=function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}};K.prototype.lookAhead=function(a){var b=this.lineOracle;return b&&b.lookAhead(a)};K.prototype.baseToken=function(){var a=this.lineOracle;return a&&
|
450 |
+
a.baseToken(this.pos)};var pc=function(a,b){this.state=a;this.lookAhead=b},sa=function(a,b,c,d){this.state=b;this.doc=a;this.line=c;this.maxLookAhead=d||0;this.baseTokens=null;this.baseTokenPos=1};sa.prototype.lookAhead=function(a){var b=this.doc.getLine(this.line+a);null!=b&&a>this.maxLookAhead&&(this.maxLookAhead=a);return b};sa.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var b=this.baseTokens[this.baseTokenPos+
|
451 |
+
1];return{type:b&&b.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}};sa.prototype.nextLine=function(){this.line++;0<this.maxLookAhead&&this.maxLookAhead--};sa.fromSaved=function(a,b,c){return b instanceof pc?new sa(a,Na(a.mode,b.state),c,b.lookAhead):new sa(a,Na(a.mode,b),c)};sa.prototype.save=function(a){a=!1!==a?Na(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new pc(a,this.maxLookAhead):a};var pe=function(a,b,c){this.start=a.start;this.end=a.pos;this.string=
|
452 |
+
a.current();this.type=b||null;this.state=c},hb=function(a,b,c){this.text=a;ce(this,b);this.height=c?c(this):1};hb.prototype.lineNo=function(){return C(this)};bb(hb);var ug={},tg={},eb=null,Ab=null,De={left:0,right:0,top:0,bottom:0},Sa,ab=function(a,b,c){this.cm=c;var d=this.vert=u("div",[u("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=u("div",[u("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d);a(e);w(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,
|
453 |
+
"vertical")});w(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")});this.checkedZeroWidth=!1;B&&8>E&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ab.prototype.update=function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;c?(this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0",this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+(a.viewHeight-(b?d:0)))+"px"):(this.vert.style.display=
|
454 |
+
"",this.vert.firstChild.style.height="0");b?(this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px",this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+(a.viewWidth-a.barLeft-(c?d:0)))+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0");!this.checkedZeroWidth&&0<a.clientHeight&&(0==d&&this.zeroWidthHack(),this.checkedZeroWidth=!0);return{right:c?d:0,bottom:b?d:0}};ab.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=
|
455 |
+
a&&(this.horiz.scrollLeft=a);this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")};ab.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a);this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")};ab.prototype.zeroWidthHack=function(){this.horiz.style.height=this.vert.style.width=ka&&!ph?"12px":"18px";this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new Za;this.disableVert=new Za};ab.prototype.enableZeroWidthBar=
|
456 |
+
function(a,b,c){function d(){var e=a.getBoundingClientRect();("vert"==c?document.elementFromPoint(e.right-1,(e.top+e.bottom)/2):document.elementFromPoint((e.right+e.left)/2,e.bottom-1))!=a?a.style.pointerEvents="none":b.set(1E3,d)}a.style.pointerEvents="auto";b.set(1E3,d)};ab.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz);a.removeChild(this.vert)};var cc=function(){};cc.prototype.update=function(){return{bottom:0,right:0}};cc.prototype.setScrollLeft=function(){};
|
457 |
+
cc.prototype.setScrollTop=function(){};cc.prototype.clear=function(){};var Ye={"native":ab,"null":cc},Fg=0,yc=function(a,b,c){var d=a.display;this.viewport=b;this.visible=xd(d,a.doc,b);this.editorIsHidden=!d.wrapper.offsetWidth;this.wrapperHeight=d.wrapper.clientHeight;this.wrapperWidth=d.wrapper.clientWidth;this.oldDisplayWidth=Oa(a);this.force=c;this.dims=md(a);this.events=[]};yc.prototype.signal=function(a,b){ja(a,b)&&this.events.push(arguments)};yc.prototype.finish=function(){for(var a=0;a<this.events.length;a++)J.apply(null,
|
458 |
+
this.events[a])};var Ac=0,fa=null;B?fa=-.53:Aa?fa=15:rc?fa=-.7:Xf&&(fa=-1/3);var ha=function(a,b){this.ranges=a;this.primIndex=b};ha.prototype.primary=function(){return this.ranges[this.primIndex]};ha.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(!Vc(c.anchor,d.anchor)||!Vc(c.head,d.head))return!1}return!0};ha.prototype.deepCopy=function(){for(var a=
|
459 |
+
[],b=0;b<this.ranges.length;b++)a[b]=new A(Wc(this.ranges[b].anchor),Wc(this.ranges[b].head));return new ha(a,this.primIndex)};ha.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1};ha.prototype.contains=function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(0<=x(b,d.from())&&0>=x(a,d.to()))return c}return-1};var A=function(a,b){this.anchor=a;this.head=b};A.prototype.from=function(){return kc(this.anchor,
|
460 |
+
this.head)};A.prototype.to=function(){return jc(this.anchor,this.head)};A.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};Ob.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;c<d;++c){var e=this.lines[c];this.height-=e.height;var f=e;f.parent=null;be(f);R(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c;this.lines=this.lines.slice(0,
|
461 |
+
a).concat(b).concat(this.lines.slice(a));for(a=0;a<b.length;++a)b[a].parent=this},iterN:function(a,b,c){for(b=a+b;a<b;++a)if(c(this.lines[a]))return!0}};Pb.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(a<e){var f=Math.min(b,e-a),g=d.height;d.removeInner(a,f);this.height-=g-d.height;e==f&&(this.children.splice(c--,1),d.parent=null);if(0==(b-=f))break;a=0}else a-=e}25>this.size-
|
462 |
+
b&&(1<this.children.length||!(this.children[0]instanceof Ob))&&(c=[],this.collapse(c),this.children=[new Ob(c)],this.children[0].parent=this)},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length;this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(a<=f){e.insertInner(a,b,c);if(e.lines&&50<e.lines.length){for(b=a=e.lines.length%25+25;b<e.lines.length;)c=new Ob(e.lines.slice(b,
|
463 |
+
b+=25)),e.height-=c.height,this.children.splice(++d,0,c),c.parent=this;e.lines=e.lines.slice(0,a);this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(10>=this.children.length)){var a=this;do{var b=a.children.splice(a.children.length-5,5);b=new Pb(b);if(a.parent){a.size-=b.size;a.height-=b.height;var c=P(a.parent.children,a);a.parent.children.splice(c+1,0,b)}else c=new Pb(a.children),c.parent=a,a.children=[c,b],a=c;b.parent=a.parent}while(10<a.children.length);a.parent.maybeSpill()}},iterN:function(a,
|
464 |
+
b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(a<f){f=Math.min(b,f-a);if(e.iterN(a,f,c))return!0;if(0==(b-=f))break;a=0}else a-=f}}};var Qb=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.doc=a;this.node=b};Qb.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,c=this.line,d=C(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=Cb(this);pa(c,Math.max(0,c.height-f));
|
465 |
+
a&&(ca(a,function(){var b=-f;ra(c)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&wc(a,b);Da(a,d,"widget")}),R(a,"lineWidgetCleared",a,this,d))}};Qb.prototype.changed=function(){var a=this,b=this.height,c=this.doc.cm,d=this.line;this.height=null;var e=Cb(this)-b;e&&(pa(d,d.height+e),c&&ca(c,function(){c.curOp.forceUpdate=!0;ra(d)<(c.curOp&&c.curOp.scrollTop||c.doc.scrollTop)&&wc(c,e);R(c,"lineWidgetChanged",c,a,C(d))}))};bb(Qb);var Bf=0,Fa=function(a,b){this.lines=[];this.type=b;this.doc=a;this.id=
|
466 |
+
++Bf};Fa.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;b&&Wa(a);if(ja(this,"clear")){var c=this.find();c&&R(this,"clear",c.from,c.to)}for(var d=c=null,e=0;e<this.lines.length;++e){var f=this.lines[e],g=ub(f.markedSpans,this);a&&!this.collapsed?Da(a,C(f),"text"):a&&(null!=g.to&&(d=C(f)),null!=g.from&&(c=C(f)));for(var h=f,k=void 0,l=f.markedSpans,m=g,p=0;p<l.length;++p)l[p]!=m&&(k||(k=[])).push(l[p]);h.markedSpans=k;null==g.from&&this.collapsed&&!Ma(this.doc,
|
467 |
+
f)&&a&&pa(f,Ra(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(e=0;e<this.lines.length;++e)f=qa(this.lines[e]),g=mc(f),g>a.display.maxLineLength&&(a.display.maxLine=f,a.display.maxLineLength=g,a.display.maxLineChanged=!0);null!=c&&a&&this.collapsed&&Z(a,c,d+1);this.lines.length=0;this.explicitlyCleared=!0;this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&rf(a.doc));a&&R(a,"markerCleared",a,this,c,d);b&&Xa(a);this.parent&&this.parent.clear()}};Fa.prototype.find=function(a,b){null==
|
468 |
+
a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=ub(f.markedSpans,this);if(null!=g.from&&(c=p(b?f:C(f),g.from),-1==a))return c;if(null!=g.to&&(d=p(b?f:C(f),g.to),1==a))return d}return c&&{from:c,to:d}};Fa.prototype.changed=function(){var a=this,b=this.find(-1,!0),c=this,d=this.doc.cm;b&&d&&ca(d,function(){var e=b.line,f=C(b.line);if(f=ld(d,f))Ee(f),d.curOp.selectionChanged=d.curOp.forceUpdate=!0;d.curOp.updateMaxLine=!0;Ma(c.doc,e)||null==c.height||(f=
|
469 |
+
c.height,c.height=null,(f=Cb(c)-f)&&pa(e,e.height+f));R(d,"markerChanged",d,a)})};Fa.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=P(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)};Fa.prototype.detachLine=function(a){this.lines.splice(P(this.lines,a),1);!this.lines.length&&this.doc.cm&&(a=this.doc.cm.curOp,(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this))};
|
470 |
+
bb(Fa);var Rb=function(a,b){this.markers=a;this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};Rb.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();R(this,"clear")}};Rb.prototype.find=function(a,b){return this.primary.find(a,b)};bb(Rb);var sh=0,aa=function(a,b,c,d,e){if(!(this instanceof aa))return new aa(a,b,c,d,e);null==c&&(c=0);Pb.call(this,[new Ob([new hb("",null)])]);this.first=c;this.scrollTop=
|
471 |
+
this.scrollLeft=0;this.cantEdit=!1;this.cleanGeneration=1;this.modeFrontier=this.highlightFrontier=c;c=p(c,0);this.sel=ya(c);this.history=new Bc(null);this.id=++sh;this.modeOption=b;this.lineSep=d;this.direction="rtl"==e?"rtl":"ltr";this.extend=!1;"string"==typeof a&&(a=this.splitLines(a));Gd(this,{from:c,to:c,text:a});S(this,ya(c),ua)};aa.prototype=Xd(Pb.prototype,{constructor:aa,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,
|
472 |
+
b){for(var c=0,d=0;d<b.length;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=Tc(this,this.first,this.first+this.size);return!1===a?b:b.join(a||this.lineSeparator())},setValue:O(function(a){var b=p(this.first,0),c=this.first+this.size-1;kb(this,{from:b,to:p(c,t(this,c).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0);this.cm&&Hb(this.cm,0,0);S(this,ya(b),ua)}),replaceRange:function(a,b,c,d){b=
|
473 |
+
v(this,b);c=c?v(this,c):b;lb(this,a,b,c,d)},getRange:function(a,b,c){a=Ja(this,v(this,a),v(this,b));return!1===c?a:a.join(c||this.lineSeparator())},getLine:function(a){return(a=this.getLineHandle(a))&&a.text},getLineHandle:function(a){if(tb(this,a))return t(this,a)},getLineNumber:function(a){return C(a)},getLineHandleVisualStart:function(a){"number"==typeof a&&(a=t(this,a));return qa(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+
|
474 |
+
this.size-1},clipPos:function(a){return v(this,a)},getCursor:function(a){var b=this.sel.primary();return null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||"to"==a||!1===a?b.to():b.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:O(function(a,b,c){a=v(this,"number"==typeof a?p(a,b||0):a);S(this,ya(a,null),c)}),setSelection:O(function(a,b,c){var d=v(this,a);a=v(this,b||a);S(this,ya(d,a),c)}),extendSelection:O(function(a,
|
475 |
+
b,c){Dc(this,v(this,a),b&&v(this,b),c)}),extendSelections:O(function(a,b){nf(this,$d(this,a),b)}),extendSelectionsBy:O(function(a,b){var c=hc(this.sel.ranges,a);nf(this,$d(this,c),b)}),setSelections:O(function(a,b,c){if(a.length){for(var d=[],e=0;e<a.length;e++)d[e]=new A(v(this,a[e].anchor),v(this,a[e].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex));S(this,oa(d,b),c)}}),addSelection:O(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new A(v(this,a),v(this,b||a)));S(this,oa(d,d.length-
|
476 |
+
1),c)}),getSelection:function(a){for(var b=this.sel.ranges,c,d=0;d<b.length;d++){var e=Ja(this,b[d].from(),b[d].to());c=c?c.concat(e):e}return!1===a?c:c.join(a||this.lineSeparator())},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=Ja(this,c[d].from(),c[d].to());!1!==a&&(e=e.join(a||this.lineSeparator()));b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:O(function(a,
|
477 |
+
b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:this.splitLines(a[f]),origin:c}}if(a=b&&"end"!=b){a=[];e=c=p(this.first,0);for(f=0;f<d.length;f++){var h=d[f];g=ef(h.from,c,e);var k=ef(Ea(h),c,e);c=h.to;e=k;"around"==b?(h=this.sel.ranges[f],h=0>x(h.head,h.anchor),a[f]=new A(h?k:g,h?g:k)):a[f]=new A(g,g)}a=new ha(a,this.sel.primIndex)}b=a;for(a=d.length-1;0<=a;a--)kb(this,d[a]);b?of(this,b):this.cm&&fb(this.cm)}),undo:O(function(){Fc(this,
|
478 |
+
"undo")}),redo:O(function(){Fc(this,"redo")}),undoSelection:O(function(){Fc(this,"undo",!0)}),redoSelection:O(function(){Fc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new Bc(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=
|
479 |
+
this.changeGeneration(!0)},changeGeneration:function(a){a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null);return this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:ib(this.history.done),undone:ib(this.history.undone)}},setHistory:function(a){var b=this.history=new Bc(this.history.maxGeneration);b.done=ib(a.done.slice(0),null,!0);b.undone=ib(a.undone.slice(0),null,!0)},setGutterMarker:O(function(a,
|
480 |
+
b,c){return Nb(this,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});d[b]=c;!c&&Yd(d)&&(a.gutterMarkers=null);return!0})}),clearGutter:O(function(a){var b=this;this.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&Nb(b,c,"gutter",function(){c.gutterMarkers[a]=null;Yd(c.gutterMarkers)&&(c.gutterMarkers=null);return!0})})}),lineInfo:function(a){if("number"==typeof a){if(!tb(this,a))return null;var b=a;a=t(this,a);if(!a)return null}else if(b=C(a),null==b)return null;return{line:b,
|
481 |
+
handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:O(function(a,b,c){return Nb(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass";if(a[d]){if(X(c).test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:O(function(a,b,c){return Nb(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":
|
482 |
+
"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass",f=a[d];if(f)if(null==c)a[d]=null;else{var g=f.match(X(c));if(!g)return!1;var h=g.index+g[0].length;a[d]=f.slice(0,g.index)+(g.index&&h!=f.length?" ":"")+f.slice(h)||null}else return!1;return!0})}),addLineWidget:O(function(a,b,c){return Og(this,a,b,c)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,c){return mb(this,v(this,a),v(this,b),c,c&&c.type||"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?
|
483 |
+
b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};a=v(this,a);return mb(this,a,a,c,"bookmark")},findMarksAt:function(a){a=v(this,a);var b=[],c=t(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=v(this,a);b=v(this,b);var d=[],e=a.line;this.iter(a.line,b.line+1,function(f){if(f=f.markedSpans)for(var g=
|
484 |
+
0;g<f.length;g++){var h=f[g];null!=h.to&&e==a.line&&a.ch>=h.to||null==h.from&&e!=a.line||null!=h.from&&e==b.line&&h.from>=b.ch||c&&!c(h.marker)||d.push(h.marker.parent||h.marker)}++e});return d},getAllMarks:function(){var a=[];this.iter(function(b){if(b=b.markedSpans)for(var c=0;c<b.length;++c)null!=b[c].from&&a.push(b[c].marker)});return a},posFromIndex:function(a){var b,c=this.first,d=this.lineSeparator().length;this.iter(function(e){e=e.text.length+d;if(e>a)return b=a,!0;a-=e;++c});return v(this,
|
485 |
+
p(c,b))},indexFromPos:function(a){a=v(this,a);var b=a.ch;if(a.line<this.first||0>a.ch)return 0;var c=this.lineSeparator().length;this.iter(this.first,a.line,function(a){b+=a.text.length+c});return b},copy:function(a){var b=new aa(Tc(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);b.scrollTop=this.scrollTop;b.scrollLeft=this.scrollLeft;b.sel=this.sel;b.extend=!1;a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory()));return b},linkedDoc:function(a){a||
|
486 |
+
(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from);null!=a.to&&a.to<c&&(c=a.to);b=new aa(Tc(this,b,c),a.mode||this.modeOption,b,this.lineSep,this.direction);a.sharedHist&&(b.history=this.history);(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist});b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}];a=Cf(this);for(c=0;c<a.length;c++){var d=a[c],e=d.find(),f=b.clipPos(e.from);e=b.clipPos(e.to);x(f,e)&&(f=mb(b,f,e,d.primary,d.primary.type),d.markers.push(f),
|
487 |
+
f.parent=d)}return b},unlinkDoc:function(a){a instanceof F&&(a=a.doc);if(this.linked)for(var b=0;b<this.linked.length;++b)if(this.linked[b].doc==a){this.linked.splice(b,1);a.unlinkDoc(this);Qg(Cf(this));break}if(a.history==this.history){var c=[a.id];Ya(a,function(a){return c.push(a.id)},!0);a.history=new Bc(null);a.history.done=ib(this.history.done,c);a.history.undone=ib(this.history.undone,c)}},iterLinkedDocs:function(a){Ya(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},
|
488 |
+
splitLines:function(a){return this.lineSep?a.split(this.lineSep):Ud(a)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:O(function(a){"rtl"!=a&&(a="ltr");a!=this.direction&&(this.direction=a,this.iter(function(a){return a.order=null}),this.cm&&Kg(this.cm))})});aa.prototype.eachLine=aa.prototype.iter;for(var Ef=0,Wf=!1,Ga={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",
|
489 |
+
37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},dc=0;10>dc;dc++)Ga[dc+48]=Ga[dc+96]=String(dc);for(var Mc=65;90>=Mc;Mc++)Ga[Mc]=
|
490 |
+
String.fromCharCode(Mc);for(var ec=1;12>=ec;ec++)Ga[ec+111]=Ga[ec+63235]="F"+ec;var Sb={basic:{Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},pcDefault:{"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo",
|
491 |
+
"Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection",
|
492 |
+
"Alt-U":"redoSelection",fallthrough:"basic"},emacsy:{"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},macDefault:{"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo",
|
493 |
+
"Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft",
|
494 |
+
"Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]}};Sb["default"]=ka?Sb.macDefault:Sb.pcDefault;var Tb={selectAll:tf,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),ua)},killLine:function(a){return ob(a,function(b){if(b.empty()){var c=t(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:p(b.head.line+
|
495 |
+
1,0)}:{from:b.head,to:p(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){return ob(a,function(b){return{from:p(b.from().line,0),to:v(a.doc,p(b.to().line+1,0))}})},delLineLeft:function(a){return ob(a,function(a){return{from:p(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){return ob(a,function(b){var c=a.charCoords(b.head,"div").top+5;return{from:a.coordsChar({left:0,top:c},"div"),to:b.from()}})},delWrappedLineRight:function(a){return ob(a,function(b){var c=
|
496 |
+
a.charCoords(b.head,"div").top+5;c=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:c}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(p(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(p(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(b){return Kf(a,
|
497 |
+
b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(b){return Lf(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(b){b=b.head.line;var c=t(a.doc,b);var d=c;for(var e;e=La(d,!1);)d=e.find(1,!0).line;d!=c&&(b=C(d));return Nd(!0,a,c,b,-1)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(b){b=a.cursorCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+
|
498 |
+
100,top:b},"div")},bc)},goLineLeft:function(a){return a.extendSelectionsBy(function(b){b=a.cursorCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:b},"div")},bc)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(b){var c=a.cursorCoords(b.head,"div").top+5;c=a.coordsChar({left:0,top:c},"div");return c.ch<a.getLine(c.line).search(/\S/)?Lf(a,b.head):c},bc)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,
|
499 |
+
"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,
|
500 |
+
"char")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection("\t")},
|
501 |
+
insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from();f=ia(a.getLine(f.line),f.ch,d);b.push(Qc(d-f%d))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return ca(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++)if(b[d].empty()){var e=b[d].head,f=t(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new p(e.line,e.ch-1)),0<e.ch)e=
|
502 |
+
new p(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),p(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=t(a.doc,e.line-1).text;g&&(e=new p(e.line,1),a.replaceRange(f.charAt(0)+a.doc.lineSeparator()+g.charAt(g.length-1),p(e.line-1,g.length-1),e,"+transpose"))}c.push(new A(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){return ca(a,function(){for(var b=a.listSelections(),c=b.length-1;0<=c;c--)a.replaceRange(a.doc.lineSeparator(),b[c].anchor,b[c].head,"+input");
|
503 |
+
b=a.listSelections();for(c=0;c<b.length;c++)a.indentLine(b[c].from().line,null,!0);fb(a)})},openLine:function(a){return a.replaceSelection("\n","start")},toggleOverwrite:function(a){return a.toggleOverwrite()}},Xg=new Za,Od=null,Pd=function(a,b,c){this.time=a;this.pos=b;this.button=c};Pd.prototype.compare=function(a,b,c){return this.time+400>a&&0==x(b,this.pos)&&c==this.button};var Wb,Vb,pb={toString:function(){return"CodeMirror.Init"}},Vf={},Kc={};F.defaults=Vf;F.optionHandlers=Kc;var Sd=[];F.defineInitHook=
|
504 |
+
function(a){return Sd.push(a)};var da=null,y=function(a){this.cm=a;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new Za;this.composing=null;this.gracePeriod=!1;this.readDOMTimeout=null};y.prototype.init=function(a){function b(a){if(!M(e,a)){if(e.somethingSelected())da={lineWise:!1,text:e.getSelections()},"cut"==a.type&&e.replaceSelection("",null,"cut");else if(e.options.lineWiseCopyCut){var b=$f(e);da={lineWise:!0,text:b.text};"cut"==a.type&&e.operation(function(){e.setSelections(b.ranges,
|
505 |
+
0,ua);e.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var c=da.text.join("\n");a.clipboardData.setData("Text",c);if(a.clipboardData.getData("Text")==c){a.preventDefault();return}}var g=bg();a=g.firstChild;e.display.lineSpace.insertBefore(g,e.display.lineSpace.firstChild);a.value=da.text.join("\n");var m=document.activeElement;ac(a);setTimeout(function(){e.display.lineSpace.removeChild(g);m.focus();m==f&&d.showPrimarySelection()},50)}}var c=this,d=this,
|
506 |
+
e=d.cm,f=d.div=a.lineDiv;ag(f,e.options.spellcheck);w(f,"paste",function(a){M(e,a)||Zf(a,e)||11>=E&&setTimeout(N(e,function(){return c.updateFromDOM()}),20)});w(f,"compositionstart",function(a){c.composing={data:a.data,done:!1}});w(f,"compositionupdate",function(a){c.composing||(c.composing={data:a.data,done:!1})});w(f,"compositionend",function(a){c.composing&&(a.data!=c.composing.data&&c.readFromDOMSoon(),c.composing.done=!0)});w(f,"touchstart",function(){return d.forceCompositionEnd()});w(f,"input",
|
507 |
+
function(){c.composing||c.readFromDOMSoon()});w(f,"copy",b);w(f,"cut",b)};y.prototype.prepareSelection=function(){var a=Ne(this.cm,!1);a.focus=this.cm.state.focused;return a};y.prototype.showSelection=function(a,b){a&&this.cm.display.view.length&&((a.focus||b)&&this.showPrimarySelection(),this.showMultipleSelections(a))};y.prototype.showPrimarySelection=function(){var a=window.getSelection(),b=this.cm,c=b.doc.sel.primary(),d=c.from();c=c.to();if(b.display.viewTo==b.display.viewFrom||d.line>=b.display.viewTo||
|
508 |
+
c.line<b.display.viewFrom)a.removeAllRanges();else{var e=Lc(b,a.anchorNode,a.anchorOffset),f=Lc(b,a.focusNode,a.focusOffset);if(!e||e.bad||!f||f.bad||0!=x(kc(e,f),d)||0!=x(jc(e,f),c))if(e=b.display.view,d=d.line>=b.display.viewFrom&&dg(b,d)||{node:e[0].measure.map[2],offset:0},c=c.line<b.display.viewTo&&dg(b,c),c||(c=e[e.length-1].measure,c=c.maps?c.maps[c.maps.length-1]:c.map,c={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}),d&&c){e=a.rangeCount&&a.getRangeAt(0);try{var g=zb(d.node,d.offset,
|
509 |
+
c.offset,c.node)}catch(h){}g&&(!Aa&&b.state.focused?(a.collapse(d.node,d.offset),g.collapsed||(a.removeAllRanges(),a.addRange(g))):(a.removeAllRanges(),a.addRange(g)),e&&null==a.anchorNode?a.addRange(e):Aa&&this.startGracePeriod());this.rememberSelection()}else a.removeAllRanges()}};y.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){a.gracePeriod=!1;a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=
|
510 |
+
!0})},20)};y.prototype.showMultipleSelections=function(a){D(this.cm.display.cursorDiv,a.cursors);D(this.cm.display.selectionDiv,a.selection)};y.prototype.rememberSelection=function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode;this.lastAnchorOffset=a.anchorOffset;this.lastFocusNode=a.focusNode;this.lastFocusOffset=a.focusOffset};y.prototype.selectionInEditor=function(){var a=window.getSelection();if(!a.rangeCount)return!1;a=a.getRangeAt(0).commonAncestorContainer;return za(this.div,
|
511 |
+
a)};y.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())};y.prototype.blur=function(){this.div.blur()};y.prototype.getField=function(){return this.div};y.prototype.supportsTouch=function(){return!0};y.prototype.receivedFocus=function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():ca(this.cm,
|
512 |
+
function(){return b.cm.curOp.selectionChanged=!0});this.polling.set(this.cm.options.pollInterval,a)};y.prototype.selectionChanged=function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset};y.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;if(sc&&rc&&this.cm.options.gutters.length&&
|
513 |
+
lh(a.anchorNode))this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();else if(!this.composing){this.rememberSelection();var c=Lc(b,a.anchorNode,a.anchorOffset),d=Lc(b,a.focusNode,a.focusOffset);c&&d&&ca(b,function(){S(b.doc,ya(c,d),ua);if(c.bad||d.bad)b.curOp.selectionChanged=!0})}}};y.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,b=a.display,c=a.doc.sel.primary(),
|
514 |
+
d=c.from(),e=c.to();0==d.ch&&d.line>a.firstLine()&&(d=p(d.line-1,t(a.doc,d.line-1).length));e.ch==t(a.doc,e.line).text.length&&e.line<a.lastLine()&&(e=p(e.line+1,0));if(d.line<b.viewFrom||e.line>b.viewTo-1)return!1;var f;d.line==b.viewFrom||0==(f=Pa(a,d.line))?(c=C(b.view[0].line),f=b.view[0].node):(c=C(b.view[f].line),f=b.view[f-1].node.nextSibling);var g=Pa(a,e.line);g==b.view.length-1?(e=b.viewTo-1,b=b.lineDiv.lastChild):(e=C(b.view[g+1].line)-1,b=b.view[g+1].node.previousSibling);if(!f)return!1;
|
515 |
+
b=a.doc.splitLines(mh(a,f,b,c,e));for(f=Ja(a.doc,p(c,0),p(e,t(a.doc,e).text.length));1<b.length&&1<f.length;)if(z(b)==z(f))b.pop(),f.pop(),e--;else if(b[0]==f[0])b.shift(),f.shift(),c++;else break;var h=0;g=0;for(var k=b[0],l=f[0],m=Math.min(k.length,l.length);h<m&&k.charCodeAt(h)==l.charCodeAt(h);)++h;k=z(b);l=z(f);for(m=Math.min(k.length-(1==b.length?h:0),l.length-(1==f.length?h:0));g<m&&k.charCodeAt(k.length-g-1)==l.charCodeAt(l.length-g-1);)++g;if(1==b.length&&1==f.length&&c==d.line)for(;h&&h>
|
516 |
+
d.ch&&k.charCodeAt(k.length-g-1)==l.charCodeAt(l.length-g-1);)h--,g++;b[b.length-1]=k.slice(0,k.length-g).replace(/^\u200b+/,"");b[0]=b[0].slice(h).replace(/\u200b+$/,"");d=p(c,h);c=p(e,f.length?z(f).length-g:0);if(1<b.length||b[0]||x(d,c))return lb(a.doc,b,d,c,"+input"),!0};y.prototype.ensurePolled=function(){this.forceCompositionEnd()};y.prototype.reset=function(){this.forceCompositionEnd()};y.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=
|
517 |
+
null,this.updateFromDOM(),this.div.blur(),this.div.focus())};y.prototype.readFromDOMSoon=function(){var a=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){a.readDOMTimeout=null;if(a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))};y.prototype.updateFromDOM=function(){var a=this;!this.cm.isReadOnly()&&this.pollContent()||ca(this.cm,function(){return Z(a.cm)})};y.prototype.setUneditable=function(a){a.contentEditable="false"};y.prototype.onKeyPress=
|
518 |
+
function(a){0!=a.charCode&&(a.preventDefault(),this.cm.isReadOnly()||N(this.cm,Td)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0))};y.prototype.readOnlyChanged=function(a){this.div.contentEditable=String("nocursor"!=a)};y.prototype.onContextMenu=function(){};y.prototype.resetPosition=function(){};y.prototype.needsContentAttribute=!0;var L=function(a){this.cm=a;this.prevInput="";this.pollingFast=!1;this.polling=new Za;this.hasSelection=!1;this.composing=null};L.prototype.init=
|
519 |
+
function(a){function b(a){if(!M(e,a)){if(e.somethingSelected())da={lineWise:!1,text:e.getSelections()};else if(e.options.lineWiseCopyCut){var b=$f(e);da={lineWise:!0,text:b.text};"cut"==a.type?e.setSelections(b.ranges,null,ua):(d.prevInput="",g.value=b.text.join("\n"),ac(g))}else return;"cut"==a.type&&(e.state.cutIncoming=!0)}}var c=this,d=this,e=this.cm,f=this.wrapper=bg(),g=this.textarea=f.firstChild;a.wrapper.insertBefore(f,a.wrapper.firstChild);Zb&&(g.style.width="0px");w(g,"input",function(){B&&
|
520 |
+
9<=E&&c.hasSelection&&(c.hasSelection=null);d.poll()});w(g,"paste",function(a){M(e,a)||Zf(a,e)||(e.state.pasteIncoming=!0,d.fastPoll())});w(g,"cut",b);w(g,"copy",b);w(a.scroller,"paste",function(b){xa(a,b)||M(e,b)||(e.state.pasteIncoming=!0,d.focus())});w(a.lineSpace,"selectstart",function(b){xa(a,b)||Y(b)});w(g,"compositionstart",function(){var a=e.getCursor("from");d.composing&&d.composing.range.clear();d.composing={start:a,range:e.markText(a,e.getCursor("to"),{className:"CodeMirror-composing"})}});
|
521 |
+
w(g,"compositionend",function(){d.composing&&(d.poll(),d.composing.range.clear(),d.composing=null)})};L.prototype.prepareSelection=function(){var a=this.cm,b=a.display,c=a.doc,d=Ne(a);if(a.options.moveInputWithCursor){a=ma(a,c.sel.primary().head,"div");c=b.wrapper.getBoundingClientRect();var e=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,a.top+e.top-c.top));d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,a.left+e.left-c.left))}return d};L.prototype.showSelection=
|
522 |
+
function(a){var b=this.cm.display;D(b.cursorDiv,a.cursors);D(b.selectionDiv,a.selection);null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")};L.prototype.reset=function(a){if(!this.contextMenuPending&&!this.composing){var b=this.cm;b.somethingSelected()?(this.prevInput="",a=b.getSelection(),this.textarea.value=a,b.state.focused&&ac(this.textarea),B&&9<=E&&(this.hasSelection=a)):a||(this.prevInput=this.textarea.value="",B&&9<=E&&(this.hasSelection=null))}};L.prototype.getField=
|
523 |
+
function(){return this.textarea};L.prototype.supportsTouch=function(){return!1};L.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!sb||va()!=this.textarea))try{this.textarea.focus()}catch(a){}};L.prototype.blur=function(){this.textarea.blur()};L.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0};L.prototype.receivedFocus=function(){this.slowPoll()};L.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,
|
524 |
+
function(){a.poll();a.cm.state.focused&&a.slowPoll()})};L.prototype.fastPoll=function(){function a(){c.poll()||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0;c.polling.set(20,a)};L.prototype.poll=function(){var a=this,b=this.cm,c=this.textarea,d=this.prevInput;if(this.contextMenuPending||!b.state.focused||rh(c)&&!d&&!this.composing||b.isReadOnly()||b.options.disableInput||b.state.keySeq)return!1;var e=c.value;if(e==d&&!b.somethingSelected())return!1;
|
525 |
+
if(B&&9<=E&&this.hasSelection===e||ka&&/[\uf700-\uf7ff]/.test(e))return b.display.input.reset(),!1;if(b.doc.sel==b.display.selForContextMenu){var f=e.charCodeAt(0);8203!=f||d||(d="\u200b");if(8666==f)return this.reset(),this.cm.execCommand("undo")}var g=0;for(f=Math.min(d.length,e.length);g<f&&d.charCodeAt(g)==e.charCodeAt(g);)++g;ca(b,function(){Td(b,e.slice(g),d.length-g,null,a.composing?"*compose":null);1E3<e.length||-1<e.indexOf("\n")?c.value=a.prevInput="":a.prevInput=e;a.composing&&(a.composing.range.clear(),
|
526 |
+
a.composing.range=b.markText(a.composing.start,b.getCursor("to"),{className:"CodeMirror-composing"}))});return!0};L.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)};L.prototype.onKeyPress=function(){B&&9<=E&&(this.hasSelection=null);this.fastPoll()};L.prototype.onContextMenu=function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="\u200b"+(a?g.value:"");g.value="\u21da";g.value=b;d.prevInput=a?"":"\u200b";g.selectionStart=1;g.selectionEnd=
|
527 |
+
b.length;f.selForContextMenu=e.doc.sel}}function c(){d.contextMenuPending=!1;d.wrapper.style.cssText=m;g.style.cssText=l;B&&9>E&&f.scrollbars.setScrollTop(f.scroller.scrollTop=k);if(null!=g.selectionStart){(!B||B&&9>E)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&0<g.selectionEnd&&"\u200b"==d.prevInput?N(e,tf)(e):10>a++?f.detectingSelectAll=setTimeout(c,500):(f.selForContextMenu=null,f.input.reset())};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,
|
528 |
+
g=d.textarea,h=Ta(e,a),k=f.scroller.scrollTop;if(h&&!na){e.options.resetSelectionOnContextMenu&&-1==e.doc.sel.contains(h)&&N(e,S)(e.doc,ya(h),ua);var l=g.style.cssText,m=d.wrapper.style.cssText;d.wrapper.style.cssText="position: absolute";h=d.wrapper.getBoundingClientRect();g.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(a.clientY-h.top-5)+"px; left: "+(a.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(B?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
|
529 |
+
if(T)var p=window.scrollY;f.input.focus();T&&window.scrollTo(null,p);f.input.reset();e.somethingSelected()||(g.value=d.prevInput=" ");d.contextMenuPending=!0;f.selForContextMenu=e.doc.sel;clearTimeout(f.detectingSelectAll);B&&9<=E&&b();if(Qd){xb(a);var n=function(){ea(window,"mouseup",n);setTimeout(c,20)};w(window,"mouseup",n)}else setTimeout(c,50)}};L.prototype.readOnlyChanged=function(a){a||this.reset();this.textarea.disabled="nocursor"==a};L.prototype.setUneditable=function(){};L.prototype.needsContentAttribute=
|
530 |
+
!1;(function(a){function b(b,e,f,g){a.defaults[b]=e;f&&(c[b]=g?function(a,b,d){d!=pb&&f(a,b,d)}:f)}var c=a.optionHandlers;a.defineOption=b;a.Init=pb;b("value","",function(a,b){return a.setValue(b)},!0);b("mode",null,function(a,b){a.doc.modeOption=b;Fd(a)},!0);b("indentUnit",2,Fd,!0);b("indentWithTabs",!1);b("smartIndent",!0);b("tabSize",4,function(a){Lb(a);Eb(a);Z(a)},!0);b("lineSeparator",null,function(a,b){if(a.doc.lineSep=b){var c=[],d=a.doc.first;a.doc.iter(function(a){for(var e=0;;){var f=a.text.indexOf(b,
|
531 |
+
e);if(-1==f)break;e=f+b.length;c.push(p(d,f))}d++});for(var e=c.length-1;0<=e;e--)lb(a.doc,b,c[e],p(c[e].line,c[e].ch+b.length))}});b("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(a,b,c){a.state.specialChars=new RegExp(b.source+(b.test("\t")?"":"|\t"),"g");c!=pb&&a.refresh()});b("specialCharPlaceholder",xg,function(a){return a.refresh()},!0);b("electricChars",!0);b("inputStyle",sb?"contenteditable":"textarea",function(){throw Error("inputStyle can not (yet) be changed in a running editor");
|
532 |
+
},!0);b("spellcheck",!1,function(a,b){return a.getInputField().spellcheck=b},!0);b("rtlMoveVisually",!qh);b("wholeLineUpdateBefore",!0);b("theme","default",function(a){Uf(a);Xb(a)},!0);b("keyMap","default",function(a,b,c){b=Gc(b);(c=c!=pb&&Gc(c))&&c.detach&&c.detach(a,b);b.attach&&b.attach(a,c||null)});b("extraKeys",null);b("configureMouse",null);b("lineWrapping",!1,jh,!0);b("gutters",[],function(a){Dd(a.options);Xb(a)},!0);b("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?td(a.display)+
|
533 |
+
"px":"0";a.refresh()},!0);b("coverGutterNextToScrollbar",!1,function(a){return gb(a)},!0);b("scrollbarStyle","native",function(a){Xe(a);gb(a);a.display.scrollbars.setScrollTop(a.doc.scrollTop);a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0);b("lineNumbers",!1,function(a){Dd(a.options);Xb(a)},!0);b("firstLineNumber",1,Xb,!0);b("lineNumberFormatter",function(a){return a},Xb,!0);b("showCursorWhenSelecting",!1,Fb,!0);b("resetSelectionOnContextMenu",!0);b("lineWiseCopyCut",!0);b("pasteLinesPerSelection",
|
534 |
+
!0);b("readOnly",!1,function(a,b){"nocursor"==b&&(Gb(a),a.display.input.blur());a.display.input.readOnlyChanged(b)});b("disableInput",!1,function(a,b){b||a.display.input.reset()},!0);b("dragDrop",!0,ih);b("allowDropFileTypes",null);b("cursorBlinkRate",530);b("cursorScrollMargin",0);b("cursorHeight",1,Fb,!0);b("singleCursorHeightPerLine",!0,Fb,!0);b("workTime",100);b("workDelay",100);b("flattenSpans",!0,Lb,!0);b("addModeClass",!1,Lb,!0);b("pollInterval",100);b("undoDepth",200,function(a,b){return a.doc.history.undoDepth=
|
535 |
+
b});b("historyEventDelay",1250);b("viewportMargin",10,function(a){return a.refresh()},!0);b("maxHighlightLength",1E4,Lb,!0);b("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()});b("tabindex",null,function(a,b){return a.display.input.getField().tabIndex=b||""});b("autofocus",null);b("direction","ltr",function(a,b){return a.doc.setDirection(b)},!0)})(F);(function(a){var b=a.optionHandlers,c=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus();this.display.input.focus()},
|
536 |
+
setOption:function(a,c){var d=this.options,e=d[a];if(d[a]!=c||"mode"==a)d[a]=c,b.hasOwnProperty(a)&&N(this,b[a])(this,c,e),J(this,"optionChange",this,a)},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Gc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||b[c].name==a)return b.splice(c,1),!0},addOverlay:V(function(b,c){var d=b.token?b:a.getMode(this.options,b);if(d.startState)throw Error("Overlays may not be stateful.");
|
537 |
+
hg(this.state.overlays,{mode:d,modeSpec:b,opaque:c&&c.opaque,priority:c&&c.priority||0},function(a){return a.priority});this.state.modeGen++;Z(this)}),removeOverlay:V(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a){b.splice(c,1);this.state.modeGen++;Z(this);break}}}),indentLine:V(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract");tb(this.doc,a)&&Yb(this,
|
538 |
+
a,b,c)}),indentSelection:V(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var h=b[d];if(h.empty())h.head.line>c&&(Yb(this,h.head.line,a,!0),c=h.head.line,d==this.doc.sel.primIndex&&fb(this));else{var k=h.from();h=h.to();var l=Math.max(c,k.line);c=Math.min(this.lastLine(),h.line-(h.ch?0:1))+1;for(h=l;h<c;++h)Yb(this,h,a);h=this.doc.sel.ranges;0==k.ch&&b.length==h.length&&0<h[d].from().ch&&Jd(this.doc,d,new A(k,h[d].to()),ua)}}}),getTokenAt:function(a,b){return oe(this,a,b)},getLineTokens:function(a,
|
539 |
+
b){return oe(this,p(a),b,!0)},getTokenTypeAt:function(a){a=v(this.doc,a);var b=me(this,t(this.doc,a.line)),c=0,d=(b.length-1)/2;a=a.ch;if(0==a)b=b[2];else for(;;){var h=c+d>>1;if((h?b[2*h-1]:0)>=a)d=h;else if(b[2*h+1]<a)c=h+1;else{b=b[2*h+2];break}}c=b?b.indexOf("overlay "):-1;return 0>c?b:0==c?null:b.slice(0,c-1)},getModeAt:function(b){var c=this.doc.mode;return c.innerMode?a.innerMode(c,this.getTokenAt(b).state).mode:c},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,
|
540 |
+
b){var d=[];if(!c.hasOwnProperty(b))return d;var e=c[b],h=this.getModeAt(a);if("string"==typeof h[b])e[h[b]]&&d.push(e[h[b]]);else if(h[b])for(var k=0;k<h[b].length;k++){var l=e[h[b][k]];l&&d.push(l)}else h.helperType&&e[h.helperType]?d.push(e[h.helperType]):e[h.name]&&d.push(e[h.name]);for(k=0;k<e._global.length;k++)l=e._global[k],l.pred(h,this)&&-1==P(d,l.val)&&d.push(l.val);return d},getStateAfter:function(a,b){var c=this.doc;a=Math.max(c.first,Math.min(null==a?c.first+c.size-1:a,c.first+c.size-
|
541 |
+
1));return yb(this,a+1,b).state},cursorCoords:function(a,b){var c=this.doc.sel.primary();c=null==a?c.head:"object"==typeof a?v(this.doc,a):a?c.from():c.to();return ma(this,c,b||"page")},charCoords:function(a,b){return pd(this,v(this.doc,a),b||"page")},coordsChar:function(a,b){a=Ie(this,a,b||"page");return rd(this,a.left,a.top)},lineAtHeight:function(a,b){a=Ie(this,{top:a,left:0},b||"page").top;return Ka(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b,c){var d=!1;if("number"==typeof a){var e=
|
542 |
+
this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>e&&(a=e,d=!0);a=t(this.doc,a)}return tc(this,a,{top:0,left:0},b||"page",c||d).top+(d?this.doc.height-ra(a):0)},defaultTextHeight:function(){return Ra(this.display)},defaultCharWidth:function(){return Db(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,g,h){var d=this.display;a=ma(this,v(this.doc,a));var e=a.bottom,f=a.left;b.style.position="absolute";b.setAttribute("cm-ignore-events",
|
543 |
+
"true");this.display.input.setUneditable(b);d.sizer.appendChild(b);if("over"==g)e=a.top;else if("above"==g||"near"==g){var p=Math.max(d.wrapper.clientHeight,this.doc.height),n=Math.max(d.sizer.clientWidth,d.lineSpace.clientWidth);("above"==g||a.bottom+b.offsetHeight>p)&&a.top>b.offsetHeight?e=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=p&&(e=a.bottom);f+b.offsetWidth>n&&(f=n-b.offsetWidth)}b.style.top=e+"px";b.style.left=b.style.right="";"right"==h?(f=d.sizer.clientWidth-b.offsetWidth,b.style.right=
|
544 |
+
"0px"):("left"==h?f=0:"middle"==h&&(f=(d.sizer.clientWidth-b.offsetWidth)/2),b.style.left=f+"px");c&&(a=zd(this,{left:f,top:e,right:f+b.offsetWidth,bottom:e+b.offsetHeight}),null!=a.scrollTop&&Ib(this,a.scrollTop),null!=a.scrollLeft&&Va(this,a.scrollLeft))},triggerOnKeyDown:V(Of),triggerOnKeyPress:V(Qf),triggerOnKeyUp:Pf,triggerOnMouseDown:V(Rf),execCommand:function(a){if(Tb.hasOwnProperty(a))return Tb[a].call(null,this)},triggerElectric:V(function(a){Yf(this,a)}),findPosH:function(a,b,c,g){var d=
|
545 |
+
1;0>b&&(d=-1,b=-b);a=v(this.doc,a);for(var e=0;e<b&&(a=Vd(this.doc,a,d,c,g),!a.hitSide);++e);return a},moveH:V(function(a,b){var c=this;this.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?Vd(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},bc)}),deleteH:V(function(a,b){var c=this.doc;this.doc.sel.somethingSelected()?c.replaceSelection("",null,"+delete"):ob(this,function(d){var e=Vd(c,d.head,a,b,!1);return 0>a?{from:e,to:d.head}:{from:d.head,to:e}})}),
|
546 |
+
findPosV:function(a,b,c,g){var d=1;0>b&&(d=-1,b=-b);var e=v(this.doc,a);for(a=0;a<b&&(e=ma(this,e,"div"),null==g?g=e.left:e.left=g,e=cg(this,e,d,c),!e.hitSide);++a);return e},moveV:V(function(a,b){var c=this,d=this.doc,e=[],k=!this.display.shift&&!d.extend&&d.sel.somethingSelected();d.extendSelectionsBy(function(f){if(k)return 0>a?f.from():f.to();var g=ma(c,f.head,"div");null!=f.goalColumn&&(g.left=f.goalColumn);e.push(g.left);var h=cg(c,g,a,b);"page"==b&&f==d.sel.primary()&&wc(c,pd(c,h,"div").top-
|
547 |
+
g.top);return h},bc);if(e.length)for(var l=0;l<d.sel.ranges.length;l++)d.sel.ranges[l].goalColumn=e[l]}),findWordAt:function(a){var b=t(this.doc,a.line).text,c=a.ch,d=a.ch;if(b){var h=this.getHelper(a,"wordChars");"before"!=a.sticky&&d!=b.length||!c?++d:--c;var k=b.charAt(c);for(k=ic(k,h)?function(a){return ic(a,h)}:/\s/.test(k)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!ic(a)};0<c&&k(b.charAt(c-1));)--c;for(;d<b.length&&k(b.charAt(d));)++d}return new A(p(a.line,c),p(a.line,
|
548 |
+
d))},toggleOverwrite:function(a){if(null==a||a!=this.state.overwrite)(this.state.overwrite=!this.state.overwrite)?Ha(this.display.cursorDiv,"CodeMirror-overwrite"):Ua(this.display.cursorDiv,"CodeMirror-overwrite"),J(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==va()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:V(function(a,b){Hb(this,a,b)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,
|
549 |
+
top:a.scrollTop,height:a.scrollHeight-ta(this)-this.display.barHeight,width:a.scrollWidth-ta(this)-this.display.barWidth,clientHeight:kd(this),clientWidth:Oa(this)}},scrollIntoView:V(function(a,b){null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:p(a,0),to:null}:null==a.from&&(a={from:a,to:null});a.to||(a.to=a.from);a.margin=b||0;if(null!=a.from.line){var c=a;xc(this);this.curOp.scrollToPos=c}else Ue(this,a.from,a.to,a.margin)}),
|
550 |
+
setSize:V(function(a,b){var c=this,d=function(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a};null!=a&&(this.display.wrapper.style.width=d(a));null!=b&&(this.display.wrapper.style.height=d(b));this.options.lineWrapping&&Fe(this);var e=this.display.viewFrom;this.doc.iter(e,this.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){Da(c,e,"widget");break}++e});this.curOp.forceUpdate=!0;J(this,"refresh",this)}),operation:function(a){return ca(this,
|
551 |
+
a)},startOperation:function(){return Wa(this)},endOperation:function(){return Xa(this)},refresh:V(function(){var a=this.display.cachedTextHeight;Z(this);this.curOp.forceUpdate=!0;Eb(this);Hb(this,this.doc.scrollLeft,this.doc.scrollTop);yd(this);(null==a||.5<Math.abs(a-Ra(this.display)))&&ud(this);J(this,"refresh",this)}),swapDoc:V(function(a){var b=this.doc;b.cm=null;gf(this,a);Eb(this);this.display.input.reset();Hb(this,a.scrollLeft,a.scrollTop);this.curOp.forceScroll=!0;R(this,"swapDoc",this,b);
|
552 |
+
return b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};bb(a);a.registerHelper=function(b,e,f){c.hasOwnProperty(b)||(c[b]=a[b]={_global:[]});c[b][e]=f};a.registerGlobalHelper=function(b,e,f,g){a.registerHelper(b,e,g);c[b]._global.push({pred:f,val:g})}})(F);var th="iter insert remove copy getEditor constructor".split(" "),
|
553 |
+
fc;for(fc in aa.prototype)aa.prototype.hasOwnProperty(fc)&&0>P(th,fc)&&(F.prototype[fc]=function(a){return function(){return a.apply(this.doc,arguments)}}(aa.prototype[fc]));bb(aa);F.inputStyles={textarea:L,contenteditable:y};F.defineMode=function(a){F.defaults.mode||"null"==a||(F.defaults.mode=a);pg.apply(this,arguments)};F.defineMIME=function(a,b){cb[a]=b};F.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}});F.defineMIME("text/plain","null");F.defineExtension=function(a,
|
554 |
+
b){F.prototype[a]=b};F.defineDocExtension=function(a,b){aa.prototype[a]=b};F.fromTextArea=function(a,b){function c(){a.value=h.getValue()}b=b?Ia(b):{};b.value=a.value;!b.tabindex&&a.tabIndex&&(b.tabindex=a.tabIndex);!b.placeholder&&a.placeholder&&(b.placeholder=a.placeholder);if(null==b.autofocus){var d=va();b.autofocus=d==a||null!=a.getAttribute("autofocus")&&d==document.body}if(a.form&&(w(a.form,"submit",c),!b.leaveSubmitMethodAlone)){var e=a.form;var f=e.submit;try{var g=e.submit=function(){c();
|
555 |
+
e.submit=f;e.submit();e.submit=g}}catch(k){}}b.finishInit=function(b){b.save=c;b.getTextArea=function(){return a};b.toTextArea=function(){b.toTextArea=isNaN;c();a.parentNode.removeChild(b.getWrapperElement());a.style.display="";a.form&&(ea(a.form,"submit",c),"function"==typeof a.form.submit&&(a.form.submit=f))}};a.style.display="none";var h=F(function(b){return a.parentNode.insertBefore(b,a.nextSibling)},b);return h};(function(a){a.off=ea;a.on=w;a.wheelEventPixels=Jg;a.Doc=aa;a.splitLines=Ud;a.countColumn=
|
556 |
+
ia;a.findColumn=Pc;a.isWordChar=Rc;a.Pass=Ic;a.signal=J;a.Line=hb;a.changeEnd=Ea;a.scrollbarModel=Ye;a.Pos=p;a.cmpPos=x;a.modes=cd;a.mimeModes=cb;a.resolveMode=oc;a.getMode=dd;a.modeExtensions=db;a.extendMode=qg;a.copyState=Na;a.startState=je;a.innerMode=ed;a.commands=Tb;a.keyMap=Sb;a.keyName=Jf;a.isModifierKey=Gf;a.lookupKey=nb;a.normalizeKeyMap=Vg;a.StringStream=K;a.SharedTextMarker=Rb;a.TextMarker=Fa;a.LineWidget=Qb;a.e_preventDefault=Y;a.e_stopPropagation=he;a.e_stop=xb;a.addClass=Ha;a.contains=
|
557 |
+
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")});
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: vasyltech
|
|
3 |
Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.9.4
|
6 |
-
Stable tag: 5.
|
7 |
|
8 |
The most powerful access management plugin for WordPress websites.
|
9 |
|
@@ -29,6 +29,7 @@ https://www.youtube.com/watch?v=yiOhjaacNJc
|
|
29 |
* [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);
|
30 |
* [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;
|
31 |
* [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;
|
|
|
32 |
* [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;
|
33 |
* [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;
|
34 |
* [free] Login/Logout Redirects. Define custom login and logout redirect for any user or role;
|
@@ -61,6 +62,13 @@ https://www.youtube.com/watch?v=yiOhjaacNJc
|
|
61 |
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
= 5.1.1 =
|
65 |
* Fixed the issue with Multisite Network notification
|
66 |
* Fixed the minor bug with login message for "Redirect to login form"
|
3 |
Tags: access, role, user, capability, page access, post access, comments, security, login redirect, brute force attack, double authentication, membership, backend lockdown, wp-admin, 404, activity tracking
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.9.4
|
6 |
+
Stable tag: 5.2
|
7 |
|
8 |
The most powerful access management plugin for WordPress websites.
|
9 |
|
29 |
* [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);
|
30 |
* [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;
|
31 |
* [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;
|
32 |
+
* [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)
|
33 |
* [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;
|
34 |
* [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;
|
35 |
* [free] Login/Logout Redirects. Define custom login and logout redirect for any user or role;
|
62 |
|
63 |
== Changelog ==
|
64 |
|
65 |
+
= 5.2 =
|
66 |
+
* Fixed the bug with user lock functionality
|
67 |
+
* Dropped support for PHP 5.2.x version. Minimum required version is 5.3.0
|
68 |
+
* Merged ConfigPress extension to the core
|
69 |
+
* Added JWT Authentication
|
70 |
+
* Added Register link to the Secure Login Widget
|
71 |
+
|
72 |
= 5.1.1 =
|
73 |
* Fixed the issue with Multisite Network notification
|
74 |
* Fixed the minor bug with login message for "Redirect to login form"
|
vendor/autoload.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
if (!class_exists('Firebase\JWT')) {
|
11 |
+
require __DIR__ . '/firebase/BeforeValidException.php';
|
12 |
+
require __DIR__ . '/firebase/ExpiredException.php';
|
13 |
+
require __DIR__ . '/firebase/SignatureInvalidException.php';
|
14 |
+
require __DIR__ . '/firebase/JWT.php';
|
15 |
+
}
|
vendor/firebase/BeforeValidException.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Firebase\JWT;
|
3 |
+
|
4 |
+
class BeforeValidException extends \UnexpectedValueException
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/firebase/ExpiredException.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Firebase\JWT;
|
3 |
+
|
4 |
+
class ExpiredException extends \UnexpectedValueException
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/firebase/JWT.php
ADDED
@@ -0,0 +1,379 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Firebase\JWT;
|
4 |
+
use \DomainException;
|
5 |
+
use \InvalidArgumentException;
|
6 |
+
use \UnexpectedValueException;
|
7 |
+
use \DateTime;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* JSON Web Token implementation, based on this spec:
|
11 |
+
* https://tools.ietf.org/html/rfc7519
|
12 |
+
*
|
13 |
+
* PHP version 5
|
14 |
+
*
|
15 |
+
* @category Authentication
|
16 |
+
* @package Authentication_JWT
|
17 |
+
* @author Neuman Vong <neuman@twilio.com>
|
18 |
+
* @author Anant Narayanan <anant@php.net>
|
19 |
+
* @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
|
20 |
+
* @link https://github.com/firebase/php-jwt
|
21 |
+
*/
|
22 |
+
class JWT
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* When checking nbf, iat or expiration times,
|
27 |
+
* we want to provide some extra leeway time to
|
28 |
+
* account for clock skew.
|
29 |
+
*/
|
30 |
+
public static $leeway = 0;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Allow the current timestamp to be specified.
|
34 |
+
* Useful for fixing a value within unit testing.
|
35 |
+
*
|
36 |
+
* Will default to PHP time() value if null.
|
37 |
+
*/
|
38 |
+
public static $timestamp = null;
|
39 |
+
|
40 |
+
public static $supported_algs = array(
|
41 |
+
'HS256' => array('hash_hmac', 'SHA256'),
|
42 |
+
'HS512' => array('hash_hmac', 'SHA512'),
|
43 |
+
'HS384' => array('hash_hmac', 'SHA384'),
|
44 |
+
'RS256' => array('openssl', 'SHA256'),
|
45 |
+
'RS384' => array('openssl', 'SHA384'),
|
46 |
+
'RS512' => array('openssl', 'SHA512'),
|
47 |
+
);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Decodes a JWT string into a PHP object.
|
51 |
+
*
|
52 |
+
* @param string $jwt The JWT
|
53 |
+
* @param string|array $key The key, or map of keys.
|
54 |
+
* If the algorithm used is asymmetric, this is the public key
|
55 |
+
* @param array $allowed_algs List of supported verification algorithms
|
56 |
+
* Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
|
57 |
+
*
|
58 |
+
* @return object The JWT's payload as a PHP object
|
59 |
+
*
|
60 |
+
* @throws UnexpectedValueException Provided JWT was invalid
|
61 |
+
* @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
|
62 |
+
* @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
|
63 |
+
* @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat'
|
64 |
+
* @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim
|
65 |
+
*
|
66 |
+
* @uses jsonDecode
|
67 |
+
* @uses urlsafeB64Decode
|
68 |
+
*/
|
69 |
+
public static function decode($jwt, $key, array $allowed_algs = array())
|
70 |
+
{
|
71 |
+
$timestamp = is_null(static::$timestamp) ? time() : static::$timestamp;
|
72 |
+
|
73 |
+
if (empty($key)) {
|
74 |
+
throw new InvalidArgumentException('Key may not be empty');
|
75 |
+
}
|
76 |
+
$tks = explode('.', $jwt);
|
77 |
+
if (count($tks) != 3) {
|
78 |
+
throw new UnexpectedValueException('Wrong number of segments');
|
79 |
+
}
|
80 |
+
list($headb64, $bodyb64, $cryptob64) = $tks;
|
81 |
+
if (null === ($header = static::jsonDecode(static::urlsafeB64Decode($headb64)))) {
|
82 |
+
throw new UnexpectedValueException('Invalid header encoding');
|
83 |
+
}
|
84 |
+
if (null === $payload = static::jsonDecode(static::urlsafeB64Decode($bodyb64))) {
|
85 |
+
throw new UnexpectedValueException('Invalid claims encoding');
|
86 |
+
}
|
87 |
+
if (false === ($sig = static::urlsafeB64Decode($cryptob64))) {
|
88 |
+
throw new UnexpectedValueException('Invalid signature encoding');
|
89 |
+
}
|
90 |
+
if (empty($header->alg)) {
|
91 |
+
throw new UnexpectedValueException('Empty algorithm');
|
92 |
+
}
|
93 |
+
if (empty(static::$supported_algs[$header->alg])) {
|
94 |
+
throw new UnexpectedValueException('Algorithm not supported');
|
95 |
+
}
|
96 |
+
if (!in_array($header->alg, $allowed_algs)) {
|
97 |
+
throw new UnexpectedValueException('Algorithm not allowed');
|
98 |
+
}
|
99 |
+
if (is_array($key) || $key instanceof \ArrayAccess) {
|
100 |
+
if (isset($header->kid)) {
|
101 |
+
if (!isset($key[$header->kid])) {
|
102 |
+
throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key');
|
103 |
+
}
|
104 |
+
$key = $key[$header->kid];
|
105 |
+
} else {
|
106 |
+
throw new UnexpectedValueException('"kid" empty, unable to lookup correct key');
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
// Check the signature
|
111 |
+
if (!static::verify("$headb64.$bodyb64", $sig, $key, $header->alg)) {
|
112 |
+
throw new SignatureInvalidException('Signature verification failed');
|
113 |
+
}
|
114 |
+
|
115 |
+
// Check if the nbf if it is defined. This is the time that the
|
116 |
+
// token can actually be used. If it's not yet that time, abort.
|
117 |
+
if (isset($payload->nbf) && $payload->nbf > ($timestamp + static::$leeway)) {
|
118 |
+
throw new BeforeValidException(
|
119 |
+
'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->nbf)
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
// Check that this token has been created before 'now'. This prevents
|
124 |
+
// using tokens that have been created for later use (and haven't
|
125 |
+
// correctly used the nbf claim).
|
126 |
+
if (isset($payload->iat) && $payload->iat > ($timestamp + static::$leeway)) {
|
127 |
+
throw new BeforeValidException(
|
128 |
+
'Cannot handle token prior to ' . date(DateTime::ISO8601, $payload->iat)
|
129 |
+
);
|
130 |
+
}
|
131 |
+
|
132 |
+
// Check if this token has expired.
|
133 |
+
if (isset($payload->exp) && ($timestamp - static::$leeway) >= $payload->exp) {
|
134 |
+
throw new ExpiredException('Expired token');
|
135 |
+
}
|
136 |
+
|
137 |
+
return $payload;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Converts and signs a PHP object or array into a JWT string.
|
142 |
+
*
|
143 |
+
* @param object|array $payload PHP object or array
|
144 |
+
* @param string $key The secret key.
|
145 |
+
* If the algorithm used is asymmetric, this is the private key
|
146 |
+
* @param string $alg The signing algorithm.
|
147 |
+
* Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
|
148 |
+
* @param mixed $keyId
|
149 |
+
* @param array $head An array with header elements to attach
|
150 |
+
*
|
151 |
+
* @return string A signed JWT
|
152 |
+
*
|
153 |
+
* @uses jsonEncode
|
154 |
+
* @uses urlsafeB64Encode
|
155 |
+
*/
|
156 |
+
public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $head = null)
|
157 |
+
{
|
158 |
+
$header = array('typ' => 'JWT', 'alg' => $alg);
|
159 |
+
if ($keyId !== null) {
|
160 |
+
$header['kid'] = $keyId;
|
161 |
+
}
|
162 |
+
if ( isset($head) && is_array($head) ) {
|
163 |
+
$header = array_merge($head, $header);
|
164 |
+
}
|
165 |
+
$segments = array();
|
166 |
+
$segments[] = static::urlsafeB64Encode(static::jsonEncode($header));
|
167 |
+
$segments[] = static::urlsafeB64Encode(static::jsonEncode($payload));
|
168 |
+
$signing_input = implode('.', $segments);
|
169 |
+
|
170 |
+
$signature = static::sign($signing_input, $key, $alg);
|
171 |
+
$segments[] = static::urlsafeB64Encode($signature);
|
172 |
+
|
173 |
+
return implode('.', $segments);
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Sign a string with a given key and algorithm.
|
178 |
+
*
|
179 |
+
* @param string $msg The message to sign
|
180 |
+
* @param string|resource $key The secret key
|
181 |
+
* @param string $alg The signing algorithm.
|
182 |
+
* Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256'
|
183 |
+
*
|
184 |
+
* @return string An encrypted message
|
185 |
+
*
|
186 |
+
* @throws DomainException Unsupported algorithm was specified
|
187 |
+
*/
|
188 |
+
public static function sign($msg, $key, $alg = 'HS256')
|
189 |
+
{
|
190 |
+
if (empty(static::$supported_algs[$alg])) {
|
191 |
+
throw new DomainException('Algorithm not supported');
|
192 |
+
}
|
193 |
+
list($function, $algorithm) = static::$supported_algs[$alg];
|
194 |
+
switch($function) {
|
195 |
+
case 'hash_hmac':
|
196 |
+
return hash_hmac($algorithm, $msg, $key, true);
|
197 |
+
case 'openssl':
|
198 |
+
$signature = '';
|
199 |
+
$success = openssl_sign($msg, $signature, $key, $algorithm);
|
200 |
+
if (!$success) {
|
201 |
+
throw new DomainException("OpenSSL unable to sign data");
|
202 |
+
} else {
|
203 |
+
return $signature;
|
204 |
+
}
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Verify a signature with the message, key and method. Not all methods
|
210 |
+
* are symmetric, so we must have a separate verify and sign method.
|
211 |
+
*
|
212 |
+
* @param string $msg The original message (header and body)
|
213 |
+
* @param string $signature The original signature
|
214 |
+
* @param string|resource $key For HS*, a string key works. for RS*, must be a resource of an openssl public key
|
215 |
+
* @param string $alg The algorithm
|
216 |
+
*
|
217 |
+
* @return bool
|
218 |
+
*
|
219 |
+
* @throws DomainException Invalid Algorithm or OpenSSL failure
|
220 |
+
*/
|
221 |
+
private static function verify($msg, $signature, $key, $alg)
|
222 |
+
{
|
223 |
+
if (empty(static::$supported_algs[$alg])) {
|
224 |
+
throw new DomainException('Algorithm not supported');
|
225 |
+
}
|
226 |
+
|
227 |
+
list($function, $algorithm) = static::$supported_algs[$alg];
|
228 |
+
switch($function) {
|
229 |
+
case 'openssl':
|
230 |
+
$success = openssl_verify($msg, $signature, $key, $algorithm);
|
231 |
+
if ($success === 1) {
|
232 |
+
return true;
|
233 |
+
} elseif ($success === 0) {
|
234 |
+
return false;
|
235 |
+
}
|
236 |
+
// returns 1 on success, 0 on failure, -1 on error.
|
237 |
+
throw new DomainException(
|
238 |
+
'OpenSSL error: ' . openssl_error_string()
|
239 |
+
);
|
240 |
+
case 'hash_hmac':
|
241 |
+
default:
|
242 |
+
$hash = hash_hmac($algorithm, $msg, $key, true);
|
243 |
+
if (function_exists('hash_equals')) {
|
244 |
+
return hash_equals($signature, $hash);
|
245 |
+
}
|
246 |
+
$len = min(static::safeStrlen($signature), static::safeStrlen($hash));
|
247 |
+
|
248 |
+
$status = 0;
|
249 |
+
for ($i = 0; $i < $len; $i++) {
|
250 |
+
$status |= (ord($signature[$i]) ^ ord($hash[$i]));
|
251 |
+
}
|
252 |
+
$status |= (static::safeStrlen($signature) ^ static::safeStrlen($hash));
|
253 |
+
|
254 |
+
return ($status === 0);
|
255 |
+
}
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Decode a JSON string into a PHP object.
|
260 |
+
*
|
261 |
+
* @param string $input JSON string
|
262 |
+
*
|
263 |
+
* @return object Object representation of JSON string
|
264 |
+
*
|
265 |
+
* @throws DomainException Provided string was invalid JSON
|
266 |
+
*/
|
267 |
+
public static function jsonDecode($input)
|
268 |
+
{
|
269 |
+
if (version_compare(PHP_VERSION, '5.4.0', '>=') && !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) {
|
270 |
+
/** In PHP >=5.4.0, json_decode() accepts an options parameter, that allows you
|
271 |
+
* to specify that large ints (like Steam Transaction IDs) should be treated as
|
272 |
+
* strings, rather than the PHP default behaviour of converting them to floats.
|
273 |
+
*/
|
274 |
+
$obj = json_decode($input, false, 512, JSON_BIGINT_AS_STRING);
|
275 |
+
} else {
|
276 |
+
/** Not all servers will support that, however, so for older versions we must
|
277 |
+
* manually detect large ints in the JSON string and quote them (thus converting
|
278 |
+
*them to strings) before decoding, hence the preg_replace() call.
|
279 |
+
*/
|
280 |
+
$max_int_length = strlen((string) PHP_INT_MAX) - 1;
|
281 |
+
$json_without_bigints = preg_replace('/:\s*(-?\d{'.$max_int_length.',})/', ': "$1"', $input);
|
282 |
+
$obj = json_decode($json_without_bigints);
|
283 |
+
}
|
284 |
+
|
285 |
+
if (function_exists('json_last_error') && $errno = json_last_error()) {
|
286 |
+
static::handleJsonError($errno);
|
287 |
+
} elseif ($obj === null && $input !== 'null') {
|
288 |
+
throw new DomainException('Null result with non-null input');
|
289 |
+
}
|
290 |
+
return $obj;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Encode a PHP object into a JSON string.
|
295 |
+
*
|
296 |
+
* @param object|array $input A PHP object or array
|
297 |
+
*
|
298 |
+
* @return string JSON representation of the PHP object or array
|
299 |
+
*
|
300 |
+
* @throws DomainException Provided object could not be encoded to valid JSON
|
301 |
+
*/
|
302 |
+
public static function jsonEncode($input)
|
303 |
+
{
|
304 |
+
$json = json_encode($input);
|
305 |
+
if (function_exists('json_last_error') && $errno = json_last_error()) {
|
306 |
+
static::handleJsonError($errno);
|
307 |
+
} elseif ($json === 'null' && $input !== null) {
|
308 |
+
throw new DomainException('Null result with non-null input');
|
309 |
+
}
|
310 |
+
return $json;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Decode a string with URL-safe Base64.
|
315 |
+
*
|
316 |
+
* @param string $input A Base64 encoded string
|
317 |
+
*
|
318 |
+
* @return string A decoded string
|
319 |
+
*/
|
320 |
+
public static function urlsafeB64Decode($input)
|
321 |
+
{
|
322 |
+
$remainder = strlen($input) % 4;
|
323 |
+
if ($remainder) {
|
324 |
+
$padlen = 4 - $remainder;
|
325 |
+
$input .= str_repeat('=', $padlen);
|
326 |
+
}
|
327 |
+
return base64_decode(strtr($input, '-_', '+/'));
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Encode a string with URL-safe Base64.
|
332 |
+
*
|
333 |
+
* @param string $input The string you want encoded
|
334 |
+
*
|
335 |
+
* @return string The base64 encode of what you passed in
|
336 |
+
*/
|
337 |
+
public static function urlsafeB64Encode($input)
|
338 |
+
{
|
339 |
+
return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Helper method to create a JSON error.
|
344 |
+
*
|
345 |
+
* @param int $errno An error number from json_last_error()
|
346 |
+
*
|
347 |
+
* @return void
|
348 |
+
*/
|
349 |
+
private static function handleJsonError($errno)
|
350 |
+
{
|
351 |
+
$messages = array(
|
352 |
+
JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
|
353 |
+
JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON',
|
354 |
+
JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
|
355 |
+
JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON',
|
356 |
+
JSON_ERROR_UTF8 => 'Malformed UTF-8 characters' //PHP >= 5.3.3
|
357 |
+
);
|
358 |
+
throw new DomainException(
|
359 |
+
isset($messages[$errno])
|
360 |
+
? $messages[$errno]
|
361 |
+
: 'Unknown JSON error: ' . $errno
|
362 |
+
);
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Get the number of bytes in cryptographic strings.
|
367 |
+
*
|
368 |
+
* @param string
|
369 |
+
*
|
370 |
+
* @return int
|
371 |
+
*/
|
372 |
+
private static function safeStrlen($str)
|
373 |
+
{
|
374 |
+
if (function_exists('mb_strlen')) {
|
375 |
+
return mb_strlen($str, '8bit');
|
376 |
+
}
|
377 |
+
return strlen($str);
|
378 |
+
}
|
379 |
+
}
|
vendor/firebase/SignatureInvalidException.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Firebase\JWT;
|
3 |
+
|
4 |
+
class SignatureInvalidException extends \UnexpectedValueException
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|