Version Description
08/September/2022 =
FIX: The Login URL was prefixed with the site URL instead of the home URL when the home URL is different than the site URL.
FIX: Rename login and cookie-based brute force protection couldn't work simultaneously when the permalink was set to plain.
FIX: Disabling the 5G Firewall Protection didn't remove the 5G rules from the .htaccess file.
TWEAK: Add a 'Dismiss' button to the firewall setup notice.
Download this release
Release Info
Developer | DavidAnderson |
Plugin | All In One WP Security & Firewall |
Version | 5.0.7 |
Comparing to | |
See all releases |
Code changes from version 5.0.6 to 5.0.7
- admin/wp-security-brute-force-menu.php +4 -4
- admin/wp-security-dashboard-menu.php +3 -3
- admin/wp-security-firewall-menu.php +7 -1
- admin/wp-security-firewall-setup-notice.php +49 -3
- classes/wp-security-general-init-tasks.php +2 -1
- classes/wp-security-process-renamed-login-page.php +9 -10
- classes/wp-security-user-login.php +3 -3
- classes/wp-security-utility-firewall.php +14 -0
- includes/simba-tfa/includes/select2.css +10 -11
- includes/simba-tfa/includes/select2.js +824 -296
- includes/simba-tfa/includes/select2.min.js +2 -2
- includes/simba-tfa/includes/tfa.js +37 -25
- includes/simba-tfa/simba-tfa.php +3 -2
- languages/all-in-one-wp-security-and-firewall.pot +172 -172
- other-includes/wp-security-rename-login-feature-pre-5-2.php +2 -4
- other-includes/wp-security-rename-login-feature-pre-5-7.php +1 -3
- other-includes/wp-security-rename-login-feature.php +2 -4
- readme.txt +9 -2
- vendor/composer/installed.php +2 -2
- wp-security-core.php +4 -4
- wp-security.php +1 -1
admin/wp-security-brute-force-menu.php
CHANGED
@@ -87,9 +87,9 @@ class AIOWPSecurity_Brute_Force_Menu extends AIOWPSecurity_Admin_Menu
|
|
87 |
$aiowps_login_page_slug = '';
|
88 |
|
89 |
if (get_option('permalink_structure')){
|
90 |
-
|
91 |
}else{
|
92 |
-
|
93 |
}
|
94 |
|
95 |
if(isset($_POST['aiowps_save_rename_login_page_settings']))//Do form submission tasks
|
@@ -172,7 +172,7 @@ class AIOWPSecurity_Brute_Force_Menu extends AIOWPSecurity_Admin_Menu
|
|
172 |
<div class="aio_yellow_box">
|
173 |
<p><?php _e('Your WordPress login page URL has been renamed.', 'all-in-one-wp-security-and-firewall'); ?></p>
|
174 |
<p><?php _e('Your current login URL is:', 'all-in-one-wp-security-and-firewall'); ?></p>
|
175 |
-
<p><strong><?php echo $
|
176 |
</div>
|
177 |
|
178 |
<?php
|
@@ -206,7 +206,7 @@ class AIOWPSecurity_Brute_Force_Menu extends AIOWPSecurity_Admin_Menu
|
|
206 |
</tr>
|
207 |
<tr valign="top">
|
208 |
<th scope="row"><label for="aiowps_login_page_slug"><?php _e('Login Page URL', 'all-in-one-wp-security-and-firewall')?>:</label></th>
|
209 |
-
<td><code><?php echo $
|
210 |
<span class="description"><?php _e('Enter a string which will represent your secure login page slug. You are encouraged to choose something which is hard to guess and only you will remember.', 'all-in-one-wp-security-and-firewall'); ?></span>
|
211 |
</td>
|
212 |
</tr>
|
87 |
$aiowps_login_page_slug = '';
|
88 |
|
89 |
if (get_option('permalink_structure')){
|
90 |
+
$home_url = trailingslashit(home_url());
|
91 |
}else{
|
92 |
+
$home_url = trailingslashit(home_url()) . '?';
|
93 |
}
|
94 |
|
95 |
if(isset($_POST['aiowps_save_rename_login_page_settings']))//Do form submission tasks
|
172 |
<div class="aio_yellow_box">
|
173 |
<p><?php _e('Your WordPress login page URL has been renamed.', 'all-in-one-wp-security-and-firewall'); ?></p>
|
174 |
<p><?php _e('Your current login URL is:', 'all-in-one-wp-security-and-firewall'); ?></p>
|
175 |
+
<p><strong><?php echo $home_url.$aio_wp_security->configs->get_value('aiowps_login_page_slug'); ?></strong></p>
|
176 |
</div>
|
177 |
|
178 |
<?php
|
206 |
</tr>
|
207 |
<tr valign="top">
|
208 |
<th scope="row"><label for="aiowps_login_page_slug"><?php _e('Login Page URL', 'all-in-one-wp-security-and-firewall')?>:</label></th>
|
209 |
+
<td><code><?php echo $home_url; ?></code><input id="aiowps_login_page_slug" type="text" size="15" name="aiowps_login_page_slug" value="<?php echo $aio_wp_security->configs->get_value('aiowps_login_page_slug'); ?>" />
|
210 |
<span class="description"><?php _e('Enter a string which will represent your secure login page slug. You are encouraged to choose something which is hard to guess and only you will remember.', 'all-in-one-wp-security-and-firewall'); ?></span>
|
211 |
</td>
|
212 |
</tr>
|
admin/wp-security-dashboard-menu.php
CHANGED
@@ -609,9 +609,9 @@ class AIOWPSecurity_Dashboard_Menu extends AIOWPSecurity_Admin_Menu
|
|
609 |
//Insert Rename Login Page feature box if this feature is active
|
610 |
if ($aio_wp_security->configs->get_value('aiowps_enable_rename_login_page') == '1') {
|
611 |
if (get_option('permalink_structure')) {
|
612 |
-
|
613 |
} else {
|
614 |
-
$
|
615 |
}
|
616 |
|
617 |
$rename_login_feature_link = '<a href="admin.php?page=' . AIOWPSEC_BRUTE_FORCE_MENU_SLUG . '&tab=tab1" target="_blank">' . __('Rename Login Page', 'all-in-one-wp-security-and-firewall') . '</a>';
|
@@ -619,7 +619,7 @@ class AIOWPSecurity_Dashboard_Menu extends AIOWPSecurity_Admin_Menu
|
|
619 |
|
620 |
echo '<p>' . sprintf(__('The %s feature is currently active.', 'all-in-one-wp-security-and-firewall'), $rename_login_feature_link) . '</p>';
|
621 |
echo '<p>' . __('Your new WordPress login URL is now:', 'all-in-one-wp-security-and-firewall') . '</p>';
|
622 |
-
echo '<p><strong>' . $
|
623 |
echo '</div>'; //yellow box div
|
624 |
echo '<div class="aio_clear_float"></div>';
|
625 |
}//End if statement for Rename Login box
|
609 |
//Insert Rename Login Page feature box if this feature is active
|
610 |
if ($aio_wp_security->configs->get_value('aiowps_enable_rename_login_page') == '1') {
|
611 |
if (get_option('permalink_structure')) {
|
612 |
+
$home_url = trailingslashit(home_url());
|
613 |
} else {
|
614 |
+
$home_url = trailingslashit(home_url()) . '?';
|
615 |
}
|
616 |
|
617 |
$rename_login_feature_link = '<a href="admin.php?page=' . AIOWPSEC_BRUTE_FORCE_MENU_SLUG . '&tab=tab1" target="_blank">' . __('Rename Login Page', 'all-in-one-wp-security-and-firewall') . '</a>';
|
619 |
|
620 |
echo '<p>' . sprintf(__('The %s feature is currently active.', 'all-in-one-wp-security-and-firewall'), $rename_login_feature_link) . '</p>';
|
621 |
echo '<p>' . __('Your new WordPress login URL is now:', 'all-in-one-wp-security-and-firewall') . '</p>';
|
622 |
+
echo '<p><strong>' . $home_url . $aio_wp_security->configs->get_value('aiowps_login_page_slug') . '</strong></p>';
|
623 |
echo '</div>'; //yellow box div
|
624 |
echo '<div class="aio_clear_float"></div>';
|
625 |
}//End if statement for Rename Login box
|
admin/wp-security-firewall-menu.php
CHANGED
@@ -570,14 +570,20 @@ class AIOWPSecurity_Firewall_Menu extends AIOWPSecurity_Admin_Menu
|
|
570 |
die("Nonce check failed on enable 5G/6G firewall settings!");
|
571 |
}
|
572 |
|
|
|
|
|
|
|
573 |
//Save settings
|
574 |
if (isset($_POST['aiowps_enable_5g_firewall'])) {
|
575 |
$aio_wp_security->configs->set_value('aiowps_enable_5g_firewall', '1');
|
576 |
-
$res = AIOWPSecurity_Utility_Htaccess::write_to_htaccess(); //Now let's write the applicable rules to the .htaccess file
|
577 |
} else {
|
578 |
$aio_wp_security->configs->set_value('aiowps_enable_5g_firewall', '');
|
579 |
}
|
580 |
|
|
|
|
|
|
|
|
|
581 |
if (isset($_POST['aiowps_enable_6g_firewall'])) {
|
582 |
$aiowps_firewall_config->set_value('aiowps_6g_block_request_methods', AIOS_Abstracted_Ids::get_firewall_block_request_methods());
|
583 |
$aiowps_firewall_config->set_value('aiowps_6g_block_query', true);
|
570 |
die("Nonce check failed on enable 5G/6G firewall settings!");
|
571 |
}
|
572 |
|
573 |
+
// If the user has changed the 5G firewall checkbox settings, then there is a need yo write htaccess rules again.
|
574 |
+
$is_5G_firewall_option_changed = ((isset($_POST['aiowps_enable_5g_firewall']) && '1' != $aio_wp_security->configs->get_value('aiowps_enable_5g_firewall')) || (!isset($_POST['aiowps_enable_5g_firewall']) && '1' == $aio_wp_security->configs->get_value('aiowps_enable_5g_firewall')));
|
575 |
+
|
576 |
//Save settings
|
577 |
if (isset($_POST['aiowps_enable_5g_firewall'])) {
|
578 |
$aio_wp_security->configs->set_value('aiowps_enable_5g_firewall', '1');
|
|
|
579 |
} else {
|
580 |
$aio_wp_security->configs->set_value('aiowps_enable_5g_firewall', '');
|
581 |
}
|
582 |
|
583 |
+
if ($is_5G_firewall_option_changed) {
|
584 |
+
$res = AIOWPSecurity_Utility_Htaccess::write_to_htaccess(); // let's write the applicable rules to the .htaccess file
|
585 |
+
}
|
586 |
+
|
587 |
if (isset($_POST['aiowps_enable_6g_firewall'])) {
|
588 |
$aiowps_firewall_config->set_value('aiowps_6g_block_request_methods', AIOS_Abstracted_Ids::get_firewall_block_request_methods());
|
589 |
$aiowps_firewall_config->set_value('aiowps_6g_block_query', true);
|
admin/wp-security-firewall-setup-notice.php
CHANGED
@@ -172,6 +172,29 @@ class AIOWPSecurity_Firewall_Setup_Notice {
|
|
172 |
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
/**
|
176 |
* Handles the form submission for the 'Set up now' notice
|
177 |
*
|
@@ -184,6 +207,18 @@ class AIOWPSecurity_Firewall_Setup_Notice {
|
|
184 |
}
|
185 |
}
|
186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
/**
|
188 |
* Wrapper function to log WP_Errors to debug log
|
189 |
*
|
@@ -528,6 +563,10 @@ class AIOWPSecurity_Firewall_Setup_Notice {
|
|
528 |
return true;
|
529 |
}
|
530 |
|
|
|
|
|
|
|
|
|
531 |
if ($this->any_pending_notices()) {
|
532 |
return true; //only display if there are no other notices waiting to be displayed
|
533 |
}
|
@@ -545,6 +584,7 @@ class AIOWPSecurity_Firewall_Setup_Notice {
|
|
545 |
if ($this->should_not_show_notice()) {
|
546 |
return;
|
547 |
}
|
|
|
548 |
?>
|
549 |
<div class="notice notice-information">
|
550 |
|
@@ -564,11 +604,17 @@ class AIOWPSecurity_Firewall_Setup_Notice {
|
|
564 |
<p>
|
565 |
<?php _e('To set up the PHP-based firewall, press the \'Set up now\' button below:', 'all-in-one-wp-security-and-firewall'); ?>
|
566 |
</p>
|
567 |
-
<div style=
|
568 |
<input class="button button-primary" type="submit" name="btn_setup_now" value="<?php _e('Set up now', 'all-in-one-wp-security-and-firewall'); ?>">
|
569 |
-
</div>
|
570 |
</form>
|
571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
</div>
|
573 |
|
574 |
<?php
|
172 |
|
173 |
}
|
174 |
|
175 |
+
/**
|
176 |
+
* Dismisses the notice
|
177 |
+
*
|
178 |
+
* @return void
|
179 |
+
*/
|
180 |
+
private function do_dismiss() {
|
181 |
+
global $aio_wp_security;
|
182 |
+
|
183 |
+
$aio_wp_security->configs->set_value('aios_firewall_dismiss', true);
|
184 |
+
$aio_wp_security->configs->save_config();
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Checks whether the notice is dismissed
|
189 |
+
*
|
190 |
+
* @return boolean
|
191 |
+
*/
|
192 |
+
private function is_dismissed() {
|
193 |
+
global $aio_wp_security;
|
194 |
+
return (true === $aio_wp_security->configs->get_value('aios_firewall_dismiss'));
|
195 |
+
|
196 |
+
}
|
197 |
+
|
198 |
/**
|
199 |
* Handles the form submission for the 'Set up now' notice
|
200 |
*
|
207 |
}
|
208 |
}
|
209 |
|
210 |
+
/**
|
211 |
+
* Handles the dismiss form
|
212 |
+
*
|
213 |
+
* @return void
|
214 |
+
*/
|
215 |
+
public function handle_dismiss_form() {
|
216 |
+
if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'aiowpsec-firewall-setup-dismiss')) {
|
217 |
+
$this->do_dismiss();
|
218 |
+
AIOWPSecurity_Utility::redirect_to_url(admin_url('admin.php?page=aiowpsec'));
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
/**
|
223 |
* Wrapper function to log WP_Errors to debug log
|
224 |
*
|
563 |
return true;
|
564 |
}
|
565 |
|
566 |
+
if ($this->is_dismissed() && !AIOWPSecurity_Utility_Firewall::is_firewall_page()) {
|
567 |
+
return true;
|
568 |
+
}
|
569 |
+
|
570 |
if ($this->any_pending_notices()) {
|
571 |
return true; //only display if there are no other notices waiting to be displayed
|
572 |
}
|
584 |
if ($this->should_not_show_notice()) {
|
585 |
return;
|
586 |
}
|
587 |
+
|
588 |
?>
|
589 |
<div class="notice notice-information">
|
590 |
|
604 |
<p>
|
605 |
<?php _e('To set up the PHP-based firewall, press the \'Set up now\' button below:', 'all-in-one-wp-security-and-firewall'); ?>
|
606 |
</p>
|
607 |
+
<div style='padding-bottom: 10px; padding-top:10px;'>
|
608 |
<input class="button button-primary" type="submit" name="btn_setup_now" value="<?php _e('Set up now', 'all-in-one-wp-security-and-firewall'); ?>">
|
|
|
609 |
</form>
|
610 |
+
<?php if (!AIOWPSecurity_Utility_Firewall::is_firewall_page()) { ?>
|
611 |
+
<form action="<?php echo esc_url(admin_url('admin-post.php')); ?>" method="POST" style='display:inline;'>
|
612 |
+
<?php wp_nonce_field('aiowpsec-firewall-setup-dismiss'); ?>
|
613 |
+
<input type="hidden" name="action" value="aiowps_firewall_setup_dismiss">
|
614 |
+
<input class="button button-secondary" type="submit" name="btn_dismiss_setup_now" value="<?php _e('Dismiss', 'all-in-one-wp-security-and-firewall'); ?>">
|
615 |
+
</form>
|
616 |
+
<?php } ?>
|
617 |
+
</div>
|
618 |
</div>
|
619 |
|
620 |
<?php
|
classes/wp-security-general-init-tasks.php
CHANGED
@@ -35,6 +35,7 @@ class AIOWPSecurity_General_Init_Tasks {
|
|
35 |
|
36 |
add_action('all_admin_notices', array($this, 'do_firewall_notice'));
|
37 |
add_action('admin_post_aiowps_firewall_setup', array(AIOWPSecurity_Firewall_Setup_Notice::get_instance(), 'handle_setup_form'));
|
|
|
38 |
|
39 |
$this->reapply_htaccess_rules();
|
40 |
add_action('admin_notices', array($this,'reapply_htaccess_rules_notice'));
|
@@ -61,7 +62,7 @@ class AIOWPSecurity_General_Init_Tasks {
|
|
61 |
// If URL contains secret word in query param then set cookie and then redirect to the login page
|
62 |
AIOWPSecurity_Utility::set_cookie_value($bfcf_secret_word, '1');
|
63 |
if ('1' == $aio_wp_security->configs->get_value('aiowps_enable_rename_login_page') && !is_user_logged_in()) {
|
64 |
-
$login_url =
|
65 |
AIOWPSecurity_Utility::redirect_to_url($login_url);
|
66 |
} else {
|
67 |
AIOWPSecurity_Utility::redirect_to_url(AIOWPSEC_WP_URL.'/wp-admin');
|
35 |
|
36 |
add_action('all_admin_notices', array($this, 'do_firewall_notice'));
|
37 |
add_action('admin_post_aiowps_firewall_setup', array(AIOWPSecurity_Firewall_Setup_Notice::get_instance(), 'handle_setup_form'));
|
38 |
+
add_action('admin_post_aiowps_firewall_setup_dismiss', array(AIOWPSecurity_Firewall_Setup_Notice::get_instance(), 'handle_dismiss_form'));
|
39 |
|
40 |
$this->reapply_htaccess_rules();
|
41 |
add_action('admin_notices', array($this,'reapply_htaccess_rules_notice'));
|
62 |
// If URL contains secret word in query param then set cookie and then redirect to the login page
|
63 |
AIOWPSecurity_Utility::set_cookie_value($bfcf_secret_word, '1');
|
64 |
if ('1' == $aio_wp_security->configs->get_value('aiowps_enable_rename_login_page') && !is_user_logged_in()) {
|
65 |
+
$login_url = home_url((get_option('permalink_structure') ? '' : '?') . $aio_wp_security->configs->get_value('aiowps_login_page_slug'));
|
66 |
AIOWPSecurity_Utility::redirect_to_url($login_url);
|
67 |
} else {
|
68 |
AIOWPSecurity_Utility::redirect_to_url(AIOWPSEC_WP_URL.'/wp-admin');
|
classes/wp-security-process-renamed-login-page.php
CHANGED
@@ -198,29 +198,28 @@ class AIOWPSecurity_Process_Renamed_Login_Page {
|
|
198 |
$parsed_url_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
199 |
|
200 |
$login_slug = $aio_wp_security->configs->get_value('aiowps_login_page_slug');
|
201 |
-
$
|
202 |
|
203 |
/*
|
204 |
* Compatibility fix for WPML plugin
|
205 |
*/
|
206 |
-
if (function_exists('wpml_object_id') && strpos($
|
207 |
-
$
|
208 |
-
function qtranxf_init_language() {}// phpcs:ignore Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore,PEAR.WhiteSpace.ScopeClosingBrace.Line,Squiz.PHP.InnerFunctions.NotAllowed
|
209 |
}
|
210 |
|
211 |
/*
|
212 |
* *** Compatibility fix for qTranslate-X plugin ***
|
213 |
* qTranslate-X plugin modifies the result for the following command by adding the protocol and host to the url path:
|
214 |
-
*
|
215 |
* Therefore we will remove the protocol and host for the following cases:
|
216 |
* qTranslate-X is active AND the URL being accessed contains the secret slug
|
217 |
*/
|
218 |
-
if (function_exists('qtranxf_init_language') && strpos($
|
219 |
-
$
|
220 |
-
$
|
221 |
}
|
222 |
|
223 |
-
if (untrailingslashit($parsed_url_path) === $
|
224 |
if (empty($action) && is_user_logged_in()) {
|
225 |
//if user is already logged in but tries to access the renamed login page, send them to the dashboard
|
226 |
// or to requested redirect-page, filterd in 'login_redirect'.
|
@@ -255,7 +254,7 @@ class AIOWPSecurity_Process_Renamed_Login_Page {
|
|
255 |
global $aio_wp_security;
|
256 |
$login_slug = $aio_wp_security->configs->get_value('aiowps_login_page_slug');
|
257 |
if (get_option('permalink_structure')) {
|
258 |
-
return trailingslashit(trailingslashit(
|
259 |
} else {
|
260 |
return trailingslashit(site_url()) . '?' . $login_slug;
|
261 |
}
|
198 |
$parsed_url_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
199 |
|
200 |
$login_slug = $aio_wp_security->configs->get_value('aiowps_login_page_slug');
|
201 |
+
$home_url_with_slug = home_url($login_slug, 'relative');
|
202 |
|
203 |
/*
|
204 |
* Compatibility fix for WPML plugin
|
205 |
*/
|
206 |
+
if (function_exists('wpml_object_id') && strpos($home_url_with_slug, $login_slug)) {
|
207 |
+
$home_url_with_slug = home_url($login_slug);// phpcs:ignore Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore,PEAR.WhiteSpace.ScopeClosingBrace.Line,Squiz.PHP.InnerFunctions.NotAllowed
|
|
|
208 |
}
|
209 |
|
210 |
/*
|
211 |
* *** Compatibility fix for qTranslate-X plugin ***
|
212 |
* qTranslate-X plugin modifies the result for the following command by adding the protocol and host to the url path:
|
213 |
+
* home_url($login_slug, 'relative');
|
214 |
* Therefore we will remove the protocol and host for the following cases:
|
215 |
* qTranslate-X is active AND the URL being accessed contains the secret slug
|
216 |
*/
|
217 |
+
if (function_exists('qtranxf_init_language') && strpos($home_url_with_slug, $login_slug)) {
|
218 |
+
$parsed_home_url_with_slug = parse_url($home_url_with_slug);
|
219 |
+
$home_url_with_slug = $parsed_home_url_with_slug['path']; //this will return just the path minus the protocol and host
|
220 |
}
|
221 |
|
222 |
+
if (untrailingslashit($parsed_url_path) === $home_url_with_slug || (!get_option('permalink_structure') && isset($_GET[$login_slug]))) {
|
223 |
if (empty($action) && is_user_logged_in()) {
|
224 |
//if user is already logged in but tries to access the renamed login page, send them to the dashboard
|
225 |
// or to requested redirect-page, filterd in 'login_redirect'.
|
254 |
global $aio_wp_security;
|
255 |
$login_slug = $aio_wp_security->configs->get_value('aiowps_login_page_slug');
|
256 |
if (get_option('permalink_structure')) {
|
257 |
+
return trailingslashit(trailingslashit(home_url()) . $login_slug);
|
258 |
} else {
|
259 |
return trailingslashit(site_url()) . '?' . $login_slug;
|
260 |
}
|
classes/wp-security-user-login.php
CHANGED
@@ -481,9 +481,9 @@ class AIOWPSecurity_User_Login {
|
|
481 |
}
|
482 |
if ($aio_wp_security->configs->get_value('aiowps_enable_rename_login_page')=='1') {
|
483 |
if (get_option('permalink_structure')) {
|
484 |
-
$
|
485 |
} else {
|
486 |
-
$
|
487 |
}
|
488 |
if ($woo_unlock) {
|
489 |
$login_url = wc_get_page_permalink('myaccount'); //redirect to woo login page if applicable
|
@@ -493,7 +493,7 @@ class AIOWPSecurity_User_Login {
|
|
493 |
$aio_wp_security->debug_logger->log_debug("process_unlock_request(): Error deleting row from AIOWPSEC_TBL_GLOBAL_META_DATA for meta_key1=woo_unlock_request_key and meta_value1=".$unlock_key, 4);
|
494 |
}
|
495 |
} else {
|
496 |
-
$login_url = $
|
497 |
}
|
498 |
|
499 |
AIOWPSecurity_Utility::redirect_to_url($login_url);
|
481 |
}
|
482 |
if ($aio_wp_security->configs->get_value('aiowps_enable_rename_login_page')=='1') {
|
483 |
if (get_option('permalink_structure')) {
|
484 |
+
$home_url = trailingslashit(home_url());
|
485 |
} else {
|
486 |
+
$home_url = trailingslashit(home_url()) . '?';
|
487 |
}
|
488 |
if ($woo_unlock) {
|
489 |
$login_url = wc_get_page_permalink('myaccount'); //redirect to woo login page if applicable
|
493 |
$aio_wp_security->debug_logger->log_debug("process_unlock_request(): Error deleting row from AIOWPSEC_TBL_GLOBAL_META_DATA for meta_key1=woo_unlock_request_key and meta_value1=".$unlock_key, 4);
|
494 |
}
|
495 |
} else {
|
496 |
+
$login_url = $home_url.$aio_wp_security->configs->get_value('aiowps_login_page_slug');
|
497 |
}
|
498 |
|
499 |
AIOWPSecurity_Utility::redirect_to_url($login_url);
|
classes/wp-security-utility-firewall.php
CHANGED
@@ -33,6 +33,16 @@ class AIOWPSecurity_Utility_Firewall {
|
|
33 |
return wp_normalize_path($firewall_rules_path);
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
/**
|
37 |
* Returns the current path to our bootstrap file
|
38 |
*
|
@@ -146,6 +156,7 @@ class AIOWPSecurity_Utility_Firewall {
|
|
146 |
* @return void
|
147 |
*/
|
148 |
public static function remove_firewall() {
|
|
|
149 |
|
150 |
$firewall_files = array(
|
151 |
'server' => AIOWPSecurity_Utility_Firewall::get_server_file(),
|
@@ -182,5 +193,8 @@ class AIOWPSecurity_Utility_Firewall {
|
|
182 |
@unlink($muplugin_path); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- ignore this
|
183 |
}
|
184 |
|
|
|
|
|
|
|
185 |
}
|
186 |
}
|
33 |
return wp_normalize_path($firewall_rules_path);
|
34 |
}
|
35 |
|
36 |
+
/**
|
37 |
+
* Determines whether we're on the firewall page
|
38 |
+
*
|
39 |
+
* @return boolean
|
40 |
+
*/
|
41 |
+
public static function is_firewall_page() {
|
42 |
+
global $pagenow;
|
43 |
+
return ('admin.php' == $pagenow && isset($_GET['page']) && false !== strpos($_GET['page'], AIOWPSEC_MENU_SLUG_PREFIX.'_firewall'));
|
44 |
+
}
|
45 |
+
|
46 |
/**
|
47 |
* Returns the current path to our bootstrap file
|
48 |
*
|
156 |
* @return void
|
157 |
*/
|
158 |
public static function remove_firewall() {
|
159 |
+
global $aio_wp_security;
|
160 |
|
161 |
$firewall_files = array(
|
162 |
'server' => AIOWPSecurity_Utility_Firewall::get_server_file(),
|
193 |
@unlink($muplugin_path); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- ignore this
|
194 |
}
|
195 |
|
196 |
+
$aio_wp_security->configs->set_value('aios_firewall_dismiss', false);
|
197 |
+
$aio_wp_security->configs->save_config();
|
198 |
+
|
199 |
}
|
200 |
}
|
includes/simba-tfa/includes/select2.css
CHANGED
@@ -118,12 +118,14 @@
|
|
118 |
.select2-hidden-accessible {
|
119 |
border: 0 !important;
|
120 |
clip: rect(0 0 0 0) !important;
|
|
|
|
|
121 |
height: 1px !important;
|
122 |
-
margin: -1px !important;
|
123 |
overflow: hidden !important;
|
124 |
padding: 0 !important;
|
125 |
position: absolute !important;
|
126 |
-
width: 1px !important;
|
|
|
127 |
|
128 |
.select2-container--default .select2-selection--single {
|
129 |
background-color: #fff;
|
@@ -184,16 +186,15 @@
|
|
184 |
margin: 0;
|
185 |
padding: 0 5px;
|
186 |
width: 100%; }
|
187 |
-
|
188 |
-
|
189 |
-
margin-top: 5px;
|
190 |
-
float: left; }
|
191 |
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
192 |
cursor: pointer;
|
193 |
float: right;
|
194 |
font-weight: bold;
|
195 |
margin-top: 5px;
|
196 |
-
margin-right: 10px;
|
|
|
197 |
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
198 |
background-color: #e4e4e4;
|
199 |
border: 1px solid #aaa;
|
@@ -212,7 +213,7 @@
|
|
212 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
213 |
color: #333; }
|
214 |
|
215 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-
|
216 |
float: right; }
|
217 |
|
218 |
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
@@ -418,9 +419,7 @@
|
|
418 |
color: #555; }
|
419 |
|
420 |
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
421 |
-
float: right;
|
422 |
-
|
423 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
424 |
margin-left: 5px;
|
425 |
margin-right: auto; }
|
426 |
|
118 |
.select2-hidden-accessible {
|
119 |
border: 0 !important;
|
120 |
clip: rect(0 0 0 0) !important;
|
121 |
+
-webkit-clip-path: inset(50%) !important;
|
122 |
+
clip-path: inset(50%) !important;
|
123 |
height: 1px !important;
|
|
|
124 |
overflow: hidden !important;
|
125 |
padding: 0 !important;
|
126 |
position: absolute !important;
|
127 |
+
width: 1px !important;
|
128 |
+
white-space: nowrap !important; }
|
129 |
|
130 |
.select2-container--default .select2-selection--single {
|
131 |
background-color: #fff;
|
186 |
margin: 0;
|
187 |
padding: 0 5px;
|
188 |
width: 100%; }
|
189 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
190 |
+
list-style: none; }
|
|
|
|
|
191 |
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
192 |
cursor: pointer;
|
193 |
float: right;
|
194 |
font-weight: bold;
|
195 |
margin-top: 5px;
|
196 |
+
margin-right: 10px;
|
197 |
+
padding: 1px; }
|
198 |
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
199 |
background-color: #e4e4e4;
|
200 |
border: 1px solid #aaa;
|
213 |
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
214 |
color: #333; }
|
215 |
|
216 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
217 |
float: right; }
|
218 |
|
219 |
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
419 |
color: #555; }
|
420 |
|
421 |
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
422 |
+
float: right;
|
|
|
|
|
423 |
margin-left: 5px;
|
424 |
margin-right: auto; }
|
425 |
|
includes/simba-tfa/includes/select2.js
CHANGED
@@ -1,27 +1,41 @@
|
|
1 |
/*!
|
2 |
-
* Select2 4.0.
|
3 |
* https://select2.github.io
|
4 |
*
|
5 |
* Released under the MIT license
|
6 |
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
*/
|
8 |
-
(function (factory) {
|
9 |
if (typeof define === 'function' && define.amd) {
|
10 |
// AMD. Register as an anonymous module.
|
11 |
define(['jquery'], factory);
|
12 |
-
} else if (typeof
|
13 |
// Node/CommonJS
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
} else {
|
16 |
// Browser globals
|
17 |
factory(jQuery);
|
18 |
}
|
19 |
-
}(function (jQuery) {
|
20 |
// This is needed so we can catch the AMD loader configuration and use it
|
21 |
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
22 |
// returns the AMD loader references.
|
23 |
-
var S2 =
|
24 |
-
(function () {
|
25 |
// Restore the Select2 AMD loader so it can be used
|
26 |
// Needed mostly in the language files, where the loader is not inserted
|
27 |
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
@@ -30,13 +44,11 @@
|
|
30 |
var S2;(function () { if (!S2 || !S2.requirejs) {
|
31 |
if (!S2) { S2 = {}; } else { require = S2; }
|
32 |
/**
|
33 |
-
* @license almond 0.3.
|
34 |
-
*
|
35 |
-
* see: http://github.com/jrburke/almond for details
|
36 |
*/
|
37 |
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
38 |
//be followed.
|
39 |
-
/*jslint sloppy: true */
|
40 |
/*global setTimeout: false */
|
41 |
|
42 |
var requirejs, require, define;
|
@@ -64,60 +76,58 @@ var requirejs, require, define;
|
|
64 |
*/
|
65 |
function normalize(name, baseName) {
|
66 |
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
67 |
-
foundI, foundStarMap, starI, i, j, part,
|
68 |
baseParts = baseName && baseName.split("/"),
|
69 |
map = config.map,
|
70 |
starMap = (map && map['*']) || {};
|
71 |
|
72 |
//Adjust any relative paths.
|
73 |
-
if (name
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
}
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
//baseName
|
89 |
-
//
|
90 |
-
|
91 |
-
|
92 |
-
//
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
111 |
}
|
112 |
}
|
113 |
-
//end trimDots
|
114 |
-
|
115 |
-
name = name.join("/");
|
116 |
-
} else if (name.indexOf('./') === 0) {
|
117 |
-
// No baseName, so this is ID is resolved relative
|
118 |
-
// to baseUrl, pull off the leading dot.
|
119 |
-
name = name.substring(2);
|
120 |
}
|
|
|
|
|
|
|
121 |
}
|
122 |
|
123 |
//Apply map config if available.
|
@@ -230,32 +240,39 @@ var requirejs, require, define;
|
|
230 |
return [prefix, name];
|
231 |
}
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
/**
|
234 |
* Makes a name map, normalizing the name, and using a plugin
|
235 |
* for normalization if necessary. Grabs a ref to plugin
|
236 |
* too, as an optimization.
|
237 |
*/
|
238 |
-
makeMap = function (name,
|
239 |
var plugin,
|
240 |
parts = splitPrefix(name),
|
241 |
-
prefix = parts[0]
|
|
|
242 |
|
243 |
name = parts[1];
|
244 |
|
245 |
if (prefix) {
|
246 |
-
prefix = normalize(prefix,
|
247 |
plugin = callDep(prefix);
|
248 |
}
|
249 |
|
250 |
//Normalize according
|
251 |
if (prefix) {
|
252 |
if (plugin && plugin.normalize) {
|
253 |
-
name = plugin.normalize(name, makeNormalize(
|
254 |
} else {
|
255 |
-
name = normalize(name,
|
256 |
}
|
257 |
} else {
|
258 |
-
name = normalize(name,
|
259 |
parts = splitPrefix(name);
|
260 |
prefix = parts[0];
|
261 |
name = parts[1];
|
@@ -302,13 +319,14 @@ var requirejs, require, define;
|
|
302 |
};
|
303 |
|
304 |
main = function (name, deps, callback, relName) {
|
305 |
-
var cjsModule, depName, ret, map, i,
|
306 |
args = [],
|
307 |
callbackType = typeof callback,
|
308 |
usingExports;
|
309 |
|
310 |
//Use name if no relName
|
311 |
relName = relName || name;
|
|
|
312 |
|
313 |
//Call the callback to define the module, if necessary.
|
314 |
if (callbackType === 'undefined' || callbackType === 'function') {
|
@@ -317,7 +335,7 @@ var requirejs, require, define;
|
|
317 |
//Default to [require, exports, module] if no deps
|
318 |
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
319 |
for (i = 0; i < deps.length; i += 1) {
|
320 |
-
map = makeMap(deps[i],
|
321 |
depName = map.f;
|
322 |
|
323 |
//Fast path CommonJS standard dependencies.
|
@@ -373,7 +391,7 @@ var requirejs, require, define;
|
|
373 |
//deps arg is the module name, and second arg (if passed)
|
374 |
//is just the relName.
|
375 |
//Normalize module name, if it contains . or ..
|
376 |
-
return callDep(makeMap(deps, callback).f);
|
377 |
} else if (!deps.splice) {
|
378 |
//deps is a config object, not an array.
|
379 |
config = deps;
|
@@ -556,10 +574,10 @@ S2.define('select2/utils',[
|
|
556 |
DecoratedClass.prototype = new ctr();
|
557 |
|
558 |
for (var m = 0; m < superMethods.length; m++) {
|
559 |
-
|
560 |
|
561 |
-
|
562 |
-
|
563 |
}
|
564 |
|
565 |
var calledMethod = function (methodName) {
|
@@ -606,9 +624,23 @@ S2.define('select2/utils',[
|
|
606 |
|
607 |
Observable.prototype.trigger = function (event) {
|
608 |
var slice = Array.prototype.slice;
|
|
|
609 |
|
610 |
this.listeners = this.listeners || {};
|
611 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
if (event in this.listeners) {
|
613 |
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
614 |
}
|
@@ -740,6 +772,70 @@ S2.define('select2/utils',[
|
|
740 |
$element.append($nodes);
|
741 |
};
|
742 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
743 |
return Utils;
|
744 |
});
|
745 |
|
@@ -759,7 +855,7 @@ S2.define('select2/results',[
|
|
759 |
|
760 |
Results.prototype.render = function () {
|
761 |
var $results = $(
|
762 |
-
'<ul class="select2-results__options" role="
|
763 |
);
|
764 |
|
765 |
if (this.options.get('multiple')) {
|
@@ -782,7 +878,7 @@ S2.define('select2/results',[
|
|
782 |
this.hideLoading();
|
783 |
|
784 |
var $message = $(
|
785 |
-
'<li role="
|
786 |
' class="select2-results__option"></li>'
|
787 |
);
|
788 |
|
@@ -842,6 +938,25 @@ S2.define('select2/results',[
|
|
842 |
return sorter(data);
|
843 |
};
|
844 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
845 |
Results.prototype.setClasses = function () {
|
846 |
var self = this;
|
847 |
|
@@ -856,7 +971,7 @@ S2.define('select2/results',[
|
|
856 |
$options.each(function () {
|
857 |
var $option = $(this);
|
858 |
|
859 |
-
var item =
|
860 |
|
861 |
// id needs to be converted to a string when comparing
|
862 |
var id = '' + item.id;
|
@@ -869,17 +984,6 @@ S2.define('select2/results',[
|
|
869 |
}
|
870 |
});
|
871 |
|
872 |
-
var $selected = $options.filter('[aria-selected=true]');
|
873 |
-
|
874 |
-
// Check if there are any selected options
|
875 |
-
if ($selected.length > 0) {
|
876 |
-
// If there are selected options, highlight the first
|
877 |
-
$selected.first().trigger('mouseenter');
|
878 |
-
} else {
|
879 |
-
// If there are no selected options, highlight the first option
|
880 |
-
// in the dropdown
|
881 |
-
$options.first().trigger('mouseenter');
|
882 |
-
}
|
883 |
});
|
884 |
};
|
885 |
|
@@ -908,11 +1012,16 @@ S2.define('select2/results',[
|
|
908 |
option.className = 'select2-results__option';
|
909 |
|
910 |
var attrs = {
|
911 |
-
'role': '
|
912 |
'aria-selected': 'false'
|
913 |
};
|
914 |
|
915 |
-
|
|
|
|
|
|
|
|
|
|
|
916 |
delete attrs['aria-selected'];
|
917 |
attrs['aria-disabled'] = 'true';
|
918 |
}
|
@@ -972,7 +1081,7 @@ S2.define('select2/results',[
|
|
972 |
this.template(data, option);
|
973 |
}
|
974 |
|
975 |
-
|
976 |
|
977 |
return option;
|
978 |
};
|
@@ -990,6 +1099,7 @@ S2.define('select2/results',[
|
|
990 |
|
991 |
if (container.isOpen()) {
|
992 |
self.setClasses();
|
|
|
993 |
}
|
994 |
});
|
995 |
|
@@ -1012,6 +1122,10 @@ S2.define('select2/results',[
|
|
1012 |
}
|
1013 |
|
1014 |
self.setClasses();
|
|
|
|
|
|
|
|
|
1015 |
});
|
1016 |
|
1017 |
container.on('unselect', function () {
|
@@ -1020,6 +1134,10 @@ S2.define('select2/results',[
|
|
1020 |
}
|
1021 |
|
1022 |
self.setClasses();
|
|
|
|
|
|
|
|
|
1023 |
});
|
1024 |
|
1025 |
container.on('open', function () {
|
@@ -1055,7 +1173,7 @@ S2.define('select2/results',[
|
|
1055 |
return;
|
1056 |
}
|
1057 |
|
1058 |
-
var data = $highlighted
|
1059 |
|
1060 |
if ($highlighted.attr('aria-selected') == 'true') {
|
1061 |
self.trigger('close', {});
|
@@ -1073,8 +1191,9 @@ S2.define('select2/results',[
|
|
1073 |
|
1074 |
var currentIndex = $options.index($highlighted);
|
1075 |
|
1076 |
-
// If we are already at
|
1077 |
-
|
|
|
1078 |
return;
|
1079 |
}
|
1080 |
|
@@ -1167,7 +1286,7 @@ S2.define('select2/results',[
|
|
1167 |
function (evt) {
|
1168 |
var $this = $(this);
|
1169 |
|
1170 |
-
var data =
|
1171 |
|
1172 |
if ($this.attr('aria-selected') === 'true') {
|
1173 |
if (self.options.get('multiple')) {
|
@@ -1190,7 +1309,7 @@ S2.define('select2/results',[
|
|
1190 |
|
1191 |
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
1192 |
function (evt) {
|
1193 |
-
var data =
|
1194 |
|
1195 |
self.getHighlightedResults()
|
1196 |
.removeClass('select2-results__option--highlighted');
|
@@ -1305,14 +1424,15 @@ S2.define('select2/selection/base',[
|
|
1305 |
|
1306 |
this._tabindex = 0;
|
1307 |
|
1308 |
-
if (this.$element
|
1309 |
-
this._tabindex = this.$element
|
1310 |
} else if (this.$element.attr('tabindex') != null) {
|
1311 |
this._tabindex = this.$element.attr('tabindex');
|
1312 |
}
|
1313 |
|
1314 |
$selection.attr('title', this.$element.attr('title'));
|
1315 |
$selection.attr('tabindex', this._tabindex);
|
|
|
1316 |
|
1317 |
this.$selection = $selection;
|
1318 |
|
@@ -1322,7 +1442,6 @@ S2.define('select2/selection/base',[
|
|
1322 |
BaseSelection.prototype.bind = function (container, $container) {
|
1323 |
var self = this;
|
1324 |
|
1325 |
-
var id = container.id + '-container';
|
1326 |
var resultsId = container.id + '-results';
|
1327 |
|
1328 |
this.container = container;
|
@@ -1365,17 +1484,19 @@ S2.define('select2/selection/base',[
|
|
1365 |
self.$selection.removeAttr('aria-activedescendant');
|
1366 |
self.$selection.removeAttr('aria-owns');
|
1367 |
|
1368 |
-
self.$selection.focus
|
1369 |
|
1370 |
self._detachCloseHandler(container);
|
1371 |
});
|
1372 |
|
1373 |
container.on('enable', function () {
|
1374 |
self.$selection.attr('tabindex', self._tabindex);
|
|
|
1375 |
});
|
1376 |
|
1377 |
container.on('disable', function () {
|
1378 |
self.$selection.attr('tabindex', '-1');
|
|
|
1379 |
});
|
1380 |
};
|
1381 |
|
@@ -1398,7 +1519,6 @@ S2.define('select2/selection/base',[
|
|
1398 |
};
|
1399 |
|
1400 |
BaseSelection.prototype._attachCloseHandler = function (container) {
|
1401 |
-
var self = this;
|
1402 |
|
1403 |
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1404 |
var $target = $(e.target);
|
@@ -1408,13 +1528,11 @@ S2.define('select2/selection/base',[
|
|
1408 |
var $all = $('.select2.select2-container--open');
|
1409 |
|
1410 |
$all.each(function () {
|
1411 |
-
var $this = $(this);
|
1412 |
-
|
1413 |
if (this == $select[0]) {
|
1414 |
return;
|
1415 |
}
|
1416 |
|
1417 |
-
var $element =
|
1418 |
|
1419 |
$element.select2('close');
|
1420 |
});
|
@@ -1438,6 +1556,27 @@ S2.define('select2/selection/base',[
|
|
1438 |
throw new Error('The `update` method must be defined in child classes.');
|
1439 |
};
|
1440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1441 |
return BaseSelection;
|
1442 |
});
|
1443 |
|
@@ -1475,7 +1614,10 @@ S2.define('select2/selection/single',[
|
|
1475 |
|
1476 |
var id = container.id + '-container';
|
1477 |
|
1478 |
-
this.$selection.find('.select2-selection__rendered')
|
|
|
|
|
|
|
1479 |
this.$selection.attr('aria-labelledby', id);
|
1480 |
|
1481 |
this.$selection.on('mousedown', function (evt) {
|
@@ -1497,13 +1639,17 @@ S2.define('select2/selection/single',[
|
|
1497 |
// User exits the container
|
1498 |
});
|
1499 |
|
1500 |
-
container.on('
|
1501 |
-
|
|
|
|
|
1502 |
});
|
1503 |
};
|
1504 |
|
1505 |
SingleSelection.prototype.clear = function () {
|
1506 |
-
this.$selection.find('.select2-selection__rendered')
|
|
|
|
|
1507 |
};
|
1508 |
|
1509 |
SingleSelection.prototype.display = function (data, container) {
|
@@ -1529,7 +1675,14 @@ S2.define('select2/selection/single',[
|
|
1529 |
var formatted = this.display(selection, $rendered);
|
1530 |
|
1531 |
$rendered.empty().append(formatted);
|
1532 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1533 |
};
|
1534 |
|
1535 |
return SingleSelection;
|
@@ -1574,14 +1727,14 @@ S2.define('select2/selection/multiple',[
|
|
1574 |
'.select2-selection__choice__remove',
|
1575 |
function (evt) {
|
1576 |
// Ignore the event if it is disabled
|
1577 |
-
if (self.
|
1578 |
return;
|
1579 |
}
|
1580 |
|
1581 |
var $remove = $(this);
|
1582 |
var $selection = $remove.parent();
|
1583 |
|
1584 |
-
var data = $selection
|
1585 |
|
1586 |
self.trigger('unselect', {
|
1587 |
originalEvent: evt,
|
@@ -1592,7 +1745,9 @@ S2.define('select2/selection/multiple',[
|
|
1592 |
};
|
1593 |
|
1594 |
MultipleSelection.prototype.clear = function () {
|
1595 |
-
this.$selection.find('.select2-selection__rendered')
|
|
|
|
|
1596 |
};
|
1597 |
|
1598 |
MultipleSelection.prototype.display = function (data, container) {
|
@@ -1630,9 +1785,14 @@ S2.define('select2/selection/multiple',[
|
|
1630 |
var formatted = this.display(selection, $selection);
|
1631 |
|
1632 |
$selection.append(formatted);
|
1633 |
-
$selection.prop('title', selection.title || selection.text);
|
1634 |
|
1635 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1636 |
|
1637 |
$selections.push($selection);
|
1638 |
}
|
@@ -1697,8 +1857,9 @@ S2.define('select2/selection/placeholder',[
|
|
1697 |
|
1698 |
S2.define('select2/selection/allowClear',[
|
1699 |
'jquery',
|
1700 |
-
'../keys'
|
1701 |
-
|
|
|
1702 |
function AllowClear () { }
|
1703 |
|
1704 |
AllowClear.prototype.bind = function (decorated, container, $container) {
|
@@ -1727,7 +1888,7 @@ S2.define('select2/selection/allowClear',[
|
|
1727 |
|
1728 |
AllowClear.prototype._handleClear = function (_, evt) {
|
1729 |
// Ignore the event if it is disabled
|
1730 |
-
if (this.
|
1731 |
return;
|
1732 |
}
|
1733 |
|
@@ -1740,10 +1901,22 @@ S2.define('select2/selection/allowClear',[
|
|
1740 |
|
1741 |
evt.stopPropagation();
|
1742 |
|
1743 |
-
var data = $clear
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1744 |
|
1745 |
for (var d = 0; d < data.length; d++) {
|
1746 |
-
|
1747 |
data: data[d]
|
1748 |
};
|
1749 |
|
@@ -1753,11 +1926,12 @@ S2.define('select2/selection/allowClear',[
|
|
1753 |
|
1754 |
// If the event was prevented, don't clear it out.
|
1755 |
if (unselectData.prevented) {
|
|
|
1756 |
return;
|
1757 |
}
|
1758 |
}
|
1759 |
|
1760 |
-
this.$element.
|
1761 |
|
1762 |
this.trigger('toggle', {});
|
1763 |
};
|
@@ -1780,12 +1954,14 @@ S2.define('select2/selection/allowClear',[
|
|
1780 |
return;
|
1781 |
}
|
1782 |
|
|
|
|
|
1783 |
var $remove = $(
|
1784 |
-
'<span class="select2-selection__clear">' +
|
1785 |
'×' +
|
1786 |
'</span>'
|
1787 |
);
|
1788 |
-
$remove
|
1789 |
|
1790 |
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
1791 |
};
|
@@ -1806,8 +1982,8 @@ S2.define('select2/selection/search',[
|
|
1806 |
var $search = $(
|
1807 |
'<li class="select2-search select2-search--inline">' +
|
1808 |
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1809 |
-
' autocomplete="off" autocorrect="off" autocapitalize="
|
1810 |
-
' spellcheck="false" role="
|
1811 |
'</li>'
|
1812 |
);
|
1813 |
|
@@ -1824,14 +2000,18 @@ S2.define('select2/selection/search',[
|
|
1824 |
Search.prototype.bind = function (decorated, container, $container) {
|
1825 |
var self = this;
|
1826 |
|
|
|
|
|
1827 |
decorated.call(this, container, $container);
|
1828 |
|
1829 |
container.on('open', function () {
|
|
|
1830 |
self.$search.trigger('focus');
|
1831 |
});
|
1832 |
|
1833 |
container.on('close', function () {
|
1834 |
self.$search.val('');
|
|
|
1835 |
self.$search.removeAttr('aria-activedescendant');
|
1836 |
self.$search.trigger('focus');
|
1837 |
});
|
@@ -1851,7 +2031,11 @@ S2.define('select2/selection/search',[
|
|
1851 |
});
|
1852 |
|
1853 |
container.on('results:focus', function (params) {
|
1854 |
-
|
|
|
|
|
|
|
|
|
1855 |
});
|
1856 |
|
1857 |
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
@@ -1876,7 +2060,7 @@ S2.define('select2/selection/search',[
|
|
1876 |
.prev('.select2-selection__choice');
|
1877 |
|
1878 |
if ($previousChoice.length > 0) {
|
1879 |
-
var item = $previousChoice
|
1880 |
|
1881 |
self.searchRemoveChoice(item);
|
1882 |
|
@@ -1885,6 +2069,12 @@ S2.define('select2/selection/search',[
|
|
1885 |
}
|
1886 |
});
|
1887 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1888 |
// Try to detect the IE version should the `documentMode` property that
|
1889 |
// is stored on the document. This is only implemented in IE and is
|
1890 |
// slightly cleaner than doing a user agent check.
|
@@ -1970,7 +2160,7 @@ S2.define('select2/selection/search',[
|
|
1970 |
|
1971 |
this.resizeSearch();
|
1972 |
if (searchHadFocus) {
|
1973 |
-
this.$search.focus
|
1974 |
}
|
1975 |
};
|
1976 |
|
@@ -2003,7 +2193,7 @@ S2.define('select2/selection/search',[
|
|
2003 |
var width = '';
|
2004 |
|
2005 |
if (this.$search.attr('placeholder') !== '') {
|
2006 |
-
width = this.$selection.find('.select2-selection__rendered').
|
2007 |
} else {
|
2008 |
var minimumWidth = this.$search.val().length + 1;
|
2009 |
|
@@ -2027,10 +2217,13 @@ S2.define('select2/selection/eventRelay',[
|
|
2027 |
'open', 'opening',
|
2028 |
'close', 'closing',
|
2029 |
'select', 'selecting',
|
2030 |
-
'unselect', 'unselecting'
|
|
|
2031 |
];
|
2032 |
|
2033 |
-
var preventableEvents = [
|
|
|
|
|
2034 |
|
2035 |
decorated.call(this, container, $container);
|
2036 |
|
@@ -2363,6 +2556,7 @@ S2.define('select2/diacritics',[
|
|
2363 |
'\u019F': 'O',
|
2364 |
'\uA74A': 'O',
|
2365 |
'\uA74C': 'O',
|
|
|
2366 |
'\u01A2': 'OI',
|
2367 |
'\uA74E': 'OO',
|
2368 |
'\u0222': 'OU',
|
@@ -2772,6 +2966,7 @@ S2.define('select2/diacritics',[
|
|
2772 |
'\uA74B': 'o',
|
2773 |
'\uA74D': 'o',
|
2774 |
'\u0275': 'o',
|
|
|
2775 |
'\u01A3': 'oi',
|
2776 |
'\u0223': 'ou',
|
2777 |
'\uA74F': 'oo',
|
@@ -2940,8 +3135,9 @@ S2.define('select2/diacritics',[
|
|
2940 |
'\u03CD': '\u03C5',
|
2941 |
'\u03CB': '\u03C5',
|
2942 |
'\u03B0': '\u03C5',
|
2943 |
-
'\
|
2944 |
-
'\u03C2': '\u03C3'
|
|
|
2945 |
};
|
2946 |
|
2947 |
return diacritics;
|
@@ -3026,7 +3222,7 @@ S2.define('select2/data/select',[
|
|
3026 |
if ($(data.element).is('option')) {
|
3027 |
data.element.selected = true;
|
3028 |
|
3029 |
-
this.$element.trigger('change');
|
3030 |
|
3031 |
return;
|
3032 |
}
|
@@ -3047,13 +3243,13 @@ S2.define('select2/data/select',[
|
|
3047 |
}
|
3048 |
|
3049 |
self.$element.val(val);
|
3050 |
-
self.$element.trigger('change');
|
3051 |
});
|
3052 |
} else {
|
3053 |
var val = data.id;
|
3054 |
|
3055 |
this.$element.val(val);
|
3056 |
-
this.$element.trigger('change');
|
3057 |
}
|
3058 |
};
|
3059 |
|
@@ -3069,7 +3265,7 @@ S2.define('select2/data/select',[
|
|
3069 |
if ($(data.element).is('option')) {
|
3070 |
data.element.selected = false;
|
3071 |
|
3072 |
-
this.$element.trigger('change');
|
3073 |
|
3074 |
return;
|
3075 |
}
|
@@ -3087,7 +3283,7 @@ S2.define('select2/data/select',[
|
|
3087 |
|
3088 |
self.$element.val(val);
|
3089 |
|
3090 |
-
self.$element.trigger('change');
|
3091 |
});
|
3092 |
};
|
3093 |
|
@@ -3109,7 +3305,7 @@ S2.define('select2/data/select',[
|
|
3109 |
// Remove anything added to child elements
|
3110 |
this.$element.find('*').each(function () {
|
3111 |
// Remove any custom data set by Select2
|
3112 |
-
|
3113 |
});
|
3114 |
};
|
3115 |
|
@@ -3160,7 +3356,7 @@ S2.define('select2/data/select',[
|
|
3160 |
}
|
3161 |
}
|
3162 |
|
3163 |
-
if (data.id) {
|
3164 |
option.value = data.id;
|
3165 |
}
|
3166 |
|
@@ -3182,7 +3378,7 @@ S2.define('select2/data/select',[
|
|
3182 |
normalizedData.element = option;
|
3183 |
|
3184 |
// Override the option's data with the combined data
|
3185 |
-
|
3186 |
|
3187 |
return $option;
|
3188 |
};
|
@@ -3190,7 +3386,7 @@ S2.define('select2/data/select',[
|
|
3190 |
SelectAdapter.prototype.item = function ($option) {
|
3191 |
var data = {};
|
3192 |
|
3193 |
-
data =
|
3194 |
|
3195 |
if (data != null) {
|
3196 |
return data;
|
@@ -3228,13 +3424,13 @@ S2.define('select2/data/select',[
|
|
3228 |
data = this._normalizeItem(data);
|
3229 |
data.element = $option[0];
|
3230 |
|
3231 |
-
|
3232 |
|
3233 |
return data;
|
3234 |
};
|
3235 |
|
3236 |
SelectAdapter.prototype._normalizeItem = function (item) {
|
3237 |
-
if (
|
3238 |
item = {
|
3239 |
id: item,
|
3240 |
text: item
|
@@ -3280,15 +3476,19 @@ S2.define('select2/data/array',[
|
|
3280 |
'jquery'
|
3281 |
], function (SelectAdapter, Utils, $) {
|
3282 |
function ArrayAdapter ($element, options) {
|
3283 |
-
|
3284 |
|
3285 |
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
3286 |
-
|
3287 |
-
this.addOptions(this.convertToOptions(data));
|
3288 |
}
|
3289 |
|
3290 |
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3292 |
ArrayAdapter.prototype.select = function (data) {
|
3293 |
var $option = this.$element.find('option').filter(function (i, elm) {
|
3294 |
return elm.value == data.id.toString();
|
@@ -3436,6 +3636,13 @@ S2.define('select2/data/ajax',[
|
|
3436 |
|
3437 |
callback(results);
|
3438 |
}, function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3439 |
self.trigger('results:message', {
|
3440 |
message: 'errorLoading'
|
3441 |
});
|
@@ -3444,7 +3651,7 @@ S2.define('select2/data/ajax',[
|
|
3444 |
self._request = $request;
|
3445 |
}
|
3446 |
|
3447 |
-
if (this.ajaxOptions.delay && params.term
|
3448 |
if (this._queryTimeout) {
|
3449 |
window.clearTimeout(this._queryTimeout);
|
3450 |
}
|
@@ -3513,7 +3720,10 @@ S2.define('select2/data/tags',[
|
|
3513 |
}, true)
|
3514 |
);
|
3515 |
|
3516 |
-
var
|
|
|
|
|
|
|
3517 |
|
3518 |
if (checkText || checkChildren) {
|
3519 |
if (child) {
|
@@ -3568,8 +3778,6 @@ S2.define('select2/data/tags',[
|
|
3568 |
};
|
3569 |
|
3570 |
Tags.prototype._removeOldTags = function (_) {
|
3571 |
-
var tag = this._lastTag;
|
3572 |
-
|
3573 |
var $options = this.$element.find('option[data-select2-tag]');
|
3574 |
|
3575 |
$options.each(function () {
|
@@ -3607,6 +3815,29 @@ S2.define('select2/data/tokenizer',[
|
|
3607 |
Tokenizer.prototype.query = function (decorated, params, callback) {
|
3608 |
var self = this;
|
3609 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3610 |
function select (data) {
|
3611 |
self.trigger('select', {
|
3612 |
data: data
|
@@ -3615,13 +3846,13 @@ S2.define('select2/data/tokenizer',[
|
|
3615 |
|
3616 |
params.term = params.term || '';
|
3617 |
|
3618 |
-
var tokenData = this.tokenizer(params, this.options,
|
3619 |
|
3620 |
if (tokenData.term !== params.term) {
|
3621 |
// Replace the search term if we have the search box
|
3622 |
if (this.$search.length) {
|
3623 |
this.$search.val(tokenData.term);
|
3624 |
-
this.$search.focus
|
3625 |
}
|
3626 |
|
3627 |
params.term = tokenData.term;
|
@@ -3750,10 +3981,30 @@ S2.define('select2/data/maximumSelectionLength',[
|
|
3750 |
decorated.call(this, $e, options);
|
3751 |
}
|
3752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3753 |
MaximumSelectionLength.prototype.query =
|
3754 |
function (decorated, params, callback) {
|
3755 |
var self = this;
|
3756 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3757 |
this.current(function (currentData) {
|
3758 |
var count = currentData != null ? currentData.length : 0;
|
3759 |
if (self.maximumSelectionLength > 0 &&
|
@@ -3766,7 +4017,10 @@ S2.define('select2/data/maximumSelectionLength',[
|
|
3766 |
});
|
3767 |
return;
|
3768 |
}
|
3769 |
-
|
|
|
|
|
|
|
3770 |
});
|
3771 |
};
|
3772 |
|
@@ -3805,7 +4059,7 @@ S2.define('select2/dropdown',[
|
|
3805 |
};
|
3806 |
|
3807 |
Dropdown.prototype.position = function ($dropdown, $container) {
|
3808 |
-
// Should be
|
3809 |
};
|
3810 |
|
3811 |
Dropdown.prototype.destroy = function () {
|
@@ -3828,8 +4082,8 @@ S2.define('select2/dropdown/search',[
|
|
3828 |
var $search = $(
|
3829 |
'<span class="select2-search select2-search--dropdown">' +
|
3830 |
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
3831 |
-
' autocomplete="off" autocorrect="off" autocapitalize="
|
3832 |
-
' spellcheck="false" role="
|
3833 |
'</span>'
|
3834 |
);
|
3835 |
|
@@ -3844,6 +4098,8 @@ S2.define('select2/dropdown/search',[
|
|
3844 |
Search.prototype.bind = function (decorated, container, $container) {
|
3845 |
var self = this;
|
3846 |
|
|
|
|
|
3847 |
decorated.call(this, container, $container);
|
3848 |
|
3849 |
this.$search.on('keydown', function (evt) {
|
@@ -3866,18 +4122,28 @@ S2.define('select2/dropdown/search',[
|
|
3866 |
|
3867 |
container.on('open', function () {
|
3868 |
self.$search.attr('tabindex', 0);
|
|
|
3869 |
|
3870 |
-
self.$search.focus
|
3871 |
|
3872 |
window.setTimeout(function () {
|
3873 |
-
self.$search.focus
|
3874 |
}, 0);
|
3875 |
});
|
3876 |
|
3877 |
container.on('close', function () {
|
3878 |
self.$search.attr('tabindex', -1);
|
|
|
|
|
3879 |
|
3880 |
self.$search.val('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3881 |
});
|
3882 |
|
3883 |
container.on('results:all', function (params) {
|
@@ -3891,6 +4157,14 @@ S2.define('select2/dropdown/search',[
|
|
3891 |
}
|
3892 |
}
|
3893 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3894 |
};
|
3895 |
|
3896 |
Search.prototype.handleSearch = function (evt) {
|
@@ -3975,6 +4249,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|
3975 |
|
3976 |
if (this.showLoadingMore(data)) {
|
3977 |
this.$results.append(this.$loadingMore);
|
|
|
3978 |
}
|
3979 |
};
|
3980 |
|
@@ -3993,25 +4268,27 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|
3993 |
self.loading = true;
|
3994 |
});
|
3995 |
|
3996 |
-
this.$results.on('scroll',
|
3997 |
-
|
3998 |
-
document.documentElement,
|
3999 |
-
self.$loadingMore[0]
|
4000 |
-
);
|
4001 |
|
4002 |
-
|
4003 |
-
|
4004 |
-
|
|
|
|
|
4005 |
|
4006 |
-
|
4007 |
-
|
4008 |
-
|
4009 |
-
self.$loadingMore.outerHeight(false);
|
4010 |
|
4011 |
-
|
4012 |
-
|
4013 |
-
|
4014 |
-
|
|
|
|
|
|
|
|
|
4015 |
};
|
4016 |
|
4017 |
InfiniteScroll.prototype.loadMore = function () {
|
@@ -4032,7 +4309,7 @@ S2.define('select2/dropdown/infiniteScroll',[
|
|
4032 |
var $option = $(
|
4033 |
'<li ' +
|
4034 |
'class="select2-results__option select2-results__option--load-more"' +
|
4035 |
-
'role="
|
4036 |
);
|
4037 |
|
4038 |
var message = this.options.get('translations').get('loadingMore');
|
@@ -4050,7 +4327,7 @@ S2.define('select2/dropdown/attachBody',[
|
|
4050 |
'../utils'
|
4051 |
], function ($, Utils) {
|
4052 |
function AttachBody (decorated, $element, options) {
|
4053 |
-
this.$dropdownParent = options.get('dropdownParent') ||
|
4054 |
|
4055 |
decorated.call(this, $element, options);
|
4056 |
}
|
@@ -4058,27 +4335,14 @@ S2.define('select2/dropdown/attachBody',[
|
|
4058 |
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4059 |
var self = this;
|
4060 |
|
4061 |
-
var setupResultsEvents = false;
|
4062 |
-
|
4063 |
decorated.call(this, container, $container);
|
4064 |
|
4065 |
container.on('open', function () {
|
4066 |
self._showDropdown();
|
4067 |
self._attachPositioningHandler(container);
|
4068 |
|
4069 |
-
|
4070 |
-
|
4071 |
-
|
4072 |
-
container.on('results:all', function () {
|
4073 |
-
self._positionDropdown();
|
4074 |
-
self._resizeDropdown();
|
4075 |
-
});
|
4076 |
-
|
4077 |
-
container.on('results:append', function () {
|
4078 |
-
self._positionDropdown();
|
4079 |
-
self._resizeDropdown();
|
4080 |
-
});
|
4081 |
-
}
|
4082 |
});
|
4083 |
|
4084 |
container.on('close', function () {
|
@@ -4127,6 +4391,44 @@ S2.define('select2/dropdown/attachBody',[
|
|
4127 |
this.$dropdownContainer.detach();
|
4128 |
};
|
4129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4130 |
AttachBody.prototype._attachPositioningHandler =
|
4131 |
function (decorated, container) {
|
4132 |
var self = this;
|
@@ -4137,14 +4439,14 @@ S2.define('select2/dropdown/attachBody',[
|
|
4137 |
|
4138 |
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4139 |
$watchers.each(function () {
|
4140 |
-
|
4141 |
x: $(this).scrollLeft(),
|
4142 |
y: $(this).scrollTop()
|
4143 |
});
|
4144 |
});
|
4145 |
|
4146 |
$watchers.on(scrollEvent, function (ev) {
|
4147 |
-
var position =
|
4148 |
$(this).scrollTop(position.y);
|
4149 |
});
|
4150 |
|
@@ -4203,16 +4505,26 @@ S2.define('select2/dropdown/attachBody',[
|
|
4203 |
top: container.bottom
|
4204 |
};
|
4205 |
|
4206 |
-
// Determine what the parent element is to use for
|
4207 |
var $offsetParent = this.$dropdownParent;
|
4208 |
|
4209 |
-
// For statically
|
4210 |
// that is determining the offset
|
4211 |
if ($offsetParent.css('position') === 'static') {
|
4212 |
$offsetParent = $offsetParent.offsetParent();
|
4213 |
}
|
4214 |
|
4215 |
-
var parentOffset =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4216 |
|
4217 |
css.top -= parentOffset.top;
|
4218 |
css.left -= parentOffset.left;
|
@@ -4229,7 +4541,7 @@ S2.define('select2/dropdown/attachBody',[
|
|
4229 |
|
4230 |
if (newDirection == 'above' ||
|
4231 |
(isCurrentlyAbove && newDirection !== 'below')) {
|
4232 |
-
css.top = container.top - dropdown.height;
|
4233 |
}
|
4234 |
|
4235 |
if (newDirection != null) {
|
@@ -4251,6 +4563,7 @@ S2.define('select2/dropdown/attachBody',[
|
|
4251 |
|
4252 |
if (this.options.get('dropdownAutoWidth')) {
|
4253 |
css.minWidth = css.width;
|
|
|
4254 |
css.width = 'auto';
|
4255 |
}
|
4256 |
|
@@ -4308,8 +4621,8 @@ S2.define('select2/dropdown/minimumResultsForSearch',[
|
|
4308 |
});
|
4309 |
|
4310 |
S2.define('select2/dropdown/selectOnClose',[
|
4311 |
-
|
4312 |
-
], function () {
|
4313 |
function SelectOnClose () { }
|
4314 |
|
4315 |
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
@@ -4317,12 +4630,22 @@ S2.define('select2/dropdown/selectOnClose',[
|
|
4317 |
|
4318 |
decorated.call(this, container, $container);
|
4319 |
|
4320 |
-
container.on('close', function () {
|
4321 |
-
self._handleSelectOnClose();
|
4322 |
});
|
4323 |
};
|
4324 |
|
4325 |
-
SelectOnClose.prototype._handleSelectOnClose = function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4326 |
var $highlightedResults = this.getHighlightedResults();
|
4327 |
|
4328 |
// Only select highlighted results
|
@@ -4330,7 +4653,7 @@ S2.define('select2/dropdown/selectOnClose',[
|
|
4330 |
return;
|
4331 |
}
|
4332 |
|
4333 |
-
var data = $highlightedResults
|
4334 |
|
4335 |
// Don't re-select already selected resulte
|
4336 |
if (
|
@@ -4371,11 +4694,14 @@ S2.define('select2/dropdown/closeOnSelect',[
|
|
4371 |
var originalEvent = evt.originalEvent;
|
4372 |
|
4373 |
// Don't close if the control key is being held
|
4374 |
-
if (originalEvent && originalEvent.ctrlKey) {
|
4375 |
return;
|
4376 |
}
|
4377 |
|
4378 |
-
this.trigger('close', {
|
|
|
|
|
|
|
4379 |
};
|
4380 |
|
4381 |
return CloseOnSelect;
|
@@ -4422,6 +4748,9 @@ S2.define('select2/i18n/en',[],function () {
|
|
4422 |
},
|
4423 |
searching: function () {
|
4424 |
return 'Searching…';
|
|
|
|
|
|
|
4425 |
}
|
4426 |
};
|
4427 |
});
|
@@ -4660,66 +4989,29 @@ S2.define('select2/defaults',[
|
|
4660 |
);
|
4661 |
}
|
4662 |
|
4663 |
-
|
4664 |
-
|
4665 |
-
|
4666 |
-
// Extract the region information if it is included
|
4667 |
-
var languageParts = options.language.split('-');
|
4668 |
-
var baseLanguage = languageParts[0];
|
4669 |
|
4670 |
-
|
4671 |
-
|
4672 |
-
options.language = [options.language];
|
4673 |
-
}
|
4674 |
-
}
|
4675 |
-
|
4676 |
-
if ($.isArray(options.language)) {
|
4677 |
-
var languages = new Translation();
|
4678 |
-
options.language.push('en');
|
4679 |
-
|
4680 |
-
var languageNames = options.language;
|
4681 |
|
4682 |
-
|
4683 |
-
var name = languageNames[l];
|
4684 |
-
var language = {};
|
4685 |
-
|
4686 |
-
try {
|
4687 |
-
// Try to load it with the original name
|
4688 |
-
language = Translation.loadPath(name);
|
4689 |
-
} catch (e) {
|
4690 |
-
try {
|
4691 |
-
// If we couldn't load it, check if it wasn't the full path
|
4692 |
-
name = this.defaults.amdLanguageBase + name;
|
4693 |
-
language = Translation.loadPath(name);
|
4694 |
-
} catch (ex) {
|
4695 |
-
// The translation could not be loaded at all. Sometimes this is
|
4696 |
-
// because of a configuration problem, other times this can be
|
4697 |
-
// because of how Select2 helps load all possible translation files.
|
4698 |
-
if (options.debug && window.console && console.warn) {
|
4699 |
-
console.warn(
|
4700 |
-
'Select2: The language file for "' + name + '" could not be ' +
|
4701 |
-
'automatically loaded. A fallback will be used instead.'
|
4702 |
-
);
|
4703 |
-
}
|
4704 |
|
4705 |
-
|
4706 |
-
|
4707 |
-
}
|
4708 |
|
4709 |
-
|
|
|
4710 |
}
|
|
|
4711 |
|
4712 |
-
|
4713 |
-
} else {
|
4714 |
-
var baseTranslation = Translation.loadPath(
|
4715 |
-
this.defaults.amdLanguageBase + 'en'
|
4716 |
-
);
|
4717 |
-
var customTranslation = new Translation(options.language);
|
4718 |
-
|
4719 |
-
customTranslation.extend(baseTranslation);
|
4720 |
|
4721 |
-
|
4722 |
-
|
|
|
|
|
4723 |
|
4724 |
return options;
|
4725 |
};
|
@@ -4786,13 +5078,14 @@ S2.define('select2/defaults',[
|
|
4786 |
debug: false,
|
4787 |
dropdownAutoWidth: false,
|
4788 |
escapeMarkup: Utils.escapeMarkup,
|
4789 |
-
language:
|
4790 |
matcher: matcher,
|
4791 |
minimumInputLength: 0,
|
4792 |
maximumInputLength: 0,
|
4793 |
maximumSelectionLength: 0,
|
4794 |
minimumResultsForSearch: 0,
|
4795 |
selectOnClose: false,
|
|
|
4796 |
sorter: function (data) {
|
4797 |
return data;
|
4798 |
},
|
@@ -4807,6 +5100,103 @@ S2.define('select2/defaults',[
|
|
4807 |
};
|
4808 |
};
|
4809 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4810 |
Defaults.prototype.set = function (key, value) {
|
4811 |
var camelKey = $.camelCase(key);
|
4812 |
|
@@ -4815,7 +5205,7 @@ S2.define('select2/defaults',[
|
|
4815 |
|
4816 |
var convertedData = Utils._convertData(data);
|
4817 |
|
4818 |
-
$.extend(this.defaults, convertedData);
|
4819 |
};
|
4820 |
|
4821 |
var defaults = new Defaults();
|
@@ -4836,6 +5226,10 @@ S2.define('select2/options',[
|
|
4836 |
this.fromElement($element);
|
4837 |
}
|
4838 |
|
|
|
|
|
|
|
|
|
4839 |
this.options = Defaults.apply(this.options);
|
4840 |
|
4841 |
if ($element && $element.is('input')) {
|
@@ -4859,14 +5253,6 @@ S2.define('select2/options',[
|
|
4859 |
this.options.disabled = $e.prop('disabled');
|
4860 |
}
|
4861 |
|
4862 |
-
if (this.options.language == null) {
|
4863 |
-
if ($e.prop('lang')) {
|
4864 |
-
this.options.language = $e.prop('lang').toLowerCase();
|
4865 |
-
} else if ($e.closest('[lang]').prop('lang')) {
|
4866 |
-
this.options.language = $e.closest('[lang]').prop('lang');
|
4867 |
-
}
|
4868 |
-
}
|
4869 |
-
|
4870 |
if (this.options.dir == null) {
|
4871 |
if ($e.prop('dir')) {
|
4872 |
this.options.dir = $e.prop('dir');
|
@@ -4880,7 +5266,7 @@ S2.define('select2/options',[
|
|
4880 |
$e.prop('disabled', this.options.disabled);
|
4881 |
$e.prop('multiple', this.options.multiple);
|
4882 |
|
4883 |
-
if ($e
|
4884 |
if (this.options.debug && window.console && console.warn) {
|
4885 |
console.warn(
|
4886 |
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
@@ -4889,11 +5275,11 @@ S2.define('select2/options',[
|
|
4889 |
);
|
4890 |
}
|
4891 |
|
4892 |
-
$e
|
4893 |
-
$e
|
4894 |
}
|
4895 |
|
4896 |
-
if ($e
|
4897 |
if (this.options.debug && window.console && console.warn) {
|
4898 |
console.warn(
|
4899 |
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
@@ -4902,21 +5288,45 @@ S2.define('select2/options',[
|
|
4902 |
);
|
4903 |
}
|
4904 |
|
4905 |
-
$e.attr('ajax--url', $e
|
4906 |
-
$e
|
4907 |
}
|
4908 |
|
4909 |
var dataset = {};
|
4910 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4911 |
// Prefer the element's `dataset` attribute if it exists
|
4912 |
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
4913 |
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
4914 |
-
dataset = $.extend(true, {}, $e[0].dataset,
|
4915 |
-
} else {
|
4916 |
-
dataset = $e.data();
|
4917 |
}
|
4918 |
|
4919 |
-
|
|
|
4920 |
|
4921 |
data = Utils._convertData(data);
|
4922 |
|
@@ -4953,8 +5363,8 @@ S2.define('select2/core',[
|
|
4953 |
'./keys'
|
4954 |
], function ($, Options, Utils, KEYS) {
|
4955 |
var Select2 = function ($element, options) {
|
4956 |
-
if ($element
|
4957 |
-
$element
|
4958 |
}
|
4959 |
|
4960 |
this.$element = $element;
|
@@ -4970,7 +5380,7 @@ S2.define('select2/core',[
|
|
4970 |
// Set up the tabindex
|
4971 |
|
4972 |
var tabindex = $element.attr('tabindex') || 0;
|
4973 |
-
$element
|
4974 |
$element.attr('tabindex', '-1');
|
4975 |
|
4976 |
// Set up containers and adapters
|
@@ -5031,6 +5441,9 @@ S2.define('select2/core',[
|
|
5031 |
// Synchronize any monitored attributes
|
5032 |
this._syncAttributes();
|
5033 |
|
|
|
|
|
|
|
5034 |
$element.data('select2', this);
|
5035 |
};
|
5036 |
|
@@ -5107,6 +5520,12 @@ S2.define('select2/core',[
|
|
5107 |
return null;
|
5108 |
}
|
5109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5110 |
return method;
|
5111 |
};
|
5112 |
|
@@ -5129,10 +5548,15 @@ S2.define('select2/core',[
|
|
5129 |
});
|
5130 |
});
|
5131 |
|
5132 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
5133 |
|
5134 |
if (this.$element[0].attachEvent) {
|
5135 |
-
this.$element[0].attachEvent('onpropertychange', this.
|
5136 |
}
|
5137 |
|
5138 |
var observer = window.MutationObserver ||
|
@@ -5142,14 +5566,30 @@ S2.define('select2/core',[
|
|
5142 |
|
5143 |
if (observer != null) {
|
5144 |
this._observer = new observer(function (mutations) {
|
5145 |
-
|
|
|
5146 |
});
|
5147 |
this._observer.observe(this.$element[0], {
|
5148 |
attributes: true,
|
|
|
5149 |
subtree: false
|
5150 |
});
|
5151 |
} else if (this.$element[0].addEventListener) {
|
5152 |
-
this.$element[0].addEventListener(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5153 |
}
|
5154 |
};
|
5155 |
|
@@ -5249,7 +5689,7 @@ S2.define('select2/core',[
|
|
5249 |
if (self.isOpen()) {
|
5250 |
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5251 |
(key === KEYS.UP && evt.altKey)) {
|
5252 |
-
self.close();
|
5253 |
|
5254 |
evt.preventDefault();
|
5255 |
} else if (key === KEYS.ENTER) {
|
@@ -5283,7 +5723,7 @@ S2.define('select2/core',[
|
|
5283 |
Select2.prototype._syncAttributes = function () {
|
5284 |
this.options.set('disabled', this.$element.prop('disabled'));
|
5285 |
|
5286 |
-
if (this.
|
5287 |
if (this.isOpen()) {
|
5288 |
this.close();
|
5289 |
}
|
@@ -5294,6 +5734,61 @@ S2.define('select2/core',[
|
|
5294 |
}
|
5295 |
};
|
5296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5297 |
/**
|
5298 |
* Override the trigger method to automatically trigger pre-events when
|
5299 |
* there are events that can be prevented.
|
@@ -5304,7 +5799,8 @@ S2.define('select2/core',[
|
|
5304 |
'open': 'opening',
|
5305 |
'close': 'closing',
|
5306 |
'select': 'selecting',
|
5307 |
-
'unselect': 'unselecting'
|
|
|
5308 |
};
|
5309 |
|
5310 |
if (args === undefined) {
|
@@ -5332,7 +5828,7 @@ S2.define('select2/core',[
|
|
5332 |
};
|
5333 |
|
5334 |
Select2.prototype.toggleDropdown = function () {
|
5335 |
-
if (this.
|
5336 |
return;
|
5337 |
}
|
5338 |
|
@@ -5348,15 +5844,40 @@ S2.define('select2/core',[
|
|
5348 |
return;
|
5349 |
}
|
5350 |
|
|
|
|
|
|
|
|
|
5351 |
this.trigger('query', {});
|
5352 |
};
|
5353 |
|
5354 |
-
Select2.prototype.close = function () {
|
5355 |
if (!this.isOpen()) {
|
5356 |
return;
|
5357 |
}
|
5358 |
|
5359 |
-
this.trigger('close', {});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5360 |
};
|
5361 |
|
5362 |
Select2.prototype.isOpen = function () {
|
@@ -5433,14 +5954,14 @@ S2.define('select2/core',[
|
|
5433 |
});
|
5434 |
}
|
5435 |
|
5436 |
-
this.$element.val(newVal).trigger('change');
|
5437 |
};
|
5438 |
|
5439 |
Select2.prototype.destroy = function () {
|
5440 |
this.$container.remove();
|
5441 |
|
5442 |
if (this.$element[0].detachEvent) {
|
5443 |
-
this.$element[0].detachEvent('onpropertychange', this.
|
5444 |
}
|
5445 |
|
5446 |
if (this._observer != null) {
|
@@ -5448,16 +5969,23 @@ S2.define('select2/core',[
|
|
5448 |
this._observer = null;
|
5449 |
} else if (this.$element[0].removeEventListener) {
|
5450 |
this.$element[0]
|
5451 |
-
.removeEventListener('DOMAttrModified', this.
|
|
|
|
|
|
|
|
|
5452 |
}
|
5453 |
|
5454 |
-
this.
|
|
|
5455 |
|
5456 |
this.$element.off('.select2');
|
5457 |
-
this.$element.attr('tabindex',
|
|
|
5458 |
|
5459 |
this.$element.removeClass('select2-hidden-accessible');
|
5460 |
this.$element.attr('aria-hidden', 'false');
|
|
|
5461 |
this.$element.removeData('select2');
|
5462 |
|
5463 |
this.dataAdapter.destroy();
|
@@ -5485,7 +6013,7 @@ S2.define('select2/core',[
|
|
5485 |
|
5486 |
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
5487 |
|
5488 |
-
$container
|
5489 |
|
5490 |
return $container;
|
5491 |
};
|
@@ -5505,8 +6033,9 @@ S2.define('jquery.select2',[
|
|
5505 |
'jquery-mousewheel',
|
5506 |
|
5507 |
'./select2/core',
|
5508 |
-
'./select2/defaults'
|
5509 |
-
|
|
|
5510 |
if ($.fn.select2 == null) {
|
5511 |
// All methods that should return the element
|
5512 |
var thisMethods = ['open', 'close', 'destroy'];
|
@@ -5524,9 +6053,10 @@ S2.define('jquery.select2',[
|
|
5524 |
return this;
|
5525 |
} else if (typeof options === 'string') {
|
5526 |
var ret;
|
|
|
5527 |
|
5528 |
this.each(function () {
|
5529 |
-
var instance =
|
5530 |
|
5531 |
if (instance == null && window.console && console.error) {
|
5532 |
console.error(
|
@@ -5535,8 +6065,6 @@ S2.define('jquery.select2',[
|
|
5535 |
);
|
5536 |
}
|
5537 |
|
5538 |
-
var args = Array.prototype.slice.call(arguments, 1);
|
5539 |
-
|
5540 |
ret = instance[options].apply(instance, args);
|
5541 |
});
|
5542 |
|
1 |
/*!
|
2 |
+
* Select2 4.0.13
|
3 |
* https://select2.github.io
|
4 |
*
|
5 |
* Released under the MIT license
|
6 |
* https://github.com/select2/select2/blob/master/LICENSE.md
|
7 |
*/
|
8 |
+
;(function (factory) {
|
9 |
if (typeof define === 'function' && define.amd) {
|
10 |
// AMD. Register as an anonymous module.
|
11 |
define(['jquery'], factory);
|
12 |
+
} else if (typeof module === 'object' && module.exports) {
|
13 |
// Node/CommonJS
|
14 |
+
module.exports = function (root, jQuery) {
|
15 |
+
if (jQuery === undefined) {
|
16 |
+
// require('jQuery') returns a factory that requires window to
|
17 |
+
// build a jQuery instance, we normalize how we use modules
|
18 |
+
// that require this pattern but the window provided is a noop
|
19 |
+
// if it's defined (how jquery works)
|
20 |
+
if (typeof window !== 'undefined') {
|
21 |
+
jQuery = require('jquery');
|
22 |
+
}
|
23 |
+
else {
|
24 |
+
jQuery = require('jquery')(root);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
factory(jQuery);
|
28 |
+
return jQuery;
|
29 |
+
};
|
30 |
} else {
|
31 |
// Browser globals
|
32 |
factory(jQuery);
|
33 |
}
|
34 |
+
} (function (jQuery) {
|
35 |
// This is needed so we can catch the AMD loader configuration and use it
|
36 |
// The inner file should be wrapped (by `banner.start.js`) in a function that
|
37 |
// returns the AMD loader references.
|
38 |
+
var S2 =(function () {
|
|
|
39 |
// Restore the Select2 AMD loader so it can be used
|
40 |
// Needed mostly in the language files, where the loader is not inserted
|
41 |
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
|
44 |
var S2;(function () { if (!S2 || !S2.requirejs) {
|
45 |
if (!S2) { S2 = {}; } else { require = S2; }
|
46 |
/**
|
47 |
+
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
48 |
+
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
|
|
49 |
*/
|
50 |
//Going sloppy to avoid 'use strict' string cost, but strict practices should
|
51 |
//be followed.
|
|
|
52 |
/*global setTimeout: false */
|
53 |
|
54 |
var requirejs, require, define;
|
76 |
*/
|
77 |
function normalize(name, baseName) {
|
78 |
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
|
79 |
+
foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
|
80 |
baseParts = baseName && baseName.split("/"),
|
81 |
map = config.map,
|
82 |
starMap = (map && map['*']) || {};
|
83 |
|
84 |
//Adjust any relative paths.
|
85 |
+
if (name) {
|
86 |
+
name = name.split('/');
|
87 |
+
lastIndex = name.length - 1;
|
88 |
+
|
89 |
+
// If wanting node ID compatibility, strip .js from end
|
90 |
+
// of IDs. Have to do this here, and not in nameToUrl
|
91 |
+
// because node allows either .js or non .js to map
|
92 |
+
// to same file.
|
93 |
+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
|
94 |
+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
|
95 |
+
}
|
|
|
96 |
|
97 |
+
// Starts with a '.' so need the baseName
|
98 |
+
if (name[0].charAt(0) === '.' && baseParts) {
|
99 |
+
//Convert baseName to array, and lop off the last part,
|
100 |
+
//so that . matches that 'directory' and not name of the baseName's
|
101 |
+
//module. For instance, baseName of 'one/two/three', maps to
|
102 |
+
//'one/two/three.js', but we want the directory, 'one/two' for
|
103 |
+
//this normalization.
|
104 |
+
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
|
105 |
+
name = normalizedBaseParts.concat(name);
|
106 |
+
}
|
107 |
+
|
108 |
+
//start trimDots
|
109 |
+
for (i = 0; i < name.length; i++) {
|
110 |
+
part = name[i];
|
111 |
+
if (part === '.') {
|
112 |
+
name.splice(i, 1);
|
113 |
+
i -= 1;
|
114 |
+
} else if (part === '..') {
|
115 |
+
// If at the start, or previous value is still ..,
|
116 |
+
// keep them so that when converted to a path it may
|
117 |
+
// still work when converted to a path, even though
|
118 |
+
// as an ID it is less than ideal. In larger point
|
119 |
+
// releases, may be better to just kick out an error.
|
120 |
+
if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {
|
121 |
+
continue;
|
122 |
+
} else if (i > 0) {
|
123 |
+
name.splice(i - 1, 2);
|
124 |
+
i -= 2;
|
125 |
}
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
+
//end trimDots
|
129 |
+
|
130 |
+
name = name.join('/');
|
131 |
}
|
132 |
|
133 |
//Apply map config if available.
|
240 |
return [prefix, name];
|
241 |
}
|
242 |
|
243 |
+
//Creates a parts array for a relName where first part is plugin ID,
|
244 |
+
//second part is resource ID. Assumes relName has already been normalized.
|
245 |
+
function makeRelParts(relName) {
|
246 |
+
return relName ? splitPrefix(relName) : [];
|
247 |
+
}
|
248 |
+
|
249 |
/**
|
250 |
* Makes a name map, normalizing the name, and using a plugin
|
251 |
* for normalization if necessary. Grabs a ref to plugin
|
252 |
* too, as an optimization.
|
253 |
*/
|
254 |
+
makeMap = function (name, relParts) {
|
255 |
var plugin,
|
256 |
parts = splitPrefix(name),
|
257 |
+
prefix = parts[0],
|
258 |
+
relResourceName = relParts[1];
|
259 |
|
260 |
name = parts[1];
|
261 |
|
262 |
if (prefix) {
|
263 |
+
prefix = normalize(prefix, relResourceName);
|
264 |
plugin = callDep(prefix);
|
265 |
}
|
266 |
|
267 |
//Normalize according
|
268 |
if (prefix) {
|
269 |
if (plugin && plugin.normalize) {
|
270 |
+
name = plugin.normalize(name, makeNormalize(relResourceName));
|
271 |
} else {
|
272 |
+
name = normalize(name, relResourceName);
|
273 |
}
|
274 |
} else {
|
275 |
+
name = normalize(name, relResourceName);
|
276 |
parts = splitPrefix(name);
|
277 |
prefix = parts[0];
|
278 |
name = parts[1];
|
319 |
};
|
320 |
|
321 |
main = function (name, deps, callback, relName) {
|
322 |
+
var cjsModule, depName, ret, map, i, relParts,
|
323 |
args = [],
|
324 |
callbackType = typeof callback,
|
325 |
usingExports;
|
326 |
|
327 |
//Use name if no relName
|
328 |
relName = relName || name;
|
329 |
+
relParts = makeRelParts(relName);
|
330 |
|
331 |
//Call the callback to define the module, if necessary.
|
332 |
if (callbackType === 'undefined' || callbackType === 'function') {
|
335 |
//Default to [require, exports, module] if no deps
|
336 |
deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
|
337 |
for (i = 0; i < deps.length; i += 1) {
|
338 |
+
map = makeMap(deps[i], relParts);
|
339 |
depName = map.f;
|
340 |
|
341 |
//Fast path CommonJS standard dependencies.
|
391 |
//deps arg is the module name, and second arg (if passed)
|
392 |
//is just the relName.
|
393 |
//Normalize module name, if it contains . or ..
|
394 |
+
return callDep(makeMap(deps, makeRelParts(callback)).f);
|
395 |
} else if (!deps.splice) {
|
396 |
//deps is a config object, not an array.
|
397 |
config = deps;
|
574 |
DecoratedClass.prototype = new ctr();
|
575 |
|
576 |
for (var m = 0; m < superMethods.length; m++) {
|
577 |
+
var superMethod = superMethods[m];
|
578 |
|
579 |
+
DecoratedClass.prototype[superMethod] =
|
580 |
+
SuperClass.prototype[superMethod];
|
581 |
}
|
582 |
|
583 |
var calledMethod = function (methodName) {
|
624 |
|
625 |
Observable.prototype.trigger = function (event) {
|
626 |
var slice = Array.prototype.slice;
|
627 |
+
var params = slice.call(arguments, 1);
|
628 |
|
629 |
this.listeners = this.listeners || {};
|
630 |
|
631 |
+
// Params should always come in as an array
|
632 |
+
if (params == null) {
|
633 |
+
params = [];
|
634 |
+
}
|
635 |
+
|
636 |
+
// If there are no arguments to the event, use a temporary object
|
637 |
+
if (params.length === 0) {
|
638 |
+
params.push({});
|
639 |
+
}
|
640 |
+
|
641 |
+
// Set the `_type` of the first object to the event
|
642 |
+
params[0]._type = event;
|
643 |
+
|
644 |
if (event in this.listeners) {
|
645 |
this.invoke(this.listeners[event], slice.call(arguments, 1));
|
646 |
}
|
772 |
$element.append($nodes);
|
773 |
};
|
774 |
|
775 |
+
// Cache objects in Utils.__cache instead of $.data (see #4346)
|
776 |
+
Utils.__cache = {};
|
777 |
+
|
778 |
+
var id = 0;
|
779 |
+
Utils.GetUniqueElementId = function (element) {
|
780 |
+
// Get a unique element Id. If element has no id,
|
781 |
+
// creates a new unique number, stores it in the id
|
782 |
+
// attribute and returns the new id.
|
783 |
+
// If an id already exists, it simply returns it.
|
784 |
+
|
785 |
+
var select2Id = element.getAttribute('data-select2-id');
|
786 |
+
if (select2Id == null) {
|
787 |
+
// If element has id, use it.
|
788 |
+
if (element.id) {
|
789 |
+
select2Id = element.id;
|
790 |
+
element.setAttribute('data-select2-id', select2Id);
|
791 |
+
} else {
|
792 |
+
element.setAttribute('data-select2-id', ++id);
|
793 |
+
select2Id = id.toString();
|
794 |
+
}
|
795 |
+
}
|
796 |
+
return select2Id;
|
797 |
+
};
|
798 |
+
|
799 |
+
Utils.StoreData = function (element, name, value) {
|
800 |
+
// Stores an item in the cache for a specified element.
|
801 |
+
// name is the cache key.
|
802 |
+
var id = Utils.GetUniqueElementId(element);
|
803 |
+
if (!Utils.__cache[id]) {
|
804 |
+
Utils.__cache[id] = {};
|
805 |
+
}
|
806 |
+
|
807 |
+
Utils.__cache[id][name] = value;
|
808 |
+
};
|
809 |
+
|
810 |
+
Utils.GetData = function (element, name) {
|
811 |
+
// Retrieves a value from the cache by its key (name)
|
812 |
+
// name is optional. If no name specified, return
|
813 |
+
// all cache items for the specified element.
|
814 |
+
// and for a specified element.
|
815 |
+
var id = Utils.GetUniqueElementId(element);
|
816 |
+
if (name) {
|
817 |
+
if (Utils.__cache[id]) {
|
818 |
+
if (Utils.__cache[id][name] != null) {
|
819 |
+
return Utils.__cache[id][name];
|
820 |
+
}
|
821 |
+
return $(element).data(name); // Fallback to HTML5 data attribs.
|
822 |
+
}
|
823 |
+
return $(element).data(name); // Fallback to HTML5 data attribs.
|
824 |
+
} else {
|
825 |
+
return Utils.__cache[id];
|
826 |
+
}
|
827 |
+
};
|
828 |
+
|
829 |
+
Utils.RemoveData = function (element) {
|
830 |
+
// Removes all cached items for a specified element.
|
831 |
+
var id = Utils.GetUniqueElementId(element);
|
832 |
+
if (Utils.__cache[id] != null) {
|
833 |
+
delete Utils.__cache[id];
|
834 |
+
}
|
835 |
+
|
836 |
+
element.removeAttribute('data-select2-id');
|
837 |
+
};
|
838 |
+
|
839 |
return Utils;
|
840 |
});
|
841 |
|
855 |
|
856 |
Results.prototype.render = function () {
|
857 |
var $results = $(
|
858 |
+
'<ul class="select2-results__options" role="listbox"></ul>'
|
859 |
);
|
860 |
|
861 |
if (this.options.get('multiple')) {
|
878 |
this.hideLoading();
|
879 |
|
880 |
var $message = $(
|
881 |
+
'<li role="alert" aria-live="assertive"' +
|
882 |
' class="select2-results__option"></li>'
|
883 |
);
|
884 |
|
938 |
return sorter(data);
|
939 |
};
|
940 |
|
941 |
+
Results.prototype.highlightFirstItem = function () {
|
942 |
+
var $options = this.$results
|
943 |
+
.find('.select2-results__option[aria-selected]');
|
944 |
+
|
945 |
+
var $selected = $options.filter('[aria-selected=true]');
|
946 |
+
|
947 |
+
// Check if there are any selected options
|
948 |
+
if ($selected.length > 0) {
|
949 |
+
// If there are selected options, highlight the first
|
950 |
+
$selected.first().trigger('mouseenter');
|
951 |
+
} else {
|
952 |
+
// If there are no selected options, highlight the first option
|
953 |
+
// in the dropdown
|
954 |
+
$options.first().trigger('mouseenter');
|
955 |
+
}
|
956 |
+
|
957 |
+
this.ensureHighlightVisible();
|
958 |
+
};
|
959 |
+
|
960 |
Results.prototype.setClasses = function () {
|
961 |
var self = this;
|
962 |
|
971 |
$options.each(function () {
|
972 |
var $option = $(this);
|
973 |
|
974 |
+
var item = Utils.GetData(this, 'data');
|
975 |
|
976 |
// id needs to be converted to a string when comparing
|
977 |
var id = '' + item.id;
|
984 |
}
|
985 |
});
|
986 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
});
|
988 |
};
|
989 |
|
1012 |
option.className = 'select2-results__option';
|
1013 |
|
1014 |
var attrs = {
|
1015 |
+
'role': 'option',
|
1016 |
'aria-selected': 'false'
|
1017 |
};
|
1018 |
|
1019 |
+
var matches = window.Element.prototype.matches ||
|
1020 |
+
window.Element.prototype.msMatchesSelector ||
|
1021 |
+
window.Element.prototype.webkitMatchesSelector;
|
1022 |
+
|
1023 |
+
if ((data.element != null && matches.call(data.element, ':disabled')) ||
|
1024 |
+
(data.element == null && data.disabled)) {
|
1025 |
delete attrs['aria-selected'];
|
1026 |
attrs['aria-disabled'] = 'true';
|
1027 |
}
|
1081 |
this.template(data, option);
|
1082 |
}
|
1083 |
|
1084 |
+
Utils.StoreData(option, 'data', data);
|
1085 |
|
1086 |
return option;
|
1087 |
};
|
1099 |
|
1100 |
if (container.isOpen()) {
|
1101 |
self.setClasses();
|
1102 |
+
self.highlightFirstItem();
|
1103 |
}
|
1104 |
});
|
1105 |
|
1122 |
}
|
1123 |
|
1124 |
self.setClasses();
|
1125 |
+
|
1126 |
+
if (self.options.get('scrollAfterSelect')) {
|
1127 |
+
self.highlightFirstItem();
|
1128 |
+
}
|
1129 |
});
|
1130 |
|
1131 |
container.on('unselect', function () {
|
1134 |
}
|
1135 |
|
1136 |
self.setClasses();
|
1137 |
+
|
1138 |
+
if (self.options.get('scrollAfterSelect')) {
|
1139 |
+
self.highlightFirstItem();
|
1140 |
+
}
|
1141 |
});
|
1142 |
|
1143 |
container.on('open', function () {
|
1173 |
return;
|
1174 |
}
|
1175 |
|
1176 |
+
var data = Utils.GetData($highlighted[0], 'data');
|
1177 |
|
1178 |
if ($highlighted.attr('aria-selected') == 'true') {
|
1179 |
self.trigger('close', {});
|
1191 |
|
1192 |
var currentIndex = $options.index($highlighted);
|
1193 |
|
1194 |
+
// If we are already at the top, don't move further
|
1195 |
+
// If no options, currentIndex will be -1
|
1196 |
+
if (currentIndex <= 0) {
|
1197 |
return;
|
1198 |
}
|
1199 |
|
1286 |
function (evt) {
|
1287 |
var $this = $(this);
|
1288 |
|
1289 |
+
var data = Utils.GetData(this, 'data');
|
1290 |
|
1291 |
if ($this.attr('aria-selected') === 'true') {
|
1292 |
if (self.options.get('multiple')) {
|
1309 |
|
1310 |
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
|
1311 |
function (evt) {
|
1312 |
+
var data = Utils.GetData(this, 'data');
|
1313 |
|
1314 |
self.getHighlightedResults()
|
1315 |
.removeClass('select2-results__option--highlighted');
|
1424 |
|
1425 |
this._tabindex = 0;
|
1426 |
|
1427 |
+
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
|
1428 |
+
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
|
1429 |
} else if (this.$element.attr('tabindex') != null) {
|
1430 |
this._tabindex = this.$element.attr('tabindex');
|
1431 |
}
|
1432 |
|
1433 |
$selection.attr('title', this.$element.attr('title'));
|
1434 |
$selection.attr('tabindex', this._tabindex);
|
1435 |
+
$selection.attr('aria-disabled', 'false');
|
1436 |
|
1437 |
this.$selection = $selection;
|
1438 |
|
1442 |
BaseSelection.prototype.bind = function (container, $container) {
|
1443 |
var self = this;
|
1444 |
|
|
|
1445 |
var resultsId = container.id + '-results';
|
1446 |
|
1447 |
this.container = container;
|
1484 |
self.$selection.removeAttr('aria-activedescendant');
|
1485 |
self.$selection.removeAttr('aria-owns');
|
1486 |
|
1487 |
+
self.$selection.trigger('focus');
|
1488 |
|
1489 |
self._detachCloseHandler(container);
|
1490 |
});
|
1491 |
|
1492 |
container.on('enable', function () {
|
1493 |
self.$selection.attr('tabindex', self._tabindex);
|
1494 |
+
self.$selection.attr('aria-disabled', 'false');
|
1495 |
});
|
1496 |
|
1497 |
container.on('disable', function () {
|
1498 |
self.$selection.attr('tabindex', '-1');
|
1499 |
+
self.$selection.attr('aria-disabled', 'true');
|
1500 |
});
|
1501 |
};
|
1502 |
|
1519 |
};
|
1520 |
|
1521 |
BaseSelection.prototype._attachCloseHandler = function (container) {
|
|
|
1522 |
|
1523 |
$(document.body).on('mousedown.select2.' + container.id, function (e) {
|
1524 |
var $target = $(e.target);
|
1528 |
var $all = $('.select2.select2-container--open');
|
1529 |
|
1530 |
$all.each(function () {
|
|
|
|
|
1531 |
if (this == $select[0]) {
|
1532 |
return;
|
1533 |
}
|
1534 |
|
1535 |
+
var $element = Utils.GetData(this, 'element');
|
1536 |
|
1537 |
$element.select2('close');
|
1538 |
});
|
1556 |
throw new Error('The `update` method must be defined in child classes.');
|
1557 |
};
|
1558 |
|
1559 |
+
/**
|
1560 |
+
* Helper method to abstract the "enabled" (not "disabled") state of this
|
1561 |
+
* object.
|
1562 |
+
*
|
1563 |
+
* @return {true} if the instance is not disabled.
|
1564 |
+
* @return {false} if the instance is disabled.
|
1565 |
+
*/
|
1566 |
+
BaseSelection.prototype.isEnabled = function () {
|
1567 |
+
return !this.isDisabled();
|
1568 |
+
};
|
1569 |
+
|
1570 |
+
/**
|
1571 |
+
* Helper method to abstract the "disabled" state of this object.
|
1572 |
+
*
|
1573 |
+
* @return {true} if the disabled option is true.
|
1574 |
+
* @return {false} if the disabled option is false.
|
1575 |
+
*/
|
1576 |
+
BaseSelection.prototype.isDisabled = function () {
|
1577 |
+
return this.options.get('disabled');
|
1578 |
+
};
|
1579 |
+
|
1580 |
return BaseSelection;
|
1581 |
});
|
1582 |
|
1614 |
|
1615 |
var id = container.id + '-container';
|
1616 |
|
1617 |
+
this.$selection.find('.select2-selection__rendered')
|
1618 |
+
.attr('id', id)
|
1619 |
+
.attr('role', 'textbox')
|
1620 |
+
.attr('aria-readonly', 'true');
|
1621 |
this.$selection.attr('aria-labelledby', id);
|
1622 |
|
1623 |
this.$selection.on('mousedown', function (evt) {
|
1639 |
// User exits the container
|
1640 |
});
|
1641 |
|
1642 |
+
container.on('focus', function (evt) {
|
1643 |
+
if (!container.isOpen()) {
|
1644 |
+
self.$selection.trigger('focus');
|
1645 |
+
}
|
1646 |
});
|
1647 |
};
|
1648 |
|
1649 |
SingleSelection.prototype.clear = function () {
|
1650 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1651 |
+
$rendered.empty();
|
1652 |
+
$rendered.removeAttr('title'); // clear tooltip on empty
|
1653 |
};
|
1654 |
|
1655 |
SingleSelection.prototype.display = function (data, container) {
|
1675 |
var formatted = this.display(selection, $rendered);
|
1676 |
|
1677 |
$rendered.empty().append(formatted);
|
1678 |
+
|
1679 |
+
var title = selection.title || selection.text;
|
1680 |
+
|
1681 |
+
if (title) {
|
1682 |
+
$rendered.attr('title', title);
|
1683 |
+
} else {
|
1684 |
+
$rendered.removeAttr('title');
|
1685 |
+
}
|
1686 |
};
|
1687 |
|
1688 |
return SingleSelection;
|
1727 |
'.select2-selection__choice__remove',
|
1728 |
function (evt) {
|
1729 |
// Ignore the event if it is disabled
|
1730 |
+
if (self.isDisabled()) {
|
1731 |
return;
|
1732 |
}
|
1733 |
|
1734 |
var $remove = $(this);
|
1735 |
var $selection = $remove.parent();
|
1736 |
|
1737 |
+
var data = Utils.GetData($selection[0], 'data');
|
1738 |
|
1739 |
self.trigger('unselect', {
|
1740 |
originalEvent: evt,
|
1745 |
};
|
1746 |
|
1747 |
MultipleSelection.prototype.clear = function () {
|
1748 |
+
var $rendered = this.$selection.find('.select2-selection__rendered');
|
1749 |
+
$rendered.empty();
|
1750 |
+
$rendered.removeAttr('title');
|
1751 |
};
|
1752 |
|
1753 |
MultipleSelection.prototype.display = function (data, container) {
|
1785 |
var formatted = this.display(selection, $selection);
|
1786 |
|
1787 |
$selection.append(formatted);
|
|
|
1788 |
|
1789 |
+
var title = selection.title || selection.text;
|
1790 |
+
|
1791 |
+
if (title) {
|
1792 |
+
$selection.attr('title', title);
|
1793 |
+
}
|
1794 |
+
|
1795 |
+
Utils.StoreData($selection[0], 'data', selection);
|
1796 |
|
1797 |
$selections.push($selection);
|
1798 |
}
|
1857 |
|
1858 |
S2.define('select2/selection/allowClear',[
|
1859 |
'jquery',
|
1860 |
+
'../keys',
|
1861 |
+
'../utils'
|
1862 |
+
], function ($, KEYS, Utils) {
|
1863 |
function AllowClear () { }
|
1864 |
|
1865 |
AllowClear.prototype.bind = function (decorated, container, $container) {
|
1888 |
|
1889 |
AllowClear.prototype._handleClear = function (_, evt) {
|
1890 |
// Ignore the event if it is disabled
|
1891 |
+
if (this.isDisabled()) {
|
1892 |
return;
|
1893 |
}
|
1894 |
|
1901 |
|
1902 |
evt.stopPropagation();
|
1903 |
|
1904 |
+
var data = Utils.GetData($clear[0], 'data');
|
1905 |
+
|
1906 |
+
var previousVal = this.$element.val();
|
1907 |
+
this.$element.val(this.placeholder.id);
|
1908 |
+
|
1909 |
+
var unselectData = {
|
1910 |
+
data: data
|
1911 |
+
};
|
1912 |
+
this.trigger('clear', unselectData);
|
1913 |
+
if (unselectData.prevented) {
|
1914 |
+
this.$element.val(previousVal);
|
1915 |
+
return;
|
1916 |
+
}
|
1917 |
|
1918 |
for (var d = 0; d < data.length; d++) {
|
1919 |
+
unselectData = {
|
1920 |
data: data[d]
|
1921 |
};
|
1922 |
|
1926 |
|
1927 |
// If the event was prevented, don't clear it out.
|
1928 |
if (unselectData.prevented) {
|
1929 |
+
this.$element.val(previousVal);
|
1930 |
return;
|
1931 |
}
|
1932 |
}
|
1933 |
|
1934 |
+
this.$element.trigger('input').trigger('change');
|
1935 |
|
1936 |
this.trigger('toggle', {});
|
1937 |
};
|
1954 |
return;
|
1955 |
}
|
1956 |
|
1957 |
+
var removeAll = this.options.get('translations').get('removeAllItems');
|
1958 |
+
|
1959 |
var $remove = $(
|
1960 |
+
'<span class="select2-selection__clear" title="' + removeAll() +'">' +
|
1961 |
'×' +
|
1962 |
'</span>'
|
1963 |
);
|
1964 |
+
Utils.StoreData($remove[0], 'data', data);
|
1965 |
|
1966 |
this.$selection.find('.select2-selection__rendered').prepend($remove);
|
1967 |
};
|
1982 |
var $search = $(
|
1983 |
'<li class="select2-search select2-search--inline">' +
|
1984 |
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
1985 |
+
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
1986 |
+
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
1987 |
'</li>'
|
1988 |
);
|
1989 |
|
2000 |
Search.prototype.bind = function (decorated, container, $container) {
|
2001 |
var self = this;
|
2002 |
|
2003 |
+
var resultsId = container.id + '-results';
|
2004 |
+
|
2005 |
decorated.call(this, container, $container);
|
2006 |
|
2007 |
container.on('open', function () {
|
2008 |
+
self.$search.attr('aria-controls', resultsId);
|
2009 |
self.$search.trigger('focus');
|
2010 |
});
|
2011 |
|
2012 |
container.on('close', function () {
|
2013 |
self.$search.val('');
|
2014 |
+
self.$search.removeAttr('aria-controls');
|
2015 |
self.$search.removeAttr('aria-activedescendant');
|
2016 |
self.$search.trigger('focus');
|
2017 |
});
|
2031 |
});
|
2032 |
|
2033 |
container.on('results:focus', function (params) {
|
2034 |
+
if (params.data._resultId) {
|
2035 |
+
self.$search.attr('aria-activedescendant', params.data._resultId);
|
2036 |
+
} else {
|
2037 |
+
self.$search.removeAttr('aria-activedescendant');
|
2038 |
+
}
|
2039 |
});
|
2040 |
|
2041 |
this.$selection.on('focusin', '.select2-search--inline', function (evt) {
|
2060 |
.prev('.select2-selection__choice');
|
2061 |
|
2062 |
if ($previousChoice.length > 0) {
|
2063 |
+
var item = Utils.GetData($previousChoice[0], 'data');
|
2064 |
|
2065 |
self.searchRemoveChoice(item);
|
2066 |
|
2069 |
}
|
2070 |
});
|
2071 |
|
2072 |
+
this.$selection.on('click', '.select2-search--inline', function (evt) {
|
2073 |
+
if (self.$search.val()) {
|
2074 |
+
evt.stopPropagation();
|
2075 |
+
}
|
2076 |
+
});
|
2077 |
+
|
2078 |
// Try to detect the IE version should the `documentMode` property that
|
2079 |
// is stored on the document. This is only implemented in IE and is
|
2080 |
// slightly cleaner than doing a user agent check.
|
2160 |
|
2161 |
this.resizeSearch();
|
2162 |
if (searchHadFocus) {
|
2163 |
+
this.$search.trigger('focus');
|
2164 |
}
|
2165 |
};
|
2166 |
|
2193 |
var width = '';
|
2194 |
|
2195 |
if (this.$search.attr('placeholder') !== '') {
|
2196 |
+
width = this.$selection.find('.select2-selection__rendered').width();
|
2197 |
} else {
|
2198 |
var minimumWidth = this.$search.val().length + 1;
|
2199 |
|
2217 |
'open', 'opening',
|
2218 |
'close', 'closing',
|
2219 |
'select', 'selecting',
|
2220 |
+
'unselect', 'unselecting',
|
2221 |
+
'clear', 'clearing'
|
2222 |
];
|
2223 |
|
2224 |
+
var preventableEvents = [
|
2225 |
+
'opening', 'closing', 'selecting', 'unselecting', 'clearing'
|
2226 |
+
];
|
2227 |
|
2228 |
decorated.call(this, container, $container);
|
2229 |
|
2556 |
'\u019F': 'O',
|
2557 |
'\uA74A': 'O',
|
2558 |
'\uA74C': 'O',
|
2559 |
+
'\u0152': 'OE',
|
2560 |
'\u01A2': 'OI',
|
2561 |
'\uA74E': 'OO',
|
2562 |
'\u0222': 'OU',
|
2966 |
'\uA74B': 'o',
|
2967 |
'\uA74D': 'o',
|
2968 |
'\u0275': 'o',
|
2969 |
+
'\u0153': 'oe',
|
2970 |
'\u01A3': 'oi',
|
2971 |
'\u0223': 'ou',
|
2972 |
'\uA74F': 'oo',
|
3135 |
'\u03CD': '\u03C5',
|
3136 |
'\u03CB': '\u03C5',
|
3137 |
'\u03B0': '\u03C5',
|
3138 |
+
'\u03CE': '\u03C9',
|
3139 |
+
'\u03C2': '\u03C3',
|
3140 |
+
'\u2019': '\''
|
3141 |
};
|
3142 |
|
3143 |
return diacritics;
|
3222 |
if ($(data.element).is('option')) {
|
3223 |
data.element.selected = true;
|
3224 |
|
3225 |
+
this.$element.trigger('input').trigger('change');
|
3226 |
|
3227 |
return;
|
3228 |
}
|
3243 |
}
|
3244 |
|
3245 |
self.$element.val(val);
|
3246 |
+
self.$element.trigger('input').trigger('change');
|
3247 |
});
|
3248 |
} else {
|
3249 |
var val = data.id;
|
3250 |
|
3251 |
this.$element.val(val);
|
3252 |
+
this.$element.trigger('input').trigger('change');
|
3253 |
}
|
3254 |
};
|
3255 |
|
3265 |
if ($(data.element).is('option')) {
|
3266 |
data.element.selected = false;
|
3267 |
|
3268 |
+
this.$element.trigger('input').trigger('change');
|
3269 |
|
3270 |
return;
|
3271 |
}
|
3283 |
|
3284 |
self.$element.val(val);
|
3285 |
|
3286 |
+
self.$element.trigger('input').trigger('change');
|
3287 |
});
|
3288 |
};
|
3289 |
|
3305 |
// Remove anything added to child elements
|
3306 |
this.$element.find('*').each(function () {
|
3307 |
// Remove any custom data set by Select2
|
3308 |
+
Utils.RemoveData(this);
|
3309 |
});
|
3310 |
};
|
3311 |
|
3356 |
}
|
3357 |
}
|
3358 |
|
3359 |
+
if (data.id !== undefined) {
|
3360 |
option.value = data.id;
|
3361 |
}
|
3362 |
|
3378 |
normalizedData.element = option;
|
3379 |
|
3380 |
// Override the option's data with the combined data
|
3381 |
+
Utils.StoreData(option, 'data', normalizedData);
|
3382 |
|
3383 |
return $option;
|
3384 |
};
|
3386 |
SelectAdapter.prototype.item = function ($option) {
|
3387 |
var data = {};
|
3388 |
|
3389 |
+
data = Utils.GetData($option[0], 'data');
|
3390 |
|
3391 |
if (data != null) {
|
3392 |
return data;
|
3424 |
data = this._normalizeItem(data);
|
3425 |
data.element = $option[0];
|
3426 |
|
3427 |
+
Utils.StoreData($option[0], 'data', data);
|
3428 |
|
3429 |
return data;
|
3430 |
};
|
3431 |
|
3432 |
SelectAdapter.prototype._normalizeItem = function (item) {
|
3433 |
+
if (item !== Object(item)) {
|
3434 |
item = {
|
3435 |
id: item,
|
3436 |
text: item
|
3476 |
'jquery'
|
3477 |
], function (SelectAdapter, Utils, $) {
|
3478 |
function ArrayAdapter ($element, options) {
|
3479 |
+
this._dataToConvert = options.get('data') || [];
|
3480 |
|
3481 |
ArrayAdapter.__super__.constructor.call(this, $element, options);
|
|
|
|
|
3482 |
}
|
3483 |
|
3484 |
Utils.Extend(ArrayAdapter, SelectAdapter);
|
3485 |
|
3486 |
+
ArrayAdapter.prototype.bind = function (container, $container) {
|
3487 |
+
ArrayAdapter.__super__.bind.call(this, container, $container);
|
3488 |
+
|
3489 |
+
this.addOptions(this.convertToOptions(this._dataToConvert));
|
3490 |
+
};
|
3491 |
+
|
3492 |
ArrayAdapter.prototype.select = function (data) {
|
3493 |
var $option = this.$element.find('option').filter(function (i, elm) {
|
3494 |
return elm.value == data.id.toString();
|
3636 |
|
3637 |
callback(results);
|
3638 |
}, function () {
|
3639 |
+
// Attempt to detect if a request was aborted
|
3640 |
+
// Only works if the transport exposes a status property
|
3641 |
+
if ('status' in $request &&
|
3642 |
+
($request.status === 0 || $request.status === '0')) {
|
3643 |
+
return;
|
3644 |
+
}
|
3645 |
+
|
3646 |
self.trigger('results:message', {
|
3647 |
message: 'errorLoading'
|
3648 |
});
|
3651 |
self._request = $request;
|
3652 |
}
|
3653 |
|
3654 |
+
if (this.ajaxOptions.delay && params.term != null) {
|
3655 |
if (this._queryTimeout) {
|
3656 |
window.clearTimeout(this._queryTimeout);
|
3657 |
}
|
3720 |
}, true)
|
3721 |
);
|
3722 |
|
3723 |
+
var optionText = (option.text || '').toUpperCase();
|
3724 |
+
var paramsTerm = (params.term || '').toUpperCase();
|
3725 |
+
|
3726 |
+
var checkText = optionText === paramsTerm;
|
3727 |
|
3728 |
if (checkText || checkChildren) {
|
3729 |
if (child) {
|
3778 |
};
|
3779 |
|
3780 |
Tags.prototype._removeOldTags = function (_) {
|
|
|
|
|
3781 |
var $options = this.$element.find('option[data-select2-tag]');
|
3782 |
|
3783 |
$options.each(function () {
|
3815 |
Tokenizer.prototype.query = function (decorated, params, callback) {
|
3816 |
var self = this;
|
3817 |
|
3818 |
+
function createAndSelect (data) {
|
3819 |
+
// Normalize the data object so we can use it for checks
|
3820 |
+
var item = self._normalizeItem(data);
|
3821 |
+
|
3822 |
+
// Check if the data object already exists as a tag
|
3823 |
+
// Select it if it doesn't
|
3824 |
+
var $existingOptions = self.$element.find('option').filter(function () {
|
3825 |
+
return $(this).val() === item.id;
|
3826 |
+
});
|
3827 |
+
|
3828 |
+
// If an existing option wasn't found for it, create the option
|
3829 |
+
if (!$existingOptions.length) {
|
3830 |
+
var $option = self.option(item);
|
3831 |
+
$option.attr('data-select2-tag', true);
|
3832 |
+
|
3833 |
+
self._removeOldTags();
|
3834 |
+
self.addOptions([$option]);
|
3835 |
+
}
|
3836 |
+
|
3837 |
+
// Select the item, now that we know there is an option for it
|
3838 |
+
select(item);
|
3839 |
+
}
|
3840 |
+
|
3841 |
function select (data) {
|
3842 |
self.trigger('select', {
|
3843 |
data: data
|
3846 |
|
3847 |
params.term = params.term || '';
|
3848 |
|
3849 |
+
var tokenData = this.tokenizer(params, this.options, createAndSelect);
|
3850 |
|
3851 |
if (tokenData.term !== params.term) {
|
3852 |
// Replace the search term if we have the search box
|
3853 |
if (this.$search.length) {
|
3854 |
this.$search.val(tokenData.term);
|
3855 |
+
this.$search.trigger('focus');
|
3856 |
}
|
3857 |
|
3858 |
params.term = tokenData.term;
|
3981 |
decorated.call(this, $e, options);
|
3982 |
}
|
3983 |
|
3984 |
+
MaximumSelectionLength.prototype.bind =
|
3985 |
+
function (decorated, container, $container) {
|
3986 |
+
var self = this;
|
3987 |
+
|
3988 |
+
decorated.call(this, container, $container);
|
3989 |
+
|
3990 |
+
container.on('select', function () {
|
3991 |
+
self._checkIfMaximumSelected();
|
3992 |
+
});
|
3993 |
+
};
|
3994 |
+
|
3995 |
MaximumSelectionLength.prototype.query =
|
3996 |
function (decorated, params, callback) {
|
3997 |
var self = this;
|
3998 |
|
3999 |
+
this._checkIfMaximumSelected(function () {
|
4000 |
+
decorated.call(self, params, callback);
|
4001 |
+
});
|
4002 |
+
};
|
4003 |
+
|
4004 |
+
MaximumSelectionLength.prototype._checkIfMaximumSelected =
|
4005 |
+
function (_, successCallback) {
|
4006 |
+
var self = this;
|
4007 |
+
|
4008 |
this.current(function (currentData) {
|
4009 |
var count = currentData != null ? currentData.length : 0;
|
4010 |
if (self.maximumSelectionLength > 0 &&
|
4017 |
});
|
4018 |
return;
|
4019 |
}
|
4020 |
+
|
4021 |
+
if (successCallback) {
|
4022 |
+
successCallback();
|
4023 |
+
}
|
4024 |
});
|
4025 |
};
|
4026 |
|
4059 |
};
|
4060 |
|
4061 |
Dropdown.prototype.position = function ($dropdown, $container) {
|
4062 |
+
// Should be implemented in subclasses
|
4063 |
};
|
4064 |
|
4065 |
Dropdown.prototype.destroy = function () {
|
4082 |
var $search = $(
|
4083 |
'<span class="select2-search select2-search--dropdown">' +
|
4084 |
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
4085 |
+
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
4086 |
+
' spellcheck="false" role="searchbox" aria-autocomplete="list" />' +
|
4087 |
'</span>'
|
4088 |
);
|
4089 |
|
4098 |
Search.prototype.bind = function (decorated, container, $container) {
|
4099 |
var self = this;
|
4100 |
|
4101 |
+
var resultsId = container.id + '-results';
|
4102 |
+
|
4103 |
decorated.call(this, container, $container);
|
4104 |
|
4105 |
this.$search.on('keydown', function (evt) {
|
4122 |
|
4123 |
container.on('open', function () {
|
4124 |
self.$search.attr('tabindex', 0);
|
4125 |
+
self.$search.attr('aria-controls', resultsId);
|
4126 |
|
4127 |
+
self.$search.trigger('focus');
|
4128 |
|
4129 |
window.setTimeout(function () {
|
4130 |
+
self.$search.trigger('focus');
|
4131 |
}, 0);
|
4132 |
});
|
4133 |
|
4134 |
container.on('close', function () {
|
4135 |
self.$search.attr('tabindex', -1);
|
4136 |
+
self.$search.removeAttr('aria-controls');
|
4137 |
+
self.$search.removeAttr('aria-activedescendant');
|
4138 |
|
4139 |
self.$search.val('');
|
4140 |
+
self.$search.trigger('blur');
|
4141 |
+
});
|
4142 |
+
|
4143 |
+
container.on('focus', function () {
|
4144 |
+
if (!container.isOpen()) {
|
4145 |
+
self.$search.trigger('focus');
|
4146 |
+
}
|
4147 |
});
|
4148 |
|
4149 |
container.on('results:all', function (params) {
|
4157 |
}
|
4158 |
}
|
4159 |
});
|
4160 |
+
|
4161 |
+
container.on('results:focus', function (params) {
|
4162 |
+
if (params.data._resultId) {
|
4163 |
+
self.$search.attr('aria-activedescendant', params.data._resultId);
|
4164 |
+
} else {
|
4165 |
+
self.$search.removeAttr('aria-activedescendant');
|
4166 |
+
}
|
4167 |
+
});
|
4168 |
};
|
4169 |
|
4170 |
Search.prototype.handleSearch = function (evt) {
|
4249 |
|
4250 |
if (this.showLoadingMore(data)) {
|
4251 |
this.$results.append(this.$loadingMore);
|
4252 |
+
this.loadMoreIfNeeded();
|
4253 |
}
|
4254 |
};
|
4255 |
|
4268 |
self.loading = true;
|
4269 |
});
|
4270 |
|
4271 |
+
this.$results.on('scroll', this.loadMoreIfNeeded.bind(this));
|
4272 |
+
};
|
|
|
|
|
|
|
4273 |
|
4274 |
+
InfiniteScroll.prototype.loadMoreIfNeeded = function () {
|
4275 |
+
var isLoadMoreVisible = $.contains(
|
4276 |
+
document.documentElement,
|
4277 |
+
this.$loadingMore[0]
|
4278 |
+
);
|
4279 |
|
4280 |
+
if (this.loading || !isLoadMoreVisible) {
|
4281 |
+
return;
|
4282 |
+
}
|
|
|
4283 |
|
4284 |
+
var currentOffset = this.$results.offset().top +
|
4285 |
+
this.$results.outerHeight(false);
|
4286 |
+
var loadingMoreOffset = this.$loadingMore.offset().top +
|
4287 |
+
this.$loadingMore.outerHeight(false);
|
4288 |
+
|
4289 |
+
if (currentOffset + 50 >= loadingMoreOffset) {
|
4290 |
+
this.loadMore();
|
4291 |
+
}
|
4292 |
};
|
4293 |
|
4294 |
InfiniteScroll.prototype.loadMore = function () {
|
4309 |
var $option = $(
|
4310 |
'<li ' +
|
4311 |
'class="select2-results__option select2-results__option--load-more"' +
|
4312 |
+
'role="option" aria-disabled="true"></li>'
|
4313 |
);
|
4314 |
|
4315 |
var message = this.options.get('translations').get('loadingMore');
|
4327 |
'../utils'
|
4328 |
], function ($, Utils) {
|
4329 |
function AttachBody (decorated, $element, options) {
|
4330 |
+
this.$dropdownParent = $(options.get('dropdownParent') || document.body);
|
4331 |
|
4332 |
decorated.call(this, $element, options);
|
4333 |
}
|
4335 |
AttachBody.prototype.bind = function (decorated, container, $container) {
|
4336 |
var self = this;
|
4337 |
|
|
|
|
|
4338 |
decorated.call(this, container, $container);
|
4339 |
|
4340 |
container.on('open', function () {
|
4341 |
self._showDropdown();
|
4342 |
self._attachPositioningHandler(container);
|
4343 |
|
4344 |
+
// Must bind after the results handlers to ensure correct sizing
|
4345 |
+
self._bindContainerResultHandlers(container);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4346 |
});
|
4347 |
|
4348 |
container.on('close', function () {
|
4391 |
this.$dropdownContainer.detach();
|
4392 |
};
|
4393 |
|
4394 |
+
AttachBody.prototype._bindContainerResultHandlers =
|
4395 |
+
function (decorated, container) {
|
4396 |
+
|
4397 |
+
// These should only be bound once
|
4398 |
+
if (this._containerResultsHandlersBound) {
|
4399 |
+
return;
|
4400 |
+
}
|
4401 |
+
|
4402 |
+
var self = this;
|
4403 |
+
|
4404 |
+
container.on('results:all', function () {
|
4405 |
+
self._positionDropdown();
|
4406 |
+
self._resizeDropdown();
|
4407 |
+
});
|
4408 |
+
|
4409 |
+
container.on('results:append', function () {
|
4410 |
+
self._positionDropdown();
|
4411 |
+
self._resizeDropdown();
|
4412 |
+
});
|
4413 |
+
|
4414 |
+
container.on('results:message', function () {
|
4415 |
+
self._positionDropdown();
|
4416 |
+
self._resizeDropdown();
|
4417 |
+
});
|
4418 |
+
|
4419 |
+
container.on('select', function () {
|
4420 |
+
self._positionDropdown();
|
4421 |
+
self._resizeDropdown();
|
4422 |
+
});
|
4423 |
+
|
4424 |
+
container.on('unselect', function () {
|
4425 |
+
self._positionDropdown();
|
4426 |
+
self._resizeDropdown();
|
4427 |
+
});
|
4428 |
+
|
4429 |
+
this._containerResultsHandlersBound = true;
|
4430 |
+
};
|
4431 |
+
|
4432 |
AttachBody.prototype._attachPositioningHandler =
|
4433 |
function (decorated, container) {
|
4434 |
var self = this;
|
4439 |
|
4440 |
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
4441 |
$watchers.each(function () {
|
4442 |
+
Utils.StoreData(this, 'select2-scroll-position', {
|
4443 |
x: $(this).scrollLeft(),
|
4444 |
y: $(this).scrollTop()
|
4445 |
});
|
4446 |
});
|
4447 |
|
4448 |
$watchers.on(scrollEvent, function (ev) {
|
4449 |
+
var position = Utils.GetData(this, 'select2-scroll-position');
|
4450 |
$(this).scrollTop(position.y);
|
4451 |
});
|
4452 |
|
4505 |
top: container.bottom
|
4506 |
};
|
4507 |
|
4508 |
+
// Determine what the parent element is to use for calculating the offset
|
4509 |
var $offsetParent = this.$dropdownParent;
|
4510 |
|
4511 |
+
// For statically positioned elements, we need to get the element
|
4512 |
// that is determining the offset
|
4513 |
if ($offsetParent.css('position') === 'static') {
|
4514 |
$offsetParent = $offsetParent.offsetParent();
|
4515 |
}
|
4516 |
|
4517 |
+
var parentOffset = {
|
4518 |
+
top: 0,
|
4519 |
+
left: 0
|
4520 |
+
};
|
4521 |
+
|
4522 |
+
if (
|
4523 |
+
$.contains(document.body, $offsetParent[0]) ||
|
4524 |
+
$offsetParent[0].isConnected
|
4525 |
+
) {
|
4526 |
+
parentOffset = $offsetParent.offset();
|
4527 |
+
}
|
4528 |
|
4529 |
css.top -= parentOffset.top;
|
4530 |
css.left -= parentOffset.left;
|
4541 |
|
4542 |
if (newDirection == 'above' ||
|
4543 |
(isCurrentlyAbove && newDirection !== 'below')) {
|
4544 |
+
css.top = container.top - parentOffset.top - dropdown.height;
|
4545 |
}
|
4546 |
|
4547 |
if (newDirection != null) {
|
4563 |
|
4564 |
if (this.options.get('dropdownAutoWidth')) {
|
4565 |
css.minWidth = css.width;
|
4566 |
+
css.position = 'relative';
|
4567 |
css.width = 'auto';
|
4568 |
}
|
4569 |
|
4621 |
});
|
4622 |
|
4623 |
S2.define('select2/dropdown/selectOnClose',[
|
4624 |
+
'../utils'
|
4625 |
+
], function (Utils) {
|
4626 |
function SelectOnClose () { }
|
4627 |
|
4628 |
SelectOnClose.prototype.bind = function (decorated, container, $container) {
|
4630 |
|
4631 |
decorated.call(this, container, $container);
|
4632 |
|
4633 |
+
container.on('close', function (params) {
|
4634 |
+
self._handleSelectOnClose(params);
|
4635 |
});
|
4636 |
};
|
4637 |
|
4638 |
+
SelectOnClose.prototype._handleSelectOnClose = function (_, params) {
|
4639 |
+
if (params && params.originalSelect2Event != null) {
|
4640 |
+
var event = params.originalSelect2Event;
|
4641 |
+
|
4642 |
+
// Don't select an item if the close event was triggered from a select or
|
4643 |
+
// unselect event
|
4644 |
+
if (event._type === 'select' || event._type === 'unselect') {
|
4645 |
+
return;
|
4646 |
+
}
|
4647 |
+
}
|
4648 |
+
|
4649 |
var $highlightedResults = this.getHighlightedResults();
|
4650 |
|
4651 |
// Only select highlighted results
|
4653 |
return;
|
4654 |
}
|
4655 |
|
4656 |
+
var data = Utils.GetData($highlightedResults[0], 'data');
|
4657 |
|
4658 |
// Don't re-select already selected resulte
|
4659 |
if (
|
4694 |
var originalEvent = evt.originalEvent;
|
4695 |
|
4696 |
// Don't close if the control key is being held
|
4697 |
+
if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) {
|
4698 |
return;
|
4699 |
}
|
4700 |
|
4701 |
+
this.trigger('close', {
|
4702 |
+
originalEvent: originalEvent,
|
4703 |
+
originalSelect2Event: evt
|
4704 |
+
});
|
4705 |
};
|
4706 |
|
4707 |
return CloseOnSelect;
|
4748 |
},
|
4749 |
searching: function () {
|
4750 |
return 'Searching…';
|
4751 |
+
},
|
4752 |
+
removeAllItems: function () {
|
4753 |
+
return 'Remove all items';
|
4754 |
}
|
4755 |
};
|
4756 |
});
|
4989 |
);
|
4990 |
}
|
4991 |
|
4992 |
+
// If the defaults were not previously applied from an element, it is
|
4993 |
+
// possible for the language option to have not been resolved
|
4994 |
+
options.language = this._resolveLanguage(options.language);
|
|
|
|
|
|
|
4995 |
|
4996 |
+
// Always fall back to English since it will always be complete
|
4997 |
+
options.language.push('en');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4998 |
|
4999 |
+
var uniqueLanguages = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5000 |
|
5001 |
+
for (var l = 0; l < options.language.length; l++) {
|
5002 |
+
var language = options.language[l];
|
|
|
5003 |
|
5004 |
+
if (uniqueLanguages.indexOf(language) === -1) {
|
5005 |
+
uniqueLanguages.push(language);
|
5006 |
}
|
5007 |
+
}
|
5008 |
|
5009 |
+
options.language = uniqueLanguages;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5010 |
|
5011 |
+
options.translations = this._processTranslations(
|
5012 |
+
options.language,
|
5013 |
+
options.debug
|
5014 |
+
);
|
5015 |
|
5016 |
return options;
|
5017 |
};
|
5078 |
debug: false,
|
5079 |
dropdownAutoWidth: false,
|
5080 |
escapeMarkup: Utils.escapeMarkup,
|
5081 |
+
language: {},
|
5082 |
matcher: matcher,
|
5083 |
minimumInputLength: 0,
|
5084 |
maximumInputLength: 0,
|
5085 |
maximumSelectionLength: 0,
|
5086 |
minimumResultsForSearch: 0,
|
5087 |
selectOnClose: false,
|
5088 |
+
scrollAfterSelect: false,
|
5089 |
sorter: function (data) {
|
5090 |
return data;
|
5091 |
},
|
5100 |
};
|
5101 |
};
|
5102 |
|
5103 |
+
Defaults.prototype.applyFromElement = function (options, $element) {
|
5104 |
+
var optionLanguage = options.language;
|
5105 |
+
var defaultLanguage = this.defaults.language;
|
5106 |
+
var elementLanguage = $element.prop('lang');
|
5107 |
+
var parentLanguage = $element.closest('[lang]').prop('lang');
|
5108 |
+
|
5109 |
+
var languages = Array.prototype.concat.call(
|
5110 |
+
this._resolveLanguage(elementLanguage),
|
5111 |
+
this._resolveLanguage(optionLanguage),
|
5112 |
+
this._resolveLanguage(defaultLanguage),
|
5113 |
+
this._resolveLanguage(parentLanguage)
|
5114 |
+
);
|
5115 |
+
|
5116 |
+
options.language = languages;
|
5117 |
+
|
5118 |
+
return options;
|
5119 |
+
};
|
5120 |
+
|
5121 |
+
Defaults.prototype._resolveLanguage = function (language) {
|
5122 |
+
if (!language) {
|
5123 |
+
return [];
|
5124 |
+
}
|
5125 |
+
|
5126 |
+
if ($.isEmptyObject(language)) {
|
5127 |
+
return [];
|
5128 |
+
}
|
5129 |
+
|
5130 |
+
if ($.isPlainObject(language)) {
|
5131 |
+
return [language];
|
5132 |
+
}
|
5133 |
+
|
5134 |
+
var languages;
|
5135 |
+
|
5136 |
+
if (!$.isArray(language)) {
|
5137 |
+
languages = [language];
|
5138 |
+
} else {
|
5139 |
+
languages = language;
|
5140 |
+
}
|
5141 |
+
|
5142 |
+
var resolvedLanguages = [];
|
5143 |
+
|
5144 |
+
for (var l = 0; l < languages.length; l++) {
|
5145 |
+
resolvedLanguages.push(languages[l]);
|
5146 |
+
|
5147 |
+
if (typeof languages[l] === 'string' && languages[l].indexOf('-') > 0) {
|
5148 |
+
// Extract the region information if it is included
|
5149 |
+
var languageParts = languages[l].split('-');
|
5150 |
+
var baseLanguage = languageParts[0];
|
5151 |
+
|
5152 |
+
resolvedLanguages.push(baseLanguage);
|
5153 |
+
}
|
5154 |
+
}
|
5155 |
+
|
5156 |
+
return resolvedLanguages;
|
5157 |
+
};
|
5158 |
+
|
5159 |
+
Defaults.prototype._processTranslations = function (languages, debug) {
|
5160 |
+
var translations = new Translation();
|
5161 |
+
|
5162 |
+
for (var l = 0; l < languages.length; l++) {
|
5163 |
+
var languageData = new Translation();
|
5164 |
+
|
5165 |
+
var language = languages[l];
|
5166 |
+
|
5167 |
+
if (typeof language === 'string') {
|
5168 |
+
try {
|
5169 |
+
// Try to load it with the original name
|
5170 |
+
languageData = Translation.loadPath(language);
|
5171 |
+
} catch (e) {
|
5172 |
+
try {
|
5173 |
+
// If we couldn't load it, check if it wasn't the full path
|
5174 |
+
language = this.defaults.amdLanguageBase + language;
|
5175 |
+
languageData = Translation.loadPath(language);
|
5176 |
+
} catch (ex) {
|
5177 |
+
// The translation could not be loaded at all. Sometimes this is
|
5178 |
+
// because of a configuration problem, other times this can be
|
5179 |
+
// because of how Select2 helps load all possible translation files
|
5180 |
+
if (debug && window.console && console.warn) {
|
5181 |
+
console.warn(
|
5182 |
+
'Select2: The language file for "' + language + '" could ' +
|
5183 |
+
'not be automatically loaded. A fallback will be used instead.'
|
5184 |
+
);
|
5185 |
+
}
|
5186 |
+
}
|
5187 |
+
}
|
5188 |
+
} else if ($.isPlainObject(language)) {
|
5189 |
+
languageData = new Translation(language);
|
5190 |
+
} else {
|
5191 |
+
languageData = language;
|
5192 |
+
}
|
5193 |
+
|
5194 |
+
translations.extend(languageData);
|
5195 |
+
}
|
5196 |
+
|
5197 |
+
return translations;
|
5198 |
+
};
|
5199 |
+
|
5200 |
Defaults.prototype.set = function (key, value) {
|
5201 |
var camelKey = $.camelCase(key);
|
5202 |
|
5205 |
|
5206 |
var convertedData = Utils._convertData(data);
|
5207 |
|
5208 |
+
$.extend(true, this.defaults, convertedData);
|
5209 |
};
|
5210 |
|
5211 |
var defaults = new Defaults();
|
5226 |
this.fromElement($element);
|
5227 |
}
|
5228 |
|
5229 |
+
if ($element != null) {
|
5230 |
+
this.options = Defaults.applyFromElement(this.options, $element);
|
5231 |
+
}
|
5232 |
+
|
5233 |
this.options = Defaults.apply(this.options);
|
5234 |
|
5235 |
if ($element && $element.is('input')) {
|
5253 |
this.options.disabled = $e.prop('disabled');
|
5254 |
}
|
5255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5256 |
if (this.options.dir == null) {
|
5257 |
if ($e.prop('dir')) {
|
5258 |
this.options.dir = $e.prop('dir');
|
5266 |
$e.prop('disabled', this.options.disabled);
|
5267 |
$e.prop('multiple', this.options.multiple);
|
5268 |
|
5269 |
+
if (Utils.GetData($e[0], 'select2Tags')) {
|
5270 |
if (this.options.debug && window.console && console.warn) {
|
5271 |
console.warn(
|
5272 |
'Select2: The `data-select2-tags` attribute has been changed to ' +
|
5275 |
);
|
5276 |
}
|
5277 |
|
5278 |
+
Utils.StoreData($e[0], 'data', Utils.GetData($e[0], 'select2Tags'));
|
5279 |
+
Utils.StoreData($e[0], 'tags', true);
|
5280 |
}
|
5281 |
|
5282 |
+
if (Utils.GetData($e[0], 'ajaxUrl')) {
|
5283 |
if (this.options.debug && window.console && console.warn) {
|
5284 |
console.warn(
|
5285 |
'Select2: The `data-ajax-url` attribute has been changed to ' +
|
5288 |
);
|
5289 |
}
|
5290 |
|
5291 |
+
$e.attr('ajax--url', Utils.GetData($e[0], 'ajaxUrl'));
|
5292 |
+
Utils.StoreData($e[0], 'ajax-Url', Utils.GetData($e[0], 'ajaxUrl'));
|
5293 |
}
|
5294 |
|
5295 |
var dataset = {};
|
5296 |
|
5297 |
+
function upperCaseLetter(_, letter) {
|
5298 |
+
return letter.toUpperCase();
|
5299 |
+
}
|
5300 |
+
|
5301 |
+
// Pre-load all of the attributes which are prefixed with `data-`
|
5302 |
+
for (var attr = 0; attr < $e[0].attributes.length; attr++) {
|
5303 |
+
var attributeName = $e[0].attributes[attr].name;
|
5304 |
+
var prefix = 'data-';
|
5305 |
+
|
5306 |
+
if (attributeName.substr(0, prefix.length) == prefix) {
|
5307 |
+
// Get the contents of the attribute after `data-`
|
5308 |
+
var dataName = attributeName.substring(prefix.length);
|
5309 |
+
|
5310 |
+
// Get the data contents from the consistent source
|
5311 |
+
// This is more than likely the jQuery data helper
|
5312 |
+
var dataValue = Utils.GetData($e[0], dataName);
|
5313 |
+
|
5314 |
+
// camelCase the attribute name to match the spec
|
5315 |
+
var camelDataName = dataName.replace(/-([a-z])/g, upperCaseLetter);
|
5316 |
+
|
5317 |
+
// Store the data attribute contents into the dataset since
|
5318 |
+
dataset[camelDataName] = dataValue;
|
5319 |
+
}
|
5320 |
+
}
|
5321 |
+
|
5322 |
// Prefer the element's `dataset` attribute if it exists
|
5323 |
// jQuery 1.x does not correctly handle data attributes with multiple dashes
|
5324 |
if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {
|
5325 |
+
dataset = $.extend(true, {}, $e[0].dataset, dataset);
|
|
|
|
|
5326 |
}
|
5327 |
|
5328 |
+
// Prefer our internal data cache if it exists
|
5329 |
+
var data = $.extend(true, {}, Utils.GetData($e[0]), dataset);
|
5330 |
|
5331 |
data = Utils._convertData(data);
|
5332 |
|
5363 |
'./keys'
|
5364 |
], function ($, Options, Utils, KEYS) {
|
5365 |
var Select2 = function ($element, options) {
|
5366 |
+
if (Utils.GetData($element[0], 'select2') != null) {
|
5367 |
+
Utils.GetData($element[0], 'select2').destroy();
|
5368 |
}
|
5369 |
|
5370 |
this.$element = $element;
|
5380 |
// Set up the tabindex
|
5381 |
|
5382 |
var tabindex = $element.attr('tabindex') || 0;
|
5383 |
+
Utils.StoreData($element[0], 'old-tabindex', tabindex);
|
5384 |
$element.attr('tabindex', '-1');
|
5385 |
|
5386 |
// Set up containers and adapters
|
5441 |
// Synchronize any monitored attributes
|
5442 |
this._syncAttributes();
|
5443 |
|
5444 |
+
Utils.StoreData($element[0], 'select2', this);
|
5445 |
+
|
5446 |
+
// Ensure backwards compatibility with $element.data('select2').
|
5447 |
$element.data('select2', this);
|
5448 |
};
|
5449 |
|
5520 |
return null;
|
5521 |
}
|
5522 |
|
5523 |
+
if (method == 'computedstyle') {
|
5524 |
+
var computedStyle = window.getComputedStyle($element[0]);
|
5525 |
+
|
5526 |
+
return computedStyle.width;
|
5527 |
+
}
|
5528 |
+
|
5529 |
return method;
|
5530 |
};
|
5531 |
|
5548 |
});
|
5549 |
});
|
5550 |
|
5551 |
+
this.$element.on('focus.select2', function (evt) {
|
5552 |
+
self.trigger('focus', evt);
|
5553 |
+
});
|
5554 |
+
|
5555 |
+
this._syncA = Utils.bind(this._syncAttributes, this);
|
5556 |
+
this._syncS = Utils.bind(this._syncSubtree, this);
|
5557 |
|
5558 |
if (this.$element[0].attachEvent) {
|
5559 |
+
this.$element[0].attachEvent('onpropertychange', this._syncA);
|
5560 |
}
|
5561 |
|
5562 |
var observer = window.MutationObserver ||
|
5566 |
|
5567 |
if (observer != null) {
|
5568 |
this._observer = new observer(function (mutations) {
|
5569 |
+
self._syncA();
|
5570 |
+
self._syncS(null, mutations);
|
5571 |
});
|
5572 |
this._observer.observe(this.$element[0], {
|
5573 |
attributes: true,
|
5574 |
+
childList: true,
|
5575 |
subtree: false
|
5576 |
});
|
5577 |
} else if (this.$element[0].addEventListener) {
|
5578 |
+
this.$element[0].addEventListener(
|
5579 |
+
'DOMAttrModified',
|
5580 |
+
self._syncA,
|
5581 |
+
false
|
5582 |
+
);
|
5583 |
+
this.$element[0].addEventListener(
|
5584 |
+
'DOMNodeInserted',
|
5585 |
+
self._syncS,
|
5586 |
+
false
|
5587 |
+
);
|
5588 |
+
this.$element[0].addEventListener(
|
5589 |
+
'DOMNodeRemoved',
|
5590 |
+
self._syncS,
|
5591 |
+
false
|
5592 |
+
);
|
5593 |
}
|
5594 |
};
|
5595 |
|
5689 |
if (self.isOpen()) {
|
5690 |
if (key === KEYS.ESC || key === KEYS.TAB ||
|
5691 |
(key === KEYS.UP && evt.altKey)) {
|
5692 |
+
self.close(evt);
|
5693 |
|
5694 |
evt.preventDefault();
|
5695 |
} else if (key === KEYS.ENTER) {
|
5723 |
Select2.prototype._syncAttributes = function () {
|
5724 |
this.options.set('disabled', this.$element.prop('disabled'));
|
5725 |
|
5726 |
+
if (this.isDisabled()) {
|
5727 |
if (this.isOpen()) {
|
5728 |
this.close();
|
5729 |
}
|
5734 |
}
|
5735 |
};
|
5736 |
|
5737 |
+
Select2.prototype._isChangeMutation = function (evt, mutations) {
|
5738 |
+
var changed = false;
|
5739 |
+
var self = this;
|
5740 |
+
|
5741 |
+
// Ignore any mutation events raised for elements that aren't options or
|
5742 |
+
// optgroups. This handles the case when the select element is destroyed
|
5743 |
+
if (
|
5744 |
+
evt && evt.target && (
|
5745 |
+
evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'
|
5746 |
+
)
|
5747 |
+
) {
|
5748 |
+
return;
|
5749 |
+
}
|
5750 |
+
|
5751 |
+
if (!mutations) {
|
5752 |
+
// If mutation events aren't supported, then we can only assume that the
|
5753 |
+
// change affected the selections
|
5754 |
+
changed = true;
|
5755 |
+
} else if (mutations.addedNodes && mutations.addedNodes.length > 0) {
|
5756 |
+
for (var n = 0; n < mutations.addedNodes.length; n++) {
|
5757 |
+
var node = mutations.addedNodes[n];
|
5758 |
+
|
5759 |
+
if (node.selected) {
|
5760 |
+
changed = true;
|
5761 |
+
}
|
5762 |
+
}
|
5763 |
+
} else if (mutations.removedNodes && mutations.removedNodes.length > 0) {
|
5764 |
+
changed = true;
|
5765 |
+
} else if ($.isArray(mutations)) {
|
5766 |
+
$.each(mutations, function(evt, mutation) {
|
5767 |
+
if (self._isChangeMutation(evt, mutation)) {
|
5768 |
+
// We've found a change mutation.
|
5769 |
+
// Let's escape from the loop and continue
|
5770 |
+
changed = true;
|
5771 |
+
return false;
|
5772 |
+
}
|
5773 |
+
});
|
5774 |
+
}
|
5775 |
+
return changed;
|
5776 |
+
};
|
5777 |
+
|
5778 |
+
Select2.prototype._syncSubtree = function (evt, mutations) {
|
5779 |
+
var changed = this._isChangeMutation(evt, mutations);
|
5780 |
+
var self = this;
|
5781 |
+
|
5782 |
+
// Only re-pull the data if we think there is a change
|
5783 |
+
if (changed) {
|
5784 |
+
this.dataAdapter.current(function (currentData) {
|
5785 |
+
self.trigger('selection:update', {
|
5786 |
+
data: currentData
|
5787 |
+
});
|
5788 |
+
});
|
5789 |
+
}
|
5790 |
+
};
|
5791 |
+
|
5792 |
/**
|
5793 |
* Override the trigger method to automatically trigger pre-events when
|
5794 |
* there are events that can be prevented.
|
5799 |
'open': 'opening',
|
5800 |
'close': 'closing',
|
5801 |
'select': 'selecting',
|
5802 |
+
'unselect': 'unselecting',
|
5803 |
+
'clear': 'clearing'
|
5804 |
};
|
5805 |
|
5806 |
if (args === undefined) {
|
5828 |
};
|
5829 |
|
5830 |
Select2.prototype.toggleDropdown = function () {
|
5831 |
+
if (this.isDisabled()) {
|
5832 |
return;
|
5833 |
}
|
5834 |
|
5844 |
return;
|
5845 |
}
|
5846 |
|
5847 |
+
if (this.isDisabled()) {
|
5848 |
+
return;
|
5849 |
+
}
|
5850 |
+
|
5851 |
this.trigger('query', {});
|
5852 |
};
|
5853 |
|
5854 |
+
Select2.prototype.close = function (evt) {
|
5855 |
if (!this.isOpen()) {
|
5856 |
return;
|
5857 |
}
|
5858 |
|
5859 |
+
this.trigger('close', { originalEvent : evt });
|
5860 |
+
};
|
5861 |
+
|
5862 |
+
/**
|
5863 |
+
* Helper method to abstract the "enabled" (not "disabled") state of this
|
5864 |
+
* object.
|
5865 |
+
*
|
5866 |
+
* @return {true} if the instance is not disabled.
|
5867 |
+
* @return {false} if the instance is disabled.
|
5868 |
+
*/
|
5869 |
+
Select2.prototype.isEnabled = function () {
|
5870 |
+
return !this.isDisabled();
|
5871 |
+
};
|
5872 |
+
|
5873 |
+
/**
|
5874 |
+
* Helper method to abstract the "disabled" state of this object.
|
5875 |
+
*
|
5876 |
+
* @return {true} if the disabled option is true.
|
5877 |
+
* @return {false} if the disabled option is false.
|
5878 |
+
*/
|
5879 |
+
Select2.prototype.isDisabled = function () {
|
5880 |
+
return this.options.get('disabled');
|
5881 |
};
|
5882 |
|
5883 |
Select2.prototype.isOpen = function () {
|
5954 |
});
|
5955 |
}
|
5956 |
|
5957 |
+
this.$element.val(newVal).trigger('input').trigger('change');
|
5958 |
};
|
5959 |
|
5960 |
Select2.prototype.destroy = function () {
|
5961 |
this.$container.remove();
|
5962 |
|
5963 |
if (this.$element[0].detachEvent) {
|
5964 |
+
this.$element[0].detachEvent('onpropertychange', this._syncA);
|
5965 |
}
|
5966 |
|
5967 |
if (this._observer != null) {
|
5969 |
this._observer = null;
|
5970 |
} else if (this.$element[0].removeEventListener) {
|
5971 |
this.$element[0]
|
5972 |
+
.removeEventListener('DOMAttrModified', this._syncA, false);
|
5973 |
+
this.$element[0]
|
5974 |
+
.removeEventListener('DOMNodeInserted', this._syncS, false);
|
5975 |
+
this.$element[0]
|
5976 |
+
.removeEventListener('DOMNodeRemoved', this._syncS, false);
|
5977 |
}
|
5978 |
|
5979 |
+
this._syncA = null;
|
5980 |
+
this._syncS = null;
|
5981 |
|
5982 |
this.$element.off('.select2');
|
5983 |
+
this.$element.attr('tabindex',
|
5984 |
+
Utils.GetData(this.$element[0], 'old-tabindex'));
|
5985 |
|
5986 |
this.$element.removeClass('select2-hidden-accessible');
|
5987 |
this.$element.attr('aria-hidden', 'false');
|
5988 |
+
Utils.RemoveData(this.$element[0]);
|
5989 |
this.$element.removeData('select2');
|
5990 |
|
5991 |
this.dataAdapter.destroy();
|
6013 |
|
6014 |
this.$container.addClass('select2-container--' + this.options.get('theme'));
|
6015 |
|
6016 |
+
Utils.StoreData($container[0], 'element', this.$element);
|
6017 |
|
6018 |
return $container;
|
6019 |
};
|
6033 |
'jquery-mousewheel',
|
6034 |
|
6035 |
'./select2/core',
|
6036 |
+
'./select2/defaults',
|
6037 |
+
'./select2/utils'
|
6038 |
+
], function ($, _, Select2, Defaults, Utils) {
|
6039 |
if ($.fn.select2 == null) {
|
6040 |
// All methods that should return the element
|
6041 |
var thisMethods = ['open', 'close', 'destroy'];
|
6053 |
return this;
|
6054 |
} else if (typeof options === 'string') {
|
6055 |
var ret;
|
6056 |
+
var args = Array.prototype.slice.call(arguments, 1);
|
6057 |
|
6058 |
this.each(function () {
|
6059 |
+
var instance = Utils.GetData(this, 'select2');
|
6060 |
|
6061 |
if (instance == null && window.console && console.error) {
|
6062 |
console.error(
|
6065 |
);
|
6066 |
}
|
6067 |
|
|
|
|
|
6068 |
ret = instance[options].apply(instance, args);
|
6069 |
});
|
6070 |
|
includes/simba-tfa/includes/select2.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">×</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,
|
2 |
-
c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.trigger("select",{data:a})}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();if(!(a.length<1)){var b=a.data("data");null!=b.element&&b.element.selected||null==b.element&&b.selected||this.trigger("select",{data:b})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
|
1 |
+
/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
2 |
+
!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((h||g)&&f){for(u=(n=e.split("/")).length;0<u;u-=1){if(r=n.slice(0,u).join("/"),h)for(d=h.length;0<d;d-=1)if(i=(i=f[h.slice(0,d).join("/")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function c(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\.js$/,f=function(e,t){var n,r=c(e),i=r[0],o=t[1];return e=r[1],i&&(n=D(i=l(i,o))),i?e=n&&n.normalize?n.normalize(e,function(t){return function(e){return l(e,t)}}(o)):l(e,o):(i=(r=c(e=l(e,o)))[0],e=r[1],i&&(n=D(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:function(e){return function(){return y&&y.config&&y.config[e]||{}}}(e)}}},o=function(e,t,n,r){var i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),"undefined"==p||"function"==p){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if("exports"===o)d[l]=g.exports(e),u=!0;else if("module"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if("string"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},"function"==typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(o){var i={};function u(e){var t=e.prototype,n=[];for(var r in t){"function"==typeof t[r]&&"constructor"!==r&&n.push(r)}return n}i.Extend=function(e,t){var n={}.hasOwnProperty;function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){var e=u(i),t=u(r);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=r.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},i.Observable=e,i.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var n=t.split("-"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},i.hasScroll=function(e,t){var n=o(t),r=t.style.overflowX,i=t.style.overflowY;return(r!==i||"hidden"!==i&&"visible"!==i)&&("scroll"===r||"scroll"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},i.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},r.prototype.position=function(e,t){t.find(".select2-results").append(e)},r.prototype.sort=function(e){return this.options.get("sorter")(e)},r.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},r.prototype.setClasses=function(){var t=this;this.data.current(function(e){var r=h.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=h(this),t=f.GetData(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,r)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},r.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},r.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},r.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var n={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var i in(null!=e.element&&r.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var s=h(t),a=document.createElement("strong");a.className="select2-results__group";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,r=0<e.deltaY&&t-e.deltaY<=0,i=e.deltaY<0&&n<=l.$results.height();r?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=h(this),n=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:h(this)})})},r.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},r.prototype.destroy=function(){this.$results.remove()},r.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.selectionContainer(),o=this.display(r,i);i.append(o);var s=r.title||r.text;s&&i.attr("title",s),l.StoreData(i[0],"data",r),t.push(i)}var a=this.$selection.find(".select2-selection__rendered");l.appendMany(a,t)}},n}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)},t}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(i,r,a){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){r._handleClear(e)}),t.on("keypress",function(e){r._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();var r=a.GetData(n[0],"data"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger("clear",o),o.prevented)this.$element.val(i);else{for(var s=0;s<r.length;s++)if(o={data:r[s]},this.trigger("unselect",o),o.prevented)return void this.$element.val(i);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var n=this.options.get("translations").get("removeAllItems"),r=i('<span class="select2-selection__clear" title="'+n()+'">×</span>');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var n=a.GetData(t[0],"data");r.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){r.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)r.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&r.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var r=this,i=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],o=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,i)){t=t||{};var n=s.Event("select2:"+e,{params:t});r.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,n){function r(e){this.dict=e||{}}return r.prototype.all=function(){return this.dict},r.prototype.get=function(e){return this.dict[e]},r.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},r._cache={},r.loadPath=function(e){if(!(e in r._cache)){var t=n(e);r._cache[e]=t}return new r(r._cache[e])},r}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(r){function n(e,t){n.__super__.constructor.call(this)}return r.Extend(n,r.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=r.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+r.generateChars(4),n},n}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],r=this;this.$element.find(":selected").each(function(){var e=l(this),t=r.item(e);n.push(t)}),e(n)},n.prototype.select=function(i){var o=this;if(i.selected=!0,l(i.element).is("option"))return i.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var r=i[n].id;-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")});else{var e=i.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(i){var o=this;if(this.$element.prop("multiple")){if(i.selected=!1,l(i.element).is("option"))return i.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].id;r!==i.id&&-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger("input").trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.RemoveData(this)})},n.prototype.query=function(r,e){var i=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(r,t);null!==n&&i.push(n)}}),e({results:i})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),r=this._normalizeItem(e);return r.element=t,a.StoreData(t,"data",r),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),r=[],i=0;i<n.length;i++){var o=l(n[i]),s=this.item(o);r.push(s)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],"data",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function r(e,t){this._dataToConvert=t.get("data")||[],r.__super__.constructor.call(this,e,t)}return f.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),r=n.map(function(){return t.item(g(this)).id}).get(),i=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,r)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}i.push(p)}}return i},r}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var r=o.ajax(e);return r.then(t),r.fail(n),r}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,r){var i=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=i.processResults(e,n);i.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),r(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("select2/data/tags",["jquery"],function(u){function e(e,t,n){var r=n.get("tags"),i=n.get("createTag");void 0!==i&&(this.createTag=i);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(r))for(var s=0;s<r.length;s++){var a=r[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var r=t.results,i=0;i<r.length;i++){var o=r[i],s=null!=o.children&&!e({results:o.children},!0);if((o.text||"").toUpperCase()===(c.term||"").toUpperCase()||s)return!n&&(t.data=r,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr("data-select2-tag",!0),d.addOptions([l]),d.insertTag(r,a)}t.results=r,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||u(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(d){function e(e,t,n){var r=n.get("tokenizer");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},e.prototype.query=function(e,t,n){var r=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return d(this).val()===t.id}).length){var n=r.option(t);n.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([n])}!function(e){r.trigger("select",{data:e})}(t)});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.trigger("focus")),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,r){for(var i=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,i)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(r(u),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-s,u=l>i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("close",function(e){r._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var i=o.GetData(r[0],"data");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger("select",{data:i})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(e){r._selectTriggered(e)}),t.on("unselect",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,$,b,w,A,x,D,S,E,C,O,T,q,L,I,j,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=b:null!=e.data?e.dataAdapter=$:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,w)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=E;else{var r=y.Decorate(E,C);e.dropdownAdapter=r}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var i=u(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,i)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var r=c.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&r.children.splice(i,1);return 0<r.children.length?r:e(t,r)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop("lang"),o=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],r=0;r<t.length;r++)if(n.push(t[r]),"string"==typeof t[r]&&0<t[r].indexOf("-")){var i=t[r].split("-")[0];n.push(i)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,r=0;r<e.length;r++){var i=new s,o=e[r];if("string"==typeof o)try{i=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.')}}else i=c.isPlainObject(o)?new s(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var r=y._convertData(n);c.extend(!0,this.defaults,r)},new n}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(r,d,i,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=i.applyFromElement(this.options,t)),this.options=i.apply(this.options),t&&t.is("input")){var n=r(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),p.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],"data",p.GetData(e[0],"select2Tags")),p.StoreData(e[0],"tags",!0)),p.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",p.GetData(e[0],"ajaxUrl")),p.StoreData(e[0],"ajax-Url",p.GetData(e[0],"ajaxUrl")));var n={};function r(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,s="data-";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,r)]=l}}d.fn.jquery&&"1."==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(o,c,u,r){var d=function(e,t){null!=u.GetData(e[0],"select2")&&u.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;u.StoreData(e[0],"old-tabindex",n),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),u.StoreData(e[0],"select2",this),e.data("select2",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+u.generateChars(2):u.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var r=this._resolveWidth(e,"style");return null!=r?r:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,r=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===o.inArray(e,r)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("select2-container--open")}),this.on("close",function(){n.$container.removeClass("select2-container--open")}),this.on("enable",function(){n.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){n.$container.addClass("select2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("select2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===r.ESC||t===r.TAB||t===r.UP&&e.altKey?(n.close(e),e.preventDefault()):t===r.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===r.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===r.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===r.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===r.ENTER||t===r.SPACE||t===r.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){t.addedNodes[i].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(r._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),r=this;n&&this.dataAdapter.current(function(e){r.trigger("selection:update",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in r){var i=r[e],o={prevented:!1,name:e,args:t};if(n.call(this,i,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get("disabled")},d.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",u.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),u.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1<i.inArray(t,a)?this:n}}return null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return u.fn.select2.amd=e,t});
|
includes/simba-tfa/includes/tfa.js
CHANGED
@@ -108,6 +108,12 @@ jQuery(function($) {
|
|
108 |
user_can_trust = ('undefined' == typeof user_can_trust) ? false : user_can_trust;
|
109 |
user_already_trusted = ('undefined' == typeof user_already_trusted) ? false : user_already_trusted;
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
// name="Submit" is WP-Members. 'submit' is Theme My Login starting from 7.x
|
112 |
$submit_button = $(form).find('input[name="wp-submit"], input[name="Submit"], input[name="submit"]');
|
113 |
// This hasn't been needed for anything yet (Jul 2018), but is a decent back-stop that would have prevented some breakage in the past that needed manual attention:
|
@@ -129,30 +135,33 @@ jQuery(function($) {
|
|
129 |
// Add new field and controls
|
130 |
var html = '';
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
if ($(form).hasClass('woocommerce-form-login')) {
|
135 |
-
// Retain compatibility with previous full-width layout
|
136 |
-
html += ' style="width: 100%;"';
|
137 |
-
}
|
138 |
-
|
139 |
-
html += '></label>';
|
140 |
-
|
141 |
-
html += '<p class="forgetmenot" style="font-size:small;';
|
142 |
-
|
143 |
-
if (!$(form).hasClass('woocommerce-form-login')) {
|
144 |
-
// Retain compatibility with previous full-width layout
|
145 |
-
html += ' max-width: 60%;';
|
146 |
-
}
|
147 |
-
|
148 |
-
html += '">'+simba_tfasettings.otp_login_help;
|
149 |
-
|
150 |
-
if (user_can_trust && ('https:' == window.location.protocol || 'localhost' === location.hostname || '127.0.0.1' === location.hostname)) {
|
151 |
|
152 |
-
html += '<br><
|
153 |
|
154 |
} else {
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
|
158 |
html += '</p>';
|
@@ -175,13 +184,16 @@ jQuery(function($) {
|
|
175 |
html += 'value="' + submit_button_text + '"></p>';
|
176 |
|
177 |
$submit_button.prop('disabled', true);
|
178 |
-
|
179 |
$submit_button.parents('form').first().prepend(html);
|
180 |
-
$('#simba_two_factor_auth').trigger('focus');
|
181 |
|
182 |
-
|
183 |
-
|
|
|
184 |
$('#tfa_login_btn').trigger('click');
|
|
|
|
|
|
|
185 |
}
|
186 |
|
187 |
}
|
108 |
user_can_trust = ('undefined' == typeof user_can_trust) ? false : user_can_trust;
|
109 |
user_already_trusted = ('undefined' == typeof user_already_trusted) ? false : user_already_trusted;
|
110 |
|
111 |
+
if ('https:' != window.location.protocol && 'localhost' !== location.hostname && '127.0.0.1' !== location.hostname && /^\.localdomain$/.test(location.hostname)) {
|
112 |
+
user_can_trust = false;
|
113 |
+
}
|
114 |
+
|
115 |
+
if (!user_can_trust) { user_already_trusted = false; }
|
116 |
+
|
117 |
// name="Submit" is WP-Members. 'submit' is Theme My Login starting from 7.x
|
118 |
$submit_button = $(form).find('input[name="wp-submit"], input[name="Submit"], input[name="submit"]');
|
119 |
// This hasn't been needed for anything yet (Jul 2018), but is a decent back-stop that would have prevented some breakage in the past that needed manual attention:
|
135 |
// Add new field and controls
|
136 |
var html = '';
|
137 |
|
138 |
+
if (user_already_trusted) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
+
html += '<br><span class="simbaotp_is_trusted">'+simba_tfasettings.is_trusted+'</span>';
|
141 |
|
142 |
} else {
|
143 |
+
|
144 |
+
html += '<label for="simba_two_factor_auth">' + simba_tfasettings.otp + '<br><input type="text" name="two_factor_code" id="simba_two_factor_auth" autocomplete="off" data-lpignore="true"';
|
145 |
+
|
146 |
+
if ($(form).hasClass('woocommerce-form-login')) {
|
147 |
+
// Retain compatibility with previous full-width layout
|
148 |
+
html += ' style="width: 100%;"';
|
149 |
+
}
|
150 |
+
|
151 |
+
html += '></label>';
|
152 |
+
|
153 |
+
html += '<p class="forgetmenot" style="font-size:small;';
|
154 |
+
if (!$(form).hasClass('woocommerce-form-login')) {
|
155 |
+
// Retain compatibility with previous full-width layout
|
156 |
+
html += ' max-width: 60%;';
|
157 |
+
}
|
158 |
+
html += '">'+simba_tfasettings.otp_login_help;
|
159 |
+
|
160 |
+
if (user_can_trust) {
|
161 |
+
|
162 |
+
html += '<br><input type="checkbox" name="simba_tfa_mark_as_trusted" id="simba_tfa_mark_as_trusted" value="1"><label for="simba_tfa_mark_as_trusted">'+ simba_tfasettings.mark_as_trusted+'</label>';
|
163 |
+
|
164 |
+
}
|
165 |
}
|
166 |
|
167 |
html += '</p>';
|
184 |
html += 'value="' + submit_button_text + '"></p>';
|
185 |
|
186 |
$submit_button.prop('disabled', true);
|
187 |
+
|
188 |
$submit_button.parents('form').first().prepend(html);
|
|
|
189 |
|
190 |
+
$('#login_error').hide();
|
191 |
+
|
192 |
+
if (user_already_trusted) {
|
193 |
$('#tfa_login_btn').trigger('click');
|
194 |
+
} else {
|
195 |
+
|
196 |
+
$('#simba_two_factor_auth').trigger('focus');
|
197 |
}
|
198 |
|
199 |
}
|
includes/simba-tfa/simba-tfa.php
CHANGED
@@ -843,7 +843,8 @@ class Simba_Two_Factor_Authentication {
|
|
843 |
|
844 |
// If the TFA code was actually validated (not just not required, for example), then $code_ok is (boolean)true
|
845 |
if (isset($code_ok) && true === $code_ok && is_a($ret, 'WP_User')) {
|
846 |
-
|
|
|
847 |
|
848 |
$trusted_for = $this->get_option('tfa_trusted_for');
|
849 |
$trusted_for = (false === $trusted_for) ? 30 : (string) absint($trusted_for);
|
@@ -1172,7 +1173,7 @@ class Simba_Two_Factor_Authentication {
|
|
1172 |
'otp' => __('One Time Password (i.e. 2FA)', 'all-in-one-wp-security-and-firewall'),
|
1173 |
'otp_login_help' => __('(check your OTP app to get this password)', 'all-in-one-wp-security-and-firewall'),
|
1174 |
'mark_as_trusted' => sprintf(_n('Trust this device (allow login without 2FA for %d day)', 'Trust this device (allow login without TFA for %d days)', $trusted_for, 'all-in-one-wp-security-and-firewall'), $trusted_for),
|
1175 |
-
'is_trusted' => __('(Trusted device)', 'all-in-one-wp-security-and-firewall'),
|
1176 |
'nonce' => wp_create_nonce('simba_tfa_loginform_nonce'),
|
1177 |
'login_form_selectors' => '',
|
1178 |
'login_form_off_selectors' => '',
|
843 |
|
844 |
// If the TFA code was actually validated (not just not required, for example), then $code_ok is (boolean)true
|
845 |
if (isset($code_ok) && true === $code_ok && is_a($ret, 'WP_User')) {
|
846 |
+
// Though $_SERVER['SERVER_NAME'] can't always be trusted (if the webserver is misconfigured), anyone using this already has password and TFA clearance.
|
847 |
+
if (!empty($params['simba_tfa_mark_as_trusted']) && $this->user_can_trust($ret->ID) && (is_ssl() || (!empty($_SERVER['SERVER_NAME']) && ('localhost' == $_SERVER['SERVER_NAME'] ||'127.0.0.1' == $_SERVER['SERVER_NAME'] || preg_match('/\.localdomain$/', $_SERVER['SERVER_NAME']))))) {
|
848 |
|
849 |
$trusted_for = $this->get_option('tfa_trusted_for');
|
850 |
$trusted_for = (false === $trusted_for) ? 30 : (string) absint($trusted_for);
|
1173 |
'otp' => __('One Time Password (i.e. 2FA)', 'all-in-one-wp-security-and-firewall'),
|
1174 |
'otp_login_help' => __('(check your OTP app to get this password)', 'all-in-one-wp-security-and-firewall'),
|
1175 |
'mark_as_trusted' => sprintf(_n('Trust this device (allow login without 2FA for %d day)', 'Trust this device (allow login without TFA for %d days)', $trusted_for, 'all-in-one-wp-security-and-firewall'), $trusted_for),
|
1176 |
+
'is_trusted' => __('(Trusted device - no OTP code required)', 'all-in-one-wp-security-and-firewall'),
|
1177 |
'nonce' => wp_create_nonce('simba_tfa_loginform_nonce'),
|
1178 |
'login_form_selectors' => '',
|
1179 |
'login_form_off_selectors' => '',
|
languages/all-in-one-wp-security-and-firewall.pot
CHANGED
@@ -120,7 +120,7 @@ msgstr ""
|
|
120 |
msgid "Nonce check failed for save blacklist settings!"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: src/admin/wp-security-blacklist-menu.php:132, src/admin/wp-security-brute-force-menu.php:748, src/admin/wp-security-firewall-menu.php:
|
124 |
msgid "The plugin was unable to write to the .htaccess file. Please edit file manually."
|
125 |
msgstr ""
|
126 |
|
@@ -144,23 +144,23 @@ msgstr ""
|
|
144 |
msgid "By blocking people via the .htaccess file your are using the most secure first line of defence which denies all access to blacklisted visitors as soon as they hit your hosting server."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: src/admin/wp-security-blacklist-menu.php:154, src/admin/wp-security-firewall-menu.php:
|
148 |
msgid "All In One WP Security & Firewall Premium"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: src/admin/wp-security-blacklist-menu.php:155, src/admin/wp-security-firewall-menu.php:
|
152 |
msgid "You may also be interested in %s."
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: src/admin/wp-security-blacklist-menu.php:156, src/admin/wp-security-firewall-menu.php:
|
156 |
msgid "This plugin adds a number of extra features including %s and %s."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: src/admin/wp-security-blacklist-menu.php:156, src/admin/wp-security-firewall-menu.php:
|
160 |
msgid "smart 404 blocking"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: src/admin/wp-security-blacklist-menu.php:156, src/admin/wp-security-firewall-menu.php:
|
164 |
msgid "country IP blocking"
|
165 |
msgstr ""
|
166 |
|
@@ -200,7 +200,7 @@ msgstr ""
|
|
200 |
msgid "Enter one or more user agent strings."
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: src/admin/wp-security-blacklist-menu.php:208, src/admin/wp-security-brute-force-menu.php:374, src/admin/wp-security-brute-force-menu.php:408, src/admin/wp-security-brute-force-menu.php:431, src/admin/wp-security-brute-force-menu.php:452, src/admin/wp-security-filescan-menu.php:311, src/admin/wp-security-filescan-menu.php:328, src/admin/wp-security-firewall-menu.php:175, src/admin/wp-security-firewall-menu.php:212, src/admin/wp-security-firewall-menu.php:232, src/admin/wp-security-firewall-menu.php:258, src/admin/wp-security-firewall-menu.php:385, src/admin/wp-security-firewall-menu.php:415, src/admin/wp-security-firewall-menu.php:446, src/admin/wp-security-firewall-menu.php:474, src/admin/wp-security-firewall-menu.php:503, src/admin/wp-security-firewall-menu.php:
|
204 |
msgid "More Info"
|
205 |
msgstr ""
|
206 |
|
@@ -216,7 +216,7 @@ msgstr ""
|
|
216 |
msgid "Example 2 - A list of more than 1 user agent strings to block"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: src/admin/wp-security-blacklist-menu.php:222, src/admin/wp-security-brute-force-menu.php:214, src/admin/wp-security-brute-force-menu.php:684, src/admin/wp-security-brute-force-menu.php:810, src/admin/wp-security-brute-force-menu.php:872, src/admin/wp-security-filescan-menu.php:355, src/admin/wp-security-filesystem-menu.php:242, src/admin/wp-security-firewall-menu.php:
|
220 |
msgid "Save Settings"
|
221 |
msgstr ""
|
222 |
|
@@ -252,7 +252,7 @@ msgstr ""
|
|
252 |
msgid "You must use alpha numeric characters for your login page slug."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: src/admin/wp-security-brute-force-menu.php:117, src/admin/wp-security-filescan-menu.php:175, src/admin/wp-security-firewall-menu.php:
|
256 |
msgid "Attention!"
|
257 |
msgstr ""
|
258 |
|
@@ -356,7 +356,7 @@ msgstr ""
|
|
356 |
msgid "The features in this tab will stop the majority of brute force login attacks thus providing even better protection for your WP login page."
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: src/admin/wp-security-brute-force-menu.php:307, src/admin/wp-security-firewall-menu.php:
|
360 |
msgid "backup"
|
361 |
msgstr ""
|
362 |
|
@@ -752,7 +752,7 @@ msgstr ""
|
|
752 |
msgid "Permanently Blocked IP Addresses"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: src/admin/wp-security-dashboard-menu.php:183, src/admin/wp-security-firewall-menu.php:
|
756 |
msgid "Search"
|
757 |
msgstr ""
|
758 |
|
@@ -1538,7 +1538,7 @@ msgstr ""
|
|
1538 |
msgid "You have successfully saved the Prevent Access to Default WP Files configuration."
|
1539 |
msgstr ""
|
1540 |
|
1541 |
-
#: src/admin/wp-security-filesystem-menu.php:286, src/admin/wp-security-firewall-menu.php:126, src/admin/wp-security-firewall-menu.php:346, src/admin/wp-security-firewall-menu.php:
|
1542 |
msgid "Could not write to the .htaccess file. Please check the file permissions."
|
1543 |
msgstr ""
|
1544 |
|
@@ -1654,11 +1654,11 @@ msgstr ""
|
|
1654 |
msgid "Custom Rules"
|
1655 |
msgstr ""
|
1656 |
|
1657 |
-
#: src/admin/wp-security-firewall-menu.php:122, src/admin/wp-security-firewall-menu.php:
|
1658 |
msgid "Settings were successfully saved"
|
1659 |
msgstr ""
|
1660 |
|
1661 |
-
#: src/admin/wp-security-firewall-menu.php:131, src/admin/wp-security-firewall-menu.php:
|
1662 |
msgid "Firewall Settings"
|
1663 |
msgstr ""
|
1664 |
|
@@ -1966,558 +1966,562 @@ msgstr ""
|
|
1966 |
msgid "Save Additional Firewall Settings"
|
1967 |
msgstr ""
|
1968 |
|
1969 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1970 |
msgid "You have successfully saved the 5G/6G Firewall Protection configuration"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1974 |
msgid "All in One WP Security and Firewall"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1978 |
msgid "We were unable to access the firewall's configuration file:"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1982 |
msgid "As a result, the firewall will be unavailable."
|
1983 |
msgstr ""
|
1984 |
|
1985 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1986 |
msgid "Please check your PHP error log for further information."
|
1987 |
msgstr ""
|
1988 |
|
1989 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1990 |
msgid "If you're unable to locate your PHP log file, please contact your web hosting company to ask them where it can be found on their setup."
|
1991 |
msgstr ""
|
1992 |
|
1993 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1994 |
msgid "This feature allows you to activate the %s (or legacy %s) firewall security protection rules designed and produced by %s."
|
1995 |
msgstr ""
|
1996 |
|
1997 |
-
#: src/admin/wp-security-firewall-menu.php:
|
1998 |
msgid "The 6G Blacklist is updated and improved version of 5G Blacklist. If you have 5G Blacklist active, you might consider activating 6G Blacklist instead."
|
1999 |
msgstr ""
|
2000 |
|
2001 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2002 |
msgid "The 6G Blacklist is a simple, flexible blacklist that helps reduce the number of malicious URL requests that hit your website."
|
2003 |
msgstr ""
|
2004 |
|
2005 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2006 |
msgid "The added advantage of applying the 6G firewall to your site is that it has been tested and confirmed by the people at PerishablePress.com to be an optimal and least disruptive set of .htaccess security rules for general WP sites running on an Apache server or similar."
|
2007 |
msgstr ""
|
2008 |
|
2009 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2010 |
msgid "Therefore the 6G firewall rules should not have any impact on your site's general functionality but if you wish you can take a %s of your .htaccess file before proceeding."
|
2011 |
msgstr ""
|
2012 |
|
2013 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2014 |
msgid "6G Blacklist/Firewall Settings"
|
2015 |
msgstr ""
|
2016 |
|
2017 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2018 |
msgid "Enable 6G Firewall Protection"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2022 |
msgid "Check this if you want to apply the 6G Blacklist firewall protection from perishablepress.com to your site."
|
2023 |
msgstr ""
|
2024 |
|
2025 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2026 |
msgid "This setting will implement the 6G security firewall protection mechanisms on your site which include the following things:"
|
2027 |
msgstr ""
|
2028 |
|
2029 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2030 |
msgid "1) Block forbidden characters commonly used in exploitative attacks."
|
2031 |
msgstr ""
|
2032 |
|
2033 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2034 |
msgid "2) Block malicious encoded URL characters such as the \".css(\" string."
|
2035 |
msgstr ""
|
2036 |
|
2037 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2038 |
msgid "3) Guard against the common patterns and specific exploits in the root portion of targeted URLs."
|
2039 |
msgstr ""
|
2040 |
|
2041 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2042 |
msgid "4) Stop attackers from manipulating query strings by disallowing illicit characters."
|
2043 |
msgstr ""
|
2044 |
|
2045 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2046 |
msgid "....and much more."
|
2047 |
msgstr ""
|
2048 |
|
2049 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2050 |
msgid "Enable legacy 5G Firewall Protection"
|
2051 |
msgstr ""
|
2052 |
|
2053 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2054 |
msgid "Check this if you want to apply the 5G Blacklist firewall protection from perishablepress.com to your site."
|
2055 |
msgstr ""
|
2056 |
|
2057 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2058 |
msgid "This setting will implement the 5G security firewall protection mechanisms on your site which include the following things:"
|
2059 |
msgstr ""
|
2060 |
|
2061 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2062 |
msgid "Save 5G/6G Firewall Settings"
|
2063 |
msgstr ""
|
2064 |
|
2065 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2066 |
msgid "6G block request methods"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2070 |
msgid "Block %s method"
|
2071 |
msgstr ""
|
2072 |
|
2073 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2074 |
msgid "Check this to block the %s request method"
|
2075 |
msgstr ""
|
2076 |
|
2077 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2078 |
msgid "Save request methods settings"
|
2079 |
msgstr ""
|
2080 |
|
2081 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2082 |
msgid "6G other settings"
|
2083 |
msgstr ""
|
2084 |
|
2085 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2086 |
msgid "Block query strings"
|
2087 |
msgstr ""
|
2088 |
|
2089 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2090 |
msgid "Check this to block all query strings recommended by 6G"
|
2091 |
msgstr ""
|
2092 |
|
2093 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2094 |
msgid "Block request strings"
|
2095 |
msgstr ""
|
2096 |
|
2097 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2098 |
msgid "Check this to block all request strings recommended by 6G"
|
2099 |
msgstr ""
|
2100 |
|
2101 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2102 |
msgid "Block referrers"
|
2103 |
msgstr ""
|
2104 |
|
2105 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2106 |
msgid "Check this to block all referrers recommended by 6G"
|
2107 |
msgstr ""
|
2108 |
|
2109 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2110 |
msgid "Block user-agents"
|
2111 |
msgstr ""
|
2112 |
|
2113 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2114 |
msgid "Check this to block all user-agents recommended by 6G"
|
2115 |
msgstr ""
|
2116 |
|
2117 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2118 |
msgid "Save other settings"
|
2119 |
msgstr ""
|
2120 |
|
2121 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2122 |
msgid "The Internet bot settings were successfully saved"
|
2123 |
msgstr ""
|
2124 |
|
2125 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2126 |
msgid "Internet Bot Settings"
|
2127 |
msgstr ""
|
2128 |
|
2129 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2130 |
msgid "What is an Internet Bot"
|
2131 |
msgstr ""
|
2132 |
|
2133 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2134 |
msgid "%s?"
|
2135 |
msgstr ""
|
2136 |
|
2137 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2138 |
msgid "A bot is a piece of software which runs on the Internet and performs automatic tasks. For example when Google indexes your pages it uses automatic bots to achieve this task."
|
2139 |
msgstr ""
|
2140 |
|
2141 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2142 |
msgid "A lot of bots are legitimate and non-malicous but not all bots are good and often you will find some which try to impersonate legitimate bots such as \"Googlebot\" but in reality they have nohing to do with Google at all."
|
2143 |
msgstr ""
|
2144 |
|
2145 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2146 |
msgid "Although most of the bots out there are relatively harmless sometimes website owners want to have more control over which bots they allow into their site."
|
2147 |
msgstr ""
|
2148 |
|
2149 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2150 |
msgid "This feature allows you to block bots which are impersonating as a Googlebot but actually aren't. (In other words they are fake Google bots)"
|
2151 |
msgstr ""
|
2152 |
|
2153 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2154 |
msgid "Googlebots have a unique indentity which cannot easily be forged and this feature will indentify any fake Google bots and block them from reading your site's pages."
|
2155 |
msgstr ""
|
2156 |
|
2157 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2158 |
msgid "<strong>Attention</strong>: Sometimes non-malicious Internet organizations might have bots which impersonate as a \"Googlebot\"."
|
2159 |
msgstr ""
|
2160 |
|
2161 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2162 |
msgid "Just be aware that if you activate this feature the plugin will block all bots which use the \"Googlebot\" string in their User Agent information but are NOT officially from Google (irrespective whether they are malicious or not)."
|
2163 |
msgstr ""
|
2164 |
|
2165 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2166 |
msgid "All other bots from other organizations such as \"Yahoo\", \"Bing\" etc will not be affected by this feature."
|
2167 |
msgstr ""
|
2168 |
|
2169 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2170 |
msgid "Block Fake Googlebots"
|
2171 |
msgstr ""
|
2172 |
|
2173 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2174 |
msgid "Check this if you want to block all fake Googlebots."
|
2175 |
msgstr ""
|
2176 |
|
2177 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2178 |
msgid "This feature will check if the User Agent information of a bot contains the string \"Googlebot\"."
|
2179 |
msgstr ""
|
2180 |
|
2181 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2182 |
msgid "It will then perform a few tests to verify if the bot is legitimately from Google and if so it will allow the bot to proceed."
|
2183 |
msgstr ""
|
2184 |
|
2185 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2186 |
msgid "If the bot fails the checks then the plugin will mark it as being a fake Googlebot and it will block it"
|
2187 |
msgstr ""
|
2188 |
|
2189 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2190 |
msgid "Save Internet Bot Settings"
|
2191 |
msgstr ""
|
2192 |
|
2193 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2194 |
msgid "Prevent Image Hotlinking"
|
2195 |
msgstr ""
|
2196 |
|
2197 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2198 |
msgid "A Hotlink is where someone displays an image on their site which is actually located on your site by using a direct link to the source of the image on your server."
|
2199 |
msgstr ""
|
2200 |
|
2201 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2202 |
msgid "Due to the fact that the image being displayed on the other person's site is coming from your server, this can cause leaking of bandwidth and resources for you because your server has to present this image for the people viewing it on someone elses's site."
|
2203 |
msgstr ""
|
2204 |
|
2205 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2206 |
msgid "This feature will prevent people from directly hotlinking images from your site's pages by writing some directives in your .htaccess file."
|
2207 |
msgstr ""
|
2208 |
|
2209 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2210 |
msgid "Prevent Hotlinking"
|
2211 |
msgstr ""
|
2212 |
|
2213 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2214 |
msgid "Check this if you want to prevent hotlinking to images on your site."
|
2215 |
msgstr ""
|
2216 |
|
2217 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2218 |
msgid "Nonce check failed for delete all 404 event logs operation!"
|
2219 |
msgstr ""
|
2220 |
|
2221 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2222 |
msgid "404 Detection Feature - Delete all 404 event logs operation failed!"
|
2223 |
msgstr ""
|
2224 |
|
2225 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2226 |
msgid "All 404 event logs were deleted from the DB successfully!"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2230 |
msgid "You entered a non numeric value for the lockout time length field. It has been set to the default value."
|
2231 |
msgstr ""
|
2232 |
|
2233 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2234 |
msgid "You entered an incorrect format for the \"Redirect URL\" field. It has been set to the default value."
|
2235 |
msgstr ""
|
2236 |
|
2237 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2238 |
msgid "404 Detection Configuration"
|
2239 |
msgstr ""
|
2240 |
|
2241 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2242 |
msgid "A 404 or Not Found error occurs when somebody tries to access a non-existent page on your website."
|
2243 |
msgstr ""
|
2244 |
|
2245 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2246 |
msgid "Typically, most 404 errors happen quite innocently when people have mis-typed a URL or used an old link to page which doesn't exist anymore."
|
2247 |
msgstr ""
|
2248 |
|
2249 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2250 |
msgid "However, in some cases you may find many repeated 404 errors which occur in a relatively short space of time and from the same IP address which are all attempting to access a variety of non-existent page URLs."
|
2251 |
msgstr ""
|
2252 |
|
2253 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2254 |
msgid "Such behaviour can mean that a hacker might be trying to find a particular page or URL for sinister reasons."
|
2255 |
msgstr ""
|
2256 |
|
2257 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2258 |
msgid "This feature allows you to monitor all 404 events which occur on your site, and it also gives you the option of blocking IP addresses for a configured length of time."
|
2259 |
msgstr ""
|
2260 |
|
2261 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2262 |
msgid "If you want to temporarily block or blacklist an IP address, simply click the \"Temp Block\" or \"Blacklist IP\" link for the applicable IP entry in the \"404 Event Logs\" table below."
|
2263 |
msgstr ""
|
2264 |
|
2265 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2266 |
msgid "404 Detection Options"
|
2267 |
msgstr ""
|
2268 |
|
2269 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2270 |
msgid "Enable 404 IP Detection and Lockout"
|
2271 |
msgstr ""
|
2272 |
|
2273 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2274 |
msgid "Check this if you want to enable the lockout of selected IP addresses."
|
2275 |
msgstr ""
|
2276 |
|
2277 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2278 |
msgid "When you enable this checkbox, all 404 events on your site will be logged in the table below. You can monitor these events and select some IP addresses listed in the table below and block them for a specified amount of time. All IP addresses you select to be blocked from the \"404 Event Logs\" table section will be unable to access your site during the time specified."
|
2279 |
msgstr ""
|
2280 |
|
2281 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2282 |
msgid "Enable 404 Event Logging"
|
2283 |
msgstr ""
|
2284 |
|
2285 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2286 |
msgid "Check this if you want to enable the logging of 404 events"
|
2287 |
msgstr ""
|
2288 |
|
2289 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2290 |
msgid "Time Length of 404 Lockout (min)"
|
2291 |
msgstr ""
|
2292 |
|
2293 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2294 |
msgid "Set the length of time for which a blocked IP address will be prevented from visiting your site"
|
2295 |
msgstr ""
|
2296 |
|
2297 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2298 |
msgid "You can lock any IP address which is recorded in the \"404 Event Logs\" table section below."
|
2299 |
msgstr ""
|
2300 |
|
2301 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2302 |
msgid "To temporarily lock an IP address, hover over the ID column and click the \"Temp Block\" link for the applicable IP entry."
|
2303 |
msgstr ""
|
2304 |
|
2305 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2306 |
msgid "404 Lockout Redirect URL"
|
2307 |
msgstr ""
|
2308 |
|
2309 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2310 |
msgid "A blocked visitor will be automatically redirected to this URL."
|
2311 |
msgstr ""
|
2312 |
|
2313 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2314 |
msgid "404 Event Logs"
|
2315 |
msgstr ""
|
2316 |
|
2317 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2318 |
msgid "Export to CSV"
|
2319 |
msgstr ""
|
2320 |
|
2321 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2322 |
msgid "Click this button if you wish to download this log in CSV format."
|
2323 |
msgstr ""
|
2324 |
|
2325 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2326 |
msgid "Delete All 404 Event Logs"
|
2327 |
msgstr ""
|
2328 |
|
2329 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2330 |
msgid "Click this button if you wish to purge all 404 event logs from the DB."
|
2331 |
msgstr ""
|
2332 |
|
2333 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2334 |
msgid "Custom .htaccess Rules Settings"
|
2335 |
msgstr ""
|
2336 |
|
2337 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2338 |
msgid "This feature can be used to apply your own custom .htaccess rules and directives."
|
2339 |
msgstr ""
|
2340 |
|
2341 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2342 |
msgid "It is useful for when you want to tweak our existing firewall rules or when you want to add your own."
|
2343 |
msgstr ""
|
2344 |
|
2345 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2346 |
msgid "NOTE: This feature can only be used if your site is hosted in an apache or similar web server."
|
2347 |
msgstr ""
|
2348 |
|
2349 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2350 |
msgid "<strong>Warning</strong>: Only use this feature if you know what you are doing."
|
2351 |
msgstr ""
|
2352 |
|
2353 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2354 |
msgid "Incorrect .htaccess rules or directives can break or prevent access to your site."
|
2355 |
msgstr ""
|
2356 |
|
2357 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2358 |
msgid "It is your responsibility to ensure that you are entering the correct code!"
|
2359 |
msgstr ""
|
2360 |
|
2361 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2362 |
msgid "If you break your site you will need to access your server via FTP or something similar and then edit your .htaccess file and delete the changes you made."
|
2363 |
msgstr ""
|
2364 |
|
2365 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2366 |
msgid "Custom .htaccess Rules"
|
2367 |
msgstr ""
|
2368 |
|
2369 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2370 |
msgid "Enable Custom .htaccess Rules"
|
2371 |
msgstr ""
|
2372 |
|
2373 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2374 |
msgid "Check this if you want to enable custom rules entered in the text box below"
|
2375 |
msgstr ""
|
2376 |
|
2377 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2378 |
msgid "Place custom rules at the top"
|
2379 |
msgstr ""
|
2380 |
|
2381 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2382 |
msgid "Check this if you want to place your custom rules at the beginning of all the rules applied by this plugin"
|
2383 |
msgstr ""
|
2384 |
|
2385 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2386 |
msgid "Enter Custom .htaccess Rules:"
|
2387 |
msgstr ""
|
2388 |
|
2389 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2390 |
msgid "Enter your custom .htaccess rules/directives."
|
2391 |
msgstr ""
|
2392 |
|
2393 |
-
#: src/admin/wp-security-firewall-menu.php:
|
2394 |
msgid "Save Custom Rules"
|
2395 |
msgstr ""
|
2396 |
|
2397 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2398 |
msgid "All In One WP Security and Firewall"
|
2399 |
msgstr ""
|
2400 |
|
2401 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2402 |
msgid "We were unable to create the file necessary to give you the highest level of protection."
|
2403 |
msgstr ""
|
2404 |
|
2405 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2406 |
msgid "Your firewall will have reduced protection which means some of your firewall's functionality will be unavailable."
|
2407 |
msgstr ""
|
2408 |
|
2409 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2410 |
msgid "If you would like to manually set up the necessary file, please follow these steps:"
|
2411 |
msgstr ""
|
2412 |
|
2413 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2414 |
msgid "1. Create a file with the name %s in the same directory as your WordPress install is in, i.e.:"
|
2415 |
msgstr ""
|
2416 |
|
2417 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2418 |
msgid "2. Paste in the following code:"
|
2419 |
msgstr ""
|
2420 |
|
2421 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2422 |
msgid "3. Save the file and press the 'Try again' button below:"
|
2423 |
msgstr ""
|
2424 |
|
2425 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2426 |
msgid "1. Open the following file:"
|
2427 |
msgstr ""
|
2428 |
|
2429 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2430 |
msgid "2. Look for the auto_prepend_file directive."
|
2431 |
msgstr ""
|
2432 |
|
2433 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2434 |
msgid "2. Look for the following:"
|
2435 |
msgstr ""
|
2436 |
|
2437 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2438 |
msgid "3. Change it to the following:"
|
2439 |
msgstr ""
|
2440 |
|
2441 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2442 |
msgid "4. Save the file and press the 'Try again' button below:"
|
2443 |
msgstr ""
|
2444 |
|
2445 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2446 |
msgid "You may have to wait up to 5 minutes before the settings take effect."
|
2447 |
msgstr ""
|
2448 |
|
2449 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2450 |
msgid "Your firewall has been installed with the highest level of protection."
|
2451 |
msgstr ""
|
2452 |
|
2453 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2454 |
msgid "You may have to wait 5 minutes for the changes to take effect."
|
2455 |
msgstr ""
|
2456 |
|
2457 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2458 |
msgid "1. Open your php.ini file."
|
2459 |
msgstr ""
|
2460 |
|
2461 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2462 |
msgid "2. Set the auto_prepend_file directive like below:"
|
2463 |
msgstr ""
|
2464 |
|
2465 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2466 |
msgid "3. Restart the webserver and refresh the page"
|
2467 |
msgstr ""
|
2468 |
|
2469 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2470 |
msgid "2. Paste in the following directives:"
|
2471 |
msgstr ""
|
2472 |
|
2473 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2474 |
msgid "We were unable to set up your firewall with the highest level of protection."
|
2475 |
msgstr ""
|
2476 |
|
2477 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2478 |
msgid "Your firewall will have reduced functionality."
|
2479 |
msgstr ""
|
2480 |
|
2481 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2482 |
msgid "To give your site the highest level of protection, please follow these steps:"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2486 |
msgid "Note: if you're unable to perform any of the aforementioned steps, please ask your web hosting provider for further assistance."
|
2487 |
msgstr ""
|
2488 |
|
2489 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2490 |
msgid "Try again"
|
2491 |
msgstr ""
|
2492 |
|
2493 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2494 |
msgid "We have detected that your AIOWPS firewall is not fully installed, and therefore does not have the highest level of protection. "
|
2495 |
msgstr ""
|
2496 |
|
2497 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2498 |
msgid "Your firewall will have reduced functionality until it has been upgraded. "
|
2499 |
msgstr ""
|
2500 |
|
2501 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2502 |
msgid "Upgrade your protection now"
|
2503 |
msgstr ""
|
2504 |
|
2505 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2506 |
msgid "Our PHP-based firewall has been created to give you even greater protection."
|
2507 |
msgstr ""
|
2508 |
|
2509 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2510 |
msgid "If you already have our .htaccess-based firewall enabled, you will still need to set up the PHP-based firewall to benefit from its protection."
|
2511 |
msgstr ""
|
2512 |
|
2513 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2514 |
msgid "To set up the PHP-based firewall, press the 'Set up now' button below:"
|
2515 |
msgstr ""
|
2516 |
|
2517 |
-
#: src/admin/wp-security-firewall-setup-notice.php:
|
2518 |
msgid "Set up now"
|
2519 |
msgstr ""
|
2520 |
|
|
|
|
|
|
|
|
|
2521 |
#: src/admin/wp-security-list-404.php:91
|
2522 |
msgid "Event Type"
|
2523 |
msgstr ""
|
@@ -4480,7 +4484,7 @@ msgstr ""
|
|
4480 |
msgid "Advanced"
|
4481 |
msgstr ""
|
4482 |
|
4483 |
-
#: src/classes/wp-security-captcha.php:47, src/classes/wp-security-general-init-tasks.php:
|
4484 |
msgid "Please enter an answer in digits:"
|
4485 |
msgstr ""
|
4486 |
|
@@ -4612,63 +4616,63 @@ msgstr ""
|
|
4612 |
msgid "The following files were changed on your host"
|
4613 |
msgstr ""
|
4614 |
|
4615 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4616 |
msgid "Application passwords have been disabled by All In One WP Security & Firewall plugin."
|
4617 |
msgstr ""
|
4618 |
|
4619 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4620 |
msgid "<strong>ERROR</strong>: Your answer was incorrect - please try again."
|
4621 |
msgstr ""
|
4622 |
|
4623 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4624 |
msgid "Enter something special:"
|
4625 |
msgstr ""
|
4626 |
|
4627 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4628 |
msgid "Application Passwords"
|
4629 |
msgstr ""
|
4630 |
|
4631 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4632 |
msgid "Change Setting"
|
4633 |
msgstr ""
|
4634 |
|
4635 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4636 |
msgid "Site admin can only change this setting."
|
4637 |
msgstr ""
|
4638 |
|
4639 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4640 |
msgid "Error: You entered an incorrect CAPTCHA answer. Please go back and try again."
|
4641 |
msgstr ""
|
4642 |
|
4643 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4644 |
msgid "Your CAPTCHA answer was incorrect - please try again."
|
4645 |
msgstr ""
|
4646 |
|
4647 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4648 |
msgid "<strong>ERROR</strong>: Your IP address is currently locked please contact the administrator!"
|
4649 |
msgstr ""
|
4650 |
|
4651 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4652 |
msgid "Your Google reCAPTCHA site key is wrong. Please fill the correct reCAPTCHA keys %s to use the Google reCAPTCHA feature."
|
4653 |
msgstr ""
|
4654 |
|
4655 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4656 |
msgid "here"
|
4657 |
msgstr ""
|
4658 |
|
4659 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4660 |
msgid "Would you like All In One WP Security & Firewall to re-insert the security rules in your .htaccess file which were cleared when you deactivated the plugin?"
|
4661 |
msgstr ""
|
4662 |
|
4663 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4664 |
msgid "Yes"
|
4665 |
msgstr ""
|
4666 |
|
4667 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4668 |
msgid "No"
|
4669 |
msgstr ""
|
4670 |
|
4671 |
-
#: src/classes/wp-security-general-init-tasks.php:
|
4672 |
msgid "Your registration is pending approval."
|
4673 |
msgstr ""
|
4674 |
|
@@ -4964,10 +4968,6 @@ msgstr ""
|
|
4964 |
msgid "Example 5: 2001:db8:1263::/48"
|
4965 |
msgstr ""
|
4966 |
|
4967 |
-
#: src/templates/notices/automated-database-backup-notice.php:10, src/templates/notices/automated-database-backup-notice.php:12, src/templates/notices/horizontal-notice.php:50, src/templates/notices/horizontal-notice.php:52
|
4968 |
-
msgid "Dismiss"
|
4969 |
-
msgstr ""
|
4970 |
-
|
4971 |
#: src/templates/notices/cookie-based-brute-force-prevention-disabled.php:4
|
4972 |
msgid "Cookie based brute force login prevention currently disabled"
|
4973 |
msgstr ""
|
120 |
msgid "Nonce check failed for save blacklist settings!"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: src/admin/wp-security-blacklist-menu.php:132, src/admin/wp-security-brute-force-menu.php:748, src/admin/wp-security-firewall-menu.php:1210, src/admin/wp-security-list-404.php:234, src/admin/wp-security-list-comment-spammer-ip.php:205, src/classes/wp-security-general-init-tasks.php:323
|
124 |
msgid "The plugin was unable to write to the .htaccess file. Please edit file manually."
|
125 |
msgstr ""
|
126 |
|
144 |
msgid "By blocking people via the .htaccess file your are using the most secure first line of defence which denies all access to blacklisted visitors as soon as they hit your hosting server."
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: src/admin/wp-security-blacklist-menu.php:154, src/admin/wp-security-firewall-menu.php:1042
|
148 |
msgid "All In One WP Security & Firewall Premium"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: src/admin/wp-security-blacklist-menu.php:155, src/admin/wp-security-firewall-menu.php:1043
|
152 |
msgid "You may also be interested in %s."
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: src/admin/wp-security-blacklist-menu.php:156, src/admin/wp-security-firewall-menu.php:1044
|
156 |
msgid "This plugin adds a number of extra features including %s and %s."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: src/admin/wp-security-blacklist-menu.php:156, src/admin/wp-security-firewall-menu.php:1044
|
160 |
msgid "smart 404 blocking"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: src/admin/wp-security-blacklist-menu.php:156, src/admin/wp-security-firewall-menu.php:1044
|
164 |
msgid "country IP blocking"
|
165 |
msgstr ""
|
166 |
|
200 |
msgid "Enter one or more user agent strings."
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: src/admin/wp-security-blacklist-menu.php:208, src/admin/wp-security-brute-force-menu.php:374, src/admin/wp-security-brute-force-menu.php:408, src/admin/wp-security-brute-force-menu.php:431, src/admin/wp-security-brute-force-menu.php:452, src/admin/wp-security-filescan-menu.php:311, src/admin/wp-security-filescan-menu.php:328, src/admin/wp-security-firewall-menu.php:175, src/admin/wp-security-firewall-menu.php:212, src/admin/wp-security-firewall-menu.php:232, src/admin/wp-security-firewall-menu.php:258, src/admin/wp-security-firewall-menu.php:385, src/admin/wp-security-firewall-menu.php:415, src/admin/wp-security-firewall-menu.php:446, src/admin/wp-security-firewall-menu.php:474, src/admin/wp-security-firewall-menu.php:503, src/admin/wp-security-firewall-menu.php:681, src/admin/wp-security-firewall-menu.php:699, src/admin/wp-security-firewall-menu.php:853, src/admin/wp-security-firewall-menu.php:1071, src/admin/wp-security-firewall-menu.php:1094, src/admin/wp-security-spam-menu.php:185, src/admin/wp-security-spam-menu.php:396, src/admin/wp-security-spam-menu.php:438, src/admin/wp-security-user-login-menu.php:358, src/templates/info/ip-address-ip-range-info.php:2
|
204 |
msgid "More Info"
|
205 |
msgstr ""
|
206 |
|
216 |
msgid "Example 2 - A list of more than 1 user agent strings to block"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: src/admin/wp-security-blacklist-menu.php:222, src/admin/wp-security-brute-force-menu.php:214, src/admin/wp-security-brute-force-menu.php:684, src/admin/wp-security-brute-force-menu.php:810, src/admin/wp-security-brute-force-menu.php:872, src/admin/wp-security-filescan-menu.php:355, src/admin/wp-security-filesystem-menu.php:242, src/admin/wp-security-firewall-menu.php:930, src/admin/wp-security-firewall-menu.php:1113, src/admin/wp-security-misc-options-menu.php:167, src/admin/wp-security-misc-options-menu.php:218, src/admin/wp-security-misc-options-menu.php:278, src/admin/wp-security-settings-menu.php:608, src/admin/wp-security-settings-menu.php:669, src/admin/wp-security-spam-menu.php:234, src/admin/wp-security-spam-menu.php:413, src/admin/wp-security-spam-menu.php:534, src/admin/wp-security-spam-menu.php:596, src/admin/wp-security-user-login-menu.php:379, src/admin/wp-security-user-login-menu.php:415, src/admin/wp-security-user-login-menu.php:598, src/admin/wp-security-user-login-menu.php:786, src/admin/wp-security-user-registration-menu.php:150, src/admin/wp-security-user-registration-menu.php:243, src/admin/wp-security-user-registration-menu.php:306
|
220 |
msgid "Save Settings"
|
221 |
msgstr ""
|
222 |
|
252 |
msgid "You must use alpha numeric characters for your login page slug."
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: src/admin/wp-security-brute-force-menu.php:117, src/admin/wp-security-filescan-menu.php:175, src/admin/wp-security-firewall-menu.php:997, src/admin/wp-security-spam-menu.php:101, src/admin/wp-security-spam-menu.php:274, src/admin/wp-security-spam-menu.php:308, src/admin/wp-security-user-login-menu.php:161, src/admin/wp-security-user-login-menu.php:551
|
256 |
msgid "Attention!"
|
257 |
msgstr ""
|
258 |
|
356 |
msgid "The features in this tab will stop the majority of brute force login attacks thus providing even better protection for your WP login page."
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: src/admin/wp-security-brute-force-menu.php:307, src/admin/wp-security-firewall-menu.php:654
|
360 |
msgid "backup"
|
361 |
msgstr ""
|
362 |
|
752 |
msgid "Permanently Blocked IP Addresses"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: src/admin/wp-security-dashboard-menu.php:183, src/admin/wp-security-firewall-menu.php:1128, src/admin/wp-security-user-login-menu.php:482, src/admin/wp-security-user-login-menu.php:639, src/admin/wp-security-user-registration-menu.php:164
|
756 |
msgid "Search"
|
757 |
msgstr ""
|
758 |
|
1538 |
msgid "You have successfully saved the Prevent Access to Default WP Files configuration."
|
1539 |
msgstr ""
|
1540 |
|
1541 |
+
#: src/admin/wp-security-filesystem-menu.php:286, src/admin/wp-security-firewall-menu.php:126, src/admin/wp-security-firewall-menu.php:346, src/admin/wp-security-firewall-menu.php:613, src/admin/wp-security-firewall-menu.php:897, src/admin/wp-security-settings-menu.php:761, src/admin/wp-security-spam-menu.php:124
|
1542 |
msgid "Could not write to the .htaccess file. Please check the file permissions."
|
1543 |
msgstr ""
|
1544 |
|
1654 |
msgid "Custom Rules"
|
1655 |
msgstr ""
|
1656 |
|
1657 |
+
#: src/admin/wp-security-firewall-menu.php:122, src/admin/wp-security-firewall-menu.php:893, src/admin/wp-security-spam-menu.php:120, src/admin/wp-security-spam-menu.php:502, src/admin/wp-security-spam-menu.php:564, src/admin/wp-security-user-registration-menu.php:95
|
1658 |
msgid "Settings were successfully saved"
|
1659 |
msgstr ""
|
1660 |
|
1661 |
+
#: src/admin/wp-security-firewall-menu.php:131, src/admin/wp-security-firewall-menu.php:651
|
1662 |
msgid "Firewall Settings"
|
1663 |
msgstr ""
|
1664 |
|
1966 |
msgid "Save Additional Firewall Settings"
|
1967 |
msgstr ""
|
1968 |
|
1969 |
+
#: src/admin/wp-security-firewall-menu.php:609
|
1970 |
msgid "You have successfully saved the 5G/6G Firewall Protection configuration"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
+
#: src/admin/wp-security-firewall-menu.php:633
|
1974 |
msgid "All in One WP Security and Firewall"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: src/admin/wp-security-firewall-menu.php:634
|
1978 |
msgid "We were unable to access the firewall's configuration file:"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
+
#: src/admin/wp-security-firewall-menu.php:636
|
1982 |
msgid "As a result, the firewall will be unavailable."
|
1983 |
msgstr ""
|
1984 |
|
1985 |
+
#: src/admin/wp-security-firewall-menu.php:637
|
1986 |
msgid "Please check your PHP error log for further information."
|
1987 |
msgstr ""
|
1988 |
|
1989 |
+
#: src/admin/wp-security-firewall-menu.php:638
|
1990 |
msgid "If you're unable to locate your PHP log file, please contact your web hosting company to ask them where it can be found on their setup."
|
1991 |
msgstr ""
|
1992 |
|
1993 |
+
#: src/admin/wp-security-firewall-menu.php:655
|
1994 |
msgid "This feature allows you to activate the %s (or legacy %s) firewall security protection rules designed and produced by %s."
|
1995 |
msgstr ""
|
1996 |
|
1997 |
+
#: src/admin/wp-security-firewall-menu.php:656
|
1998 |
msgid "The 6G Blacklist is updated and improved version of 5G Blacklist. If you have 5G Blacklist active, you might consider activating 6G Blacklist instead."
|
1999 |
msgstr ""
|
2000 |
|
2001 |
+
#: src/admin/wp-security-firewall-menu.php:657
|
2002 |
msgid "The 6G Blacklist is a simple, flexible blacklist that helps reduce the number of malicious URL requests that hit your website."
|
2003 |
msgstr ""
|
2004 |
|
2005 |
+
#: src/admin/wp-security-firewall-menu.php:658
|
2006 |
msgid "The added advantage of applying the 6G firewall to your site is that it has been tested and confirmed by the people at PerishablePress.com to be an optimal and least disruptive set of .htaccess security rules for general WP sites running on an Apache server or similar."
|
2007 |
msgstr ""
|
2008 |
|
2009 |
+
#: src/admin/wp-security-firewall-menu.php:659
|
2010 |
msgid "Therefore the 6G firewall rules should not have any impact on your site's general functionality but if you wish you can take a %s of your .htaccess file before proceeding."
|
2011 |
msgstr ""
|
2012 |
|
2013 |
+
#: src/admin/wp-security-firewall-menu.php:665
|
2014 |
msgid "6G Blacklist/Firewall Settings"
|
2015 |
msgstr ""
|
2016 |
|
2017 |
+
#: src/admin/wp-security-firewall-menu.php:677
|
2018 |
msgid "Enable 6G Firewall Protection"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
+
#: src/admin/wp-security-firewall-menu.php:680
|
2022 |
msgid "Check this if you want to apply the 6G Blacklist firewall protection from perishablepress.com to your site."
|
2023 |
msgstr ""
|
2024 |
|
2025 |
+
#: src/admin/wp-security-firewall-menu.php:684
|
2026 |
msgid "This setting will implement the 6G security firewall protection mechanisms on your site which include the following things:"
|
2027 |
msgstr ""
|
2028 |
|
2029 |
+
#: src/admin/wp-security-firewall-menu.php:685, src/admin/wp-security-firewall-menu.php:703
|
2030 |
msgid "1) Block forbidden characters commonly used in exploitative attacks."
|
2031 |
msgstr ""
|
2032 |
|
2033 |
+
#: src/admin/wp-security-firewall-menu.php:686, src/admin/wp-security-firewall-menu.php:704
|
2034 |
msgid "2) Block malicious encoded URL characters such as the \".css(\" string."
|
2035 |
msgstr ""
|
2036 |
|
2037 |
+
#: src/admin/wp-security-firewall-menu.php:687, src/admin/wp-security-firewall-menu.php:705
|
2038 |
msgid "3) Guard against the common patterns and specific exploits in the root portion of targeted URLs."
|
2039 |
msgstr ""
|
2040 |
|
2041 |
+
#: src/admin/wp-security-firewall-menu.php:688, src/admin/wp-security-firewall-menu.php:706
|
2042 |
msgid "4) Stop attackers from manipulating query strings by disallowing illicit characters."
|
2043 |
msgstr ""
|
2044 |
|
2045 |
+
#: src/admin/wp-security-firewall-menu.php:689, src/admin/wp-security-firewall-menu.php:707
|
2046 |
msgid "....and much more."
|
2047 |
msgstr ""
|
2048 |
|
2049 |
+
#: src/admin/wp-security-firewall-menu.php:695
|
2050 |
msgid "Enable legacy 5G Firewall Protection"
|
2051 |
msgstr ""
|
2052 |
|
2053 |
+
#: src/admin/wp-security-firewall-menu.php:698
|
2054 |
msgid "Check this if you want to apply the 5G Blacklist firewall protection from perishablepress.com to your site."
|
2055 |
msgstr ""
|
2056 |
|
2057 |
+
#: src/admin/wp-security-firewall-menu.php:702
|
2058 |
msgid "This setting will implement the 5G security firewall protection mechanisms on your site which include the following things:"
|
2059 |
msgstr ""
|
2060 |
|
2061 |
+
#: src/admin/wp-security-firewall-menu.php:713
|
2062 |
msgid "Save 5G/6G Firewall Settings"
|
2063 |
msgstr ""
|
2064 |
|
2065 |
+
#: src/admin/wp-security-firewall-menu.php:721
|
2066 |
msgid "6G block request methods"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
+
#: src/admin/wp-security-firewall-menu.php:726
|
2070 |
msgid "Block %s method"
|
2071 |
msgstr ""
|
2072 |
|
2073 |
+
#: src/admin/wp-security-firewall-menu.php:729
|
2074 |
msgid "Check this to block the %s request method"
|
2075 |
msgstr ""
|
2076 |
|
2077 |
+
#: src/admin/wp-security-firewall-menu.php:734
|
2078 |
msgid "Save request methods settings"
|
2079 |
msgstr ""
|
2080 |
|
2081 |
+
#: src/admin/wp-security-firewall-menu.php:742
|
2082 |
msgid "6G other settings"
|
2083 |
msgstr ""
|
2084 |
|
2085 |
+
#: src/admin/wp-security-firewall-menu.php:746
|
2086 |
msgid "Block query strings"
|
2087 |
msgstr ""
|
2088 |
|
2089 |
+
#: src/admin/wp-security-firewall-menu.php:749
|
2090 |
msgid "Check this to block all query strings recommended by 6G"
|
2091 |
msgstr ""
|
2092 |
|
2093 |
+
#: src/admin/wp-security-firewall-menu.php:753
|
2094 |
msgid "Block request strings"
|
2095 |
msgstr ""
|
2096 |
|
2097 |
+
#: src/admin/wp-security-firewall-menu.php:756
|
2098 |
msgid "Check this to block all request strings recommended by 6G"
|
2099 |
msgstr ""
|
2100 |
|
2101 |
+
#: src/admin/wp-security-firewall-menu.php:760
|
2102 |
msgid "Block referrers"
|
2103 |
msgstr ""
|
2104 |
|
2105 |
+
#: src/admin/wp-security-firewall-menu.php:763
|
2106 |
msgid "Check this to block all referrers recommended by 6G"
|
2107 |
msgstr ""
|
2108 |
|
2109 |
+
#: src/admin/wp-security-firewall-menu.php:767
|
2110 |
msgid "Block user-agents"
|
2111 |
msgstr ""
|
2112 |
|
2113 |
+
#: src/admin/wp-security-firewall-menu.php:770
|
2114 |
msgid "Check this to block all user-agents recommended by 6G"
|
2115 |
msgstr ""
|
2116 |
|
2117 |
+
#: src/admin/wp-security-firewall-menu.php:774
|
2118 |
msgid "Save other settings"
|
2119 |
msgstr ""
|
2120 |
|
2121 |
+
#: src/admin/wp-security-firewall-menu.php:808
|
2122 |
msgid "The Internet bot settings were successfully saved"
|
2123 |
msgstr ""
|
2124 |
|
2125 |
+
#: src/admin/wp-security-firewall-menu.php:812
|
2126 |
msgid "Internet Bot Settings"
|
2127 |
msgstr ""
|
2128 |
|
2129 |
+
#: src/admin/wp-security-firewall-menu.php:818
|
2130 |
msgid "What is an Internet Bot"
|
2131 |
msgstr ""
|
2132 |
|
2133 |
+
#: src/admin/wp-security-firewall-menu.php:819
|
2134 |
msgid "%s?"
|
2135 |
msgstr ""
|
2136 |
|
2137 |
+
#: src/admin/wp-security-firewall-menu.php:821
|
2138 |
msgid "A bot is a piece of software which runs on the Internet and performs automatic tasks. For example when Google indexes your pages it uses automatic bots to achieve this task."
|
2139 |
msgstr ""
|
2140 |
|
2141 |
+
#: src/admin/wp-security-firewall-menu.php:822
|
2142 |
msgid "A lot of bots are legitimate and non-malicous but not all bots are good and often you will find some which try to impersonate legitimate bots such as \"Googlebot\" but in reality they have nohing to do with Google at all."
|
2143 |
msgstr ""
|
2144 |
|
2145 |
+
#: src/admin/wp-security-firewall-menu.php:823
|
2146 |
msgid "Although most of the bots out there are relatively harmless sometimes website owners want to have more control over which bots they allow into their site."
|
2147 |
msgstr ""
|
2148 |
|
2149 |
+
#: src/admin/wp-security-firewall-menu.php:824
|
2150 |
msgid "This feature allows you to block bots which are impersonating as a Googlebot but actually aren't. (In other words they are fake Google bots)"
|
2151 |
msgstr ""
|
2152 |
|
2153 |
+
#: src/admin/wp-security-firewall-menu.php:825
|
2154 |
msgid "Googlebots have a unique indentity which cannot easily be forged and this feature will indentify any fake Google bots and block them from reading your site's pages."
|
2155 |
msgstr ""
|
2156 |
|
2157 |
+
#: src/admin/wp-security-firewall-menu.php:831
|
2158 |
msgid "<strong>Attention</strong>: Sometimes non-malicious Internet organizations might have bots which impersonate as a \"Googlebot\"."
|
2159 |
msgstr ""
|
2160 |
|
2161 |
+
#: src/admin/wp-security-firewall-menu.php:832
|
2162 |
msgid "Just be aware that if you activate this feature the plugin will block all bots which use the \"Googlebot\" string in their User Agent information but are NOT officially from Google (irrespective whether they are malicious or not)."
|
2163 |
msgstr ""
|
2164 |
|
2165 |
+
#: src/admin/wp-security-firewall-menu.php:833
|
2166 |
msgid "All other bots from other organizations such as \"Yahoo\", \"Bing\" etc will not be affected by this feature."
|
2167 |
msgstr ""
|
2168 |
|
2169 |
+
#: src/admin/wp-security-firewall-menu.php:839, src/admin/wp-security-firewall-menu.php:849, src/classes/grade-system/wp-security-feature-item-manager.php:116
|
2170 |
msgid "Block Fake Googlebots"
|
2171 |
msgstr ""
|
2172 |
|
2173 |
+
#: src/admin/wp-security-firewall-menu.php:852
|
2174 |
msgid "Check this if you want to block all fake Googlebots."
|
2175 |
msgstr ""
|
2176 |
|
2177 |
+
#: src/admin/wp-security-firewall-menu.php:856
|
2178 |
msgid "This feature will check if the User Agent information of a bot contains the string \"Googlebot\"."
|
2179 |
msgstr ""
|
2180 |
|
2181 |
+
#: src/admin/wp-security-firewall-menu.php:857
|
2182 |
msgid "It will then perform a few tests to verify if the bot is legitimately from Google and if so it will allow the bot to proceed."
|
2183 |
msgstr ""
|
2184 |
|
2185 |
+
#: src/admin/wp-security-firewall-menu.php:858
|
2186 |
msgid "If the bot fails the checks then the plugin will mark it as being a fake Googlebot and it will block it"
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: src/admin/wp-security-firewall-menu.php:865
|
2190 |
msgid "Save Internet Bot Settings"
|
2191 |
msgstr ""
|
2192 |
|
2193 |
+
#: src/admin/wp-security-firewall-menu.php:901, src/admin/wp-security-firewall-menu.php:923, src/classes/grade-system/wp-security-feature-item-manager.php:42
|
2194 |
msgid "Prevent Image Hotlinking"
|
2195 |
msgstr ""
|
2196 |
|
2197 |
+
#: src/admin/wp-security-firewall-menu.php:904
|
2198 |
msgid "A Hotlink is where someone displays an image on their site which is actually located on your site by using a direct link to the source of the image on your server."
|
2199 |
msgstr ""
|
2200 |
|
2201 |
+
#: src/admin/wp-security-firewall-menu.php:905
|
2202 |
msgid "Due to the fact that the image being displayed on the other person's site is coming from your server, this can cause leaking of bandwidth and resources for you because your server has to present this image for the people viewing it on someone elses's site."
|
2203 |
msgstr ""
|
2204 |
|
2205 |
+
#: src/admin/wp-security-firewall-menu.php:906
|
2206 |
msgid "This feature will prevent people from directly hotlinking images from your site's pages by writing some directives in your .htaccess file."
|
2207 |
msgstr ""
|
2208 |
|
2209 |
+
#: src/admin/wp-security-firewall-menu.php:911
|
2210 |
msgid "Prevent Hotlinking"
|
2211 |
msgstr ""
|
2212 |
|
2213 |
+
#: src/admin/wp-security-firewall-menu.php:926
|
2214 |
msgid "Check this if you want to prevent hotlinking to images on your site."
|
2215 |
msgstr ""
|
2216 |
|
2217 |
+
#: src/admin/wp-security-firewall-menu.php:946
|
2218 |
msgid "Nonce check failed for delete all 404 event logs operation!"
|
2219 |
msgstr ""
|
2220 |
|
2221 |
+
#: src/admin/wp-security-firewall-menu.php:957
|
2222 |
msgid "404 Detection Feature - Delete all 404 event logs operation failed!"
|
2223 |
msgstr ""
|
2224 |
|
2225 |
+
#: src/admin/wp-security-firewall-menu.php:961
|
2226 |
msgid "All 404 event logs were deleted from the DB successfully!"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
+
#: src/admin/wp-security-firewall-menu.php:985, src/admin/wp-security-user-login-menu.php:111
|
2230 |
msgid "You entered a non numeric value for the lockout time length field. It has been set to the default value."
|
2231 |
msgstr ""
|
2232 |
|
2233 |
+
#: src/admin/wp-security-firewall-menu.php:991
|
2234 |
msgid "You entered an incorrect format for the \"Redirect URL\" field. It has been set to the default value."
|
2235 |
msgstr ""
|
2236 |
|
2237 |
+
#: src/admin/wp-security-firewall-menu.php:1026
|
2238 |
msgid "404 Detection Configuration"
|
2239 |
msgstr ""
|
2240 |
|
2241 |
+
#: src/admin/wp-security-firewall-menu.php:1029
|
2242 |
msgid "A 404 or Not Found error occurs when somebody tries to access a non-existent page on your website."
|
2243 |
msgstr ""
|
2244 |
|
2245 |
+
#: src/admin/wp-security-firewall-menu.php:1030
|
2246 |
msgid "Typically, most 404 errors happen quite innocently when people have mis-typed a URL or used an old link to page which doesn't exist anymore."
|
2247 |
msgstr ""
|
2248 |
|
2249 |
+
#: src/admin/wp-security-firewall-menu.php:1031
|
2250 |
msgid "However, in some cases you may find many repeated 404 errors which occur in a relatively short space of time and from the same IP address which are all attempting to access a variety of non-existent page URLs."
|
2251 |
msgstr ""
|
2252 |
|
2253 |
+
#: src/admin/wp-security-firewall-menu.php:1032
|
2254 |
msgid "Such behaviour can mean that a hacker might be trying to find a particular page or URL for sinister reasons."
|
2255 |
msgstr ""
|
2256 |
|
2257 |
+
#: src/admin/wp-security-firewall-menu.php:1033
|
2258 |
msgid "This feature allows you to monitor all 404 events which occur on your site, and it also gives you the option of blocking IP addresses for a configured length of time."
|
2259 |
msgstr ""
|
2260 |
|
2261 |
+
#: src/admin/wp-security-firewall-menu.php:1034
|
2262 |
msgid "If you want to temporarily block or blacklist an IP address, simply click the \"Temp Block\" or \"Blacklist IP\" link for the applicable IP entry in the \"404 Event Logs\" table below."
|
2263 |
msgstr ""
|
2264 |
|
2265 |
+
#: src/admin/wp-security-firewall-menu.php:1055
|
2266 |
msgid "404 Detection Options"
|
2267 |
msgstr ""
|
2268 |
|
2269 |
+
#: src/admin/wp-security-firewall-menu.php:1067
|
2270 |
msgid "Enable 404 IP Detection and Lockout"
|
2271 |
msgstr ""
|
2272 |
|
2273 |
+
#: src/admin/wp-security-firewall-menu.php:1070
|
2274 |
msgid "Check this if you want to enable the lockout of selected IP addresses."
|
2275 |
msgstr ""
|
2276 |
|
2277 |
+
#: src/admin/wp-security-firewall-menu.php:1075
|
2278 |
msgid "When you enable this checkbox, all 404 events on your site will be logged in the table below. You can monitor these events and select some IP addresses listed in the table below and block them for a specified amount of time. All IP addresses you select to be blocked from the \"404 Event Logs\" table section will be unable to access your site during the time specified."
|
2279 |
msgstr ""
|
2280 |
|
2281 |
+
#: src/admin/wp-security-firewall-menu.php:1083
|
2282 |
msgid "Enable 404 Event Logging"
|
2283 |
msgstr ""
|
2284 |
|
2285 |
+
#: src/admin/wp-security-firewall-menu.php:1086
|
2286 |
msgid "Check this if you want to enable the logging of 404 events"
|
2287 |
msgstr ""
|
2288 |
|
2289 |
+
#: src/admin/wp-security-firewall-menu.php:1091
|
2290 |
msgid "Time Length of 404 Lockout (min)"
|
2291 |
msgstr ""
|
2292 |
|
2293 |
+
#: src/admin/wp-security-firewall-menu.php:1093
|
2294 |
msgid "Set the length of time for which a blocked IP address will be prevented from visiting your site"
|
2295 |
msgstr ""
|
2296 |
|
2297 |
+
#: src/admin/wp-security-firewall-menu.php:1098
|
2298 |
msgid "You can lock any IP address which is recorded in the \"404 Event Logs\" table section below."
|
2299 |
msgstr ""
|
2300 |
|
2301 |
+
#: src/admin/wp-security-firewall-menu.php:1100
|
2302 |
msgid "To temporarily lock an IP address, hover over the ID column and click the \"Temp Block\" link for the applicable IP entry."
|
2303 |
msgstr ""
|
2304 |
|
2305 |
+
#: src/admin/wp-security-firewall-menu.php:1107
|
2306 |
msgid "404 Lockout Redirect URL"
|
2307 |
msgstr ""
|
2308 |
|
2309 |
+
#: src/admin/wp-security-firewall-menu.php:1109
|
2310 |
msgid "A blocked visitor will be automatically redirected to this URL."
|
2311 |
msgstr ""
|
2312 |
|
2313 |
+
#: src/admin/wp-security-firewall-menu.php:1118
|
2314 |
msgid "404 Event Logs"
|
2315 |
msgstr ""
|
2316 |
|
2317 |
+
#: src/admin/wp-security-firewall-menu.php:1140, src/admin/wp-security-firewall-menu.php:1149, src/admin/wp-security-user-login-menu.php:492, src/admin/wp-security-user-login-menu.php:501, src/admin/wp-security-user-login-menu.php:649, src/admin/wp-security-user-login-menu.php:658
|
2318 |
msgid "Export to CSV"
|
2319 |
msgstr ""
|
2320 |
|
2321 |
+
#: src/admin/wp-security-firewall-menu.php:1146, src/admin/wp-security-user-login-menu.php:498, src/admin/wp-security-user-login-menu.php:655
|
2322 |
msgid "Click this button if you wish to download this log in CSV format."
|
2323 |
msgstr ""
|
2324 |
|
2325 |
+
#: src/admin/wp-security-firewall-menu.php:1153, src/admin/wp-security-firewall-menu.php:1162
|
2326 |
msgid "Delete All 404 Event Logs"
|
2327 |
msgstr ""
|
2328 |
|
2329 |
+
#: src/admin/wp-security-firewall-menu.php:1159
|
2330 |
msgid "Click this button if you wish to purge all 404 event logs from the DB."
|
2331 |
msgstr ""
|
2332 |
|
2333 |
+
#: src/admin/wp-security-firewall-menu.php:1218
|
2334 |
msgid "Custom .htaccess Rules Settings"
|
2335 |
msgstr ""
|
2336 |
|
2337 |
+
#: src/admin/wp-security-firewall-menu.php:1225
|
2338 |
msgid "This feature can be used to apply your own custom .htaccess rules and directives."
|
2339 |
msgstr ""
|
2340 |
|
2341 |
+
#: src/admin/wp-security-firewall-menu.php:1226
|
2342 |
msgid "It is useful for when you want to tweak our existing firewall rules or when you want to add your own."
|
2343 |
msgstr ""
|
2344 |
|
2345 |
+
#: src/admin/wp-security-firewall-menu.php:1227
|
2346 |
msgid "NOTE: This feature can only be used if your site is hosted in an apache or similar web server."
|
2347 |
msgstr ""
|
2348 |
|
2349 |
+
#: src/admin/wp-security-firewall-menu.php:1233
|
2350 |
msgid "<strong>Warning</strong>: Only use this feature if you know what you are doing."
|
2351 |
msgstr ""
|
2352 |
|
2353 |
+
#: src/admin/wp-security-firewall-menu.php:1234
|
2354 |
msgid "Incorrect .htaccess rules or directives can break or prevent access to your site."
|
2355 |
msgstr ""
|
2356 |
|
2357 |
+
#: src/admin/wp-security-firewall-menu.php:1235
|
2358 |
msgid "It is your responsibility to ensure that you are entering the correct code!"
|
2359 |
msgstr ""
|
2360 |
|
2361 |
+
#: src/admin/wp-security-firewall-menu.php:1236
|
2362 |
msgid "If you break your site you will need to access your server via FTP or something similar and then edit your .htaccess file and delete the changes you made."
|
2363 |
msgstr ""
|
2364 |
|
2365 |
+
#: src/admin/wp-security-firewall-menu.php:1242
|
2366 |
msgid "Custom .htaccess Rules"
|
2367 |
msgstr ""
|
2368 |
|
2369 |
+
#: src/admin/wp-security-firewall-menu.php:1246
|
2370 |
msgid "Enable Custom .htaccess Rules"
|
2371 |
msgstr ""
|
2372 |
|
2373 |
+
#: src/admin/wp-security-firewall-menu.php:1249
|
2374 |
msgid "Check this if you want to enable custom rules entered in the text box below"
|
2375 |
msgstr ""
|
2376 |
|
2377 |
+
#: src/admin/wp-security-firewall-menu.php:1253
|
2378 |
msgid "Place custom rules at the top"
|
2379 |
msgstr ""
|
2380 |
|
2381 |
+
#: src/admin/wp-security-firewall-menu.php:1256
|
2382 |
msgid "Check this if you want to place your custom rules at the beginning of all the rules applied by this plugin"
|
2383 |
msgstr ""
|
2384 |
|
2385 |
+
#: src/admin/wp-security-firewall-menu.php:1260
|
2386 |
msgid "Enter Custom .htaccess Rules:"
|
2387 |
msgstr ""
|
2388 |
|
2389 |
+
#: src/admin/wp-security-firewall-menu.php:1264
|
2390 |
msgid "Enter your custom .htaccess rules/directives."
|
2391 |
msgstr ""
|
2392 |
|
2393 |
+
#: src/admin/wp-security-firewall-menu.php:1269
|
2394 |
msgid "Save Custom Rules"
|
2395 |
msgstr ""
|
2396 |
|
2397 |
+
#: src/admin/wp-security-firewall-setup-notice.php:338, src/admin/wp-security-firewall-setup-notice.php:407, src/admin/wp-security-firewall-setup-notice.php:479, src/admin/wp-security-firewall-setup-notice.php:595, src/wp-security.php:43
|
2398 |
msgid "All In One WP Security and Firewall"
|
2399 |
msgstr ""
|
2400 |
|
2401 |
+
#: src/admin/wp-security-firewall-setup-notice.php:340
|
2402 |
msgid "We were unable to create the file necessary to give you the highest level of protection."
|
2403 |
msgstr ""
|
2404 |
|
2405 |
+
#: src/admin/wp-security-firewall-setup-notice.php:341
|
2406 |
msgid "Your firewall will have reduced protection which means some of your firewall's functionality will be unavailable."
|
2407 |
msgstr ""
|
2408 |
|
2409 |
+
#: src/admin/wp-security-firewall-setup-notice.php:342
|
2410 |
msgid "If you would like to manually set up the necessary file, please follow these steps:"
|
2411 |
msgstr ""
|
2412 |
|
2413 |
+
#: src/admin/wp-security-firewall-setup-notice.php:346, src/admin/wp-security-firewall-setup-notice.php:453
|
2414 |
msgid "1. Create a file with the name %s in the same directory as your WordPress install is in, i.e.:"
|
2415 |
msgstr ""
|
2416 |
|
2417 |
+
#: src/admin/wp-security-firewall-setup-notice.php:350
|
2418 |
msgid "2. Paste in the following code:"
|
2419 |
msgstr ""
|
2420 |
|
2421 |
+
#: src/admin/wp-security-firewall-setup-notice.php:352, src/admin/wp-security-firewall-setup-notice.php:462
|
2422 |
msgid "3. Save the file and press the 'Try again' button below:"
|
2423 |
msgstr ""
|
2424 |
|
2425 |
+
#: src/admin/wp-security-firewall-setup-notice.php:372
|
2426 |
msgid "1. Open the following file:"
|
2427 |
msgstr ""
|
2428 |
|
2429 |
+
#: src/admin/wp-security-firewall-setup-notice.php:378
|
2430 |
msgid "2. Look for the auto_prepend_file directive."
|
2431 |
msgstr ""
|
2432 |
|
2433 |
+
#: src/admin/wp-security-firewall-setup-notice.php:382
|
2434 |
msgid "2. Look for the following:"
|
2435 |
msgstr ""
|
2436 |
|
2437 |
+
#: src/admin/wp-security-firewall-setup-notice.php:388
|
2438 |
msgid "3. Change it to the following:"
|
2439 |
msgstr ""
|
2440 |
|
2441 |
+
#: src/admin/wp-security-firewall-setup-notice.php:392
|
2442 |
msgid "4. Save the file and press the 'Try again' button below:"
|
2443 |
msgstr ""
|
2444 |
|
2445 |
+
#: src/admin/wp-security-firewall-setup-notice.php:392, src/admin/wp-security-firewall-setup-notice.php:441
|
2446 |
msgid "You may have to wait up to 5 minutes before the settings take effect."
|
2447 |
msgstr ""
|
2448 |
|
2449 |
+
#: src/admin/wp-security-firewall-setup-notice.php:410
|
2450 |
msgid "Your firewall has been installed with the highest level of protection."
|
2451 |
msgstr ""
|
2452 |
|
2453 |
+
#: src/admin/wp-security-firewall-setup-notice.php:411
|
2454 |
msgid "You may have to wait 5 minutes for the changes to take effect."
|
2455 |
msgstr ""
|
2456 |
|
2457 |
+
#: src/admin/wp-security-firewall-setup-notice.php:434
|
2458 |
msgid "1. Open your php.ini file."
|
2459 |
msgstr ""
|
2460 |
|
2461 |
+
#: src/admin/wp-security-firewall-setup-notice.php:437
|
2462 |
msgid "2. Set the auto_prepend_file directive like below:"
|
2463 |
msgstr ""
|
2464 |
|
2465 |
+
#: src/admin/wp-security-firewall-setup-notice.php:441
|
2466 |
msgid "3. Restart the webserver and refresh the page"
|
2467 |
msgstr ""
|
2468 |
|
2469 |
+
#: src/admin/wp-security-firewall-setup-notice.php:458
|
2470 |
msgid "2. Paste in the following directives:"
|
2471 |
msgstr ""
|
2472 |
|
2473 |
+
#: src/admin/wp-security-firewall-setup-notice.php:482
|
2474 |
msgid "We were unable to set up your firewall with the highest level of protection."
|
2475 |
msgstr ""
|
2476 |
|
2477 |
+
#: src/admin/wp-security-firewall-setup-notice.php:483
|
2478 |
msgid "Your firewall will have reduced functionality."
|
2479 |
msgstr ""
|
2480 |
|
2481 |
+
#: src/admin/wp-security-firewall-setup-notice.php:487
|
2482 |
msgid "To give your site the highest level of protection, please follow these steps:"
|
2483 |
msgstr ""
|
2484 |
|
2485 |
+
#: src/admin/wp-security-firewall-setup-notice.php:500
|
2486 |
msgid "Note: if you're unable to perform any of the aforementioned steps, please ask your web hosting provider for further assistance."
|
2487 |
msgstr ""
|
2488 |
|
2489 |
+
#: src/admin/wp-security-firewall-setup-notice.php:517
|
2490 |
msgid "Try again"
|
2491 |
msgstr ""
|
2492 |
|
2493 |
+
#: src/admin/wp-security-firewall-setup-notice.php:539
|
2494 |
msgid "We have detected that your AIOWPS firewall is not fully installed, and therefore does not have the highest level of protection. "
|
2495 |
msgstr ""
|
2496 |
|
2497 |
+
#: src/admin/wp-security-firewall-setup-notice.php:540
|
2498 |
msgid "Your firewall will have reduced functionality until it has been upgraded. "
|
2499 |
msgstr ""
|
2500 |
|
2501 |
+
#: src/admin/wp-security-firewall-setup-notice.php:542
|
2502 |
msgid "Upgrade your protection now"
|
2503 |
msgstr ""
|
2504 |
|
2505 |
+
#: src/admin/wp-security-firewall-setup-notice.php:598
|
2506 |
msgid "Our PHP-based firewall has been created to give you even greater protection."
|
2507 |
msgstr ""
|
2508 |
|
2509 |
+
#: src/admin/wp-security-firewall-setup-notice.php:602
|
2510 |
msgid "If you already have our .htaccess-based firewall enabled, you will still need to set up the PHP-based firewall to benefit from its protection."
|
2511 |
msgstr ""
|
2512 |
|
2513 |
+
#: src/admin/wp-security-firewall-setup-notice.php:605
|
2514 |
msgid "To set up the PHP-based firewall, press the 'Set up now' button below:"
|
2515 |
msgstr ""
|
2516 |
|
2517 |
+
#: src/admin/wp-security-firewall-setup-notice.php:608
|
2518 |
msgid "Set up now"
|
2519 |
msgstr ""
|
2520 |
|
2521 |
+
#: src/admin/wp-security-firewall-setup-notice.php:614, src/templates/notices/automated-database-backup-notice.php:10, src/templates/notices/automated-database-backup-notice.php:12, src/templates/notices/horizontal-notice.php:50, src/templates/notices/horizontal-notice.php:52
|
2522 |
+
msgid "Dismiss"
|
2523 |
+
msgstr ""
|
2524 |
+
|
2525 |
#: src/admin/wp-security-list-404.php:91
|
2526 |
msgid "Event Type"
|
2527 |
msgstr ""
|
4484 |
msgid "Advanced"
|
4485 |
msgstr ""
|
4486 |
|
4487 |
+
#: src/classes/wp-security-captcha.php:47, src/classes/wp-security-general-init-tasks.php:423
|
4488 |
msgid "Please enter an answer in digits:"
|
4489 |
msgstr ""
|
4490 |
|
4616 |
msgid "The following files were changed on your host"
|
4617 |
msgstr ""
|
4618 |
|
4619 |
+
#: src/classes/wp-security-general-init-tasks.php:209, src/classes/wp-security-general-init-tasks.php:497
|
4620 |
msgid "Application passwords have been disabled by All In One WP Security & Firewall plugin."
|
4621 |
msgstr ""
|
4622 |
|
4623 |
+
#: src/classes/wp-security-general-init-tasks.php:444, src/classes/wp-security-general-init-tasks.php:557, src/classes/wp-security-general-init-tasks.php:590, src/classes/wp-security-user-login.php:137, src/classes/wp-security-user-registration.php:74
|
4624 |
msgid "<strong>ERROR</strong>: Your answer was incorrect - please try again."
|
4625 |
msgstr ""
|
4626 |
|
4627 |
+
#: src/classes/wp-security-general-init-tasks.php:479
|
4628 |
msgid "Enter something special:"
|
4629 |
msgstr ""
|
4630 |
|
4631 |
+
#: src/classes/wp-security-general-init-tasks.php:492
|
4632 |
msgid "Application Passwords"
|
4633 |
msgstr ""
|
4634 |
|
4635 |
+
#: src/classes/wp-security-general-init-tasks.php:501
|
4636 |
msgid "Change Setting"
|
4637 |
msgstr ""
|
4638 |
|
4639 |
+
#: src/classes/wp-security-general-init-tasks.php:503
|
4640 |
msgid "Site admin can only change this setting."
|
4641 |
msgstr ""
|
4642 |
|
4643 |
+
#: src/classes/wp-security-general-init-tasks.php:532
|
4644 |
msgid "Error: You entered an incorrect CAPTCHA answer. Please go back and try again."
|
4645 |
msgstr ""
|
4646 |
|
4647 |
+
#: src/classes/wp-security-general-init-tasks.php:574
|
4648 |
msgid "Your CAPTCHA answer was incorrect - please try again."
|
4649 |
msgstr ""
|
4650 |
|
4651 |
+
#: src/classes/wp-security-general-init-tasks.php:583
|
4652 |
msgid "<strong>ERROR</strong>: Your IP address is currently locked please contact the administrator!"
|
4653 |
msgstr ""
|
4654 |
|
4655 |
+
#: src/classes/wp-security-general-init-tasks.php:658
|
4656 |
msgid "Your Google reCAPTCHA site key is wrong. Please fill the correct reCAPTCHA keys %s to use the Google reCAPTCHA feature."
|
4657 |
msgstr ""
|
4658 |
|
4659 |
+
#: src/classes/wp-security-general-init-tasks.php:658, src/classes/wp-security-notices.php:46
|
4660 |
msgid "here"
|
4661 |
msgstr ""
|
4662 |
|
4663 |
+
#: src/classes/wp-security-general-init-tasks.php:671
|
4664 |
msgid "Would you like All In One WP Security & Firewall to re-insert the security rules in your .htaccess file which were cleared when you deactivated the plugin?"
|
4665 |
msgstr ""
|
4666 |
|
4667 |
+
#: src/classes/wp-security-general-init-tasks.php:671
|
4668 |
msgid "Yes"
|
4669 |
msgstr ""
|
4670 |
|
4671 |
+
#: src/classes/wp-security-general-init-tasks.php:671, src/templates/notices/automated-database-backup-notice.php:27
|
4672 |
msgid "No"
|
4673 |
msgstr ""
|
4674 |
|
4675 |
+
#: src/classes/wp-security-general-init-tasks.php:690
|
4676 |
msgid "Your registration is pending approval."
|
4677 |
msgstr ""
|
4678 |
|
4968 |
msgid "Example 5: 2001:db8:1263::/48"
|
4969 |
msgstr ""
|
4970 |
|
|
|
|
|
|
|
|
|
4971 |
#: src/templates/notices/cookie-based-brute-force-prevention-disabled.php:4
|
4972 |
msgid "Cookie based brute force login prevention currently disabled"
|
4973 |
msgstr ""
|
other-includes/wp-security-rename-login-feature-pre-5-2.php
CHANGED
@@ -545,10 +545,8 @@ switch ($action) {
|
|
545 |
* @param WP_User $user The WP_User object for the user that's logging out.
|
546 |
*/
|
547 |
$redirect_to = apply_filters('logout_redirect', $redirect_to, $requested_redirect_to, $user);
|
548 |
-
|
549 |
-
|
550 |
-
// It is issue for AIOS rename page wp-admin after logout shows No Access. For wordpress it do not show logout message.
|
551 |
-
wp_redirect($redirect_to);
|
552 |
exit();
|
553 |
|
554 |
case 'lostpassword':
|
545 |
* @param WP_User $user The WP_User object for the user that's logging out.
|
546 |
*/
|
547 |
$redirect_to = apply_filters('logout_redirect', $redirect_to, $requested_redirect_to, $user);
|
548 |
+
|
549 |
+
wp_safe_redirect($redirect_to);
|
|
|
|
|
550 |
exit();
|
551 |
|
552 |
case 'lostpassword':
|
other-includes/wp-security-rename-login-feature-pre-5-7.php
CHANGED
@@ -813,9 +813,7 @@ switch ($action) {
|
|
813 |
*/
|
814 |
$redirect_to = apply_filters('logout_redirect', $redirect_to, $requested_redirect_to, $user);
|
815 |
|
816 |
-
|
817 |
-
// It is issue for AIOS rename page wp-admin after logout shows No Access. For wordpress it do not show logout message.
|
818 |
-
wp_redirect($redirect_to);
|
819 |
exit;
|
820 |
|
821 |
case 'lostpassword':
|
813 |
*/
|
814 |
$redirect_to = apply_filters('logout_redirect', $redirect_to, $requested_redirect_to, $user);
|
815 |
|
816 |
+
wp_safe_redirect($redirect_to);
|
|
|
|
|
817 |
exit;
|
818 |
|
819 |
case 'lostpassword':
|
other-includes/wp-security-rename-login-feature.php
CHANGED
@@ -670,10 +670,8 @@ switch ($action) {
|
|
670 |
* @param WP_User $user The WP_User object for the user that's logging out.
|
671 |
*/
|
672 |
$redirect_to = apply_filters('logout_redirect', $redirect_to, $requested_redirect_to, $user);
|
673 |
-
|
674 |
-
|
675 |
-
// It is issue for AIOS rename page wp-admin after logout shows No Access. For wordpress it do not show logout message.
|
676 |
-
wp_redirect($redirect_to);
|
677 |
exit;
|
678 |
|
679 |
case 'lostpassword':
|
670 |
* @param WP_User $user The WP_User object for the user that's logging out.
|
671 |
*/
|
672 |
$redirect_to = apply_filters('logout_redirect', $redirect_to, $requested_redirect_to, $user);
|
673 |
+
|
674 |
+
wp_safe_redirect($redirect_to);
|
|
|
|
|
675 |
exit;
|
676 |
|
677 |
case 'lostpassword':
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: security, secure, Anti Virus, antivirus, ban, ban hacker, virus, firewall,
|
|
5 |
Requires PHP: 5.6
|
6 |
Requires at least: 5.0
|
7 |
Tested up to: 6.0
|
8 |
-
Stable tag: 5.0.
|
9 |
License: GPLv3 or later
|
10 |
|
11 |
A comprehensive, user-friendly, all in one WordPress security and firewall plugin for your site.
|
@@ -179,6 +179,13 @@ https://www.tipsandtricks-hq.com/wordpress-security-and-firewall-plugin
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
= 5.0.6 - 07/September/2022 =
|
183 |
|
184 |
* FIX: Stopped host cron job working in a specific situation.
|
@@ -1043,4 +1050,4 @@ those who want to enable the basic firewall but do not have "AllowOverride" opti
|
|
1043 |
|
1044 |
|
1045 |
== Upgrade Notice ==
|
1046 |
-
* 5.0.
|
5 |
Requires PHP: 5.6
|
6 |
Requires at least: 5.0
|
7 |
Tested up to: 6.0
|
8 |
+
Stable tag: 5.0.7
|
9 |
License: GPLv3 or later
|
10 |
|
11 |
A comprehensive, user-friendly, all in one WordPress security and firewall plugin for your site.
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= 5.0.7 - 08/September/2022 =
|
183 |
+
|
184 |
+
* FIX: The Login URL was prefixed with the site URL instead of the home URL when the home URL is different than the site URL.
|
185 |
+
* FIX: Rename login and cookie-based brute force protection couldn't work simultaneously when the permalink was set to plain.
|
186 |
+
* FIX: Disabling the 5G Firewall Protection didn't remove the 5G rules from the .htaccess file.
|
187 |
+
* TWEAK: Add a 'Dismiss' button to the firewall setup notice.
|
188 |
+
|
189 |
= 5.0.6 - 07/September/2022 =
|
190 |
|
191 |
* FIX: Stopped host cron job working in a specific situation.
|
1050 |
|
1051 |
|
1052 |
== Upgrade Notice ==
|
1053 |
+
* 5.0.7: The 5.0 series has various new features such as a PHP-based firewall, Two Factor Authentication, and WHOIS lookup have been added. It contains various fixes and tweaks. 5.0.X releases are fixing issues discovered in the 5.0 branch. A recommended update for all.
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'project',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'updraftplus/all-in-one-wp-security-and-firewall',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -34,7 +34,7 @@
|
|
34 |
'type' => 'project',
|
35 |
'install_path' => __DIR__ . '/../../',
|
36 |
'aliases' => array(),
|
37 |
-
'reference' => '
|
38 |
'dev_requirement' => false,
|
39 |
),
|
40 |
),
|
5 |
'type' => 'project',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '8fad4385dbb10db3db3d3f01a510f2b5461c23f5',
|
9 |
'name' => 'updraftplus/all-in-one-wp-security-and-firewall',
|
10 |
'dev' => false,
|
11 |
),
|
34 |
'type' => 'project',
|
35 |
'install_path' => __DIR__ . '/../../',
|
36 |
'aliases' => array(),
|
37 |
+
'reference' => '8fad4385dbb10db3db3d3f01a510f2b5461c23f5',
|
38 |
'dev_requirement' => false,
|
39 |
),
|
40 |
),
|
wp-security-core.php
CHANGED
@@ -8,7 +8,7 @@ if (!class_exists('AIO_WP_Security')) {
|
|
8 |
|
9 |
class AIO_WP_Security {
|
10 |
|
11 |
-
public $version = '5.0.
|
12 |
|
13 |
public $db_version = '1.9.3';
|
14 |
|
@@ -543,11 +543,11 @@ if (!class_exists('AIO_WP_Security')) {
|
|
543 |
$login_url = get_permalink(get_option('woocommerce_myaccount_page_id'));
|
544 |
} elseif ('1' == $aio_wp_security->configs->get_value('aiowps_enable_rename_login_page')) { //Check if rename login feature enabled.
|
545 |
if (get_option('permalink_structure')) {
|
546 |
-
$
|
547 |
} else {
|
548 |
-
$
|
549 |
}
|
550 |
-
$login_url = $
|
551 |
} else {
|
552 |
$login_url = wp_login_url();
|
553 |
}
|
8 |
|
9 |
class AIO_WP_Security {
|
10 |
|
11 |
+
public $version = '5.0.7';
|
12 |
|
13 |
public $db_version = '1.9.3';
|
14 |
|
543 |
$login_url = get_permalink(get_option('woocommerce_myaccount_page_id'));
|
544 |
} elseif ('1' == $aio_wp_security->configs->get_value('aiowps_enable_rename_login_page')) { //Check if rename login feature enabled.
|
545 |
if (get_option('permalink_structure')) {
|
546 |
+
$home_url = trailingslashit(home_url());
|
547 |
} else {
|
548 |
+
$home_url = trailingslashit(home_url()) . '?';
|
549 |
}
|
550 |
+
$login_url = $home_url.$aio_wp_security->configs->get_value('aiowps_login_page_slug');
|
551 |
} else {
|
552 |
$login_url = wp_login_url();
|
553 |
}
|
wp-security.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
// @codingStandardsIgnoreStart
|
3 |
/*
|
4 |
Plugin Name: All In One WP Security
|
5 |
-
Version: 5.0.
|
6 |
Plugin URI: https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/
|
7 |
Update URI: https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/
|
8 |
Author: All In One WP Security & Firewall Team
|
2 |
// @codingStandardsIgnoreStart
|
3 |
/*
|
4 |
Plugin Name: All In One WP Security
|
5 |
+
Version: 5.0.7
|
6 |
Plugin URI: https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/
|
7 |
Update URI: https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/
|
8 |
Author: All In One WP Security & Firewall Team
|