Version Description
07/May/2018 =
TWEAK: Changed the term 'Automatic' to 'Scheduled'.
TWEAK: Show correct table type for views
TWEAK: Fixed string spelling and syntax errors
TWEAK: Disabled Simple History logging option if plugin is not installed.
TWEAK: Prevented PHP notices in repair tables functionality
Download this release
Release Info
Developer | DavidAnderson |
Plugin | WP-Optimize |
Version | 2.2.4 |
Comparing to | |
See all releases |
Code changes from version 2.2.3 to 2.2.4
- includes/class-commands.php +1 -1
- includes/class-updraft-abstract-logger.php +24 -0
- includes/class-updraft-task-manager.php +0 -181
- includes/class-updraft-task-meta.php +0 -87
- includes/class-updraft-task-options.php +0 -109
- includes/class-updraft-task.php +0 -444
- includes/class-updraft-tasks-activation.php +0 -133
- includes/class-wp-optimization.php +3 -3
- includes/class-wp-optimize-options.php +2 -2
- includes/class-wp-optimizer.php +8 -2
- includes/wp-optimize-database-information.php +50 -4
- includes/wp-optimize-notices.php +3 -3
- js/tablesorter/jquery.tablesorter.js +6 -9
- js/tablesorter/jquery.tablesorter.min.js +1 -1
- js/tablesorter/jquery.tablesorter.widgets.js +4 -3
- js/tablesorter/jquery.tablesorter.widgets.min.js +2 -2
- js/wpadmin.js +3 -0
- js/wpadmin.min.js +1 -1
- languages/wp-optimize.pot +61 -61
- readme.txt +11 -3
- templates/admin-settings-logging.php +2 -2
- templates/may-also-like.php +3 -3
- templates/status-box-contents.php +21 -3
- wp-optimize.php +10 -8
includes/class-commands.php
CHANGED
@@ -135,7 +135,7 @@ class WP_Optimize_Commands {
|
|
135 |
}
|
136 |
|
137 |
/**
|
138 |
-
* Save option which sites to optimize in
|
139 |
*
|
140 |
* @param array $data Array of settings.
|
141 |
* @return bool
|
135 |
}
|
136 |
|
137 |
/**
|
138 |
+
* Save option which sites to optimize in multisite mode.
|
139 |
*
|
140 |
* @param array $data Array of settings.
|
141 |
* @return bool
|
includes/class-updraft-abstract-logger.php
CHANGED
@@ -9,10 +9,25 @@ if (class_exists('Updraft_Abstract_Logger')) return;
|
|
9 |
*/
|
10 |
abstract class Updraft_Abstract_Logger implements Updraft_Logger_Interface {
|
11 |
|
|
|
|
|
|
|
|
|
|
|
12 |
protected $enabled = true;
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
protected $allow_multiple = false;
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
protected $options = array();
|
17 |
|
18 |
/**
|
@@ -21,6 +36,15 @@ abstract class Updraft_Abstract_Logger implements Updraft_Logger_Interface {
|
|
21 |
public function __construct() {
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
/**
|
25 |
* Returns true if allow multiple.
|
26 |
*
|
9 |
*/
|
10 |
abstract class Updraft_Abstract_Logger implements Updraft_Logger_Interface {
|
11 |
|
12 |
+
/**
|
13 |
+
* True if logger enabled.
|
14 |
+
*
|
15 |
+
* @var bool
|
16 |
+
*/
|
17 |
protected $enabled = true;
|
18 |
|
19 |
+
/**
|
20 |
+
* True if possible to add multiple loggers.
|
21 |
+
*
|
22 |
+
* @var bool
|
23 |
+
*/
|
24 |
protected $allow_multiple = false;
|
25 |
|
26 |
+
/**
|
27 |
+
* Logger options.
|
28 |
+
*
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
protected $options = array();
|
32 |
|
33 |
/**
|
36 |
public function __construct() {
|
37 |
}
|
38 |
|
39 |
+
/**
|
40 |
+
* True if logger is available for use, i.e. required plugins installed.
|
41 |
+
*
|
42 |
+
* @return bool
|
43 |
+
*/
|
44 |
+
public function is_available() {
|
45 |
+
return true;
|
46 |
+
}
|
47 |
+
|
48 |
/**
|
49 |
* Returns true if allow multiple.
|
50 |
*
|
includes/class-updraft-task-manager.php
DELETED
@@ -1,181 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!defined('Updraft_Task_Manager')) :
|
4 |
-
|
5 |
-
class Updraft_Task_Manager {
|
6 |
-
|
7 |
-
private $_tasklist;
|
8 |
-
|
9 |
-
protected $_logger;
|
10 |
-
|
11 |
-
protected static $_instance = null;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* The Task Manager constructor
|
15 |
-
*/
|
16 |
-
public function __construct() {
|
17 |
-
|
18 |
-
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Returns the only instance of this class
|
23 |
-
*
|
24 |
-
* @return Updraft_Task_Manager
|
25 |
-
*/
|
26 |
-
public static function instance() {
|
27 |
-
if (empty(self::$_instance)) {
|
28 |
-
self::$_instance = new self();
|
29 |
-
}
|
30 |
-
|
31 |
-
return self::$_instance;
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Doc Stub
|
36 |
-
*/
|
37 |
-
public function perform_task() {
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Gets a list of all active tasks
|
43 |
-
*
|
44 |
-
* @return Mixed - array of UpdraftPlus_Task ojects or NULL if none found
|
45 |
-
*/
|
46 |
-
public function get_active_tasks() {
|
47 |
-
return $this->get_tasks('active');
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Gets a list of all completed tasks
|
52 |
-
*
|
53 |
-
* @return Mixed - array of UpdraftPlus_Task ojects or NULL if none found
|
54 |
-
*/
|
55 |
-
public function get_completed_tasks() {
|
56 |
-
return $this->get_tasks('complete');
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Gets a list of all tasks that matches the $status flag
|
61 |
-
*
|
62 |
-
* @param String $status - status of tasks to return, defaults to all tasks
|
63 |
-
*
|
64 |
-
* @return Mixed - array of UpdraftPlus_Task ojects or NULL if none found
|
65 |
-
*/
|
66 |
-
public function get_tasks($status) {
|
67 |
-
global $wpdb;
|
68 |
-
|
69 |
-
$tasks = array();
|
70 |
-
|
71 |
-
if (array_key_exists($status, Updraft_Task::get_task_statuses())) {
|
72 |
-
$sql = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}tm_tasks WHERE status = %s", $status);
|
73 |
-
} else {
|
74 |
-
$sql = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}tm_tasks");
|
75 |
-
}
|
76 |
-
|
77 |
-
$_tasks = $wpdb->get_results($sql);
|
78 |
-
if (!$_tasks) return;
|
79 |
-
|
80 |
-
|
81 |
-
foreach ($_tasks as $_task) {
|
82 |
-
$task = new Updraft_Task($_task);
|
83 |
-
array_push($tasks, $task);
|
84 |
-
}
|
85 |
-
|
86 |
-
return $tasks;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Gets a list of all tasks that matches the $status flag
|
91 |
-
*
|
92 |
-
* @param String $task_id - id of task to return, defaults to all tasks
|
93 |
-
*
|
94 |
-
* @return String - status of UpdraftPlus_Task ojects or false if none found
|
95 |
-
*/
|
96 |
-
public function get_task_status($task_id) {
|
97 |
-
$task = $this->get_task_instance($task_id);
|
98 |
-
if (!$task) return;
|
99 |
-
|
100 |
-
return $task->get_task_status();
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Ends a given task
|
105 |
-
*
|
106 |
-
* @param int|Updraft_Task - $task Task ID or object.
|
107 |
-
*/
|
108 |
-
public function end_task($task) {
|
109 |
-
if ($task instanceof Updraft_Task) {
|
110 |
-
$task->complete();
|
111 |
-
} else {
|
112 |
-
$task = get_task_instance($task_id);
|
113 |
-
$task->complete();
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Retrieve the task instance using its ID
|
119 |
-
*
|
120 |
-
* @access public
|
121 |
-
*
|
122 |
-
* @global wpdb $wpdb WordPress database abstraction object.
|
123 |
-
*
|
124 |
-
* @param int $task_id Task ID.
|
125 |
-
* @return Task|false Task object, false otherwise.
|
126 |
-
*/
|
127 |
-
public function get_task_instance($task_id) {
|
128 |
-
global $wpdb;
|
129 |
-
|
130 |
-
$task_id = (int) $task_id;
|
131 |
-
if (!$task_id) return false;
|
132 |
-
|
133 |
-
$_task = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}tm_tasks WHERE task_id = {$task_id} LIMIT 1");
|
134 |
-
|
135 |
-
if (! $_task)
|
136 |
-
return false;
|
137 |
-
|
138 |
-
return new Updraft_Task($_task);
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Cleans out all complete tasks from the DB.
|
143 |
-
*/
|
144 |
-
public function clean_up_old_tasks() {
|
145 |
-
$completed_tasks = $this->get_completed_tasks();
|
146 |
-
|
147 |
-
foreach ($completed_tasks as $tasks) {
|
148 |
-
$task->delete_task_meta($this->task_id);
|
149 |
-
$task->delete_task($this->task_id);
|
150 |
-
}
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Sets the logger for this task.
|
155 |
-
*
|
156 |
-
* @param Object $logger - the logger for the task
|
157 |
-
*/
|
158 |
-
public function set_logger($logger) {
|
159 |
-
$this->_logger = $logger;
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Returns the logger used by this task.
|
164 |
-
*
|
165 |
-
* @return Object $logger - the logger for the task
|
166 |
-
*/
|
167 |
-
public function get_logger() {
|
168 |
-
return $this->_logger;
|
169 |
-
}
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Returns the singleton Updraft_Task_Manager class
|
174 |
-
*/
|
175 |
-
function Updraft_Task_Manager() {
|
176 |
-
return Updraft_Task_Manager::instance();
|
177 |
-
}
|
178 |
-
|
179 |
-
$GLOBALS['updraft_task_manager'] = Updraft_Task_Manager();
|
180 |
-
|
181 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-updraft-task-meta.php
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (class_exists('Updraft_Task_Meta')) return;
|
4 |
-
|
5 |
-
class Updraft_Task_Meta {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* This method gets data from the task meta table in the WordPress database
|
9 |
-
*
|
10 |
-
* @param int $id the instance id of the task
|
11 |
-
* @param String $key the key to get
|
12 |
-
*
|
13 |
-
* @return Mixed The option from the database
|
14 |
-
*/
|
15 |
-
public static function get_task_meta($id, $key) {
|
16 |
-
global $wpdb;
|
17 |
-
|
18 |
-
$id = (int) $id;
|
19 |
-
if (!$id) return false;
|
20 |
-
|
21 |
-
$sql = $wpdb->prepare("SELECT meta_value FROM {$wpdb->prefix}tm_taskmeta WHERE task_id = %d AND meta_key = %s LIMIT 1", $id, $key);
|
22 |
-
|
23 |
-
$meta = $wpdb->get_var($sql);
|
24 |
-
|
25 |
-
if ($meta)
|
26 |
-
return maybe_unserialize($meta);
|
27 |
-
else return false;
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
/**
|
32 |
-
* This method is used to update data stored in the WordPress database
|
33 |
-
*
|
34 |
-
* @param int $id the instance id of the task
|
35 |
-
* @param String $key the key of the data to update
|
36 |
-
* @param Mixed $value the value to save to the option
|
37 |
-
*
|
38 |
-
* @return Mixed the status of the update operation
|
39 |
-
*/
|
40 |
-
public static function update_task_meta($id, $key, $value) {
|
41 |
-
global $wpdb;
|
42 |
-
|
43 |
-
$id = (int) $id;
|
44 |
-
if (!$id) return false;
|
45 |
-
|
46 |
-
$value = maybe_serialize($value);
|
47 |
-
|
48 |
-
if (false !== self::get_task_meta($id, $key)) {
|
49 |
-
$sql = $wpdb->prepare("UPDATE {$wpdb->prefix}tm_taskmeta SET meta_value = %s WHERE meta_key = %s AND task_id = %d", $value, $key, $id);
|
50 |
-
} else {
|
51 |
-
$sql = $wpdb->prepare("INSERT INTO {$wpdb->prefix}tm_taskmeta (task_id, meta_key, meta_value) VALUES (%d, %s, %s)", $id, $key, $value);
|
52 |
-
}
|
53 |
-
|
54 |
-
return $wpdb->query($sql);
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* This method is used to delete task data stored in the WordPress database
|
59 |
-
*
|
60 |
-
* @param int $id the instance id of the task
|
61 |
-
* @param String $key the key to delete
|
62 |
-
*/
|
63 |
-
public static function delete_task_meta($id, $key) {
|
64 |
-
global $wpdb;
|
65 |
-
|
66 |
-
$id = (int) $id;
|
67 |
-
if (!$id) return false;
|
68 |
-
|
69 |
-
$sql = $wpdb->prepare("DELETE FROM {$wpdb->prefix}tm_taskmeta WHERE task_id = %d AND meta_key = %s LIMIT 1", $id, $option);
|
70 |
-
return $wpdb->query($sql);
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Bulk delete task
|
75 |
-
*
|
76 |
-
* @param int $id the instance id of the task
|
77 |
-
*/
|
78 |
-
public static function bulk_delete_task_meta($id) {
|
79 |
-
global $wpdb;
|
80 |
-
|
81 |
-
$id = (int) $id;
|
82 |
-
if (!$id) return false;
|
83 |
-
|
84 |
-
$sql = $wpdb->prepare("DELETE FROM {$wpdb->prefix}tm_taskmeta WHERE task_id = %d", $id);
|
85 |
-
return $wpdb->query($sql);
|
86 |
-
}
|
87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-updraft-task-options.php
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!defined('ABSPATH')) die('No direct access allowed');
|
4 |
-
|
5 |
-
if (class_exists('Updraft_Task_Options')) return;
|
6 |
-
|
7 |
-
class Updraft_Task_Options {
|
8 |
-
|
9 |
-
/**
|
10 |
-
* This method gets an option from the task meta table in the WordPress database
|
11 |
-
*
|
12 |
-
* @param int $instance_id the instance id of the task
|
13 |
-
* @param String $option the name of the option to get
|
14 |
-
* @param Mixed $default a value to return if the option is not currently set
|
15 |
-
*
|
16 |
-
* @return Mixed The option from the database
|
17 |
-
*/
|
18 |
-
public static function get_task_option($instance_id, $option, $default = null) {
|
19 |
-
|
20 |
-
$tmp = Updraft_Task_Meta::get_task_meta($instance_id, 'task_options');
|
21 |
-
|
22 |
-
if (isset($tmp[$option])) {
|
23 |
-
$value = $tmp[$option];
|
24 |
-
} else {
|
25 |
-
$value = $default;
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Filters the value of an existing option.
|
30 |
-
*
|
31 |
-
* The dynamic portion of the hook name, `$option`, refers to the option name.
|
32 |
-
*/
|
33 |
-
return apply_filters('task_option_{$option}', maybe_unserialize($value), $option, $default, $instance_id);
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* This method is used to update a task option stored in the WordPress database
|
38 |
-
*
|
39 |
-
* @param int $instance_id the instance id of the task
|
40 |
-
* @param String $option the name of the option to update
|
41 |
-
* @param Mixed $value the value to save to the option
|
42 |
-
*
|
43 |
-
* @return Mixed the status of the update operation
|
44 |
-
*/
|
45 |
-
public static function update_task_option($instance_id, $option, $value) {
|
46 |
-
|
47 |
-
$option = trim($option);
|
48 |
-
|
49 |
-
if (empty($option)) return false;
|
50 |
-
|
51 |
-
$old_value = self::get_task_option($instance_id, $option);
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Filters a specific option before its value is (maybe) serialized and updated.
|
55 |
-
*/
|
56 |
-
$value = apply_filters('pre_update_task_option_{$option}', $value, $old_value, $option, $instance_id);
|
57 |
-
|
58 |
-
$tmp = Updraft_Task_Meta::get_task_meta($instance_id, 'task_options');
|
59 |
-
|
60 |
-
if (!is_array($tmp)) $tmp = array();
|
61 |
-
$tmp[$option] = maybe_serialize($value);
|
62 |
-
|
63 |
-
$result = Updraft_Task_Meta::update_task_meta($instance_id, 'task_options', $tmp);
|
64 |
-
|
65 |
-
if ($result) {
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Fires after the value of a specific option has been successfully updated.
|
69 |
-
*/
|
70 |
-
do_action('update_task_option_{$option}', $value, $old_value, $option, $instance_id);
|
71 |
-
}
|
72 |
-
|
73 |
-
return $result;
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* This method is used to delete a task option stored in the WordPress database
|
78 |
-
*
|
79 |
-
* @param int $instance_id the instance id of the task
|
80 |
-
* @param String $option the option to delete
|
81 |
-
*/
|
82 |
-
public static function delete_task_option($instance_id, $option) {
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Fires immediately before an option is deleted.
|
86 |
-
*/
|
87 |
-
do_action('before_delete_task_option', $option, $instance_id);
|
88 |
-
|
89 |
-
$tmp = Updraft_Task_Meta::get_task_meta($instance_id, 'task_options');
|
90 |
-
|
91 |
-
if (is_array($tmp)) {
|
92 |
-
if (isset($tmp[$option])) unset($tmp[$option]);
|
93 |
-
} else {
|
94 |
-
$tmp = array();
|
95 |
-
}
|
96 |
-
|
97 |
-
$result = Updraft_Task_Meta::update_task_meta($instance_id, 'task_options', $tmp);
|
98 |
-
|
99 |
-
if ($result) {
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Fires after a specific option has been successfully deleted.
|
103 |
-
*/
|
104 |
-
do_action('delete_task_option_{$option}', $option);
|
105 |
-
}
|
106 |
-
|
107 |
-
return $result;
|
108 |
-
}
|
109 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-updraft-task.php
DELETED
@@ -1,444 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (class_exists('Updraft_Task_1_0')) return;
|
4 |
-
|
5 |
-
abstract class Updraft_Task_1_0 {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* A unique ID for the specific task
|
9 |
-
*
|
10 |
-
* @var int
|
11 |
-
*/
|
12 |
-
private $id;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* The user id of the creator of this task
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
private $user_id;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* A text description for the task
|
23 |
-
*
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
private $description;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* A type for the task
|
30 |
-
*
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
private $type;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* A timestamp indicating the time the task was created
|
37 |
-
*
|
38 |
-
* @var string
|
39 |
-
*/
|
40 |
-
private $time_created;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* A text description describing the status of the task
|
44 |
-
*
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
private $status;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* A logger object that can be used to capture interesting events / messages
|
51 |
-
*
|
52 |
-
* @var Object
|
53 |
-
*/
|
54 |
-
protected $logger;
|
55 |
-
|
56 |
-
|
57 |
-
/**
|
58 |
-
* The Task constructor
|
59 |
-
*
|
60 |
-
* @param UpdraftPlus_Task|object $task UpdraftPlus_Task object.
|
61 |
-
*/
|
62 |
-
public function __construct($task) {
|
63 |
-
foreach (get_object_vars($task) as $key => $value)
|
64 |
-
$this->$key = $value;
|
65 |
-
}
|
66 |
-
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Sets the instance ID.
|
70 |
-
*
|
71 |
-
* @param String $instance_id - the instance ID
|
72 |
-
*/
|
73 |
-
public function set_id($instance_id) {
|
74 |
-
$this->id = $instance_id;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Gets the instance ID.
|
79 |
-
*
|
80 |
-
* @return String the instance ID
|
81 |
-
*/
|
82 |
-
public function get_id() {
|
83 |
-
return $this->id;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Sets the description.
|
88 |
-
*
|
89 |
-
* @param String $description - the description of the task
|
90 |
-
*/
|
91 |
-
public function set_description($description) {
|
92 |
-
$this->description = $description;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Gets the task description
|
97 |
-
*
|
98 |
-
* @return String $description - the description of the task
|
99 |
-
*/
|
100 |
-
public function get_description() {
|
101 |
-
return $this->description;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Sets the type.
|
106 |
-
*
|
107 |
-
* @param String $type - the type of the task
|
108 |
-
*/
|
109 |
-
public function set_type($type) {
|
110 |
-
$this->type = $type;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Gets the task type
|
115 |
-
*
|
116 |
-
* @return String $type - the type of the task
|
117 |
-
*/
|
118 |
-
public function get_type() {
|
119 |
-
return $this->type;
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Sets the task status.
|
124 |
-
*
|
125 |
-
* @param String $status - the status of the task
|
126 |
-
*
|
127 |
-
* @return Boolean - the result of the status update
|
128 |
-
*/
|
129 |
-
public function set_status($status) {
|
130 |
-
|
131 |
-
if (array_key_exists($status, self::get_allowed_statuses()))
|
132 |
-
$this->status = $status;
|
133 |
-
else return false;
|
134 |
-
|
135 |
-
return $this->update_task_status($this->task_id, $this->status);
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Gets the task status
|
140 |
-
*
|
141 |
-
* @return String $status - the status of the task
|
142 |
-
*/
|
143 |
-
public function get_status() {
|
144 |
-
return $this->status;
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Sets the logger for this task.
|
149 |
-
*
|
150 |
-
* @param Object $logger - the logger for the task
|
151 |
-
*/
|
152 |
-
public function set_logger($logger) {
|
153 |
-
$this->logger = $logger;
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Returns the logger used by this task.
|
158 |
-
*
|
159 |
-
* @return Object $logger - the logger for the task
|
160 |
-
*/
|
161 |
-
public function get_logger() {
|
162 |
-
return $this->logger;
|
163 |
-
}
|
164 |
-
|
165 |
-
|
166 |
-
/**
|
167 |
-
* The initialisation function that accepts and processes any parameters needed before the task starts
|
168 |
-
*
|
169 |
-
* @param Array $options - array of options
|
170 |
-
*
|
171 |
-
* @uses update_option
|
172 |
-
*/
|
173 |
-
public function initialise($options = array()) {
|
174 |
-
|
175 |
-
do_action('task_before_initialise', $this, $options);
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Parse incoming $options into an array and merge it with defaults
|
179 |
-
*/
|
180 |
-
$defaults = $this->get_default_options();
|
181 |
-
$options = wp_parse_args($options, $defaults);
|
182 |
-
|
183 |
-
foreach ($options as $option => $value) {
|
184 |
-
$this->update_option($option, $value);
|
185 |
-
}
|
186 |
-
|
187 |
-
do_action('task_initialise_complete', $this, $options);
|
188 |
-
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* This function is called to allow for the task to perfrom a small chunk of work.
|
193 |
-
* It should be written in a way that anticipates it being killed off at any time.
|
194 |
-
*/
|
195 |
-
public function run() {
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Any clean up code goes here.
|
200 |
-
*/
|
201 |
-
public function complete() {
|
202 |
-
|
203 |
-
do_action('task_before_complete', $this);
|
204 |
-
|
205 |
-
$this->delete_meta($this->task_id);
|
206 |
-
$this->set_status('complete');
|
207 |
-
|
208 |
-
do_action('task_completed', $this);
|
209 |
-
}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Prints any information about the task that the UI can use on the front end.
|
213 |
-
*/
|
214 |
-
public function print_task_report_widget() {
|
215 |
-
|
216 |
-
$ret = '';
|
217 |
-
|
218 |
-
$status = $this->get_task_status();
|
219 |
-
$stage = $this->get_task_status('stage') ? $this->get_task_status('stage') : 'Unknown';
|
220 |
-
$description = $this->get_task_status_description($status);
|
221 |
-
|
222 |
-
|
223 |
-
$ret .= '<div class="task task-'.$this->description.'" id="task-id-'.$this->task_id.'">';
|
224 |
-
|
225 |
-
$ret .= apply_filters('print_task_report_before_warnings', '', $this->task_id, $this);
|
226 |
-
|
227 |
-
$warnings = $this->get_task_data('warnings');
|
228 |
-
if (!empty($warnings) && is_array($warnings)) {
|
229 |
-
$ret .= '<ul class="disc">';
|
230 |
-
foreach ($warnings as $warning) {
|
231 |
-
$ret .= '<li>'.sprintf(__('Warning: %s'), make_clickable(htmlspecialchars($warning))).'</li>';
|
232 |
-
}
|
233 |
-
$ret .= '</ul>';
|
234 |
-
}
|
235 |
-
|
236 |
-
$ret .= '<div class="stage">';
|
237 |
-
$ret .= htmlspecialchars($stage);
|
238 |
-
|
239 |
-
$ret .= '<div class="task_percentage" data-info="'.esc_attr($stage).'" data-progress="'.(($stage>0) ? (ceil((100/6)*$stage)) : '0').'" style="height: 100%; width:'.(($stage>0) ? (ceil((100/6)*$stage)) : '0').'%"></div>';
|
240 |
-
$ret .= '</div></div>';
|
241 |
-
|
242 |
-
$ret .= '</div>';
|
243 |
-
|
244 |
-
return apply_filters('print_task_report_widget', $ret, $this->task_id, $this);
|
245 |
-
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* This method gets an option from the task options in the WordPress database if available,
|
250 |
-
* otherwise returns the default for this task type
|
251 |
-
*
|
252 |
-
* @param String $option the name of the option to get
|
253 |
-
* @param Mixed $default a value to return if the option is not currently set
|
254 |
-
*
|
255 |
-
* @return Mixed The option from the database
|
256 |
-
*/
|
257 |
-
public function get_option($option, $default = null) {
|
258 |
-
return Updraft_Task_Options::get_task_option($this->task_id, $option, $default);
|
259 |
-
}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* This method is used to add a task option stored in the WordPress database
|
263 |
-
*
|
264 |
-
* @param String $option the name of the option to update
|
265 |
-
* @param Mixed $value the value to save to the option
|
266 |
-
*
|
267 |
-
* @return Mixed the status of the add operation
|
268 |
-
*/
|
269 |
-
public function add_option($option, $value) {
|
270 |
-
return Updraft_Task_Options::update_task_option($this->task_id, $option, $value);
|
271 |
-
}
|
272 |
-
|
273 |
-
/**
|
274 |
-
* This method is used to update a task option stored in the WordPress database
|
275 |
-
*
|
276 |
-
* @param String $option the name of the option to update
|
277 |
-
* @param Mixed $value the value to save to the option
|
278 |
-
*
|
279 |
-
* @return Mixed the status of the update operation
|
280 |
-
*/
|
281 |
-
public function update_option($option, $value) {
|
282 |
-
return Updraft_Task_Options::update_task_option($this->task_id, $option, $value);
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* This method is used to delete a task option stored in the WordPress database
|
287 |
-
*
|
288 |
-
* @param String $option the option to delete
|
289 |
-
*
|
290 |
-
* @return Boolean the result of the delete operation
|
291 |
-
*/
|
292 |
-
public function delete_option($option) {
|
293 |
-
return Updraft_Task_Options::delete_task_option($this->task_id, $option);
|
294 |
-
}
|
295 |
-
|
296 |
-
/**
|
297 |
-
* Retrieve default options for this task.
|
298 |
-
* This method should normally be over-ridden by the child.
|
299 |
-
*
|
300 |
-
* @return Array - an array of options
|
301 |
-
*/
|
302 |
-
public function get_default_options() {
|
303 |
-
|
304 |
-
$this->logger->error('The get_default_options() method was not over-ridden for the class '.$this->get_task_description());
|
305 |
-
|
306 |
-
return array();
|
307 |
-
}
|
308 |
-
|
309 |
-
/**
|
310 |
-
* Updates the status of the given task in the DB
|
311 |
-
*
|
312 |
-
* @param String $id - the id of the task
|
313 |
-
* @param String $status - the status of the task
|
314 |
-
*
|
315 |
-
* @return Boolean - the stauts of the update operation
|
316 |
-
*/
|
317 |
-
public function update_status($id, $status) {
|
318 |
-
|
319 |
-
if (!array_key_exists($status, self::get_allowed_statuses()))
|
320 |
-
return false;
|
321 |
-
|
322 |
-
global $wpdb;
|
323 |
-
$sql = $wpdb->prepare("UPDATE {$wpdb->base_prefix}tm_tasks SET status = %s WHERE task_id = %d", $status, $id);
|
324 |
-
|
325 |
-
return $wpdb->query($sql);
|
326 |
-
}
|
327 |
-
|
328 |
-
/**
|
329 |
-
* Cleans out the given task from the DB
|
330 |
-
*
|
331 |
-
* @return Boolean - the status of the delete operation
|
332 |
-
*/
|
333 |
-
public function delete() {
|
334 |
-
global $wpdb;
|
335 |
-
|
336 |
-
if ($this->task_id > 0) {
|
337 |
-
$sql = $wpdb->prepare("DELETE t, tm FROM {$wpdb->base_prefix}tm_tasks t JOIN {$wpdb->base_prefix}tm_taskmeta tm ON t.task_id = tm.task_id WHERE t.task_id = %d", $this->task_id);
|
338 |
-
return $wpdb->query($sql);
|
339 |
-
}
|
340 |
-
|
341 |
-
return true;
|
342 |
-
}
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Cleans out the given task meta from the DB
|
346 |
-
*
|
347 |
-
* @return Boolean - the status of the delete operation
|
348 |
-
*/
|
349 |
-
public function delete_meta() {
|
350 |
-
return Updraft_Task_Meta::bulk_delete_task_meta($this->id);
|
351 |
-
}
|
352 |
-
|
353 |
-
/**
|
354 |
-
* Helper function to convert object to array.
|
355 |
-
*
|
356 |
-
* @return array Object as array.
|
357 |
-
*/
|
358 |
-
public function to_array() {
|
359 |
-
$task = get_object_vars($this);
|
360 |
-
|
361 |
-
foreach (array( 'task_options', 'task_data', 'task_logs', 'task_extras' ) as $key) {
|
362 |
-
if ($this->__isset($key))
|
363 |
-
$task[$key] = $this->__get($key);
|
364 |
-
}
|
365 |
-
|
366 |
-
return $task;
|
367 |
-
}
|
368 |
-
|
369 |
-
/**
|
370 |
-
* Retrieve all the supported task statuses.
|
371 |
-
*
|
372 |
-
* Tasks should have a limited set of valid status values, this method provides a
|
373 |
-
* list of values and descriptions.
|
374 |
-
*
|
375 |
-
* @return array List of task statuses.
|
376 |
-
*/
|
377 |
-
public static function get_allowed_statuses() {
|
378 |
-
$status = array(
|
379 |
-
'initialised' => __('Initialised'),
|
380 |
-
'active' => __('Active'),
|
381 |
-
'paused' => __('Paused'),
|
382 |
-
'complete' => __('Completed')
|
383 |
-
);
|
384 |
-
|
385 |
-
return apply_filters('allowed_task_statuses', $status);
|
386 |
-
}
|
387 |
-
|
388 |
-
/**
|
389 |
-
* Retrieve the text description of the task status.
|
390 |
-
*
|
391 |
-
* @param String $status - The task status
|
392 |
-
*
|
393 |
-
* @return String Description of the task status.
|
394 |
-
*/
|
395 |
-
public static function get_status_description($status) {
|
396 |
-
$list = self::get_allowed_statuses();
|
397 |
-
|
398 |
-
if (!array_key_exists($status, self::get_allowed_statuses()))
|
399 |
-
return __('Unknown');
|
400 |
-
|
401 |
-
return apply_filters('task_status_description_{$status}', $list[$status], $status, $list);
|
402 |
-
}
|
403 |
-
|
404 |
-
|
405 |
-
/**
|
406 |
-
* Creates a new task instance and returns it
|
407 |
-
*
|
408 |
-
* @access public
|
409 |
-
*
|
410 |
-
* @global wpdb $wpdb WordPress database abstraction object.
|
411 |
-
*
|
412 |
-
* @param String $description A description of the task
|
413 |
-
* @param Mixed $options A list of options to initialise the task
|
414 |
-
*
|
415 |
-
* @return Updraft_Task|false Task object, false otherwise.
|
416 |
-
*/
|
417 |
-
public static function create_task($description, $options = array()) {
|
418 |
-
global $wpdb;
|
419 |
-
|
420 |
-
$user_id = get_current_user_id();
|
421 |
-
|
422 |
-
if (!$user_id)
|
423 |
-
return false;
|
424 |
-
|
425 |
-
$sql = $wpdb->prepare("INSERT INTO {$wpdb->base_prefix}tm_tasks (user_id, description, status) VALUES (%d, %s, %s)", $user_id, $description, 'active');
|
426 |
-
|
427 |
-
$wpdb->query($sql);
|
428 |
-
|
429 |
-
$task_id = $wpdb->insert_id;
|
430 |
-
|
431 |
-
if (!$task_id)
|
432 |
-
return false;
|
433 |
-
|
434 |
-
$_task = $wpdb->get_row("SELECT * FROM {$wpdb->base_prefix}tm_tasks WHERE task_id = {$task_id} LIMIT 1");
|
435 |
-
|
436 |
-
if (!$_task)
|
437 |
-
return false;
|
438 |
-
|
439 |
-
$task = new Updraft_Task($_task);
|
440 |
-
$task->initialise($options);
|
441 |
-
|
442 |
-
return $task;
|
443 |
-
}
|
444 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-updraft-tasks-activation.php
DELETED
@@ -1,133 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!defined('ABSPATH')) die('No direct access allowed');
|
4 |
-
|
5 |
-
/**
|
6 |
-
*
|
7 |
-
* Initialise the tasks module and create the needed DB tables
|
8 |
-
*/
|
9 |
-
class Updraft_Tasks_Activation {
|
10 |
-
|
11 |
-
private static $table_prefix;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Format: key=<version>, value=array of method names to call
|
15 |
-
* Example Usage:
|
16 |
-
* private static $db_updates = array(
|
17 |
-
* '1.0.1' => array(
|
18 |
-
* 'update_101_add_new_column',
|
19 |
-
* ),
|
20 |
-
* );
|
21 |
-
*
|
22 |
-
* @var Mixed
|
23 |
-
*/
|
24 |
-
private static $db_updates = array(
|
25 |
-
'0.0.1' => array(
|
26 |
-
'create_tables'
|
27 |
-
)
|
28 |
-
);
|
29 |
-
|
30 |
-
|
31 |
-
const UPDRAFT_TASKS_VERSION = '1.0';
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Initialise this class
|
35 |
-
*/
|
36 |
-
public static function init_db() {
|
37 |
-
self::$table_prefix = defined('UPDRAFT_TASKS_TABLE_PREFIX') ? UPDRAFT_TASKS_TABLE_PREFIX : 'tm_';
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* This is the class entry point
|
42 |
-
*/
|
43 |
-
public static function install() {
|
44 |
-
self::init_db();
|
45 |
-
self::create_tables();
|
46 |
-
update_option('updraft_task_manager_dbversion', self::get_version());
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* See if any database schema updates are needed, and perform them if so.
|
51 |
-
* Example Usage:
|
52 |
-
* public static function update_101_add_new_column() {
|
53 |
-
* $wpdb = $GLOBALS['wpdb'];
|
54 |
-
* $wpdb->query('ALTER TABLE tm_tasks ADD task_expiry varchar(300) AFTER id');
|
55 |
-
* }
|
56 |
-
*/
|
57 |
-
public static function check_updates() {
|
58 |
-
self::init_db();
|
59 |
-
$our_version = self::get_version();
|
60 |
-
$db_version = get_option('updraft_task_manager_dbversion');
|
61 |
-
if (!$db_version || version_compare($our_version, $db_version, '>')) {
|
62 |
-
foreach (self::$db_updates as $version => $updates) {
|
63 |
-
if (version_compare($version, $db_version, '>')) {
|
64 |
-
foreach ($updates as $update) {
|
65 |
-
call_user_func(array(__CLASS__, $update));
|
66 |
-
}
|
67 |
-
}
|
68 |
-
}
|
69 |
-
update_option('updraft_task_manager_dbversion', self::get_version());
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Returns the current version of the plugin
|
75 |
-
*/
|
76 |
-
public static function get_version() {
|
77 |
-
return self::UPDRAFT_TASKS_VERSION;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Create the database tables
|
82 |
-
*/
|
83 |
-
public static function create_tables() {
|
84 |
-
global $wpdb;
|
85 |
-
|
86 |
-
$collate = '';
|
87 |
-
|
88 |
-
$our_prefix = $wpdb->base_prefix.self::$table_prefix;
|
89 |
-
|
90 |
-
if ($wpdb->has_cap('collation')) {
|
91 |
-
if (!empty($wpdb->charset)) {
|
92 |
-
$collate .= "DEFAULT CHARACTER SET $wpdb->charset";
|
93 |
-
}
|
94 |
-
if (!empty($wpdb->collate)) {
|
95 |
-
$collate .= " COLLATE $wpdb->collate";
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
include_once ABSPATH.'wp-admin/includes/upgrade.php';
|
100 |
-
|
101 |
-
// Important: obey the magical/arbitrary rules for formatting this stuff: https://codex.wordpress.org/Creating_Tables_with_Plugins
|
102 |
-
// Otherwise, you get SQL errors and unwanted header output warnings when activating
|
103 |
-
|
104 |
-
$create_tables = 'CREATE TABLE '.$our_prefix."tasks (
|
105 |
-
task_id bigint(20) NOT NULL auto_increment,
|
106 |
-
user_id bigint(20) NOT NULL,
|
107 |
-
type varchar(300) NOT NULL,
|
108 |
-
description varchar(300),
|
109 |
-
PRIMARY KEY (task_id),
|
110 |
-
KEY user_id (user_id),
|
111 |
-
time_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
112 |
-
status varchar(300)
|
113 |
-
) $collate;
|
114 |
-
";
|
115 |
-
// KEY attribute_name (attribute_name)
|
116 |
-
dbDelta($create_tables);
|
117 |
-
|
118 |
-
$max_index_length = 191;
|
119 |
-
|
120 |
-
$create_tables = 'CREATE TABLE '.$our_prefix."taskmeta (
|
121 |
-
meta_id bigint(20) NOT NULL auto_increment,
|
122 |
-
task_id bigint(20) NOT NULL default '0',
|
123 |
-
meta_key varchar(255) DEFAULT NULL,
|
124 |
-
meta_value longtext,
|
125 |
-
PRIMARY KEY (meta_id),
|
126 |
-
KEY meta_key (meta_key($max_index_length)),
|
127 |
-
KEY task_id (task_id)
|
128 |
-
) $collate;
|
129 |
-
";
|
130 |
-
|
131 |
-
dbDelta($create_tables);
|
132 |
-
}
|
133 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-wp-optimization.php
CHANGED
@@ -31,7 +31,7 @@ abstract class WP_Optimization {
|
|
31 |
protected $support_ajax_get_info = false; // set to true if optimization support getting info about optimization asynchronously.
|
32 |
|
33 |
/**
|
34 |
-
* This property indicates whether running this optimization is likely to change the overall table optimization state. We set this to 'true' on optimizations that run SQL OPTIMIZE commands. It is only used for the UI. Strictly, of course, any optimization that deletes something can cause increased fragmentation; so; in that sense, it would be true for every optimization; but since we are just using it to keep the UI reasonably fresh, and since there is a manual "refresh" button, we set it only on some
|
35 |
*
|
36 |
* @var [$changes_table_data
|
37 |
*/
|
@@ -302,7 +302,7 @@ abstract class WP_Optimization {
|
|
302 |
|
303 |
|
304 |
/**
|
305 |
-
* The next three functions reflect the fact that historically, WP-Optimize has not, for all optimizations, used the same ID consistently throughout forms, saved settings, and saved settings for
|
306 |
*/
|
307 |
public function get_setting_id() {
|
308 |
return empty($this->setting_id) ? 'user-'.$this->id : 'user-'.$this->setting_id;
|
@@ -330,7 +330,7 @@ abstract class WP_Optimization {
|
|
330 |
* @return string Error message.
|
331 |
*/
|
332 |
public function get_auto_option_description() {
|
333 |
-
return 'Error: missing
|
334 |
}
|
335 |
|
336 |
/**
|
31 |
protected $support_ajax_get_info = false; // set to true if optimization support getting info about optimization asynchronously.
|
32 |
|
33 |
/**
|
34 |
+
* This property indicates whether running this optimization is likely to change the overall table optimization state. We set this to 'true' on optimizations that run SQL OPTIMIZE commands. It is only used for the UI. Strictly, of course, any optimization that deletes something can cause increased fragmentation; so; in that sense, it would be true for every optimization; but since we are just using it to keep the UI reasonably fresh, and since there is a manual "refresh" button, we set it only on some optimizations.
|
35 |
*
|
36 |
* @var [$changes_table_data
|
37 |
*/
|
302 |
|
303 |
|
304 |
/**
|
305 |
+
* The next three functions reflect the fact that historically, WP-Optimize has not, for all optimizations, used the same ID consistently throughout forms, saved settings, and saved settings for scheduled clean-ups. Mostly, it has; but some flexibility is needed for the exceptions.
|
306 |
*/
|
307 |
public function get_setting_id() {
|
308 |
return empty($this->setting_id) ? 'user-'.$this->id : 'user-'.$this->setting_id;
|
330 |
* @return string Error message.
|
331 |
*/
|
332 |
public function get_auto_option_description() {
|
333 |
+
return 'Error: missing scheduled option description ('.$this->id.')';
|
334 |
}
|
335 |
|
336 |
/**
|
includes/class-wp-optimize-options.php
CHANGED
@@ -145,7 +145,7 @@ class WP_Optimize_Options {
|
|
145 |
}
|
146 |
|
147 |
/**
|
148 |
-
* Save option which sites to optimize in
|
149 |
*
|
150 |
* @param array $settings array of blog ids or "all" item for all sites.
|
151 |
* @return bool
|
@@ -155,7 +155,7 @@ class WP_Optimize_Options {
|
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
-
* Return list of blog ids to optimize in
|
159 |
*
|
160 |
* @return mixed|void
|
161 |
*/
|
145 |
}
|
146 |
|
147 |
/**
|
148 |
+
* Save option which sites to optimize in multisite mode
|
149 |
*
|
150 |
* @param array $settings array of blog ids or "all" item for all sites.
|
151 |
* @return bool
|
155 |
}
|
156 |
|
157 |
/**
|
158 |
+
* Return list of blog ids to optimize in multisite mode
|
159 |
*
|
160 |
* @return mixed|void
|
161 |
*/
|
includes/class-wp-optimizer.php
CHANGED
@@ -75,7 +75,7 @@ class WP_Optimizer {
|
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
-
* This method returns an array of available
|
79 |
* Each array key is an optimization ID, and the value is an object,
|
80 |
* as returned by get_optimization()
|
81 |
*
|
@@ -278,12 +278,18 @@ class WP_Optimizer {
|
|
278 |
|
279 |
$include_table = apply_filters('wp_optimize_get_tables_include_table', $include_table, $table_name, $table_prefix);
|
280 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
$table_status[$index]->is_optimizable = WP_Optimize()->get_db_info()->is_table_optimizable($table_name);
|
282 |
$table_status[$index]->is_type_supported = WP_Optimize()->get_db_info()->is_table_type_optimize_supported($table_name);
|
283 |
// add information about corrupted tables.
|
284 |
$table_status[$index]->is_needing_repair = WP_Optimize()->get_db_info()->is_table_needing_repair($table_name);
|
285 |
|
286 |
-
if (!$include_table) unset($table_status[$index]);
|
287 |
}
|
288 |
}
|
289 |
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
+
* This method returns an array of available optimizations.
|
79 |
* Each array key is an optimization ID, and the value is an object,
|
80 |
* as returned by get_optimization()
|
81 |
*
|
278 |
|
279 |
$include_table = apply_filters('wp_optimize_get_tables_include_table', $include_table, $table_name, $table_prefix);
|
280 |
|
281 |
+
if (!$include_table) {
|
282 |
+
unset($table_status[$index]);
|
283 |
+
continue;
|
284 |
+
}
|
285 |
+
|
286 |
+
$table_status[$index]->Engine = WP_Optimize()->get_db_info()->get_table_type($table_name);
|
287 |
+
|
288 |
$table_status[$index]->is_optimizable = WP_Optimize()->get_db_info()->is_table_optimizable($table_name);
|
289 |
$table_status[$index]->is_type_supported = WP_Optimize()->get_db_info()->is_table_type_optimize_supported($table_name);
|
290 |
// add information about corrupted tables.
|
291 |
$table_status[$index]->is_needing_repair = WP_Optimize()->get_db_info()->is_table_needing_repair($table_name);
|
292 |
|
|
|
293 |
}
|
294 |
}
|
295 |
|
includes/wp-optimize-database-information.php
CHANGED
@@ -18,6 +18,7 @@ class WP_Optimize_Database_Information {
|
|
18 |
const CSV_ENGINE = 'CSV';
|
19 |
const NDB_ENGINE = 'NDB';
|
20 |
const ARIA_ENGINE = 'Aria'; // MariaDB
|
|
|
21 |
|
22 |
/**
|
23 |
* Returns server type MySQL or MariaDB if mysql database or Unknown if not mysql.
|
@@ -77,6 +78,8 @@ class WP_Optimize_Database_Information {
|
|
77 |
$table_info = $this->get_table_status($table_name);
|
78 |
|
79 |
if ($table_info) {
|
|
|
|
|
80 |
return $table_info->Engine;
|
81 |
}
|
82 |
|
@@ -115,13 +118,50 @@ class WP_Optimize_Database_Information {
|
|
115 |
global $wpdb;
|
116 |
static $tables_info = array();
|
117 |
|
118 |
-
if (empty($tables_info)) {
|
119 |
$tables_info = $wpdb->get_results('SHOW TABLE STATUS');
|
120 |
}
|
121 |
|
122 |
return $tables_info;
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
/**
|
126 |
* Returns true if DDL supported.
|
127 |
*
|
@@ -277,9 +317,15 @@ class WP_Optimize_Database_Information {
|
|
277 |
if (empty($query_result)) return $result;
|
278 |
|
279 |
foreach ($query_result as $row) {
|
280 |
-
$
|
281 |
-
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
|
284 |
if ('error' == $row->Msg_type) {
|
285 |
$result[$table_name]['status'] = $row->Msg_type;
|
18 |
const CSV_ENGINE = 'CSV';
|
19 |
const NDB_ENGINE = 'NDB';
|
20 |
const ARIA_ENGINE = 'Aria'; // MariaDB
|
21 |
+
const VIEW = 'VIEW';
|
22 |
|
23 |
/**
|
24 |
* Returns server type MySQL or MariaDB if mysql database or Unknown if not mysql.
|
78 |
$table_info = $this->get_table_status($table_name);
|
79 |
|
80 |
if ($table_info) {
|
81 |
+
if (!$table_info->Engine && $this->is_view($table_name)) return self::VIEW;
|
82 |
+
|
83 |
return $table_info->Engine;
|
84 |
}
|
85 |
|
118 |
global $wpdb;
|
119 |
static $tables_info = array();
|
120 |
|
121 |
+
if (empty($tables_info) || !is_array($tables_info)) {
|
122 |
$tables_info = $wpdb->get_results('SHOW TABLE STATUS');
|
123 |
}
|
124 |
|
125 |
return $tables_info;
|
126 |
}
|
127 |
|
128 |
+
/**
|
129 |
+
* Returns result for query SHOW FULL TABLES as associative array [table_name] => table_type.
|
130 |
+
*
|
131 |
+
* @return array
|
132 |
+
*/
|
133 |
+
public function get_show_full_tables() {
|
134 |
+
global $wpdb;
|
135 |
+
|
136 |
+
static $tables_info = array();
|
137 |
+
|
138 |
+
if (empty($tables_info) || !is_array($tables_info)) {
|
139 |
+
$_tables_info = $wpdb->get_results('SHOW FULL TABLES', ARRAY_N);
|
140 |
+
|
141 |
+
if (!empty($_tables_info)) {
|
142 |
+
foreach ($_tables_info as $row) {
|
143 |
+
$tables_info[$row[0]] = $row[1];
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
return $tables_info;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Checks if table is a VIEW.
|
153 |
+
*
|
154 |
+
* @param string $table_name
|
155 |
+
* @return bool
|
156 |
+
*/
|
157 |
+
public function is_view($table_name) {
|
158 |
+
$tables_info = $this->get_show_full_tables();
|
159 |
+
|
160 |
+
if (!array_key_exists($table_name, $tables_info)) return false;
|
161 |
+
|
162 |
+
return ('VIEW' == $tables_info[$table_name]);
|
163 |
+
}
|
164 |
+
|
165 |
/**
|
166 |
* Returns true if DDL supported.
|
167 |
*
|
317 |
if (empty($query_result)) return $result;
|
318 |
|
319 |
foreach ($query_result as $row) {
|
320 |
+
$table_name_parts = explode('.', rtrim($row->Table, ' .'));
|
321 |
+
$table_name = array_pop($table_name_parts);
|
322 |
+
|
323 |
+
if (!array_key_exists($table_name, $result)) {
|
324 |
+
$result[$table_name] = array(
|
325 |
+
'status' => '',
|
326 |
+
'corrupted' => false,
|
327 |
+
);
|
328 |
+
}
|
329 |
|
330 |
if ('error' == $row->Msg_type) {
|
331 |
$result[$table_name]['status'] = $row->Msg_type;
|
includes/wp-optimize-notices.php
CHANGED
@@ -101,8 +101,8 @@ class WP_Optimize_Notices extends Updraft_Notices_1_0 {
|
|
101 |
),
|
102 |
'wpo-premium-multisite' => array(
|
103 |
'prefix' => '',
|
104 |
-
'title' => __("Manage a
|
105 |
-
'text' => __("WP-Optimize Premium's
|
106 |
'image' => 'notices/wp_optimize_logo.png',
|
107 |
'button_link' => 'https://getwpo.com',
|
108 |
'button_meta' => 'wpo-premium',
|
@@ -112,7 +112,7 @@ class WP_Optimize_Notices extends Updraft_Notices_1_0 {
|
|
112 |
),
|
113 |
'wpo-premium2' => array(
|
114 |
'prefix' => '',
|
115 |
-
'title' => __("WP-Optimize Premium offers
|
116 |
'text' => __("Upgrade today to combine over a dozen optimization options.", "wp-optimize"),
|
117 |
'image' => 'notices/wp_optimize_logo.png',
|
118 |
'button_link' => 'https://getwpo.com',
|
101 |
),
|
102 |
'wpo-premium-multisite' => array(
|
103 |
'prefix' => '',
|
104 |
+
'title' => __("Manage a multisite installation? Need extra control?", "wp-optimize"),
|
105 |
+
'text' => __("WP-Optimize Premium's multisite feature includes a locking system that restricts optimization commands to users with the right permissions.", "wp-optimize"),
|
106 |
'image' => 'notices/wp_optimize_logo.png',
|
107 |
'button_link' => 'https://getwpo.com',
|
108 |
'button_meta' => 'wpo-premium',
|
112 |
),
|
113 |
'wpo-premium2' => array(
|
114 |
'prefix' => '',
|
115 |
+
'title' => __("WP-Optimize Premium offers unparalleled choice and flexibility", "wp-optimize"),
|
116 |
'text' => __("Upgrade today to combine over a dozen optimization options.", "wp-optimize"),
|
117 |
'image' => 'notices/wp_optimize_logo.png',
|
118 |
'button_link' => 'https://getwpo.com',
|
js/tablesorter/jquery.tablesorter.js
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
}
|
9 |
}(function(jQuery) {
|
10 |
|
11 |
-
/*! TableSorter (FORK) v2.30.
|
12 |
* Client-side table sorting with ease!
|
13 |
* @requires jQuery v1.2.6+
|
14 |
*
|
@@ -32,7 +32,7 @@
|
|
32 |
'use strict';
|
33 |
var ts = $.tablesorter = {
|
34 |
|
35 |
-
version : '2.30.
|
36 |
|
37 |
parsers : [],
|
38 |
widgets : [],
|
@@ -528,12 +528,9 @@
|
|
528 |
ts.buildCache( c );
|
529 |
}
|
530 |
$cell = ts.getClosest( $( this ), '.' + ts.css.header );
|
531 |
-
//
|
532 |
-
|
533 |
-
|
534 |
-
c.last.clickedIndex = ( temp < 0 ) ? $cell.attr( 'data-column' ) : temp;
|
535 |
-
// use column index if $headers is undefined
|
536 |
-
cell = c.$headers[ c.last.clickedIndex ];
|
537 |
if ( cell && !cell.sortDisabled ) {
|
538 |
ts.initSort( c, cell, e );
|
539 |
}
|
@@ -1410,7 +1407,7 @@
|
|
1410 |
} else if (
|
1411 |
!$row ||
|
1412 |
// row is a jQuery object?
|
1413 |
-
!( $row instanceof
|
1414 |
// row contained in the table?
|
1415 |
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
1416 |
) {
|
8 |
}
|
9 |
}(function(jQuery) {
|
10 |
|
11 |
+
/*! TableSorter (FORK) v2.30.3 *//*
|
12 |
* Client-side table sorting with ease!
|
13 |
* @requires jQuery v1.2.6+
|
14 |
*
|
32 |
'use strict';
|
33 |
var ts = $.tablesorter = {
|
34 |
|
35 |
+
version : '2.30.3',
|
36 |
|
37 |
parsers : [],
|
38 |
widgets : [],
|
528 |
ts.buildCache( c );
|
529 |
}
|
530 |
$cell = ts.getClosest( $( this ), '.' + ts.css.header );
|
531 |
+
// use column index from data-attribute or index of current row; fixes #1116
|
532 |
+
c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index();
|
533 |
+
cell = c.$headerIndexed[ c.last.clickedIndex ];
|
|
|
|
|
|
|
534 |
if ( cell && !cell.sortDisabled ) {
|
535 |
ts.initSort( c, cell, e );
|
536 |
}
|
1407 |
} else if (
|
1408 |
!$row ||
|
1409 |
// row is a jQuery object?
|
1410 |
+
!( $row instanceof $ ) ||
|
1411 |
// row contained in the table?
|
1412 |
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
1413 |
) {
|
js/tablesorter/jquery.tablesorter.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(t){"use strict";var r=t.tablesorter={version:"2.30.1",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",cssIconDisabled:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(e,o){if(e&&e.tHead&&0!==e.tBodies.length&&!0!==e.hasInitialized){var s="",a=t(e),n=t.metadata;e.hasInitialized=!1,e.isProcessing=!0,e.config=o,t.data(e,"tablesorter",o),r.debug(o,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+r.version),t.data(e,"startoveralltimer",new Date)),o.supportsDataObject=function(e){return e[0]=parseInt(e[0],10),e[0]>1||1===e[0]&&parseInt(e[1],10)>=4}(t.fn.jquery.split(".")),o.emptyTo=o.emptyTo.toLowerCase(),o.stringTo=o.stringTo.toLowerCase(),o.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(a.attr("class"))||(s=""!==o.theme?" tablesorter-"+o.theme:""),o.namespace?o.namespace="."+o.namespace.replace(r.regex.nonWord,""):o.namespace=".tablesorter"+Math.random().toString(16).slice(2),o.table=e,o.$table=a.addClass(r.css.table+" "+o.tableClass+s+" "+o.namespace.slice(1)).attr("role","grid"),o.$headers=a.find(o.selectorHeaders),o.$table.children().children("tr").attr("role","row"),o.$tbodies=a.children("tbody:not(."+o.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),o.$table.children("caption").length&&((s=o.$table.children("caption")[0]).id||(s.id=o.namespace.slice(1)+"caption"),o.$table.attr("aria-labelledby",s.id)),o.widgetInit={},o.textExtraction=o.$table.attr("data-text-extraction")||o.textExtraction||"basic",r.buildHeaders(o),r.fixColumnWidth(e),r.addWidgetFromClass(e),r.applyWidgetOptions(e),r.setupParsers(o),o.totalRows=0,o.debug&&r.validateOptions(o),o.delayInit||r.buildCache(o),r.bindEvents(e,o.$headers,!0),r.bindMethods(o),o.supportsDataObject&&void 0!==a.data().sortlist?o.sortList=a.data().sortlist:n&&a.metadata()&&a.metadata().sortlist&&(o.sortList=a.metadata().sortlist),r.applyWidget(e,!0),o.sortList.length>0?r.sortOn(o,o.sortList,{},!o.initWidgets):(r.setHeadersCss(o),o.initWidgets&&r.applyWidget(e,!1)),o.showProcessing&&a.unbind("sortBegin"+o.namespace+" sortEnd"+o.namespace).bind("sortBegin"+o.namespace+" sortEnd"+o.namespace,function(t){clearTimeout(o.timerProcessing),r.isProcessing(e),"sortBegin"===t.type&&(o.timerProcessing=setTimeout(function(){r.isProcessing(e,!0)},500))}),e.hasInitialized=!0,e.isProcessing=!1,r.debug(o,"core")&&(console.log("Overall initialization time:"+r.benchmark(t.data(e,"startoveralltimer"))),r.debug(o,"core")&&console.groupEnd&&console.groupEnd()),a.triggerHandler("tablesorter-initialized",e),"function"==typeof o.initialized&&o.initialized(e)}else r.debug(o,"core")&&(e.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",e))},bindMethods:function(e){var o=e.$table,s=e.namespace,a="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(s+" ");o.unbind(a.replace(r.regex.spaces," ")).bind("sortReset"+s,function(e,t){e.stopPropagation(),r.sortReset(this.config,function(e){e.isApplyingWidgets?setTimeout(function(){r.applyWidget(e,"",t)},100):r.applyWidget(e,"",t)})}).bind("updateAll"+s,function(e,t,o){e.stopPropagation(),r.updateAll(this.config,t,o)}).bind("update"+s+" updateRows"+s,function(e,t,o){e.stopPropagation(),r.update(this.config,t,o)}).bind("updateHeaders"+s,function(e,t){e.stopPropagation(),r.updateHeaders(this.config,t)}).bind("updateCell"+s,function(e,t,o,s){e.stopPropagation(),r.updateCell(this.config,t,o,s)}).bind("addRows"+s,function(e,t,o,s){e.stopPropagation(),r.addRows(this.config,t,o,s)}).bind("updateComplete"+s,function(){this.isUpdating=!1}).bind("sorton"+s,function(e,t,o,s){e.stopPropagation(),r.sortOn(this.config,t,o,s)}).bind("appendCache"+s,function(e,o,s){e.stopPropagation(),r.appendCache(this.config,s),t.isFunction(o)&&o(this)}).bind("updateCache"+s,function(e,t,o){e.stopPropagation(),r.updateCache(this.config,t,o)}).bind("applyWidgetId"+s,function(e,t){e.stopPropagation(),r.applyWidgetId(this,t)}).bind("applyWidgets"+s,function(e,t){e.stopPropagation(),r.applyWidget(this,!1,t)}).bind("refreshWidgets"+s,function(e,t,o){e.stopPropagation(),r.refreshWidgets(this,t,o)}).bind("removeWidget"+s,function(e,t,o){e.stopPropagation(),r.removeWidget(this,t,o)}).bind("destroy"+s,function(e,t,o){e.stopPropagation(),r.destroy(this,t,o)}).bind("resetToLoadState"+s,function(o){o.stopPropagation(),r.removeWidget(this,!0,!1);var s=t.extend(!0,{},e.originalSettings);(e=t.extend(!0,{},r.defaults,s)).originalSettings=s,this.hasInitialized=!1,r.setup(this,e)})},bindEvents:function(e,o,s){var a,n=(e=t(e)[0]).config,i=n.namespace,l=null;!0!==s&&(o.addClass(i.slice(1)+"_extra_headers"),(a=r.getClosest(o,"table")).length&&"TABLE"===a[0].nodeName&&a[0]!==e&&t(a[0]).addClass(i.slice(1)+"_extra_table")),a=(n.pointerDown+" "+n.pointerUp+" "+n.pointerClick+" sort keyup ").replace(r.regex.spaces," ").split(" ").join(i+" "),o.find(n.selectorSort).add(o.filter(n.selectorSort)).unbind(a).bind(a,function(e,s){var a,i,d,c=t(e.target),g=" "+e.type+" ";if(!(1!==(e.which||e.button)&&!g.match(" "+n.pointerClick+" | sort | keyup ")||" keyup "===g&&e.which!==r.keyCodes.enter||g.match(" "+n.pointerClick+" ")&&void 0!==e.which||g.match(" "+n.pointerUp+" ")&&l!==e.target&&!0!==s)){if(g.match(" "+n.pointerDown+" "))return l=e.target,void("1"===(d=c.jquery.split("."))[0]&&d[1]<4&&e.preventDefault());if(l=null,r.regex.formElements.test(e.target.nodeName)||c.hasClass(n.cssNoSort)||c.parents("."+n.cssNoSort).length>0||c.parents("button").length>0)return!n.cancelSelection;n.delayInit&&r.isEmptyObject(n.cache)&&r.buildCache(n),a=r.getClosest(t(this),"."+r.css.header),d=o.index(a),n.last.clickedIndex=d<0?a.attr("data-column"):d,(i=n.$headers[n.last.clickedIndex])&&!i.sortDisabled&&r.initSort(n,i,e)}}),n.cancelSelection&&o.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(e){var o,s,a,n;for(e.headerList=[],e.headerContent=[],e.sortVars=[],r.debug(e,"core")&&(a=new Date),e.columns=r.computeColumnIndex(e.$table.children("thead, tfoot").children("tr")),s=e.cssIcon?'<i class="'+(e.cssIcon===r.css.icon?r.css.icon:e.cssIcon+" "+r.css.icon)+'"></i>':"",e.$headers=t(t.map(e.$table.find(e.selectorHeaders),function(o,a){var n,i,l,d,c,g=t(o);if(!r.getClosest(g,"tr").hasClass(e.cssIgnoreRow))return/(th|td)/i.test(o.nodeName)||(c=r.getClosest(g,"th, td"),g.attr("data-column",c.attr("data-column"))),n=r.getColumnData(e.table,e.headers,a,!0),e.headerContent[a]=g.html(),""===e.headerTemplate||g.find("."+r.css.headerIn).length||(d=e.headerTemplate.replace(r.regex.templateContent,g.html()).replace(r.regex.templateIcon,g.find("."+r.css.icon).length?"":s),e.onRenderTemplate&&(i=e.onRenderTemplate.apply(g,[a,d]))&&"string"==typeof i&&(d=i),g.html('<div class="'+r.css.headerIn+'">'+d+"</div>")),e.onRenderHeader&&e.onRenderHeader.apply(g,[a,e,e.$table]),l=parseInt(g.attr("data-column"),10),o.column=l,c=r.getOrder(r.getData(g,n,"sortInitialOrder")||e.sortInitialOrder),e.sortVars[l]={count:-1,order:c?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],lockedOrder:!1},void 0!==(c=r.getData(g,n,"lockedOrder")||!1)&&!1!==c&&(e.sortVars[l].lockedOrder=!0,e.sortVars[l].order=r.getOrder(c)?[1,1]:[0,0]),e.headerList[a]=o,g.addClass(r.css.header+" "+e.cssHeader),r.getClosest(g,"tr").addClass(r.css.headerRow+" "+e.cssHeaderRow).attr("role","row"),e.tabIndex&&g.attr("tabindex",0),o})),e.$headerIndexed=[],n=0;n<e.columns;n++)r.isEmptyObject(e.sortVars[n])&&(e.sortVars[n]={}),o=e.$headers.filter('[data-column="'+n+'"]'),e.$headerIndexed[n]=o.length?o.not(".sorter-false").length?o.not(".sorter-false").filter(":last"):o.filter(":last"):t();e.$table.find(e.selectorHeaders).attr({scope:"col",role:"columnheader"}),r.updateHeader(e),r.debug(e,"core")&&(console.log("Built headers:"+r.benchmark(a)),console.log(e.$headers))},addInstanceMethods:function(e){t.extend(r.instanceMethods,e)},setupParsers:function(e,t){var o,s,a,n,i,l,d,c,g,p,u,f,h,m,b=e.table,y=0,w=r.debug(e,"core"),x={};if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),h=void 0===t?e.$tbodies:t,0===(m=h.length))return w?console.warn("Warning: *Empty table!* Not building a parser cache"):"";for(w&&(f=new Date,console[console.group?"group":"log"]("Detecting parsers for each column")),s={extractors:[],parsers:[]};y<m;){if((o=h[y].rows).length)for(i=0,n=e.columns,l=0;l<n;l++){if((d=e.$headerIndexed[i])&&d.length&&(c=r.getColumnData(b,e.headers,i),u=r.getParserById(r.getData(d,c,"extractor")),p=r.getParserById(r.getData(d,c,"sorter")),g="false"===r.getData(d,c,"parser"),e.empties[i]=(r.getData(d,c,"empty")||e.emptyTo||(e.emptyToBottom?"bottom":"top")).toLowerCase(),e.strings[i]=(r.getData(d,c,"string")||e.stringTo||"max").toLowerCase(),g&&(p=r.getParserById("no-parser")),u||(u=!1),p||(p=r.detectParserForColumn(e,o,-1,i)),w&&(x["("+i+") "+d.text()]={parser:p.id,extractor:u?u.id:"none",string:e.strings[i],empty:e.empties[i]}),s.parsers[i]=p,s.extractors[i]=u,(a=d[0].colSpan-1)>0))for(i+=a,n+=a;a+1>0;)s.parsers[i-a]=p,s.extractors[i-a]=u,a--;i++}y+=s.parsers.length?m:1}w&&(r.isEmptyObject(x)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](x),console.log("Completed detecting parsers"+r.benchmark(f)),console.groupEnd&&console.groupEnd()),e.parsers=s.parsers,e.extractors=s.extractors},addParser:function(e){var t,o=r.parsers.length,s=!0;for(t=0;t<o;t++)r.parsers[t].id.toLowerCase()===e.id.toLowerCase()&&(s=!1);s&&(r.parsers[r.parsers.length]=e)},getParserById:function(e){if("false"==e)return!1;var t,o=r.parsers.length;for(t=0;t<o;t++)if(r.parsers[t].id.toLowerCase()===e.toString().toLowerCase())return r.parsers[t];return!1},detectParserForColumn:function(e,o,s,a){for(var n,i,l,d=r.parsers.length,c=!1,g="",p=r.debug(e,"core"),u=!0;""===g&&u;)(l=o[++s])&&s<50?l.className.indexOf(r.cssIgnoreRow)<0&&(c=o[s].cells[a],g=r.getElementText(e,c,a),i=t(c),p&&console.log("Checking if value was empty on row "+s+", column: "+a+': "'+g+'"')):u=!1;for(;--d>=0;)if((n=r.parsers[d])&&"text"!==n.id&&n.is&&n.is(g,e.table,c,i))return n;return r.getParserById("text")},getElementText:function(e,o,s){if(!o)return"";var a,n=e.textExtraction||"",i=o.jquery?o:t(o);return"string"==typeof n?"basic"===n&&void 0!==(a=i.attr(e.textAttribute))?t.trim(a):t.trim(o.textContent||i.text()):"function"==typeof n?t.trim(n(i[0],e.table,s)):"function"==typeof(a=r.getColumnData(e.table,n,s))?t.trim(a(i[0],e.table,s)):t.trim(i[0].textContent||i.text())},getParsedText:function(e,t,o,s){void 0===s&&(s=r.getElementText(e,t,o));var a=""+s,n=e.parsers[o],i=e.extractors[o];return n&&(i&&"function"==typeof i.format&&(s=i.format(s,e.table,t,o)),a="no-parser"===n.id?"":n.format(""+s,e.table,t,o),e.ignoreCase&&"string"==typeof a&&(a=a.toLowerCase())),a},buildCache:function(e,o,s){var a,n,i,l,d,c,g,p,u,f,h,m,b,y,w,x,v,C,$,I,D,R,T=e.table,L=e.parsers,A=r.debug(e,"core");if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),g=void 0===s?e.$tbodies:s,e.cache={},e.totalRows=0,!L)return A?console.warn("Warning: *Empty table!* Not building a cache"):"";for(A&&(m=new Date),e.showProcessing&&r.isProcessing(T,!0),c=0;c<g.length;c++){for(x=[],a=e.cache[c]={normalized:[]},b=g[c]&&g[c].rows.length||0,l=0;l<b;++l)if(y={child:[],raw:[]},p=t(g[c].rows[l]),u=[],!p.hasClass(e.selectorRemove.slice(1)))if(p.hasClass(e.cssChildRow)&&0!==l)for(D=a.normalized.length-1,(w=a.normalized[D][e.columns]).$row=w.$row.add(p),p.prev().hasClass(e.cssChildRow)||p.prev().addClass(r.css.cssHasChild),f=p.children("th, td"),D=w.child.length,w.child[D]=[],C=0,I=e.columns,d=0;d<I;d++)(h=f[d])&&(w.child[D][d]=r.getParsedText(e,h,d),(v=f[d].colSpan-1)>0&&(C+=v,I+=v)),C++;else{for(y.$row=p,y.order=l,C=0,I=e.columns,d=0;d<I;++d){if((h=p[0].cells[d])&&C<e.columns&&(!($=void 0!==L[C])&&A&&console.warn("No parser found for row: "+l+", column: "+d+'; cell containing: "'+t(h).text()+'"; does it have a header?'),n=r.getElementText(e,h,C),y.raw[C]=n,i=r.getParsedText(e,h,C,n),u[C]=i,$&&"numeric"===(L[C].type||"").toLowerCase()&&(x[C]=Math.max(Math.abs(i)||0,x[C]||0)),(v=h.colSpan-1)>0)){for(R=0;R<=v;)i=e.duplicateSpan||0===R?n:"string"!=typeof e.textExtraction?r.getElementText(e,h,C+R)||"":"",y.raw[C+R]=i,u[C+R]=i,R++;C+=v,I+=v}C++}u[e.columns]=y,a.normalized[a.normalized.length]=u}a.colMax=x,e.totalRows+=a.normalized.length}if(e.showProcessing&&r.isProcessing(T),A){for(D=Math.min(5,e.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+e.totalRows+" rows (showing "+D+" rows in log) and "+e.columns+" columns"+r.benchmark(m)),n={},d=0;d<e.columns;d++)for(C=0;C<D;C++)n["row: "+C]||(n["row: "+C]={}),n["row: "+C][e.$headerIndexed[d].text()]=e.cache[0].normalized[C][d];console[console.table?"table":"log"](n),console.groupEnd&&console.groupEnd()}t.isFunction(o)&&o(T)},getColumnText:function(e,o,s,a){var n,i,l,d,c,g,p,u,f,h,m="function"==typeof s,b="all"===o,y={raw:[],parsed:[],$cell:[]},w=(e=t(e)[0]).config;if(!r.isEmptyObject(w)){for(c=w.$tbodies.length,n=0;n<c;n++)for(g=(l=w.cache[n].normalized).length,i=0;i<g;i++)d=l[i],a&&!d[w.columns].$row.is(a)||(h=!0,u=b?d.slice(0,w.columns):d[o],d=d[w.columns],p=b?d.raw:d.raw[o],f=b?d.$row.children():d.$row.children().eq(o),m&&(h=s({tbodyIndex:n,rowIndex:i,parsed:u,raw:p,$row:d.$row,$cell:f})),!1!==h&&(y.parsed[y.parsed.length]=u,y.raw[y.raw.length]=p,y.$cell[y.$cell.length]=f));return y}r.debug(w,"core")&&console.warn("No cache found - aborting getColumnText function!")},setHeadersCss:function(e){var o,s,a=e.sortList,n=a.length,i=r.css.sortNone+" "+e.cssNone,l=[r.css.sortAsc+" "+e.cssAsc,r.css.sortDesc+" "+e.cssDesc],d=[e.cssIconAsc,e.cssIconDesc,e.cssIconNone],c=["ascending","descending"],g=function(e,t){e.removeClass(i).addClass(l[t]).attr("aria-sort",c[t]).find("."+r.css.icon).removeClass(d[2]).addClass(d[t])},p=e.$table.find("tfoot tr").children("td, th").add(t(e.namespace+"_extra_headers")).removeClass(l.join(" ")),u=e.$headers.add(t("thead "+e.namespace+"_extra_headers")).removeClass(l.join(" ")).addClass(i).attr("aria-sort","none").find("."+r.css.icon).removeClass(d.join(" ")).end();for(u.not(".sorter-false").find("."+r.css.icon).addClass(d[2]),e.cssIconDisabled&&u.filter(".sorter-false").find("."+r.css.icon).addClass(e.cssIconDisabled),o=0;o<n;o++)if(2!==a[o][1]){if(u=e.$headers.filter(function(t){for(var o=!0,s=e.$headers.eq(t),a=parseInt(s.attr("data-column"),10),n=a+r.getClosest(s,"th, td")[0].colSpan;a<n;a++)o=!!o&&(o||r.isValueInArray(a,e.sortList)>-1);return o}),(u=u.not(".sorter-false").filter('[data-column="'+a[o][0]+'"]'+(1===n?":last":""))).length)for(s=0;s<u.length;s++)u[s].sortDisabled||g(u.eq(s),a[o][1]);p.length&&g(p.filter('[data-column="'+a[o][0]+'"]'),a[o][1])}for(n=e.$headers.length,o=0;o<n;o++)r.setColumnAriaLabel(e,e.$headers.eq(o))},getClosest:function(e,r){return t.fn.closest?e.closest(r):e.is(r)?e:e.parents(r).filter(":first")},setColumnAriaLabel:function(e,o,s){if(o.length){var a=parseInt(o.attr("data-column"),10),n=e.sortVars[a],i=o.hasClass(r.css.sortAsc)?"sortAsc":o.hasClass(r.css.sortDesc)?"sortDesc":"sortNone",l=t.trim(o.text())+": "+r.language[i];o.hasClass("sorter-false")||!1===s?l+=r.language.sortDisabled:(i=(n.count+1)%n.order.length,s=n.order[i],l+=r.language[0===s?"nextAsc":1===s?"nextDesc":"nextNone"]),o.attr("aria-label",l)}},updateHeader:function(e){var t,o,s,a,n=e.table,i=e.$headers.length;for(t=0;t<i;t++)s=e.$headers.eq(t),a=r.getColumnData(n,e.headers,t,!0),o="false"===r.getData(s,a,"sorter")||"false"===r.getData(s,a,"parser"),r.setColumnSort(e,s,o)},setColumnSort:function(e,t,r){var o=e.table.id;t[0].sortDisabled=r,t[r?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+r),e.tabIndex&&(r?t.removeAttr("tabindex"):t.attr("tabindex","0")),o&&(r?t.removeAttr("aria-controls"):t.attr("aria-controls",o))},updateHeaderSortCount:function(e,o){var s,a,n,i,l,d,c,g,p=o||e.sortList,u=p.length;for(e.sortList=[],i=0;i<u;i++)if(c=p[i],(s=parseInt(c[0],10))<e.columns){switch(e.sortVars[s].order||(g=r.getOrder(e.sortInitialOrder)?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],e.sortVars[s].order=g,e.sortVars[s].count=0),g=e.sortVars[s].order,a=(""+c[1]).match(/^(1|d|s|o|n)/),a=a?a[0]:""){case"1":case"d":a=1;break;case"s":a=l||0;break;case"o":a=0===(d=g[(l||0)%g.length])?1:1===d?0:2;break;case"n":a=g[++e.sortVars[s].count%g.length];break;default:a=0}l=0===i?a:l,n=[s,parseInt(a,10)||0],e.sortList[e.sortList.length]=n,a=t.inArray(n[1],g),e.sortVars[s].count=a>=0?a:n[1]%g.length}},updateAll:function(e,t,o){var s=e.table;s.isUpdating=!0,r.refreshWidgets(s,!0,!0),r.buildHeaders(e),r.bindEvents(s,e.$headers,!0),r.bindMethods(e),r.commonUpdate(e,t,o)},update:function(e,t,o){e.table.isUpdating=!0,r.updateHeader(e),r.commonUpdate(e,t,o)},updateHeaders:function(e,t){e.table.isUpdating=!0,r.buildHeaders(e),r.bindEvents(e.table,e.$headers,!0),r.resortComplete(e,t)},updateCell:function(e,o,s,a){if(t(o).closest("tr").hasClass(e.cssChildRow))console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');else{if(r.isEmptyObject(e.cache))return r.updateHeader(e),void r.commonUpdate(e,s,a);e.table.isUpdating=!0,e.$table.find(e.selectorRemove).remove();var n,i,l,d,c,g,p=e.$tbodies,u=t(o),f=p.index(r.getClosest(u,"tbody")),h=e.cache[f],m=r.getClosest(u,"tr");if(o=u[0],p.length&&f>=0){if(l=p.eq(f).find("tr").not("."+e.cssChildRow).index(m),c=h.normalized[l],(g=m[0].cells.length)!==e.columns)for(d=0,n=!1,i=0;i<g;i++)n||m[0].cells[i]===o?n=!0:d+=m[0].cells[i].colSpan;else d=u.index();n=r.getElementText(e,o,d),c[e.columns].raw[d]=n,n=r.getParsedText(e,o,d,n),c[d]=n,"numeric"===(e.parsers[d].type||"").toLowerCase()&&(h.colMax[d]=Math.max(Math.abs(n)||0,h.colMax[d]||0)),!1!==(n="undefined"!==s?s:e.resort)?r.checkResort(e,n,a):r.resortComplete(e,a)}else r.debug(e,"core")&&console.error("updateCell aborted, tbody missing or not within the indicated table"),e.table.isUpdating=!1}},addRows:function(o,s,a,n){var i,l,d,c,g,p,u,f,h,m,b,y,w,x="string"==typeof s&&1===o.$tbodies.length&&/<tr/.test(s||""),v=o.table;if(x)s=t(s),o.$tbodies.append(s);else if(!(s&&s instanceof e&&r.getClosest(s,"table")[0]===o.table))return r.debug(o,"core")&&console.error("addRows method requires (1) a jQuery selector reference to rows that have already been added to the table, or (2) row HTML string to be added to a table with only one tbody"),!1;if(v.isUpdating=!0,r.isEmptyObject(o.cache))r.updateHeader(o),r.commonUpdate(o,a,n);else{for(g=s.filter("tr").attr("role","row").length,d=o.$tbodies.index(s.parents("tbody").filter(":first")),o.parsers&&o.parsers.length||r.setupParsers(o),c=0;c<g;c++){for(h=0,u=s[c].cells.length,f=o.cache[d].normalized.length,b=[],m={child:[],raw:[],$row:s.eq(c),order:f},p=0;p<u;p++)y=s[c].cells[p],i=r.getElementText(o,y,h),m.raw[h]=i,l=r.getParsedText(o,y,h,i),b[h]=l,"numeric"===(o.parsers[h].type||"").toLowerCase()&&(o.cache[d].colMax[h]=Math.max(Math.abs(l)||0,o.cache[d].colMax[h]||0)),(w=y.colSpan-1)>0&&(h+=w),h++;b[o.columns]=m,o.cache[d].normalized[f]=b}r.checkResort(o,a,n)}},updateCache:function(e,t,o){e.parsers&&e.parsers.length||r.setupParsers(e,o),r.buildCache(e,t,o)},appendCache:function(e,t){var o,s,a,n,i,l,d,c=e.table,g=e.$tbodies,p=[],u=e.cache;if(r.isEmptyObject(u))return e.appender?e.appender(c,p):c.isUpdating?e.$table.triggerHandler("updateComplete",c):"";for(r.debug(e,"core")&&(d=new Date),l=0;l<g.length;l++)if((a=g.eq(l)).length){for(n=r.processTbody(c,a,!0),s=(o=u[l].normalized).length,i=0;i<s;i++)p[p.length]=o[i][e.columns].$row,e.appender&&(!e.pager||e.pager.removeRows||e.pager.ajax)||n.append(o[i][e.columns].$row);r.processTbody(c,n,!1)}e.appender&&e.appender(c,p),r.debug(e,"core")&&console.log("Rebuilt table"+r.benchmark(d)),t||e.appender||r.applyWidget(c),c.isUpdating&&e.$table.triggerHandler("updateComplete",c)},commonUpdate:function(e,t,o){e.$table.find(e.selectorRemove).remove(),r.setupParsers(e),r.buildCache(e),r.checkResort(e,t,o)},initSort:function(e,o,s){if(e.table.isUpdating)return setTimeout(function(){r.initSort(e,o,s)},50);var a,n,i,l,d,c,g,p=!s[e.sortMultiSortKey],u=e.table,f=e.$headers.length,h=r.getClosest(t(o),"th, td"),m=parseInt(h.attr("data-column"),10),b=e.sortVars[m].order;if(h=h[0],e.$table.triggerHandler("sortStart",u),c=(e.sortVars[m].count+1)%b.length,e.sortVars[m].count=s[e.sortResetKey]?2:c,e.sortRestart)for(i=0;i<f;i++)g=e.$headers.eq(i),m!==(c=parseInt(g.attr("data-column"),10))&&(p||g.hasClass(r.css.sortNone))&&(e.sortVars[c].count=-1);if(p){if(e.sortList=[],e.last.sortList=[],null!==e.sortForce)for(a=e.sortForce,n=0;n<a.length;n++)a[n][0]!==m&&(e.sortList[e.sortList.length]=a[n]);if((l=b[e.sortVars[m].count])<2&&(e.sortList[e.sortList.length]=[m,l],h.colSpan>1))for(n=1;n<h.colSpan;n++)e.sortList[e.sortList.length]=[m+n,l],e.sortVars[m+n].count=t.inArray(l,b)}else if(e.sortList=t.extend([],e.last.sortList),r.isValueInArray(m,e.sortList)>=0)for(n=0;n<e.sortList.length;n++)(c=e.sortList[n])[0]===m&&(c[1]=b[e.sortVars[m].count],2===c[1]&&(e.sortList.splice(n,1),e.sortVars[m].count=-1));else if((l=b[e.sortVars[m].count])<2&&(e.sortList[e.sortList.length]=[m,l],h.colSpan>1))for(n=1;n<h.colSpan;n++)e.sortList[e.sortList.length]=[m+n,l],e.sortVars[m+n].count=t.inArray(l,b);if(e.last.sortList=t.extend([],e.sortList),e.sortList.length&&e.sortAppend&&(a=t.isArray(e.sortAppend)?e.sortAppend:e.sortAppend[e.sortList[0][0]],!r.isEmptyObject(a)))for(n=0;n<a.length;n++)if(a[n][0]!==m&&r.isValueInArray(a[n][0],e.sortList)<0){if(l=a[n][1],d=(""+l).match(/^(a|d|s|o|n)/))switch(c=e.sortList[0][1],d[0]){case"d":l=1;break;case"s":l=c;break;case"o":l=0===c?1:0;break;case"n":l=(c+1)%b.length;break;default:l=0}e.sortList[e.sortList.length]=[a[n][0],l]}e.$table.triggerHandler("sortBegin",u),setTimeout(function(){r.setHeadersCss(e),r.multisort(e),r.appendCache(e),e.$table.triggerHandler("sortBeforeEnd",u),e.$table.triggerHandler("sortEnd",u)},1)},multisort:function(e){var t,o,s,a,n=e.table,i=[],l=0,d=e.textSorter||"",c=e.sortList,g=c.length,p=e.$tbodies.length;if(!e.serverSideSorting&&!r.isEmptyObject(e.cache)){if(r.debug(e,"core")&&(o=new Date),"object"==typeof d)for(s=e.columns;s--;)"function"==typeof(a=r.getColumnData(n,d,s))&&(i[s]=a);for(t=0;t<p;t++)s=e.cache[t].colMax,e.cache[t].normalized.sort(function(t,o){var a,p,u,f,h,m,b;for(a=0;a<g;a++){if(u=c[a][0],f=c[a][1],l=0===f,e.sortStable&&t[u]===o[u]&&1===g)return t[e.columns].order-o[e.columns].order;if(p=/n/i.test(r.getSortType(e.parsers,u)),p&&e.strings[u]?(p="boolean"==typeof r.string[e.strings[u]]?(l?1:-1)*(r.string[e.strings[u]]?-1:1):e.strings[u]?r.string[e.strings[u]]||0:0,h=e.numberSorter?e.numberSorter(t[u],o[u],l,s[u],n):r["sortNumeric"+(l?"Asc":"Desc")](t[u],o[u],p,s[u],u,e)):(m=l?t:o,b=l?o:t,h="function"==typeof d?d(m[u],b[u],l,u,n):"function"==typeof i[u]?i[u](m[u],b[u],l,u,n):r["sortNatural"+(l?"Asc":"Desc")](t[u],o[u],u,e)),h)return h}return t[e.columns].order-o[e.columns].order});r.debug(e,"core")&&console.log("Applying sort "+c.toString()+r.benchmark(o))}},resortComplete:function(e,r){e.table.isUpdating&&e.$table.triggerHandler("updateComplete",e.table),t.isFunction(r)&&r(e.table)},checkResort:function(e,o,s){var a=t.isArray(o)?o:e.sortList;!1===(void 0===o?e.resort:o)||e.serverSideSorting||e.table.isProcessing?(r.resortComplete(e,s),r.applyWidget(e.table,!1)):a.length?r.sortOn(e,a,function(){r.resortComplete(e,s)},!0):r.sortReset(e,function(){r.resortComplete(e,s),r.applyWidget(e.table,!1)})},sortOn:function(e,o,s,a){var n=e.table;e.$table.triggerHandler("sortStart",n),r.updateHeaderSortCount(e,o),r.setHeadersCss(e),e.delayInit&&r.isEmptyObject(e.cache)&&r.buildCache(e),e.$table.triggerHandler("sortBegin",n),r.multisort(e),r.appendCache(e,a),e.$table.triggerHandler("sortBeforeEnd",n),e.$table.triggerHandler("sortEnd",n),r.applyWidget(n),t.isFunction(s)&&s(n)},sortReset:function(e,o){e.sortList=[],r.setHeadersCss(e),r.multisort(e),r.appendCache(e);var s;for(s=0;s<e.columns;s++)e.sortVars[s].count=-1;t.isFunction(o)&&o(e.table)},getSortType:function(e,t){return e&&e[t]?e[t].type||"":""},getOrder:function(e){return/^d/i.test(e)||1===e},sortNatural:function(e,t){if(e===t)return 0;e=e.toString(),t=t.toString();var o,s,a,n,i,l,d=r.regex;if(d.hex.test(t)){if(o=parseInt((e||"").match(d.hex),16),s=parseInt((t||"").match(d.hex),16),o<s)return-1;if(o>s)return 1}for(o=(e||"").replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0"),s=(t||"").replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0"),l=Math.max(o.length,s.length),i=0;i<l;i++){if(a=isNaN(o[i])?o[i]||0:parseFloat(o[i])||0,n=isNaN(s[i])?s[i]||0:parseFloat(s[i])||0,isNaN(a)!==isNaN(n))return isNaN(a)?1:-1;if(typeof a!=typeof n&&(a+="",n+=""),a<n)return-1;if(a>n)return 1}return 0},sortNaturalAsc:function(e,t,o,s){if(e===t)return 0;var a=r.string[s.empties[o]||s.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:-a||-1:""===t&&0!==a?"boolean"==typeof a?a?1:-1:a||1:r.sortNatural(e,t)},sortNaturalDesc:function(e,t,o,s){if(e===t)return 0;var a=r.string[s.empties[o]||s.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:a||1:""===t&&0!==a?"boolean"==typeof a?a?1:-1:-a||-1:r.sortNatural(t,e)},sortText:function(e,t){return e>t?1:e<t?-1:0},getTextValue:function(e,t,r){if(r){var o,s=e?e.length:0,a=r+t;for(o=0;o<s;o++)a+=e.charCodeAt(o);return t*a}return 0},sortNumericAsc:function(e,t,o,s,a,n){if(e===t)return 0;var i=r.string[n.empties[a]||n.emptyTo];return""===e&&0!==i?"boolean"==typeof i?i?-1:1:-i||-1:""===t&&0!==i?"boolean"==typeof i?i?1:-1:i||1:(isNaN(e)&&(e=r.getTextValue(e,o,s)),isNaN(t)&&(t=r.getTextValue(t,o,s)),e-t)},sortNumericDesc:function(e,t,o,s,a,n){if(e===t)return 0;var i=r.string[n.empties[a]||n.emptyTo];return""===e&&0!==i?"boolean"==typeof i?i?-1:1:i||1:""===t&&0!==i?"boolean"==typeof i?i?1:-1:-i||-1:(isNaN(e)&&(e=r.getTextValue(e,o,s)),isNaN(t)&&(t=r.getTextValue(t,o,s)),t-e)},sortNumeric:function(e,t){return e-t},addWidget:function(e){e.id&&!r.isEmptyObject(r.getWidgetById(e.id))&&console.warn('"'+e.id+'" widget was loaded more than once!'),r.widgets[r.widgets.length]=e},hasWidget:function(e,r){return(e=t(e)).length&&e[0].config&&e[0].config.widgetInit[r]||!1},getWidgetById:function(e){var t,o,s=r.widgets.length;for(t=0;t<s;t++)if((o=r.widgets[t])&&o.id&&o.id.toLowerCase()===e.toLowerCase())return o},applyWidgetOptions:function(e){var o,s,a,n=e.config,i=n.widgets.length;if(i)for(o=0;o<i;o++)(s=r.getWidgetById(n.widgets[o]))&&s.options&&(a=t.extend(!0,{},s.options),n.widgetOptions=t.extend(!0,a,n.widgetOptions),t.extend(!0,r.defaults.widgetOptions,s.options))},addWidgetFromClass:function(e){var t,o,s=e.config,a="^"+s.widgetClass.replace(r.regex.templateName,"(\\S+)+")+"$",n=new RegExp(a,"g"),i=(e.className||"").split(r.regex.spaces);if(i.length)for(t=i.length,o=0;o<t;o++)i[o].match(n)&&(s.widgets[s.widgets.length]=i[o].replace(n,"$1"))},applyWidgetId:function(e,o,s){var a,n,i,l=(e=t(e)[0]).config,d=l.widgetOptions,c=r.debug(l,"core"),g=r.getWidgetById(o);g&&(i=g.id,a=!1,t.inArray(i,l.widgets)<0&&(l.widgets[l.widgets.length]=i),c&&(n=new Date),!s&&l.widgetInit[i]||(l.widgetInit[i]=!0,e.hasInitialized&&r.applyWidgetOptions(e),"function"==typeof g.init&&(a=!0,c&&console[console.group?"group":"log"]("Initializing "+i+" widget"),g.init(e,g,l,d))),s||"function"!=typeof g.format||(a=!0,c&&console[console.group?"group":"log"]("Updating "+i+" widget"),g.format(e,l,d,!1)),c&&a&&(console.log("Completed "+(s?"initializing ":"applying ")+i+" widget"+r.benchmark(n)),console.groupEnd&&console.groupEnd()))},applyWidget:function(e,o,s){var a,n,i,l,d,c=(e=t(e)[0]).config,g=r.debug(c,"core"),p=[];if(!1===o||!e.hasInitialized||!e.isApplyingWidgets&&!e.isUpdating){if(g&&(d=new Date),r.addWidgetFromClass(e),clearTimeout(c.timerReady),c.widgets.length){for(e.isApplyingWidgets=!0,c.widgets=t.grep(c.widgets,function(e,r){return t.inArray(e,c.widgets)===r}),n=(i=c.widgets||[]).length,a=0;a<n;a++)(l=r.getWidgetById(i[a]))&&l.id?(l.priority||(l.priority=10),p[a]=l):g&&console.warn('"'+i[a]+'" was enabled, but the widget code has not been loaded!');for(p.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),n=p.length,g&&console[console.group?"group":"log"]("Start "+(o?"initializing":"applying")+" widgets"),a=0;a<n;a++)(l=p[a])&&l.id&&r.applyWidgetId(e,l.id,o);g&&console.groupEnd&&console.groupEnd()}c.timerReady=setTimeout(function(){e.isApplyingWidgets=!1,t.data(e,"lastWidgetApplication",new Date),c.$table.triggerHandler("tablesorter-ready"),o||"function"!=typeof s||s(e),g&&(l=c.widgets.length,console.log("Completed "+(!0===o?"initializing ":"applying ")+l+" widget"+(1!==l?"s":"")+r.benchmark(d)))},10)}},removeWidget:function(e,o,s){var a,n,i,l,d=(e=t(e)[0]).config;if(!0===o)for(o=[],l=r.widgets.length,i=0;i<l;i++)(n=r.widgets[i])&&n.id&&(o[o.length]=n.id);else o=(t.isArray(o)?o.join(","):o||"").toLowerCase().split(/[\s,]+/);for(l=o.length,a=0;a<l;a++)n=r.getWidgetById(o[a]),(i=t.inArray(o[a],d.widgets))>=0&&!0!==s&&d.widgets.splice(i,1),n&&n.remove&&(r.debug(d,"core")&&console.log((s?"Refreshing":"Removing")+' "'+o[a]+'" widget'),n.remove(e,d,d.widgetOptions,s),d.widgetInit[o[a]]=!1);d.$table.triggerHandler("widgetRemoveEnd",e)},refreshWidgets:function(e,o,s){var a,n,i=(e=t(e)[0]).config.widgets,l=r.widgets,d=l.length,c=[],g=function(e){t(e).triggerHandler("refreshComplete")};for(a=0;a<d;a++)(n=l[a])&&n.id&&(o||t.inArray(n.id,i)<0)&&(c[c.length]=n.id);r.removeWidget(e,c.join(","),!0),!0!==s?(r.applyWidget(e,o||!1,g),o&&r.applyWidget(e,!1,g)):g(e)},benchmark:function(e){return" ("+((new Date).getTime()-e.getTime())+" ms)"},log:function(){console.log(arguments)},debug:function(e,t){return e&&(!0===e.debug||"string"==typeof e.debug&&e.debug.indexOf(t)>-1)},isEmptyObject:function(e){for(var t in e)return!1;return!0},isValueInArray:function(e,t){var r,o=t&&t.length||0;for(r=0;r<o;r++)if(t[r][0]===e)return r;return-1},formatFloat:function(e,o){if("string"!=typeof e||""===e)return e;var s;return e=(o&&o.config?!1!==o.config.usNumberFormat:void 0===o||o)?e.replace(r.regex.comma,""):e.replace(r.regex.digitNonUS,"").replace(r.regex.comma,"."),r.regex.digitNegativeTest.test(e)&&(e=e.replace(r.regex.digitNegativeReplace,"-$1")),s=parseFloat(e),isNaN(s)?t.trim(e):s},isDigit:function(e){return isNaN(e)?r.regex.digitTest.test(e.toString().replace(r.regex.digitReplace,"")):""!==e},computeColumnIndex:function(e,o){var s,a,n,i,l,d,c,g,p,u,f=o&&o.columns||0,h=[],m=new Array(f);for(s=0;s<e.length;s++)for(d=e[s].cells,a=0;a<d.length;a++){for(c=s,g=(l=d[a]).rowSpan||1,p=l.colSpan||1,void 0===h[c]&&(h[c]=[]),n=0;n<h[c].length+1;n++)if(void 0===h[c][n]){u=n;break}for(f&&l.cellIndex===u||(l.setAttribute?l.setAttribute("data-column",u):t(l).attr("data-column",u)),n=c;n<c+g;n++)for(void 0===h[n]&&(h[n]=[]),m=h[n],i=u;i<u+p;i++)m[i]="x"}return r.checkColumnCount(e,h,m.length),m.length},checkColumnCount:function(e,t,r){var o,s,a=!0,n=[];for(o=0;o<t.length;o++)if(t[o]&&(s=t[o].length,t[o].length!==r)){a=!1;break}a||(e.each(function(e,t){var r=t.parentElement.nodeName;n.indexOf(r)<0&&n.push(r)}),console.error("Invalid or incorrect number of columns in the "+n.join(" or ")+"; expected "+r+", but found "+s+" columns"))},fixColumnWidth:function(e){var o,s,a,n,i,l=(e=t(e)[0]).config,d=l.$table.children("colgroup");if(d.length&&d.hasClass(r.css.colgroup)&&d.remove(),l.widthFixed&&0===l.$table.children("colgroup").length){for(d=t('<colgroup class="'+r.css.colgroup+'">'),o=l.$table.width(),n=(a=l.$tbodies.find("tr:first").children(":visible")).length,i=0;i<n;i++)s=parseInt(a.eq(i).width()/o*1e3,10)/10+"%",d.append(t("<col>").css("width",s));l.$table.prepend(d)}},getData:function(e,r,o){var s,a,n="",i=t(e);return i.length?(s=!!t.metadata&&i.metadata(),a=" "+(i.attr("class")||""),void 0!==i.data(o)||void 0!==i.data(o.toLowerCase())?n+=i.data(o)||i.data(o.toLowerCase()):s&&void 0!==s[o]?n+=s[o]:r&&void 0!==r[o]?n+=r[o]:" "!==a&&a.match(" "+o+"-")&&(n=a.match(new RegExp("\\s"+o+"-([\\w-]+)"))[1]||""),t.trim(n)):""},getColumnData:function(e,r,o,s,a){if("object"!=typeof r||null===r)return r;var n,i=(e=t(e)[0]).config,l=a||i.$headers,d=i.$headerIndexed&&i.$headerIndexed[o]||l.find('[data-column="'+o+'"]:last');if(void 0!==r[o])return s?r[o]:r[l.index(d)];for(n in r)if("string"==typeof n&&d.filter(n).add(d.find(n)).length)return r[n]},isProcessing:function(e,o,s){var a=(e=t(e))[0].config,n=s||e.find("."+r.css.header);o?(void 0!==s&&a.sortList.length>0&&(n=n.filter(function(){return!this.sortDisabled&&r.isValueInArray(parseFloat(t(this).attr("data-column")),a.sortList)>=0})),e.add(n).addClass(r.css.processing+" "+a.cssProcessing)):e.add(n).removeClass(r.css.processing+" "+a.cssProcessing)},processTbody:function(e,r,o){if(e=t(e)[0],o)return e.isProcessing=!0,r.before('<colgroup class="tablesorter-savemyplace"/>'),t.fn.detach?r.detach():r.remove();var s=t(e).find("colgroup.tablesorter-savemyplace");r.insertAfter(s),s.remove(),e.isProcessing=!1},clearTableBody:function(e){t(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,o="[",s=r.characterEquivalents;if(!r.characterRegex){r.characterRegexArray={};for(t in s)"string"==typeof t&&(o+=s[t],r.characterRegexArray[t]=new RegExp("["+s[t]+"]","g"));r.characterRegex=new RegExp(o+"]")}if(r.characterRegex.test(e))for(t in s)"string"==typeof t&&(e=e.replace(r.characterRegexArray[t],t));return e},validateOptions:function(e){var o,s,a,n,i="headers sortForce sortList sortAppend widgets".split(" "),l=e.originalSettings;if(l){r.debug(e,"core")&&(n=new Date);for(o in l)if("undefined"===(a=typeof r.defaults[o]))console.warn('Tablesorter Warning! "table.config.'+o+'" option not recognized');else if("object"===a)for(s in l[o])a=r.defaults[o]&&typeof r.defaults[o][s],t.inArray(o,i)<0&&"undefined"===a&&console.warn('Tablesorter Warning! "table.config.'+o+"."+s+'" option not recognized');r.debug(e,"core")&&console.log("validate options time:"+r.benchmark(n))}},restoreHeaders:function(e){var o,s,a=t(e)[0].config,n=a.$table.find(a.selectorHeaders),i=n.length;for(o=0;o<i;o++)(s=n.eq(o)).find("."+r.css.headerIn).length&&s.html(a.headerContent[o])},destroy:function(e,o,s){if((e=t(e)[0]).hasInitialized){r.removeWidget(e,!0,!1);var a,n=t(e),i=e.config,l=n.find("thead:first"),d=l.find("tr."+r.css.headerRow).removeClass(r.css.headerRow+" "+i.cssHeaderRow),c=n.find("tfoot:first > tr").children("th, td");!1===o&&t.inArray("uitheme",i.widgets)>=0&&(n.triggerHandler("applyWidgetId",["uitheme"]),n.triggerHandler("applyWidgetId",["zebra"])),l.find("tr").not(d).remove(),a="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(i.namespace+" "),n.removeData("tablesorter").unbind(a.replace(r.regex.spaces," ")),i.$headers.add(c).removeClass([r.css.header,i.cssHeader,i.cssAsc,i.cssDesc,r.css.sortAsc,r.css.sortDesc,r.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),d.find(i.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(i.namespace+" ").replace(r.regex.spaces," ")),r.restoreHeaders(e),n.toggleClass(r.css.table+" "+i.tableClass+" tablesorter-"+i.theme,!1===o),n.removeClass(i.namespace.slice(1)),e.hasInitialized=!1,delete e.config.cache,"function"==typeof s&&s(e),r.debug(i,"core")&&console.log("tablesorter has been removed")}}};t.fn.tablesorter=function(e){return this.each(function(){var o=this,s=t.extend(!0,{},r.defaults,e,r.instanceMethods);s.originalSettings=e,!o.hasInitialized&&r.buildTable&&"TABLE"!==this.nodeName?r.buildTable(o,s):r.setup(o,s)})},window.console&&window.console.log||(r.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];r.logs[r.logs.length]={date:Date.now(),log:e}}),r.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),r.addParser({id:"text",is:function(){return!0},format:function(e,o){var s=o.config;return e&&(e=t.trim(s.ignoreCase?e.toLocaleLowerCase():e),e=s.sortLocaleCompare?r.replaceAccents(e):e),e},type:"text"}),r.regex.nondigit=/[^\w,. \-()]/g,r.addParser({id:"digit",is:function(e){return r.isDigit(e)},format:function(e,o){var s=r.formatFloat((e||"").replace(r.regex.nondigit,""),o);return e&&"number"==typeof s?s:e?t.trim(e&&o.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.currencyReplace=/[+\-,. ]/g,r.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,r.addParser({id:"currency",is:function(e){return e=(e||"").replace(r.regex.currencyReplace,""),r.regex.currencyTest.test(e)},format:function(e,o){var s=r.formatFloat((e||"").replace(r.regex.nondigit,""),o);return e&&"number"==typeof s?s:e?t.trim(e&&o.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,r.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,r.addParser({id:"url",is:function(e){return r.regex.urlProtocolTest.test(e)},format:function(e){return e?t.trim(e.replace(r.regex.urlProtocolReplace,"")):e},type:"text"}),r.regex.dash=/-/g,r.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,r.addParser({id:"isoDate",is:function(e){return r.regex.isoDate.test(e)},format:function(e){var t=e?new Date(e.replace(r.regex.dash,"/")):e;return t instanceof Date&&isFinite(t)?t.getTime():e},type:"numeric"}),r.regex.percent=/%/g,r.regex.percentTest=/(\d\s*?%|%\s*?\d)/,r.addParser({id:"percent",is:function(e){return r.regex.percentTest.test(e)&&e.length<15},format:function(e,t){return e?r.formatFloat(e.replace(r.regex.percent,""),t):e},type:"numeric"}),r.addParser({id:"image",is:function(e,t,r,o){return o.find("img").length>0},format:function(e,r,o){return t(o).find("img").attr(r.config.imgAttr||"alt")||e},parsed:!0,type:"text"}),r.regex.dateReplace=/(\S)([AP]M)$/i,r.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,r.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,r.addParser({id:"usLongDate",is:function(e){return r.regex.usLongDateTest1.test(e)||r.regex.usLongDateTest2.test(e)},format:function(e){var t=e?new Date(e.replace(r.regex.dateReplace,"$1 $2")):e;return t instanceof Date&&isFinite(t)?t.getTime():e},type:"numeric"}),r.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,r.regex.shortDateReplace=/[\-.,]/g,r.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,r.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,r.convertFormat=function(e,t){e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),"mmddyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===t&&(e=e.replace(r.regex.shortDateYMD,"$1/$2/$3"));var o=new Date(e);return o instanceof Date&&isFinite(o)?o.getTime():""},r.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),r.regex.shortDateTest.test(e)},format:function(e,t,o,s){if(e){var a=t.config,n=a.$headerIndexed[s],i=n.length&&n.data("dateFormat")||r.getData(n,r.getColumnData(t,a.headers,s),"dateFormat")||a.dateFormat;return n.length&&n.data("dateFormat",i),r.convertFormat(e,i)||e}return e},type:"numeric"}),r.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,r.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,r.addParser({id:"time",is:function(e){return r.regex.timeTest.test(e)},format:function(e){var t,o=(e||"").match(r.regex.timeMatch),s=new Date(e),a=e&&(null!==o?o[0]:"00:00 AM"),n=a?new Date("2000/01/01 "+a.replace(r.regex.dateReplace,"$1 $2")):a;return n instanceof Date&&isFinite(n)?(t=s instanceof Date&&isFinite(s)?s.getTime():0,t?parseFloat(n.getTime()+"."+s.getTime()):n.getTime()):e},type:"numeric"}),r.addParser({id:"metadata",is:function(){return!1},format:function(e,r,o){var s=r.config,a=s.parserMetadataName?s.parserMetadataName:"sortValue";return t(o).metadata()[a]},type:"numeric"}),r.addWidget({id:"zebra",priority:90,format:function(e,r,o){var s,a,n,i,l,d,c,g=new RegExp(r.cssChildRow,"i"),p=r.$tbodies.add(t(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(l=0;l<p.length;l++)for(n=0,c=(s=p.eq(l).children("tr:visible").not(r.selectorRemove)).length,d=0;d<c;d++)a=s.eq(d),g.test(a[0].className)||n++,i=n%2==0,a.removeClass(o.zebra[i?1:0]).addClass(o.zebra[i?0:1])},remove:function(e,t,o,s){if(!s){var a,n,i=t.$tbodies,l=(o.zebra||["even","odd"]).join(" ");for(a=0;a<i.length;a++)(n=r.processTbody(e,i.eq(a),!0)).children().removeClass(l),r.processTbody(e,n,!1)}}})}(e),e.tablesorter});
|
1 |
+
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(e){"use strict";var t=e.tablesorter={version:"2.30.3",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",cssIconDisabled:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(r,o){if(r&&r.tHead&&0!==r.tBodies.length&&!0!==r.hasInitialized){var s="",a=e(r),n=e.metadata;r.hasInitialized=!1,r.isProcessing=!0,r.config=o,e.data(r,"tablesorter",o),t.debug(o,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+t.version),e.data(r,"startoveralltimer",new Date)),o.supportsDataObject=function(e){return e[0]=parseInt(e[0],10),e[0]>1||1===e[0]&&parseInt(e[1],10)>=4}(e.fn.jquery.split(".")),o.emptyTo=o.emptyTo.toLowerCase(),o.stringTo=o.stringTo.toLowerCase(),o.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(a.attr("class"))||(s=""!==o.theme?" tablesorter-"+o.theme:""),o.namespace?o.namespace="."+o.namespace.replace(t.regex.nonWord,""):o.namespace=".tablesorter"+Math.random().toString(16).slice(2),o.table=r,o.$table=a.addClass(t.css.table+" "+o.tableClass+s+" "+o.namespace.slice(1)).attr("role","grid"),o.$headers=a.find(o.selectorHeaders),o.$table.children().children("tr").attr("role","row"),o.$tbodies=a.children("tbody:not(."+o.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),o.$table.children("caption").length&&((s=o.$table.children("caption")[0]).id||(s.id=o.namespace.slice(1)+"caption"),o.$table.attr("aria-labelledby",s.id)),o.widgetInit={},o.textExtraction=o.$table.attr("data-text-extraction")||o.textExtraction||"basic",t.buildHeaders(o),t.fixColumnWidth(r),t.addWidgetFromClass(r),t.applyWidgetOptions(r),t.setupParsers(o),o.totalRows=0,o.debug&&t.validateOptions(o),o.delayInit||t.buildCache(o),t.bindEvents(r,o.$headers,!0),t.bindMethods(o),o.supportsDataObject&&void 0!==a.data().sortlist?o.sortList=a.data().sortlist:n&&a.metadata()&&a.metadata().sortlist&&(o.sortList=a.metadata().sortlist),t.applyWidget(r,!0),o.sortList.length>0?t.sortOn(o,o.sortList,{},!o.initWidgets):(t.setHeadersCss(o),o.initWidgets&&t.applyWidget(r,!1)),o.showProcessing&&a.unbind("sortBegin"+o.namespace+" sortEnd"+o.namespace).bind("sortBegin"+o.namespace+" sortEnd"+o.namespace,function(e){clearTimeout(o.timerProcessing),t.isProcessing(r),"sortBegin"===e.type&&(o.timerProcessing=setTimeout(function(){t.isProcessing(r,!0)},500))}),r.hasInitialized=!0,r.isProcessing=!1,t.debug(o,"core")&&(console.log("Overall initialization time:"+t.benchmark(e.data(r,"startoveralltimer"))),t.debug(o,"core")&&console.groupEnd&&console.groupEnd()),a.triggerHandler("tablesorter-initialized",r),"function"==typeof o.initialized&&o.initialized(r)}else t.debug(o,"core")&&(r.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",r))},bindMethods:function(r){var o=r.$table,s=r.namespace,a="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(s+" ");o.unbind(a.replace(t.regex.spaces," ")).bind("sortReset"+s,function(e,r){e.stopPropagation(),t.sortReset(this.config,function(e){e.isApplyingWidgets?setTimeout(function(){t.applyWidget(e,"",r)},100):t.applyWidget(e,"",r)})}).bind("updateAll"+s,function(e,r,o){e.stopPropagation(),t.updateAll(this.config,r,o)}).bind("update"+s+" updateRows"+s,function(e,r,o){e.stopPropagation(),t.update(this.config,r,o)}).bind("updateHeaders"+s,function(e,r){e.stopPropagation(),t.updateHeaders(this.config,r)}).bind("updateCell"+s,function(e,r,o,s){e.stopPropagation(),t.updateCell(this.config,r,o,s)}).bind("addRows"+s,function(e,r,o,s){e.stopPropagation(),t.addRows(this.config,r,o,s)}).bind("updateComplete"+s,function(){this.isUpdating=!1}).bind("sorton"+s,function(e,r,o,s){e.stopPropagation(),t.sortOn(this.config,r,o,s)}).bind("appendCache"+s,function(r,o,s){r.stopPropagation(),t.appendCache(this.config,s),e.isFunction(o)&&o(this)}).bind("updateCache"+s,function(e,r,o){e.stopPropagation(),t.updateCache(this.config,r,o)}).bind("applyWidgetId"+s,function(e,r){e.stopPropagation(),t.applyWidgetId(this,r)}).bind("applyWidgets"+s,function(e,r){e.stopPropagation(),t.applyWidget(this,!1,r)}).bind("refreshWidgets"+s,function(e,r,o){e.stopPropagation(),t.refreshWidgets(this,r,o)}).bind("removeWidget"+s,function(e,r,o){e.stopPropagation(),t.removeWidget(this,r,o)}).bind("destroy"+s,function(e,r,o){e.stopPropagation(),t.destroy(this,r,o)}).bind("resetToLoadState"+s,function(o){o.stopPropagation(),t.removeWidget(this,!0,!1);var s=e.extend(!0,{},r.originalSettings);(r=e.extend(!0,{},t.defaults,s)).originalSettings=s,this.hasInitialized=!1,t.setup(this,r)})},bindEvents:function(r,o,s){var a,n=(r=e(r)[0]).config,i=n.namespace,l=null;!0!==s&&(o.addClass(i.slice(1)+"_extra_headers"),(a=t.getClosest(o,"table")).length&&"TABLE"===a[0].nodeName&&a[0]!==r&&e(a[0]).addClass(i.slice(1)+"_extra_table")),a=(n.pointerDown+" "+n.pointerUp+" "+n.pointerClick+" sort keyup ").replace(t.regex.spaces," ").split(" ").join(i+" "),o.find(n.selectorSort).add(o.filter(n.selectorSort)).unbind(a).bind(a,function(r,o){var s,a,i,d=e(r.target),c=" "+r.type+" ";if(!(1!==(r.which||r.button)&&!c.match(" "+n.pointerClick+" | sort | keyup ")||" keyup "===c&&r.which!==t.keyCodes.enter||c.match(" "+n.pointerClick+" ")&&void 0!==r.which||c.match(" "+n.pointerUp+" ")&&l!==r.target&&!0!==o)){if(c.match(" "+n.pointerDown+" "))return l=r.target,void("1"===(i=d.jquery.split("."))[0]&&i[1]<4&&r.preventDefault());if(l=null,t.regex.formElements.test(r.target.nodeName)||d.hasClass(n.cssNoSort)||d.parents("."+n.cssNoSort).length>0||d.parents("button").length>0)return!n.cancelSelection;n.delayInit&&t.isEmptyObject(n.cache)&&t.buildCache(n),s=t.getClosest(e(this),"."+t.css.header),n.last.clickedIndex=s.attr("data-column")||s.index(),(a=n.$headerIndexed[n.last.clickedIndex])&&!a.sortDisabled&&t.initSort(n,a,r)}}),n.cancelSelection&&o.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(r){var o,s,a,n;for(r.headerList=[],r.headerContent=[],r.sortVars=[],t.debug(r,"core")&&(a=new Date),r.columns=t.computeColumnIndex(r.$table.children("thead, tfoot").children("tr")),s=r.cssIcon?'<i class="'+(r.cssIcon===t.css.icon?t.css.icon:r.cssIcon+" "+t.css.icon)+'"></i>':"",r.$headers=e(e.map(r.$table.find(r.selectorHeaders),function(o,a){var n,i,l,d,c,g=e(o);if(!t.getClosest(g,"tr").hasClass(r.cssIgnoreRow))return/(th|td)/i.test(o.nodeName)||(c=t.getClosest(g,"th, td"),g.attr("data-column",c.attr("data-column"))),n=t.getColumnData(r.table,r.headers,a,!0),r.headerContent[a]=g.html(),""===r.headerTemplate||g.find("."+t.css.headerIn).length||(d=r.headerTemplate.replace(t.regex.templateContent,g.html()).replace(t.regex.templateIcon,g.find("."+t.css.icon).length?"":s),r.onRenderTemplate&&(i=r.onRenderTemplate.apply(g,[a,d]))&&"string"==typeof i&&(d=i),g.html('<div class="'+t.css.headerIn+'">'+d+"</div>")),r.onRenderHeader&&r.onRenderHeader.apply(g,[a,r,r.$table]),l=parseInt(g.attr("data-column"),10),o.column=l,c=t.getOrder(t.getData(g,n,"sortInitialOrder")||r.sortInitialOrder),r.sortVars[l]={count:-1,order:c?r.sortReset?[1,0,2]:[1,0]:r.sortReset?[0,1,2]:[0,1],lockedOrder:!1},void 0!==(c=t.getData(g,n,"lockedOrder")||!1)&&!1!==c&&(r.sortVars[l].lockedOrder=!0,r.sortVars[l].order=t.getOrder(c)?[1,1]:[0,0]),r.headerList[a]=o,g.addClass(t.css.header+" "+r.cssHeader),t.getClosest(g,"tr").addClass(t.css.headerRow+" "+r.cssHeaderRow).attr("role","row"),r.tabIndex&&g.attr("tabindex",0),o})),r.$headerIndexed=[],n=0;n<r.columns;n++)t.isEmptyObject(r.sortVars[n])&&(r.sortVars[n]={}),o=r.$headers.filter('[data-column="'+n+'"]'),r.$headerIndexed[n]=o.length?o.not(".sorter-false").length?o.not(".sorter-false").filter(":last"):o.filter(":last"):e();r.$table.find(r.selectorHeaders).attr({scope:"col",role:"columnheader"}),t.updateHeader(r),t.debug(r,"core")&&(console.log("Built headers:"+t.benchmark(a)),console.log(r.$headers))},addInstanceMethods:function(r){e.extend(t.instanceMethods,r)},setupParsers:function(e,r){var o,s,a,n,i,l,d,c,g,p,u,f,h,m,b=e.table,y=0,w=t.debug(e,"core"),x={};if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),h=void 0===r?e.$tbodies:r,0===(m=h.length))return w?console.warn("Warning: *Empty table!* Not building a parser cache"):"";for(w&&(f=new Date,console[console.group?"group":"log"]("Detecting parsers for each column")),s={extractors:[],parsers:[]};y<m;){if((o=h[y].rows).length)for(i=0,n=e.columns,l=0;l<n;l++){if((d=e.$headerIndexed[i])&&d.length&&(c=t.getColumnData(b,e.headers,i),u=t.getParserById(t.getData(d,c,"extractor")),p=t.getParserById(t.getData(d,c,"sorter")),g="false"===t.getData(d,c,"parser"),e.empties[i]=(t.getData(d,c,"empty")||e.emptyTo||(e.emptyToBottom?"bottom":"top")).toLowerCase(),e.strings[i]=(t.getData(d,c,"string")||e.stringTo||"max").toLowerCase(),g&&(p=t.getParserById("no-parser")),u||(u=!1),p||(p=t.detectParserForColumn(e,o,-1,i)),w&&(x["("+i+") "+d.text()]={parser:p.id,extractor:u?u.id:"none",string:e.strings[i],empty:e.empties[i]}),s.parsers[i]=p,s.extractors[i]=u,(a=d[0].colSpan-1)>0))for(i+=a,n+=a;a+1>0;)s.parsers[i-a]=p,s.extractors[i-a]=u,a--;i++}y+=s.parsers.length?m:1}w&&(t.isEmptyObject(x)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](x),console.log("Completed detecting parsers"+t.benchmark(f)),console.groupEnd&&console.groupEnd()),e.parsers=s.parsers,e.extractors=s.extractors},addParser:function(e){var r,o=t.parsers.length,s=!0;for(r=0;r<o;r++)t.parsers[r].id.toLowerCase()===e.id.toLowerCase()&&(s=!1);s&&(t.parsers[t.parsers.length]=e)},getParserById:function(e){if("false"==e)return!1;var r,o=t.parsers.length;for(r=0;r<o;r++)if(t.parsers[r].id.toLowerCase()===e.toString().toLowerCase())return t.parsers[r];return!1},detectParserForColumn:function(r,o,s,a){for(var n,i,l,d=t.parsers.length,c=!1,g="",p=t.debug(r,"core"),u=!0;""===g&&u;)(l=o[++s])&&s<50?l.className.indexOf(t.cssIgnoreRow)<0&&(c=o[s].cells[a],g=t.getElementText(r,c,a),i=e(c),p&&console.log("Checking if value was empty on row "+s+", column: "+a+': "'+g+'"')):u=!1;for(;--d>=0;)if((n=t.parsers[d])&&"text"!==n.id&&n.is&&n.is(g,r.table,c,i))return n;return t.getParserById("text")},getElementText:function(r,o,s){if(!o)return"";var a,n=r.textExtraction||"",i=o.jquery?o:e(o);return"string"==typeof n?"basic"===n&&void 0!==(a=i.attr(r.textAttribute))?e.trim(a):e.trim(o.textContent||i.text()):"function"==typeof n?e.trim(n(i[0],r.table,s)):"function"==typeof(a=t.getColumnData(r.table,n,s))?e.trim(a(i[0],r.table,s)):e.trim(i[0].textContent||i.text())},getParsedText:function(e,r,o,s){void 0===s&&(s=t.getElementText(e,r,o));var a=""+s,n=e.parsers[o],i=e.extractors[o];return n&&(i&&"function"==typeof i.format&&(s=i.format(s,e.table,r,o)),a="no-parser"===n.id?"":n.format(""+s,e.table,r,o),e.ignoreCase&&"string"==typeof a&&(a=a.toLowerCase())),a},buildCache:function(r,o,s){var a,n,i,l,d,c,g,p,u,f,h,m,b,y,w,x,v,C,$,I,D,R,T=r.table,L=r.parsers,A=t.debug(r,"core");if(r.$tbodies=r.$table.children("tbody:not(."+r.cssInfoBlock+")"),g=void 0===s?r.$tbodies:s,r.cache={},r.totalRows=0,!L)return A?console.warn("Warning: *Empty table!* Not building a cache"):"";for(A&&(m=new Date),r.showProcessing&&t.isProcessing(T,!0),c=0;c<g.length;c++){for(x=[],a=r.cache[c]={normalized:[]},b=g[c]&&g[c].rows.length||0,l=0;l<b;++l)if(y={child:[],raw:[]},p=e(g[c].rows[l]),u=[],!p.hasClass(r.selectorRemove.slice(1)))if(p.hasClass(r.cssChildRow)&&0!==l)for(D=a.normalized.length-1,(w=a.normalized[D][r.columns]).$row=w.$row.add(p),p.prev().hasClass(r.cssChildRow)||p.prev().addClass(t.css.cssHasChild),f=p.children("th, td"),D=w.child.length,w.child[D]=[],C=0,I=r.columns,d=0;d<I;d++)(h=f[d])&&(w.child[D][d]=t.getParsedText(r,h,d),(v=f[d].colSpan-1)>0&&(C+=v,I+=v)),C++;else{for(y.$row=p,y.order=l,C=0,I=r.columns,d=0;d<I;++d){if((h=p[0].cells[d])&&C<r.columns&&(!($=void 0!==L[C])&&A&&console.warn("No parser found for row: "+l+", column: "+d+'; cell containing: "'+e(h).text()+'"; does it have a header?'),n=t.getElementText(r,h,C),y.raw[C]=n,i=t.getParsedText(r,h,C,n),u[C]=i,$&&"numeric"===(L[C].type||"").toLowerCase()&&(x[C]=Math.max(Math.abs(i)||0,x[C]||0)),(v=h.colSpan-1)>0)){for(R=0;R<=v;)i=r.duplicateSpan||0===R?n:"string"!=typeof r.textExtraction?t.getElementText(r,h,C+R)||"":"",y.raw[C+R]=i,u[C+R]=i,R++;C+=v,I+=v}C++}u[r.columns]=y,a.normalized[a.normalized.length]=u}a.colMax=x,r.totalRows+=a.normalized.length}if(r.showProcessing&&t.isProcessing(T),A){for(D=Math.min(5,r.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+r.totalRows+" rows (showing "+D+" rows in log) and "+r.columns+" columns"+t.benchmark(m)),n={},d=0;d<r.columns;d++)for(C=0;C<D;C++)n["row: "+C]||(n["row: "+C]={}),n["row: "+C][r.$headerIndexed[d].text()]=r.cache[0].normalized[C][d];console[console.table?"table":"log"](n),console.groupEnd&&console.groupEnd()}e.isFunction(o)&&o(T)},getColumnText:function(r,o,s,a){var n,i,l,d,c,g,p,u,f,h,m="function"==typeof s,b="all"===o,y={raw:[],parsed:[],$cell:[]},w=(r=e(r)[0]).config;if(!t.isEmptyObject(w)){for(c=w.$tbodies.length,n=0;n<c;n++)for(g=(l=w.cache[n].normalized).length,i=0;i<g;i++)d=l[i],a&&!d[w.columns].$row.is(a)||(h=!0,u=b?d.slice(0,w.columns):d[o],d=d[w.columns],p=b?d.raw:d.raw[o],f=b?d.$row.children():d.$row.children().eq(o),m&&(h=s({tbodyIndex:n,rowIndex:i,parsed:u,raw:p,$row:d.$row,$cell:f})),!1!==h&&(y.parsed[y.parsed.length]=u,y.raw[y.raw.length]=p,y.$cell[y.$cell.length]=f));return y}t.debug(w,"core")&&console.warn("No cache found - aborting getColumnText function!")},setHeadersCss:function(r){var o,s,a=r.sortList,n=a.length,i=t.css.sortNone+" "+r.cssNone,l=[t.css.sortAsc+" "+r.cssAsc,t.css.sortDesc+" "+r.cssDesc],d=[r.cssIconAsc,r.cssIconDesc,r.cssIconNone],c=["ascending","descending"],g=function(e,r){e.removeClass(i).addClass(l[r]).attr("aria-sort",c[r]).find("."+t.css.icon).removeClass(d[2]).addClass(d[r])},p=r.$table.find("tfoot tr").children("td, th").add(e(r.namespace+"_extra_headers")).removeClass(l.join(" ")),u=r.$headers.add(e("thead "+r.namespace+"_extra_headers")).removeClass(l.join(" ")).addClass(i).attr("aria-sort","none").find("."+t.css.icon).removeClass(d.join(" ")).end();for(u.not(".sorter-false").find("."+t.css.icon).addClass(d[2]),r.cssIconDisabled&&u.filter(".sorter-false").find("."+t.css.icon).addClass(r.cssIconDisabled),o=0;o<n;o++)if(2!==a[o][1]){if(u=r.$headers.filter(function(e){for(var o=!0,s=r.$headers.eq(e),a=parseInt(s.attr("data-column"),10),n=a+t.getClosest(s,"th, td")[0].colSpan;a<n;a++)o=!!o&&(o||t.isValueInArray(a,r.sortList)>-1);return o}),(u=u.not(".sorter-false").filter('[data-column="'+a[o][0]+'"]'+(1===n?":last":""))).length)for(s=0;s<u.length;s++)u[s].sortDisabled||g(u.eq(s),a[o][1]);p.length&&g(p.filter('[data-column="'+a[o][0]+'"]'),a[o][1])}for(n=r.$headers.length,o=0;o<n;o++)t.setColumnAriaLabel(r,r.$headers.eq(o))},getClosest:function(t,r){return e.fn.closest?t.closest(r):t.is(r)?t:t.parents(r).filter(":first")},setColumnAriaLabel:function(r,o,s){if(o.length){var a=parseInt(o.attr("data-column"),10),n=r.sortVars[a],i=o.hasClass(t.css.sortAsc)?"sortAsc":o.hasClass(t.css.sortDesc)?"sortDesc":"sortNone",l=e.trim(o.text())+": "+t.language[i];o.hasClass("sorter-false")||!1===s?l+=t.language.sortDisabled:(i=(n.count+1)%n.order.length,s=n.order[i],l+=t.language[0===s?"nextAsc":1===s?"nextDesc":"nextNone"]),o.attr("aria-label",l)}},updateHeader:function(e){var r,o,s,a,n=e.table,i=e.$headers.length;for(r=0;r<i;r++)s=e.$headers.eq(r),a=t.getColumnData(n,e.headers,r,!0),o="false"===t.getData(s,a,"sorter")||"false"===t.getData(s,a,"parser"),t.setColumnSort(e,s,o)},setColumnSort:function(e,t,r){var o=e.table.id;t[0].sortDisabled=r,t[r?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+r),e.tabIndex&&(r?t.removeAttr("tabindex"):t.attr("tabindex","0")),o&&(r?t.removeAttr("aria-controls"):t.attr("aria-controls",o))},updateHeaderSortCount:function(r,o){var s,a,n,i,l,d,c,g,p=o||r.sortList,u=p.length;for(r.sortList=[],i=0;i<u;i++)if(c=p[i],(s=parseInt(c[0],10))<r.columns){switch(r.sortVars[s].order||(g=t.getOrder(r.sortInitialOrder)?r.sortReset?[1,0,2]:[1,0]:r.sortReset?[0,1,2]:[0,1],r.sortVars[s].order=g,r.sortVars[s].count=0),g=r.sortVars[s].order,a=(""+c[1]).match(/^(1|d|s|o|n)/),a=a?a[0]:""){case"1":case"d":a=1;break;case"s":a=l||0;break;case"o":a=0===(d=g[(l||0)%g.length])?1:1===d?0:2;break;case"n":a=g[++r.sortVars[s].count%g.length];break;default:a=0}l=0===i?a:l,n=[s,parseInt(a,10)||0],r.sortList[r.sortList.length]=n,a=e.inArray(n[1],g),r.sortVars[s].count=a>=0?a:n[1]%g.length}},updateAll:function(e,r,o){var s=e.table;s.isUpdating=!0,t.refreshWidgets(s,!0,!0),t.buildHeaders(e),t.bindEvents(s,e.$headers,!0),t.bindMethods(e),t.commonUpdate(e,r,o)},update:function(e,r,o){e.table.isUpdating=!0,t.updateHeader(e),t.commonUpdate(e,r,o)},updateHeaders:function(e,r){e.table.isUpdating=!0,t.buildHeaders(e),t.bindEvents(e.table,e.$headers,!0),t.resortComplete(e,r)},updateCell:function(r,o,s,a){if(e(o).closest("tr").hasClass(r.cssChildRow))console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');else{if(t.isEmptyObject(r.cache))return t.updateHeader(r),void t.commonUpdate(r,s,a);r.table.isUpdating=!0,r.$table.find(r.selectorRemove).remove();var n,i,l,d,c,g,p=r.$tbodies,u=e(o),f=p.index(t.getClosest(u,"tbody")),h=r.cache[f],m=t.getClosest(u,"tr");if(o=u[0],p.length&&f>=0){if(l=p.eq(f).find("tr").not("."+r.cssChildRow).index(m),c=h.normalized[l],(g=m[0].cells.length)!==r.columns)for(d=0,n=!1,i=0;i<g;i++)n||m[0].cells[i]===o?n=!0:d+=m[0].cells[i].colSpan;else d=u.index();n=t.getElementText(r,o,d),c[r.columns].raw[d]=n,n=t.getParsedText(r,o,d,n),c[d]=n,"numeric"===(r.parsers[d].type||"").toLowerCase()&&(h.colMax[d]=Math.max(Math.abs(n)||0,h.colMax[d]||0)),!1!==(n="undefined"!==s?s:r.resort)?t.checkResort(r,n,a):t.resortComplete(r,a)}else t.debug(r,"core")&&console.error("updateCell aborted, tbody missing or not within the indicated table"),r.table.isUpdating=!1}},addRows:function(r,o,s,a){var n,i,l,d,c,g,p,u,f,h,m,b,y,w="string"==typeof o&&1===r.$tbodies.length&&/<tr/.test(o||""),x=r.table;if(w)o=e(o),r.$tbodies.append(o);else if(!(o&&o instanceof e&&t.getClosest(o,"table")[0]===r.table))return t.debug(r,"core")&&console.error("addRows method requires (1) a jQuery selector reference to rows that have already been added to the table, or (2) row HTML string to be added to a table with only one tbody"),!1;if(x.isUpdating=!0,t.isEmptyObject(r.cache))t.updateHeader(r),t.commonUpdate(r,s,a);else{for(c=o.filter("tr").attr("role","row").length,l=r.$tbodies.index(o.parents("tbody").filter(":first")),r.parsers&&r.parsers.length||t.setupParsers(r),d=0;d<c;d++){for(f=0,p=o[d].cells.length,u=r.cache[l].normalized.length,m=[],h={child:[],raw:[],$row:o.eq(d),order:u},g=0;g<p;g++)b=o[d].cells[g],n=t.getElementText(r,b,f),h.raw[f]=n,i=t.getParsedText(r,b,f,n),m[f]=i,"numeric"===(r.parsers[f].type||"").toLowerCase()&&(r.cache[l].colMax[f]=Math.max(Math.abs(i)||0,r.cache[l].colMax[f]||0)),(y=b.colSpan-1)>0&&(f+=y),f++;m[r.columns]=h,r.cache[l].normalized[u]=m}t.checkResort(r,s,a)}},updateCache:function(e,r,o){e.parsers&&e.parsers.length||t.setupParsers(e,o),t.buildCache(e,r,o)},appendCache:function(e,r){var o,s,a,n,i,l,d,c=e.table,g=e.$tbodies,p=[],u=e.cache;if(t.isEmptyObject(u))return e.appender?e.appender(c,p):c.isUpdating?e.$table.triggerHandler("updateComplete",c):"";for(t.debug(e,"core")&&(d=new Date),l=0;l<g.length;l++)if((a=g.eq(l)).length){for(n=t.processTbody(c,a,!0),s=(o=u[l].normalized).length,i=0;i<s;i++)p[p.length]=o[i][e.columns].$row,e.appender&&(!e.pager||e.pager.removeRows||e.pager.ajax)||n.append(o[i][e.columns].$row);t.processTbody(c,n,!1)}e.appender&&e.appender(c,p),t.debug(e,"core")&&console.log("Rebuilt table"+t.benchmark(d)),r||e.appender||t.applyWidget(c),c.isUpdating&&e.$table.triggerHandler("updateComplete",c)},commonUpdate:function(e,r,o){e.$table.find(e.selectorRemove).remove(),t.setupParsers(e),t.buildCache(e),t.checkResort(e,r,o)},initSort:function(r,o,s){if(r.table.isUpdating)return setTimeout(function(){t.initSort(r,o,s)},50);var a,n,i,l,d,c,g,p=!s[r.sortMultiSortKey],u=r.table,f=r.$headers.length,h=t.getClosest(e(o),"th, td"),m=parseInt(h.attr("data-column"),10),b=r.sortVars[m].order;if(h=h[0],r.$table.triggerHandler("sortStart",u),c=(r.sortVars[m].count+1)%b.length,r.sortVars[m].count=s[r.sortResetKey]?2:c,r.sortRestart)for(i=0;i<f;i++)g=r.$headers.eq(i),m!==(c=parseInt(g.attr("data-column"),10))&&(p||g.hasClass(t.css.sortNone))&&(r.sortVars[c].count=-1);if(p){if(r.sortList=[],r.last.sortList=[],null!==r.sortForce)for(a=r.sortForce,n=0;n<a.length;n++)a[n][0]!==m&&(r.sortList[r.sortList.length]=a[n]);if((l=b[r.sortVars[m].count])<2&&(r.sortList[r.sortList.length]=[m,l],h.colSpan>1))for(n=1;n<h.colSpan;n++)r.sortList[r.sortList.length]=[m+n,l],r.sortVars[m+n].count=e.inArray(l,b)}else if(r.sortList=e.extend([],r.last.sortList),t.isValueInArray(m,r.sortList)>=0)for(n=0;n<r.sortList.length;n++)(c=r.sortList[n])[0]===m&&(c[1]=b[r.sortVars[m].count],2===c[1]&&(r.sortList.splice(n,1),r.sortVars[m].count=-1));else if((l=b[r.sortVars[m].count])<2&&(r.sortList[r.sortList.length]=[m,l],h.colSpan>1))for(n=1;n<h.colSpan;n++)r.sortList[r.sortList.length]=[m+n,l],r.sortVars[m+n].count=e.inArray(l,b);if(r.last.sortList=e.extend([],r.sortList),r.sortList.length&&r.sortAppend&&(a=e.isArray(r.sortAppend)?r.sortAppend:r.sortAppend[r.sortList[0][0]],!t.isEmptyObject(a)))for(n=0;n<a.length;n++)if(a[n][0]!==m&&t.isValueInArray(a[n][0],r.sortList)<0){if(l=a[n][1],d=(""+l).match(/^(a|d|s|o|n)/))switch(c=r.sortList[0][1],d[0]){case"d":l=1;break;case"s":l=c;break;case"o":l=0===c?1:0;break;case"n":l=(c+1)%b.length;break;default:l=0}r.sortList[r.sortList.length]=[a[n][0],l]}r.$table.triggerHandler("sortBegin",u),setTimeout(function(){t.setHeadersCss(r),t.multisort(r),t.appendCache(r),r.$table.triggerHandler("sortBeforeEnd",u),r.$table.triggerHandler("sortEnd",u)},1)},multisort:function(e){var r,o,s,a,n=e.table,i=[],l=0,d=e.textSorter||"",c=e.sortList,g=c.length,p=e.$tbodies.length;if(!e.serverSideSorting&&!t.isEmptyObject(e.cache)){if(t.debug(e,"core")&&(o=new Date),"object"==typeof d)for(s=e.columns;s--;)"function"==typeof(a=t.getColumnData(n,d,s))&&(i[s]=a);for(r=0;r<p;r++)s=e.cache[r].colMax,e.cache[r].normalized.sort(function(r,o){var a,p,u,f,h,m,b;for(a=0;a<g;a++){if(u=c[a][0],f=c[a][1],l=0===f,e.sortStable&&r[u]===o[u]&&1===g)return r[e.columns].order-o[e.columns].order;if(p=/n/i.test(t.getSortType(e.parsers,u)),p&&e.strings[u]?(p="boolean"==typeof t.string[e.strings[u]]?(l?1:-1)*(t.string[e.strings[u]]?-1:1):e.strings[u]?t.string[e.strings[u]]||0:0,h=e.numberSorter?e.numberSorter(r[u],o[u],l,s[u],n):t["sortNumeric"+(l?"Asc":"Desc")](r[u],o[u],p,s[u],u,e)):(m=l?r:o,b=l?o:r,h="function"==typeof d?d(m[u],b[u],l,u,n):"function"==typeof i[u]?i[u](m[u],b[u],l,u,n):t["sortNatural"+(l?"Asc":"Desc")](r[u],o[u],u,e)),h)return h}return r[e.columns].order-o[e.columns].order});t.debug(e,"core")&&console.log("Applying sort "+c.toString()+t.benchmark(o))}},resortComplete:function(t,r){t.table.isUpdating&&t.$table.triggerHandler("updateComplete",t.table),e.isFunction(r)&&r(t.table)},checkResort:function(r,o,s){var a=e.isArray(o)?o:r.sortList;!1===(void 0===o?r.resort:o)||r.serverSideSorting||r.table.isProcessing?(t.resortComplete(r,s),t.applyWidget(r.table,!1)):a.length?t.sortOn(r,a,function(){t.resortComplete(r,s)},!0):t.sortReset(r,function(){t.resortComplete(r,s),t.applyWidget(r.table,!1)})},sortOn:function(r,o,s,a){var n=r.table;r.$table.triggerHandler("sortStart",n),t.updateHeaderSortCount(r,o),t.setHeadersCss(r),r.delayInit&&t.isEmptyObject(r.cache)&&t.buildCache(r),r.$table.triggerHandler("sortBegin",n),t.multisort(r),t.appendCache(r,a),r.$table.triggerHandler("sortBeforeEnd",n),r.$table.triggerHandler("sortEnd",n),t.applyWidget(n),e.isFunction(s)&&s(n)},sortReset:function(r,o){r.sortList=[],t.setHeadersCss(r),t.multisort(r),t.appendCache(r);var s;for(s=0;s<r.columns;s++)r.sortVars[s].count=-1;e.isFunction(o)&&o(r.table)},getSortType:function(e,t){return e&&e[t]?e[t].type||"":""},getOrder:function(e){return/^d/i.test(e)||1===e},sortNatural:function(e,r){if(e===r)return 0;e=e.toString(),r=r.toString();var o,s,a,n,i,l,d=t.regex;if(d.hex.test(r)){if(o=parseInt((e||"").match(d.hex),16),s=parseInt((r||"").match(d.hex),16),o<s)return-1;if(o>s)return 1}for(o=(e||"").replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0"),s=(r||"").replace(d.chunk,"\\0$1\\0").replace(d.chunks,"").split("\\0"),l=Math.max(o.length,s.length),i=0;i<l;i++){if(a=isNaN(o[i])?o[i]||0:parseFloat(o[i])||0,n=isNaN(s[i])?s[i]||0:parseFloat(s[i])||0,isNaN(a)!==isNaN(n))return isNaN(a)?1:-1;if(typeof a!=typeof n&&(a+="",n+=""),a<n)return-1;if(a>n)return 1}return 0},sortNaturalAsc:function(e,r,o,s){if(e===r)return 0;var a=t.string[s.empties[o]||s.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:-a||-1:""===r&&0!==a?"boolean"==typeof a?a?1:-1:a||1:t.sortNatural(e,r)},sortNaturalDesc:function(e,r,o,s){if(e===r)return 0;var a=t.string[s.empties[o]||s.emptyTo];return""===e&&0!==a?"boolean"==typeof a?a?-1:1:a||1:""===r&&0!==a?"boolean"==typeof a?a?1:-1:-a||-1:t.sortNatural(r,e)},sortText:function(e,t){return e>t?1:e<t?-1:0},getTextValue:function(e,t,r){if(r){var o,s=e?e.length:0,a=r+t;for(o=0;o<s;o++)a+=e.charCodeAt(o);return t*a}return 0},sortNumericAsc:function(e,r,o,s,a,n){if(e===r)return 0;var i=t.string[n.empties[a]||n.emptyTo];return""===e&&0!==i?"boolean"==typeof i?i?-1:1:-i||-1:""===r&&0!==i?"boolean"==typeof i?i?1:-1:i||1:(isNaN(e)&&(e=t.getTextValue(e,o,s)),isNaN(r)&&(r=t.getTextValue(r,o,s)),e-r)},sortNumericDesc:function(e,r,o,s,a,n){if(e===r)return 0;var i=t.string[n.empties[a]||n.emptyTo];return""===e&&0!==i?"boolean"==typeof i?i?-1:1:i||1:""===r&&0!==i?"boolean"==typeof i?i?1:-1:-i||-1:(isNaN(e)&&(e=t.getTextValue(e,o,s)),isNaN(r)&&(r=t.getTextValue(r,o,s)),r-e)},sortNumeric:function(e,t){return e-t},addWidget:function(e){e.id&&!t.isEmptyObject(t.getWidgetById(e.id))&&console.warn('"'+e.id+'" widget was loaded more than once!'),t.widgets[t.widgets.length]=e},hasWidget:function(t,r){return(t=e(t)).length&&t[0].config&&t[0].config.widgetInit[r]||!1},getWidgetById:function(e){var r,o,s=t.widgets.length;for(r=0;r<s;r++)if((o=t.widgets[r])&&o.id&&o.id.toLowerCase()===e.toLowerCase())return o},applyWidgetOptions:function(r){var o,s,a,n=r.config,i=n.widgets.length;if(i)for(o=0;o<i;o++)(s=t.getWidgetById(n.widgets[o]))&&s.options&&(a=e.extend(!0,{},s.options),n.widgetOptions=e.extend(!0,a,n.widgetOptions),e.extend(!0,t.defaults.widgetOptions,s.options))},addWidgetFromClass:function(e){var r,o,s=e.config,a="^"+s.widgetClass.replace(t.regex.templateName,"(\\S+)+")+"$",n=new RegExp(a,"g"),i=(e.className||"").split(t.regex.spaces);if(i.length)for(r=i.length,o=0;o<r;o++)i[o].match(n)&&(s.widgets[s.widgets.length]=i[o].replace(n,"$1"))},applyWidgetId:function(r,o,s){var a,n,i,l=(r=e(r)[0]).config,d=l.widgetOptions,c=t.debug(l,"core"),g=t.getWidgetById(o);g&&(i=g.id,a=!1,e.inArray(i,l.widgets)<0&&(l.widgets[l.widgets.length]=i),c&&(n=new Date),!s&&l.widgetInit[i]||(l.widgetInit[i]=!0,r.hasInitialized&&t.applyWidgetOptions(r),"function"==typeof g.init&&(a=!0,c&&console[console.group?"group":"log"]("Initializing "+i+" widget"),g.init(r,g,l,d))),s||"function"!=typeof g.format||(a=!0,c&&console[console.group?"group":"log"]("Updating "+i+" widget"),g.format(r,l,d,!1)),c&&a&&(console.log("Completed "+(s?"initializing ":"applying ")+i+" widget"+t.benchmark(n)),console.groupEnd&&console.groupEnd()))},applyWidget:function(r,o,s){var a,n,i,l,d,c=(r=e(r)[0]).config,g=t.debug(c,"core"),p=[];if(!1===o||!r.hasInitialized||!r.isApplyingWidgets&&!r.isUpdating){if(g&&(d=new Date),t.addWidgetFromClass(r),clearTimeout(c.timerReady),c.widgets.length){for(r.isApplyingWidgets=!0,c.widgets=e.grep(c.widgets,function(t,r){return e.inArray(t,c.widgets)===r}),n=(i=c.widgets||[]).length,a=0;a<n;a++)(l=t.getWidgetById(i[a]))&&l.id?(l.priority||(l.priority=10),p[a]=l):g&&console.warn('"'+i[a]+'" was enabled, but the widget code has not been loaded!');for(p.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),n=p.length,g&&console[console.group?"group":"log"]("Start "+(o?"initializing":"applying")+" widgets"),a=0;a<n;a++)(l=p[a])&&l.id&&t.applyWidgetId(r,l.id,o);g&&console.groupEnd&&console.groupEnd()}c.timerReady=setTimeout(function(){r.isApplyingWidgets=!1,e.data(r,"lastWidgetApplication",new Date),c.$table.triggerHandler("tablesorter-ready"),o||"function"!=typeof s||s(r),g&&(l=c.widgets.length,console.log("Completed "+(!0===o?"initializing ":"applying ")+l+" widget"+(1!==l?"s":"")+t.benchmark(d)))},10)}},removeWidget:function(r,o,s){var a,n,i,l,d=(r=e(r)[0]).config;if(!0===o)for(o=[],l=t.widgets.length,i=0;i<l;i++)(n=t.widgets[i])&&n.id&&(o[o.length]=n.id);else o=(e.isArray(o)?o.join(","):o||"").toLowerCase().split(/[\s,]+/);for(l=o.length,a=0;a<l;a++)n=t.getWidgetById(o[a]),(i=e.inArray(o[a],d.widgets))>=0&&!0!==s&&d.widgets.splice(i,1),n&&n.remove&&(t.debug(d,"core")&&console.log((s?"Refreshing":"Removing")+' "'+o[a]+'" widget'),n.remove(r,d,d.widgetOptions,s),d.widgetInit[o[a]]=!1);d.$table.triggerHandler("widgetRemoveEnd",r)},refreshWidgets:function(r,o,s){var a,n,i=(r=e(r)[0]).config.widgets,l=t.widgets,d=l.length,c=[],g=function(t){e(t).triggerHandler("refreshComplete")};for(a=0;a<d;a++)(n=l[a])&&n.id&&(o||e.inArray(n.id,i)<0)&&(c[c.length]=n.id);t.removeWidget(r,c.join(","),!0),!0!==s?(t.applyWidget(r,o||!1,g),o&&t.applyWidget(r,!1,g)):g(r)},benchmark:function(e){return" ("+((new Date).getTime()-e.getTime())+" ms)"},log:function(){console.log(arguments)},debug:function(e,t){return e&&(!0===e.debug||"string"==typeof e.debug&&e.debug.indexOf(t)>-1)},isEmptyObject:function(e){for(var t in e)return!1;return!0},isValueInArray:function(e,t){var r,o=t&&t.length||0;for(r=0;r<o;r++)if(t[r][0]===e)return r;return-1},formatFloat:function(r,o){if("string"!=typeof r||""===r)return r;var s;return r=(o&&o.config?!1!==o.config.usNumberFormat:void 0===o||o)?r.replace(t.regex.comma,""):r.replace(t.regex.digitNonUS,"").replace(t.regex.comma,"."),t.regex.digitNegativeTest.test(r)&&(r=r.replace(t.regex.digitNegativeReplace,"-$1")),s=parseFloat(r),isNaN(s)?e.trim(r):s},isDigit:function(e){return isNaN(e)?t.regex.digitTest.test(e.toString().replace(t.regex.digitReplace,"")):""!==e},computeColumnIndex:function(r,o){var s,a,n,i,l,d,c,g,p,u,f=o&&o.columns||0,h=[],m=new Array(f);for(s=0;s<r.length;s++)for(d=r[s].cells,a=0;a<d.length;a++){for(c=s,g=(l=d[a]).rowSpan||1,p=l.colSpan||1,void 0===h[c]&&(h[c]=[]),n=0;n<h[c].length+1;n++)if(void 0===h[c][n]){u=n;break}for(f&&l.cellIndex===u||(l.setAttribute?l.setAttribute("data-column",u):e(l).attr("data-column",u)),n=c;n<c+g;n++)for(void 0===h[n]&&(h[n]=[]),m=h[n],i=u;i<u+p;i++)m[i]="x"}return t.checkColumnCount(r,h,m.length),m.length},checkColumnCount:function(e,t,r){var o,s,a=!0,n=[];for(o=0;o<t.length;o++)if(t[o]&&(s=t[o].length,t[o].length!==r)){a=!1;break}a||(e.each(function(e,t){var r=t.parentElement.nodeName;n.indexOf(r)<0&&n.push(r)}),console.error("Invalid or incorrect number of columns in the "+n.join(" or ")+"; expected "+r+", but found "+s+" columns"))},fixColumnWidth:function(r){var o,s,a,n,i,l=(r=e(r)[0]).config,d=l.$table.children("colgroup");if(d.length&&d.hasClass(t.css.colgroup)&&d.remove(),l.widthFixed&&0===l.$table.children("colgroup").length){for(d=e('<colgroup class="'+t.css.colgroup+'">'),o=l.$table.width(),n=(a=l.$tbodies.find("tr:first").children(":visible")).length,i=0;i<n;i++)s=parseInt(a.eq(i).width()/o*1e3,10)/10+"%",d.append(e("<col>").css("width",s));l.$table.prepend(d)}},getData:function(t,r,o){var s,a,n="",i=e(t);return i.length?(s=!!e.metadata&&i.metadata(),a=" "+(i.attr("class")||""),void 0!==i.data(o)||void 0!==i.data(o.toLowerCase())?n+=i.data(o)||i.data(o.toLowerCase()):s&&void 0!==s[o]?n+=s[o]:r&&void 0!==r[o]?n+=r[o]:" "!==a&&a.match(" "+o+"-")&&(n=a.match(new RegExp("\\s"+o+"-([\\w-]+)"))[1]||""),e.trim(n)):""},getColumnData:function(t,r,o,s,a){if("object"!=typeof r||null===r)return r;var n,i=(t=e(t)[0]).config,l=a||i.$headers,d=i.$headerIndexed&&i.$headerIndexed[o]||l.find('[data-column="'+o+'"]:last');if(void 0!==r[o])return s?r[o]:r[l.index(d)];for(n in r)if("string"==typeof n&&d.filter(n).add(d.find(n)).length)return r[n]},isProcessing:function(r,o,s){var a=(r=e(r))[0].config,n=s||r.find("."+t.css.header);o?(void 0!==s&&a.sortList.length>0&&(n=n.filter(function(){return!this.sortDisabled&&t.isValueInArray(parseFloat(e(this).attr("data-column")),a.sortList)>=0})),r.add(n).addClass(t.css.processing+" "+a.cssProcessing)):r.add(n).removeClass(t.css.processing+" "+a.cssProcessing)},processTbody:function(t,r,o){if(t=e(t)[0],o)return t.isProcessing=!0,r.before('<colgroup class="tablesorter-savemyplace"/>'),e.fn.detach?r.detach():r.remove();var s=e(t).find("colgroup.tablesorter-savemyplace");r.insertAfter(s),s.remove(),t.isProcessing=!1},clearTableBody:function(t){e(t)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var r,o="[",s=t.characterEquivalents;if(!t.characterRegex){t.characterRegexArray={};for(r in s)"string"==typeof r&&(o+=s[r],t.characterRegexArray[r]=new RegExp("["+s[r]+"]","g"));t.characterRegex=new RegExp(o+"]")}if(t.characterRegex.test(e))for(r in s)"string"==typeof r&&(e=e.replace(t.characterRegexArray[r],r));return e},validateOptions:function(r){var o,s,a,n,i="headers sortForce sortList sortAppend widgets".split(" "),l=r.originalSettings;if(l){t.debug(r,"core")&&(n=new Date);for(o in l)if("undefined"===(a=typeof t.defaults[o]))console.warn('Tablesorter Warning! "table.config.'+o+'" option not recognized');else if("object"===a)for(s in l[o])a=t.defaults[o]&&typeof t.defaults[o][s],e.inArray(o,i)<0&&"undefined"===a&&console.warn('Tablesorter Warning! "table.config.'+o+"."+s+'" option not recognized');t.debug(r,"core")&&console.log("validate options time:"+t.benchmark(n))}},restoreHeaders:function(r){var o,s,a=e(r)[0].config,n=a.$table.find(a.selectorHeaders),i=n.length;for(o=0;o<i;o++)(s=n.eq(o)).find("."+t.css.headerIn).length&&s.html(a.headerContent[o])},destroy:function(r,o,s){if((r=e(r)[0]).hasInitialized){t.removeWidget(r,!0,!1);var a,n=e(r),i=r.config,l=n.find("thead:first"),d=l.find("tr."+t.css.headerRow).removeClass(t.css.headerRow+" "+i.cssHeaderRow),c=n.find("tfoot:first > tr").children("th, td");!1===o&&e.inArray("uitheme",i.widgets)>=0&&(n.triggerHandler("applyWidgetId",["uitheme"]),n.triggerHandler("applyWidgetId",["zebra"])),l.find("tr").not(d).remove(),a="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(i.namespace+" "),n.removeData("tablesorter").unbind(a.replace(t.regex.spaces," ")),i.$headers.add(c).removeClass([t.css.header,i.cssHeader,i.cssAsc,i.cssDesc,t.css.sortAsc,t.css.sortDesc,t.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),d.find(i.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(i.namespace+" ").replace(t.regex.spaces," ")),t.restoreHeaders(r),n.toggleClass(t.css.table+" "+i.tableClass+" tablesorter-"+i.theme,!1===o),n.removeClass(i.namespace.slice(1)),r.hasInitialized=!1,delete r.config.cache,"function"==typeof s&&s(r),t.debug(i,"core")&&console.log("tablesorter has been removed")}}};e.fn.tablesorter=function(r){return this.each(function(){var o=this,s=e.extend(!0,{},t.defaults,r,t.instanceMethods);s.originalSettings=r,!o.hasInitialized&&t.buildTable&&"TABLE"!==this.nodeName?t.buildTable(o,s):t.setup(o,s)})},window.console&&window.console.log||(t.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];t.logs[t.logs.length]={date:Date.now(),log:e}}),t.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),t.addParser({id:"text",is:function(){return!0},format:function(r,o){var s=o.config;return r&&(r=e.trim(s.ignoreCase?r.toLocaleLowerCase():r),r=s.sortLocaleCompare?t.replaceAccents(r):r),r},type:"text"}),t.regex.nondigit=/[^\w,. \-()]/g,t.addParser({id:"digit",is:function(e){return t.isDigit(e)},format:function(r,o){var s=t.formatFloat((r||"").replace(t.regex.nondigit,""),o);return r&&"number"==typeof s?s:r?e.trim(r&&o.config.ignoreCase?r.toLocaleLowerCase():r):r},type:"numeric"}),t.regex.currencyReplace=/[+\-,. ]/g,t.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,t.addParser({id:"currency",is:function(e){return e=(e||"").replace(t.regex.currencyReplace,""),t.regex.currencyTest.test(e)},format:function(r,o){var s=t.formatFloat((r||"").replace(t.regex.nondigit,""),o);return r&&"number"==typeof s?s:r?e.trim(r&&o.config.ignoreCase?r.toLocaleLowerCase():r):r},type:"numeric"}),t.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,t.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,t.addParser({id:"url",is:function(e){return t.regex.urlProtocolTest.test(e)},format:function(r){return r?e.trim(r.replace(t.regex.urlProtocolReplace,"")):r},type:"text"}),t.regex.dash=/-/g,t.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,t.addParser({id:"isoDate",is:function(e){return t.regex.isoDate.test(e)},format:function(e){var r=e?new Date(e.replace(t.regex.dash,"/")):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),t.regex.percent=/%/g,t.regex.percentTest=/(\d\s*?%|%\s*?\d)/,t.addParser({id:"percent",is:function(e){return t.regex.percentTest.test(e)&&e.length<15},format:function(e,r){return e?t.formatFloat(e.replace(t.regex.percent,""),r):e},type:"numeric"}),t.addParser({id:"image",is:function(e,t,r,o){return o.find("img").length>0},format:function(t,r,o){return e(o).find("img").attr(r.config.imgAttr||"alt")||t},parsed:!0,type:"text"}),t.regex.dateReplace=/(\S)([AP]M)$/i,t.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,t.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,t.addParser({id:"usLongDate",is:function(e){return t.regex.usLongDateTest1.test(e)||t.regex.usLongDateTest2.test(e)},format:function(e){var r=e?new Date(e.replace(t.regex.dateReplace,"$1 $2")):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),t.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,t.regex.shortDateReplace=/[\-.,]/g,t.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,t.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,t.convertFormat=function(e,r){e=(e||"").replace(t.regex.spaces," ").replace(t.regex.shortDateReplace,"/"),"mmddyyyy"===r?e=e.replace(t.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===r?e=e.replace(t.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===r&&(e=e.replace(t.regex.shortDateYMD,"$1/$2/$3"));var o=new Date(e);return o instanceof Date&&isFinite(o)?o.getTime():""},t.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(t.regex.spaces," ").replace(t.regex.shortDateReplace,"/"),t.regex.shortDateTest.test(e)},format:function(e,r,o,s){if(e){var a=r.config,n=a.$headerIndexed[s],i=n.length&&n.data("dateFormat")||t.getData(n,t.getColumnData(r,a.headers,s),"dateFormat")||a.dateFormat;return n.length&&n.data("dateFormat",i),t.convertFormat(e,i)||e}return e},type:"numeric"}),t.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,t.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,t.addParser({id:"time",is:function(e){return t.regex.timeTest.test(e)},format:function(e){var r,o=(e||"").match(t.regex.timeMatch),s=new Date(e),a=e&&(null!==o?o[0]:"00:00 AM"),n=a?new Date("2000/01/01 "+a.replace(t.regex.dateReplace,"$1 $2")):a;return n instanceof Date&&isFinite(n)?(r=s instanceof Date&&isFinite(s)?s.getTime():0,r?parseFloat(n.getTime()+"."+s.getTime()):n.getTime()):e},type:"numeric"}),t.addParser({id:"metadata",is:function(){return!1},format:function(t,r,o){var s=r.config,a=s.parserMetadataName?s.parserMetadataName:"sortValue";return e(o).metadata()[a]},type:"numeric"}),t.addWidget({id:"zebra",priority:90,format:function(t,r,o){var s,a,n,i,l,d,c,g=new RegExp(r.cssChildRow,"i"),p=r.$tbodies.add(e(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(l=0;l<p.length;l++)for(n=0,c=(s=p.eq(l).children("tr:visible").not(r.selectorRemove)).length,d=0;d<c;d++)a=s.eq(d),g.test(a[0].className)||n++,i=n%2==0,a.removeClass(o.zebra[i?1:0]).addClass(o.zebra[i?0:1])},remove:function(e,r,o,s){if(!s){var a,n,i=r.$tbodies,l=(o.zebra||["even","odd"]).join(" ");for(a=0;a<i.length;a++)(n=t.processTbody(e,i.eq(a),!0)).children().removeClass(l),t.processTbody(e,n,!1)}}})}(e),e.tablesorter});
|
js/tablesorter/jquery.tablesorter.widgets.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! tablesorter (FORK) - updated 2018-
|
2 |
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
3 |
(function(factory) {
|
4 |
if (typeof define === 'function' && define.amd) {
|
@@ -2684,7 +2684,7 @@
|
|
2684 |
|
2685 |
})(jQuery, window);
|
2686 |
|
2687 |
-
/*! Widget: resizable - updated 2018-
|
2688 |
/*jshint browser:true, jquery:true, unused:false */
|
2689 |
;(function ($, window) {
|
2690 |
'use strict';
|
@@ -2854,7 +2854,8 @@
|
|
2854 |
tableHeight -= c.$table.children('tfoot').height();
|
2855 |
}
|
2856 |
// subtract out table left position from resizable handles. Fixes #864
|
2857 |
-
|
|
|
2858 |
$handles.each( function() {
|
2859 |
var $this = $(this),
|
2860 |
column = parseInt( $this.attr( 'data-column' ), 10 ),
|
1 |
+
/*! tablesorter (FORK) - updated 2018-04-30 (v2.30.3)*/
|
2 |
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
3 |
(function(factory) {
|
4 |
if (typeof define === 'function' && define.amd) {
|
2684 |
|
2685 |
})(jQuery, window);
|
2686 |
|
2687 |
+
/*! Widget: resizable - updated 2018-03-26 (v2.30.2) */
|
2688 |
/*jshint browser:true, jquery:true, unused:false */
|
2689 |
;(function ($, window) {
|
2690 |
'use strict';
|
2854 |
tableHeight -= c.$table.children('tfoot').height();
|
2855 |
}
|
2856 |
// subtract out table left position from resizable handles. Fixes #864
|
2857 |
+
// jQuery v3.3.0+ appears to include the start position with the $header.position().left; see #1544
|
2858 |
+
startPosition = parseFloat($.fn.jquery) >= 3.3 ? 0 : c.$table.position().left;
|
2859 |
$handles.each( function() {
|
2860 |
var $this = $(this),
|
2861 |
column = parseInt( $this.attr( 'data-column' ), 10 ),
|
js/tablesorter/jquery.tablesorter.widgets.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
/*! tablesorter (FORK) - updated 2018-
|
2 |
-
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(e,t,r){"use strict";var i=e.tablesorter||{};e.extend(!0,i.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),i.storage=function(a,l,s,n){var o,c,d,f=!1,h={},u=(a=e(a)[0]).config,p=u&&u.widgetOptions,g=i.debug(u,"storage"),m=(n&&n.storageType||p&&p.storage_storageType).toString().charAt(0).toLowerCase(),b=m?"":n&&n.useSessionStorage||p&&p.storage_useSessionStorage,y=e(a),_=n&&n.id||y.attr(n&&n.group||p&&p.storage_group||"data-table-group")||p&&p.storage_tableId||a.id||e(".tablesorter").index(y),v=n&&n.url||y.attr(n&&n.page||p&&p.storage_page||"data-table-page")||p&&p.storage_fixedUrl||u&&u.fixedUrl||t.location.pathname;if("c"!==m&&(m="s"===m||b?"sessionStorage":"localStorage")in t)try{t[m].setItem("_tmptest","temp"),f=!0,t[m].removeItem("_tmptest")}catch(e){console.warn(m+" is not supported in this browser")}if(g&&console.log("Storage >> Using",f?m:"cookies"),e.parseJSON&&(f?h=e.parseJSON(t[m][l]||"null")||{}:(c=r.cookie.split(/[;\s|=]/),h=0!==(o=e.inArray(l,c)+1)?e.parseJSON(c[o]||"null")||{}:{})),void 0===s||!t.JSON||!JSON.hasOwnProperty("stringify"))return h&&h[v]?h[v][_]:"";h[v]||(h[v]={}),h[v][_]=s,f?t[m][l]=JSON.stringify(h):((d=new Date).setTime(d.getTime()+31536e6),r.cookie=l+"="+JSON.stringify(h).replace(/\"/g,'"')+"; expires="+d.toGMTString()+"; path=/")}}(e,window,document),function(e){"use strict";var t=e.tablesorter||{};t.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(t.css,{wrapper:"tablesorter-wrapper"}),t.addWidget({id:"uitheme",priority:10,format:function(r,i,a){var l,s,n,o,c,d,f,h,u,p,g,m,b,y=t.themes,_=i.$table.add(e(i.namespace+"_extra_table")),v=i.$headers.add(e(i.namespace+"_extra_headers")),w=i.theme||"jui",x=y[w]||{},S=e.trim([x.sortNone,x.sortDesc,x.sortAsc,x.active].join(" ")),C=e.trim([x.iconSortNone,x.iconSortDesc,x.iconSortAsc].join(" ")),z=t.debug(i,"uitheme");for(z&&(c=new Date),_.hasClass("tablesorter-"+w)&&i.theme===i.appliedTheme&&a.uitheme_applied||(a.uitheme_applied=!0,p=y[i.appliedTheme]||{},g=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",m=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(a.zebra[0]=e.trim(" "+a.zebra[0].replace(" "+p.even,"")),a.zebra[1]=e.trim(" "+a.zebra[1].replace(" "+p.odd,"")),i.$tbodies.children().removeClass([p.even,p.odd].join(" "))),x.even&&(a.zebra[0]+=" "+x.even),x.odd&&(a.zebra[1]+=" "+x.odd),_.children("caption").removeClass(p.caption||"").addClass(x.caption),h=_.removeClass((i.appliedTheme?"tablesorter-"+(i.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+w+" "+(x.table||"")).children("tfoot"),i.appliedTheme=i.theme,h.length&&h.children("tr").removeClass(p.footerRow||"").addClass(x.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(x.footerCells),v.removeClass((b?[p.header,p.hover,g].join(" "):"")||"").addClass(x.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](x.hover||"")}),v.each(function(){var r=e(this);r.find("."+t.css.wrapper).length||r.wrapInner('<div class="'+t.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),i.cssIcon&&v.find("."+t.css.icon).removeClass(b?[p.icons,m].join(" "):"").addClass(x.icons||""),t.hasWidget(i.table,"filter")&&(s=function(){_.children("thead").children("."+t.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(x.filterRow||"")},a.filter_initialized?s():_.one("filterInit",function(){s()}))),l=0;l<i.columns;l++)d=i.$headers.add(e(i.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+l+'"]'),f=t.css.icon?d.find("."+t.css.icon):e(),(u=v.not(".sorter-false").filter('[data-column="'+l+'"]:last')).length&&(d.removeClass(S),f.removeClass(C),u[0].sortDisabled?f.removeClass(x.icons||""):(n=x.sortNone,o=x.iconSortNone,u.hasClass(t.css.sortAsc)?(n=[x.sortAsc,x.active].join(" "),o=x.iconSortAsc):u.hasClass(t.css.sortDesc)&&(n=[x.sortDesc,x.active].join(" "),o=x.iconSortDesc),d.addClass(n),f.addClass(o||"")));z&&console.log("uitheme >> Applied "+w+" theme"+t.benchmark(c))},remove:function(e,r,i,a){if(i.uitheme_applied){var l=r.$table,s=r.appliedTheme||"jui",n=t.themes[s]||t.themes.jui,o=l.children("thead").children(),c=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;l.removeClass("tablesorter-"+s+" "+n.table),i.uitheme_applied=!1,a||(l.find(t.css.header).removeClass(n.header),o.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+c+" "+n.active).filter("."+t.css.filterRow).removeClass(n.filterRow),o.find("."+t.css.icon).removeClass(n.icons+" "+d))}}})}(e),function(e){"use strict";var t=e.tablesorter||{};t.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(r,i,a){var l,s,n,o,c,d,f,h,u=i.$table,p=i.$tbodies,g=i.sortList,m=g.length,b=a&&a.columns||["primary","secondary","tertiary"],y=b.length-1;for(f=b.join(" "),s=0;s<p.length;s++)(n=(l=t.processTbody(r,p.eq(s),!0)).children("tr")).each(function(){if(c=e(this),"none"!==this.style.display&&(d=c.children().removeClass(f),g&&g[0]&&(d.eq(g[0][0]).addClass(b[0]),m>1)))for(h=1;h<m;h++)d.eq(g[h][0]).addClass(b[h]||b[y])}),t.processTbody(r,l,!1);if(o=!1!==a.columns_thead?["thead tr"]:[],!1!==a.columns_tfoot&&o.push("tfoot tr"),o.length&&(n=u.find(o.join(",")).children().removeClass(f),m))for(h=0;h<m;h++)n.filter('[data-column="'+g[h][0]+'"]').addClass(b[h]||b[y])},remove:function(r,i,a){var l,s,n=i.$tbodies,o=(a.columns||["primary","secondary","tertiary"]).join(" ");for(i.$headers.removeClass(o),i.$table.children("tfoot").children("tr").children("th, td").removeClass(o),l=0;l<n.length;l++)(s=t.processTbody(r,n.eq(l),!0)).children("tr").each(function(){e(this).children().removeClass(o)}),t.processTbody(r,s,!1)}})}(e),function(e){"use strict";var t,r,i=e.tablesorter||{},a=i.css,l=i.keyCodes;e.extend(a,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),e.extend(l,{backSpace:8,escape:27,space:32,left:37,down:40}),i.addWidget({id:"filter",priority:50,options:{filter_cellFilter:"",filter_childRows:!1,filter_childByColumn:!1,filter_childWithSibs:!0,filter_columnAnyMatch:!0,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultAttrib:"data-value",filter_defaultFilter:{},filter_excludeFilter:{},filter_external:"",filter_filteredRow:"filtered",filter_filterLabel:'Filter "{{label}}" column by...',filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_matchType:{input:"exact",select:"exact"},filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_resetOnEsc:!0,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_selectSourceSeparator:"|",filter_serversideFiltering:!1,filter_startsWith:!1,filter_useParsedData:!1},format:function(e,r,i){r.$table.hasClass("hasFilters")||t.init(e,r,i)},remove:function(t,r,l,s){var n,o,c=r.$table,d=r.$tbodies,f="addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(f.replace(i.regex.spaces," ")).find("."+a.filterRow).remove(),l.filter_initialized=!1,!s){for(n=0;n<d.length;n++)(o=i.processTbody(t,d.eq(n),!0)).children().removeClass(l.filter_filteredRow).show(),i.processTbody(t,o,!1);l.filter_reset&&e(document).undelegate(l.filter_reset,"click"+r.namespace+"filter")}}}),t=i.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([migyu]{0,5})?$/,child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"\'=]+)|([\"\'=]+$)/g,operators:/[<>=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(i,a,l){if((r.orTest.test(a.iFilter)||r.orSplit.test(a.filter))&&!r.regex.test(a.filter)){var s,n,o,c,d=e.extend({},a),f=a.filter.split(r.orSplit),h=a.iFilter.split(r.orSplit),u=f.length;for(s=0;s<u;s++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(i,f[s],a)||""),d.iFilter=""+(t.parseFilter(i,h[s],a)||""),o="("+(t.parseFilter(i,d.filter,a)||"")+")";try{if(c=new RegExp(a.isMatch?o:"^"+o+"$",i.widgetOptions.filter_ignoreCase?"i":""),n=c.test(d.exact)||t.processTypes(i,d,l))return n}catch(e){return null}}return n||!1}return null},and:function(i,a,l){if(r.andTest.test(a.filter)){var s,n,o,c,d=e.extend({},a),f=a.filter.split(r.andSplit),h=a.iFilter.split(r.andSplit),u=f.length;for(s=0;s<u;s++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(i,f[s],a)||""),d.iFilter=""+(t.parseFilter(i,h[s],a)||""),c=("("+(t.parseFilter(i,d.filter,a)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{o=new RegExp(a.isMatch?c:"^"+c+"$",i.widgetOptions.filter_ignoreCase?"i":"").test(d.exact)||t.processTypes(i,d,l),n=0===s?o:n&&o}catch(e){return null}}return n||!1}return null},regex:function(e,t){if(r.regex.test(t.filter)){var i,a=t.filter_regexCache[t.index]||r.regex.exec(t.filter),l=a instanceof RegExp;try{l||(t.filter_regexCache[t.index]=a=new RegExp(a[1],a[2])),i=a.test(t.exact)}catch(e){i=!1}return i}return null},operators:function(a,l){if(r.operTest.test(l.iFilter)&&""!==l.iExact){var s,n,o,c=a.table,d=l.parsed[l.index],f=i.formatFloat(l.iFilter.replace(r.operators,""),c),h=a.parsers[l.index]||{},u=f;return(d||"numeric"===h.type)&&(o=e.trim(""+l.iFilter.replace(r.operators,"")),f="number"!=typeof(n=t.parseFilter(a,o,l,!0))||""===n||isNaN(n)?f:n),!d&&"numeric"!==h.type||isNaN(f)||void 0===l.cache?(o=isNaN(l.iExact)?l.iExact.replace(i.regex.nondigit,""):l.iExact,s=i.formatFloat(o,c)):s=l.cache,r.gtTest.test(l.iFilter)?n=r.gteTest.test(l.iFilter)?s>=f:s>f:r.ltTest.test(l.iFilter)&&(n=r.lteTest.test(l.iFilter)?s<=f:s<f),n||""!==u||(n=!0),n}return null},notMatch:function(i,a){if(r.notTest.test(a.iFilter)){var l,s=a.iFilter.replace("!",""),n=t.parseFilter(i,s,a)||"";return r.exact.test(n)?""===(n=n.replace(r.exact,""))||e.trim(n)!==a.iExact:(l=a.iExact.search(e.trim(n)),""===n||(a.anyMatch?l<0:!(i.widgetOptions.filter_startsWith?0===l:l>=0)))}return null},exact:function(i,a){if(r.exact.test(a.iFilter)){var l=a.iFilter.replace(r.exact,""),s=t.parseFilter(i,l,a)||"";return a.anyMatch?e.inArray(s,a.rowArray)>=0:s==a.iExact}return null},range:function(e,a){if(r.toTest.test(a.iFilter)){var l,s,n,o,c=e.table,d=a.index,f=a.parsed[d],h=a.iFilter.split(r.toSplit);return s=h[0].replace(i.regex.nondigit,"")||"",n=i.formatFloat(t.parseFilter(e,s,a),c),s=h[1].replace(i.regex.nondigit,"")||"",o=i.formatFloat(t.parseFilter(e,s,a),c),(f||"numeric"===e.parsers[d].type)&&(n=""===(l=e.parsers[d].format(""+h[0],c,e.$headers.eq(d),d))||isNaN(l)?n:l,o=""===(l=e.parsers[d].format(""+h[1],c,e.$headers.eq(d),d))||isNaN(l)?o:l),!f&&"numeric"!==e.parsers[d].type||isNaN(n)||isNaN(o)?(s=isNaN(a.iExact)?a.iExact.replace(i.regex.nondigit,""):a.iExact,l=i.formatFloat(s,c)):l=a.cache,n>o&&(s=n,n=o,o=s),l>=n&&l<=o||""===n||""===o}return null},wild:function(e,i){if(r.wildOrTest.test(i.iFilter)){var a=""+(t.parseFilter(e,i.iFilter,i)||"");!r.wildTest.test(a)&&i.nestedFilters&&(a=i.isMatch?a:"^("+a+")$");try{return new RegExp(a.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(i.exact)}catch(e){return null}}return null},fuzzy:function(e,i){if(r.fuzzyTest.test(i.iFilter)){var a,l=0,s=i.iExact.length,n=i.iFilter.slice(1),o=t.parseFilter(e,n,i)||"";for(a=0;a<s;a++)i.iExact[a]===o[l]&&(l+=1);return l===o.length}return null}},init:function(l){i.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},i.language);var s,n,o,c,d,f,h,u,p=l.config,g=p.widgetOptions,m=function(e,t,r){return t=t.trim(),""===t?"":(e||"")+t+(r||"")};if(p.$table.addClass("hasFilters"),p.lastSearch=[],g.filter_searchTimer=null,g.filter_initTimer=null,g.filter_formatterCount=0,g.filter_formatterInit=[],g.filter_anyColumnSelector='[data-column="all"],[data-column="any"]',g.filter_multipleColumnSelector='[data-column*="-"],[data-column*=","]',f="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(p.cssChildRow),filtered:new RegExp(g.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+(-"+m("|",i.language.or)+m("|",i.language.to)+")\\s+)","i"),toTest:new RegExp("\\s+(-"+m("|",i.language.to)+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-"+m("|",i.language.to)+")\\s+)","gi"),andTest:new RegExp("\\s+("+m("",i.language.and,"|")+"&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+m("",i.language.and,"|")+"&&)\\s+)","gi"),orTest:new RegExp("(\\|"+m("|\\s+",i.language.or,"\\s+")+")","i"),orSplit:new RegExp("(?:\\|"+m("|\\s+(?:",i.language.or,")\\s+")+")","gi"),iQuery:new RegExp(f,"i"),igQuery:new RegExp(f,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),f=p.$headers.filter(".filter-false, .parser-false").length,!1!==g.filter_columnFilters&&f!==p.$headers.length&&t.buildRow(l,p,g),o="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterAndSortReset filterResetSaved filterEnd search ".split(" ").join(p.namespace+"filter "),p.$table.bind(o,function(r,s){return f=g.filter_hideEmpty&&e.isEmptyObject(p.cache)&&!(p.delayInit&&"appendCache"===r.type),p.$table.find("."+a.filterRow).toggleClass(g.filter_filteredRow,f),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(l,!0)),"filterReset"===r.type||"filterAndSortReset"===r.type?(p.$table.find("."+a.filter).add(g.filter_$externalFilters).val(""),"filterAndSortReset"===r.type?i.sortReset(this.config,function(){t.searching(l,[])}):t.searching(l,[])):"filterResetSaved"===r.type?i.storage(l,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(l,!0):(s="search"===r.type?s:"updateComplete"===r.type?p.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(p.lastCombinedFilter=null,p.lastSearch=[],setTimeout(function(){p.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(l,s,!0)),!1}),g.filter_reset&&(g.filter_reset instanceof e?g.filter_reset.click(function(){p.$table.triggerHandler("filterReset")}):e(g.filter_reset).length&&e(document).undelegate(g.filter_reset,"click"+p.namespace+"filter").delegate(g.filter_reset,"click"+p.namespace+"filter",function(){p.$table.triggerHandler("filterReset")})),g.filter_functions)for(d=0;d<p.columns;d++)if(h=i.getColumnData(l,g.filter_functions,d))if(c=p.$headerIndexed[d].removeClass("filter-select"),u=!(c.hasClass("filter-false")||c.hasClass("parser-false")),s="",!0===h&&u)t.buildSelect(l,d);else if("object"==typeof h&&u){for(n in h)"string"==typeof n&&(s+=""===s?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||g.filter_placeholder.select||"")+"</option>":"",f=n,o=n,n.indexOf(g.filter_selectSourceSeparator)>=0&&(o=(f=n.split(g.filter_selectSourceSeparator))[1],f=f[0]),s+="<option "+(o===f?"":'data-function-name="'+n+'" ')+'value="'+f+'">'+o+"</option>");p.$table.find("thead").find("select."+a.filter+'[data-column="'+d+'"]').append(s),(h="function"==typeof(o=g.filter_selectSource)||i.getColumnData(l,o,d))&&t.buildSelect(p.table,d,"",!0,c.hasClass(g.filter_onlyAvail))}t.buildDefault(l,!0),t.bindSearch(l,p.$table.find("."+a.filter),!0),g.filter_external&&t.bindSearch(l,g.filter_external),g.filter_hideFilters&&t.hideFilters(p),p.showProcessing&&(o="filterStart filterEnd ".split(" ").join(p.namespace+"filter-sp "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(t,r){c=r?p.$table.find("."+a.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",i.isProcessing(l,"filterStart"===t.type,r?c:"")})),p.filteredRows=p.totalRows,o="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(p.namespace+"filter "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(){t.completeInit(this)}),p.pager&&p.pager.initialized&&!g.filter_initialized?(p.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(p)},100)):g.filter_initialized||t.completeInit(l)},completeInit:function(e){var r=e.config,a=r.widgetOptions,l=t.setDefaults(e,r,a)||[];l.length&&(r.delayInit&&""===l.join("")||i.setFilters(e,l,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){a.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),i=r.length&&r[0].config,a=i&&i.widgetOptions;a&&!a.filter_initialized&&(a.filter_formatterInit[t]=1)},filterInitComplete:function(r){var a,l,s=r.widgetOptions,n=0,o=function(){s.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[]),i.debug(r,"filter")&&console.log("Filter >> Widget initialized")};if(e.isEmptyObject(s.filter_formatter))o();else{for(l=s.filter_formatterInit.length,a=0;a<l;a++)1===s.filter_formatterInit[a]&&n++;clearTimeout(s.filter_initTimer),s.filter_initialized||n!==s.filter_formatterCount?s.filter_initialized||(s.filter_initTimer=setTimeout(function(){o()},500)):o()}},processFilters:function(e,t){var r,i=[],a=t?encodeURIComponent:decodeURIComponent,l=e.length;for(r=0;r<l;r++)e[r]&&(i[r]=a(e[r]));return i},setDefaults:function(r,a,l){var s,n,o,c,d,f=i.getFilters(r)||[];if(l.filter_saveFilters&&i.storage&&(n=i.storage(r,"tablesorter-filters")||[],(s=e.isArray(n))&&""===n.join("")||!s||(f=t.processFilters(n))),""===f.join(""))for(d=a.$headers.add(l.filter_$externalFilters).filter("["+l.filter_defaultAttrib+"]"),o=0;o<=a.columns;o++)c=o===a.columns?"all":o,f[o]=d.filter('[data-column="'+c+'"]').attr(l.filter_defaultAttrib)||f[o]||"";return a.$table.data("lastSearch",f),f},parseFilter:function(e,t,r,i){return i||r.parsed[r.index]?e.parsers[r.index].format(t,e.table,[],r.index):t},buildRow:function(r,l,s){var n,o,c,d,f,h,u,p,g,m=s.filter_cellFilter,b=l.columns,y=e.isArray(m),_='<tr role="search" class="'+a.filterRow+" "+l.cssIgnoreRow+'">';for(c=0;c<b;c++)l.$headerIndexed[c].length&&(_+=(g=l.$headerIndexed[c]&&l.$headerIndexed[c][0].colSpan||0)>1?'<td data-column="'+c+"-"+(c+g-1)+'" colspan="'+g+'"':'<td data-column="'+c+'"',_+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",_+="></td>");for(l.$filters=e(_+="</tr>").appendTo(l.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)h=!1,(d=l.$headerIndexed[c])&&d.length&&(n=t.getColumnElm(l,l.$filters,c),p=i.getColumnData(r,s.filter_functions,c),f=s.filter_functions&&p&&"function"!=typeof p||d.hasClass("filter-select"),o=i.getColumnData(r,l.headers,c),h="false"===i.getData(d[0],o,"filter")||"false"===i.getData(d[0],o,"parser"),f?_=e("<select>").appendTo(n):((p=i.getColumnData(r,s.filter_formatter,c))?(s.filter_formatterCount++,(_=p(n,c))&&0===_.length&&(_=n.children("input")),_&&(0===_.parent().length||_.parent().length&&_.parent()[0]!==n[0])&&n.append(_)):_=e('<input type="search">').appendTo(n),_&&(g=d.data("placeholder")||d.attr("data-placeholder")||s.filter_placeholder.search||"",_.attr("placeholder",g))),_&&(u=(e.isArray(s.filter_cssFilter)?void 0!==s.filter_cssFilter[c]?s.filter_cssFilter[c]||"":"":s.filter_cssFilter)||"",_.addClass(a.filter+" "+u),(g=(u=s.filter_filterLabel).match(/{{([^}]+?)}}/g))||(g=["{{label}}"]),e.each(g,function(t,r){var i=new RegExp(r,"g"),a=d.attr("data-"+r.replace(/{{|}}/g,"")),l=void 0===a?d.text():a;u=u.replace(i,e.trim(l))}),_.attr({"data-column":n.attr("data-column"),"aria-label":u}),h&&(_.attr("placeholder","").addClass(a.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,a,s){if(r=e(r)[0],(a=e(a)).length){var n,o=r.config,c=o.widgetOptions,d=o.namespace+"filter",f=c.filter_$externalFilters;!0!==s&&(n=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=a.filter(n),f&&f.length?c.filter_$externalFilters=c.filter_$externalFilters.add(a):c.filter_$externalFilters=a,i.setFilters(r,o.$table.data("lastSearch")||[],!1===s)),n="keypress keyup keydown search change input ".split(" ").join(d+" "),a.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(i.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===l.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(a){c=r.config.widgetOptions;var s=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,s);if(void 0===n&&(n=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),a.which===l.escape)this.value=c.filter_resetOnEsc?"":o.lastSearch[s];else{if(""!==this.value&&("number"==typeof n&&this.value.length<n||a.which!==l.enter&&a.which!==l.backSpace&&(a.which<l.space||a.which>=l.left&&a.which<=l.down)))return;if(!1===n&&""!==this.value&&a.which!==l.enter)return}t.searching(r,!0,!0,s)}).bind("search change keypress input blur ".split(" ").join(d+" "),function(a){var s=parseInt(e(this).attr("data-column"),10),n=a.type,d="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,s);!r.config.widgetOptions.filter_initialized||a.which!==l.enter&&"search"!==n&&"blur"!==n&&("change"!==n&&"input"!==n||!0!==d&&(!0===d||"INPUT"===a.target.nodeName)||this.value===o.lastSearch[s])||(a.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==n,!0,s))})}},searching:function(e,r,a,l){var s,n=e.config.widgetOptions;void 0===l?s=!1:void 0===(s="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:i.getColumnData(e,n.filter_liveSearch,l))&&(s=n.filter_liveSearch.fallback||!1),clearTimeout(n.filter_searchTimer),void 0===r||!0===r?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,a)},s?n.filter_searchDelay:10):t.checkFilters(e,r,a)},equalFilters:function(t,r,i){var a,l=[],s=[],n=t.columns+1;for(r=e.isArray(r)?r:[],i=e.isArray(i)?i:[],a=0;a<n;a++)l[a]=r[a]||"",s[a]=i[a]||"";return l.join(",")===s.join(",")},checkFilters:function(r,l,s){var n=r.config,o=n.widgetOptions,c=e.isArray(l),d=c?l:i.getFilters(r,!0),f=d||[];if(e.isEmptyObject(n.cache))n.delayInit&&(!n.pager||n.pager&&n.pager.initialized)&&i.updateCache(n,function(){t.checkFilters(r,!1,s)});else if(c&&(i.setFilters(r,d,!1,!0!==s),o.filter_initialized||(n.lastSearch=[],n.lastCombinedFilter="")),o.filter_hideFilters&&n.$table.find("."+a.filterRow).triggerHandler(t.hideFiltersCheck(n)?"mouseleave":"mouseenter"),!t.equalFilters(n,n.lastSearch,f)||!1===l){if(!1===l&&(n.lastCombinedFilter="",n.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("�").split("�"),o.filter_initialized&&n.$table.triggerHandler("filterStart",[d]),!n.showProcessing)return t.findRows(r,d,f),!1;setTimeout(function(){return t.findRows(r,d,f),!1},30)}},hideFiltersCheck:function(e){if("function"==typeof e.widgetOptions.filter_hideFilters){var t=e.widgetOptions.filter_hideFilters(e);if("boolean"==typeof t)return t}return""===i.getFilters(e.$table).join("")},hideFilters:function(r,i){var l;(i||r.$table).find("."+a.filterRow).addClass(a.filterRowHide).bind("mouseenter mouseleave",function(i){var s=i,n=e(this);clearTimeout(l),l=setTimeout(function(){/enter|over/.test(s.type)?n.removeClass(a.filterRowHide):e(document.activeElement).closest("tr")[0]!==n[0]&&n.toggleClass(a.filterRowHide,t.hideFiltersCheck(r))},200)}).find("input, select").bind("focus blur",function(i){var s=i,n=e(this).closest("tr");clearTimeout(l),l=setTimeout(function(){clearTimeout(l),n.toggleClass(a.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==s.type)},200)})},defaultFilter:function(t,i){if(""===t)return t;var a=r.iQuery,l=i.match(r.igQuery).length,s=l>1?e.trim(t).split(/\s/):[e.trim(t)],n=s.length-1,o=0,c=i;for(n<1&&l>1&&(s[1]=s[0]);a.test(c);)c=c.replace(a,s[o++]||""),a.test(c)&&o<n&&""!==(s[o]||"")&&(c=i.replace(a,c));return c},getLatestSearch:function(t){return t?t.sort(function(t,r){return e(r).attr("data-lastSearchTime")-e(t).attr("data-lastSearchTime")}):t||e()},findRange:function(e,t,r){var i,a,l,s,n,o,c,d,f,h=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(f=(a=t.match(/(\d+)\s*-\s*(\d+)/g))?a.length:0,d=0;d<f;d++){for(l=a[d].split(/\s*-\s*/),(s=parseInt(l[0],10)||0)>(n=parseInt(l[1],10)||e.columns-1)&&(i=s,s=n,n=i),n>=e.columns&&(n=e.columns-1);s<=n;s++)h[h.length]=s;t=t.replace(a[d],"")}if(!r&&/,/.test(t))for(f=(o=t.split(/\s*,\s*/)).length,c=0;c<f;c++)""!==o[c]&&(d=parseInt(o[c],10))<e.columns&&(h[h.length]=d);if(!h.length)for(d=0;d<e.columns;d++)h[h.length]=d;return h},getColumnElm:function(r,i,a){return i.filter(function(){var i=t.findRange(r,e(this).attr("data-column"));return e.inArray(a,i)>-1})},multipleColumns:function(r,i){var a=r.widgetOptions,l=a.filter_initialized||!i.filter(a.filter_anyColumnSelector).length,s=e.trim(t.getLatestSearch(i).attr("data-column")||"");return t.findRange(r,s,!l)},processTypes:function(r,i,a){var l,s=null,n=null;for(l in t.types)e.inArray(l,a.excludeMatch)<0&&null===n&&null!==(n=t.types[l](r,i,a))&&(i.matchedOn=l,s=n);return s},matchType:function(e,t){var r,i=e.widgetOptions,l=e.$headerIndexed[t];return l.hasClass("filter-exact")?r=!1:l.hasClass("filter-match")?r=!0:(i.filter_columnFilters?l=e.$filters.find("."+a.filter).add(i.filter_$externalFilters).filter('[data-column="'+t+'"]'):i.filter_$externalFilters&&(l=i.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!l.length&&"match"===e.widgetOptions.filter_matchType[(l[0].nodeName||"").toLowerCase()]),r},processRow:function(a,l,s){var n,o,c,d,f,h=a.widgetOptions,u=!0,p=h.filter_$anyMatch&&h.filter_$anyMatch.length,g=h.filter_$anyMatch&&h.filter_$anyMatch.length?t.multipleColumns(a,h.filter_$anyMatch):[];if(l.$cells=l.$row.children(),l.matchedOn=null,l.anyMatchFlag&&g.length>1||l.anyMatchFilter&&!p){if(l.anyMatch=!0,l.isMatch=!0,l.rowArray=l.$cells.map(function(t){if(e.inArray(t,g)>-1||l.anyMatchFilter&&!p)return l.parsed[t]?f=l.cacheArray[t]:(f=l.rawArray[t],f=e.trim(h.filter_ignoreCase?f.toLowerCase():f),a.sortLocaleCompare&&(f=i.replaceAccents(f))),f}).get(),l.filter=l.anyMatchFilter,l.iFilter=l.iAnyMatchFilter,l.exact=l.rowArray.join(" "),l.iExact=h.filter_ignoreCase?l.exact.toLowerCase():l.exact,l.cache=l.cacheArray.slice(0,-1).join(" "),s.excludeMatch=s.noAnyMatch,null!==(o=t.processTypes(a,l,s)))u=o;else if(h.filter_startsWith)for(u=!1,g=Math.min(a.columns,l.rowArray.length);!u&&g>0;)g--,u=u||0===l.rowArray[g].indexOf(l.iFilter);else u=(l.iExact+l.childRowText).indexOf(l.iFilter)>=0;if(l.anyMatch=!1,l.filters.join("")===l.filter)return u}for(g=0;g<a.columns;g++)l.filter=l.filters[g],l.index=g,s.excludeMatch=s.excludeFilter[g],l.filter&&(l.cache=l.cacheArray[g],n=l.parsed[g]?l.cache:l.rawArray[g]||"",l.exact=a.sortLocaleCompare?i.replaceAccents(n):n,l.iExact=!r.type.test(typeof l.exact)&&h.filter_ignoreCase?l.exact.toLowerCase():l.exact,l.isMatch=t.matchType(a,g),n=u,d=h.filter_columnFilters?a.$filters.add(h.filter_$externalFilters).filter('[data-column="'+g+'"]').find("select option:selected").attr("data-function-name")||"":"",a.sortLocaleCompare&&(l.filter=i.replaceAccents(l.filter)),h.filter_defaultFilter&&r.iQuery.test(s.defaultColFilter[g])&&(l.filter=t.defaultFilter(l.filter,s.defaultColFilter[g])),l.iFilter=h.filter_ignoreCase?(l.filter||"").toLowerCase():l.filter,o=null,(c=s.functions[g])&&("function"==typeof c?o=c(l.exact,l.cache,l.filter,g,l.$row,a,l):"function"==typeof c[d||l.filter]&&(o=c[f=d||l.filter](l.exact,l.cache,l.filter,g,l.$row,a,l))),null===o?(o=t.processTypes(a,l,s),f=!0===c&&("and"===l.matchedOn||"or"===l.matchedOn),null===o||f?!0===c?n=l.isMatch?(""+l.iExact).search(l.iFilter)>=0:l.filter===l.exact:(f=(l.iExact+l.childRowText).indexOf(t.parseFilter(a,l.iFilter,l)),n=!h.filter_startsWith&&f>=0||h.filter_startsWith&&0===f):n=o):n=o,u=!!n&&u);return u},findRows:function(a,l,s){if(!t.equalFilters(a.config,a.config.lastSearch,s)&&a.config.widgetOptions.filter_initialized){var n,o,c,d,f,h,u,p,g,m,b,y,_,v,w,x,S,C,z,$,F,R,T,k=e.extend([],l),H=a.config,A=H.widgetOptions,I=i.debug(H,"filter"),O={anyMatch:!1,filters:l,filter_regexCache:[]},E={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:i.getColumnData(a,A.filter_defaultFilter,H.columns,!0)||""};for(O.parsed=[],g=0;g<H.columns;g++)O.parsed[g]=A.filter_useParsedData||H.parsers&&H.parsers[g]&&H.parsers[g].parsed||i.getData&&"parsed"===i.getData(H.$headerIndexed[g],i.getColumnData(a,H.headers,g),"filter")||H.$headerIndexed[g].hasClass("filter-parsed"),E.functions[g]=i.getColumnData(a,A.filter_functions,g)||H.$headerIndexed[g].hasClass("filter-select"),E.defaultColFilter[g]=i.getColumnData(a,A.filter_defaultFilter,g)||"",E.excludeFilter[g]=(i.getColumnData(a,A.filter_excludeFilter,g,!0)||"").split(/\s+/);for(I&&(console.log("Filter >> Starting filter widget search",l),v=new Date),H.filteredRows=0,H.totalRows=0,s=k||[],u=0;u<H.$tbodies.length;u++){if(p=i.processTbody(a,H.$tbodies.eq(u),!0),g=H.columns,o=H.cache[u].normalized,d=e(e.map(o,function(e){return e[g].$row.get()})),""===s.join("")||A.filter_serversideFiltering)d.removeClass(A.filter_filteredRow).not("."+H.cssChildRow).css("display","");else{if(d=d.not("."+H.cssChildRow),n=d.length,(A.filter_$anyMatch&&A.filter_$anyMatch.length||void 0!==l[H.columns])&&(O.anyMatchFlag=!0,O.anyMatchFilter=""+(l[H.columns]||A.filter_$anyMatch&&t.getLatestSearch(A.filter_$anyMatch).val()||""),A.filter_columnAnyMatch)){for(z=O.anyMatchFilter.split(r.andSplit),$=!1,x=0;x<z.length;x++)(F=z[x].split(":")).length>1&&(isNaN(F[0])?e.each(H.headerContent,function(e,t){t.toLowerCase().indexOf(F[0])>-1&&(l[R=e]=F[1])}):R=parseInt(F[0],10)-1,R>=0&&R<H.columns&&(l[R]=F[1],z.splice(x,1),x--,$=!0));$&&(O.anyMatchFilter=z.join(" && "))}if(C=A.filter_searchFiltered,b=H.lastSearch||H.$table.data("lastSearch")||[],C)for(x=0;x<g+1;x++)w=l[x]||"",C||(x=g),C=C&&b.length&&0===w.indexOf(b[x]||"")&&!r.alreadyFiltered.test(w)&&!r.exactTest.test(w)&&!(r.isNeg1.test(w)||r.isNeg2.test(w))&&!(""!==w&&H.$filters&&H.$filters.filter('[data-column="'+x+'"]').find("select").length&&!t.matchType(H,x));for(S=d.not("."+A.filter_filteredRow).length,C&&0===S&&(C=!1),I&&console.log("Filter >> Searching through "+(C&&S<n?S:"all")+" rows"),O.anyMatchFlag&&(H.sortLocaleCompare&&(O.anyMatchFilter=i.replaceAccents(O.anyMatchFilter)),A.filter_defaultFilter&&r.iQuery.test(E.defaultAnyFilter)&&(O.anyMatchFilter=t.defaultFilter(O.anyMatchFilter,E.defaultAnyFilter),C=!1),O.iAnyMatchFilter=A.filter_ignoreCase&&H.ignoreCase?O.anyMatchFilter.toLowerCase():O.anyMatchFilter),h=0;h<n;h++)if(T=d[h].className,!(h&&r.child.test(T)||C&&r.filtered.test(T))){if(O.$row=d.eq(h),O.rowIndex=h,O.cacheArray=o[h],c=O.cacheArray[H.columns],O.rawArray=c.raw,O.childRowText="",!A.filter_childByColumn){for(T="",m=c.child,x=0;x<m.length;x++)T+=" "+m[x].join(" ")||"";O.childRowText=A.filter_childRows?A.filter_ignoreCase?T.toLowerCase():T:""}if(y=!1,_=t.processRow(H,O,E),f=c.$row,w=!!_,m=c.$row.filter(":gt(0)"),A.filter_childRows&&m.length){if(A.filter_childByColumn)for(A.filter_childWithSibs||(m.addClass(A.filter_filteredRow),f=f.eq(0)),x=0;x<m.length;x++)O.$row=m.eq(x),O.cacheArray=c.child[x],O.rawArray=O.cacheArray,w=t.processRow(H,O,E),y=y||w,!A.filter_childWithSibs&&w&&m.eq(x).removeClass(A.filter_filteredRow);y=y||_}else y=w;f.toggleClass(A.filter_filteredRow,!y)[0].display=y?"":"none"}}H.filteredRows+=d.not("."+A.filter_filteredRow).length,H.totalRows+=d.length,i.processTbody(a,p,!1)}H.lastCombinedFilter=k.join(""),H.lastSearch=k,H.$table.data("lastSearch",k),A.filter_saveFilters&&i.storage&&i.storage(a,"tablesorter-filters",t.processFilters(k,!0)),I&&console.log("Filter >> Completed search"+i.benchmark(v)),A.filter_initialized&&(H.$table.triggerHandler("filterBeforeEnd",H),H.$table.triggerHandler("filterEnd",H)),setTimeout(function(){i.applyWidget(H.table)},0)}},getOptionSource:function(r,a,l){var s=(r=e(r)[0]).config,n=!1,o=s.widgetOptions.filter_selectSource,c=s.$table.data("lastSearch")||[],d="function"==typeof o||i.getColumnData(r,o,a);if(l&&""!==c[a]&&(l=!1),!0===d)n=o(r,a,l);else{if(d instanceof e||"string"===e.type(d)&&d.indexOf("</option>")>=0)return d;if(e.isArray(d))n=d;else if("object"===e.type(o)&&d&&null===(n=d(r,a,l)))return null}return!1===n&&(n=t.getOptions(r,a,l)),t.processOptions(r,a,n)},processOptions:function(t,r,a){if(!e.isArray(a))return!1;var l,s,n,o,c,d,f=(t=e(t)[0]).config,h=void 0!==r&&null!==r&&r>=0&&r<f.columns,u=!!h&&f.$headerIndexed[r].hasClass("filter-select-sort-desc"),p=[];if(a=e.grep(a,function(t,r){return!!t.text||e.inArray(t,a)===r}),h&&f.$headerIndexed[r].hasClass("filter-select-nosort"))return a;for(o=a.length,n=0;n<o;n++)d=(s=a[n]).text?s.text:s,c=(h&&f.parsers&&f.parsers.length&&f.parsers[r].format(d,t,[],r)||d).toString(),c=f.widgetOptions.filter_ignoreCase?c.toLowerCase():c,s.text?(s.parsed=c,p[p.length]=s):p[p.length]={text:s,parsed:c};for(l=f.textSorter||"",p.sort(function(e,a){var s=u?a.parsed:e.parsed,n=u?e.parsed:a.parsed;return h&&"function"==typeof l?l(s,n,!0,r,t):h&&"object"==typeof l&&l.hasOwnProperty(r)?l[r](s,n,!0,r,t):!i.sortNatural||i.sortNatural(s,n)}),a=[],o=p.length,n=0;n<o;n++)a[a.length]=p[n];return a},getOptions:function(t,r,a){var l,s,n,o,c,d,f,h,u=(t=e(t)[0]).config,p=u.widgetOptions,g=[];for(s=0;s<u.$tbodies.length;s++)for(c=u.cache[s],n=u.cache[s].normalized.length,l=0;l<n;l++)if(o=c.row?c.row[l]:c.normalized[l][u.columns].$row[0],!a||!o.className.match(p.filter_filteredRow))if(p.filter_useParsedData||u.parsers[r].parsed||u.$headerIndexed[r].hasClass("filter-parsed")){if(g[g.length]=""+c.normalized[l][r],p.filter_childRows&&p.filter_childByColumn)for(h=c.normalized[l][u.columns].$row.length-1,d=0;d<h;d++)g[g.length]=""+c.normalized[l][u.columns].child[d][r]}else if(g[g.length]=c.normalized[l][u.columns].raw[r],p.filter_childRows&&p.filter_childByColumn)for(h=c.normalized[l][u.columns].$row.length,d=1;d<h;d++)f=c.normalized[l][u.columns].$row.eq(d).children().eq(r),g[g.length]=""+i.getElementText(u,f,r);return g},buildSelect:function(i,l,s,n,o){if(i=e(i)[0],l=parseInt(l,10),i.config.cache&&!e.isEmptyObject(i.config.cache)){var c,d,f,h,u,p,g,m=i.config,b=m.widgetOptions,y=m.$headerIndexed[l],_='<option value="">'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"</option>",v=m.$table.find("thead").find("select."+a.filter+'[data-column="'+l+'"]').val();if(void 0!==s&&""!==s||null!==(s=t.getOptionSource(i,l,o))){if(e.isArray(s)){for(c=0;c<s.length;c++)if((g=s[c]).text){g["data-function-name"]=void 0===g.value?g.text:g.value,_+="<option";for(d in g)g.hasOwnProperty(d)&&"text"!==d&&(_+=" "+d+'="'+g[d].replace(r.quote,""")+'"');g.value||(_+=' value="'+g.text.replace(r.quote,""")+'"'),_+=">"+g.text.replace(r.quote,""")+"</option>"}else""+g!="[object Object]"&&(d=f=g=(""+g).replace(r.quote,"""),f.indexOf(b.filter_selectSourceSeparator)>=0&&(d=(h=f.split(b.filter_selectSourceSeparator))[0],f=h[1]),_+=""!==g?"<option "+(d===f?"":'data-function-name="'+g+'" ')+'value="'+d+'">'+f+"</option>":"");s=[]}u=(m.$filters?m.$filters:m.$table.children("thead")).find("."+a.filter),b.filter_$externalFilters&&(u=u&&u.length?u.add(b.filter_$externalFilters):b.filter_$externalFilters),(p=u.filter('select[data-column="'+l+'"]')).length&&(p[n?"html":"append"](_),e.isArray(s)||p.append(s).val(v),p.val(v))}}},buildDefault:function(e,r){var a,l,s,n=e.config,o=n.widgetOptions,c=n.columns;for(a=0;a<c;a++)s=!((l=n.$headerIndexed[a]).hasClass("filter-false")||l.hasClass("parser-false")),(l.hasClass("filter-select")||!0===i.getColumnData(e,o.filter_functions,a))&&s&&t.buildSelect(e,a,"",r,l.hasClass(o.filter_onlyAvail))}},r=t.regex,i.getFilters=function(r,i,l,s){var n,o,c,d,f=[],h=r?e(r)[0].config:"",u=h?h.widgetOptions:"";if(!0!==i&&u&&!u.filter_columnFilters||e.isArray(l)&&t.equalFilters(h,l,h.lastSearch))return e(r).data("lastSearch")||[];if(h&&(h.$filters&&(o=h.$filters.find("."+a.filter)),u.filter_$externalFilters&&(o=o&&o.length?o.add(u.filter_$externalFilters):u.filter_$externalFilters),o&&o.length))for(f=l||[],n=0;n<h.columns+1;n++)d=n===h.columns?u.filter_anyColumnSelector+","+u.filter_multipleColumnSelector:'[data-column="'+n+'"]',(c=o.filter(d)).length&&(c=t.getLatestSearch(c),e.isArray(l)?(s&&c.length>1&&(c=c.slice(1)),n===h.columns&&(c=(d=c.filter(u.filter_anyColumnSelector)).length?d:c),c.val(l[n]).trigger("change"+h.namespace)):(f[n]=c.val()||"",n===h.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(f[n]):c.slice(1).val(f[n])),n===h.columns&&c.length&&(u.filter_$anyMatch=c));return f},i.setFilters=function(r,a,l,s){var n=r?e(r)[0].config:"",o=i.getFilters(r,!0,a,s);return void 0===l&&(l=!0),n&&l&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,a,s),n.$table.triggerHandler("filterFomatterUpdate")),0!==o.length}}(e),function(e,t){"use strict";function r(t,r){var i=isNaN(r.stickyHeaders_offset)?e(r.stickyHeaders_offset):[];return i.length?i.height()||0:parseInt(r.stickyHeaders_offset,10)||0}var i=e.tablesorter||{};e.extend(i.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),i.addHeaderResizeEvent=function(t,r,i){if((t=e(t)[0]).config){var a={timer:250},l=e.extend({},a,i),s=t.config,n=s.widgetOptions,o=function(e){var t,r,i,a,l,o,c=s.$headers.length;for(n.resize_flag=!0,r=[],t=0;t<c;t++)a=(i=s.$headers.eq(t)).data("savedSizes")||[0,0],l=i[0].offsetWidth,o=i[0].offsetHeight,l===a[0]&&o===a[1]||(i.data("savedSizes",[l,o]),r.push(i[0]));r.length&&!1!==e&&s.$table.triggerHandler("resize",[r]),n.resize_flag=!1};if(clearInterval(n.resize_timer),r)return n.resize_flag=!1,!1;o(!1),n.resize_timer=setInterval(function(){n.resize_flag||o()},l.timer)}},i.addWidget({id:"stickyHeaders",priority:54,options:{stickyHeaders:"",stickyHeaders_appendTo:null,stickyHeaders_attachTo:null,stickyHeaders_xScroll:null,stickyHeaders_yScroll:null,stickyHeaders_offset:0,stickyHeaders_filteredToTop:!0,stickyHeaders_cloneId:"-sticky",stickyHeaders_addResizeEvent:!0,stickyHeaders_includeCaption:!0,stickyHeaders_zIndex:2},format:function(a,l,s){if(!(l.$table.hasClass("hasStickyHeaders")||e.inArray("filter",l.widgets)>=0&&!l.$table.hasClass("hasFilters"))){var n,o,c,d,f=l.$table,h=e(s.stickyHeaders_attachTo||s.stickyHeaders_appendTo),u=l.namespace+"stickyheaders ",p=e(s.stickyHeaders_yScroll||s.stickyHeaders_attachTo||t),g=e(s.stickyHeaders_xScroll||s.stickyHeaders_attachTo||t),m=f.children("thead:first").children("tr").not(".sticky-false").children(),b=f.children("tfoot"),y=r(l,s),_=f.parent().closest("."+i.css.table).hasClass("hasStickyHeaders")?f.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=_.length?_.height():0,w=s.$sticky=f.clone().addClass("containsStickyHeaders "+i.css.sticky+" "+s.stickyHeaders+" "+l.namespace.slice(1)+"_extra_table").wrap('<div class="'+i.css.stickyWrap+'">'),x=w.parent().addClass(i.css.stickyHide).css({position:h.length?"absolute":"fixed",padding:parseInt(w.parent().parent().css("padding-left"),10),top:y+v,left:0,visibility:"hidden",zIndex:s.stickyHeaders_zIndex||2}),S=w.children("thead:first"),C="",z=function(e,r){var i,a,l,s,n,o=e.filter(":visible"),c=o.length;for(i=0;i<c;i++)s=r.filter(":visible").eq(i),"border-box"===(n=o.eq(i)).css("box-sizing")?a=n.outerWidth():"collapse"===s.css("border-collapse")?t.getComputedStyle?a=parseFloat(t.getComputedStyle(n[0],null).width):(l=parseFloat(n.css("border-width")),a=n.outerWidth()-parseFloat(n.css("padding-left"))-parseFloat(n.css("padding-right"))-l):a=n.width(),s.css({width:a,"min-width":a,"max-width":a})},$=function(r){return!1===r&&_.length?f.position().left:h.length?parseInt(h.css("padding-left"),10)||0:f.offset().left-parseInt(f.css("margin-left"),10)-e(t).scrollLeft()},F=function(){x.css({left:$(),width:f.outerWidth()}),z(f,w),z(m,d)},R=function(t){if(f.is(":visible")){v=_.length?_.offset().top-p.scrollTop()+_.height():0;var a,n=f.offset(),o=r(l,s),c=e.isWindow(p[0]),d=c?p.scrollTop():_.length?parseInt(_[0].style.top,10):p.offset().top,u=h.length?d:p.scrollTop(),g=s.stickyHeaders_includeCaption?0:f.children("caption").height()||0,m=u+o+v-g,y=f.height()-(x.height()+(b.height()||0))-g,w=m>n.top&&m<n.top+y?"visible":"hidden",S="visible"===w?i.css.stickyVis:i.css.stickyHide,z=!x.hasClass(S),R={visibility:w};h.length&&(z=!0,R.top=c?m-h.offset().top:h.scrollTop()),(a=$(c))!==parseInt(x.css("left"),10)&&(z=!0,R.left=a),R.top=(R.top||0)+(!c&&_.length?_.height():o+v),z&&x.removeClass(i.css.stickyVis+" "+i.css.stickyHide).addClass(S).css(R),(w!==C||t)&&(F(),C=w)}};if(h.length&&!h.css("position")&&h.css("position","relative"),w.attr("id")&&(w[0].id+=s.stickyHeaders_cloneId),w.find("> thead:gt(0), tr.sticky-false").hide(),w.find("> tbody, > tfoot").remove(),w.find("caption").toggle(s.stickyHeaders_includeCaption),d=S.children().children(),w.css({height:0,width:0,margin:0}),d.find("."+i.css.resizer).remove(),f.addClass("hasStickyHeaders").bind("pagerComplete"+u,function(){F()}),i.bindEvents(a,S.children().children("."+i.css.header)),s.stickyHeaders_appendTo?e(s.stickyHeaders_appendTo).append(x):f.after(x),l.onRenderHeader)for(o=(c=S.children("tr").children()).length,n=0;n<o;n++)l.onRenderHeader.apply(c.eq(n),[n,l,w]);g.add(p).unbind("scroll resize ".split(" ").join(u).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(u),function(e){R("resize"===e.type)}),l.$table.unbind("stickyHeadersUpdate"+u).bind("stickyHeadersUpdate"+u,function(){R(!0)}),s.stickyHeaders_addResizeEvent&&i.addHeaderResizeEvent(a),f.hasClass("hasFilters")&&s.filter_columnFilters&&(f.bind("filterEnd"+u,function(){var r=e(document.activeElement).closest("td"),a=r.parent().children().index(r);x.hasClass(i.css.stickyVis)&&s.stickyHeaders_filteredToTop&&(t.scrollTo(0,f.position().top),a>=0&&l.$filters&&l.$filters.eq(a).find("a, select, input").filter(":visible").focus())}),i.filter.bindSearch(f,d.find("."+i.css.filter)),s.filter_hideFilters&&i.filter.hideFilters(l,w)),s.stickyHeaders_addResizeEvent&&f.bind("resize"+l.namespace+"stickyheaders",function(){F()}),R(!0),f.triggerHandler("stickyHeadersInit")}},remove:function(r,a,l){var s=a.namespace+"stickyheaders ";a.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(s).replace(/\s+/g," ")).next("."+i.css.stickyWrap).remove(),l.$sticky&&l.$sticky.length&&l.$sticky.remove(),e(t).add(l.stickyHeaders_xScroll).add(l.stickyHeaders_yScroll).add(l.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(s).replace(/\s+/g," ")),i.addHeaderResizeEvent(r,!0)}})}(e,window),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),e(function(){var t="<style>body."+r.css.resizableNoSelect+" { -ms-user-select: none; -moz-user-select: -moz-none;-khtml-user-select: none; -webkit-user-select: none; user-select: none; }."+r.css.resizableContainer+" { position: relative; height: 1px; }."+r.css.resizableHandle+" { position: absolute; display: inline-block; width: 8px;top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }</style>";e("head").append(t)}),r.resizable={init:function(t,i){if(!t.$table.hasClass("hasResizable")){t.$table.addClass("hasResizable");var a,l,s,n,o=t.$table,c=o.parent(),d=parseInt(o.css("margin-top"),10),f=i.resizable_vars={useStorage:r.storage&&!1!==i.resizable,$wrap:c,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===c.css("overflow")||"scroll"===c.css("overflow")||"auto"===c.css("overflow-x")||"scroll"===c.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=o.width(),f.fullWidth=Math.abs(c.width()-f.tableWidth)<20,f.useStorage&&f.overflow&&(r.storage(t.table,"tablesorter-table-original-css-width",f.tableWidth),n=r.storage(t.table,"tablesorter-table-resized-width")||"auto",r.resizable.setWidth(o,n,!0)),i.resizable_vars.storedSizes=s=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,i,s),r.resizable.updateStoredSizes(t,i),i.$resizable_container=e('<div class="'+r.css.resizableContainer+'">').css({top:d}).insertBefore(o),l=0;l<t.columns;l++)a=t.$headerIndexed[l],n=r.getColumnData(t.table,t.headers,l),"false"===r.getData(a,n,"resizable")||e('<div class="'+r.css.resizableHandle+'">').appendTo(i.$resizable_container).attr({"data-column":l,unselectable:"on"}).data("header",a).bind("selectstart",!1);r.resizable.bindings(t,i)}},updateStoredSizes:function(e,t){var r,i,a=e.columns,l=t.resizable_vars;for(l.storedSizes=[],r=0;r<a;r++)i=e.$headerIndexed[r],l.storedSizes[r]=i.is(":visible")?i.width():0},setWidth:function(e,t,r){e.css({width:t,"min-width":r?t:"","max-width":r?t:""})},setWidths:function(t,i,a){var l,s,n=i.resizable_vars,o=e(t.namespace+"_extra_headers"),c=t.$table.children("colgroup").children("col");if((a=a||n.storedSizes||[]).length){for(l=0;l<t.columns;l++)r.resizable.setWidth(t.$headerIndexed[l],a[l],n.overflow),o.length&&(s=o.eq(l).add(c.eq(l)),r.resizable.setWidth(s,a[l],n.overflow));(s=e(t.namespace+"_extra_table")).length&&!r.hasWidget(t.table,"scroller")&&r.resizable.setWidth(s,t.$table.outerWidth(),n.overflow)}},setHandlePosition:function(t,i){var a,l=t.$table.height(),s=i.$resizable_container.children(),n=Math.floor(s.width()/2);r.hasWidget(t.table,"scroller")&&(l=0,t.$table.closest("."+r.css.scrollerWrap).children().each(function(){var t=e(this);l+=t.filter('[style*="height"]').length?t.height():t.children("table").height()})),!i.resizable_includeFooter&&t.$table.children("tfoot").length&&(l-=t.$table.children("tfoot").height()),a=t.$table.position().left,s.each(function(){var s=e(this),o=parseInt(s.attr("data-column"),10),c=t.columns-1,d=s.data("header");d&&(!d.is(":visible")||!i.resizable_addLastColumn&&r.resizable.checkVisibleColumns(t,o)?s.hide():(o<c||o===c&&i.resizable_addLastColumn)&&s.css({display:"inline-block",height:l,left:d.position().left-a+d.outerWidth()-n}))})},checkVisibleColumns:function(e,t){var r,i=0;for(r=t+1;r<e.columns;r++)i+=e.$headerIndexed[r].is(":visible")?1:0;return 0===i},toggleTextSelection:function(t,i,a){var l=t.namespace+"tsresize";i.resizable_vars.disabled=a,e("body").toggleClass(r.css.resizableNoSelect,a),a?e("body").attr("unselectable","on").bind("selectstart"+l,!1):e("body").removeAttr("unselectable").unbind("selectstart"+l)},bindings:function(i,a){var l=i.namespace+"tsresize";a.$resizable_container.children().bind("mousedown",function(t){var l,s=a.resizable_vars,n=e(i.namespace+"_extra_headers"),o=e(t.target).data("header");l=parseInt(o.attr("data-column"),10),s.$target=o=o.add(n.filter('[data-column="'+l+'"]')),s.target=l,s.$next=t.shiftKey||a.resizable_targetLast?o.parent().children().not(".resizable-false").filter(":last"):o.nextAll(":not(.resizable-false)").eq(0),l=parseInt(s.$next.attr("data-column"),10),s.$next=s.$next.add(n.filter('[data-column="'+l+'"]')),s.next=l,s.mouseXPosition=t.pageX,r.resizable.updateStoredSizes(i,a),r.resizable.toggleTextSelection(i,a,!0)}),e(document).bind("mousemove"+l,function(e){var t=a.resizable_vars;t.disabled&&0!==t.mouseXPosition&&t.$target&&(a.resizable_throttle?(clearTimeout(t.timer),t.timer=setTimeout(function(){r.resizable.mouseMove(i,a,e)},isNaN(a.resizable_throttle)?5:a.resizable_throttle)):r.resizable.mouseMove(i,a,e))}).bind("mouseup"+l,function(){a.resizable_vars.disabled&&(r.resizable.toggleTextSelection(i,a,!1),r.resizable.stopResize(i,a),r.resizable.setHandlePosition(i,a))}),e(t).bind("resize"+l+" resizeEnd"+l,function(){r.resizable.setHandlePosition(i,a)}),i.$table.bind("columnUpdate pagerComplete resizableUpdate ".split(" ").join(l+" "),function(){r.resizable.setHandlePosition(i,a)}).bind("resizableReset"+l,function(){r.resizableReset(i.table)}).find("thead:first").add(e(i.namespace+"_extra_table").find("thead:first")).bind("contextmenu"+l,function(){var e=0===a.resizable_vars.storedSizes.length;return r.resizableReset(i.table),r.resizable.setHandlePosition(i,a),a.resizable_vars.storedSizes=[],e})},mouseMove:function(t,i,a){if(0!==i.resizable_vars.mouseXPosition&&i.resizable_vars.$target){var l,s=0,n=i.resizable_vars,o=n.$next,c=n.storedSizes[n.target],d=a.pageX-n.mouseXPosition;if(n.overflow){if(c+d>0){for(n.storedSizes[n.target]+=d,r.resizable.setWidth(n.$target,n.storedSizes[n.target],!0),l=0;l<t.columns;l++)s+=n.storedSizes[l];r.resizable.setWidth(t.$table.add(e(t.namespace+"_extra_table")),s)}o.length||(n.$wrap[0].scrollLeft=t.$table.width())}else n.fullWidth?(n.storedSizes[n.target]+=d,n.storedSizes[n.next]-=d,r.resizable.setWidths(t,i)):(n.storedSizes[n.target]+=d,r.resizable.setWidths(t,i));n.mouseXPosition=a.pageX,t.$table.triggerHandler("stickyHeadersUpdate")}},stopResize:function(e,t){var i=t.resizable_vars;r.resizable.updateStoredSizes(e,t),i.useStorage&&(r.storage(e.table,r.css.resizableStorage,i.storedSizes),r.storage(e.table,"tablesorter-table-resized-width",e.$table.width())),i.mouseXPosition=0,i.$target=i.$next=null,e.$table.triggerHandler("stickyHeadersUpdate"),e.$table.triggerHandler("resizableComplete")}},r.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_includeFooter:!0,resizable_widths:[],resizable_throttle:!1,resizable_targetLast:!1},init:function(e,t,i,a){r.resizable.init(i,a)},format:function(e,t,i){r.resizable.setHandlePosition(t,i)},remove:function(t,i,a,l){if(a.$resizable_container){var s=i.namespace+"tsresize";i.$table.add(e(i.namespace+"_extra_table")).removeClass("hasResizable").children("thead").unbind("contextmenu"+s),a.$resizable_container.remove(),r.resizable.toggleTextSelection(i,a,!1),r.resizableReset(t,l),e(document).unbind("mousemove"+s+" mouseup"+s)}}}),r.resizableReset=function(t,i){e(t).each(function(){var e,a,l=this.config,s=l&&l.widgetOptions,n=s.resizable_vars;if(t&&l&&l.$headerIndexed.length){for(n.overflow&&n.tableWidth&&(r.resizable.setWidth(l.$table,n.tableWidth,!0),n.useStorage&&r.storage(t,"tablesorter-table-resized-width",n.tableWidth)),e=0;e<l.columns;e++)a=l.$headerIndexed[e],s.resizable_widths&&s.resizable_widths[e]?r.resizable.setWidth(a,s.resizable_widths[e],n.overflow):a.hasClass("resizable-false")||r.resizable.setWidth(a,"",n.overflow);l.$table.triggerHandler("stickyHeadersUpdate"),r.storage&&!i&&r.storage(this,r.css.resizableStorage,[])}})}}(e,window),function(e){"use strict";function t(t){var r=i.storage(t.table,"tablesorter-savesort");return r&&r.hasOwnProperty("sortList")&&e.isArray(r.sortList)?r.sortList:[]}function r(e,r){return(r||t(e)).join(",")!==e.sortList.join(",")}var i=e.tablesorter||{};i.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(e,t,r,i){t.format(e,r,i,!0)},format:function(e,a,l,s){var n,o=a.$table,c=!1!==l.saveSort,d={sortList:a.sortList},f=i.debug(a,"saveSort");f&&(n=new Date),o.hasClass("hasSaveSort")?c&&e.hasInitialized&&i.storage&&r(a)&&(i.storage(e,"tablesorter-savesort",d),f&&console.log("saveSort >> Saving last sort: "+a.sortList+i.benchmark(n))):(o.addClass("hasSaveSort"),d="",i.storage&&(d=t(a),f&&console.log('saveSort >> Last sort loaded: "'+d+'"'+i.benchmark(n)),o.bind("saveSortReset",function(t){t.stopPropagation(),i.storage(e,"tablesorter-savesort","")})),s&&d&&d.length>0?a.sortList=d:e.hasInitialized&&d&&d.length>0&&r(a,d)&&i.sortOn(a,d))},remove:function(e,t){t.$table.removeClass("hasSaveSort"),i.storage&&i.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter});
|
1 |
+
/*! tablesorter (FORK) - updated 2018-04-30 (v2.30.3)*/
|
2 |
+
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(e,t,r){"use strict";var i=e.tablesorter||{};e.extend(!0,i.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),i.storage=function(a,l,s,n){var o,c,d,f=!1,h={},u=(a=e(a)[0]).config,p=u&&u.widgetOptions,g=i.debug(u,"storage"),m=(n&&n.storageType||p&&p.storage_storageType).toString().charAt(0).toLowerCase(),b=m?"":n&&n.useSessionStorage||p&&p.storage_useSessionStorage,y=e(a),_=n&&n.id||y.attr(n&&n.group||p&&p.storage_group||"data-table-group")||p&&p.storage_tableId||a.id||e(".tablesorter").index(y),v=n&&n.url||y.attr(n&&n.page||p&&p.storage_page||"data-table-page")||p&&p.storage_fixedUrl||u&&u.fixedUrl||t.location.pathname;if("c"!==m&&(m="s"===m||b?"sessionStorage":"localStorage")in t)try{t[m].setItem("_tmptest","temp"),f=!0,t[m].removeItem("_tmptest")}catch(e){console.warn(m+" is not supported in this browser")}if(g&&console.log("Storage >> Using",f?m:"cookies"),e.parseJSON&&(f?h=e.parseJSON(t[m][l]||"null")||{}:(c=r.cookie.split(/[;\s|=]/),h=0!==(o=e.inArray(l,c)+1)?e.parseJSON(c[o]||"null")||{}:{})),void 0===s||!t.JSON||!JSON.hasOwnProperty("stringify"))return h&&h[v]?h[v][_]:"";h[v]||(h[v]={}),h[v][_]=s,f?t[m][l]=JSON.stringify(h):((d=new Date).setTime(d.getTime()+31536e6),r.cookie=l+"="+JSON.stringify(h).replace(/\"/g,'"')+"; expires="+d.toGMTString()+"; path=/")}}(e,window,document),function(e){"use strict";var t=e.tablesorter||{};t.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(t.css,{wrapper:"tablesorter-wrapper"}),t.addWidget({id:"uitheme",priority:10,format:function(r,i,a){var l,s,n,o,c,d,f,h,u,p,g,m,b,y=t.themes,_=i.$table.add(e(i.namespace+"_extra_table")),v=i.$headers.add(e(i.namespace+"_extra_headers")),w=i.theme||"jui",x=y[w]||{},S=e.trim([x.sortNone,x.sortDesc,x.sortAsc,x.active].join(" ")),C=e.trim([x.iconSortNone,x.iconSortDesc,x.iconSortAsc].join(" ")),z=t.debug(i,"uitheme");for(z&&(c=new Date),_.hasClass("tablesorter-"+w)&&i.theme===i.appliedTheme&&a.uitheme_applied||(a.uitheme_applied=!0,p=y[i.appliedTheme]||{},g=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",m=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(a.zebra[0]=e.trim(" "+a.zebra[0].replace(" "+p.even,"")),a.zebra[1]=e.trim(" "+a.zebra[1].replace(" "+p.odd,"")),i.$tbodies.children().removeClass([p.even,p.odd].join(" "))),x.even&&(a.zebra[0]+=" "+x.even),x.odd&&(a.zebra[1]+=" "+x.odd),_.children("caption").removeClass(p.caption||"").addClass(x.caption),h=_.removeClass((i.appliedTheme?"tablesorter-"+(i.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+w+" "+(x.table||"")).children("tfoot"),i.appliedTheme=i.theme,h.length&&h.children("tr").removeClass(p.footerRow||"").addClass(x.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(x.footerCells),v.removeClass((b?[p.header,p.hover,g].join(" "):"")||"").addClass(x.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](x.hover||"")}),v.each(function(){var r=e(this);r.find("."+t.css.wrapper).length||r.wrapInner('<div class="'+t.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),i.cssIcon&&v.find("."+t.css.icon).removeClass(b?[p.icons,m].join(" "):"").addClass(x.icons||""),t.hasWidget(i.table,"filter")&&(s=function(){_.children("thead").children("."+t.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(x.filterRow||"")},a.filter_initialized?s():_.one("filterInit",function(){s()}))),l=0;l<i.columns;l++)d=i.$headers.add(e(i.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+l+'"]'),f=t.css.icon?d.find("."+t.css.icon):e(),(u=v.not(".sorter-false").filter('[data-column="'+l+'"]:last')).length&&(d.removeClass(S),f.removeClass(C),u[0].sortDisabled?f.removeClass(x.icons||""):(n=x.sortNone,o=x.iconSortNone,u.hasClass(t.css.sortAsc)?(n=[x.sortAsc,x.active].join(" "),o=x.iconSortAsc):u.hasClass(t.css.sortDesc)&&(n=[x.sortDesc,x.active].join(" "),o=x.iconSortDesc),d.addClass(n),f.addClass(o||"")));z&&console.log("uitheme >> Applied "+w+" theme"+t.benchmark(c))},remove:function(e,r,i,a){if(i.uitheme_applied){var l=r.$table,s=r.appliedTheme||"jui",n=t.themes[s]||t.themes.jui,o=l.children("thead").children(),c=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;l.removeClass("tablesorter-"+s+" "+n.table),i.uitheme_applied=!1,a||(l.find(t.css.header).removeClass(n.header),o.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+c+" "+n.active).filter("."+t.css.filterRow).removeClass(n.filterRow),o.find("."+t.css.icon).removeClass(n.icons+" "+d))}}})}(e),function(e){"use strict";var t=e.tablesorter||{};t.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(r,i,a){var l,s,n,o,c,d,f,h,u=i.$table,p=i.$tbodies,g=i.sortList,m=g.length,b=a&&a.columns||["primary","secondary","tertiary"],y=b.length-1;for(f=b.join(" "),s=0;s<p.length;s++)(n=(l=t.processTbody(r,p.eq(s),!0)).children("tr")).each(function(){if(c=e(this),"none"!==this.style.display&&(d=c.children().removeClass(f),g&&g[0]&&(d.eq(g[0][0]).addClass(b[0]),m>1)))for(h=1;h<m;h++)d.eq(g[h][0]).addClass(b[h]||b[y])}),t.processTbody(r,l,!1);if(o=!1!==a.columns_thead?["thead tr"]:[],!1!==a.columns_tfoot&&o.push("tfoot tr"),o.length&&(n=u.find(o.join(",")).children().removeClass(f),m))for(h=0;h<m;h++)n.filter('[data-column="'+g[h][0]+'"]').addClass(b[h]||b[y])},remove:function(r,i,a){var l,s,n=i.$tbodies,o=(a.columns||["primary","secondary","tertiary"]).join(" ");for(i.$headers.removeClass(o),i.$table.children("tfoot").children("tr").children("th, td").removeClass(o),l=0;l<n.length;l++)(s=t.processTbody(r,n.eq(l),!0)).children("tr").each(function(){e(this).children().removeClass(o)}),t.processTbody(r,s,!1)}})}(e),function(e){"use strict";var t,r,i=e.tablesorter||{},a=i.css,l=i.keyCodes;e.extend(a,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),e.extend(l,{backSpace:8,escape:27,space:32,left:37,down:40}),i.addWidget({id:"filter",priority:50,options:{filter_cellFilter:"",filter_childRows:!1,filter_childByColumn:!1,filter_childWithSibs:!0,filter_columnAnyMatch:!0,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultAttrib:"data-value",filter_defaultFilter:{},filter_excludeFilter:{},filter_external:"",filter_filteredRow:"filtered",filter_filterLabel:'Filter "{{label}}" column by...',filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_matchType:{input:"exact",select:"exact"},filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_resetOnEsc:!0,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_selectSourceSeparator:"|",filter_serversideFiltering:!1,filter_startsWith:!1,filter_useParsedData:!1},format:function(e,r,i){r.$table.hasClass("hasFilters")||t.init(e,r,i)},remove:function(t,r,l,s){var n,o,c=r.$table,d=r.$tbodies,f="addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(f.replace(i.regex.spaces," ")).find("."+a.filterRow).remove(),l.filter_initialized=!1,!s){for(n=0;n<d.length;n++)(o=i.processTbody(t,d.eq(n),!0)).children().removeClass(l.filter_filteredRow).show(),i.processTbody(t,o,!1);l.filter_reset&&e(document).undelegate(l.filter_reset,"click"+r.namespace+"filter")}}}),t=i.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([migyu]{0,5})?$/,child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"\'=]+)|([\"\'=]+$)/g,operators:/[<>=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(i,a,l){if((r.orTest.test(a.iFilter)||r.orSplit.test(a.filter))&&!r.regex.test(a.filter)){var s,n,o,c,d=e.extend({},a),f=a.filter.split(r.orSplit),h=a.iFilter.split(r.orSplit),u=f.length;for(s=0;s<u;s++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(i,f[s],a)||""),d.iFilter=""+(t.parseFilter(i,h[s],a)||""),o="("+(t.parseFilter(i,d.filter,a)||"")+")";try{if(c=new RegExp(a.isMatch?o:"^"+o+"$",i.widgetOptions.filter_ignoreCase?"i":""),n=c.test(d.exact)||t.processTypes(i,d,l))return n}catch(e){return null}}return n||!1}return null},and:function(i,a,l){if(r.andTest.test(a.filter)){var s,n,o,c,d=e.extend({},a),f=a.filter.split(r.andSplit),h=a.iFilter.split(r.andSplit),u=f.length;for(s=0;s<u;s++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(i,f[s],a)||""),d.iFilter=""+(t.parseFilter(i,h[s],a)||""),c=("("+(t.parseFilter(i,d.filter,a)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{o=new RegExp(a.isMatch?c:"^"+c+"$",i.widgetOptions.filter_ignoreCase?"i":"").test(d.exact)||t.processTypes(i,d,l),n=0===s?o:n&&o}catch(e){return null}}return n||!1}return null},regex:function(e,t){if(r.regex.test(t.filter)){var i,a=t.filter_regexCache[t.index]||r.regex.exec(t.filter),l=a instanceof RegExp;try{l||(t.filter_regexCache[t.index]=a=new RegExp(a[1],a[2])),i=a.test(t.exact)}catch(e){i=!1}return i}return null},operators:function(a,l){if(r.operTest.test(l.iFilter)&&""!==l.iExact){var s,n,o,c=a.table,d=l.parsed[l.index],f=i.formatFloat(l.iFilter.replace(r.operators,""),c),h=a.parsers[l.index]||{},u=f;return(d||"numeric"===h.type)&&(o=e.trim(""+l.iFilter.replace(r.operators,"")),f="number"!=typeof(n=t.parseFilter(a,o,l,!0))||""===n||isNaN(n)?f:n),!d&&"numeric"!==h.type||isNaN(f)||void 0===l.cache?(o=isNaN(l.iExact)?l.iExact.replace(i.regex.nondigit,""):l.iExact,s=i.formatFloat(o,c)):s=l.cache,r.gtTest.test(l.iFilter)?n=r.gteTest.test(l.iFilter)?s>=f:s>f:r.ltTest.test(l.iFilter)&&(n=r.lteTest.test(l.iFilter)?s<=f:s<f),n||""!==u||(n=!0),n}return null},notMatch:function(i,a){if(r.notTest.test(a.iFilter)){var l,s=a.iFilter.replace("!",""),n=t.parseFilter(i,s,a)||"";return r.exact.test(n)?""===(n=n.replace(r.exact,""))||e.trim(n)!==a.iExact:(l=a.iExact.search(e.trim(n)),""===n||(a.anyMatch?l<0:!(i.widgetOptions.filter_startsWith?0===l:l>=0)))}return null},exact:function(i,a){if(r.exact.test(a.iFilter)){var l=a.iFilter.replace(r.exact,""),s=t.parseFilter(i,l,a)||"";return a.anyMatch?e.inArray(s,a.rowArray)>=0:s==a.iExact}return null},range:function(e,a){if(r.toTest.test(a.iFilter)){var l,s,n,o,c=e.table,d=a.index,f=a.parsed[d],h=a.iFilter.split(r.toSplit);return s=h[0].replace(i.regex.nondigit,"")||"",n=i.formatFloat(t.parseFilter(e,s,a),c),s=h[1].replace(i.regex.nondigit,"")||"",o=i.formatFloat(t.parseFilter(e,s,a),c),(f||"numeric"===e.parsers[d].type)&&(n=""===(l=e.parsers[d].format(""+h[0],c,e.$headers.eq(d),d))||isNaN(l)?n:l,o=""===(l=e.parsers[d].format(""+h[1],c,e.$headers.eq(d),d))||isNaN(l)?o:l),!f&&"numeric"!==e.parsers[d].type||isNaN(n)||isNaN(o)?(s=isNaN(a.iExact)?a.iExact.replace(i.regex.nondigit,""):a.iExact,l=i.formatFloat(s,c)):l=a.cache,n>o&&(s=n,n=o,o=s),l>=n&&l<=o||""===n||""===o}return null},wild:function(e,i){if(r.wildOrTest.test(i.iFilter)){var a=""+(t.parseFilter(e,i.iFilter,i)||"");!r.wildTest.test(a)&&i.nestedFilters&&(a=i.isMatch?a:"^("+a+")$");try{return new RegExp(a.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(i.exact)}catch(e){return null}}return null},fuzzy:function(e,i){if(r.fuzzyTest.test(i.iFilter)){var a,l=0,s=i.iExact.length,n=i.iFilter.slice(1),o=t.parseFilter(e,n,i)||"";for(a=0;a<s;a++)i.iExact[a]===o[l]&&(l+=1);return l===o.length}return null}},init:function(l){i.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},i.language);var s,n,o,c,d,f,h,u,p=l.config,g=p.widgetOptions,m=function(e,t,r){return t=t.trim(),""===t?"":(e||"")+t+(r||"")};if(p.$table.addClass("hasFilters"),p.lastSearch=[],g.filter_searchTimer=null,g.filter_initTimer=null,g.filter_formatterCount=0,g.filter_formatterInit=[],g.filter_anyColumnSelector='[data-column="all"],[data-column="any"]',g.filter_multipleColumnSelector='[data-column*="-"],[data-column*=","]',f="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(p.cssChildRow),filtered:new RegExp(g.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+(-"+m("|",i.language.or)+m("|",i.language.to)+")\\s+)","i"),toTest:new RegExp("\\s+(-"+m("|",i.language.to)+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-"+m("|",i.language.to)+")\\s+)","gi"),andTest:new RegExp("\\s+("+m("",i.language.and,"|")+"&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+m("",i.language.and,"|")+"&&)\\s+)","gi"),orTest:new RegExp("(\\|"+m("|\\s+",i.language.or,"\\s+")+")","i"),orSplit:new RegExp("(?:\\|"+m("|\\s+(?:",i.language.or,")\\s+")+")","gi"),iQuery:new RegExp(f,"i"),igQuery:new RegExp(f,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),f=p.$headers.filter(".filter-false, .parser-false").length,!1!==g.filter_columnFilters&&f!==p.$headers.length&&t.buildRow(l,p,g),o="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterAndSortReset filterResetSaved filterEnd search ".split(" ").join(p.namespace+"filter "),p.$table.bind(o,function(r,s){return f=g.filter_hideEmpty&&e.isEmptyObject(p.cache)&&!(p.delayInit&&"appendCache"===r.type),p.$table.find("."+a.filterRow).toggleClass(g.filter_filteredRow,f),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(l,!0)),"filterReset"===r.type||"filterAndSortReset"===r.type?(p.$table.find("."+a.filter).add(g.filter_$externalFilters).val(""),"filterAndSortReset"===r.type?i.sortReset(this.config,function(){t.searching(l,[])}):t.searching(l,[])):"filterResetSaved"===r.type?i.storage(l,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(l,!0):(s="search"===r.type?s:"updateComplete"===r.type?p.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(p.lastCombinedFilter=null,p.lastSearch=[],setTimeout(function(){p.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(l,s,!0)),!1}),g.filter_reset&&(g.filter_reset instanceof e?g.filter_reset.click(function(){p.$table.triggerHandler("filterReset")}):e(g.filter_reset).length&&e(document).undelegate(g.filter_reset,"click"+p.namespace+"filter").delegate(g.filter_reset,"click"+p.namespace+"filter",function(){p.$table.triggerHandler("filterReset")})),g.filter_functions)for(d=0;d<p.columns;d++)if(h=i.getColumnData(l,g.filter_functions,d))if(c=p.$headerIndexed[d].removeClass("filter-select"),u=!(c.hasClass("filter-false")||c.hasClass("parser-false")),s="",!0===h&&u)t.buildSelect(l,d);else if("object"==typeof h&&u){for(n in h)"string"==typeof n&&(s+=""===s?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||g.filter_placeholder.select||"")+"</option>":"",f=n,o=n,n.indexOf(g.filter_selectSourceSeparator)>=0&&(o=(f=n.split(g.filter_selectSourceSeparator))[1],f=f[0]),s+="<option "+(o===f?"":'data-function-name="'+n+'" ')+'value="'+f+'">'+o+"</option>");p.$table.find("thead").find("select."+a.filter+'[data-column="'+d+'"]').append(s),(h="function"==typeof(o=g.filter_selectSource)||i.getColumnData(l,o,d))&&t.buildSelect(p.table,d,"",!0,c.hasClass(g.filter_onlyAvail))}t.buildDefault(l,!0),t.bindSearch(l,p.$table.find("."+a.filter),!0),g.filter_external&&t.bindSearch(l,g.filter_external),g.filter_hideFilters&&t.hideFilters(p),p.showProcessing&&(o="filterStart filterEnd ".split(" ").join(p.namespace+"filter-sp "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(t,r){c=r?p.$table.find("."+a.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",i.isProcessing(l,"filterStart"===t.type,r?c:"")})),p.filteredRows=p.totalRows,o="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(p.namespace+"filter "),p.$table.unbind(o.replace(i.regex.spaces," ")).bind(o,function(){t.completeInit(this)}),p.pager&&p.pager.initialized&&!g.filter_initialized?(p.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(p)},100)):g.filter_initialized||t.completeInit(l)},completeInit:function(e){var r=e.config,a=r.widgetOptions,l=t.setDefaults(e,r,a)||[];l.length&&(r.delayInit&&""===l.join("")||i.setFilters(e,l,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){a.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),i=r.length&&r[0].config,a=i&&i.widgetOptions;a&&!a.filter_initialized&&(a.filter_formatterInit[t]=1)},filterInitComplete:function(r){var a,l,s=r.widgetOptions,n=0,o=function(){s.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[]),i.debug(r,"filter")&&console.log("Filter >> Widget initialized")};if(e.isEmptyObject(s.filter_formatter))o();else{for(l=s.filter_formatterInit.length,a=0;a<l;a++)1===s.filter_formatterInit[a]&&n++;clearTimeout(s.filter_initTimer),s.filter_initialized||n!==s.filter_formatterCount?s.filter_initialized||(s.filter_initTimer=setTimeout(function(){o()},500)):o()}},processFilters:function(e,t){var r,i=[],a=t?encodeURIComponent:decodeURIComponent,l=e.length;for(r=0;r<l;r++)e[r]&&(i[r]=a(e[r]));return i},setDefaults:function(r,a,l){var s,n,o,c,d,f=i.getFilters(r)||[];if(l.filter_saveFilters&&i.storage&&(n=i.storage(r,"tablesorter-filters")||[],(s=e.isArray(n))&&""===n.join("")||!s||(f=t.processFilters(n))),""===f.join(""))for(d=a.$headers.add(l.filter_$externalFilters).filter("["+l.filter_defaultAttrib+"]"),o=0;o<=a.columns;o++)c=o===a.columns?"all":o,f[o]=d.filter('[data-column="'+c+'"]').attr(l.filter_defaultAttrib)||f[o]||"";return a.$table.data("lastSearch",f),f},parseFilter:function(e,t,r,i){return i||r.parsed[r.index]?e.parsers[r.index].format(t,e.table,[],r.index):t},buildRow:function(r,l,s){var n,o,c,d,f,h,u,p,g,m=s.filter_cellFilter,b=l.columns,y=e.isArray(m),_='<tr role="search" class="'+a.filterRow+" "+l.cssIgnoreRow+'">';for(c=0;c<b;c++)l.$headerIndexed[c].length&&(_+=(g=l.$headerIndexed[c]&&l.$headerIndexed[c][0].colSpan||0)>1?'<td data-column="'+c+"-"+(c+g-1)+'" colspan="'+g+'"':'<td data-column="'+c+'"',_+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",_+="></td>");for(l.$filters=e(_+="</tr>").appendTo(l.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)h=!1,(d=l.$headerIndexed[c])&&d.length&&(n=t.getColumnElm(l,l.$filters,c),p=i.getColumnData(r,s.filter_functions,c),f=s.filter_functions&&p&&"function"!=typeof p||d.hasClass("filter-select"),o=i.getColumnData(r,l.headers,c),h="false"===i.getData(d[0],o,"filter")||"false"===i.getData(d[0],o,"parser"),f?_=e("<select>").appendTo(n):((p=i.getColumnData(r,s.filter_formatter,c))?(s.filter_formatterCount++,(_=p(n,c))&&0===_.length&&(_=n.children("input")),_&&(0===_.parent().length||_.parent().length&&_.parent()[0]!==n[0])&&n.append(_)):_=e('<input type="search">').appendTo(n),_&&(g=d.data("placeholder")||d.attr("data-placeholder")||s.filter_placeholder.search||"",_.attr("placeholder",g))),_&&(u=(e.isArray(s.filter_cssFilter)?void 0!==s.filter_cssFilter[c]?s.filter_cssFilter[c]||"":"":s.filter_cssFilter)||"",_.addClass(a.filter+" "+u),(g=(u=s.filter_filterLabel).match(/{{([^}]+?)}}/g))||(g=["{{label}}"]),e.each(g,function(t,r){var i=new RegExp(r,"g"),a=d.attr("data-"+r.replace(/{{|}}/g,"")),l=void 0===a?d.text():a;u=u.replace(i,e.trim(l))}),_.attr({"data-column":n.attr("data-column"),"aria-label":u}),h&&(_.attr("placeholder","").addClass(a.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,a,s){if(r=e(r)[0],(a=e(a)).length){var n,o=r.config,c=o.widgetOptions,d=o.namespace+"filter",f=c.filter_$externalFilters;!0!==s&&(n=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=a.filter(n),f&&f.length?c.filter_$externalFilters=c.filter_$externalFilters.add(a):c.filter_$externalFilters=a,i.setFilters(r,o.$table.data("lastSearch")||[],!1===s)),n="keypress keyup keydown search change input ".split(" ").join(d+" "),a.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(i.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===l.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(a){c=r.config.widgetOptions;var s=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,s);if(void 0===n&&(n=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),a.which===l.escape)this.value=c.filter_resetOnEsc?"":o.lastSearch[s];else{if(""!==this.value&&("number"==typeof n&&this.value.length<n||a.which!==l.enter&&a.which!==l.backSpace&&(a.which<l.space||a.which>=l.left&&a.which<=l.down)))return;if(!1===n&&""!==this.value&&a.which!==l.enter)return}t.searching(r,!0,!0,s)}).bind("search change keypress input blur ".split(" ").join(d+" "),function(a){var s=parseInt(e(this).attr("data-column"),10),n=a.type,d="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:i.getColumnData(r,c.filter_liveSearch,s);!r.config.widgetOptions.filter_initialized||a.which!==l.enter&&"search"!==n&&"blur"!==n&&("change"!==n&&"input"!==n||!0!==d&&(!0===d||"INPUT"===a.target.nodeName)||this.value===o.lastSearch[s])||(a.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==n,!0,s))})}},searching:function(e,r,a,l){var s,n=e.config.widgetOptions;void 0===l?s=!1:void 0===(s="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:i.getColumnData(e,n.filter_liveSearch,l))&&(s=n.filter_liveSearch.fallback||!1),clearTimeout(n.filter_searchTimer),void 0===r||!0===r?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,a)},s?n.filter_searchDelay:10):t.checkFilters(e,r,a)},equalFilters:function(t,r,i){var a,l=[],s=[],n=t.columns+1;for(r=e.isArray(r)?r:[],i=e.isArray(i)?i:[],a=0;a<n;a++)l[a]=r[a]||"",s[a]=i[a]||"";return l.join(",")===s.join(",")},checkFilters:function(r,l,s){var n=r.config,o=n.widgetOptions,c=e.isArray(l),d=c?l:i.getFilters(r,!0),f=d||[];if(e.isEmptyObject(n.cache))n.delayInit&&(!n.pager||n.pager&&n.pager.initialized)&&i.updateCache(n,function(){t.checkFilters(r,!1,s)});else if(c&&(i.setFilters(r,d,!1,!0!==s),o.filter_initialized||(n.lastSearch=[],n.lastCombinedFilter="")),o.filter_hideFilters&&n.$table.find("."+a.filterRow).triggerHandler(t.hideFiltersCheck(n)?"mouseleave":"mouseenter"),!t.equalFilters(n,n.lastSearch,f)||!1===l){if(!1===l&&(n.lastCombinedFilter="",n.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("�").split("�"),o.filter_initialized&&n.$table.triggerHandler("filterStart",[d]),!n.showProcessing)return t.findRows(r,d,f),!1;setTimeout(function(){return t.findRows(r,d,f),!1},30)}},hideFiltersCheck:function(e){if("function"==typeof e.widgetOptions.filter_hideFilters){var t=e.widgetOptions.filter_hideFilters(e);if("boolean"==typeof t)return t}return""===i.getFilters(e.$table).join("")},hideFilters:function(r,i){var l;(i||r.$table).find("."+a.filterRow).addClass(a.filterRowHide).bind("mouseenter mouseleave",function(i){var s=i,n=e(this);clearTimeout(l),l=setTimeout(function(){/enter|over/.test(s.type)?n.removeClass(a.filterRowHide):e(document.activeElement).closest("tr")[0]!==n[0]&&n.toggleClass(a.filterRowHide,t.hideFiltersCheck(r))},200)}).find("input, select").bind("focus blur",function(i){var s=i,n=e(this).closest("tr");clearTimeout(l),l=setTimeout(function(){clearTimeout(l),n.toggleClass(a.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==s.type)},200)})},defaultFilter:function(t,i){if(""===t)return t;var a=r.iQuery,l=i.match(r.igQuery).length,s=l>1?e.trim(t).split(/\s/):[e.trim(t)],n=s.length-1,o=0,c=i;for(n<1&&l>1&&(s[1]=s[0]);a.test(c);)c=c.replace(a,s[o++]||""),a.test(c)&&o<n&&""!==(s[o]||"")&&(c=i.replace(a,c));return c},getLatestSearch:function(t){return t?t.sort(function(t,r){return e(r).attr("data-lastSearchTime")-e(t).attr("data-lastSearchTime")}):t||e()},findRange:function(e,t,r){var i,a,l,s,n,o,c,d,f,h=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(f=(a=t.match(/(\d+)\s*-\s*(\d+)/g))?a.length:0,d=0;d<f;d++){for(l=a[d].split(/\s*-\s*/),(s=parseInt(l[0],10)||0)>(n=parseInt(l[1],10)||e.columns-1)&&(i=s,s=n,n=i),n>=e.columns&&(n=e.columns-1);s<=n;s++)h[h.length]=s;t=t.replace(a[d],"")}if(!r&&/,/.test(t))for(f=(o=t.split(/\s*,\s*/)).length,c=0;c<f;c++)""!==o[c]&&(d=parseInt(o[c],10))<e.columns&&(h[h.length]=d);if(!h.length)for(d=0;d<e.columns;d++)h[h.length]=d;return h},getColumnElm:function(r,i,a){return i.filter(function(){var i=t.findRange(r,e(this).attr("data-column"));return e.inArray(a,i)>-1})},multipleColumns:function(r,i){var a=r.widgetOptions,l=a.filter_initialized||!i.filter(a.filter_anyColumnSelector).length,s=e.trim(t.getLatestSearch(i).attr("data-column")||"");return t.findRange(r,s,!l)},processTypes:function(r,i,a){var l,s=null,n=null;for(l in t.types)e.inArray(l,a.excludeMatch)<0&&null===n&&null!==(n=t.types[l](r,i,a))&&(i.matchedOn=l,s=n);return s},matchType:function(e,t){var r,i=e.widgetOptions,l=e.$headerIndexed[t];return l.hasClass("filter-exact")?r=!1:l.hasClass("filter-match")?r=!0:(i.filter_columnFilters?l=e.$filters.find("."+a.filter).add(i.filter_$externalFilters).filter('[data-column="'+t+'"]'):i.filter_$externalFilters&&(l=i.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!l.length&&"match"===e.widgetOptions.filter_matchType[(l[0].nodeName||"").toLowerCase()]),r},processRow:function(a,l,s){var n,o,c,d,f,h=a.widgetOptions,u=!0,p=h.filter_$anyMatch&&h.filter_$anyMatch.length,g=h.filter_$anyMatch&&h.filter_$anyMatch.length?t.multipleColumns(a,h.filter_$anyMatch):[];if(l.$cells=l.$row.children(),l.matchedOn=null,l.anyMatchFlag&&g.length>1||l.anyMatchFilter&&!p){if(l.anyMatch=!0,l.isMatch=!0,l.rowArray=l.$cells.map(function(t){if(e.inArray(t,g)>-1||l.anyMatchFilter&&!p)return l.parsed[t]?f=l.cacheArray[t]:(f=l.rawArray[t],f=e.trim(h.filter_ignoreCase?f.toLowerCase():f),a.sortLocaleCompare&&(f=i.replaceAccents(f))),f}).get(),l.filter=l.anyMatchFilter,l.iFilter=l.iAnyMatchFilter,l.exact=l.rowArray.join(" "),l.iExact=h.filter_ignoreCase?l.exact.toLowerCase():l.exact,l.cache=l.cacheArray.slice(0,-1).join(" "),s.excludeMatch=s.noAnyMatch,null!==(o=t.processTypes(a,l,s)))u=o;else if(h.filter_startsWith)for(u=!1,g=Math.min(a.columns,l.rowArray.length);!u&&g>0;)g--,u=u||0===l.rowArray[g].indexOf(l.iFilter);else u=(l.iExact+l.childRowText).indexOf(l.iFilter)>=0;if(l.anyMatch=!1,l.filters.join("")===l.filter)return u}for(g=0;g<a.columns;g++)l.filter=l.filters[g],l.index=g,s.excludeMatch=s.excludeFilter[g],l.filter&&(l.cache=l.cacheArray[g],n=l.parsed[g]?l.cache:l.rawArray[g]||"",l.exact=a.sortLocaleCompare?i.replaceAccents(n):n,l.iExact=!r.type.test(typeof l.exact)&&h.filter_ignoreCase?l.exact.toLowerCase():l.exact,l.isMatch=t.matchType(a,g),n=u,d=h.filter_columnFilters?a.$filters.add(h.filter_$externalFilters).filter('[data-column="'+g+'"]').find("select option:selected").attr("data-function-name")||"":"",a.sortLocaleCompare&&(l.filter=i.replaceAccents(l.filter)),h.filter_defaultFilter&&r.iQuery.test(s.defaultColFilter[g])&&(l.filter=t.defaultFilter(l.filter,s.defaultColFilter[g])),l.iFilter=h.filter_ignoreCase?(l.filter||"").toLowerCase():l.filter,o=null,(c=s.functions[g])&&("function"==typeof c?o=c(l.exact,l.cache,l.filter,g,l.$row,a,l):"function"==typeof c[d||l.filter]&&(o=c[f=d||l.filter](l.exact,l.cache,l.filter,g,l.$row,a,l))),null===o?(o=t.processTypes(a,l,s),f=!0===c&&("and"===l.matchedOn||"or"===l.matchedOn),null===o||f?!0===c?n=l.isMatch?(""+l.iExact).search(l.iFilter)>=0:l.filter===l.exact:(f=(l.iExact+l.childRowText).indexOf(t.parseFilter(a,l.iFilter,l)),n=!h.filter_startsWith&&f>=0||h.filter_startsWith&&0===f):n=o):n=o,u=!!n&&u);return u},findRows:function(a,l,s){if(!t.equalFilters(a.config,a.config.lastSearch,s)&&a.config.widgetOptions.filter_initialized){var n,o,c,d,f,h,u,p,g,m,b,y,_,v,w,x,S,C,z,$,F,R,T,k=e.extend([],l),H=a.config,A=H.widgetOptions,I=i.debug(H,"filter"),O={anyMatch:!1,filters:l,filter_regexCache:[]},E={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:i.getColumnData(a,A.filter_defaultFilter,H.columns,!0)||""};for(O.parsed=[],g=0;g<H.columns;g++)O.parsed[g]=A.filter_useParsedData||H.parsers&&H.parsers[g]&&H.parsers[g].parsed||i.getData&&"parsed"===i.getData(H.$headerIndexed[g],i.getColumnData(a,H.headers,g),"filter")||H.$headerIndexed[g].hasClass("filter-parsed"),E.functions[g]=i.getColumnData(a,A.filter_functions,g)||H.$headerIndexed[g].hasClass("filter-select"),E.defaultColFilter[g]=i.getColumnData(a,A.filter_defaultFilter,g)||"",E.excludeFilter[g]=(i.getColumnData(a,A.filter_excludeFilter,g,!0)||"").split(/\s+/);for(I&&(console.log("Filter >> Starting filter widget search",l),v=new Date),H.filteredRows=0,H.totalRows=0,s=k||[],u=0;u<H.$tbodies.length;u++){if(p=i.processTbody(a,H.$tbodies.eq(u),!0),g=H.columns,o=H.cache[u].normalized,d=e(e.map(o,function(e){return e[g].$row.get()})),""===s.join("")||A.filter_serversideFiltering)d.removeClass(A.filter_filteredRow).not("."+H.cssChildRow).css("display","");else{if(d=d.not("."+H.cssChildRow),n=d.length,(A.filter_$anyMatch&&A.filter_$anyMatch.length||void 0!==l[H.columns])&&(O.anyMatchFlag=!0,O.anyMatchFilter=""+(l[H.columns]||A.filter_$anyMatch&&t.getLatestSearch(A.filter_$anyMatch).val()||""),A.filter_columnAnyMatch)){for(z=O.anyMatchFilter.split(r.andSplit),$=!1,x=0;x<z.length;x++)(F=z[x].split(":")).length>1&&(isNaN(F[0])?e.each(H.headerContent,function(e,t){t.toLowerCase().indexOf(F[0])>-1&&(l[R=e]=F[1])}):R=parseInt(F[0],10)-1,R>=0&&R<H.columns&&(l[R]=F[1],z.splice(x,1),x--,$=!0));$&&(O.anyMatchFilter=z.join(" && "))}if(C=A.filter_searchFiltered,b=H.lastSearch||H.$table.data("lastSearch")||[],C)for(x=0;x<g+1;x++)w=l[x]||"",C||(x=g),C=C&&b.length&&0===w.indexOf(b[x]||"")&&!r.alreadyFiltered.test(w)&&!r.exactTest.test(w)&&!(r.isNeg1.test(w)||r.isNeg2.test(w))&&!(""!==w&&H.$filters&&H.$filters.filter('[data-column="'+x+'"]').find("select").length&&!t.matchType(H,x));for(S=d.not("."+A.filter_filteredRow).length,C&&0===S&&(C=!1),I&&console.log("Filter >> Searching through "+(C&&S<n?S:"all")+" rows"),O.anyMatchFlag&&(H.sortLocaleCompare&&(O.anyMatchFilter=i.replaceAccents(O.anyMatchFilter)),A.filter_defaultFilter&&r.iQuery.test(E.defaultAnyFilter)&&(O.anyMatchFilter=t.defaultFilter(O.anyMatchFilter,E.defaultAnyFilter),C=!1),O.iAnyMatchFilter=A.filter_ignoreCase&&H.ignoreCase?O.anyMatchFilter.toLowerCase():O.anyMatchFilter),h=0;h<n;h++)if(T=d[h].className,!(h&&r.child.test(T)||C&&r.filtered.test(T))){if(O.$row=d.eq(h),O.rowIndex=h,O.cacheArray=o[h],c=O.cacheArray[H.columns],O.rawArray=c.raw,O.childRowText="",!A.filter_childByColumn){for(T="",m=c.child,x=0;x<m.length;x++)T+=" "+m[x].join(" ")||"";O.childRowText=A.filter_childRows?A.filter_ignoreCase?T.toLowerCase():T:""}if(y=!1,_=t.processRow(H,O,E),f=c.$row,w=!!_,m=c.$row.filter(":gt(0)"),A.filter_childRows&&m.length){if(A.filter_childByColumn)for(A.filter_childWithSibs||(m.addClass(A.filter_filteredRow),f=f.eq(0)),x=0;x<m.length;x++)O.$row=m.eq(x),O.cacheArray=c.child[x],O.rawArray=O.cacheArray,w=t.processRow(H,O,E),y=y||w,!A.filter_childWithSibs&&w&&m.eq(x).removeClass(A.filter_filteredRow);y=y||_}else y=w;f.toggleClass(A.filter_filteredRow,!y)[0].display=y?"":"none"}}H.filteredRows+=d.not("."+A.filter_filteredRow).length,H.totalRows+=d.length,i.processTbody(a,p,!1)}H.lastCombinedFilter=k.join(""),H.lastSearch=k,H.$table.data("lastSearch",k),A.filter_saveFilters&&i.storage&&i.storage(a,"tablesorter-filters",t.processFilters(k,!0)),I&&console.log("Filter >> Completed search"+i.benchmark(v)),A.filter_initialized&&(H.$table.triggerHandler("filterBeforeEnd",H),H.$table.triggerHandler("filterEnd",H)),setTimeout(function(){i.applyWidget(H.table)},0)}},getOptionSource:function(r,a,l){var s=(r=e(r)[0]).config,n=!1,o=s.widgetOptions.filter_selectSource,c=s.$table.data("lastSearch")||[],d="function"==typeof o||i.getColumnData(r,o,a);if(l&&""!==c[a]&&(l=!1),!0===d)n=o(r,a,l);else{if(d instanceof e||"string"===e.type(d)&&d.indexOf("</option>")>=0)return d;if(e.isArray(d))n=d;else if("object"===e.type(o)&&d&&null===(n=d(r,a,l)))return null}return!1===n&&(n=t.getOptions(r,a,l)),t.processOptions(r,a,n)},processOptions:function(t,r,a){if(!e.isArray(a))return!1;var l,s,n,o,c,d,f=(t=e(t)[0]).config,h=void 0!==r&&null!==r&&r>=0&&r<f.columns,u=!!h&&f.$headerIndexed[r].hasClass("filter-select-sort-desc"),p=[];if(a=e.grep(a,function(t,r){return!!t.text||e.inArray(t,a)===r}),h&&f.$headerIndexed[r].hasClass("filter-select-nosort"))return a;for(o=a.length,n=0;n<o;n++)d=(s=a[n]).text?s.text:s,c=(h&&f.parsers&&f.parsers.length&&f.parsers[r].format(d,t,[],r)||d).toString(),c=f.widgetOptions.filter_ignoreCase?c.toLowerCase():c,s.text?(s.parsed=c,p[p.length]=s):p[p.length]={text:s,parsed:c};for(l=f.textSorter||"",p.sort(function(e,a){var s=u?a.parsed:e.parsed,n=u?e.parsed:a.parsed;return h&&"function"==typeof l?l(s,n,!0,r,t):h&&"object"==typeof l&&l.hasOwnProperty(r)?l[r](s,n,!0,r,t):!i.sortNatural||i.sortNatural(s,n)}),a=[],o=p.length,n=0;n<o;n++)a[a.length]=p[n];return a},getOptions:function(t,r,a){var l,s,n,o,c,d,f,h,u=(t=e(t)[0]).config,p=u.widgetOptions,g=[];for(s=0;s<u.$tbodies.length;s++)for(c=u.cache[s],n=u.cache[s].normalized.length,l=0;l<n;l++)if(o=c.row?c.row[l]:c.normalized[l][u.columns].$row[0],!a||!o.className.match(p.filter_filteredRow))if(p.filter_useParsedData||u.parsers[r].parsed||u.$headerIndexed[r].hasClass("filter-parsed")){if(g[g.length]=""+c.normalized[l][r],p.filter_childRows&&p.filter_childByColumn)for(h=c.normalized[l][u.columns].$row.length-1,d=0;d<h;d++)g[g.length]=""+c.normalized[l][u.columns].child[d][r]}else if(g[g.length]=c.normalized[l][u.columns].raw[r],p.filter_childRows&&p.filter_childByColumn)for(h=c.normalized[l][u.columns].$row.length,d=1;d<h;d++)f=c.normalized[l][u.columns].$row.eq(d).children().eq(r),g[g.length]=""+i.getElementText(u,f,r);return g},buildSelect:function(i,l,s,n,o){if(i=e(i)[0],l=parseInt(l,10),i.config.cache&&!e.isEmptyObject(i.config.cache)){var c,d,f,h,u,p,g,m=i.config,b=m.widgetOptions,y=m.$headerIndexed[l],_='<option value="">'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"</option>",v=m.$table.find("thead").find("select."+a.filter+'[data-column="'+l+'"]').val();if(void 0!==s&&""!==s||null!==(s=t.getOptionSource(i,l,o))){if(e.isArray(s)){for(c=0;c<s.length;c++)if((g=s[c]).text){g["data-function-name"]=void 0===g.value?g.text:g.value,_+="<option";for(d in g)g.hasOwnProperty(d)&&"text"!==d&&(_+=" "+d+'="'+g[d].replace(r.quote,""")+'"');g.value||(_+=' value="'+g.text.replace(r.quote,""")+'"'),_+=">"+g.text.replace(r.quote,""")+"</option>"}else""+g!="[object Object]"&&(d=f=g=(""+g).replace(r.quote,"""),f.indexOf(b.filter_selectSourceSeparator)>=0&&(d=(h=f.split(b.filter_selectSourceSeparator))[0],f=h[1]),_+=""!==g?"<option "+(d===f?"":'data-function-name="'+g+'" ')+'value="'+d+'">'+f+"</option>":"");s=[]}u=(m.$filters?m.$filters:m.$table.children("thead")).find("."+a.filter),b.filter_$externalFilters&&(u=u&&u.length?u.add(b.filter_$externalFilters):b.filter_$externalFilters),(p=u.filter('select[data-column="'+l+'"]')).length&&(p[n?"html":"append"](_),e.isArray(s)||p.append(s).val(v),p.val(v))}}},buildDefault:function(e,r){var a,l,s,n=e.config,o=n.widgetOptions,c=n.columns;for(a=0;a<c;a++)s=!((l=n.$headerIndexed[a]).hasClass("filter-false")||l.hasClass("parser-false")),(l.hasClass("filter-select")||!0===i.getColumnData(e,o.filter_functions,a))&&s&&t.buildSelect(e,a,"",r,l.hasClass(o.filter_onlyAvail))}},r=t.regex,i.getFilters=function(r,i,l,s){var n,o,c,d,f=[],h=r?e(r)[0].config:"",u=h?h.widgetOptions:"";if(!0!==i&&u&&!u.filter_columnFilters||e.isArray(l)&&t.equalFilters(h,l,h.lastSearch))return e(r).data("lastSearch")||[];if(h&&(h.$filters&&(o=h.$filters.find("."+a.filter)),u.filter_$externalFilters&&(o=o&&o.length?o.add(u.filter_$externalFilters):u.filter_$externalFilters),o&&o.length))for(f=l||[],n=0;n<h.columns+1;n++)d=n===h.columns?u.filter_anyColumnSelector+","+u.filter_multipleColumnSelector:'[data-column="'+n+'"]',(c=o.filter(d)).length&&(c=t.getLatestSearch(c),e.isArray(l)?(s&&c.length>1&&(c=c.slice(1)),n===h.columns&&(c=(d=c.filter(u.filter_anyColumnSelector)).length?d:c),c.val(l[n]).trigger("change"+h.namespace)):(f[n]=c.val()||"",n===h.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(f[n]):c.slice(1).val(f[n])),n===h.columns&&c.length&&(u.filter_$anyMatch=c));return f},i.setFilters=function(r,a,l,s){var n=r?e(r)[0].config:"",o=i.getFilters(r,!0,a,s);return void 0===l&&(l=!0),n&&l&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,a,s),n.$table.triggerHandler("filterFomatterUpdate")),0!==o.length}}(e),function(e,t){"use strict";function r(t,r){var i=isNaN(r.stickyHeaders_offset)?e(r.stickyHeaders_offset):[];return i.length?i.height()||0:parseInt(r.stickyHeaders_offset,10)||0}var i=e.tablesorter||{};e.extend(i.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),i.addHeaderResizeEvent=function(t,r,i){if((t=e(t)[0]).config){var a={timer:250},l=e.extend({},a,i),s=t.config,n=s.widgetOptions,o=function(e){var t,r,i,a,l,o,c=s.$headers.length;for(n.resize_flag=!0,r=[],t=0;t<c;t++)a=(i=s.$headers.eq(t)).data("savedSizes")||[0,0],l=i[0].offsetWidth,o=i[0].offsetHeight,l===a[0]&&o===a[1]||(i.data("savedSizes",[l,o]),r.push(i[0]));r.length&&!1!==e&&s.$table.triggerHandler("resize",[r]),n.resize_flag=!1};if(clearInterval(n.resize_timer),r)return n.resize_flag=!1,!1;o(!1),n.resize_timer=setInterval(function(){n.resize_flag||o()},l.timer)}},i.addWidget({id:"stickyHeaders",priority:54,options:{stickyHeaders:"",stickyHeaders_appendTo:null,stickyHeaders_attachTo:null,stickyHeaders_xScroll:null,stickyHeaders_yScroll:null,stickyHeaders_offset:0,stickyHeaders_filteredToTop:!0,stickyHeaders_cloneId:"-sticky",stickyHeaders_addResizeEvent:!0,stickyHeaders_includeCaption:!0,stickyHeaders_zIndex:2},format:function(a,l,s){if(!(l.$table.hasClass("hasStickyHeaders")||e.inArray("filter",l.widgets)>=0&&!l.$table.hasClass("hasFilters"))){var n,o,c,d,f=l.$table,h=e(s.stickyHeaders_attachTo||s.stickyHeaders_appendTo),u=l.namespace+"stickyheaders ",p=e(s.stickyHeaders_yScroll||s.stickyHeaders_attachTo||t),g=e(s.stickyHeaders_xScroll||s.stickyHeaders_attachTo||t),m=f.children("thead:first").children("tr").not(".sticky-false").children(),b=f.children("tfoot"),y=r(l,s),_=f.parent().closest("."+i.css.table).hasClass("hasStickyHeaders")?f.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=_.length?_.height():0,w=s.$sticky=f.clone().addClass("containsStickyHeaders "+i.css.sticky+" "+s.stickyHeaders+" "+l.namespace.slice(1)+"_extra_table").wrap('<div class="'+i.css.stickyWrap+'">'),x=w.parent().addClass(i.css.stickyHide).css({position:h.length?"absolute":"fixed",padding:parseInt(w.parent().parent().css("padding-left"),10),top:y+v,left:0,visibility:"hidden",zIndex:s.stickyHeaders_zIndex||2}),S=w.children("thead:first"),C="",z=function(e,r){var i,a,l,s,n,o=e.filter(":visible"),c=o.length;for(i=0;i<c;i++)s=r.filter(":visible").eq(i),"border-box"===(n=o.eq(i)).css("box-sizing")?a=n.outerWidth():"collapse"===s.css("border-collapse")?t.getComputedStyle?a=parseFloat(t.getComputedStyle(n[0],null).width):(l=parseFloat(n.css("border-width")),a=n.outerWidth()-parseFloat(n.css("padding-left"))-parseFloat(n.css("padding-right"))-l):a=n.width(),s.css({width:a,"min-width":a,"max-width":a})},$=function(r){return!1===r&&_.length?f.position().left:h.length?parseInt(h.css("padding-left"),10)||0:f.offset().left-parseInt(f.css("margin-left"),10)-e(t).scrollLeft()},F=function(){x.css({left:$(),width:f.outerWidth()}),z(f,w),z(m,d)},R=function(t){if(f.is(":visible")){v=_.length?_.offset().top-p.scrollTop()+_.height():0;var a,n=f.offset(),o=r(l,s),c=e.isWindow(p[0]),d=c?p.scrollTop():_.length?parseInt(_[0].style.top,10):p.offset().top,u=h.length?d:p.scrollTop(),g=s.stickyHeaders_includeCaption?0:f.children("caption").height()||0,m=u+o+v-g,y=f.height()-(x.height()+(b.height()||0))-g,w=m>n.top&&m<n.top+y?"visible":"hidden",S="visible"===w?i.css.stickyVis:i.css.stickyHide,z=!x.hasClass(S),R={visibility:w};h.length&&(z=!0,R.top=c?m-h.offset().top:h.scrollTop()),(a=$(c))!==parseInt(x.css("left"),10)&&(z=!0,R.left=a),R.top=(R.top||0)+(!c&&_.length?_.height():o+v),z&&x.removeClass(i.css.stickyVis+" "+i.css.stickyHide).addClass(S).css(R),(w!==C||t)&&(F(),C=w)}};if(h.length&&!h.css("position")&&h.css("position","relative"),w.attr("id")&&(w[0].id+=s.stickyHeaders_cloneId),w.find("> thead:gt(0), tr.sticky-false").hide(),w.find("> tbody, > tfoot").remove(),w.find("caption").toggle(s.stickyHeaders_includeCaption),d=S.children().children(),w.css({height:0,width:0,margin:0}),d.find("."+i.css.resizer).remove(),f.addClass("hasStickyHeaders").bind("pagerComplete"+u,function(){F()}),i.bindEvents(a,S.children().children("."+i.css.header)),s.stickyHeaders_appendTo?e(s.stickyHeaders_appendTo).append(x):f.after(x),l.onRenderHeader)for(o=(c=S.children("tr").children()).length,n=0;n<o;n++)l.onRenderHeader.apply(c.eq(n),[n,l,w]);g.add(p).unbind("scroll resize ".split(" ").join(u).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(u),function(e){R("resize"===e.type)}),l.$table.unbind("stickyHeadersUpdate"+u).bind("stickyHeadersUpdate"+u,function(){R(!0)}),s.stickyHeaders_addResizeEvent&&i.addHeaderResizeEvent(a),f.hasClass("hasFilters")&&s.filter_columnFilters&&(f.bind("filterEnd"+u,function(){var r=e(document.activeElement).closest("td"),a=r.parent().children().index(r);x.hasClass(i.css.stickyVis)&&s.stickyHeaders_filteredToTop&&(t.scrollTo(0,f.position().top),a>=0&&l.$filters&&l.$filters.eq(a).find("a, select, input").filter(":visible").focus())}),i.filter.bindSearch(f,d.find("."+i.css.filter)),s.filter_hideFilters&&i.filter.hideFilters(l,w)),s.stickyHeaders_addResizeEvent&&f.bind("resize"+l.namespace+"stickyheaders",function(){F()}),R(!0),f.triggerHandler("stickyHeadersInit")}},remove:function(r,a,l){var s=a.namespace+"stickyheaders ";a.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(s).replace(/\s+/g," ")).next("."+i.css.stickyWrap).remove(),l.$sticky&&l.$sticky.length&&l.$sticky.remove(),e(t).add(l.stickyHeaders_xScroll).add(l.stickyHeaders_yScroll).add(l.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(s).replace(/\s+/g," ")),i.addHeaderResizeEvent(r,!0)}})}(e,window),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),e(function(){var t="<style>body."+r.css.resizableNoSelect+" { -ms-user-select: none; -moz-user-select: -moz-none;-khtml-user-select: none; -webkit-user-select: none; user-select: none; }."+r.css.resizableContainer+" { position: relative; height: 1px; }."+r.css.resizableHandle+" { position: absolute; display: inline-block; width: 8px;top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }</style>";e("head").append(t)}),r.resizable={init:function(t,i){if(!t.$table.hasClass("hasResizable")){t.$table.addClass("hasResizable");var a,l,s,n,o=t.$table,c=o.parent(),d=parseInt(o.css("margin-top"),10),f=i.resizable_vars={useStorage:r.storage&&!1!==i.resizable,$wrap:c,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===c.css("overflow")||"scroll"===c.css("overflow")||"auto"===c.css("overflow-x")||"scroll"===c.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=o.width(),f.fullWidth=Math.abs(c.width()-f.tableWidth)<20,f.useStorage&&f.overflow&&(r.storage(t.table,"tablesorter-table-original-css-width",f.tableWidth),n=r.storage(t.table,"tablesorter-table-resized-width")||"auto",r.resizable.setWidth(o,n,!0)),i.resizable_vars.storedSizes=s=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,i,s),r.resizable.updateStoredSizes(t,i),i.$resizable_container=e('<div class="'+r.css.resizableContainer+'">').css({top:d}).insertBefore(o),l=0;l<t.columns;l++)a=t.$headerIndexed[l],n=r.getColumnData(t.table,t.headers,l),"false"===r.getData(a,n,"resizable")||e('<div class="'+r.css.resizableHandle+'">').appendTo(i.$resizable_container).attr({"data-column":l,unselectable:"on"}).data("header",a).bind("selectstart",!1);r.resizable.bindings(t,i)}},updateStoredSizes:function(e,t){var r,i,a=e.columns,l=t.resizable_vars;for(l.storedSizes=[],r=0;r<a;r++)i=e.$headerIndexed[r],l.storedSizes[r]=i.is(":visible")?i.width():0},setWidth:function(e,t,r){e.css({width:t,"min-width":r?t:"","max-width":r?t:""})},setWidths:function(t,i,a){var l,s,n=i.resizable_vars,o=e(t.namespace+"_extra_headers"),c=t.$table.children("colgroup").children("col");if((a=a||n.storedSizes||[]).length){for(l=0;l<t.columns;l++)r.resizable.setWidth(t.$headerIndexed[l],a[l],n.overflow),o.length&&(s=o.eq(l).add(c.eq(l)),r.resizable.setWidth(s,a[l],n.overflow));(s=e(t.namespace+"_extra_table")).length&&!r.hasWidget(t.table,"scroller")&&r.resizable.setWidth(s,t.$table.outerWidth(),n.overflow)}},setHandlePosition:function(t,i){var a,l=t.$table.height(),s=i.$resizable_container.children(),n=Math.floor(s.width()/2);r.hasWidget(t.table,"scroller")&&(l=0,t.$table.closest("."+r.css.scrollerWrap).children().each(function(){var t=e(this);l+=t.filter('[style*="height"]').length?t.height():t.children("table").height()})),!i.resizable_includeFooter&&t.$table.children("tfoot").length&&(l-=t.$table.children("tfoot").height()),a=parseFloat(e.fn.jquery)>=3.3?0:t.$table.position().left,s.each(function(){var s=e(this),o=parseInt(s.attr("data-column"),10),c=t.columns-1,d=s.data("header");d&&(!d.is(":visible")||!i.resizable_addLastColumn&&r.resizable.checkVisibleColumns(t,o)?s.hide():(o<c||o===c&&i.resizable_addLastColumn)&&s.css({display:"inline-block",height:l,left:d.position().left-a+d.outerWidth()-n}))})},checkVisibleColumns:function(e,t){var r,i=0;for(r=t+1;r<e.columns;r++)i+=e.$headerIndexed[r].is(":visible")?1:0;return 0===i},toggleTextSelection:function(t,i,a){var l=t.namespace+"tsresize";i.resizable_vars.disabled=a,e("body").toggleClass(r.css.resizableNoSelect,a),a?e("body").attr("unselectable","on").bind("selectstart"+l,!1):e("body").removeAttr("unselectable").unbind("selectstart"+l)},bindings:function(i,a){var l=i.namespace+"tsresize";a.$resizable_container.children().bind("mousedown",function(t){var l,s=a.resizable_vars,n=e(i.namespace+"_extra_headers"),o=e(t.target).data("header");l=parseInt(o.attr("data-column"),10),s.$target=o=o.add(n.filter('[data-column="'+l+'"]')),s.target=l,s.$next=t.shiftKey||a.resizable_targetLast?o.parent().children().not(".resizable-false").filter(":last"):o.nextAll(":not(.resizable-false)").eq(0),l=parseInt(s.$next.attr("data-column"),10),s.$next=s.$next.add(n.filter('[data-column="'+l+'"]')),s.next=l,s.mouseXPosition=t.pageX,r.resizable.updateStoredSizes(i,a),r.resizable.toggleTextSelection(i,a,!0)}),e(document).bind("mousemove"+l,function(e){var t=a.resizable_vars;t.disabled&&0!==t.mouseXPosition&&t.$target&&(a.resizable_throttle?(clearTimeout(t.timer),t.timer=setTimeout(function(){r.resizable.mouseMove(i,a,e)},isNaN(a.resizable_throttle)?5:a.resizable_throttle)):r.resizable.mouseMove(i,a,e))}).bind("mouseup"+l,function(){a.resizable_vars.disabled&&(r.resizable.toggleTextSelection(i,a,!1),r.resizable.stopResize(i,a),r.resizable.setHandlePosition(i,a))}),e(t).bind("resize"+l+" resizeEnd"+l,function(){r.resizable.setHandlePosition(i,a)}),i.$table.bind("columnUpdate pagerComplete resizableUpdate ".split(" ").join(l+" "),function(){r.resizable.setHandlePosition(i,a)}).bind("resizableReset"+l,function(){r.resizableReset(i.table)}).find("thead:first").add(e(i.namespace+"_extra_table").find("thead:first")).bind("contextmenu"+l,function(){var e=0===a.resizable_vars.storedSizes.length;return r.resizableReset(i.table),r.resizable.setHandlePosition(i,a),a.resizable_vars.storedSizes=[],e})},mouseMove:function(t,i,a){if(0!==i.resizable_vars.mouseXPosition&&i.resizable_vars.$target){var l,s=0,n=i.resizable_vars,o=n.$next,c=n.storedSizes[n.target],d=a.pageX-n.mouseXPosition;if(n.overflow){if(c+d>0){for(n.storedSizes[n.target]+=d,r.resizable.setWidth(n.$target,n.storedSizes[n.target],!0),l=0;l<t.columns;l++)s+=n.storedSizes[l];r.resizable.setWidth(t.$table.add(e(t.namespace+"_extra_table")),s)}o.length||(n.$wrap[0].scrollLeft=t.$table.width())}else n.fullWidth?(n.storedSizes[n.target]+=d,n.storedSizes[n.next]-=d,r.resizable.setWidths(t,i)):(n.storedSizes[n.target]+=d,r.resizable.setWidths(t,i));n.mouseXPosition=a.pageX,t.$table.triggerHandler("stickyHeadersUpdate")}},stopResize:function(e,t){var i=t.resizable_vars;r.resizable.updateStoredSizes(e,t),i.useStorage&&(r.storage(e.table,r.css.resizableStorage,i.storedSizes),r.storage(e.table,"tablesorter-table-resized-width",e.$table.width())),i.mouseXPosition=0,i.$target=i.$next=null,e.$table.triggerHandler("stickyHeadersUpdate"),e.$table.triggerHandler("resizableComplete")}},r.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_includeFooter:!0,resizable_widths:[],resizable_throttle:!1,resizable_targetLast:!1},init:function(e,t,i,a){r.resizable.init(i,a)},format:function(e,t,i){r.resizable.setHandlePosition(t,i)},remove:function(t,i,a,l){if(a.$resizable_container){var s=i.namespace+"tsresize";i.$table.add(e(i.namespace+"_extra_table")).removeClass("hasResizable").children("thead").unbind("contextmenu"+s),a.$resizable_container.remove(),r.resizable.toggleTextSelection(i,a,!1),r.resizableReset(t,l),e(document).unbind("mousemove"+s+" mouseup"+s)}}}),r.resizableReset=function(t,i){e(t).each(function(){var e,a,l=this.config,s=l&&l.widgetOptions,n=s.resizable_vars;if(t&&l&&l.$headerIndexed.length){for(n.overflow&&n.tableWidth&&(r.resizable.setWidth(l.$table,n.tableWidth,!0),n.useStorage&&r.storage(t,"tablesorter-table-resized-width",n.tableWidth)),e=0;e<l.columns;e++)a=l.$headerIndexed[e],s.resizable_widths&&s.resizable_widths[e]?r.resizable.setWidth(a,s.resizable_widths[e],n.overflow):a.hasClass("resizable-false")||r.resizable.setWidth(a,"",n.overflow);l.$table.triggerHandler("stickyHeadersUpdate"),r.storage&&!i&&r.storage(this,r.css.resizableStorage,[])}})}}(e,window),function(e){"use strict";function t(t){var r=i.storage(t.table,"tablesorter-savesort");return r&&r.hasOwnProperty("sortList")&&e.isArray(r.sortList)?r.sortList:[]}function r(e,r){return(r||t(e)).join(",")!==e.sortList.join(",")}var i=e.tablesorter||{};i.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(e,t,r,i){t.format(e,r,i,!0)},format:function(e,a,l,s){var n,o=a.$table,c=!1!==l.saveSort,d={sortList:a.sortList},f=i.debug(a,"saveSort");f&&(n=new Date),o.hasClass("hasSaveSort")?c&&e.hasInitialized&&i.storage&&r(a)&&(i.storage(e,"tablesorter-savesort",d),f&&console.log("saveSort >> Saving last sort: "+a.sortList+i.benchmark(n))):(o.addClass("hasSaveSort"),d="",i.storage&&(d=t(a),f&&console.log('saveSort >> Last sort loaded: "'+d+'"'+i.benchmark(n)),o.bind("saveSortReset",function(t){t.stopPropagation(),i.storage(e,"tablesorter-savesort","")})),s&&d&&d.length>0?a.sortList=d:e.hasInitialized&&d&&d.length>0&&r(a,d)&&i.sortOn(a,d))},remove:function(e,t){t.$table.removeClass("hasSaveSort"),i.storage&&i.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter});
|
js/wpadmin.js
CHANGED
@@ -1428,6 +1428,9 @@ jQuery(document).ready(function ($) {
|
|
1428 |
|
1429 |
for (i in wpoptimize.loggers_classes_info) {
|
1430 |
if (!wpoptimize.loggers_classes_info.hasOwnProperty(i)) continue;
|
|
|
|
|
|
|
1431 |
select_options.push(['<option value="',i,'">',wpoptimize.loggers_classes_info[i].description,'</option>'].join(''));
|
1432 |
}
|
1433 |
|
1428 |
|
1429 |
for (i in wpoptimize.loggers_classes_info) {
|
1430 |
if (!wpoptimize.loggers_classes_info.hasOwnProperty(i)) continue;
|
1431 |
+
|
1432 |
+
if (!wpoptimize.loggers_classes_info[i].available) continue;
|
1433 |
+
|
1434 |
select_options.push(['<option value="',i,'">',wpoptimize.loggers_classes_info[i].description,'</option>'].join(''));
|
1435 |
}
|
1436 |
|
js/wpadmin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
wp_optimize_send_command_admin_ajax=function(t,i,e,o){o="undefined"==typeof o||o;var n={action:"wp_optimize_ajax",subaction:t,nonce:wp_optimize_ajax_nonce,data:i};jQuery.post(ajaxurl,n,function(t){if(o){try{var i=JSON.parse(t)}catch(n){return console.log(n),console.log(t),void alert(wpoptimize.error_unexpected_response)}"undefined"!=typeof e&&e(i)}else"undefined"!=typeof e&&e(t)})},jQuery(document).ready(function(t){WP_Optimize=WP_Optimize(wp_optimize_send_command_admin_ajax)});var WP_Optimize=function(t){function i(){if(x("#enable-schedule").length){var t=x("#enable-schedule").is(":checked");t?x("#wp-optimize-auto-options").css("opacity","1"):x("#wp-optimize-auto-options").css("opacity","0.5")}}function e(t,i,e){i="undefined"==typeof i?"#wp-optimize-wrap":i,e="undefined"==typeof e?15:e,x(t).hide().prependTo(i).slideDown("slow").delay(1e3*e).slideUp("slow",function(){x(this).remove()})}function o(i,o){var n={type:i,enable:o?1:0};x("#"+i+"_spinner").show(),t("enable_or_disable_feature",n,function(t){if(x("#"+i+"_spinner").hide(),t&&t.hasOwnProperty("output"))for(var o=0,n=t.output.length;o<n;o++){var a='<div class="updated">'+t.output[o]+"</div>";e(a,"#actions-results-area")}})}function n(t){var i="",t="undefined"==typeof t?"string":t;return"object"==t?i=x("#wp-optimize-nav-tab-contents-settings form input[name!='action'], #wp-optimize-nav-tab-contents-settings form textarea, #wp-optimize-nav-tab-contents-settings form select, #wp-optimize-nav-tab-contents-optimize input[type='checkbox'], .wp-optimize-nav-tab-contents input[name^='enable-auto-backup-']").serializeJSON({useIntKeysAsArrayIndex:!0}):(i=x("#wp-optimize-nav-tab-contents-settings form input[name!='action'], #wp-optimize-nav-tab-contents-settings form textarea, #wp-optimize-nav-tab-contents-settings form select, #wp-optimize-nav-tab-contents-optimize input[type='checkbox'], .wp-optimize-nav-tab-contents input[name^='enable-auto-backup-']").serialize(),x.each(x('#wp-optimize-nav-tab-contents-settings form input[type=checkbox], .wp-optimize-nav-tab-contents input[name^="enable-auto-backup-"]').filter(function(t){return 0==x(this).prop("checked")}),function(t,e){var o="0";i+="&"+x(e).attr("name")+"="+o})),i}function a(){t("optimizations_done",{},function(){})}function s(){if(!O.get_lock())return void(j>0&&console.log("WP-Optimize: process_queue(): queue is currently locked - exiting"));j>0&&console.log("WP-Optimize: process_queue(): got queue lock");var i=O.peek();return"object"==typeof i?(data=i,i=i.optimization_id):data={},"undefined"==typeof i?(j>0&&console.log("WP-Optimize: process_queue(): queue is apparently empty - exiting"),O.unlock(),void a()):(j>0&&console.log("WP-Optimize: process_queue(): processing item: "+i),O.dequeue(),x(document).trigger(["do_optimization_",i,"_start"].join("")),void t("do_optimization",{optimization_id:i,data:data},function(t){if(x("#optimization_spinner_"+i).hide(),x("#optimization_checkbox_"+i).show(),x(".optimization_button_"+i).prop("disabled",!1),x(document).trigger(["do_optimization_",i,"_done"].join(""),t),t){for(var e="",o=0,n=t.errors.length;o<n;o++)e+='<span class="error">'+t.errors[o]+"</span><br>";for(var o=0,n=t.messages.length;o<n;o++)e+=t.errors[o]+"<br>";for(var o=0,n=t.result.output.length;o<n;o++)e+=t.result.output[o]+"<br>";if(x("#optimization_info_"+i).html(e),t.hasOwnProperty("status_box_contents")&&x("#wp_optimize_status_box").css("opacity","1").find(".inside").html(t.status_box_contents),t.hasOwnProperty("table_list")&&x("#wpoptimize_table_list tbody").html(x(t.table_list).find("tbody").html()),t.hasOwnProperty("total_size")&&x("#optimize_current_db_size").html(t.total_size),"optimizetables"==i&&data.optimization_table&&(O.is_empty()?(x("#optimization_spinner_"+i).hide(),x("#optimization_checkbox_"+i).show(),x(".optimization_button_"+i).prop("disabled",!1),x("#optimization_info_"+i).html(wpoptimize.optimization_complete)):(x("#optimization_checkbox_"+i).hide(),x("#optimization_spinner_"+i).show(),x(".optimization_button_"+i).prop("disabled",!0))),t.result.meta&&t.result.meta.hasOwnProperty("awaiting_mod")){var a=t.result.meta.awaiting_mod;a>0?x("#adminmenu .awaiting-mod .pending-count").remove(a):x("#adminmenu .awaiting-mod").remove()}}setTimeout(function(){O.unlock(),s()},10)}))}function p(t){var i=x("#wp-optimize-nav-tab-contents-optimize .wp-optimize-settings-"+t);if(i||console.log("do_optimization: row corresponding to this optimization ("+t+") not found"),1!=x(".optimization_button_"+t).prop("disabled")){if(x("#optimization_checkbox_"+t).hide(),x("#optimization_spinner_"+t).show(),x(".optimization_button_"+t).prop("disabled",!0),x("#optimization_info_"+t).html("..."),"optimizetables"==t){var e=x("#wpoptimize_table_list #the-list tr");x(e).each(function(i){var e=x(this).find("td");if(table_type=e.eq(5).text(),table=e.eq(1).text(),optimizable=e.eq(5).data("optimizable"),""!=table&&("1"==optimizable||B)){var o={optimization_id:t,optimization_table:e.eq(1).text(),optimization_table_type:table_type,optimization_force:B};O.enqueue(o)}})}else O.enqueue(t);s()}}function r(i){x("#wpo_settings_sites_list").length?t("save_site_settings",{"wpo-sites":l()},function(){i&&i()}):i&&i()}function l(){var t=[];return x('#wpo_settings_sites_list input[type="checkbox"]').each(function(){var i=x(this);i.is(":checked")&&t.push(i.attr("value"))}),t}function _(){var t=!1;x("#enable-auto-backup").is(":checked")&&(t=!0),d(),1==t?c(f):f()}function c(t){"function"==typeof updraft_backupnow_inpage_go?updraft_backupnow_inpage_go(function(){x("#updraft-backupnow-inpage-modal").dialog("close"),t&&t()},"","autobackup",0,1,0,wpoptimize.automatic_backup_before_optimizations):t&&t()}function d(){var i=n("object");i.auto_backup=x("#enable-auto-backup").is(":checked"),t("save_auto_backup_option",i)}function u(t,i,e,o){t.on("click",function(){return i.hasClass("wpo_always_visible")||i.toggleClass("wpo_hidden"),!1}),e.on("change",function(){e.is(":checked")?o.prop("checked",!0):o.prop("checked",!1),m(e,o)}),o.on("change",function(){m(e,o)}),m(e,o)}function m(t,i){var e=0,o=0;if(i.each(function(){x(this).is(":checked")&&o++,e++}),t.next().is("label")&&t.next().data("label")){var n=t.next(),a=n.data("label");e==o?n.text(a):n.text(a.replace("all",[o," of ",e].join("")))}e==o?t.prop("checked",!0):t.prop("checked",!1)}function f(){$optimizations=x("#optimizations_list .optimization_checkbox:checked"),$optimizations.sort(function(t,i){return t=x(t).closest(".wp-optimize-settings").data("optimization_run_sort_order"),i=x(i).closest(".wp-optimize-settings").data("optimization_run_sort_order"),t>i?1:t<i?-1:0});var i={};$optimizations.each(function(t){var e=x(this).closest(".wp-optimize-settings").data("optimization_id");return e?(i[e]={active:1},void p(e)):void console.log("Optimization ID corresponding to pressed button not found")}),t("save_manual_run_optimization_options",i)}function g(t){x(".run-single-table-optimization").each(function(){var i=x(this);i.data("disabled")&&(t?i.prop("disabled",!1):i.prop("disabled",!0))})}function w(t){var i,e,o;if(t)for(i in t)t.hasOwnProperty(i)&&(e=["#wp-optimize-settings-",t[i].dom_id].join(""),o=t[i].info?t[i].info.join("<br>"):"",x(e+" .wp-optimize-settings-optimization-info").html(o))}function b(){var i=["",l().join("_")].join("");G.hasOwnProperty(i)?w(G[i]):t("get_optimizations_info",{"wpo-sites":l()},function(t){t&&(G[i]=t,w(t))})}function h(i){var e=x("#wpo_import_spinner"),o=x("#wpo_import_success_message"),n=x("#wpo_import_error_message");e.show(),t("import_settings",{settings:i},function(t){e.hide(),t&&t.errors&&t.errors.length?(n.text(t.errors.join("<br>")),n.slideDown()):t&&t.messages&&t.messages.length&&(o.text(t.messages.join("<br>")),o.slideDown(),setTimeout(function(){window.location.reload()},500)),x("#wpo_import_settings_btn").prop("disabled",!1)})}function z(t,i){var e=document.body.appendChild(document.createElement("a")),o=new Date,n=o.getFullYear(),a=o.getMonth()<10?["0",o.getMonth()].join(""):o.getMonth(),s=o.getDay()<10?["0",o.getDay()].join(""):o.getDay();i=i?i:["wpo-settings-",n,"-",a,"-",s,".json"].join(""),e.setAttribute("download",i),e.setAttribute("style","display:none;"),e.setAttribute("href","data:text/json;charset=UTF-8,"+encodeURIComponent(JSON.stringify(t))),e.click()}function v(){var t=x("#wpoptimize_table_list"),i=!0;x("tr",t).each(function(){var t=x(this);if(x("button",t).length>0)return i=!1,!1}),x("tr",t).each(function(){var t=x(this);i?x("td:last, th:last",t).hide():x("td:last, th:last",t).show()})}function y(){var t=!0;return x(".wpo_logger_addition_option, .wpo_logger_type").each(function(){k(x(this),!0)?x(this).removeClass("wpo_error_field"):(t=!1,x(this).addClass("wpo_error_field"))}),t?x("#wp-optimize-logger-settings .save_settings_reminder").slideUp():x("#wp-optimize-settings-save-results").show().addClass("wpo_alert_notice").text(wpoptimize.fill_all_settings_fields).delay(5e3).fadeOut(3e3,function(){x(this).removeClass("wpo_alert_notice")}),t}function k(t,i){var e=t.val(),o=t.data("validate");if(!o&&i)return""!=x.trim(e);if(o&&!i&&""==x.trim(e))return!0;var n=!0;switch(o){case"email":for(var a=/\S+@\S+\.\S+/,s=e.split(","),p="",r=0;r<s.length;r++)p=x.trim(s[r]),""!=p&&a.test(p)||(n=!1);break;case"url":var a=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i;n=a.test(e)}return n}var x=jQuery,j=0,O=new Updraft_Queue;i(),x("#enable-schedule").change(function(){i()});var P=x("#wpoptimize_table_list_filter"),q=x("#wpoptimize_table_list"),C=x("#wpoptimize_table_list tbody:last"),D=x("#wpoptimize_table_list_tables_not_found");x(function(){q.tablesorter({theme:"default",widgets:["zebra","rows","filter"],cssInfoBlock:"tablesorter-no-sort",headers:{7:{sorter:!1}},widgetOptions:{filter_external:P,filter_defaultFilter:{2:"~{query}"}}}),q.on("filterEnd",function(){var t=x.trim(P.val());""==t?C.show():C.hide(),0==x("#the-list tr:visible",q).length?D.show():D.hide()})}),x("#wp-optimize-disable-enable-trackbacks-enable").click(function(){o("trackbacks",!0)}),x("#wp-optimize-disable-enable-trackbacks-disable").click(function(){o("trackbacks",!1)}),x("#wp-optimize-disable-enable-comments-enable").click(function(){o("comments",!0)}),x("#wp-optimize-disable-enable-comments-disable").click(function(){o("comments",!1)}),x("#wp-optimize-nav-tab-wrapper .nav-tab").click(function(t){var i=x(this).attr("id");if(i&&"wp-optimize-nav-tab-"==i.substring(0,20)){var i=i.substring(20);t.preventDefault(),x("#wp-optimize-nav-tab-wrapper .nav-tab:not(#wp-optimize-nav-tab-"+i+")").removeClass("nav-tab-active"),x(this).addClass("nav-tab-active"),x("#wp-optimize-wrap .wp-optimize-nav-tab-contents:not(#wp-optimize-nav-tab-contents-"+i+")").hide(),x("#wp-optimize-nav-tab-contents-"+i).show(),"tables"==i&&x("#wpoptimize_table_list").trigger("applyWidgets")}}),x("#wp-optimize-nav-tab-contents-optimize").on("click","button.wp-optimize-settings-optimization-run-button",function(){var t=x(this).closest(".wp-optimize-settings").data("optimization_id");return t?void(1!=x(".optimization_button_"+t).prop("disabled")&&(x(".optimization_button_"+t).prop("disabled",!0),r(function(){x(".optimization_button_"+t).prop("disabled",!1),p(t)}))):void console.log("Optimization ID corresponding to pressed button not found")}),x("#wp-optimize-nav-tab-contents-optimize").on("click","#wp-optimize",function(t){var i=x(this);t.preventDefault(),i.prop("disabled",!0),r(function(){i.prop("disabled",!1),_()})});var S=x("#wpo_settings_sites_list"),T=S.find("ul").first(),W=x('input[type="checkbox"]',T),A=S.find("#wpo_all_sites"),F=x("#wpo_sitelist_show_moreoptions"),I=x("#wpo_sitelist_moreoptions"),U=x("#wpo_settings_sites_list_cron"),Q=U.find("ul").first(),$=x('input[type="checkbox"]',Q),J=U.find("#wpo_all_sites_cron"),M=x("#wpo_sitelist_show_moreoptions_cron"),N=x("#wpo_sitelist_moreoptions_cron");u(F,I,A,W);var E=0;x([A,W]).each(function(){x(this).on("change",function(){E++,setTimeout(function(){E--,0==E&&b()},1e3)})}),u(M,N,J,$),x("#wp_optimize_table_list_refresh").click(function(){x("#wpoptimize_table_list tbody").css("opacity","0.5"),t("get_table_list",!1,function(t){if(t.hasOwnProperty("table_list")){var i=!0,e=function(t){x("#wpoptimize_table_list tbody").css("opacity","1")};x("#wpoptimize_table_list").trigger("updateAll",[i,e])}t.hasOwnProperty("total_size")&&x("#optimize_current_db_size").html(t.total_size),g(Y.is(":checked"))})}),x("#settings_form").on("click","#wp-optimize-settings-save",function(i){if(!y())return!1;i.preventDefault(),x("#save_spinner").show();var o=n();t("save_settings",o,function(t){if(x("#save_spinner").hide(),x("#save_done").show().delay(5e3).fadeOut(),t&&t.hasOwnProperty("save_results")&&t.save_results&&t.save_results.hasOwnProperty("errors")){for(var i=0,o=t.save_results.errors.length;i<o;i++){var n='<div class="error">'+t.errors[i]+"</div>";e(n,"#wp-optimize-settings-save-results")}console.log(t.save_results.messages)}t&&t.hasOwnProperty("status_box_contents")&&x("#wp_optimize_status_box .inside").html(t.status_box_contents),t&&t.hasOwnProperty("optimizations_table")&&x("#optimizations_list").replaceWith(t.optimizations_table),t.save_results.refresh&&location.reload()})}),x("#wp_optimize_status_box").on("click","#wp_optimize_status_box_refresh",function(i){i.preventDefault(),x("#wp_optimize_status_box").css("opacity","0.5"),t("get_status_box_contents",null,function(t){x("#wp_optimize_status_box").css("opacity","1").find(".inside").html(t)})});var R=x("#innodb_force_optimize"),B=R.is(":checked"),K=R.closest("tr"),Y=x("#innodb_force_optimize_single");R.on("change",function(){x('button, input[type="checkbox"]',K).each(function(){B=R.is(":checked");var t=x(this);t.data("disabled")&&(B?t.prop("disabled",!1):t.prop("disabled",!0))})}),x("#wpoptimize_table_list").on("click",".run-single-table-optimization",function(){var i=x(this),e=i.next(),o=e.next(),n=i.data("table"),a=i.data("type"),s={optimization_id:"optimizetables",optimization_table:n,optimization_table_type:a};Y.is(":checked")&&(s.optimization_force=!0),e.removeClass("visibility-hidden"),t("do_optimization",{optimization_id:"optimizetables",data:s},function(){i.prop("disabled",!1),e.addClass("visibility-hidden"),o.show().removeClass("visibility-hidden").delay(3e3).fadeOut("slow")})}),Y.change(function(){g(Y.is(":checked"))}),g(Y.is(":checked"));var G={};setTimeout(function(){t("check_overdue_crons",null,function(t){t&&t.hasOwnProperty("m")&&x("#wpo_settings_warnings").append(t.m)})},11e3),x("#wpo_import_settings_btn").on("click",function(t){var i=x("#wpo_import_settings_file"),e=i.val(),o=i[0].files[0],n=new FileReader;return x("#wpo_import_settings_btn").prop("disabled",!0),/\.json$/.test(e)?(n.onload=function(){h(this.result)},n.readAsText(o),!1):(t.preventDefault(),x("#wpo_import_settings_btn").prop("disabled",!1),x("#wpo_import_error_message").text(wpoptimize.please_select_settings_file).slideDown(),!1)}),x("#wpo_import_settings_file").on("change",function(){x("#wpo_import_error_message").slideUp()}),x("#wpo_export_settings_btn").on("click",function(t){return z(n("object")),!1});var H=function(i,e,o){t("get_optimization_info",{optimization_id:e,data:o},function(t){var o=t&&t.result&&t.result.meta?t.result.meta:{},n=t&&t.result&&t.result.output?t.result.output.join("<br>"):"...";x(document).trigger(["optimization_get_info_",e].join(""),n),i.html(n),o.finished?x(document).trigger(["optimization_get_info_",e,"_done"].join(""),t):setTimeout(function(){H(i,e,o)},1)})};return x(document).ready(function(){x(".wp-optimize-optimization-info-ajax").each(function(){var t=x(this),i=t.parent(),e=t.data("id");x(document).trigger(["optimization_get_info_",e,"_start"].join("")),H(i,e,{support_ajax_get_info:!0})})}),x("#wpoptimize_table_list").on("click",".run-single-table-repair",function(){var i=x(this),e=i.next(),o=e.next(),n=i.data("table"),a={optimization_id:"repairtables",optimization_table:n};e.removeClass("visibility-hidden"),t("do_optimization",{optimization_id:"repairtables",data:a},function(t){if(t.result.meta.success){var a=i.closest("tr"),s=t.result.meta.tableinfo;i.prop("disabled",!1),e.addClass("visibility-hidden"),o.show().removeClass("visibility-hidden"),x("td:eq(2)",a).text(s.rows),x("td:eq(3)",a).text(s.data_size),x("td:eq(4)",a).text(s.index_size),x("td:eq(5)",a).text(s.type),s.is_optimizable?x("td:eq(6)",a).html(['<span color="',s.overhead>0?"#0000FF":"#004600",'">',s.overhead,"</span>"].join("")):x("td:eq(6)",a).html('<span color="#0000FF">-</span>'),setTimeout(function(){var t=i.closest("td"),e=i.closest(".wpo_button_wrap");e.fadeOut("fast",function(){e.closest(".wpo_button_wrap").remove(),s.is_optimizable&&x(".wpo_button_wrap",t).removeClass("wpo_hidden")}),v()},1e3)}else i.prop("disabled",!1),e.addClass("visibility-hidden"),alert(wpoptimize.table_was_not_repaired.replace("%s",n))})}),v(),setTimeout(function(){t("check_overdue_crons",null,function(t){t&&t.hasOwnProperty("m")&&x("#wpo_settings_warnings").append(t.m)})},11e3),{send_command:t,optimization_get_info:H,take_a_backup_with_updraftplus:c,save_auto_backup_options:d}};jQuery(document).ready(function(t){function i(i){var e=["#",i.data("additional")].join("");i.is(":checked")?t(e).show():t(e).hide()}function e(){var i=t("#wp-optimize-logger-settings .save_settings_reminder");i.is(":visible")||i.slideDown("normal")}function o(){t(".wpo_logger_type").each(function(){n(t(this))})}function n(i){var e,o,n=a();for(e in n)o=n[e],wpoptimize.loggers_classes_info[o].allow_multiple?t('option[value="'+o+'"]',i).show():t('option[value="'+o+'"]',i).hide()}function a(){var i=[];return t(".wpo_logging_row, .wpo_logger_type").each(function(){var e=t(this).is("select")?t(this).val():t(this).data("id");e&&i.push(e)}),i}function s(){var t,i=['<option value="">Select destination</option>'];for(t in wpoptimize.loggers_classes_info)wpoptimize.loggers_classes_info.hasOwnProperty(t)&&i.push(['<option value="',t,'">',wpoptimize.loggers_classes_info[t].description,"</option>"].join(""));return['<div class="wpo_add_logger_form">','<select class="wpo_logger_type" name="wpo-logger-type[]">',i.join(""),"<select>",'<a href="#" class="wpo_delete_logger dashicons dashicons-no-alt"></a>','<div class="wpo_additional_logger_options"></div>',"</div>"].join("")}function p(i){if(!wpoptimize.loggers_classes_info[i].options)return"";var e,o=wpoptimize.loggers_classes_info[i].options,n=[],a="",s="";for(e in o)o.hasOwnProperty(e)&&(t.isArray(o[e])?(a=t.trim(o[e][0]),s=t.trim(o[e][1])):(a=t.trim(o[e]),s=""),n.push(['<input class="wpo_logger_addition_option" type="text" name="wpo-logger-options[',e,'][]" value="" ','placeholder="',a,'" ',""!==s?'data-validate="'+s+'"':"","/>"].join("")));return n.push('<input type="hidden" name="wpo-logger-options[active][]" value="1" />'),n.join("")}t(".wp-optimize-logging-settings").each(function(){var e=t(this);i(e),e.on("change",function(){i(e)})});var r=t("#wpo_add_logger_link");r.on("click",function(){t("#wp-optimize-logger-settings .save_settings_reminder").after(s()),n(t(".wpo_logger_type").first())}),t("#wp-optimize-nav-tab-contents-settings").on("change",".wpo_logger_type",function(){var i=t(this),o=i.val(),n=i.parent().find(".wpo_additional_logger_options");n.html(p(o)),i.val()&&e()}),t(".wpo_logging_actions_row .dashicons-edit").on("click",function(){var i=t(this),e=i.closest(".wpo_logging_row");return t(".wpo_additional_logger_options",e).removeClass("wpo_hidden"),t(".wpo_logging_options_row",e).text(""),t(".wpo_logging_status_row",e).text(""),i.hide(),!1}),t("#wp-optimize-logger-settings").on("change",".wpo_logger_addition_option",function(){e()}),t(".wpo_logger_active_checkbox").on("change",function(){var i=t(this),e=i.closest("label").find('input[type="hidden"]');e.val(i.is(":checked")?"1":"0")}),t("#wp-optimize-nav-tab-contents-settings").on("click",".wpo_delete_logger",function(){if(!confirm(wpoptimize.are_you_sure_you_want_to_remove_logging_destination))return!1;var i=t(this);return i.closest(".wpo_logging_row, .wpo_add_logger_form").remove(),o(),0==t("#wp-optimize-logging-options .wpo_logging_row").length&&t("#wp-optimize-logging-options").hide(),e(),!1})});
|
1 |
+
wp_optimize_send_command_admin_ajax=function(t,i,e,o){o="undefined"==typeof o||o;var n={action:"wp_optimize_ajax",subaction:t,nonce:wp_optimize_ajax_nonce,data:i};jQuery.post(ajaxurl,n,function(t){if(o){try{var i=JSON.parse(t)}catch(n){return console.log(n),console.log(t),void alert(wpoptimize.error_unexpected_response)}"undefined"!=typeof e&&e(i)}else"undefined"!=typeof e&&e(t)})},jQuery(document).ready(function(t){WP_Optimize=WP_Optimize(wp_optimize_send_command_admin_ajax)});var WP_Optimize=function(t){function i(){if(x("#enable-schedule").length){var t=x("#enable-schedule").is(":checked");t?x("#wp-optimize-auto-options").css("opacity","1"):x("#wp-optimize-auto-options").css("opacity","0.5")}}function e(t,i,e){i="undefined"==typeof i?"#wp-optimize-wrap":i,e="undefined"==typeof e?15:e,x(t).hide().prependTo(i).slideDown("slow").delay(1e3*e).slideUp("slow",function(){x(this).remove()})}function o(i,o){var n={type:i,enable:o?1:0};x("#"+i+"_spinner").show(),t("enable_or_disable_feature",n,function(t){if(x("#"+i+"_spinner").hide(),t&&t.hasOwnProperty("output"))for(var o=0,n=t.output.length;o<n;o++){var a='<div class="updated">'+t.output[o]+"</div>";e(a,"#actions-results-area")}})}function n(t){var i="",t="undefined"==typeof t?"string":t;return"object"==t?i=x("#wp-optimize-nav-tab-contents-settings form input[name!='action'], #wp-optimize-nav-tab-contents-settings form textarea, #wp-optimize-nav-tab-contents-settings form select, #wp-optimize-nav-tab-contents-optimize input[type='checkbox'], .wp-optimize-nav-tab-contents input[name^='enable-auto-backup-']").serializeJSON({useIntKeysAsArrayIndex:!0}):(i=x("#wp-optimize-nav-tab-contents-settings form input[name!='action'], #wp-optimize-nav-tab-contents-settings form textarea, #wp-optimize-nav-tab-contents-settings form select, #wp-optimize-nav-tab-contents-optimize input[type='checkbox'], .wp-optimize-nav-tab-contents input[name^='enable-auto-backup-']").serialize(),x.each(x('#wp-optimize-nav-tab-contents-settings form input[type=checkbox], .wp-optimize-nav-tab-contents input[name^="enable-auto-backup-"]').filter(function(t){return 0==x(this).prop("checked")}),function(t,e){var o="0";i+="&"+x(e).attr("name")+"="+o})),i}function a(){t("optimizations_done",{},function(){})}function s(){if(!O.get_lock())return void(j>0&&console.log("WP-Optimize: process_queue(): queue is currently locked - exiting"));j>0&&console.log("WP-Optimize: process_queue(): got queue lock");var i=O.peek();return"object"==typeof i?(data=i,i=i.optimization_id):data={},"undefined"==typeof i?(j>0&&console.log("WP-Optimize: process_queue(): queue is apparently empty - exiting"),O.unlock(),void a()):(j>0&&console.log("WP-Optimize: process_queue(): processing item: "+i),O.dequeue(),x(document).trigger(["do_optimization_",i,"_start"].join("")),void t("do_optimization",{optimization_id:i,data:data},function(t){if(x("#optimization_spinner_"+i).hide(),x("#optimization_checkbox_"+i).show(),x(".optimization_button_"+i).prop("disabled",!1),x(document).trigger(["do_optimization_",i,"_done"].join(""),t),t){for(var e="",o=0,n=t.errors.length;o<n;o++)e+='<span class="error">'+t.errors[o]+"</span><br>";for(var o=0,n=t.messages.length;o<n;o++)e+=t.errors[o]+"<br>";for(var o=0,n=t.result.output.length;o<n;o++)e+=t.result.output[o]+"<br>";if(x("#optimization_info_"+i).html(e),t.hasOwnProperty("status_box_contents")&&x("#wp_optimize_status_box").css("opacity","1").find(".inside").html(t.status_box_contents),t.hasOwnProperty("table_list")&&x("#wpoptimize_table_list tbody").html(x(t.table_list).find("tbody").html()),t.hasOwnProperty("total_size")&&x("#optimize_current_db_size").html(t.total_size),"optimizetables"==i&&data.optimization_table&&(O.is_empty()?(x("#optimization_spinner_"+i).hide(),x("#optimization_checkbox_"+i).show(),x(".optimization_button_"+i).prop("disabled",!1),x("#optimization_info_"+i).html(wpoptimize.optimization_complete)):(x("#optimization_checkbox_"+i).hide(),x("#optimization_spinner_"+i).show(),x(".optimization_button_"+i).prop("disabled",!0))),t.result.meta&&t.result.meta.hasOwnProperty("awaiting_mod")){var a=t.result.meta.awaiting_mod;a>0?x("#adminmenu .awaiting-mod .pending-count").remove(a):x("#adminmenu .awaiting-mod").remove()}}setTimeout(function(){O.unlock(),s()},10)}))}function p(t){var i=x("#wp-optimize-nav-tab-contents-optimize .wp-optimize-settings-"+t);if(i||console.log("do_optimization: row corresponding to this optimization ("+t+") not found"),1!=x(".optimization_button_"+t).prop("disabled")){if(x("#optimization_checkbox_"+t).hide(),x("#optimization_spinner_"+t).show(),x(".optimization_button_"+t).prop("disabled",!0),x("#optimization_info_"+t).html("..."),"optimizetables"==t){var e=x("#wpoptimize_table_list #the-list tr");x(e).each(function(i){var e=x(this).find("td");if(table_type=e.eq(5).text(),table=e.eq(1).text(),optimizable=e.eq(5).data("optimizable"),""!=table&&("1"==optimizable||B)){var o={optimization_id:t,optimization_table:e.eq(1).text(),optimization_table_type:table_type,optimization_force:B};O.enqueue(o)}})}else O.enqueue(t);s()}}function r(i){x("#wpo_settings_sites_list").length?t("save_site_settings",{"wpo-sites":l()},function(){i&&i()}):i&&i()}function l(){var t=[];return x('#wpo_settings_sites_list input[type="checkbox"]').each(function(){var i=x(this);i.is(":checked")&&t.push(i.attr("value"))}),t}function _(){var t=!1;x("#enable-auto-backup").is(":checked")&&(t=!0),d(),1==t?c(f):f()}function c(t){"function"==typeof updraft_backupnow_inpage_go?updraft_backupnow_inpage_go(function(){x("#updraft-backupnow-inpage-modal").dialog("close"),t&&t()},"","autobackup",0,1,0,wpoptimize.automatic_backup_before_optimizations):t&&t()}function d(){var i=n("object");i.auto_backup=x("#enable-auto-backup").is(":checked"),t("save_auto_backup_option",i)}function u(t,i,e,o){t.on("click",function(){return i.hasClass("wpo_always_visible")||i.toggleClass("wpo_hidden"),!1}),e.on("change",function(){e.is(":checked")?o.prop("checked",!0):o.prop("checked",!1),m(e,o)}),o.on("change",function(){m(e,o)}),m(e,o)}function m(t,i){var e=0,o=0;if(i.each(function(){x(this).is(":checked")&&o++,e++}),t.next().is("label")&&t.next().data("label")){var n=t.next(),a=n.data("label");e==o?n.text(a):n.text(a.replace("all",[o," of ",e].join("")))}e==o?t.prop("checked",!0):t.prop("checked",!1)}function f(){$optimizations=x("#optimizations_list .optimization_checkbox:checked"),$optimizations.sort(function(t,i){return t=x(t).closest(".wp-optimize-settings").data("optimization_run_sort_order"),i=x(i).closest(".wp-optimize-settings").data("optimization_run_sort_order"),t>i?1:t<i?-1:0});var i={};$optimizations.each(function(t){var e=x(this).closest(".wp-optimize-settings").data("optimization_id");return e?(i[e]={active:1},void p(e)):void console.log("Optimization ID corresponding to pressed button not found")}),t("save_manual_run_optimization_options",i)}function g(t){x(".run-single-table-optimization").each(function(){var i=x(this);i.data("disabled")&&(t?i.prop("disabled",!1):i.prop("disabled",!0))})}function w(t){var i,e,o;if(t)for(i in t)t.hasOwnProperty(i)&&(e=["#wp-optimize-settings-",t[i].dom_id].join(""),o=t[i].info?t[i].info.join("<br>"):"",x(e+" .wp-optimize-settings-optimization-info").html(o))}function b(){var i=["",l().join("_")].join("");G.hasOwnProperty(i)?w(G[i]):t("get_optimizations_info",{"wpo-sites":l()},function(t){t&&(G[i]=t,w(t))})}function h(i){var e=x("#wpo_import_spinner"),o=x("#wpo_import_success_message"),n=x("#wpo_import_error_message");e.show(),t("import_settings",{settings:i},function(t){e.hide(),t&&t.errors&&t.errors.length?(n.text(t.errors.join("<br>")),n.slideDown()):t&&t.messages&&t.messages.length&&(o.text(t.messages.join("<br>")),o.slideDown(),setTimeout(function(){window.location.reload()},500)),x("#wpo_import_settings_btn").prop("disabled",!1)})}function z(t,i){var e=document.body.appendChild(document.createElement("a")),o=new Date,n=o.getFullYear(),a=o.getMonth()<10?["0",o.getMonth()].join(""):o.getMonth(),s=o.getDay()<10?["0",o.getDay()].join(""):o.getDay();i=i?i:["wpo-settings-",n,"-",a,"-",s,".json"].join(""),e.setAttribute("download",i),e.setAttribute("style","display:none;"),e.setAttribute("href","data:text/json;charset=UTF-8,"+encodeURIComponent(JSON.stringify(t))),e.click()}function v(){var t=x("#wpoptimize_table_list"),i=!0;x("tr",t).each(function(){var t=x(this);if(x("button",t).length>0)return i=!1,!1}),x("tr",t).each(function(){var t=x(this);i?x("td:last, th:last",t).hide():x("td:last, th:last",t).show()})}function y(){var t=!0;return x(".wpo_logger_addition_option, .wpo_logger_type").each(function(){k(x(this),!0)?x(this).removeClass("wpo_error_field"):(t=!1,x(this).addClass("wpo_error_field"))}),t?x("#wp-optimize-logger-settings .save_settings_reminder").slideUp():x("#wp-optimize-settings-save-results").show().addClass("wpo_alert_notice").text(wpoptimize.fill_all_settings_fields).delay(5e3).fadeOut(3e3,function(){x(this).removeClass("wpo_alert_notice")}),t}function k(t,i){var e=t.val(),o=t.data("validate");if(!o&&i)return""!=x.trim(e);if(o&&!i&&""==x.trim(e))return!0;var n=!0;switch(o){case"email":for(var a=/\S+@\S+\.\S+/,s=e.split(","),p="",r=0;r<s.length;r++)p=x.trim(s[r]),""!=p&&a.test(p)||(n=!1);break;case"url":var a=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i;n=a.test(e)}return n}var x=jQuery,j=0,O=new Updraft_Queue;i(),x("#enable-schedule").change(function(){i()});var P=x("#wpoptimize_table_list_filter"),q=x("#wpoptimize_table_list"),C=x("#wpoptimize_table_list tbody:last"),D=x("#wpoptimize_table_list_tables_not_found");x(function(){q.tablesorter({theme:"default",widgets:["zebra","rows","filter"],cssInfoBlock:"tablesorter-no-sort",headers:{7:{sorter:!1}},widgetOptions:{filter_external:P,filter_defaultFilter:{2:"~{query}"}}}),q.on("filterEnd",function(){var t=x.trim(P.val());""==t?C.show():C.hide(),0==x("#the-list tr:visible",q).length?D.show():D.hide()})}),x("#wp-optimize-disable-enable-trackbacks-enable").click(function(){o("trackbacks",!0)}),x("#wp-optimize-disable-enable-trackbacks-disable").click(function(){o("trackbacks",!1)}),x("#wp-optimize-disable-enable-comments-enable").click(function(){o("comments",!0)}),x("#wp-optimize-disable-enable-comments-disable").click(function(){o("comments",!1)}),x("#wp-optimize-nav-tab-wrapper .nav-tab").click(function(t){var i=x(this).attr("id");if(i&&"wp-optimize-nav-tab-"==i.substring(0,20)){var i=i.substring(20);t.preventDefault(),x("#wp-optimize-nav-tab-wrapper .nav-tab:not(#wp-optimize-nav-tab-"+i+")").removeClass("nav-tab-active"),x(this).addClass("nav-tab-active"),x("#wp-optimize-wrap .wp-optimize-nav-tab-contents:not(#wp-optimize-nav-tab-contents-"+i+")").hide(),x("#wp-optimize-nav-tab-contents-"+i).show(),"tables"==i&&x("#wpoptimize_table_list").trigger("applyWidgets")}}),x("#wp-optimize-nav-tab-contents-optimize").on("click","button.wp-optimize-settings-optimization-run-button",function(){var t=x(this).closest(".wp-optimize-settings").data("optimization_id");return t?void(1!=x(".optimization_button_"+t).prop("disabled")&&(x(".optimization_button_"+t).prop("disabled",!0),r(function(){x(".optimization_button_"+t).prop("disabled",!1),p(t)}))):void console.log("Optimization ID corresponding to pressed button not found")}),x("#wp-optimize-nav-tab-contents-optimize").on("click","#wp-optimize",function(t){var i=x(this);t.preventDefault(),i.prop("disabled",!0),r(function(){i.prop("disabled",!1),_()})});var S=x("#wpo_settings_sites_list"),T=S.find("ul").first(),W=x('input[type="checkbox"]',T),A=S.find("#wpo_all_sites"),F=x("#wpo_sitelist_show_moreoptions"),I=x("#wpo_sitelist_moreoptions"),U=x("#wpo_settings_sites_list_cron"),Q=U.find("ul").first(),$=x('input[type="checkbox"]',Q),J=U.find("#wpo_all_sites_cron"),M=x("#wpo_sitelist_show_moreoptions_cron"),N=x("#wpo_sitelist_moreoptions_cron");u(F,I,A,W);var E=0;x([A,W]).each(function(){x(this).on("change",function(){E++,setTimeout(function(){E--,0==E&&b()},1e3)})}),u(M,N,J,$),x("#wp_optimize_table_list_refresh").click(function(){x("#wpoptimize_table_list tbody").css("opacity","0.5"),t("get_table_list",!1,function(t){if(t.hasOwnProperty("table_list")){var i=!0,e=function(t){x("#wpoptimize_table_list tbody").css("opacity","1")};x("#wpoptimize_table_list").trigger("updateAll",[i,e])}t.hasOwnProperty("total_size")&&x("#optimize_current_db_size").html(t.total_size),g(Y.is(":checked"))})}),x("#settings_form").on("click","#wp-optimize-settings-save",function(i){if(!y())return!1;i.preventDefault(),x("#save_spinner").show();var o=n();t("save_settings",o,function(t){if(x("#save_spinner").hide(),x("#save_done").show().delay(5e3).fadeOut(),t&&t.hasOwnProperty("save_results")&&t.save_results&&t.save_results.hasOwnProperty("errors")){for(var i=0,o=t.save_results.errors.length;i<o;i++){var n='<div class="error">'+t.errors[i]+"</div>";e(n,"#wp-optimize-settings-save-results")}console.log(t.save_results.messages)}t&&t.hasOwnProperty("status_box_contents")&&x("#wp_optimize_status_box .inside").html(t.status_box_contents),t&&t.hasOwnProperty("optimizations_table")&&x("#optimizations_list").replaceWith(t.optimizations_table),t.save_results.refresh&&location.reload()})}),x("#wp_optimize_status_box").on("click","#wp_optimize_status_box_refresh",function(i){i.preventDefault(),x("#wp_optimize_status_box").css("opacity","0.5"),t("get_status_box_contents",null,function(t){x("#wp_optimize_status_box").css("opacity","1").find(".inside").html(t)})});var R=x("#innodb_force_optimize"),B=R.is(":checked"),K=R.closest("tr"),Y=x("#innodb_force_optimize_single");R.on("change",function(){x('button, input[type="checkbox"]',K).each(function(){B=R.is(":checked");var t=x(this);t.data("disabled")&&(B?t.prop("disabled",!1):t.prop("disabled",!0))})}),x("#wpoptimize_table_list").on("click",".run-single-table-optimization",function(){var i=x(this),e=i.next(),o=e.next(),n=i.data("table"),a=i.data("type"),s={optimization_id:"optimizetables",optimization_table:n,optimization_table_type:a};Y.is(":checked")&&(s.optimization_force=!0),e.removeClass("visibility-hidden"),t("do_optimization",{optimization_id:"optimizetables",data:s},function(){i.prop("disabled",!1),e.addClass("visibility-hidden"),o.show().removeClass("visibility-hidden").delay(3e3).fadeOut("slow")})}),Y.change(function(){g(Y.is(":checked"))}),g(Y.is(":checked"));var G={};setTimeout(function(){t("check_overdue_crons",null,function(t){t&&t.hasOwnProperty("m")&&x("#wpo_settings_warnings").append(t.m)})},11e3),x("#wpo_import_settings_btn").on("click",function(t){var i=x("#wpo_import_settings_file"),e=i.val(),o=i[0].files[0],n=new FileReader;return x("#wpo_import_settings_btn").prop("disabled",!0),/\.json$/.test(e)?(n.onload=function(){h(this.result)},n.readAsText(o),!1):(t.preventDefault(),x("#wpo_import_settings_btn").prop("disabled",!1),x("#wpo_import_error_message").text(wpoptimize.please_select_settings_file).slideDown(),!1)}),x("#wpo_import_settings_file").on("change",function(){x("#wpo_import_error_message").slideUp()}),x("#wpo_export_settings_btn").on("click",function(t){return z(n("object")),!1});var H=function(i,e,o){t("get_optimization_info",{optimization_id:e,data:o},function(t){var o=t&&t.result&&t.result.meta?t.result.meta:{},n=t&&t.result&&t.result.output?t.result.output.join("<br>"):"...";x(document).trigger(["optimization_get_info_",e].join(""),n),i.html(n),o.finished?x(document).trigger(["optimization_get_info_",e,"_done"].join(""),t):setTimeout(function(){H(i,e,o)},1)})};return x(document).ready(function(){x(".wp-optimize-optimization-info-ajax").each(function(){var t=x(this),i=t.parent(),e=t.data("id");x(document).trigger(["optimization_get_info_",e,"_start"].join("")),H(i,e,{support_ajax_get_info:!0})})}),x("#wpoptimize_table_list").on("click",".run-single-table-repair",function(){var i=x(this),e=i.next(),o=e.next(),n=i.data("table"),a={optimization_id:"repairtables",optimization_table:n};e.removeClass("visibility-hidden"),t("do_optimization",{optimization_id:"repairtables",data:a},function(t){if(t.result.meta.success){var a=i.closest("tr"),s=t.result.meta.tableinfo;i.prop("disabled",!1),e.addClass("visibility-hidden"),o.show().removeClass("visibility-hidden"),x("td:eq(2)",a).text(s.rows),x("td:eq(3)",a).text(s.data_size),x("td:eq(4)",a).text(s.index_size),x("td:eq(5)",a).text(s.type),s.is_optimizable?x("td:eq(6)",a).html(['<span color="',s.overhead>0?"#0000FF":"#004600",'">',s.overhead,"</span>"].join("")):x("td:eq(6)",a).html('<span color="#0000FF">-</span>'),setTimeout(function(){var t=i.closest("td"),e=i.closest(".wpo_button_wrap");e.fadeOut("fast",function(){e.closest(".wpo_button_wrap").remove(),s.is_optimizable&&x(".wpo_button_wrap",t).removeClass("wpo_hidden")}),v()},1e3)}else i.prop("disabled",!1),e.addClass("visibility-hidden"),alert(wpoptimize.table_was_not_repaired.replace("%s",n))})}),v(),setTimeout(function(){t("check_overdue_crons",null,function(t){t&&t.hasOwnProperty("m")&&x("#wpo_settings_warnings").append(t.m)})},11e3),{send_command:t,optimization_get_info:H,take_a_backup_with_updraftplus:c,save_auto_backup_options:d}};jQuery(document).ready(function(t){function i(i){var e=["#",i.data("additional")].join("");i.is(":checked")?t(e).show():t(e).hide()}function e(){var i=t("#wp-optimize-logger-settings .save_settings_reminder");i.is(":visible")||i.slideDown("normal")}function o(){t(".wpo_logger_type").each(function(){n(t(this))})}function n(i){var e,o,n=a();for(e in n)o=n[e],wpoptimize.loggers_classes_info[o].allow_multiple?t('option[value="'+o+'"]',i).show():t('option[value="'+o+'"]',i).hide()}function a(){var i=[];return t(".wpo_logging_row, .wpo_logger_type").each(function(){var e=t(this).is("select")?t(this).val():t(this).data("id");e&&i.push(e)}),i}function s(){var t,i=['<option value="">Select destination</option>'];for(t in wpoptimize.loggers_classes_info)wpoptimize.loggers_classes_info.hasOwnProperty(t)&&wpoptimize.loggers_classes_info[t].available&&i.push(['<option value="',t,'">',wpoptimize.loggers_classes_info[t].description,"</option>"].join(""));return['<div class="wpo_add_logger_form">','<select class="wpo_logger_type" name="wpo-logger-type[]">',i.join(""),"<select>",'<a href="#" class="wpo_delete_logger dashicons dashicons-no-alt"></a>','<div class="wpo_additional_logger_options"></div>',"</div>"].join("")}function p(i){if(!wpoptimize.loggers_classes_info[i].options)return"";var e,o=wpoptimize.loggers_classes_info[i].options,n=[],a="",s="";for(e in o)o.hasOwnProperty(e)&&(t.isArray(o[e])?(a=t.trim(o[e][0]),s=t.trim(o[e][1])):(a=t.trim(o[e]),s=""),n.push(['<input class="wpo_logger_addition_option" type="text" name="wpo-logger-options[',e,'][]" value="" ','placeholder="',a,'" ',""!==s?'data-validate="'+s+'"':"","/>"].join("")));return n.push('<input type="hidden" name="wpo-logger-options[active][]" value="1" />'),n.join("")}t(".wp-optimize-logging-settings").each(function(){var e=t(this);i(e),e.on("change",function(){i(e)})});var r=t("#wpo_add_logger_link");r.on("click",function(){t("#wp-optimize-logger-settings .save_settings_reminder").after(s()),n(t(".wpo_logger_type").first())}),t("#wp-optimize-nav-tab-contents-settings").on("change",".wpo_logger_type",function(){var i=t(this),o=i.val(),n=i.parent().find(".wpo_additional_logger_options");n.html(p(o)),i.val()&&e()}),t(".wpo_logging_actions_row .dashicons-edit").on("click",function(){var i=t(this),e=i.closest(".wpo_logging_row");return t(".wpo_additional_logger_options",e).removeClass("wpo_hidden"),t(".wpo_logging_options_row",e).text(""),t(".wpo_logging_status_row",e).text(""),i.hide(),!1}),t("#wp-optimize-logger-settings").on("change",".wpo_logger_addition_option",function(){e()}),t(".wpo_logger_active_checkbox").on("change",function(){var i=t(this),e=i.closest("label").find('input[type="hidden"]');e.val(i.is(":checked")?"1":"0")}),t("#wp-optimize-nav-tab-contents-settings").on("click",".wpo_delete_logger",function(){if(!confirm(wpoptimize.are_you_sure_you_want_to_remove_logging_destination))return!1;var i=t(this);return i.closest(".wpo_logging_row, .wpo_add_logger_form").remove(),o(),0==t("#wp-optimize-logging-options .wpo_logging_row").length&&t("#wp-optimize-logging-options").hide(),e(),!1})});
|
languages/wp-optimize.pot
CHANGED
@@ -25,7 +25,7 @@ msgstr ""
|
|
25 |
msgid "Please upload a valid settings file."
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: src/includes/class-updraft-abstract-logger.php:
|
29 |
msgid "Placeholder"
|
30 |
msgstr ""
|
31 |
|
@@ -61,19 +61,19 @@ msgstr ""
|
|
61 |
msgid "No such optimization"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: src/includes/class-wp-optimizer.php:
|
65 |
msgid "Comments have now been disabled on all current and previously published posts."
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: src/includes/class-wp-optimizer.php:
|
69 |
msgid "Comments have now been enabled on all current and previously published posts."
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: src/includes/class-wp-optimizer.php:
|
73 |
msgid "Trackbacks have now been disabled on all current and previously published posts."
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: src/includes/class-wp-optimizer.php:
|
77 |
msgid "Trackbacks have now been enabled on all current and previously published posts."
|
78 |
msgstr ""
|
79 |
|
@@ -114,15 +114,15 @@ msgid "WP-Optimize Premium features an advanced scheduling system that allows yo
|
|
114 |
msgstr ""
|
115 |
|
116 |
#: src/includes/wp-optimize-notices.php:104
|
117 |
-
msgid "Manage a
|
118 |
msgstr ""
|
119 |
|
120 |
#: src/includes/wp-optimize-notices.php:105
|
121 |
-
msgid "WP-Optimize Premium's
|
122 |
msgstr ""
|
123 |
|
124 |
#: src/includes/wp-optimize-notices.php:115
|
125 |
-
msgid "WP-Optimize Premium offers
|
126 |
msgstr ""
|
127 |
|
128 |
#: src/includes/wp-optimize-notices.php:116
|
@@ -744,11 +744,11 @@ msgid "Yes"
|
|
744 |
msgstr ""
|
745 |
|
746 |
#: src/templates/may-also-like.php:54, src/templates/may-also-like.php:55
|
747 |
-
msgid "
|
748 |
msgstr ""
|
749 |
|
750 |
#: src/templates/may-also-like.php:56
|
751 |
-
msgid "Carries out
|
752 |
msgstr ""
|
753 |
|
754 |
#: src/templates/may-also-like.php:67, src/templates/may-also-like.php:68
|
@@ -1078,74 +1078,74 @@ msgid "MySQL"
|
|
1078 |
msgstr ""
|
1079 |
|
1080 |
#: src/templates/status-box-contents.php:25
|
1081 |
-
msgid "Last
|
1082 |
msgstr ""
|
1083 |
|
1084 |
#: src/templates/status-box-contents.php:30
|
1085 |
-
msgid "There was no
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: src/templates/status-box-contents.php:
|
1089 |
msgid "Scheduled cleaning enabled"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: src/templates/status-box-contents.php:
|
1093 |
msgid "Next schedule:"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: src/templates/status-box-contents.php:
|
1097 |
msgid "Refresh"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: src/templates/status-box-contents.php:
|
1101 |
msgid "Scheduled cleaning disabled"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: src/templates/status-box-contents.php:
|
1105 |
msgid "Keeping last %s weeks data"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
-
#: src/templates/status-box-contents.php:
|
1109 |
msgid "Not keeping recent data"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
-
#: src/templates/status-box-contents.php:
|
1113 |
msgid "Current database size:"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
-
#: src/templates/status-box-contents.php:
|
1117 |
msgid "You have saved:"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
-
#: src/templates/status-box-contents.php:
|
1121 |
msgid "You can save around:"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
-
#: src/templates/status-box-contents.php:
|
1125 |
msgid "Total clean up overall:"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: src/templates/status-box-contents.php:
|
1129 |
msgid "Support and feedback"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: src/templates/status-box-contents.php:
|
1133 |
msgid "If you like WP-Optimize,"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
-
#: src/templates/status-box-contents.php:
|
1137 |
msgid "please give us a positive review, here."
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: src/templates/status-box-contents.php:
|
1141 |
msgid "Or, if you did not like it,"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
-
#: src/templates/status-box-contents.php:
|
1145 |
msgid "please tell us why at this link."
|
1146 |
msgstr ""
|
1147 |
|
1148 |
-
#: src/templates/status-box-contents.php:
|
1149 |
msgid "Support is available here."
|
1150 |
msgstr ""
|
1151 |
|
@@ -1235,134 +1235,134 @@ msgstr ""
|
|
1235 |
msgid "Please update UpdraftPlus to the latest version."
|
1236 |
msgstr ""
|
1237 |
|
1238 |
-
#: src/wp-optimize.php:
|
1239 |
msgid "WP-Optimize (Free) has been de-activated, because WP-Optimize Premium is active."
|
1240 |
msgstr ""
|
1241 |
|
1242 |
-
#: src/wp-optimize.php:
|
1243 |
msgid "New feature: WP-Optimize Premium can now optimize all sites within a multisite install, not just the main one."
|
1244 |
msgstr ""
|
1245 |
|
1246 |
-
#: src/wp-optimize.php:
|
1247 |
msgid "Table information"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
-
#: src/wp-optimize.php:
|
1251 |
msgid "Settings"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
-
#: src/wp-optimize.php:
|
1255 |
msgid "Premium / Plugin family"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
-
#: src/wp-optimize.php:
|
1259 |
msgid "Automatic backup before optimizations"
|
1260 |
msgstr ""
|
1261 |
|
1262 |
-
#: src/wp-optimize.php:
|
1263 |
msgid "An unexpected response was received."
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: src/wp-optimize.php:
|
1267 |
msgid "Optimization complete"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: src/wp-optimize.php:
|
1271 |
msgid "Run optimizations"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
-
#: src/wp-optimize.php:
|
1275 |
msgid "Cancel"
|
1276 |
msgstr ""
|
1277 |
|
1278 |
-
#: src/wp-optimize.php:
|
1279 |
msgid "Please, select settings file."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
-
#: src/wp-optimize.php:
|
1283 |
msgid "Are you sure you want to remove this logging destination?"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
-
#: src/wp-optimize.php:
|
1287 |
msgid "Before saving, you need to complete the currently incomplete settings (or remove them)."
|
1288 |
msgstr ""
|
1289 |
|
1290 |
-
#: src/wp-optimize.php:
|
1291 |
msgid "%s was not repaired. For more details, please check your logs configured in logging destinations settings."
|
1292 |
msgstr ""
|
1293 |
|
1294 |
-
#: src/wp-optimize.php:
|
1295 |
msgid "Optimize"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
-
#: src/wp-optimize.php:
|
1299 |
msgid "Optimizer"
|
1300 |
msgstr ""
|
1301 |
|
1302 |
-
#: src/wp-optimize.php:
|
1303 |
msgid "Repair"
|
1304 |
msgstr ""
|
1305 |
|
1306 |
-
#: src/wp-optimize.php:
|
1307 |
msgid "Warning"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
-
#: src/wp-optimize.php:
|
1311 |
msgid "WordPress has a number (%d) of scheduled tasks which are overdue. Unless this is a development site, this probably means that the scheduler in your WordPress install is not working."
|
1312 |
msgstr ""
|
1313 |
|
1314 |
-
#: src/wp-optimize.php:
|
1315 |
msgid "Read this page for a guide to possible causes and how to fix it."
|
1316 |
msgstr ""
|
1317 |
|
1318 |
-
#: src/wp-optimize.php:
|
1319 |
msgid "Error:"
|
1320 |
msgstr ""
|
1321 |
|
1322 |
-
#: src/wp-optimize.php:
|
1323 |
msgid "template not found"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
-
#: src/wp-optimize.php:
|
1327 |
msgid "Automatic Operation Completed"
|
1328 |
msgstr ""
|
1329 |
|
1330 |
-
#: src/wp-optimize.php:
|
1331 |
msgid "Scheduled optimization was executed at"
|
1332 |
msgstr ""
|
1333 |
|
1334 |
-
#: src/wp-optimize.php:
|
1335 |
msgid "You can safely delete this email."
|
1336 |
msgstr ""
|
1337 |
|
1338 |
-
#: src/wp-optimize.php:
|
1339 |
msgid "Regards,"
|
1340 |
msgstr ""
|
1341 |
|
1342 |
-
#: src/wp-optimize.php:
|
1343 |
msgid "WP-Optimize Plugin"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
-
#: src/wp-optimize.php:
|
1347 |
msgid "GB"
|
1348 |
msgstr ""
|
1349 |
|
1350 |
-
#: src/wp-optimize.php:
|
1351 |
msgid "MB"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
-
#: src/wp-optimize.php:
|
1355 |
msgid "KB"
|
1356 |
msgstr ""
|
1357 |
|
1358 |
-
#: src/wp-optimize.php:
|
1359 |
msgid "bytes"
|
1360 |
msgstr ""
|
1361 |
|
1362 |
-
#: src/wp-optimize.php:
|
1363 |
msgid "Only Network Administrator can activate WP-Optimize plugin."
|
1364 |
msgstr ""
|
1365 |
|
1366 |
-
#: src/wp-optimize.php:
|
1367 |
msgid "go back"
|
1368 |
msgstr ""
|
25 |
msgid "Please upload a valid settings file."
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: src/includes/class-updraft-abstract-logger.php:79
|
29 |
msgid "Placeholder"
|
30 |
msgstr ""
|
31 |
|
61 |
msgid "No such optimization"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: src/includes/class-wp-optimizer.php:454
|
65 |
msgid "Comments have now been disabled on all current and previously published posts."
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: src/includes/class-wp-optimizer.php:457
|
69 |
msgid "Comments have now been enabled on all current and previously published posts."
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: src/includes/class-wp-optimizer.php:464
|
73 |
msgid "Trackbacks have now been disabled on all current and previously published posts."
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: src/includes/class-wp-optimizer.php:467
|
77 |
msgid "Trackbacks have now been enabled on all current and previously published posts."
|
78 |
msgstr ""
|
79 |
|
114 |
msgstr ""
|
115 |
|
116 |
#: src/includes/wp-optimize-notices.php:104
|
117 |
+
msgid "Manage a multisite installation? Need extra control?"
|
118 |
msgstr ""
|
119 |
|
120 |
#: src/includes/wp-optimize-notices.php:105
|
121 |
+
msgid "WP-Optimize Premium's multisite feature includes a locking system that restricts optimization commands to users with the right permissions."
|
122 |
msgstr ""
|
123 |
|
124 |
#: src/includes/wp-optimize-notices.php:115
|
125 |
+
msgid "WP-Optimize Premium offers unparalleled choice and flexibility"
|
126 |
msgstr ""
|
127 |
|
128 |
#: src/includes/wp-optimize-notices.php:116
|
744 |
msgstr ""
|
745 |
|
746 |
#: src/templates/may-also-like.php:54, src/templates/may-also-like.php:55
|
747 |
+
msgid "Scheduled clean-ups"
|
748 |
msgstr ""
|
749 |
|
750 |
#: src/templates/may-also-like.php:56
|
751 |
+
msgid "Carries out scheduled clean-ups daily, weekly, fortnightly and monthly"
|
752 |
msgstr ""
|
753 |
|
754 |
#: src/templates/may-also-like.php:67, src/templates/may-also-like.php:68
|
1078 |
msgstr ""
|
1079 |
|
1080 |
#: src/templates/status-box-contents.php:25
|
1081 |
+
msgid "Last scheduled optimization was at"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
#: src/templates/status-box-contents.php:30
|
1085 |
+
msgid "There was no scheduled optimization"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: src/templates/status-box-contents.php:56
|
1089 |
msgid "Scheduled cleaning enabled"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: src/templates/status-box-contents.php:68
|
1093 |
msgid "Next schedule:"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: src/templates/status-box-contents.php:73
|
1097 |
msgid "Refresh"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: src/templates/status-box-contents.php:77
|
1101 |
msgid "Scheduled cleaning disabled"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: src/templates/status-box-contents.php:84
|
1105 |
msgid "Keeping last %s weeks data"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: src/templates/status-box-contents.php:87
|
1109 |
msgid "Not keeping recent data"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: src/templates/status-box-contents.php:93
|
1113 |
msgid "Current database size:"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: src/templates/status-box-contents.php:100
|
1117 |
msgid "You have saved:"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: src/templates/status-box-contents.php:104
|
1121 |
msgid "You can save around:"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: src/templates/status-box-contents.php:117
|
1125 |
msgid "Total clean up overall:"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: src/templates/status-box-contents.php:126
|
1129 |
msgid "Support and feedback"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: src/templates/status-box-contents.php:128
|
1133 |
msgid "If you like WP-Optimize,"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: src/templates/status-box-contents.php:128
|
1137 |
msgid "please give us a positive review, here."
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: src/templates/status-box-contents.php:128
|
1141 |
msgid "Or, if you did not like it,"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: src/templates/status-box-contents.php:128
|
1145 |
msgid "please tell us why at this link."
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: src/templates/status-box-contents.php:129
|
1149 |
msgid "Support is available here."
|
1150 |
msgstr ""
|
1151 |
|
1235 |
msgid "Please update UpdraftPlus to the latest version."
|
1236 |
msgstr ""
|
1237 |
|
1238 |
+
#: src/wp-optimize.php:268
|
1239 |
msgid "WP-Optimize (Free) has been de-activated, because WP-Optimize Premium is active."
|
1240 |
msgstr ""
|
1241 |
|
1242 |
+
#: src/wp-optimize.php:278
|
1243 |
msgid "New feature: WP-Optimize Premium can now optimize all sites within a multisite install, not just the main one."
|
1244 |
msgstr ""
|
1245 |
|
1246 |
+
#: src/wp-optimize.php:393
|
1247 |
msgid "Table information"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
+
#: src/wp-optimize.php:393, src/wp-optimize.php:579
|
1251 |
msgid "Settings"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
+
#: src/wp-optimize.php:393
|
1255 |
msgid "Premium / Plugin family"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
+
#: src/wp-optimize.php:522
|
1259 |
msgid "Automatic backup before optimizations"
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: src/wp-optimize.php:523
|
1263 |
msgid "An unexpected response was received."
|
1264 |
msgstr ""
|
1265 |
|
1266 |
+
#: src/wp-optimize.php:524
|
1267 |
msgid "Optimization complete"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
+
#: src/wp-optimize.php:525
|
1271 |
msgid "Run optimizations"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
+
#: src/wp-optimize.php:526
|
1275 |
msgid "Cancel"
|
1276 |
msgstr ""
|
1277 |
|
1278 |
+
#: src/wp-optimize.php:527
|
1279 |
msgid "Please, select settings file."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: src/wp-optimize.php:528
|
1283 |
msgid "Are you sure you want to remove this logging destination?"
|
1284 |
msgstr ""
|
1285 |
|
1286 |
+
#: src/wp-optimize.php:529
|
1287 |
msgid "Before saving, you need to complete the currently incomplete settings (or remove them)."
|
1288 |
msgstr ""
|
1289 |
|
1290 |
+
#: src/wp-optimize.php:530
|
1291 |
msgid "%s was not repaired. For more details, please check your logs configured in logging destinations settings."
|
1292 |
msgstr ""
|
1293 |
|
1294 |
+
#: src/wp-optimize.php:560
|
1295 |
msgid "Optimize"
|
1296 |
msgstr ""
|
1297 |
|
1298 |
+
#: src/wp-optimize.php:582
|
1299 |
msgid "Optimizer"
|
1300 |
msgstr ""
|
1301 |
|
1302 |
+
#: src/wp-optimize.php:598
|
1303 |
msgid "Repair"
|
1304 |
msgstr ""
|
1305 |
|
1306 |
+
#: src/wp-optimize.php:705
|
1307 |
msgid "Warning"
|
1308 |
msgstr ""
|
1309 |
|
1310 |
+
#: src/wp-optimize.php:705
|
1311 |
msgid "WordPress has a number (%d) of scheduled tasks which are overdue. Unless this is a development site, this probably means that the scheduler in your WordPress install is not working."
|
1312 |
msgstr ""
|
1313 |
|
1314 |
+
#: src/wp-optimize.php:705
|
1315 |
msgid "Read this page for a guide to possible causes and how to fix it."
|
1316 |
msgstr ""
|
1317 |
|
1318 |
+
#: src/wp-optimize.php:772
|
1319 |
msgid "Error:"
|
1320 |
msgstr ""
|
1321 |
|
1322 |
+
#: src/wp-optimize.php:772
|
1323 |
msgid "template not found"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
+
#: src/wp-optimize.php:824
|
1327 |
msgid "Automatic Operation Completed"
|
1328 |
msgstr ""
|
1329 |
|
1330 |
+
#: src/wp-optimize.php:826
|
1331 |
msgid "Scheduled optimization was executed at"
|
1332 |
msgstr ""
|
1333 |
|
1334 |
+
#: src/wp-optimize.php:827
|
1335 |
msgid "You can safely delete this email."
|
1336 |
msgstr ""
|
1337 |
|
1338 |
+
#: src/wp-optimize.php:829
|
1339 |
msgid "Regards,"
|
1340 |
msgstr ""
|
1341 |
|
1342 |
+
#: src/wp-optimize.php:830
|
1343 |
msgid "WP-Optimize Plugin"
|
1344 |
msgstr ""
|
1345 |
|
1346 |
+
#: src/wp-optimize.php:852
|
1347 |
msgid "GB"
|
1348 |
msgstr ""
|
1349 |
|
1350 |
+
#: src/wp-optimize.php:854
|
1351 |
msgid "MB"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: src/wp-optimize.php:856
|
1355 |
msgid "KB"
|
1356 |
msgstr ""
|
1357 |
|
1358 |
+
#: src/wp-optimize.php:858
|
1359 |
msgid "bytes"
|
1360 |
msgstr ""
|
1361 |
|
1362 |
+
#: src/wp-optimize.php:1250
|
1363 |
msgid "Only Network Administrator can activate WP-Optimize plugin."
|
1364 |
msgstr ""
|
1365 |
|
1366 |
+
#: src/wp-optimize.php:1251
|
1367 |
msgid "go back"
|
1368 |
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://david.dw-perspective.org.uk/donate
|
|
4 |
Tags: comments, spam, optimize, database, revisions, users, posts, trash, schedule, automatic, clean, phpmyadmin, meta, postmeta, responsive, mobile
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2+
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -138,11 +138,19 @@ Please check your database for corrupted tables. That can happen, usually your w
|
|
138 |
|
139 |
== Changelog ==
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
= 2.2.3 - 04/Apr/2018 =
|
142 |
|
143 |
* FEATURE: Added the ability to repair corrupted database tables
|
144 |
* FIX: Fixed dismiss notices functionality
|
145 |
-
* FIX: When detecting potentially unused images, exclude those found
|
146 |
* TWEAK: Load WPO translations (logger classes info included) when template is pulled for UpdraftCentral-WPO module
|
147 |
* TWEAK: Add get_js_translation command for the UpdraftCentral WPO module
|
148 |
* TWEAK: Added logging for fatal errors
|
@@ -397,4 +405,4 @@ Please check your database for corrupted tables. That can happen, usually your w
|
|
397 |
* Fix Interface
|
398 |
|
399 |
== Upgrade Notice ==
|
400 |
-
* 2.2.
|
4 |
Tags: comments, spam, optimize, database, revisions, users, posts, trash, schedule, automatic, clean, phpmyadmin, meta, postmeta, responsive, mobile
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.2.4
|
8 |
License: GPLv2+
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
138 |
|
139 |
== Changelog ==
|
140 |
|
141 |
+
= 2.2.4 - 07/May/2018 =
|
142 |
+
|
143 |
+
* TWEAK: Changed the term 'Automatic' to 'Scheduled'.
|
144 |
+
* TWEAK: Show correct table type for views
|
145 |
+
* TWEAK: Fixed string spelling and syntax errors
|
146 |
+
* TWEAK: Disabled Simple History logging option if plugin is not installed.
|
147 |
+
* TWEAK: Prevented PHP notices in repair tables functionality
|
148 |
+
|
149 |
= 2.2.3 - 04/Apr/2018 =
|
150 |
|
151 |
* FEATURE: Added the ability to repair corrupted database tables
|
152 |
* FIX: Fixed dismiss notices functionality
|
153 |
+
* FIX: When detecting potentially unused images, exclude those found mentioned in the options table(s)
|
154 |
* TWEAK: Load WPO translations (logger classes info included) when template is pulled for UpdraftCentral-WPO module
|
155 |
* TWEAK: Add get_js_translation command for the UpdraftCentral WPO module
|
156 |
* TWEAK: Added logging for fatal errors
|
405 |
* Fix Interface
|
406 |
|
407 |
== Upgrade Notice ==
|
408 |
+
* 2.2.4 : 2.2 has lots of new features, tweaks and fixes; including the introduction of a Premium version with even more features. 2.2.4 makes a number of small, cosmetic fixes.
|
templates/admin-settings-logging.php
CHANGED
@@ -36,7 +36,7 @@
|
|
36 |
class="dashicons dashicons-arrow-right"></span><?php echo $logger->get_description(); ?>
|
37 |
</div>
|
38 |
<div class="wpo_logging_options_row"><?php echo $logger->get_options_text(); ?></div>
|
39 |
-
<div class="wpo_logging_status_row"><?php echo ($logger->is_enabled()) ? __('Active', 'wp-optimize') : __('Inactive', 'wp-optimize'); ?></div>
|
40 |
<div class="wpo_logging_actions_row"><a href="#" class="dashicons dashicons-edit"></a><a
|
41 |
href="#" class="wpo_delete_logger dashicons dashicons-no-alt"></a></div>
|
42 |
|
@@ -73,7 +73,7 @@
|
|
73 |
?>
|
74 |
<label>
|
75 |
<input class="wpo_logger_active_checkbox"
|
76 |
-
type="checkbox" <?php checked($logger->is_enabled()); ?>>
|
77 |
<input type="hidden" name="wpo-logger-options[active][]"
|
78 |
value="<?php echo $logger->is_enabled() ? '1' : '0'; ?>"/>
|
79 |
<?php _e('Active', 'wp-optimize'); ?>
|
36 |
class="dashicons dashicons-arrow-right"></span><?php echo $logger->get_description(); ?>
|
37 |
</div>
|
38 |
<div class="wpo_logging_options_row"><?php echo $logger->get_options_text(); ?></div>
|
39 |
+
<div class="wpo_logging_status_row"><?php echo ($logger->is_enabled() && $logger->is_available()) ? __('Active', 'wp-optimize') : __('Inactive', 'wp-optimize'); ?></div>
|
40 |
<div class="wpo_logging_actions_row"><a href="#" class="dashicons dashicons-edit"></a><a
|
41 |
href="#" class="wpo_delete_logger dashicons dashicons-no-alt"></a></div>
|
42 |
|
73 |
?>
|
74 |
<label>
|
75 |
<input class="wpo_logger_active_checkbox"
|
76 |
+
type="checkbox" <?php checked($logger->is_enabled() && $logger->is_available()); ?> <?php disabled($logger->is_available(), false); ?>>
|
77 |
<input type="hidden" name="wpo-logger-options[active][]"
|
78 |
value="<?php echo $logger->is_enabled() ? '1' : '0'; ?>"/>
|
79 |
<?php _e('Active', 'wp-optimize'); ?>
|
templates/may-also-like.php
CHANGED
@@ -51,9 +51,9 @@
|
|
51 |
</tr>
|
52 |
<tr>
|
53 |
<td>
|
54 |
-
<img src="<?php echo WPO_PLUGIN_URL.'images/features/automatic-clean-ups.png';?>" alt="<?php esc_attr_e('
|
55 |
-
<h4><?php _e('
|
56 |
-
<p><?php _e('Carries out
|
57 |
</td>
|
58 |
<td>
|
59 |
<p><span class="dashicons dashicons-yes" aria-label="<?php esc_attr_e('Yes', 'wp-optimize');?>"></span></p>
|
51 |
</tr>
|
52 |
<tr>
|
53 |
<td>
|
54 |
+
<img src="<?php echo WPO_PLUGIN_URL.'images/features/automatic-clean-ups.png';?>" alt="<?php esc_attr_e('Scheduled clean-ups', 'wp-optimize');?>" class="wpo-premium-image">
|
55 |
+
<h4><?php _e('Scheduled clean-ups', 'wp-optimize');?></h4>
|
56 |
+
<p><?php _e('Carries out scheduled clean-ups daily, weekly, fortnightly and monthly', 'wp-optimize');?></p>
|
57 |
</td>
|
58 |
<td>
|
59 |
<p><span class="dashicons dashicons-yes" aria-label="<?php esc_attr_e('Yes', 'wp-optimize');?>"></span></p>
|
templates/status-box-contents.php
CHANGED
@@ -22,18 +22,36 @@ if ('Never' !== $lastopt) {
|
|
22 |
if (is_numeric($lastopt)) {
|
23 |
$lastopt = date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $lastopt + ( get_option('gmt_offset') * HOUR_IN_SECONDS ));
|
24 |
}
|
25 |
-
echo __('Last
|
26 |
echo '<span style="font-color: #004600; font-weight:bold;">';
|
27 |
echo htmlspecialchars($lastopt);
|
28 |
echo '</span>';
|
29 |
} else {
|
30 |
-
echo __('There was no
|
31 |
}
|
32 |
?>
|
33 |
<br>
|
34 |
|
35 |
<?php
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
echo '<strong><span style="font-color: #004600">';
|
38 |
_e('Scheduled cleaning enabled', 'wp-optimize');
|
39 |
echo ', </span></strong>';
|
22 |
if (is_numeric($lastopt)) {
|
23 |
$lastopt = date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $lastopt + ( get_option('gmt_offset') * HOUR_IN_SECONDS ));
|
24 |
}
|
25 |
+
echo __('Last scheduled optimization was at', 'wp-optimize').': ';
|
26 |
echo '<span style="font-color: #004600; font-weight:bold;">';
|
27 |
echo htmlspecialchars($lastopt);
|
28 |
echo '</span>';
|
29 |
} else {
|
30 |
+
echo __('There was no scheduled optimization', 'wp-optimize');
|
31 |
}
|
32 |
?>
|
33 |
<br>
|
34 |
|
35 |
<?php
|
36 |
+
|
37 |
+
$scheduled_optimizations_enabled = false;
|
38 |
+
|
39 |
+
if ($wp_optimize->is_premium()) {
|
40 |
+
$scheduled_optimizations = WP_Optimize_Premium()->get_scheduled_optimizations();
|
41 |
+
|
42 |
+
if (!empty($scheduled_optimizations)) {
|
43 |
+
foreach ($scheduled_optimizations as $optimization) {
|
44 |
+
if (1 == $optimization['status']) {
|
45 |
+
$scheduled_optimizations_enabled = true;
|
46 |
+
break;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
} else {
|
51 |
+
$scheduled_optimizations_enabled = $options->get_option('schedule', 'false') == 'true';
|
52 |
+
}
|
53 |
+
|
54 |
+
if ($scheduled_optimizations_enabled) {
|
55 |
echo '<strong><span style="font-color: #004600">';
|
56 |
_e('Scheduled cleaning enabled', 'wp-optimize');
|
57 |
echo ', </span></strong>';
|
wp-optimize.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP-Optimize
|
4 |
Plugin URI: https://getwpo.com
|
5 |
Description: WP-Optimize is WordPress's #1 most installed optimization plugin. With it, you can clean up your database easily and safely, without manual queries.
|
6 |
-
Version: 2.2.
|
7 |
Author: David Anderson, Ruhani Rabin, Team Updraft
|
8 |
Author URI: https://updraftplus.com
|
9 |
Text Domain: wp-optimize
|
@@ -15,7 +15,7 @@ if (!defined('ABSPATH')) die('No direct access allowed');
|
|
15 |
|
16 |
// Check to make sure if WP_Optimize is already call and returns.
|
17 |
if (!class_exists('WP_Optimize')) :
|
18 |
-
define('WPO_VERSION', '2.2.
|
19 |
define('WPO_PLUGIN_URL', plugin_dir_url(__FILE__));
|
20 |
define('WPO_PLUGIN_MAIN_PATH', plugin_dir_path(__FILE__));
|
21 |
define('WPO_PREMIUM_NOTIFICATION', false);
|
@@ -132,16 +132,17 @@ class WP_Optimize {
|
|
132 |
return self::$_logger_instance;
|
133 |
}
|
134 |
|
|
|
|
|
|
|
135 |
public function get_task_manager() {
|
136 |
-
include_once(WPO_PLUGIN_MAIN_PATH.'/
|
137 |
|
138 |
Updraft_Tasks_Activation::check_updates();
|
139 |
|
140 |
-
include_once(WPO_PLUGIN_MAIN_PATH . '/
|
141 |
-
include_once(WPO_PLUGIN_MAIN_PATH . '/
|
142 |
-
include_once(WPO_PLUGIN_MAIN_PATH . '/
|
143 |
-
|
144 |
-
// TODO: return here Task Manager instance in future.
|
145 |
}
|
146 |
|
147 |
/**
|
@@ -1080,6 +1081,7 @@ class WP_Optimize {
|
|
1080 |
|
1081 |
$loggers_classes_info[$logger_id] = array(
|
1082 |
'description' => $logger_class->get_description(),
|
|
|
1083 |
'allow_multiple' => $logger_class->is_allow_multiple(),
|
1084 |
'options' => $logger_class->get_options_list()
|
1085 |
);
|
3 |
Plugin Name: WP-Optimize
|
4 |
Plugin URI: https://getwpo.com
|
5 |
Description: WP-Optimize is WordPress's #1 most installed optimization plugin. With it, you can clean up your database easily and safely, without manual queries.
|
6 |
+
Version: 2.2.4
|
7 |
Author: David Anderson, Ruhani Rabin, Team Updraft
|
8 |
Author URI: https://updraftplus.com
|
9 |
Text Domain: wp-optimize
|
15 |
|
16 |
// Check to make sure if WP_Optimize is already call and returns.
|
17 |
if (!class_exists('WP_Optimize')) :
|
18 |
+
define('WPO_VERSION', '2.2.4');
|
19 |
define('WPO_PLUGIN_URL', plugin_dir_url(__FILE__));
|
20 |
define('WPO_PLUGIN_MAIN_PATH', plugin_dir_path(__FILE__));
|
21 |
define('WPO_PREMIUM_NOTIFICATION', false);
|
132 |
return self::$_logger_instance;
|
133 |
}
|
134 |
|
135 |
+
/**
|
136 |
+
* Load Task Manager
|
137 |
+
*/
|
138 |
public function get_task_manager() {
|
139 |
+
include_once(WPO_PLUGIN_MAIN_PATH.'/vendor/team-updraft/common-libs/src/updraft-tasks/class-updraft-tasks-activation.php');
|
140 |
|
141 |
Updraft_Tasks_Activation::check_updates();
|
142 |
|
143 |
+
include_once(WPO_PLUGIN_MAIN_PATH . '/vendor/team-updraft/common-libs/src/updraft-tasks/class-updraft-task-meta.php');
|
144 |
+
include_once(WPO_PLUGIN_MAIN_PATH . '/vendor/team-updraft/common-libs/src/updraft-tasks/class-updraft-task-options.php');
|
145 |
+
include_once(WPO_PLUGIN_MAIN_PATH . '/vendor/team-updraft/common-libs/src/updraft-tasks/class-updraft-task.php');
|
|
|
|
|
146 |
}
|
147 |
|
148 |
/**
|
1081 |
|
1082 |
$loggers_classes_info[$logger_id] = array(
|
1083 |
'description' => $logger_class->get_description(),
|
1084 |
+
'available' => $logger_class->is_available(),
|
1085 |
'allow_multiple' => $logger_class->is_allow_multiple(),
|
1086 |
'options' => $logger_class->get_options_list()
|
1087 |
);
|