diff --git a/extras/chrome_extension/css/popup.css b/extras/chrome_extension/css/popup.css index a736abea57..e505e720cc 100644 --- a/extras/chrome_extension/css/popup.css +++ b/extras/chrome_extension/css/popup.css @@ -247,4 +247,11 @@ button h3 { } .sev-Maintenance { background: #A8A8A8; +} +.sev-Minor { + background: #F099A2; + color: #333; +} +.sev-Major { + background: #C97A4A; } \ No newline at end of file diff --git a/extras/chrome_extension/js/background.js b/extras/chrome_extension/js/background.js index 8f3b80e866..521ecc19eb 100644 --- a/extras/chrome_extension/js/background.js +++ b/extras/chrome_extension/js/background.js @@ -3,7 +3,7 @@ var isFetching = null; var storedEvents = new Array(); var notVisited = {}; -$(window).load(function() { +$(window).on('load', function() { initilise(); // Wait some ms to throw main function var delay = setTimeout(main, 100); @@ -29,11 +29,13 @@ function main() { if (isFetching) return; isFetching = true; - var feedUrl = localStorage["ip_address"]+'/include/api.php?op=get&op2=events&return_type=csv&apipass='+localStorage["api_pass"]+'&user='+localStorage["user_name"]+'&pass='+localStorage["pass"]; + var feedUrl = localStorage["ip_address"]+'/include/api.php?op=get&op2=events&return_type=json&apipass='+localStorage["api_pass"]+'&user='+localStorage["user_name"]+'&pass='+localStorage["pass"]; + req = new XMLHttpRequest(); req.onload = handleResponse; req.onerror = handleError; req.open("GET", feedUrl, true); + req.withCredentials = true req.send(null); } @@ -132,25 +134,23 @@ function fetchNewEvents(A,B){ function parseReplyEvents (reply) { // Split the API response - var e_array = reply.split("\n"); + var data = JSON.parse(reply) + var e_array = JSON.parse(reply).data; // Form a properly object var fetchedEvents=new Array(); for(var i=0;i \$data)) { - print_log ("Uncompress error: $UnzipError"); + print_log ("Uncompress error: $IO::Uncompress::Unzip::UnzipError"); send_data ("ZRECV ERR\n"); return; } @@ -705,7 +716,7 @@ sub zsend_file { # Read the file and compress its contents if (! zip($file => \$data)) { send_data ("QUIT\n"); - error ("Compression error: $ZipError"); + error ("Compression error: $IO::Compress::Zip::ZipError"); return; } @@ -725,7 +736,7 @@ sub zsend_file { error ("Server responded $response."); } - print_log ("Server responded SEND OK"); + print_log ("Server responded ZSEND OK"); send_data ($data); # Wait for server response diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf index 8d9e405b99..1b3ba629b7 100644 --- a/pandora_agents/shellscript/aix/pandora_agent.conf +++ b/pandora_agents/shellscript/aix/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.728, AIX version +# Version 7.0NG.730, AIX version # General Parameters # ================== diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf index f428ddf5e1..4ed22c0a3e 100644 --- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf +++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.728 +# Version 7.0NG.730 # FreeBSD/IPSO version # Licenced under GPL licence, 2003-2007 Sancho Lerena diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf index 6f1eded2ef..22faee00e8 100644 --- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf +++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.728, HPUX Version +# Version 7.0NG.730, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index 26b099a519..a784ce4fc0 100644 --- a/pandora_agents/shellscript/linux/pandora_agent.conf +++ b/pandora_agents/shellscript/linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728 +# Version 7.0NG.730 # Licensed under GPL license v2, # (c) 2003-2010 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/linux/tentacle_client b/pandora_agents/shellscript/linux/tentacle_client index ffed3da859..0d8ed2992f 100755 --- a/pandora_agents/shellscript/linux/tentacle_client +++ b/pandora_agents/shellscript/linux/tentacle_client @@ -58,8 +58,17 @@ use strict; use File::Basename; use Getopt::Std; use IO::Select; -use IO::Compress::Zip qw(zip $ZipError); -use IO::Uncompress::Unzip qw(unzip $UnzipError); +my $zlib_available = 1; + +eval { + eval "use IO::Compress::Zip qw(zip);1" or die($@); + eval "use IO::Uncompress::Unzip qw(unzip);1" or die($@); +}; +if ($@) { + print_log ("Zip transfer not available, required libraries not found (IO::Compress::Zip, IO::Uncompress::Unzip)."); + $zlib_available = 0; +} + use Socket (qw(SOCK_STREAM AF_INET AF_INET6)); my $SOCKET_MODULE = eval { require IO::Socket::INET6 } ? 'IO::Socket::INET6' @@ -324,7 +333,9 @@ sub parse_options { # Compress data if (defined ($opts{'z'})) { - $t_zip = 1; + if ($zlib_available == 1) { + $t_zip = 1; + } } } @@ -622,7 +633,7 @@ sub zrecv_file { # Receive file $zdata = recv_data_block ($size); if (!unzip(\$zdata => \$data)) { - print_log ("Uncompress error: $UnzipError"); + print_log ("Uncompress error: $IO::Uncompress::Unzip::UnzipError"); send_data ("ZRECV ERR\n"); return; } @@ -705,7 +716,7 @@ sub zsend_file { # Read the file and compress its contents if (! zip($file => \$data)) { send_data ("QUIT\n"); - error ("Compression error: $ZipError"); + error ("Compression error: $IO::Compress::Zip::ZipError"); return; } @@ -725,7 +736,7 @@ sub zsend_file { error ("Server responded $response."); } - print_log ("Server responded SEND OK"); + print_log ("Server responded ZSEND OK"); send_data ($data); # Wait for server response diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf index 4f23ce219e..456802c06a 100644 --- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf +++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728 +# Version 7.0NG.730 # Licensed under GPL license v2, # (c) 2003-2009 Artica Soluciones Tecnologicas # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/mac_osx/tentacle_client b/pandora_agents/shellscript/mac_osx/tentacle_client index ffed3da859..0d8ed2992f 100755 --- a/pandora_agents/shellscript/mac_osx/tentacle_client +++ b/pandora_agents/shellscript/mac_osx/tentacle_client @@ -58,8 +58,17 @@ use strict; use File::Basename; use Getopt::Std; use IO::Select; -use IO::Compress::Zip qw(zip $ZipError); -use IO::Uncompress::Unzip qw(unzip $UnzipError); +my $zlib_available = 1; + +eval { + eval "use IO::Compress::Zip qw(zip);1" or die($@); + eval "use IO::Uncompress::Unzip qw(unzip);1" or die($@); +}; +if ($@) { + print_log ("Zip transfer not available, required libraries not found (IO::Compress::Zip, IO::Uncompress::Unzip)."); + $zlib_available = 0; +} + use Socket (qw(SOCK_STREAM AF_INET AF_INET6)); my $SOCKET_MODULE = eval { require IO::Socket::INET6 } ? 'IO::Socket::INET6' @@ -324,7 +333,9 @@ sub parse_options { # Compress data if (defined ($opts{'z'})) { - $t_zip = 1; + if ($zlib_available == 1) { + $t_zip = 1; + } } } @@ -622,7 +633,7 @@ sub zrecv_file { # Receive file $zdata = recv_data_block ($size); if (!unzip(\$zdata => \$data)) { - print_log ("Uncompress error: $UnzipError"); + print_log ("Uncompress error: $IO::Uncompress::Unzip::UnzipError"); send_data ("ZRECV ERR\n"); return; } @@ -705,7 +716,7 @@ sub zsend_file { # Read the file and compress its contents if (! zip($file => \$data)) { send_data ("QUIT\n"); - error ("Compression error: $ZipError"); + error ("Compression error: $IO::Compress::Zip::ZipError"); return; } @@ -725,7 +736,7 @@ sub zsend_file { error ("Server responded $response."); } - print_log ("Server responded SEND OK"); + print_log ("Server responded ZSEND OK"); send_data ($data); # Wait for server response diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf index 8f272695ac..44e244c74e 100644 --- a/pandora_agents/shellscript/openWRT/pandora_agent.conf +++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728 +# Version 7.0NG.730 # Licensed under GPL license v2, # please visit http://pandora.sourceforge.net diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf index cce42277f7..fdb61b9888 100644 --- a/pandora_agents/shellscript/solaris/pandora_agent.conf +++ b/pandora_agents/shellscript/solaris/pandora_agent.conf @@ -1,6 +1,6 @@ # Fichero de configuracion base de agentes de Pandora # Base config file for Pandora agents -# Version 7.0NG.728, Solaris version +# Version 7.0NG.730, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 476c53874f..54451441dd 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, AIX version +# Version 7.0NG.730, AIX version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 93d8cf3cbf..d1b5318f88 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.728-181025 +Version: 7.0NG.730-190111 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 0e6d0fb01e..72960a6318 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.728-181025" +pandora_version="7.0NG.730-190111" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index ac53da9443..2c4ea59daa 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, GNU/Linux +# Version 7.0NG.730, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2012 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 12f0f7d805..3feebad741 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, FreeBSD Version +# Version 7.0NG.730, FreeBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2016 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 3339e5443d..b0f9dd590e 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, HP-UX Version +# Version 7.0NG.730, HP-UX Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 58fb118e99..2679f78617 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, GNU/Linux +# Version 7.0NG.730, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2014 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf index a47ae7137b..8d3736b35f 100644 --- a/pandora_agents/unix/NT4/pandora_agent.conf +++ b/pandora_agents/unix/NT4/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, GNU/Linux +# Version 7.0NG.730, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 701ee400e7..e0eea4b59e 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, NetBSD Version +# Version 7.0NG.730, NetBSD Version # Licensed under GPL license v2, # Copyright (c) 2003-2010 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 95152aadf3..30ac06a0ca 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -1,5 +1,5 @@ # Base config file for Pandora FMS agents -# Version 7.0NG.728, Solaris Version +# Version 7.0NG.730, Solaris Version # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas # http://www.pandorafms.com diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index cc1eb4ee08..8ca0e748a6 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,8 +41,8 @@ my $Sem = undef; # Semaphore used to control the number of threads my $ThreadSem = undef; -use constant AGENT_VERSION => '7.0NG.728'; -use constant AGENT_BUILD => '181025'; +use constant AGENT_VERSION => '7.0NG.730'; +use constant AGENT_BUILD => '190111'; # Agent log default file size maximum and instances use constant DEFAULT_MAX_LOG_SIZE => 600000; @@ -516,11 +516,18 @@ sub parse_conf_modules($) { log_message ('setup', "Invalid regular expression in intensive condition: $line"); } } - } elsif ($line =~ /^\s*module_crontab\s+(((\*|(\d+(-\d+){0,1}))\s*){5}).*$/) { + } elsif ($line =~ /^\s*module_crontab\s+(.*)$/) { my $cron_text = $1; chomp ($cron_text); + $cron_text =~ s/\s+$//; + # Get module name if is already read. + my $module_name_message = ""; + $module_name_message = " (module $module->{'name'})" if defined($module->{'name'}); if (cron_check_syntax($cron_text)) { $module->{'cron'} = $cron_text; + log_message('debug', "Cron '$module->{'cron'}' configured $module_name_message."); + } else { + log_message('setup', "Incorrect cron syntax '$cron_text'. This module$module_name_message will be executed always."); } } elsif ($line =~ /^\s*module_end\s*$/) { @@ -2397,6 +2404,7 @@ sub check_module_cron { $interval ); + my $is_first = ($module->{'cron_utimestamp'} == 0) ? 1 : 0; $module->{'cron_utimestamp'} = $now + $time_to_next_execution; $module->{'cron_interval'} = $time_to_next_execution; @@ -2405,7 +2413,7 @@ sub check_module_cron { } # On first execution checking if cron is valid is required - return 1 unless ($module->{'cron_utimestamp'} == 0); + return 1 unless ($is_first); # Check if current timestamp is a valid cron date my $next_execution = cron_next_execution_date( diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index d0ec7f42a0..2e5c1eceaf 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.728 -%define release 181025 +%define version 7.0NG.730 +%define release 190111 Summary: Pandora FMS Linux agent, PERL version Name: %{name} @@ -95,7 +95,8 @@ if [ ! -e /etc/pandora/plugins ]; then fi if [ ! -e /etc/pandora/collections ]; then - mkdir -p /etc/pandora/collections + mkdir -p /usr/share/pandora_agent/collections + ln -s /usr/share/pandora_agent/collections /etc/pandora fi mkdir -p /var/spool/pandora/data_out diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec index b37f906bea..b725d63a08 100644 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -2,8 +2,8 @@ #Pandora FMS Linux Agent # %define name pandorafms_agent_unix -%define version 7.0NG.728 -%define release 181025 +%define version 7.0NG.730 +%define release 190111 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index 981a8e3d68..902fc67022 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -9,8 +9,8 @@ # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION="7.0NG.728" -PI_BUILD="181025" +PI_VERSION="7.0NG.730" +PI_BUILD="190111" OS_NAME=`uname -s` FORCE=0 diff --git a/pandora_agents/unix/plugins/pandora_df b/pandora_agents/unix/plugins/pandora_df index e03da5dfb4..261e365970 100755 --- a/pandora_agents/unix/plugins/pandora_df +++ b/pandora_agents/unix/plugins/pandora_df @@ -25,12 +25,33 @@ ############################################################################### use strict; +use warnings; # Retrieve information from all filesystems my $all_filesystems = 0; # Regex flag my $regex_mode = 0; +my $inode_mode = 0; + +# Exclusion +my @exclude_fs = (); +my $cmd = undef; + + +sub in_array { + my ($array, $value) = @_; + + if (!defined($value)) { + return 0; + } + + my %params = map { $_ => 1 } @{$array}; + if (exists($params{$value})) { + return 1; + } + return 0; +} sub check_re($$){ my $item = shift; @@ -65,10 +86,24 @@ if ($#ARGV < 0) { $all_filesystems = 1; } -# Check if regex mode is enabled -if ($ARGV[0] eq "-r") { - $regex_mode = 1; - shift @ARGV; +while ($#ARGV >= 0) { + my $param = shift @ARGV; + if ($param eq '-r') { + $regex_mode = 1; + shift @ARGV; + } + elsif ($param eq '-i') { + $inode_mode = 1; + } + elsif ($param eq '-exclude_fs') { + my $_tmp = shift @ARGV; + chomp ($_tmp); + @exclude_fs = split /,/, $_tmp; + } + elsif ($param eq '-custom_cmd') { + $cmd = shift @ARGV; + chomp ($cmd); + } } # Parse command line parameters @@ -90,7 +125,15 @@ if ($onlyexclude) { # Retrieve filesystem information # -P use the POSIX output format for portability -my @df = `df -P`; + + +$cmd = 'df -PT' unless defined($cmd); + +if ($inode_mode > 0) { + $cmd = 'df -PTi'; +} + +my @df = `$cmd`; shift (@df); # No filesystems? Something went wrong. @@ -102,9 +145,13 @@ my %out; # Parse filesystem usage foreach my $row (@df) { my @columns = split (' ', $row); - exit 1 if ($#columns < 4); - if (check_in (\%filesystems,$columns[0]) || ($all_filesystems == 1 && !check_in(\%excluded_filesystems,$columns[0]) )) { - $out{$columns[0]} = $columns[4] ; + exit 1 if ($#columns < 5); + + next if (in_array(\@exclude_fs, $columns[1]) > 0); + + if (check_in (\%filesystems,$columns[0]) + || ($all_filesystems == 1 && !check_in(\%excluded_filesystems,$columns[0])) ){ + $out{$columns[0]} = $columns[5] ; } } @@ -115,7 +162,7 @@ while (my ($filesystem, $use) = each (%out)) { # Print module output print "\n"; - print "\n"; + print " 0 ? 'Inodes:' : '') . $filesystem . "]]>\n"; print "\n"; print "\n"; print "\n"; diff --git a/pandora_agents/unix/tentacle_client b/pandora_agents/unix/tentacle_client index ffed3da859..0d8ed2992f 100755 --- a/pandora_agents/unix/tentacle_client +++ b/pandora_agents/unix/tentacle_client @@ -58,8 +58,17 @@ use strict; use File::Basename; use Getopt::Std; use IO::Select; -use IO::Compress::Zip qw(zip $ZipError); -use IO::Uncompress::Unzip qw(unzip $UnzipError); +my $zlib_available = 1; + +eval { + eval "use IO::Compress::Zip qw(zip);1" or die($@); + eval "use IO::Uncompress::Unzip qw(unzip);1" or die($@); +}; +if ($@) { + print_log ("Zip transfer not available, required libraries not found (IO::Compress::Zip, IO::Uncompress::Unzip)."); + $zlib_available = 0; +} + use Socket (qw(SOCK_STREAM AF_INET AF_INET6)); my $SOCKET_MODULE = eval { require IO::Socket::INET6 } ? 'IO::Socket::INET6' @@ -324,7 +333,9 @@ sub parse_options { # Compress data if (defined ($opts{'z'})) { - $t_zip = 1; + if ($zlib_available == 1) { + $t_zip = 1; + } } } @@ -622,7 +633,7 @@ sub zrecv_file { # Receive file $zdata = recv_data_block ($size); if (!unzip(\$zdata => \$data)) { - print_log ("Uncompress error: $UnzipError"); + print_log ("Uncompress error: $IO::Uncompress::Unzip::UnzipError"); send_data ("ZRECV ERR\n"); return; } @@ -705,7 +716,7 @@ sub zsend_file { # Read the file and compress its contents if (! zip($file => \$data)) { send_data ("QUIT\n"); - error ("Compression error: $ZipError"); + error ("Compression error: $IO::Compress::Zip::ZipError"); return; } @@ -725,7 +736,7 @@ sub zsend_file { error ("Server responded $response."); } - print_log ("Server responded SEND OK"); + print_log ("Server responded ZSEND OK"); send_data ($data); # Wait for server response diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index bb4d1a6923..795842f5f5 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -1,6 +1,6 @@ # Base config file for Pandora FMS Windows Agent # (c) 2006-2017 Artica Soluciones Tecnologicas -# Version 7.0NG.728 +# Version 7.0NG.730 # This program is Free Software, you can redistribute it and/or modify it # under the terms of the GNU General Public Licence as published by the Free Software diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi index 7019fcf229..affb521211 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -3,7 +3,7 @@ AllowLanguageSelection {Yes} AppName -{Pandora FMS Windows Agent v7.0NG.728} +{Pandora FMS Windows Agent v7.0NG.730} ApplicationID {17E3D2CF-CA02-406B-8A80-9D31C17BD08F} @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{181025} +{190111} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 54c6b626f9..877abd9b57 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("7.0NG.728(Build 181025)") +#define PANDORA_VERSION ("7.0NG.730(Build 190111)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 640dedbb35..f97e885ed9 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(7.0NG.728(Build 181025))" + VALUE "ProductVersion", "(7.0NG.730(Build 190111))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 86769b7615..ddbf2c8119 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,10 +1,10 @@ package: pandorafms-console -Version: 7.0NG.728-181025 +Version: 7.0NG.730-190111 Architecture: all Priority: optional Section: admin Installed-Size: 42112 Maintainer: Artica ST Homepage: http://pandorafms.org/ -Depends: php5.6 | php5, php5.6-snmp | php5-snmp, php5.6-gd | php5-gd, php5.6-mysql | php5-mysql, php-db, php5.6-xmlrpc | php5-xmlrpc, php-gettext, php5.6-curl | php5-curl, graphviz, dbconfig-common, php5.6-ldap | php5-ldap, mysql-client | virtual-mysql-client +Depends: php | php7.2, php7.2-snmp | php-snmp, php7.2-gd | php-gd, php7.2-mysqlnd | php-mysqlnd, php-db, php7.2-xmlrpc | php-xmlrpc, php-gettext, php7.2-curl | php-curl, graphviz, dbconfig-common, php7.2-ldap | php-ldap, mysql-client | virtual-mysql-client, php-xmlrpc, php7.2-zip | php-zip Description: Pandora FMS is an Open Source monitoring tool. It monitor your systems and applications, and allows you to control the status of any element of them. The web console is the graphical user interface (GUI) to manage the pool and to generate reports and graphs from the Pandora FMS monitoring process. diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index f940e5bbb5..0a8a8b2b97 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="7.0NG.728-181025" +pandora_version="7.0NG.730-190111" package_pear=0 package_pandora=1 diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index 6947bfcc3a..97ffe031a9 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -18,9 +18,8 @@ if ((! file_exists("include/config.php")) || (! is_readable("include/config.php" exit; } -// Real start -session_start(); - +// Don't start a session before this import. +// The session is configured and started inside the config process. require_once ('include/config.php'); require_once ('include/functions.php'); require_once ('include/functions_db.php'); @@ -82,7 +81,6 @@ if (isset($config['metaconsole'])) { if ($config['metaconsole']) define ('METACONSOLE', true); } -session_write_close (); if (file_exists ($page)) { require_once ($page); diff --git a/pandora_console/composer.json b/pandora_console/composer.json new file mode 100644 index 0000000000..1138ecf522 --- /dev/null +++ b/pandora_console/composer.json @@ -0,0 +1,14 @@ +{ + "name": "Pandora FMS", + "description": "Pandora Flexible Monitoring System ", + "authors": [ + { + "name": "Artica", + "email": "info@artica.es" + } + ], + "require": { + "mpdf/mpdf": "^7.1", + "swiftmailer/swiftmailer": "^6.0" + } +} diff --git a/pandora_console/composer.lock b/pandora_console/composer.lock new file mode 100644 index 0000000000..3b135cd04c --- /dev/null +++ b/pandora_console/composer.lock @@ -0,0 +1,442 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "18364e5cd8c79657279985942190b4a7", + "packages": [ + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "egulias/email-validator", + "version": "2.1.6", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "0578b32b30b22de3e8664f797cf846fc9246f786" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0578b32b30b22de3e8664f797cf846fc9246f786", + "reference": "0578b32b30b22de3e8664f797cf846fc9246f786", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.0.1", + "php": ">= 5.5" + }, + "require-dev": { + "dominicsayers/isemail": "dev-master", + "phpunit/phpunit": "^4.8.35||^5.7||^6.0", + "satooshi/php-coveralls": "^1.0.1" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "EmailValidator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "time": "2018-09-25T20:47:26+00:00" + }, + { + "name": "mpdf/mpdf", + "version": "v7.1.5", + "source": { + "type": "git", + "url": "https://github.com/mpdf/mpdf.git", + "reference": "2ed29c3a59fa23e77052e9d7fa7e31c707fb7502" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/mpdf/zipball/2ed29c3a59fa23e77052e9d7fa7e31c707fb7502", + "reference": "2ed29c3a59fa23e77052e9d7fa7e31c707fb7502", + "shasum": "" + }, + "require": { + "ext-gd": "*", + "ext-mbstring": "*", + "myclabs/deep-copy": "^1.7", + "paragonie/random_compat": "^1.4|^2.0|9.99.99", + "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0", + "psr/log": "^1.0", + "setasign/fpdi": "1.6.*" + }, + "require-dev": { + "mockery/mockery": "^0.9.5", + "phpunit/phpunit": "^5.0", + "squizlabs/php_codesniffer": "^2.7.0", + "tracy/tracy": "^2.4" + }, + "suggest": { + "ext-bcmath": "Needed for generation of some types of barcodes", + "ext-xml": "Needed mainly for SVG manipulation", + "ext-zlib": "Needed for compression of embedded resources, such as fonts" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-development": "7.0-dev" + } + }, + "autoload": { + "psr-4": { + "Mpdf\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-only" + ], + "authors": [ + { + "name": "Matěj Humpál", + "role": "Developer, maintainer" + }, + { + "name": "Ian Back", + "role": "Developer (retired)" + } + ], + "description": "A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support", + "homepage": "https://mpdf.github.io", + "keywords": [ + "pdf", + "php", + "utf-8" + ], + "time": "2018-09-19T09:58:39+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-02T15:55:56+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "setasign/fpdi", + "version": "1.6.2", + "source": { + "type": "git", + "url": "https://github.com/Setasign/FPDI.git", + "reference": "a6ad58897a6d97cc2d2cd2adaeda343b25a368ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/a6ad58897a6d97cc2d2cd2adaeda343b25a368ea", + "reference": "a6ad58897a6d97cc2d2cd2adaeda343b25a368ea", + "shasum": "" + }, + "suggest": { + "setasign/fpdf": "FPDI will extend this class but as it is also possible to use \"tecnickcom/tcpdf\" as an alternative there's no fixed dependency configured.", + "setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.", + "setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF." + }, + "type": "library", + "autoload": { + "classmap": [ + "filters/", + "fpdi.php", + "fpdf_tpl.php", + "fpdi_pdf_parser.php", + "pdf_context.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Slabon", + "email": "jan.slabon@setasign.com", + "homepage": "https://www.setasign.com" + } + ], + "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", + "homepage": "https://www.setasign.com/fpdi", + "keywords": [ + "fpdf", + "fpdi", + "pdf" + ], + "time": "2017-05-11T14:25:49+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v6.1.3", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8ddcb66ac10c392d3beb54829eef8ac1438595f4", + "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4", + "shasum": "" + }, + "require": { + "egulias/email-validator": "~2.0", + "php": ">=7.0.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.3@dev" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses", + "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2018-09-11T07:12:52+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/pandora_console/extensions/agents_alerts.php b/pandora_console/extensions/agents_alerts.php index ccc1539fdc..7669fa00c5 100755 --- a/pandora_console/extensions/agents_alerts.php +++ b/pandora_console/extensions/agents_alerts.php @@ -472,7 +472,7 @@ function print_alerts_summary_modal_window($id, $alerts) { if ($alert["times_fired"] > 0) { $status = STATUS_ALERT_FIRED; - $title = __('Alert fired').' '.$alert["times_fired"].' '.__('times'); + $title = __('Alert fired').' '.$alert["internal_counter"].' '.__('time(s)'); } elseif ($alert["disabled"] > 0) { $status = STATUS_ALERT_DISABLED; diff --git a/pandora_console/extensions/db_status.php b/pandora_console/extensions/db_status.php index 84cf67022d..e873ea76aa 100755 --- a/pandora_console/extensions/db_status.php +++ b/pandora_console/extensions/db_status.php @@ -14,52 +14,35 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -/* -function extension_db_status_extension_tables() { - return array( - 'tbackup', - 'tfiles_repo', - 'tfiles_repo_group', - 'tipam_ip', - 'tipam_network', - 'tuser_task', - 'tuser_task_scheduled', - ); -} -*/ - function extension_db_status() { global $config; - + $db_user = get_parameter('db_user', ''); $db_password = get_parameter('db_password', ''); $db_host = get_parameter('db_host', ''); $db_name = get_parameter('db_name', ''); $db_status_execute = (bool)get_parameter('db_status_execute', false); - - + ui_print_page_header (__("DB Schema check"), "images/extensions.png", false, "", true, ""); - - + if (!is_user_admin($config['id_user'])) { db_pandora_audit("ACL Violation", "Trying to access db status"); require ("general/noaccess.php"); return; } - - + ui_print_info_message( __('This extension checks the DB is correct. Because sometimes the old DB from a migration has not some fields in the tables or the data is changed.')); ui_print_info_message( __('At the moment the checks is for MySQL/MariaDB.')); - + echo "
"; - + echo "
"; echo "" . __('DB settings') . ""; - $table = null; + $table = new stdClass(); $table->data = array(); $row = array(); $row[] = __("DB User with privileges"); @@ -75,175 +58,263 @@ function extension_db_status() { $table->data[] = $row; html_print_table($table); echo "
"; - + echo "
"; html_print_input_hidden('db_status_execute', 1); html_print_submit_button(__('Execute Test'), 'submit', false, 'class="sub"'); echo "
"; - + echo "
"; - + if ($db_status_execute) { extension_db_status_execute_checks($db_user, $db_password, $db_host, $db_name); } } - function extension_db_status_execute_checks($db_user, $db_password, $db_host, $db_name) { global $config; - + $connection_system = $config['dbconnection']; - + // Avoid SQL injection $db_name = io_safe_output($db_name); $db_name = str_replace(';', ' ', $db_name); $db_name = explode(" ", $db_name); $db_name = $db_name[0]; - - $connection_test = mysql_connect ($db_host, $db_user, $db_password); - + + if ($config["mysqli"] === true) { + $connection_test = mysqli_connect($db_host, $db_user, $db_password); + } + else{ + $connection_test = mysql_connect($db_host, $db_user, $db_password); + } + if (!$connection_test) { ui_print_error_message( __('Unsuccessful connected to the DB')); } else { - $create_db = mysql_query ("CREATE DATABASE `$db_name`"); - + if($config["mysqli"] === true){ + $create_db = mysqli_query($connection_test, "CREATE DATABASE `$db_name`"); + }else{ + $create_db = mysql_query("CREATE DATABASE `$db_name`"); + } + if (!$create_db) { ui_print_error_message( __('Unsuccessful created the testing DB')); } else { - mysql_select_db($db_name, $connection_test); - + if ($config["mysqli"] === true) { + mysqli_select_db($connection_test, $db_name); + } + else{ + mysql_select_db($db_name, $connection_test); + } + $install_tables = extension_db_status_execute_sql_file( $config['homedir'] . "/pandoradb.sql", $connection_test); - + if (!$install_tables) { ui_print_error_message( __('Unsuccessful installed tables into the testing DB')); } - else {/* - if (enterprise_installed()) { - $install_tables_enterprise = - extension_db_status_execute_sql_file( - $config['homedir'] . "/enterprise/pandoradb.sql", - $connection_test); - - if (!$install_tables_enterprise) { - ui_print_error_message( - __('Unsuccessful installed enterprise tables into the testing DB')); - } - } - */ + else { extension_db_check_tables_differences( $connection_test, $connection_system, $db_name, $config['dbname']); - //extension_db_check_data_differences(); } - - mysql_select_db($db_name, $connection_test); - mysql_query ("DROP DATABASE IF EXISTS `$db_name`"); + + if ($config["mysqli"] === true) { + mysqli_select_db($connection_test, $db_name); + mysqli_query($connection_test, "DROP DATABASE IF EXISTS `$db_name`"); + } + else{ + mysql_select_db($db_name, $connection_test); + mysql_query("DROP DATABASE IF EXISTS `$db_name`", $connection_test); + } } } } function extension_db_check_tables_differences($connection_test, $connection_system, $db_name_test, $db_name_system) { - + global $config; - - + // --------- Check the tables -------------------------------------- - mysql_select_db($db_name_test, $connection_test); - $result = mysql_query("SHOW TABLES", $connection_test); + if ($config["mysqli"] === true) { + mysqli_select_db($connection_test, $db_name_test); + $result = mysqli_query($connection_test, "SHOW TABLES"); + }else{ + mysql_select_db($db_name_test, $connection_test); + $result = mysql_query("SHOW TABLES", $connection_test); + } + $tables_test = array(); - while ($row = mysql_fetch_array ($result)) { - $tables_test[] = $row[0]; + + if ($config["mysqli"] === true) { + while ($row = mysqli_fetch_array($result)) { + $tables_test[] = $row[0]; + } + mysqli_free_result($result); + + mysqli_select_db($connection_test, $db_name_system); + + $result = mysqli_query( $connection_test, "SHOW TABLES"); } - mysql_free_result ($result); - //~ $tables_test = array_merge($tables_test, - //~ extension_db_status_extension_tables()); - - mysql_select_db($db_name_system, $connection_test); - $result = mysql_query("SHOW TABLES", $connection_test); + else{ + while ($row = mysql_fetch_array($result)) { + $tables_test[] = $row[0]; + } + mysql_free_result($result); + + mysql_select_db($db_name_system, $connection_test); + + $result = mysql_query("SHOW TABLES", $connection_test); + } + $tables_system = array(); - while ($row = mysql_fetch_array ($result)) { - $tables_system[] = $row[0]; + + if ($config["mysqli"] === true) { + while ($row = mysqli_fetch_array ($result)) { + $tables_system[] = $row[0]; + } + mysqli_free_result($result); } - mysql_free_result ($result); - + else{ + while ($row = mysql_fetch_array ($result)) { + $tables_system[] = $row[0]; + } + mysql_free_result($result); + } + $diff_tables = array_diff($tables_test, $tables_system); - + ui_print_result_message( !empty($diff_tables), __('Success! %s DB contains all tables', get_product_name()), __('%s DB could not retrieve all tables. The missing tables are (%s)', get_product_name(), implode(", ", $diff_tables))); - + if (!empty($diff_tables)) { foreach ($diff_tables as $table) { - mysql_select_db($db_name_test, $connection_test); - $result = mysql_query("SHOW CREATE TABLE " . $table, $connection_test); - $tables_test = array(); - while ($row = mysql_fetch_array ($result)) { - ui_print_info_message( - __('You can execute this SQL query for to fix.') . "
" . - '
' .
-						$row[1] .
-					'
' - ); + if ($config["mysqli"] === true) { + mysqli_select_db($connection_test, $db_name_test); + $result = mysqli_query($connection_test, "SHOW CREATE TABLE " . $table); + $tables_test = array(); + while ($row = mysql_fetch_array($result)) { + ui_print_info_message( + __('You can execute this SQL query for to fix.') . "
" . + '
' .
+							$row[1] .
+						'
' + ); + } + mysqli_free_result($result); + } + else{ + mysql_select_db($db_name_test, $connection_test); + $result = mysql_query("SHOW CREATE TABLE " . $table, $connection_test); + $tables_test = array(); + while ($row = mysql_fetch_array($result)) { + ui_print_info_message( + __('You can execute this SQL query for to fix.') . "
" . + '
' .
+							$row[1] .
+						'
' + ); + } + mysql_free_result($result); } - mysql_free_result ($result); } } - + // --------------- Check the fields ------------------------------- $correct_fields = true; - + foreach ($tables_system as $table) { - - mysql_select_db($db_name_test, $connection_test); - $result = mysql_query("EXPLAIN " . $table, $connection_test); + if ($config["mysqli"] === true) { + mysqli_select_db($connection_test, $db_name_test); + $result = mysqli_query($connection_test, "EXPLAIN " . $table); + } + else{ + mysql_select_db($db_name_test, $connection_test); + $result = mysql_query("EXPLAIN " . $table, $connection_test); + } + $fields_test = array(); if (!empty($result)) { - while ($row = mysql_fetch_array ($result)) { - $fields_test[$row[0]] = array( - 'field ' => $row[0], - 'type' => $row[1], - 'null' => $row[2], - 'key' => $row[3], - 'default' => $row[4], - 'extra' => $row[5]); + if ($config["mysqli"] === true) { + while ($row = mysqli_fetch_array ($result)) { + $fields_test[$row[0]] = array( + 'field ' => $row[0], + 'type' => $row[1], + 'null' => $row[2], + 'key' => $row[3], + 'default' => $row[4], + 'extra' => $row[5]); + } + mysqli_free_result ($result); + mysqli_select_db($connection_test, $db_name_system); + } + else{ + while ($row = mysql_fetch_array ($result)) { + $fields_test[$row[0]] = array( + 'field ' => $row[0], + 'type' => $row[1], + 'null' => $row[2], + 'key' => $row[3], + 'default' => $row[4], + 'extra' => $row[5]); + } + mysql_free_result ($result); + mysql_select_db($db_name_system, $connection_test); } - mysql_free_result ($result); } - - - - mysql_select_db($db_name_system, $connection_test); - $result = mysql_query("EXPLAIN " . $table, $connection_test); + + if($config["mysqli"] === true){ + $result = mysqli_query($connection_test, "EXPLAIN " . $table); + } + else{ + $result = mysql_query("EXPLAIN " . $table, $connection_test); + } + $fields_system = array(); if (!empty($result)) { - while ($row = mysql_fetch_array ($result)) { - $fields_system[$row[0]] = array( - 'field ' => $row[0], - 'type' => $row[1], - 'null' => $row[2], - 'key' => $row[3], - 'default' => $row[4], - 'extra' => $row[5]); + if ($config["mysqli"] === true) { + while ($row = mysqli_fetch_array ($result)) { + $fields_system[$row[0]] = array( + 'field ' => $row[0], + 'type' => $row[1], + 'null' => $row[2], + 'key' => $row[3], + 'default' => $row[4], + 'extra' => $row[5]); + } + mysqli_free_result($result); + } + else{ + while ($row = mysql_fetch_array($result)) { + $fields_system[$row[0]] = array( + 'field ' => $row[0], + 'type' => $row[1], + 'null' => $row[2], + 'key' => $row[3], + 'default' => $row[4], + 'extra' => $row[5]); + } + mysql_free_result($result); } - mysql_free_result ($result); } foreach ($fields_test as $name_field => $field_test) { if (!isset($fields_system[$name_field])) { $correct_fields = false; - + ui_print_error_message( __('Unsuccessful the table %s has not the field %s', $table, $name_field)); @@ -257,63 +328,59 @@ function extension_db_check_tables_differences($connection_test, else { $correct_fields = false; $field_system = $fields_system[$name_field]; - + $diff = array_diff($field_test, $field_system); - + if (!empty($diff)) { $info_message = ""; $error_message = ""; if($diff['type']){ $error_message .= "Unsuccessful the field ".$name_field." in the table ".$table." must be set the type with ".$diff['type']."
"; } - + if($diff['null']){ $error_message .= "Unsuccessful the field $name_field in the table $table must be null: (".$diff['null'].").
"; } - + if($diff['default']){ - $error_message .= "Unsuccessful the field $name_field in the table $table must be set ".$diff['default']." as default value.
"; + $error_message .= "Unsuccessful the field $name_field in the table $table must be set ".$diff['default']." as default value.
"; } - + if($field_test['null'] == "YES" || !isset($field_test['null']) || $field_test['null'] == ""){ $null_defect = " NULL"; } else{ $null_defect = " NOT NULL"; } - + if(!isset($field_test['default']) || $field_test['default'] == ""){ $default_value = ""; } else{ $default_value = " DEFAULT ".$field_test['default']; } - + if($diff['type'] || $diff['null'] || $diff['default']){ $info_message .= "ALTER TABLE " . $table . " MODIFY COLUMN " . $name_field . " " . $field_test['type'] . $null_defect . $default_value.";"; } - + if($diff['key']){ $error_message .= "Unsuccessful the field $name_field in the table $table must be set the key as defined in the SQL file.
"; $info_message .= "

Please check the SQL file for to know the kind of key needed."; } - - if($diff['extra']){ + + if($diff['extra']){ $error_message .= "Unsuccessful the field $name_field in the table $table must be set as defined in the SQL file.
"; $info_message .= "

Please check the SQL file for to know the kind of extra config needed."; } - - ui_print_error_message( - __($error_message)); - - ui_print_info_message( - __($info_message)); - + + ui_print_error_message(__($error_message)); + + ui_print_info_message(__($info_message)); } } } } - if ($correct_fields) { ui_print_success_message( __('Successful all the tables have the correct fields') @@ -322,6 +389,7 @@ function extension_db_check_tables_differences($connection_test, } function extension_db_status_execute_sql_file($url, $connection) { + global $config; if (file_exists($url)) { $file_content = file($url); $query = ""; @@ -329,10 +397,19 @@ function extension_db_status_execute_sql_file($url, $connection) { if (trim($sql_line) != "" && strpos($sql_line, "--") === false) { $query .= $sql_line; if (preg_match("/;[\040]*\$/", $sql_line)) { - if (!$result = mysql_query($query, $connection)) { - echo mysql_error(); //Uncomment for debug - echo "
$query
"; - return 0; + if ($config["mysqli"] === true) { + if (!$result = mysqli_query($connection, $query)) { + echo mysqli_error(); //Uncomment for debug + echo "
$query
"; + return 0; + } + } + else{ + if (!$result = mysql_query($query, $connection)) { + echo mysql_error(); //Uncomment for debug + echo "
$query
"; + return 0; + } } $query = ""; } diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index 4bcaeac702..1ed38b3575 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -16,123 +16,80 @@ function dbmanager_query ($sql, &$error, $dbconnection) { global $config; - - switch ($config["dbtype"]) { - case "mysql": - $retval = array(); - - if ($sql == '') - return false; - - $sql = html_entity_decode($sql, ENT_QUOTES); - if ($config["mysqli"]) { - $result = mysqli_query ($dbconnection, $sql); - if ($result === false) { - $backtrace = debug_backtrace (); - $error = mysqli_error ($dbconnection); - return false; - } - } - else{ - $result = mysql_query ($sql, $dbconnection); - if ($result === false) { - $backtrace = debug_backtrace (); - $error = mysql_error (); - return false; - } - } - - if ($result === true) { - if($config["mysqli"]){ - return mysqli_affected_rows ($dbconnection); - } - else{ - return mysql_affected_rows (); - } - } - - if($config["mysqli"]){ - while ($row = mysqli_fetch_array ($result, MYSQL_ASSOC)) { - array_push ($retval, $row); - } - } - else{ - while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { - array_push ($retval, $row); - } - } - if($config["mysqli"]){ - mysqli_free_result ($result); - } - else{ - mysql_free_result ($result); - } - - if (! empty ($retval)) - return $retval; - - //Return false, check with === or !== - return "Empty"; - break; - case "postgresql": - case "oracle": - $retval = array(); - - if ($sql == '') - return false; - - $sql = html_entity_decode($sql, ENT_QUOTES); - - $result = db_process_sql($sql, "affected_rows", '', false, $status); - - //$result = mysql_query ($sql); - if ($result === false) { - $backtrace = debug_backtrace(); - $error = db_get_last_error(); - - if (empty($error)) { - return "Empty"; - } - - return false; - } - - if ($status == 2) { - return $result; - } - else { - return $result; - } - break; + $retval = array(); + + if ($sql == '') + return false; + + $sql = html_entity_decode($sql, ENT_QUOTES); + if ($config["mysqli"]) { + $result = mysqli_query ($dbconnection, $sql); + if ($result === false) { + $backtrace = debug_backtrace (); + $error = mysqli_error ($dbconnection); + return false; + } } + else{ + $result = mysql_query ($sql, $dbconnection); + if ($result === false) { + $backtrace = debug_backtrace (); + $error = mysql_error (); + return false; + } + } + + if ($result === true) { + if($config["mysqli"]){ + return mysqli_affected_rows ($dbconnection); + } + else{ + return mysql_affected_rows (); + } + } + + if($config["mysqli"]){ + while ($row = mysqli_fetch_array ($result, MYSQLI_ASSOC)) { + array_push ($retval, $row); + } + } + else{ + while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { + array_push ($retval, $row); + } + } + + if($config["mysqli"]){ + mysqli_free_result ($result); + } + else{ + mysql_free_result ($result); + } + + if (! empty ($retval)) + return $retval; + + //Return false, check with === or !== + return "Empty"; } function dbmgr_extension_main () { ui_require_css_file ('dbmanager', 'extensions/dbmanager/'); - + global $config; - + if (!is_user_admin($config['id_user'])) { db_pandora_audit("ACL Violation", "Trying to access Setup Management"); require ("general/noaccess.php"); return; } - - /* - * Disabled at the moment. - if (!check_referer()) { - require ("general/noaccess.php"); - - return; - } - */ - + $sql = (string) get_parameter ('sql'); - + ui_print_page_header (__('Database interface'), "images/gm_db.png", false, false, true); - + echo '
'; echo __("This is an advanced extension to interface with %s database directly from WEB console using native SQL sentences. Please note that you can damage your %s installation @@ -142,10 +99,10 @@ function dbmgr_extension_main () { with a depth knowledge of %s internals.", get_product_name(), get_product_name(), get_product_name()); echo '
'; - + echo "
"; echo "Some samples of usage:
SHOW STATUS;
DESCRIBE tagente
SELECT * FROM tserver
UPDATE tagente SET id_grupo = 15 WHERE nombre LIKE '%194.179%'
"; - + echo "

"; echo "
"; html_print_textarea ('sql', 5, 50, html_entity_decode($sql, ENT_QUOTES)); @@ -155,45 +112,45 @@ function dbmgr_extension_main () { html_print_submit_button (__('Execute SQL'), '', false, 'class="sub next"'); echo ''; echo "
"; - + // Processing SQL Code if ($sql == '') return; - + echo "
"; echo "
"; echo "
"; - + $dbconnection = $config['dbconnection']; $error = ''; - + $result = dbmanager_query ($sql, $error, $dbconnection); - + if ($result === false) { echo 'An error has occured when querying the database.
'; echo $error; - + db_pandora_audit("DB Interface Extension", "Error in SQL", false, false, $sql); - + return; } - + if (! is_array ($result)) { echo "Output: ".$result; - + db_pandora_audit("DB Interface Extension", "SQL", false, false, $sql); - + return; } - + echo "
"; $table = new stdClass(); $table->width = '100%'; $table->class = 'databox data'; $table->head = array_keys ($result[0]); - + $table->data = $result; - + html_print_table ($table); echo "
"; } diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index b7eca3b3e9..18ba051b60 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -61,17 +61,27 @@ function mainModuleGroups() { $info = groupview_plain_groups($info); $counter = count($info); $offset = get_parameter('offset', 0); - $groups_view = $is_not_paginated - ? $info - : array_slice($info, $offset, $config['block_size']); - $agents_counters = array_reduce($groups_view, function($carry, $item){ - $carry[$item['id']] = $item; - return $carry; - }, array()); + $agent_group_search = get_parameter('agent_group_search', ''); + $module_group_search = get_parameter('module_group_search', ''); - $ids_array = array_keys($agents_counters); + $info = array_filter($info, function($v, $k) use ($agent_group_search) { + return preg_match("/$agent_group_search/i", $v['name']); + }, ARRAY_FILTER_USE_BOTH); - $ids_group = implode(',', $ids_array); + if (!empty($info)) { + $groups_view = $is_not_paginated + ? $info + : array_slice($info, $offset, $config['block_size']); + $agents_counters = array_reduce($groups_view, function($carry, $item){ + $carry[$item['id']] = $item; + return $carry; + }, array()); + + $ids_array = array_keys($agents_counters); + + $ids_group = implode(',', $ids_array); + } else + $ids_group = -1; $condition_critical = modules_get_state_condition(AGENT_MODULE_STATUS_CRITICAL_ALERT); $condition_warning = modules_get_state_condition(AGENT_MODULE_STATUS_WARNING_ALERT); @@ -90,6 +100,12 @@ function mainModuleGroups() { $array_module_group[$value['id_mg']] = $value['name']; } $array_module_group[0] = 'Nothing'; + + + $array_module_group = array_filter($array_module_group, function($v, $k) use ($module_group_search) { + return preg_match("/$module_group_search/i", $v); + }, ARRAY_FILTER_USE_BOTH); + foreach ($agents_counters as $key => $value) { $array_for_defect[$key]['gm'] = $array_module_group; $array_for_defect[$key]['data']['name'] = $value['name']; @@ -167,7 +183,26 @@ $sql = ui_print_page_header (__("Combined table of agent group and module group"), "images/module_group.png", false, "", false, ''); - if(count($array_for_defect) > 0){ + echo " + "; + echo ""; + + echo "
"; + echo __('Search by agent group') . ' '; + html_print_input_text ("agent_group_search", $agent_group_search); + + echo ""; + echo __('Search by module group') . ' '; + html_print_input_text ("module_group_search", $module_group_search); + + echo ""; + echo ""; + echo ""; + echo ""; + echo "
"; + + if(true){ $table = new StdClass(); $table->style[0] = 'color: #ffffff; background-color: #373737; font-weight: bolder; padding-right: 10px; min-width: 230px;'; $table->width = '100%'; diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.js b/pandora_console/extensions/realtime_graphs/realtime_graphs.js index 34da7b1704..924331cafe 100644 --- a/pandora_console/extensions/realtime_graphs/realtime_graphs.js +++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.js @@ -30,7 +30,7 @@ }, yaxis: { tickFormatter: function (value, axis) { - return shortNumber(value); + return shortNumber(roundToTwo(value)) ; } }, series: { @@ -178,6 +178,9 @@ return number + " " + shorts[pos]; } + function roundToTwo(num) { + return +(Math.round(num + "e+2") + "e-2"); + } $('#graph').change(function() { $('form#realgraph').submit(); diff --git a/pandora_console/extensions/resource_exportation.php b/pandora_console/extensions/resource_exportation.php index 9c67bbec1c..092b90b3f3 100755 --- a/pandora_console/extensions/resource_exportation.php +++ b/pandora_console/extensions/resource_exportation.php @@ -16,14 +16,14 @@ if (isset($_GET['get_ptr'])) { if ($_GET['get_ptr'] == 1) { - - session_start (); - session_write_close (); - + $ownDir = dirname(__FILE__) . '/'; $ownDir = str_replace("\\", "/", $ownDir); + + // Don't start a session before this import. + // The session is configured and started inside the config process. require_once ($ownDir.'../include/config.php'); - + // Login check if (!isset($_SESSION["id_usuario"])) { $config['id_user'] = null; diff --git a/pandora_console/extras/mr/22.sql b/pandora_console/extras/mr/22.sql index cee9b45ede..6ddb2bf5ac 100644 --- a/pandora_console/extras/mr/22.sql +++ b/pandora_console/extras/mr/22.sql @@ -1,5 +1,22 @@ START TRANSACTION; +ALTER TABLE `talert_commands` ADD COLUMN `id_group` mediumint(8) unsigned NULL default 0; + +ALTER TABLE `tusuario` DROP COLUMN `flash_chart`; + +ALTER TABLE `tusuario` ADD COLUMN `default_custom_view` int(10) unsigned NULL default '0'; + ALTER TABLE tlayout_template MODIFY `name` varchar(600) NOT NULL; +CREATE TABLE IF NOT EXISTS `tagent_custom_fields_filter` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(600) NOT NULL, + `id_group` int(10) unsigned default '0', + `id_custom_field` varchar(600) default '', + `id_custom_fields_data` varchar(600) default '', + `id_status` varchar(600) default '', + `module_search` varchar(600) default '', + PRIMARY KEY(`id`) +) ENGINE = InnoDB DEFAULT CHARSET=utf8; + COMMIT; diff --git a/pandora_console/extras/mr/23.sql b/pandora_console/extras/mr/23.sql new file mode 100644 index 0000000000..98ef4f5747 --- /dev/null +++ b/pandora_console/extras/mr/23.sql @@ -0,0 +1,11 @@ +START TRANSACTION; + +ALTER TABLE `tagent_custom_fields_filter` ADD COLUMN `group_search` int(10) unsigned default '0'; + +ALTER TABLE `tagent_custom_fields_filter` ADD COLUMN `module_status` varchar(600) default ''; + +ALTER TABLE `tagent_custom_fields_filter` ADD COLUMN `recursion` int(1) unsigned default '0'; + +ALTER TABLE `tevent_rule` ADD COLUMN `group_recursion` INT(1) unsigned default 0; + +COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/mr/24.sql b/pandora_console/extras/mr/24.sql new file mode 100644 index 0000000000..f93d9c6e6e --- /dev/null +++ b/pandora_console/extras/mr/24.sql @@ -0,0 +1,5 @@ +START TRANSACTION; + +ALTER TABLE `treport` ADD COLUMN `orientation` varchar(25) NOT NULL default 'vertical'; + +COMMIT; diff --git a/pandora_console/extras/pandora_diag.php b/pandora_console/extras/pandora_diag.php index 4c851238ad..29e83182fe 100644 --- a/pandora_console/extras/pandora_diag.php +++ b/pandora_console/extras/pandora_diag.php @@ -54,7 +54,7 @@ $rows = db_get_all_rows_in_table('tupdate_settings'); $settings = new StdClass; foreach ($rows as $row) { - $settings->$row['key'] = $row['value']; + $settings->{$row['key']} = $row['value']; } echo ' diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index 658f7dd9fc..54a0a77d49 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -228,11 +228,11 @@ foreach ($result as $row) { $rowPair = !$rowPair; $data = array(); - $data[0] = $row["id_usuario"]; + $data[0] = io_safe_output($row["id_usuario"]); $data[1] = ui_print_session_action_icon($row["accion"], true) . $row["accion"]; $data[2] = ui_print_help_tip(date($config["date_format"], $row["utimestamp"]), true) . ui_print_timestamp($row["utimestamp"], true); - $data[3] = $row["ip_origen"]; + $data[3] = io_safe_output($row["ip_origen"]); $data[4] = io_safe_output($row["descripcion"]); if ($enterprise_include !== ENTERPRISE_NOT_HOOK) { diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 4e6be0e725..f94cb7737b 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -484,7 +484,7 @@ $table->data[4][1] = __('Disabled') . ' ' . $table->data[4][1] .= __('Enabled') . ' ' . html_print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); if (enterprise_installed()) { - $table->data[4][2] = __('Url address'); + $table->data[4][2] = __('Url address') . ui_print_help_tip(__('URL address must be complete, for example: https://pandorafms.com/'), true); $table->data[4][3] = html_print_input_text ('url_description', $url_description, '', 45, 255, true); }else{ diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php index a884912e63..ae35e31cb7 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_explorer.php @@ -261,7 +261,7 @@ if ($snmpwalk) { } if ($create_modules) { - $modules = get_parameter("module", array()); + $modules = io_safe_output(get_parameter("module", array())); $devices = array(); $processes = array(); diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 36b67da66f..fab0ad7637 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -924,9 +924,8 @@ if ($update_agent) { // if modified some agent paramenter enterprise_hook ('update_agent', array ($id_agente)); ui_print_success_message (__('Successfully updated')); - $unsafe_alias = io_safe_output($alias); db_pandora_audit("Agent management", - "Updated agent $unsafe_alias", false, false, $info); + "Updated agent $alias", false, false, $info); } } @@ -1427,7 +1426,7 @@ if ($update_module) { $edit_module = true; db_pandora_audit("Agent management", - "Fail to try update module '".io_safe_output($name)."' for agent " . io_safe_output($agent["alias"])); + "Fail to try update module '$name' for agent " . $agent["alias"]); } else { if ($prediction_module == 3) { @@ -1445,7 +1444,7 @@ if ($update_module) { $agent = db_get_row ('tagente', 'id_agente', $id_agente); db_pandora_audit("Agent management", - "Updated module '".io_safe_output($name)."' for agent ". io_safe_output($agent["alias"]), false, false, io_json_mb_encode($values)); + "Updated module '$name' for agent ".$agent["alias"], false, false, io_json_mb_encode($values)); } } @@ -1586,7 +1585,7 @@ if ($create_module) { $edit_module = true; $moduletype = $id_module; db_pandora_audit("Agent management", - "Fail to try added module '".io_safe_output($name)."' for agent ".io_safe_output($agent["alias"])); + "Fail to try added module '$name' for agent ".$agent["alias"]); } else { if ($prediction_module == 3) { @@ -1604,7 +1603,7 @@ if ($create_module) { $agent = db_get_row ('tagente', 'id_agente', $id_agente); db_pandora_audit("Agent management", - "Added module '".io_safe_output($name)."' for agent ".io_safe_output($agent["alias"]), false, true, io_json_mb_encode($values)); + "Added module '$name' for agent ".$agent["alias"], false, true, io_json_mb_encode($values)); } } @@ -1727,7 +1726,7 @@ if ($delete_module) { // DELETE agent module ! $agent = db_get_row ('tagente', 'id_agente', $id_agente); db_pandora_audit("Agent management", - "Deleted module '".io_safe_output($module_data["nombre"])."' for agent ".io_safe_output($agent["alias"])); + "Deleted module '".$module_data["nombre"]."' for agent ".$agent["alias"]); } @@ -1760,11 +1759,11 @@ if (!empty($duplicate_module)) { // DUPLICATE agent module ! if ($result) { db_pandora_audit("Agent management", - "Duplicate module '".$id_duplicate_module."' for agent " . io_safe_output($agent["alias"]) . " with the new id for clon " . $result); + "Duplicate module '".$id_duplicate_module."' for agent " . $agent["alias"] . " with the new id for clon " . $result); } else { db_pandora_audit("Agent management", - "Fail to try duplicate module '".$id_duplicate_module."' for agent " . io_safe_output($agent["alias"])); + "Fail to try duplicate module '".$id_duplicate_module."' for agent " . $agent["alias"]); } } @@ -1943,7 +1942,7 @@ switch ($tab) { var aget_id_os = ''; - if('' != $('#text-name').val() && + if('' != $('#text-name').val() && '' == 19){ event.preventDefault(); @@ -1977,7 +1976,7 @@ switch ($tab) { var module_type_snmp = ''; - if('' != $('#text-name').val() && ( + if('' != $('#text-name').val() && ( module_type_snmp == 15 || module_type_snmp == 16 || module_type_snmp == 17 || module_type_snmp == 18)){ event.preventDefault(); diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 994b5a69ea..9ba82d9934 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -481,15 +481,14 @@ if ($agents !== false) { if($agent["id_os"] == 100){ $cluster = db_get_row_sql('select id from tcluster where id_agent = '.$agent['id_agente']); - echo ''.$agent['nombre'].''; - + echo ''.$agent['alias'].''; }else{ echo "" . ''.$agent["alias"].'' . ""; - } + } echo "
"; $in_planned_downtime = db_get_sql('SELECT executed FROM tplanned_downtime diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index ff06f4c4f7..494b0798c4 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -313,7 +313,7 @@ $selectIntervalUp = ''; $selectIntervalDown = ''; $sortField = get_parameter('sort_field'); $sort = get_parameter('sort', 'none'); -$selected = 'border: 1px solid black;'; +$selected = ''; $order[] = array('field' => 'tmodule_group.name', 'order' => 'ASC'); @@ -547,7 +547,8 @@ $table->head[7] = __('Warn'); $table->head[8] = __('Action'); -$table->head[9] = '' . __('D.') . ''; +$table->head[9] = '' . __('Del.') . ''. + html_print_checkbox('all_delete', 0, false, true, false); $table->rowstyle = array(); $table->style = array (); @@ -778,12 +779,13 @@ foreach ($modules as $module) { if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW")) { // Delete module - $data[9] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true); - $data[9] .= ' '; $data[9] .= html_print_image ('images/cross.png', true, array ('title' => __('Delete'))); $data[9] .= ' '; + $data[9] .= html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true); } array_push ($table->data, $data); @@ -807,17 +809,32 @@ if (check_acl_one_of_groups ($config['id_user'], $all_groups, "AW")) { diff --git a/pandora_console/godmode/events/event_filter.php b/pandora_console/godmode/events/event_filter.php index 2b054d1ef1..a8f26eb087 100644 --- a/pandora_console/godmode/events/event_filter.php +++ b/pandora_console/godmode/events/event_filter.php @@ -111,7 +111,7 @@ $table->head[2] = __('Event type'); $table->head[3] = __('Event status'); $table->head[4] = __('Severity'); $table->head[5] = __('Action') . - html_print_checkbox('all_delete', 0, false, true, false, 'check_all_checkboxes();'); + html_print_checkbox('all_delete', 0, false, true, false); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->align = array (); @@ -178,12 +178,32 @@ echo ""; ?> + diff --git a/pandora_console/godmode/events/event_responses.list.php b/pandora_console/godmode/events/event_responses.list.php index 09b5f7353d..6e707eadb2 100644 --- a/pandora_console/godmode/events/event_responses.list.php +++ b/pandora_console/godmode/events/event_responses.list.php @@ -16,6 +16,8 @@ global $config; +include_once($config['homedir'] . "/include/functions_event_responses.php"); + check_login (); if (! check_acl($config['id_user'], 0, "PM")) { @@ -25,14 +27,7 @@ if (! check_acl($config['id_user'], 0, "PM")) { return; } -if (!is_user_admin($config['id_user'])) { - $id_groups = array_keys(users_get_groups(false, "PM")); - $event_responses = db_get_all_rows_filter('tevent_response', - array('id_group' => $id_groups)); -} -else { - $event_responses = db_get_all_rows_in_table('tevent_response'); -} +$event_responses = event_responses_get_responses(); if(empty($event_responses)) { ui_print_info_message ( array('no_close'=>true, 'message'=> __('No responses found') ) ); diff --git a/pandora_console/godmode/events/event_responses.php b/pandora_console/godmode/events/event_responses.php index 638774ab56..f5e1034563 100644 --- a/pandora_console/godmode/events/event_responses.php +++ b/pandora_console/godmode/events/event_responses.php @@ -16,6 +16,8 @@ global $config; +include_once($config['homedir'] . "/include/functions_event_responses.php"); + check_login (); if (! check_acl($config['id_user'], 0, "PM")) { @@ -40,24 +42,9 @@ switch($action) { $values['modal_height'] = get_parameter('modal_height'); $values['new_window'] = get_parameter('new_window'); $values['params'] = get_parameter('params'); - if (enterprise_installed()) { - if ($values['type'] == 'command') { - $values['server_to_exec'] = get_parameter('server_to_exec'); - } - else { - $values['server_to_exec'] = 0; - } - } - else { - $values['server_to_exec'] = 0; - } - - if($values['new_window'] == 1) { - $values['modal_width'] = 0; - $values['modal_height'] = 0; - } - - $result = db_process_sql_insert('tevent_response', $values); + $values['server_to_exec'] = get_parameter('server_to_exec'); + + $result = event_responses_create_response($values); if($result) { ui_print_success_message(__('Response added succesfully')); @@ -78,26 +65,10 @@ switch($action) { $values['modal_height'] = get_parameter('modal_height'); $values['new_window'] = get_parameter('new_window'); $values['params'] = get_parameter('params'); - if (enterprise_installed()) { - if ($values['type'] == 'command') { - $values['server_to_exec'] = get_parameter('server_to_exec'); - } - else { - $values['server_to_exec'] = 0; - } - } - else { - $values['server_to_exec'] = 0; - } - - if($values['new_window'] == 1) { - $values['modal_width'] = 0; - $values['modal_height'] = 0; - } - + $values['server_to_exec'] = get_parameter('server_to_exec'); $response_id = get_parameter('id_response',0); - - $result = db_process_sql_update('tevent_response', $values, array('id' => $response_id)); + + $result = event_responses_update_response($response_id, $values); if($result) { ui_print_success_message(__('Response updated succesfully')); diff --git a/pandora_console/godmode/extensions.php b/pandora_console/godmode/extensions.php index 22bfe01496..43bb463368 100644 --- a/pandora_console/godmode/extensions.php +++ b/pandora_console/godmode/extensions.php @@ -151,10 +151,13 @@ $table->head[] = __("Login Function"); $table->head[] = __("Agent operation tab"); $table->head[] = __("Agent godmode tab"); $table->head[] = __("Operation"); - +/* $table->width = array(); $table->width[] = '30%'; $table->width[] = '30%'; +*/ +$table->width = '100%'; +$table->class = 'databox data'; $table->align = array(); $table->align[] = 'left'; diff --git a/pandora_console/godmode/massive/massive_add_profiles.php b/pandora_console/godmode/massive/massive_add_profiles.php index 559ffa6291..253992b7f5 100644 --- a/pandora_console/godmode/massive/massive_add_profiles.php +++ b/pandora_console/godmode/massive/massive_add_profiles.php @@ -48,7 +48,7 @@ if ($create_profiles) { // If the profile doesnt exist, we create it if ($profile_data === false) { db_pandora_audit("User management", - "Added profile for user ".io_safe_output($user)); + "Added profile for user ".io_safe_input($user)); $return = profile_create_user_profile ($user, $profile, $group); if ($return !== false) { $n_added ++; diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index 047eb08b75..8462d75b7e 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -245,11 +245,12 @@ $module_types = db_get_all_rows_filter ( if ($module_types === false) $module_types = array (); -$types = ''; +$types = array(); foreach ($module_types as $type) { $types[$type['id_tipo']] = $type['description']; } +$table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; $table->data = array (); diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 949d13269a..f09d495c0a 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -175,6 +175,7 @@ if ($update) { } } +$table = new stdClass(); $table->id = 'delete_table'; $table->class = 'databox filters'; $table->width = '100%'; @@ -235,7 +236,7 @@ switch ($config["dbtype"]) { if ($module_types === false) $module_types = array (); -$types = ''; +$types = array(); foreach ($module_types as $type) { $types[$type['id_tipo']] = $type['description']; } @@ -248,22 +249,18 @@ $snmp_versions['3'] = 'v. 3'; $table->width = '100%'; $table->data = array (); - - $table->data['selection_mode'][0] = __('Selection mode'); $table->data['selection_mode'][1] = ''.__('Select modules first ') . '' . html_print_radio_button_extended ("selection_mode", 'modules', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true).'
'; $table->data['selection_mode'][1] .= ''.__('Select agents first ') . '' . html_print_radio_button_extended ("selection_mode", 'agents', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true); - - - $table->rowclass['form_modules_1'] = 'select_modules_row'; $table->data['form_modules_1'][0] = __('Module type'); $table->data['form_modules_1'][0] .= ''; + $types[0] = __('All'); $table->colspan['form_modules_1'][1] = 2; $table->data['form_modules_1'][1] = html_print_select ($types, diff --git a/pandora_console/godmode/massive/massive_operations.php b/pandora_console/godmode/massive/massive_operations.php index 276ab4c478..2359482713 100755 --- a/pandora_console/godmode/massive/massive_operations.php +++ b/pandora_console/godmode/massive/massive_operations.php @@ -32,6 +32,7 @@ enterprise_include ('godmode/massive/massive_operations.php'); $tab = (string) get_parameter ('tab', 'massive_agents'); $option = (string) get_parameter ('option', ''); + $options_alerts = array( 'add_alerts' => __('Bulk alert add'), 'delete_alerts' => __('Bulk alert delete'), @@ -224,6 +225,11 @@ if ((get_cfg_var("max_execution_time") != 0) echo ''; } +if ($tab == 'massive_policies' && is_central_policies_on_node()){ + ui_print_warning_message(__('This node is configured with centralized mode. All policies information is read only. Go to metaconsole to manage it.')); + return; +} + // Catch all submit operations in this view to display Wait banner $submit_action = get_parameter('go'); $submit_update = get_parameter('updbutton'); diff --git a/pandora_console/godmode/modules/manage_nc_groups.php b/pandora_console/godmode/modules/manage_nc_groups.php index bc437ac1cf..8c4fa71bf9 100644 --- a/pandora_console/godmode/modules/manage_nc_groups.php +++ b/pandora_console/godmode/modules/manage_nc_groups.php @@ -193,7 +193,7 @@ $table->class = 'databox data'; $table->head = array (); $table->head[0] = __('Name'); $table->head[1] = __('Action') . - html_print_checkbox('all_delete', 0, false, true, false, 'check_all_checkboxes();'); + html_print_checkbox('all_delete', 0, false, true, false); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->align = array (); @@ -250,12 +250,31 @@ enterprise_hook('close_meta_frame'); ?> diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index e2f3cdab26..77b9fceda5 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -49,7 +49,7 @@ You can of course remove the warnings, that's why we include the source and do n ui_print_page_header (__('Module management') . ' » ' . __('Network component management'), "", false, - "network_component", true,"",true,"modulemodal"); + "network_component", true,"",false,"modulemodal"); $sec = 'gmodules'; } @@ -568,8 +568,7 @@ $table->head[3] = __('Description'); $table->head[4] = __('Group'); $table->head[5] = __('Max/Min'); $table->head[6] = __('Action') . - html_print_checkbox('all_delete', 0, false, true, false, - 'check_all_checkboxes();'); + html_print_checkbox('all_delete', 0, false, true, false); $table->size = array (); $table->size[1] = '75px'; $table->size[6] = '80px'; @@ -650,12 +649,30 @@ enterprise_hook('close_meta_frame'); ?> diff --git a/pandora_console/godmode/modules/manage_network_templates.php b/pandora_console/godmode/modules/manage_network_templates.php index 89dca776bc..c9cc2c1c1d 100644 --- a/pandora_console/godmode/modules/manage_network_templates.php +++ b/pandora_console/godmode/modules/manage_network_templates.php @@ -239,16 +239,33 @@ echo ''; ?> diff --git a/pandora_console/godmode/netflow/nf_edit.php b/pandora_console/godmode/netflow/nf_edit.php index 6ee7258e33..4402826244 100644 --- a/pandora_console/godmode/netflow/nf_edit.php +++ b/pandora_console/godmode/netflow/nf_edit.php @@ -119,8 +119,7 @@ $table->head = array (); $table->head[0] = __('Name'); $table->head[1] = __('Group'); $table->head[2] = __('Action') . - html_print_checkbox('all_delete', 0, false, true, false, - 'check_all_checkboxes();'); + html_print_checkbox('all_delete', 0, false, true, false); $table->style = array (); $table->style[0] = 'font-weight: bold'; $table->align = array (); @@ -174,12 +173,30 @@ enterprise_hook('close_meta_frame'); ?> diff --git a/pandora_console/godmode/reporting/graph_builder.main.php b/pandora_console/godmode/reporting/graph_builder.main.php index b441aeda14..e67f52fcb0 100644 --- a/pandora_console/godmode/reporting/graph_builder.main.php +++ b/pandora_console/godmode/reporting/graph_builder.main.php @@ -60,8 +60,6 @@ if ($edit_graph) { $stacked = $graphInTgraph['stacked']; $period = $graphInTgraph['period']; $id_group = $graphInTgraph['id_group']; - $width = $graphInTgraph['width']; - $height = $graphInTgraph['height']; $check = false; $percentil = $graphInTgraph['percentil']; $summatory_series = $graphInTgraph['summatory_series']; @@ -78,8 +76,6 @@ else { $id_agent = 0; $id_module = 0; $id_group = 0; - $width = 550; - $height = 210; $period = SECONDS_1DAY; $factor = 1; $stacked = 4; @@ -136,15 +132,6 @@ if ($stacked == CUSTOM_GRAPH_GAUGE) $hidden = ' style="display:none;" '; else $hidden = ''; -echo ""; -echo ""; -echo "".__('Width').""; -echo ""; -echo ""; -echo ""; -echo "".__('Height').""; -echo ""; -echo ""; echo ""; echo ""; diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php index 957720f59c..6cf5ed7f30 100644 --- a/pandora_console/godmode/reporting/graph_builder.php +++ b/pandora_console/godmode/reporting/graph_builder.php @@ -81,8 +81,6 @@ if ($add_graph) { $description = get_parameter_post ("description"); $module_number = get_parameter_post ("module_number"); $idGroup = get_parameter_post ('graph_id_group'); - $width = get_parameter_post ("width"); - $height = get_parameter_post ("height"); $stacked = get_parameter ("stacked", 0); $period = get_parameter_post ("period"); $threshold = get_parameter('threshold'); @@ -102,8 +100,6 @@ if ($add_graph) { 'name' => $name, 'description' => $description, 'period' => $period, - 'width' => $width, - 'height' => $height, 'private' => 0, 'id_group' => $idGroup, 'stacked' => $stacked, @@ -134,8 +130,6 @@ if ($update_graph) { $name = get_parameter('name'); $id_group = get_parameter('graph_id_group'); $description = get_parameter('description'); - $width = get_parameter('width'); - $height = get_parameter('height'); $period = get_parameter('period'); $stacked = get_parameter('stacked'); $percentil = get_parameter('percentil'); diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 1bf6548245..d007371704 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -168,8 +168,7 @@ if (!empty ($graphs)) { $op_column = true; $table->align[4] = 'left'; $table->head[4] = __('Op.') . - html_print_checkbox('all_delete', 0, false, true, false, - 'check_all_checkboxes();'); + html_print_checkbox('all_delete', 0, false, true, false); $table->size[4] = '90px'; } $table->data = array (); @@ -236,13 +235,29 @@ else { $("input[name=all_delete]").css("margin-left", "32px"); - function check_all_checkboxes() { - if ($("input[name=all_delete]").prop("checked")) { - $(".check_delete").prop("checked", true); - } - else { - $(".check_delete").prop("checked", false); - } - } + $( document ).ready(function() { + $('[id^=checkbox-delete_multiple]').change(function(){ + if($(this).parent().parent().hasClass('checkselected')){ + $(this).parent().parent().removeClass('checkselected'); + } + else{ + $(this).parent().parent().addClass('checkselected'); + } + }); + + $('[id^=checkbox-all_delete]').change(function(){ + if ($("#checkbox-all_delete").prop("checked")) { + $('[id^=checkbox-delete_multiple]').parent().parent().addClass('checkselected'); + $(".check_delete").prop("checked", true); + } + else{ + $('[id^=checkbox-delete_multiple]').parent().parent().removeClass('checkselected'); + $(".check_delete").prop("checked", false); + } + }); + + }); + + diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index e7e5965946..a929740e39 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -1082,13 +1082,15 @@ You can of course remove the warnings, that's why we include the source and do n WHERE tagente.id_agente = tagent_module_log.id_agent AND tagente.disabled = 0'; } $all_agent_log = db_get_all_rows_sql($sql_log_report); - - foreach ($all_agent_log as $key => $value) { - $agents2[$value['id_agente']] = $value['alias']; + + if(isset($all_agent_log) && is_array($all_agent_log)){ + foreach ($all_agent_log as $key => $value) { + $agents2[$value['id_agente']] = $value['alias']; + } } - + if ((empty($agents2)) || $agents2 == -1) $agents = array(); - + $agents_select = array(); if (is_array($id_agents) || is_object($id_agents)){ foreach ($id_agents as $id) { @@ -1574,7 +1576,8 @@ You can of course remove the warnings, that's why we include the source and do n - + - - - - - - - diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 144f3be45d..ed503f0eae 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -28,6 +28,27 @@ $( document ).ready(function() { }); }); + + $('[id^=checkbox-massive_report_check]').change(function(){ + if($(this).parent().parent().parent().hasClass('checkselected')){ + $(this).parent().parent().parent().removeClass('checkselected'); + } + else{ + $(this).parent().parent().parent().addClass('checkselected'); + } + }); + + $('[id^=checkbox-all_delete]').change(function(){ + if ($("#checkbox-all_delete").prop("checked")) { + $('[id^=checkbox-massive_report_check]').parent().parent().parent().addClass('checkselected'); + $(".check_delete").prop("checked", true); + } + else{ + $('[id^=checkbox-massive_report_check]').parent().parent().parent().removeClass('checkselected'); + $(".check_delete").prop("checked", false); + } + }); + }); @@ -98,7 +119,9 @@ if ($schedule_report != '') { $time = date(TIME_FORMAT); $parameters[0] = get_parameter('id_schedule_report'); //$parameters[1] = db_get_value('schedule_email', 'treport', 'id_report', $id_report); - $parameters[1] = get_parameter('schedule_email'); + $parameters[1] = get_parameter('schedule_email_address'); + $parameters[2] = get_parameter('schedule_subject', ''); + $parameters[3] = get_parameter('schedule_email', ''); $parameters['first_execution'] = strtotime ($date.' '.$time); $values = array( @@ -715,9 +738,10 @@ switch ($action) { if ($edit || $delete) { $columnview = true; if (!isset($table->head[$next])) { - $table->head[$next] = '' . __('Op.') . ''; + $table->head[$next] = '' . __('Op.') . ''. + html_print_checkbox('all_delete', 0, false, true, false); $table->size = array (); - $table->size[$next] = '80px'; + //$table->size[$next] = '80px'; $table->style[$next] = 'text-align:left;'; } @@ -1847,7 +1871,7 @@ switch ($action) { break; } - metaconsole_restore_db_force(); + metaconsole_restore_db(); $temp_sort[$report_item['id_rc']] = $element_name; diff --git a/pandora_console/godmode/reporting/visual_console_builder.data.php b/pandora_console/godmode/reporting/visual_console_builder.data.php index f1ed16157d..1a620ae43f 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.data.php +++ b/pandora_console/godmode/reporting/visual_console_builder.data.php @@ -195,10 +195,10 @@ html_print_submit_button ($textButtonSubmit, 'update_layout', false, echo ''; echo ""; +ui_require_css_file ("color-picker"); +ui_require_jquery_file ("colorpicker"); ?> - - - + - + @@ -95,9 +86,8 @@ if (file_exists ('languages/'.$user_language.'.mo')) { -'; + echo '
'; + switch ($type_graph_pdf) { + case 'combined': echo graphic_combined_module( $module_list, $params, $params_combined ); - echo '
'; - } - elseif($type_graph_pdf == 'sparse'){ - echo '
'; + break; + case 'sparse': echo grafico_modulo_sparse($params); - echo '
'; + break; + case 'pie_chart': + echo flot_pie_chart( + $params['values'], + $params['keys'], + $params['width'], + $params['height'], + $params['water_mark_url'], + $params['font'], + $config['font_size'], + $params['legend_position'], + $params['colors'], + $params['hide_labels'] + ); + break; + case 'vbar': + echo flot_vcolumn_chart( + $params['chart_data'], + $params['width'], + $params['height'], + $params['color'], + $params['legend'], + $params['long_index'], + $params['homeurl'], + $params['unit'], + $params['water_mark_url'], + $params['homedir'], + $params['font'], + $config['font_size'], + $params['from_ux'], + $params['from_wux'], + $params['backgroundColor'], + $params['tick_color'] + ); + break; + case 'hbar': + echo flot_hcolumn_chart( + $params['chart_data'], + $params['width'], + $params['height'], + $params['water_mark_url'], + $params['font'], + $config['font_size'], + $params['backgroundColor'], + $params['tick_color'], + $params['val_min'], + $params['val_max'] + ); + break; + case 'ring_graph': + echo flot_custom_pie_chart ( + $params['chart_data'], + $params['width'], + $params['height'], + $params['colors'], + $params['module_name_list'], + $params['long_index'], + $params['no_data'], + false, + '', + $params['water_mark'], + $params['font'], + $config['font_size'], + $params['unit'], + $params['ttl'], + $params['homeurl'], + $params['background_color'], + $params['legend_position'], + $params['background_color'] + ); + break; + case 'slicebar': + echo flot_slicesbar_graph ( + $params['graph_data'], + $params['period'], + $params['width'], + $params['height'], + $params['legend'], + $params['colors'], + $params['fontpath'], + $params['round_corner'], + $params['homeurl'], + $params['watermark'], + $params['adapt_key'], + $params['stat_winalse'], + $params['id_agent'], + $params['full_legend_daterray'], + $params['not_interactive'], + $params['ttl'], + $params['widgets'], + $params['show'] + ); + break; + default: + # code... + break; } - elseif($type_graph_pdf == 'hbar'){ - echo '
'; - echo hbar_graph( - $params['flash_chart'], - $params['chart_data'], - $params['width'], - $params['height'], - $params['color'], - $params['legend'], - $params['long_index'], - $params['no_data_image'], - $params['xaxisname'], - $params['yaxisname'], - $params['water_mark'], - $params['font'], - $params['font_size'], - $params['unit'], - $params['ttl'], - $params['homeurl'], - $params['backgroundColor'], - $params['tick_color'], - $params['val_min'], - $params['val_max'] - ); - echo '
'; - } - elseif($type_graph_pdf == 'vbar'){ - echo '
'; - echo vbar_graph( - $params['flash_chart'], - $params['chart_data'], - $params['width'], - $params['height'], - $params['color'], - $params['legend'], - $params['long_index'], - $params['no_data_image'], - $params['xaxisname'], - $params['yaxisname'], - $params['water_mark'], - $params['font'], - $params['font_size'], - $params['unit'], - $params['ttl'], - $params['homeurl'], - $params['backgroundColor'], - $params['from_ux'], - $params['from_wux'], - $params['tick_color'] - ); - echo '
'; - } + echo ''; $config['font_size'] = $aux_font_size; -?> - + ?> + + + diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index add78868c6..4a5301cd69 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -20,10 +20,10 @@ */ /** - * Pandora build version and version + * Pandora build version and version */ -$build_version = 'PC181025'; -$pandora_version = 'v7.0NG.728'; +$build_version = 'PC190111'; +$pandora_version = 'v7.0NG.730'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); @@ -78,7 +78,7 @@ else { // Check if mysqli is available if (!(isset($config["mysqli"]))) { - $config["mysqli"] = extension_loaded(mysqli); + $config["mysqli"] = extension_loaded('mysqli'); } $config['start_time'] = microtime (true); @@ -171,19 +171,21 @@ require_once ($ownDir. 'functions_config.php'); date_default_timezone_set("Europe/Madrid"); +////////////////////////////////////// +//// PLEASE DO NOT CHANGE ORDER ////// +////////////////////////////////////// +require_once ($config["homedir"].'/include/load_session.php'); + +if (session_status() === PHP_SESSION_NONE) session_start(); config_process_config(); - config_prepare_session(); -require_once ($config["homedir"].'/include/load_session.php'); -if(session_id() == '') { - $resultado = session_start(); -} -// Set a the system timezone default +// Set a the system timezone default if ((!isset($config["timezone"])) OR ($config["timezone"] == "")) { $config["timezone"] = "Europe/Berlin"; } +//////////////////////////////////////// date_default_timezone_set($config["timezone"]); @@ -250,10 +252,20 @@ if (isset($_POST['vc_refr'])) { //======= Autorefresh code ============================================= -$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'"); -$autorefresh_list = json_decode($select[0]['value']); -$config['autorefresh_white_list'] = array(); -$config['autorefresh_white_list'] = $autorefresh_list; +if(isset($config['id_user'])){ + $select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'"); + if(isset($select[0]['value'])){ + $autorefresh_list = json_decode($select[0]['value']); + } + else{ + $autorefresh_list =null; + } + $config['autorefresh_white_list'] = array(); + $config['autorefresh_white_list'] = $autorefresh_list; +} +else{ + $config['autorefresh_white_list'] = null; +} // Specific metaconsole autorefresh white list sections if (defined('METACONSOLE')) { $config['autorefresh_white_list'][] = 'monitoring/tactical'; diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index c223738b2a..22f46257dc 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -204,6 +204,7 @@ define('CIRCULAR_INTERIOR_PROGRESS_BAR', 16); define('DONUT_GRAPH', 17); define('BARS_GRAPH', 18); define('CLOCK', 19); +define('COLOR_CLOUD', 20); //Some styles define('MIN_WIDTH', 300); define('MIN_HEIGHT', 120); diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php index 45f0a22db6..9982ec24fb 100644 --- a/pandora_console/include/db/mysql.php +++ b/pandora_console/include/db/mysql.php @@ -14,7 +14,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = "utf8") { +function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = null) { global $config; if ($host === null) @@ -42,7 +42,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, } db_change_cache_id ($db, $host); - mysqli_set_charset($connect_id, $charset); + if (isset($charset)) { + mysqli_set_charset($connect_id, $charset); + } mysqli_select_db($connect_id, $db); } @@ -54,7 +56,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, db_change_cache_id ($db, $host); - @mysql_set_charset($connect_id, $charset); + if (isset($charset)) { + @mysql_set_charset($connect_id, $charset); + } mysql_select_db($db, $connect_id); } diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 3b8627bd3f..1e43ae46fd 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -69,6 +69,10 @@ require_once('functions_io.php'); //} function https_is_running() { + if(isset ($_SERVER['HTTP_X_FORWARDED_PROTO']) + && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { + return true; + } if (isset ($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === true || $_SERVER['HTTPS'] == 'on')) { @@ -1373,7 +1377,7 @@ function is_management_allowed($hkey = '') { global $config; return ( (is_metaconsole() && $config["centralized_management"]) || (!is_metaconsole() && !$config["centralized_management"]) - || (!is_metaconsole() && $config["centralized_management"]) && $hkey == hash('sha256', db_get_value ('value', 'tupdate_settings', 'token', 'customer_key'))); + || (!is_metaconsole() && $config["centralized_management"]) && $hkey == generate_hash_to_api()); } /** @@ -1783,10 +1787,7 @@ function check_login ($output = true) { } else { require_once($config["homedir"].'/mobile/include/user.class.php'); - if(session_id() == '') { - session_start (); - } - session_write_close (); + if (isset($_SESSION['user'])) { $user = $_SESSION['user']; $id_user = $user->getIdUser(); @@ -2467,26 +2468,26 @@ function is_double_auth_enabled ($user) { function clear_pandora_error_for_header() { global $config; - + $config["alert_cnt"] = 0; $_SESSION["alert_msg"] = array(); } function set_pandora_error_for_header($message, $title = null) { global $config; - + if (!isset($config['alert_cnt'])) $config['alert_cnt'] = 0; - - if (!isset($_SESSION['alert_msg'])) + + if ( ( !isset($_SESSION['alert_msg']) && (!is_array($_SESSION['alert_msg'])) ) ) $_SESSION['alert_msg'] = array(); - + $message_config = array(); if (isset($title)) $message_config['title'] = $title; $message_config['message'] = $message; $message_config['no_close'] = true; - + $config['alert_cnt']++; $_SESSION['alert_msg'][] = array('type' => 'error', 'message' => $message_config); } @@ -3284,11 +3285,19 @@ function series_type_graph_array($data, $show_elements_graph){ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = false, $module_list = false){ global $config; + if(is_metaconsole()){ + $hack_metaconsole = "../.."; + } + else{ + $hack_metaconsole = ""; + } + $file_js = $config["homedir"] . "/include/web2image.js"; - $url = $config["homeurl"] . "include/chart_generator.php"; + $url = ui_get_full_url(false) . $hack_metaconsole . "/include/chart_generator.php"; + $img_file = "img_". uniqid() .".png"; $img_path = $config["homedir"] . "/attachment/" . $img_file; - $img_url = $config["homeurl"] . "attachment/" . $img_file; + $img_url = ui_get_full_url(false) . $hack_metaconsole . "/attachment/" . $img_file; $width_img = 500; $height_img = (isset($config['graph_image_height'])) ? $config['graph_image_height'] : 280; @@ -3319,12 +3328,16 @@ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = fal . ' "' . $session_id . '"' . ' "' . $params['return_img_base_64'] . '"'; - $result = exec($cmd); + $result = null; + $retcode = null; + exec($cmd, $result, $retcode); + + $img_content = join("\n", $result); if($params['return_img_base_64']){ // To be used in alerts $width_img = 500; - return $result; + return $img_content; } else{ // to be used in PDF files @@ -3368,7 +3381,7 @@ function get_copyright_notice () { */ function generate_csrf_code() { // Start session to make this var permanent - session_start(); + if (session_status() === PHP_SESSION_NONE) session_start(); $_SESSION['csrf_code'] = md5(uniqid(mt_rand(), true)); session_write_close(); return $_SESSION['csrf_code']; @@ -3384,4 +3397,8 @@ function validate_csrf_code() { return isset($code) && isset($_SESSION['csrf_code']) && $_SESSION['csrf_code'] == $code; } + +function generate_hash_to_api(){ + hash('sha256', db_get_value ('value', 'tupdate_settings', '`key`', 'customer_key')); + } ?> diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 1f05227779..7b4592171b 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -361,11 +361,13 @@ function agents_get_agents ($filter = false, $fields = false, break; case AGENT_STATUS_NOT_NORMAL: $status_sql = "( - critical_count > 0 - OR warning_count > 0 - OR unknown_count > 0 - OR total_count = 0 + normal_count <> total_count OR total_count = notinit_count)"; + //The AGENT_STATUS_NOT_NORMAL filter must show all agents that are not in normal status + /*"( + normal_count <> total_count + AND + (normal_count + notinit_count) <> total_count)";*/ break; case AGENT_STATUS_NOT_INIT: $status_sql = "( @@ -825,7 +827,8 @@ function agents_get_group_agents ( $filter = array(); - if (!$noACL) { + // check available groups for target user only if asking for 'All' group + if (!$noACL && $id_group == 0) { $id_group = $id_group == 0 ? array_keys(users_get_groups(false, "AR", false)) : groups_safe_acl($config["id_user"], $id_group, "AR"); @@ -846,7 +849,8 @@ function agents_get_group_agents ( $id_group = groups_get_id_recursive($id_group, true); } - if (!$noACL) { + // check available groups for target user only if asking for 'All' group + if (!$noACL && $id_group == 0) { $id_group = array_keys( users_get_groups(false, "AR", true, false, (array)$id_group)); } @@ -921,6 +925,10 @@ function agents_get_group_agents ( unset ($search["alias"]); } + if (isset($search['id_os'])) { + $filter['id_os'] = $search['id_os']; + } + if (isset($search['status'])) { switch ($search['status']) { case AGENT_STATUS_NORMAL: @@ -1310,7 +1318,7 @@ function agents_get_name ($id_agent, $case = "none") { } /** - * Get alias of an agent. + * Get alias of an agent (cached function). * * @param int $id_agent Agent id. * @param string $case Case (upper, lower, none) @@ -1319,6 +1327,13 @@ function agents_get_name ($id_agent, $case = "none") { */ function agents_get_alias ($id_agent, $case = 'none') { global $config; + // Prepare cache + static $cache = array(); + if (empty($case)) $case = 'none'; + + // Check cache + if (isset($cache[$case][$id_agent])) return $cache[$case][$id_agent]; + if($config['dbconnection_cache'] == null && is_metaconsole()){ $alias = (string) db_get_value ('alias', 'tmetaconsole_agent', 'id_tagente', (int) $id_agent); } else { @@ -1327,13 +1342,15 @@ function agents_get_alias ($id_agent, $case = 'none') { switch ($case) { case 'upper': - return mb_strtoupper($alias, 'UTF-8'); + $alias = mb_strtoupper($alias, 'UTF-8'); + break; case 'lower': - return mb_strtolower($alias, 'UTF-8'); - case 'none': - default: - return ($alias); + $alias = mb_strtolower($alias, 'UTF-8'); + break; } + + $cache[$case][$id_agent] = $alias; + return $alias; } function agents_get_alias_by_name ($name, $case = 'none') { @@ -2774,4 +2791,67 @@ function agents_get_status_clause($state, $show_not_init = true) { // If the state is not an expected state, return no condition return "1=1"; } -?> + +function agents_get_image_status($status){ + switch ($status) { + case AGENT_STATUS_NORMAL: + $image_status = html_print_image( + 'images/status_sets/default/agent_ok.png', + true, + array( + 'title' => __('Agents ok') + ) + ); + break; + case AGENT_STATUS_CRITICAL: + $image_status = html_print_image( + 'images/status_sets/default/agent_critical.png', + true, + array( + 'title' => __('Agents critical') + ) + ); + break; + case AGENT_STATUS_WARNING: + $image_status = html_print_image( + 'images/status_sets/default/agent_warning.png', + true, + array( + 'title' => __('Agents warning') + ) + ); + break; + case AGENT_STATUS_UNKNOWN: + $image_status = html_print_image( + 'images/status_sets/default/agent_down.png', + true, + array( + 'title' => __('Agents unknown') + ) + ); + break; + case AGENT_STATUS_ALERT_FIRED: + $image_status = 'alert'; + break; + case AGENT_STATUS_NOT_INIT: + $image_status = html_print_image( + 'images/status_sets/default/agent_no_data.png', + true, + array( + 'title' => __('Agents not init') + ) + ); + break; + default: + $image_status= html_print_image( + 'images/status_sets/default/agent_ok.png', + true, + array( + 'title' => __('Agents ok') + ) + ); + break; + } + return $image_status; +} +?> \ No newline at end of file diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index 17cc0c8bde..57677b8dea 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -1845,9 +1845,9 @@ function get_group_alerts($id_group, $filter = '', $options = false, } } - $selectText = 'talert_template_modules.*, t2.nombre AS agent_module_name, t3.alias AS agent_name, t4.name AS template_name'; + $selectText = 'DISTINCT talert_template_modules.*, t2.nombre AS agent_module_name, t3.alias AS agent_name, t4.name AS template_name'; if ($count !== false) { - $selectText = 'COUNT(talert_template_modules.id) AS count'; + $selectText = 'COUNT(DISTINCT talert_template_modules.id) AS count'; } $sql = sprintf ("SELECT %s @@ -1871,7 +1871,7 @@ function get_group_alerts($id_group, $filter = '', $options = false, return $alerts[0]['count']; } else { - return $alerts; + return $alerts; } } @@ -2268,5 +2268,121 @@ function alerts_normalize_actions_escalation($escalation) { return $escalation; } +/** + * Check if a command can be added to an action. + * + * @param int Action group id + * @param int Command group id + * + * @return False if command group and alert group are distint of 0 and they are not equal + */ +function alerts_validate_command_to_action($action_group, $command_group) { + // If action group or command group is All, all commands can be applicated. + if ($action_group == 0 || $command_group == 0) return true; + return $action_group == $command_group; +} + +/** + * Print the UI update actions + * + * @param bool Update or create + */ +function alerts_ui_update_or_create_actions($update = true) { + global $config; + $id = (string) get_parameter ('id'); + + // Check ACL of existing aler action + if($update) { + $al_action = alerts_get_alert_action ($id); + if ($al_action !== false) { + if ($al_action['id_group'] == 0) { + if (! check_acl ($config['id_user'], 0, "PM")) { + db_pandora_audit("ACL Violation", + "Trying to access Alert Management"); + require ("general/noaccess.php"); + exit; + } + } + } + } + + $name = (string) get_parameter ('name'); + $id_alert_command = (int) get_parameter ('id_command'); + $group = get_parameter ('group'); + $action_threshold = (int) get_parameter ('action_threshold'); + + // Validate some values + if (!$id_alert_command) { + ui_print_error_message(__('No command specified')); + return; + } + if (!$name) { + ui_print_error_message(__('No name specified')); + return; + } + $comamnd_group = db_get_value('id_group', 'talert_commands', 'id', $id_alert_command); + if(!alerts_validate_command_to_action($group, $comamnd_group)) { + ui_print_error_message(__("Alert and command group does not match")); + return; + } + + // Fill fields info + $info_fields = ''; + $values = array(); + for ($i = 1; $i <= $config['max_macro_fields']; $i++) { + $values['field'.$i] = (string) get_parameter ('field'.$i.'_value'); + $info_fields .= ' Field'.$i.': ' . $values['field'.$i]; + $values['field'.$i.'_recovery'] = (string) get_parameter ('field'.$i.'_recovery_value'); + $info_fields .= ' Field'.$i.'Recovery: ' . $values['field'.$i.'_recovery']; + } + + $values['id_group'] = $group; + $values['action_threshold'] = $action_threshold; + if ($update) { + $values['name'] = $name; + $values['id_alert_command'] = $id_alert_command; + $result = (!$name) ? '' : alerts_update_alert_action ($id, $values); + } else { + $name_check = db_get_value ('name', 'talert_actions', 'name', $name); + if ($name_check) { + $result = ''; + } + else { + $result = alerts_create_alert_action ($name, $id_alert_command, + $values); + $values = array( + "Name" => $name, + "ID alert Command" => $id_alert_command, + "Field information" => $info_fields, + "Group" => $values['id_group'], + "Action threshold" => $values['action_threshold'] + ); + } + } + + if ($result) { + db_pandora_audit( + "Command management", + $update ? "Update alert action #" . $id : "Create alert action #" . $result, + false, + false, + json_encode($values) + ); + } + else { + db_pandora_audit( + "Command management", + $update ? "Fail try to update alert action #" . $id : "Fail try to create alert action", + false, + false, + $update ? json_encode($values) : '' + ); + } + + ui_print_result_message ($result, + $update ? __('Successfully updated') : __('Successfully created'), + $update ? __('Could not be updated') : __('Could not be created') + ); +} ?> diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index cff419acb4..fafb71c0ab 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -31,6 +31,7 @@ include_once($config['homedir'] . "/include/functions_netflow.php"); include_once($config['homedir'] . "/include/functions_servers.php"); include_once($config['homedir'] . "/include/functions_planned_downtimes.php"); include_once($config['homedir'] . "/include/functions_db.php"); +include_once($config['homedir'] . "/include/functions_event_responses.php"); enterprise_include_once ('include/functions_local_components.php'); enterprise_include_once ('include/functions_events.php'); enterprise_include_once ('include/functions_agents.php'); @@ -1411,10 +1412,6 @@ function api_set_create_os($thrash1, $thrash2, $other, $thrash3) { returnError('forbidden', 'string'); return; } - - if (defined ('METACONSOLE')) { - return; - } $values = array(); @@ -1430,6 +1427,11 @@ function api_set_create_os($thrash1, $thrash2, $other, $thrash3) { $resultOrId = false; if ($other['data'][0] != '') { $resultOrId = db_process_sql_insert('tconfig_os', $values); + + if ($resultOrId) + echo __('Success creating OS'); + else + echo __('Error creating OS'); } } @@ -1437,10 +1439,6 @@ function api_set_create_os($thrash1, $thrash2, $other, $thrash3) { function api_set_update_os($id_os, $thrash2, $other, $thrash3) { global $config; - if (defined ('METACONSOLE')) { - return; - } - if (!check_acl($config['id_user'], 0, "AW")) { returnError('forbidden', 'string'); return; @@ -1458,7 +1456,10 @@ function api_set_update_os($id_os, $thrash2, $other, $thrash3) { if ($other['data'][0] != '') { - $result = db_process_sql_update('tconfig_os', $values, array('id_os' => $id_os)); + if (db_process_sql_update('tconfig_os', $values, array('id_os' => $id_os))) + echo __('Success updating OS'); + else + echo __('Error updating OS'); } } @@ -5412,7 +5413,8 @@ function api_set_planned_downtimes_created ($id, $thrash1, $other, $thrash3) { 'periodically_day_to' => $other['data'][14], 'type_downtime' => $other['data'][15], 'type_execution' => $other['data'][16], - 'type_periodicity' => $other['data'][17] + 'type_periodicity' => $other['data'][17], + 'id_user' => $other['data'][18] ); $returned = planned_downtimes_created($values); @@ -6870,7 +6872,6 @@ function api_get_graph_module_data($id, $thrash1, $other, $thrash2) { $ttl = 1; global $config; - $config['flash_charts'] = 0; $params =array( 'agent_module_id' => $id, @@ -6950,7 +6951,7 @@ function api_set_new_user($id, $thrash2, $other, $thrash3) { * @param string $id String username for user login in Pandora * @param $thrash2 Don't use. * @param array $other it's array, $other as param is ;;;;; - * ;;;;;; in this order and separator char + * ;;;;;;in this order and separator char * (after text ; ) and separator (pass in param othermode as othermode=url_encode_separator_) * example: * @@ -6975,15 +6976,14 @@ function api_set_update_user($id, $thrash2, $other, $thrash3) { 'lastname', 'middlename', 'password', - 'email', + 'email', 'phone', 'language', 'comments', 'is_admin', - 'block_size', - 'flash_chart'); - - + 'block_size' + ); + if ($id == "") { returnError('error_update_user', __('Error updating user. Id_user cannot be left blank.')); @@ -8723,9 +8723,213 @@ function api_set_delete_user_profile($id, $thrash1, $other, $thrash2) { returnData('string', array('type' => 'string', 'data' => __('Delete user profile.'))); } +/** + * List all user profiles. + * + * @param Reserved $thrash1 + * @param Reserved $thrash2 + * @param Reserved $thrash3 + * @param string Return type (csv, json, string...) + * + * api.php?op=get&op2=user_profiles_info&return_type=json&apipass=1234&user=admin&pass=pandora + */ +function api_get_user_profiles_info ($thrash1, $thrash2, $thrash3, $returnType) { + global $config; + + if (!check_acl($config['id_user'], 0, "PM")){ + returnError('forbidden', 'string'); + return; + } + + $profiles = db_get_all_rows_filter( + 'tperfil', + array(), + array( + "id_perfil", + "name", + "incident_view as IR", + "incident_edit as IW", + "incident_management as IM", + "agent_view as AR", + "agent_edit as AW", + "agent_disable as AD", + "alert_edit as LW", + "alert_management as LM", + "user_management as UM", + "db_management as DM", + "event_view as ER", + "event_edit as EW", + "event_management as EM", + "report_view as RR", + "report_edit as RW", + "report_management as RM", + "map_view as MR", + "map_edit as MW", + "map_management as MM", + "vconsole_view as VR", + "vconsole_edit as VW", + "vconsole_management as VM", + "pandora_management as PM" + ) + ); + + if ($profiles === false) { + returnError('error_list_profiles', __('Error retrieving profiles')); + } else { + returnData($returnType, array('type' => 'array', 'data' => $profiles)); + } +} + +/** + * Create an user profile. + * + * @param Reserved $thrash1 + * @param Reserved $thrash2 + * @param array parameters in array: name|IR|IW|IM|AR|AW|AD|LW|LM|UM|DM|ER|EW|EM|RR|RW|RM|MR|MW|MM|VR|VW|VM|PM + * @param string Return type (csv, json, string...) + * + * api.php?op=set&op2=create_user_profile_info&return_type=json&other=API_profile%7C1%7C0%7C0%7C1%7C0%7C0%7C0%7C0%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C1%7C0%7C0%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + */ +function api_set_create_user_profile_info ($thrash1, $thrash2, $other, $returnType) { + global $config; + + if (!check_acl($config['id_user'], 0, "PM")){ + returnError('forbidden', 'string'); + return; + } + + $values = array( + 'name' => (string)$other['data'][0], + 'incident_view' => (bool)$other['data'][1] ? 1 : 0, + 'incident_edit' => (bool)$other['data'][2] ? 1 : 0, + 'incident_management' => (bool)$other['data'][3] ? 1 : 0, + 'agent_view' => (bool)$other['data'][4] ? 1 : 0, + 'agent_edit' => (bool)$other['data'][5] ? 1 : 0, + 'agent_disable' => (bool)$other['data'][6] ? 1 : 0, + 'alert_edit' => (bool)$other['data'][7] ? 1 : 0, + 'alert_management' => (bool)$other['data'][8] ? 1 : 0, + 'user_management' => (bool)$other['data'][9] ? 1 : 0, + 'db_management' => (bool)$other['data'][10] ? 1 : 0, + 'event_view' => (bool)$other['data'][11] ? 1 : 0, + 'event_edit' => (bool)$other['data'][12] ? 1 : 0, + 'event_management' => (bool)$other['data'][13] ? 1 : 0, + 'report_view' => (bool)$other['data'][14] ? 1 : 0, + 'report_edit' => (bool)$other['data'][15] ? 1 : 0, + 'report_management' => (bool)$other['data'][16] ? 1 : 0, + 'map_view' => (bool)$other['data'][17] ? 1 : 0, + 'map_edit' => (bool)$other['data'][18] ? 1 : 0, + 'map_management' => (bool)$other['data'][19] ? 1 : 0, + 'vconsole_view' => (bool)$other['data'][20] ? 1 : 0, + 'vconsole_edit' => (bool)$other['data'][21] ? 1 : 0, + 'vconsole_management' => (bool)$other['data'][22] ? 1 : 0, + 'pandora_management' => (bool)$other['data'][23] ? 1 : 0 + ); + + $return = db_process_sql_insert('tperfil', $values); + + if ($return === false) { + returnError('error_create_user_profile_info', __('Error creating user profile')); + } else { + returnData($returnType, array('type' => 'array', 'data' => 1)); + } +} + +/** + * Update an user profile. + * + * @param int Profile id + * @param Reserved $thrash1 + * @param array parameters in array: name|IR|IW|IM|AR|AW|AD|LW|LM|UM|DM|ER|EW|EM|RR|RW|RM|MR|MW|MM|VR|VW|VM|PM + * @param string Return type (csv, json, string...) + * + * api.php?op=set&op2=update_user_profile_info&return_type=json&id=6&other=API_profile_updated%7C%7C%7C%7C1%7C1%7C1%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C%7C&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + */ +function api_set_update_user_profile_info ($id_profile, $thrash1, $other, $returnType) { + global $config; + + if (!check_acl($config['id_user'], 0, "PM")){ + returnError('forbidden', 'string'); + return; + } + + $profile = db_get_row ('tperfil', 'id_perfil', $id_profile); + if ($profile === false) { + returnError('id_not_found', 'string'); + return; + } + + $values = array( + 'name' => $other['data'][0] == '' ? $profile['name'] : (string)$other['data'][0], + 'incident_view' => $other['data'][1] == '' ? $profile['incident_view'] : (bool)$other['data'][1] ? 1 : 0, + 'incident_edit' => $other['data'][2] == '' ? $profile['incident_edit'] : (bool)$other['data'][2] ? 1 : 0, + 'incident_management' => $other['data'][3] == '' ? $profile['incident_management'] : (bool)$other['data'][3] ? 1 : 0, + 'agent_view' => $other['data'][4] == '' ? $profile['agent_view'] : (bool)$other['data'][4] ? 1 : 0, + 'agent_edit' => $other['data'][5] == '' ? $profile['agent_edit'] : (bool)$other['data'][5] ? 1 : 0, + 'agent_disable' => $other['data'][6] == '' ? $profile['agent_disable'] : (bool)$other['data'][6] ? 1 : 0, + 'alert_edit' => $other['data'][7] == '' ? $profile['alert_edit'] : (bool)$other['data'][7] ? 1 : 0, + 'alert_management' => $other['data'][8] == '' ? $profile['alert_management'] : (bool)$other['data'][8] ? 1 : 0, + 'user_management' => $other['data'][9] == '' ? $profile['user_management'] : (bool)$other['data'][9] ? 1 : 0, + 'db_management' => $other['data'][10] == '' ? $profile['db_management'] : (bool)$other['data'][10] ? 1 : 0, + 'event_view' => $other['data'][11] == '' ? $profile['event_view'] : (bool)$other['data'][11] ? 1 : 0, + 'event_edit' => $other['data'][12] == '' ? $profile['event_edit'] : (bool)$other['data'][12] ? 1 : 0, + 'event_management' => $other['data'][13] == '' ? $profile['event_management'] : (bool)$other['data'][13] ? 1 : 0, + 'report_view' => $other['data'][14] == '' ? $profile['report_view'] : (bool)$other['data'][14] ? 1 : 0, + 'report_edit' => $other['data'][15] == '' ? $profile['report_edit'] : (bool)$other['data'][15] ? 1 : 0, + 'report_management' => $other['data'][16] == '' ? $profile['report_management'] : (bool)$other['data'][16] ? 1 : 0, + 'map_view' => $other['data'][17] == '' ? $profile['map_view'] : (bool)$other['data'][17] ? 1 : 0, + 'map_edit' => $other['data'][18] == '' ? $profile['map_edit'] : (bool)$other['data'][18] ? 1 : 0, + 'map_management' => $other['data'][19] == '' ? $profile['map_management'] : (bool)$other['data'][19] ? 1 : 0, + 'vconsole_view' => $other['data'][20] == '' ? $profile['vconsole_view'] : (bool)$other['data'][20] ? 1 : 0, + 'vconsole_edit' => $other['data'][21] == '' ? $profile['vconsole_edit'] : (bool)$other['data'][21] ? 1 : 0, + 'vconsole_management' => $other['data'][22] == '' ? $profile['vconsole_management'] : (bool)$other['data'][22] ? 1 : 0, + 'pandora_management' => $other['data'][23] == '' ? $profile['pandora_management'] : (bool)$other['data'][23] ? 1 : 0 + ); + + $return = db_process_sql_update('tperfil', $values, array('id_perfil' => $id_profile)); + + if ($return === false) { + returnError('error_update_user_profile_info', __('Error updating user profile')); + } else { + returnData($returnType, array('type' => 'array', 'data' => 1)); + } +} + +/** + * Delete an user profile. + * + * @param int Profile id + * @param Reserved $thrash1 + * @param Reserved $thrash2 + * @param string Return type (csv, json, string...) + * + * api.php?op=set&op2=delete_user_profile_info&return_type=json&id=7&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + */ +function api_set_delete_user_profile_info ($id_profile, $thrash1, $thrash2, $returnType) { + global $config; + + if (!check_acl($config['id_user'], 0, "PM")){ + returnError('forbidden', 'string'); + return; + } + + $profile = db_get_value ('id_perfil', 'tperfil', 'id_perfil', $id_profile); + if ($profile === false) { + returnError('id_not_found', 'string'); + return; + } + + $return = profile_delete_profile_and_clean_users($id_profile); + + if ($return === false) { + returnError('error_delete_user_profile_info', __('Error deleting user profile')); + } else { + returnData($returnType, array('type' => 'array', 'data' => 1)); + } +} + /** * Create new incident in Pandora. - * + * * @param $thrash1 Don't use. * @param $thrash2 Don't use. * @param array $other it's array, $other as param is ;<description>; @@ -10016,6 +10220,11 @@ function api_set_enable_disable_agent ($id, $thrash2, $other, $thrash3) { } $disabled = ( $other['data'][0] ? 0 : 1 ); + + enterprise_hook( + 'config_agents_update_config_token', + array($id, 'standby', $disabled ? "1" : "0") + ); $result = db_process_sql_update('tagente', array('disabled' => $disabled), array('id_agente' => $id)); @@ -10765,22 +10974,20 @@ function api_set_metaconsole_synch($keys) { array(db_escape_key_identifier('value') => $value), array(db_escape_key_identifier('key') => $key)); } - + // Validate update the license in nodes: enterprise_include_once('include/functions_metaconsole.php'); - list ($nodes_failed, $total_nodes) = metaconsole_update_all_nodes_license(); - if ($nodes_failed === 0) { - echo __('Metaconsole and all nodes license updated'); + $array_metaconsole_update = metaconsole_update_all_nodes_license(); + if ($array_metaconsole_update[0] === 0) { + ui_print_success_message(__('Metaconsole and all nodes license updated')); } else { - echo __('Metaconsole license updated but %d of %d node synchronization failed', $nodes_failed, $total_nodes); + ui_print_error_message(__('Metaconsole license updated but %d of %d node synchronization failed', $array_metaconsole_update[0], $array_metaconsole_update[1])); } } else{ echo __('This function is only for metaconsole'); } - - } function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3) { @@ -10874,12 +11081,17 @@ function api_set_new_cluster($thrash1, $thrash2, $other, $thrash3) { else db_pandora_audit("Report management", "Failed to create cluster agent $name"); - returnData('string', - array('type' => 'string', 'data' => (int)$id_cluster)); + if ($id_cluster !== false) + returnData('string', + array('type' => 'string', 'data' => (int)$id_cluster)); + else + returnError('error_set_new_cluster', __('Failed to create cluster.')); } else { returnError('error_set_new_cluster', __('Agent name cannot be empty.')); return; } + + return; } function api_set_add_cluster_agent($thrash1, $thrash2, $other, $thrash3) { @@ -11462,6 +11674,159 @@ function api_get_modules_id_name_by_cluster_name ($cluster_name){ } + /** + * @param $trash1 + * @param $trash2 + * @param mixed $trash3 + * @param $returnType + * Example: + * api.php?op=get&op2=event_responses&return_type=csv&apipass=1234&user=admin&pass=pandora + */ +function api_get_event_responses($trash1, $trash2, $trash3, $returnType) { + global $config; + + // Error if user cannot read event responses. + if (!check_acl($config['id_user'], 0, "PM")) { + returnError('forbidden', $returnType); + return; + } + + $responses = event_responses_get_responses(); + if (empty($responses)) { + returnError('no_data_to_show', $returnType); + return; + } + + returnData ($returnType, array('type' => 'array', 'data' => $responses)); +} + + /** + * @param $id_response + * @param $trash2 + * @param mixed $trash3 + * @param $returnType + * Example: + * api.php?op=set&op2=delete_event_response&id=7&apipass=1234&user=admin&pass=pandora + */ +function api_set_delete_event_response($id_response, $trash1, $trash2, $returnType) { + global $config; + + // Error if user cannot read event responses. + if (!check_acl($config['id_user'], 0, "PM")) { + returnError('forbidden', $returnType); + return; + } + + // Check if id exists + $event_group = db_get_value('id_group', 'tevent_response','id', $id_response); + if ($event_group === false) { + returnError('id_not_found', $returnType); + return; + } + + // Check user if can edit the module + if (!check_acl($config['id_user'], $event_group, "PM")) { + returnError('forbidden', $returnType); + return; + } + + $result = db_process_sql_delete('tevent_response', array('id' => $id_response)); + returnData ($returnType, array('type' => 'string', 'data' => $result)); +} + +/** + * @param $trash1 + * @param $trash2 + * @param mixed $other. Serialized params + * @param $returnType + * Example: + * api.php?op=set&op2=create_event_response&other=response%7Cdescription%20response%7Ctouch%7Ccommand%7C0%7C650%7C400%7C0%7Cresponse%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + */ +function api_set_create_event_response($trash1, $trash2, $other, $returnType) { + global $config; + + // Error if user cannot read event responses. + if (!check_acl($config['id_user'], 0, "PM")) { + returnError('forbidden', $returnType); + return; + } + + $values = array(); + $values['name'] = $other['data'][0]; + $values['description'] = $other['data'][1]; + $values['target'] = $other['data'][2]; + $values['type'] = $other['data'][3]; + $values['id_group'] = $other['data'][4]; + $values['modal_width'] = $other['data'][5]; + $values['modal_height'] = $other['data'][6]; + $values['new_window'] = $other['data'][7]; + $values['params'] = $other['data'][8]; + $values['server_to_exec'] = $other['data'][9]; + + // Error if user has not permission for the group. + if (!check_acl($config['id_user'], $values['id_group'], "PM")) { + returnError('forbidden', $returnType); + return; + } + + $return = event_responses_create_response($values) ? 1 : 0; + + returnData ($returnType, array('type' => 'string', 'data' => $return)); +} + +/** + * @param $id_response + * @param $trash2 + * @param mixed $other. Serialized params + * @param $returnType + * Example: + * api.php?op=set&op2=update_event_response&id=7&other=response%7Cdescription%20response%7Ctouch%7Ccommand%7C0%7C650%7C400%7C0%7Cresponse%7C0&other_mode=url_encode_separator_%7C&apipass=1234&user=admin&pass=pandora + */ +function api_set_update_event_response($id_response, $trash1, $other, $returnType) { + global $config; + + // Error if user cannot read event responses. + if (!check_acl($config['id_user'], 0, "PM")) { + returnError('forbidden', $returnType); + return; + } + + // Check if id exists + $event_response = db_get_row('tevent_response','id', $id_response); + if ($event_response === false) { + returnError('id_not_found', $returnType); + return; + } + + // Check user if can edit the module + if (!check_acl($config['id_user'], $event_response['id_group'], "PM")) { + returnError('forbidden', $returnType); + return; + } + + $values = array(); + $values['name'] = $other['data'][0] == '' ? $event_response['name'] : $other['data'][0]; + $values['description'] = $other['data'][1] == '' ? $event_response['description'] : $other['data'][1]; + $values['target'] = $other['data'][2] == '' ? $event_response['target'] : $other['data'][2]; + $values['type'] = $other['data'][3] == '' ? $event_response['type'] : $other['data'][3]; + $values['id_group'] = $other['data'][4] == '' ? $event_response['id_group'] : $other['data'][4]; + $values['modal_width'] = $other['data'][5] == '' ? $event_response['modal_width'] : $other['data'][5]; + $values['modal_height'] = $other['data'][6] == '' ? $event_response['modal_height'] : $other['data'][6]; + $values['new_window'] = $other['data'][7] == '' ? $event_response['new_window'] : $other['data'][7]; + $values['params'] = $other['data'][8] == '' ? $event_response['params'] : $other['data'][8]; + $values['server_to_exec'] = $other['data'][9] == '' ? $event_response['server_to_exec'] : $other['data'][9]; + + // Error if user has not permission for the group. + if (!check_acl($config['id_user'], $values['id_group'], "PM")) { + returnError('forbidden', $returnType); + return; + } + + $return = event_responses_update_response($id_response, $values) ? 1 : 0; + + returnData ($returnType, array('type' => 'string', 'data' => $return)); +} + function api_get_cluster_items ($cluster_id){ global $config; @@ -11507,10 +11872,7 @@ function util_api_check_agent_and_print_error($id_agent, $returnType, $access = } function api_get_user_info($thrash1, $thrash2, $other, $returnType) { - if (defined ('METACONSOLE')) { - return; - } - + $separator = ';'; $other = json_decode(base64_decode($other['data']),true); @@ -11784,5 +12146,91 @@ function api_set_delete_traps ($id, $thrash2, $other, $thrash3) { } + +function api_get_group_id_by_name($thrash1, $thrash2, $other, $thrash3) { + if (defined ('METACONSOLE')) { + return; + } + + $sql = sprintf('SELECT id_grupo + FROM tgrupo WHERE nombre = "'.$other['data'].'"'); + + $group_id = db_get_all_rows_sql($sql); + + if (count($group_id) > 0 and $group_id !== false) { + $data = array('type' => 'array', 'data' => $group_id); + + returnData('csv', $data, ';'); + } + else { + returnError('error_group_name', 'No groups retrieved.'); + } +} +function api_get_timezone($thrash1, $thrash2, $other, $thrash3) { + if (defined ('METACONSOLE')) { + return; + } + + $sql = sprintf('SELECT value + FROM tconfig WHERE token = "timezone"'); + + $timezone = db_get_all_rows_sql($sql); + + if (count($timezone) > 0 and $timezone !== false) { + + $data = array('type' => 'string', 'data' => $timezone); + + returnData('string',array('type' => 'string','data' => $data['data'][0]['value'])); + + } + else { + returnError('error_timezone', 'No timezone retrieved.'); + } +} + +function api_get_language($thrash1, $thrash2, $other, $thrash3) { + if (defined ('METACONSOLE')) { + return; + } + + $sql = sprintf('SELECT value + FROM tconfig WHERE token = "language"'); + + $language = db_get_all_rows_sql($sql); + + if (count($language) > 0 and $language !== false) { + + $data = array('type' => 'string', 'data' => $language); + + returnData('string',array('type' => 'string','data' => $data['data'][0]['value'])); + + } + else { + returnError('error_language', 'No language retrieved.'); + } +} + +function api_get_session_timeout($thrash1, $thrash2, $other, $thrash3) { + if (defined ('METACONSOLE')) { + return; + } + + $sql = sprintf('SELECT value + FROM tconfig WHERE token = "session_timeout"'); + + $language = db_get_all_rows_sql($sql); + + if (count($language) > 0 and $language !== false) { + + $data = array('type' => 'string', 'data' => $language); + + returnData('string',array('type' => 'string','data' => $data['data'][0]['value'])); + + } + else { + returnError('error_session_timeout', 'No session timeout retrieved.'); + } +} + ?> diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index d911ef731f..bd0c78bd76 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -43,7 +43,6 @@ function config_create_value ($token, $value) { */ function config_update_value ($token, $value) { global $config; - $config['flash_charts'] = true; // Include functions_io to can call __() function include_once($config['homedir'] . '/include/functions_io.php'); @@ -1033,11 +1032,11 @@ function config_process_config () { } if (!isset ($config["replication_interval"])) { - config_update_value ('replication_interval', 120); + config_update_value ('replication_interval', 10); } if (!isset ($config["replication_limit"])) { - config_update_value ('replication_limit', 1000); + config_update_value ('replication_limit', 50); } if (!isset ($config["replication_dbengine"])) { @@ -1533,7 +1532,7 @@ function config_process_config () { else { if (!json_decode(io_safe_output($config['ad_adv_perms']))) { $temp_ad_adv_perms = array(); - if ($config['ad_adv_perms'] != '') { + if (!isset($config['ad_adv_perms']) && $config['ad_adv_perms'] != '') { $perms = explode(';', io_safe_output($config['ad_adv_perms'])); foreach ($perms as $ad_adv_perm) { if (preg_match('/[\[\]]/',$ad_adv_perm)) { @@ -1597,7 +1596,7 @@ function config_process_config () { else { if (!json_decode(io_safe_output($config['ldap_adv_perms']))) { $temp_ldap_adv_perms = array(); - if ($config['ldap_adv_perms'] != '') { + if (!isset($config['ad_adv_perms']) && $config['ldap_adv_perms'] != '') { $perms = explode(';', io_safe_output($config['ldap_adv_perms'])); foreach ($perms as $ad_adv_perm) { if (preg_match('/[\[\]]/',$ad_adv_perm)) { @@ -2024,6 +2023,20 @@ function config_process_config () { config_update_value('ehorus_req_timeout', 5); } + if (is_metaconsole()) { + if (!isset($config["metaconsole_deploy_collection"])) { + config_update_value('metaconsole_deploy_collection', 0); + } + + if (!isset($config["metaconsole_deploy_inventory_plugin"])) { + config_update_value('metaconsole_deploy_inventory_plugin', 0); + } + + if (!isset($config["metaconsole_deploy_plugin_server"])) { + config_update_value('metaconsole_deploy_plugin_server', 0); + } + } + /* Finally, check if any value was overwritten in a form */ config_update_config(); } @@ -2232,6 +2245,29 @@ function config_check () { __("phantomjs is not installed")); } } + + + $php_version = phpversion(); + $php_version_array = explode('.', $php_version); + if($php_version_array[0] < 7){ + if ($config['language'] == 'es') { + $url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Instalaci%C3%B3n_y_actualizaci%C3%B3n_PHP_7'; + } + else{ + $url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:_PHP_7'; + } + + set_pandora_error_for_header( + __('For a correct operation of PandoraFMS, PHP must be updated to version 7.0 or higher.') . "<br>" . + __('Otherwise, functionalities will be lost.') . "<br>" . + "<ol><li style='color: #676767'>" . __('Report download in PDF format') . "</li>" . + "<li style='color: #676767'>" . __('Emails Sending') . "</li>" . + "<li style='color: #676767'>" . __('Metaconsole Collections') . "</li>" . + "<li style='color: #676767'>" . '...' . "</li>" . + "</ol>" . + '<a target="blank" href="' . $url_help . '">'.__('Access Help').'</a>', + __("PHP UPDATE REQUIRED")); + } } function config_return_in_bytes($val) { @@ -2260,8 +2296,7 @@ function config_user_set_custom_config() { if ($userinfo['last_connect'] < (time()-SECONDS_1MINUTE)) { update_user($config['id_user'], array('last_connect' => time())); } - - // If block_size or flash_chart are provided then override global settings + if (!empty($userinfo["block_size"]) && ($userinfo["block_size"] != 0)) $config["block_size"] = $userinfo["block_size"]; @@ -2279,9 +2314,14 @@ function config_user_set_custom_config() { function config_prepare_session() { global $config; - - $user = users_get_user_by_id($config["id_user"]); - $user_sesion_time = $user['session_time']; + + if(isset($config["id_user"])){ + $user = users_get_user_by_id($config["id_user"]); + $user_sesion_time = $user['session_time']; + } + else{ + $user_sesion_time = null; + } if ($user_sesion_time == 0) { // Change the session timeout value to session_timeout minutes // 8*60*60 = 8 hours @@ -2291,20 +2331,16 @@ function config_prepare_session() { // Change the session timeout value to session_timeout minutes // 8*60*60 = 8 hours $sessionCookieExpireTime = $user_sesion_time; } - + if ($sessionCookieExpireTime <= 0) $sessionCookieExpireTime = 10 * 365 * 24 * 60 * 60; else $sessionCookieExpireTime *= 60; - - ini_set('session.gc_maxlifetime', $sessionCookieExpireTime); - session_set_cookie_params ($sessionCookieExpireTime); - + // Reset the expiration time upon page load //session_name() is default name of session PHPSESSID - if (isset($_COOKIE[session_name()])) setcookie(session_name(), $_COOKIE[session_name()], time() + $sessionCookieExpireTime, "/"); - + ini_set("post_max_size", $config["max_file_size"]); ini_set("upload_max_filesize", $config["max_file_size"]); } diff --git a/pandora_console/include/functions_cron.php b/pandora_console/include/functions_cron.php index c83b96aa9c..253e06080b 100644 --- a/pandora_console/include/functions_cron.php +++ b/pandora_console/include/functions_cron.php @@ -43,44 +43,55 @@ function cron_update_module_interval ($module_id, $cron) { // Get the number of seconds left to the next execution of the given cron entry. function cron_next_execution ($cron, $module_interval, $module_id) { - + // Get day of the week and month from cron config - list ($minute, $hour, $mday, $month, $wday) = explode (" ", $cron); - + $cron_array = explode (" ", $cron); + $minute = $cron_array[0]; + $hour = $cron_array[1]; + $mday = $cron_array[2]; + $month = $cron_array[3]; + $wday = $cron_array[4]; + // Get last execution time $last_execution = db_get_value('utimestamp', 'tagente_estado', 'id_agente_modulo', $module_id); $cur_time = ($last_execution !== false) ? $last_execution : time(); - + // Any day of the way if ($wday == '*') { $nex_time = cron_next_execution_date ($cron, $cur_time, $module_interval); return $nex_time - $cur_time; } - + // A specific day of the week $count = 0; $nex_time = $cur_time; do { $nex_time = cron_next_execution_date ($cron, $nex_time, $module_interval); $nex_time_wd = $nex_time; - list ($nex_mon, $nex_wday) = explode (" ", date ("m w", $nex_time_wd)); - + + $array_nex = explode (" ", date ("m w", $nex_time_wd)); + $nex_mon = $array_nex[0]; + $nex_wday = $array_nex[1]; + do { // Check the day of the week if ($nex_wday == $wday) { return $nex_time_wd - $cur_time; } - + // Move to the next day of the month $nex_time_wd += SECONDS_1DAY; - list ($nex_mon_wd, $nex_wday) = explode (" ", date ("m w", $nex_time_wd)); + + $array_nex_w = explode (" ", date ("m w", $nex_time_wd)); + $nex_mon_wd = $array_nex_w[0]; + $nex_wday = $array_nex_w[1]; } while ($mday == '*' && $nex_mon_wd == $nex_mon); - + $count++; } while ($count < SECONDS_1MINUTE); - + // Something went wrong, default to 5 minutes return SECONDS_5MINUTES; } diff --git a/pandora_console/include/functions_custom_fields.php b/pandora_console/include/functions_custom_fields.php new file mode 100644 index 0000000000..c182e76479 --- /dev/null +++ b/pandora_console/include/functions_custom_fields.php @@ -0,0 +1,631 @@ +<?php + +// Pandora FMS - http://pandorafms.com +// ================================================== +// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas +// Please see http://pandorafms.org for full contribution list + +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; version 2 + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +/** + * Returns custom field all or 1. + * + * @param integer custom_field_id id. + * @param bool Prepare for select or return all rows. + * + * @return array custom fields data. + */ +function get_custom_fields ($custom_field_id = false, $select = true, $display_on_front = false) { + $fields = ($select) + ? ' tcf.id_field, tcf.name ' + : ' tcf.* '; + + $where = ($custom_field_id) + ? ' WHERE tcf.id_field ='.$custom_field_id + : ' WHERE 1=1'; + + $display = ($display_on_front) + ? ' AND tcf.display_on_front = 1' + : ''; + + $result_array=array(); + if(!is_metaconsole()){ + $sql = sprintf("SELECT + %s + FROM tagent_custom_fields tcf + %s + %s + ", + $fields, + $where, + $display + ); + + $result = db_get_all_rows_sql($sql); + + if(isset($result) && is_array($result)){ + foreach ($result as $key => $value) { + if($select){ + $result_array[$value['name']]= $value['name']; + } + else{ + $result_array[$value['name']]= $value; + } + } + } + } + else{ + $metaconsole_connections = metaconsole_get_connection_names(); + // For all nodes + if(isset($metaconsole_connections) && is_array($metaconsole_connections)){ + $result_meta = array(); + foreach ($metaconsole_connections as $metaconsole) { + // Get server connection data + $server_data = metaconsole_get_connection($metaconsole); + + // Establishes connection + if (metaconsole_load_external_db ($server_data) !== NOERR) continue; + + $sql = sprintf("SELECT + %s + FROM tagent_custom_fields tcf + %s + %s + ", + $fields, + $where, + $display + ); + + $result[]= db_get_all_rows_sql($sql); + + // Restore connection to root node + metaconsole_restore_db(); + + if(isset($result) && is_array($result)){ + foreach ($result as $custom) { + foreach ($custom as $key => $value) { + if($select){ + $result_array[$value['name']]= $value['name']; + } + else{ + $result_array[$value['name']]= $value; + } + } + } + } + } + + } + else{ + $result_array = false; + } + } + + + return $result_array; +} + +/** + * Returns custom field data. + * + * @param integer custom_field_id id. + * + * @return array custom fields data. + */ +function get_custom_fields_data ($custom_field_name) { + if(!isset($custom_field_name)){ + return false; + } + + if(!is_metaconsole()){ + $sql = sprintf("SELECT tcf.id_field, tcf.name, tcd.description + FROM tagent_custom_fields tcf + INNER JOIN tagent_custom_data tcd + ON tcf.id_field = tcd.id_field + INNER JOIN tagente ta + ON tcd.id_agent = ta.id_agente + WHERE tcd.description <> '' + AND tcf.name = '%s' + GROUP BY tcf.id_field, tcd.description", + $custom_field_name + ); + + $result = db_get_all_rows_sql($sql); + if(isset($result) && is_array($result)){ + foreach ($result as $k => $v) { + $array_result[$v['description']] = $v['description']; + } + } + } + else{ + $metaconsole_connections = metaconsole_get_connection_names(); + // For all nodes + if(isset($metaconsole_connections) && is_array($metaconsole_connections)){ + $result_meta = array(); + foreach ($metaconsole_connections as $metaconsole) { + // Get server connection data + $server_data = metaconsole_get_connection($metaconsole); + + // Establishes connection + if (metaconsole_load_external_db ($server_data) !== NOERR) continue; + + $sql = sprintf("SELECT tcf.id_field, tcf.name, tcd.description + FROM tagent_custom_fields tcf + INNER JOIN tagent_custom_data tcd + ON tcf.id_field = tcd.id_field + INNER JOIN tagente ta + ON tcd.id_agent = ta.id_agente + WHERE tcd.description <> '' + AND tcf.name = '%s' + GROUP BY tcf.id_field, tcd.description", $custom_field_name + ); + + $result_meta[]= db_get_all_rows_sql($sql); + + // Restore connection to root node + metaconsole_restore_db(); + } + + $array_result = array(); + if(isset($result_meta) && is_array($result_meta)){ + foreach ($result_meta as $result) { + foreach ($result as $k => $v) { + $array_result[$v['description']] = $v['description']; + } + } + } + } + else{ + $array_result = false; + } + } + return $array_result; +} + +function agent_counters_custom_fields($filters){ + //filter by status agent + $and_status = ""; + + $agent_state_normal = 0; + $agent_state_critical = 0; + $agent_state_warning = 0; + $agent_state_unknown = 0; + $agent_state_notinit = 0; + $agent_state_total = 0; + if(is_array($filters['id_status'])){ + if(!in_array(-1, $filters['id_status'])){ + if(!in_array(AGENT_MODULE_STATUS_NOT_NORMAL, $filters['id_status'])){ + if(count($filters['id_status']) > 0){ + $and_status = " AND ( "; + foreach ($filters['id_status'] as $key => $value) { + $and_status .= ($key != 0) + ? " OR " + : " "; + switch ($value) { + default: + case AGENT_STATUS_NORMAL: + $agent_state_normal = agents_get_status_clause(AGENT_STATUS_NORMAL); + $and_status .= agents_get_status_clause(AGENT_STATUS_NORMAL); + break; + case AGENT_STATUS_CRITICAL: + $and_status .= agents_get_status_clause(AGENT_STATUS_CRITICAL); + $agent_state_critical = agents_get_status_clause(AGENT_STATUS_CRITICAL); + break; + case AGENT_STATUS_WARNING: + $and_status .= agents_get_status_clause(AGENT_STATUS_WARNING); + $agent_state_warning = agents_get_status_clause(AGENT_STATUS_WARNING); + break; + case AGENT_STATUS_UNKNOWN: + $and_status .= agents_get_status_clause(AGENT_STATUS_UNKNOWN); + $agent_state_unknown = agents_get_status_clause(AGENT_STATUS_UNKNOWN); + break; + case AGENT_STATUS_NOT_INIT: + $and_status .= agents_get_status_clause(AGENT_STATUS_NOT_INIT); + $agent_state_notinit = agents_get_status_clause(AGENT_STATUS_NOT_INIT); + break; + } + } + $and_status .= " ) "; + $agent_state_total = agents_get_status_clause(AGENT_STATUS_ALL); + } + } + else{ + $and_status = " AND ( + ( ta.critical_count > 0 ) + OR ( ta.critical_count = 0 AND ta.warning_count > 0 ) + OR ( ta.critical_count = 0 AND ta.warning_count = 0 AND ta.unknown_count > 0 ) + OR ( ta.total_count = ta.notinit_count ) + ) "; + + $agent_state_critical = agents_get_status_clause(AGENT_STATUS_CRITICAL); + $agent_state_warning = agents_get_status_clause(AGENT_STATUS_WARNING); + $agent_state_unknown = agents_get_status_clause(AGENT_STATUS_UNKNOWN); + $agent_state_notinit = agents_get_status_clause(AGENT_STATUS_NOT_INIT); + $agent_state_total = agents_get_status_clause(AGENT_STATUS_ALL); + } + } + else{ + $agent_state_normal = agents_get_status_clause(AGENT_STATUS_NORMAL); + $agent_state_critical = agents_get_status_clause(AGENT_STATUS_CRITICAL); + $agent_state_warning = agents_get_status_clause(AGENT_STATUS_WARNING); + $agent_state_unknown = agents_get_status_clause(AGENT_STATUS_UNKNOWN); + $agent_state_notinit = agents_get_status_clause(AGENT_STATUS_NOT_INIT); + $agent_state_total = agents_get_status_clause(AGENT_STATUS_ALL); + } + } + + //filter by status module + $empty_agents_count = "UNION ALL + SELECT ta.id_agente, + 0 AS c_m_total, + 0 AS mm_normal, + 0 AS mm_critical, + 0 AS mm_warning, + 0 AS mm_unknown, + 0 AS mm_not_init, + 0 AS mm_total + FROM tagente ta + LEFT JOIN tagent_secondary_group tasg + ON ta.id_agente = tasg.id_agent + WHERE ta.disabled = 0 + AND ta.total_count = 0 + $groups_and"; + + $and_module_status = ""; + if(is_array($filters['module_status'])){ + if(!in_array(-1, $filters['module_status'])){ + $empty_agents_count = ""; + if(!in_array(AGENT_MODULE_STATUS_NOT_NORMAL, $filters['module_status'])){ + if(count($filters['module_status']) > 0){ + $and_module_status = " AND ( "; + foreach ($filters['module_status'] as $key => $value) { + $and_module_status .= ($key != 0) + ? " OR (" + : " ("; + switch ($value) { + default: + case AGENT_STATUS_NORMAL: + $and_module_status .= " tae.estado = 0 OR tae.estado = 300 ) "; + break; + case AGENT_STATUS_CRITICAL: + $and_module_status .= " tae.estado = 1 OR tae.estado = 100 ) "; + break; + case AGENT_STATUS_WARNING: + $and_module_status .= " tae.estado = 2 OR tae.estado = 200 ) "; + break; + case AGENT_STATUS_UNKNOWN: + $and_module_status .= " tae.estado = 3 ) "; + break; + case AGENT_STATUS_NOT_INIT: + $and_module_status .= " tae.estado = 4 OR tae.estado = 5 ) "; + break; + } + } + $and_module_status .= " ) "; + } + } + else{ + //not normal + $and_module_status = "AND tae.estado <> 0 AND tae.estado <> 300 "; + $empty_agents_count = ""; + } + } + } + + //filters module + if($filters['module_search']){ + $and_module_search = 'AND tam.nombre LIKE "%' . $filters['module_search'] . '%"'; + $empty_agents_count = ""; + } + + //filter group and check ACL groups + $groups_and = ""; + if (!users_can_manage_group_all("AR")) { + if($filters['group']){ + $user_groups = array_keys(users_get_groups()); + $id_groups = implode(", ", $user_groups); + $groups_and = " AND (ta.id_grupo IN ($id_groups) OR tasg.id_group IN($id_groups))"; + } + } + + if($filters['group']){ + //recursion check acl + if($filters['recursion']){ + $recursion_groups = groups_get_id_recursive($filters['group'], true); + if (!users_can_manage_group_all("AR")) { + if(isset($user_groups) && is_array($user_groups)){ + $groups_intersect = array_intersect($user_groups, $recursion_groups); + if(isset($groups_intersect) && is_array($groups_intersect)){ + $groups_intersect = implode(", ", $groups_intersect); + $groups_and = " AND (ta.id_grupo IN ($groups_intersect) OR tasg.id_group IN($groups_intersect))"; + } + else{ + return false; + } + } + else{ + return false; + } + } + else{ + $recursion_groups = implode(", ", $recursion_groups); + $groups_and = " AND (ta.id_grupo IN ($recursion_groups) OR tasg.id_group IN($recursion_groups))"; + } + } + else{ + $groups_and = " AND (ta.id_grupo =". $filters['group']." OR tasg.id_group =". $filters['group'].")"; + } + } + + //filter custom data + $custom_data_and = ''; + if(!in_array(-1, $filters['id_custom_fields_data'])){ + $custom_data_array = implode("', '", $filters['id_custom_fields_data']); + $custom_data_and = "AND tcd.description IN ('" . $custom_data_array . "')"; + } + + //filter custom name + $custom_field_name = $filters['id_custom_fields']; + + if(is_metaconsole()){ + $metaconsole_connections = metaconsole_get_connection_names(); + // For all nodes + if(isset($metaconsole_connections) && is_array($metaconsole_connections)){ + $result_meta = array(); + $data = array(); + foreach ($metaconsole_connections as $metaconsole) { + // Get server connection data + $server_data = metaconsole_get_connection($metaconsole); + // Establishes connection + if (metaconsole_load_external_db ($server_data) !== NOERR) continue; + + $query = sprintf( + "SELECT tcd.description AS name_data, + SUM(IF($agent_state_total, 1, 0)) AS a_agents, + SUM(IF($agent_state_critical, 1, 0)) AS a_critical, + SUM(IF($agent_state_warning, 1, 0)) AS a_warning, + SUM(IF($agent_state_unknown, 1, 0)) AS a_unknown, + SUM(IF($agent_state_normal, 1, 0)) AS a_normal, + SUM(IF($agent_state_notinit, 1, 0)) AS a_not_init, + SUM(tagent_counters.mm_normal) AS m_normal, + SUM(tagent_counters.mm_critical) AS m_critical, + SUM(tagent_counters.mm_warning) AS m_warning, + SUM(tagent_counters.mm_unknown) AS m_unknown, + SUM(tagent_counters.mm_not_init) AS m_not_init, + SUM(tagent_counters.mm_total) AS m_total + FROM tagent_custom_data tcd + INNER JOIN tagent_custom_fields tcf + ON tcd.id_field = tcf.id_field + INNER JOIN ( + SELECT ta.id_agente, + ta.total_count AS c_m_total, + SUM( IF(tae.estado = 0, 1, 0) ) AS mm_normal, + SUM( IF(tae.estado = 1, 1, 0) ) AS mm_critical, + SUM( IF(tae.estado = 2, 1, 0) ) AS mm_warning, + SUM( IF(tae.estado = 3, 1, 0) ) AS mm_unknown, + SUM( IF(tae.estado = 4 OR tae.estado = 5, 1, 0) ) AS mm_not_init, + COUNT(tam.id_agente_modulo) AS mm_total + FROM tagente ta + LEFT JOIN tagent_secondary_group tasg + ON ta.id_agente = tasg.id_agent + INNER JOIN tagente_modulo tam + ON ta.id_agente = tam.id_agente + INNER JOIN tagente_estado tae + ON tam.id_agente = tae.id_agente + AND tam.id_agente_modulo = tae.id_agente_modulo + WHERE ta.disabled = 0 + AND tam.disabled = 0 + %s + %s + %s + %s + GROUP by ta.id_agente + %s + ) AS tagent_counters + ON tcd.id_agent = tagent_counters.id_agente + INNER JOIN tagente ta + ON ta.id_agente = tagent_counters.id_agente + WHERE tcf.name = '%s' + AND tcd.description <> '' + %s + GROUP BY tcd.description", + $groups_and, + $and_status, + $and_module_search, + $and_module_status, + $empty_agents_count, + $custom_field_name, + $custom_data_and + ); + + $result_meta[$server_data['id']] = db_get_all_rows_sql($query); + + $query_data = sprintf("SELECT + tcd.description, + ta.id_agente, + %d AS id_server, + (CASE + WHEN ta.critical_count > 0 + THEN 1 + WHEN ta.critical_count = 0 + AND ta.warning_count > 0 + THEN 2 + WHEN ta.critical_count = 0 + AND ta.warning_count = 0 + AND ta.unknown_count > 0 + THEN 3 + WHEN ta.critical_count = 0 + AND ta.warning_count = 0 + AND ta.unknown_count = 0 + AND ta.notinit_count <> ta.total_count + THEN 0 + WHEN ta.total_count = ta.notinit_count + THEN 5 + ELSE 0 + END) AS `status` + FROM tagente ta + LEFT JOIN tagent_secondary_group tasg + ON ta.id_agente = tasg.id_agent + INNER JOIN tagente_modulo tam + ON ta.id_agente = tam.id_agente + INNER JOIN tagente_estado tae + ON tam.id_agente = tae.id_agente + AND tam.id_agente_modulo = tae.id_agente_modulo + INNER JOIN tagent_custom_data tcd + ON tcd.id_agent = ta.id_agente + INNER JOIN tagent_custom_fields tcf + ON tcd.id_field = tcf.id_field + WHERE ta.disabled = 0 + AND tcf.name = '%s' + AND tcd.description <> '' + AND tam.disabled = 0 + %s + %s + %s + %s + %s + GROUP BY ta.id_agente + ", + $server_data['id'], + $custom_field_name, + $custom_data_and, + $groups_and, + $and_status, + $and_module_search, + $and_module_status + ); + + $node_result = db_get_all_rows_sql($query_data); + + if (empty($node_result)) $node_result = array(); + + + $data = array_merge($data, $node_result); + // Restore connection to root node + metaconsole_restore_db(); + } + } + + $final_result = array(); + $array_data = array(); + + if(isset($result_meta) && is_array($result_meta)){ + //initialize counters + $final_result['counters_total'] = array( + 't_m_normal' => 0, + 't_m_critical' => 0, + 't_m_warning' => 0, + 't_m_unknown' => 0, + 't_m_not_init' => 0, + 't_m_alerts' => 0, + 't_m_total' => 0, + 't_a_critical' => 0, + 't_a_warning' => 0, + 't_a_unknown' => 0, + 't_a_normal' => 0, + 't_a_not_init' => 0, + 't_a_agents' => 0 + ); + foreach ($result_meta as $k => $nodo) { + if(isset($nodo) && is_array($nodo)){ + foreach ($nodo as $key => $value) { + //Sum counters total + $final_result['counters_total']['t_m_normal'] += $value['m_normal']; + $final_result['counters_total']['t_m_critical'] += $value['m_critical']; + $final_result['counters_total']['t_m_warning'] += $value['m_warning']; + $final_result['counters_total']['t_m_unknown'] += $value['m_unknown']; + $final_result['counters_total']['t_m_not_init'] += $value['m_not_init']; + $final_result['counters_total']['t_m_alerts'] += $value['m_alerts']; + $final_result['counters_total']['t_m_total'] += $value['m_total']; + $final_result['counters_total']['t_a_critical'] += $value['a_critical']; + $final_result['counters_total']['t_a_warning'] += $value['a_warning']; + $final_result['counters_total']['t_a_unknown'] += $value['a_unknown']; + $final_result['counters_total']['t_a_normal'] += $value['a_normal']; + $final_result['counters_total']['t_a_not_init'] += $value['a_not_init']; + $final_result['counters_total']['t_a_agents'] += $value['a_agents']; + + //Sum counters for data + $array_data[$value['name_data']]['m_normal'] += $value['m_normal']; + $array_data[$value['name_data']]['m_critical'] += $value['m_critical']; + $array_data[$value['name_data']]['m_warning'] += $value['m_warning']; + $array_data[$value['name_data']]['m_unknown'] += $value['m_unknown']; + $array_data[$value['name_data']]['m_not_init'] += $value['m_not_init']; + $array_data[$value['name_data']]['m_alerts'] += $value['m_alerts']; + $array_data[$value['name_data']]['m_total'] += $value['m_total']; + $array_data[$value['name_data']]['a_critical'] += $value['a_critical']; + $array_data[$value['name_data']]['a_warning'] += $value['a_warning']; + $array_data[$value['name_data']]['a_unknown'] += $value['a_unknown']; + $array_data[$value['name_data']]['a_normal'] += $value['a_normal']; + $array_data[$value['name_data']]['a_not_init'] += $value['a_not_init']; + $array_data[$value['name_data']]['a_agents'] += $value['a_agents']; + } + } + } + + $final_result['counters_name'] = $array_data; + } + + $final_result['indexed_descriptions'] = $data; + } + else{ + //TODO + $final_result = false; + } + + return $final_result; +} + +function get_filters_custom_fields_view($id = 0, $for_select = false, $name = ""){ + //filter group and check ACL groups + $groups_and = ""; + if (!users_can_manage_group_all()) { + $user_groups = array_keys(users_get_groups(false, "AR", false)); + $id_groups = implode(", ", $user_groups); + $groups_and = " AND (group_search IN ($id_groups)) "; + } + + if($for_select){ + $query = "SELECT id, `name` FROM tagent_custom_fields_filter WHERE 1=1" . $groups_and; + $rs = db_get_all_rows_sql($query); + if(isset($rs) && is_array($rs)){ + foreach ($rs as $key => $value) { + $result[$value['id']] = $value['name']; + } + } + else{ + $result = false; + } + } + else{ + $query = "SELECT * FROM tagent_custom_fields_filter WHERE 1=1" . $groups_and; + + if($id){ + $query .= " AND id = " . $id; + } + + if($name){ + $query .= " AND `name` = '" . $name . "'"; + } + + $result = db_get_all_rows_sql($query); + } + return $result; +} + +function get_group_filter_custom_field_view ($id){ + if(isset($id)){ + $res = db_get_row_filter('tagent_custom_fields_filter',array('id' => $id)); + return $res; + } + return false; +} + +?> \ No newline at end of file diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 063897ea74..386673dc53 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -43,7 +43,7 @@ function db_select_engine() { } } -function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = "utf8") { +function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = null) { global $config; static $error = 0; @@ -544,28 +544,30 @@ function db_get_module_ranges_unknown($id_agente_modulo, $tstart = false, $tend $return = array(); $i=0; - foreach ($events as $event) { - switch ($event["event_type"]) { - case "going_up_critical": - case "going_up_warning": - case "going_up_normal": - case "going_down_critical": - case "going_down_warning": - case "going_down_normal": { - if ($last_status == 1) { - $return[$i]["time_to"] = $event["utimestamp"]; - $i++; - $last_status = 0; + if(is_array($events)){ + foreach ($events as $event) { + switch ($event["event_type"]) { + case "going_up_critical": + case "going_up_warning": + case "going_up_normal": + case "going_down_critical": + case "going_down_warning": + case "going_down_normal": { + if ($last_status == 1) { + $return[$i]["time_to"] = $event["utimestamp"]; + $i++; + $last_status = 0; + } + break; } - break; - } - case "going_unknown":{ - if ($last_status == 0){ - $return[$i] = array(); - $return[$i]["time_from"] = $event["utimestamp"]; - $last_status = 1; + case "going_unknown":{ + if ($last_status == 0){ + $return[$i] = array(); + $return[$i]["time_from"] = $event["utimestamp"]; + $last_status = 1; + } + break; } - break; } } } @@ -893,7 +895,7 @@ function db_uncompress_module_data($id_agente_modulo, $tstart = false, $tend = f } //sort current slice - if(count($return[$pool_id]['data'] > 1)) { + if(count($return[$pool_id]['data']) > 1) { usort( $return[$pool_id]['data'], function ($a, $b) { diff --git a/pandora_console/include/functions_event_responses.php b/pandora_console/include/functions_event_responses.php new file mode 100644 index 0000000000..474b628da3 --- /dev/null +++ b/pandora_console/include/functions_event_responses.php @@ -0,0 +1,80 @@ +<?php + +// Pandora FMS - http://pandorafms.com +// ================================================== +// Copyright (c) 2005-2018 Artica Soluciones Tecnologicas +// Please see http://pandorafms.org for full contribution list + +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation; version 2 + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +/** + * @package Include + * @subpackage Event Responses + */ + +/** + * Get all event responses with all values that user can access + * + * @return array With all table values + */ +function event_responses_get_responses() { + global $config; + $filter = array(); + + // Apply a filter if user cannot see all groups + if (!users_can_manage_group_all()) { + $id_groups = array_keys(users_get_groups(false, "PM")); + $filter = array('id_group' => $id_groups); + } + return db_get_all_rows_filter('tevent_response', $filter); +} + +/** + * Validate the responses data to store in database + * + * @param array (by reference) Array with values to validate and modify + */ +function event_responses_validate_data (&$values) { + if ($values['type'] != "command" || !enterprise_installed()) { + $values['server_to_exec'] = 0; + } + if ($values['new_window'] == 1) { + $values['modal_width'] = 0; + $values['modal_height'] = 0; + } +} + +/** + * Create an event response + * + * @param array With all event response data + * + * @return True if successful insertion + */ +function event_responses_create_response($values) { + event_responses_validate_data($values); + return db_process_sql_insert('tevent_response', $values); +} + +/** + * Update an event response + * + * @param array With all event response data + * + * @return True if successful insertion + */ +function event_responses_update_response($response_id, $values) { + event_responses_validate_data($values); + return db_process_sql_update( + 'tevent_response', $values, array('id' => $response_id) + ); +} + +?> diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index ce5d2f0c42..591f3ae89d 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -95,7 +95,7 @@ function events_get_events ($filter = false, $fields = false) { * * @return mixed False in case of error or invalid values passed. Event row otherwise */ -function events_get_event ($id, $fields = false) { +function events_get_event ($id, $fields = false, $meta = false, $history = false) { if (empty ($id)) return false; global $config; @@ -104,8 +104,10 @@ function events_get_event ($id, $fields = false) { if (! in_array ('id_grupo', $fields)) $fields[] = 'id_grupo'; } + + $table = events_get_events_table($meta, $history); - $event = db_get_row ('tevento', 'id_evento', $id, $fields); + $event = db_get_row ($table, 'id_evento', $id, $fields); if (! check_acl ($config['id_user'], $event['id_grupo'], 'ER')) return false; @@ -851,10 +853,12 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret $filter = '1 = 1'; } + $secondary_join = "LEFT JOIN tagent_secondary_group tasg ON tevento.id_agente = tasg.id_agent"; + $sql = sprintf ("SELECT DISTINCT tevento.* - FROM tevento LEFT JOIN tagent_secondary_group tasg ON tevento.id_agente = tasg.id_agent + FROM tevento %s WHERE %s %s - ORDER BY utimestamp DESC LIMIT %d", $agent_condition, $filter, $limit); + ORDER BY utimestamp DESC LIMIT %d", $secondary_join, $agent_condition, $filter, $limit); $result = db_get_all_rows_sql ($sql); @@ -1888,7 +1892,7 @@ function events_get_response_target($event_id, $response_id, $server_id, $histor ); if($meta) { - metaconsole_restore_db_force(); + metaconsole_restore_db(); } } else { $target = str_replace('_module_address_', __('N/A'), $target); diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index a27d7d2ec2..2913cde8e8 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -495,17 +495,13 @@ function filemanager_file_explorer($real_directory, $relative_directory, if ($homedir_filemanager === false) { $homedir_filemanager = $config['homedir']; - unset($config['homedir_filemanager']); - config_update_value('homedir_filemanager', - $homedir_filemanager); } - else { - $config['homedir_filemanager'] = $homedir_filemanager; - - } - - - + unset($config['homedir_filemanager']); + config_update_value( + 'homedir_filemanager', + $homedir_filemanager + ); + $hack_metaconsole = ''; if (defined('METACONSOLE')) $hack_metaconsole = '../../'; @@ -743,11 +739,11 @@ function filemanager_file_explorer($real_directory, $relative_directory, //Actions buttons //Delete button $data[4] = ''; - $data[4] .= '<span style="">'; + $data[4] .= '<span style="display: flex">'; $typefile = array_pop(explode(".",$fileinfo['name'])); if (is_writable ($fileinfo['realpath']) && - (! is_dir ($fileinfo['realpath']) || count (scandir ($fileinfo['realpath'])) < 3)) { - $data[4] .= '<form method="post" action="' . $url . '" style="display: inline;">'; + (! is_dir ($fileinfo['realpath']) || count (scandir ($fileinfo['realpath'])) < 3) && (!$readOnly)) { + $data[4] .= '<form method="post" action="' . $url . '" style="">'; $data[4] .= '<input type="image" src="images/cross.png" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; $data[4] .= html_print_input_hidden ('filename', $fileinfo['realpath'], true); $data[4] .= html_print_input_hidden('hash', md5($fileinfo['realpath'] . $config['dbpass']), true); diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 32e0e2bf5e..42128d5c74 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -238,7 +238,7 @@ function grafico_modulo_sparse_data( } } - if($array_data === false){ + if ($array_data === false || (!$params['graph_combined'] && !isset($array_data['sum1']['data'][0][1]))) { return false; } @@ -912,7 +912,9 @@ function grafico_modulo_sparse ($params) { else{ $return = graph_nodata_image( $params['width'], - $params['height'] + $params['height'], + 'area', + __('No data to display within the selected interval') ); } } @@ -1015,7 +1017,7 @@ function graphic_combined_module ( $params['stacked'] = $params_combined['stacked']; - if(!isset($params_combined['projection'])){ + if(!isset($params_combined['projection']) || $params_combined['projection'] == false){ $params_combined['projection'] = false; } else{ @@ -1047,6 +1049,10 @@ function graphic_combined_module ( $params_combined['id_graph'] = 0; } + if(!isset($params_combined['type_report'])){ + $params_combined['type_report'] = ''; + } + if(!isset($params['percentil'])){ $params_combined['percentil'] = null; } @@ -1205,8 +1211,8 @@ function graphic_combined_module ( ); $series = db_get_all_rows_sql( - 'SELECT summatory_series,average_series,modules_series - FROM tgraph + 'SELECT summatory_series,average_series, modules_series + FROM tgraph WHERE id_graph = '. $params_combined['id_graph'] ); @@ -1286,7 +1292,6 @@ function graphic_combined_module ( $background_color = $params['backgroundColor']; $datelimit = $date_array["start_date"]; $fixed_font_size = $config['font_size']; - $flash_charts = false; if($config["fixed_graph"] == false){ $water_mark = array( @@ -1300,7 +1305,6 @@ function graphic_combined_module ( ); } - //XXX arreglar estas $long_index = ''; switch ($params_combined['stacked']) { default: @@ -1323,7 +1327,16 @@ function graphic_combined_module ( $i=0; $array_data = array(); + foreach ($module_list as $key => $agent_module_id) { + if(is_metaconsole() && $params_combined['type_report'] == 'automatic_graph'){ + $server = metaconsole_get_connection_by_id ($agent_module_id['server']); + if (metaconsole_connect ($server) != NOERR){ + continue; + } + $agent_module_id = $agent_module_id['module']; + } + $module_data = db_get_row_sql ( 'SELECT * FROM tagente_modulo WHERE id_agente_modulo = ' . @@ -1339,12 +1352,12 @@ function graphic_combined_module ( $data_module_graph['id_module_type'] = $module_data['id_tipo_modulo']; $data_module_graph['module_type'] = modules_get_moduletype_name($data_module_graph['id_module_type']); $data_module_graph['uncompressed'] = is_module_uncompressed($data_module_graph['module_type']); - $data_module_graph['w_min'] = $module_data['min_warning']; - $data_module_graph['w_max'] = $module_data['max_warning']; - $data_module_graph['w_inv'] = $module_data['warning_inverse']; - $data_module_graph['c_min'] = $module_data['min_critical']; - $data_module_graph['c_max'] = $module_data['max_critical']; - $data_module_graph['c_inv'] = $module_data['critical_inverse']; + $data_module_graph['w_min'] = $module_data['min_warning']; + $data_module_graph['w_max'] = $module_data['max_warning']; + $data_module_graph['w_inv'] = $module_data['warning_inverse']; + $data_module_graph['c_min'] = $module_data['min_critical']; + $data_module_graph['c_max'] = $module_data['max_critical']; + $data_module_graph['c_inv'] = $module_data['critical_inverse']; $data_module_graph['module_id'] = $agent_module_id; //stract data @@ -1356,7 +1369,7 @@ function graphic_combined_module ( $i ); - $series_suffix = $i; + $series_suffix = $i; //convert to array graph and weight foreach ($array_data_module as $key => $value) { @@ -1385,6 +1398,10 @@ function graphic_combined_module ( //$array_events_alerts[$series_suffix] = $events; $i++; + + if(is_metaconsole() && $params_combined['type_report'] == 'automatic_graph'){ + metaconsole_restore_db(); + } } if($params_combined['projection']){ @@ -1543,7 +1560,6 @@ function graphic_combined_module ( $water_mark, $array_events_alerts ); - break; case CUSTOM_GRAPH_BULLET_CHART_THRESHOLD: case CUSTOM_GRAPH_BULLET_CHART: @@ -1820,11 +1836,8 @@ function graphic_combined_module ( $height = 500; } - $flash_charts = true; - if($params_combined['stacked'] == CUSTOM_GRAPH_HBARS){ $output = hbar_graph( - true, $graph_values, $width, $height, @@ -1847,7 +1860,6 @@ function graphic_combined_module ( if($params_combined['stacked'] == CUSTOM_GRAPH_VBARS){ $output = vbar_graph( - true, $graph_values, $width, $height, @@ -1941,7 +1953,6 @@ function graphic_combined_module ( $color = color_graph_array(); $output = ring_graph( - true, $graph_values, $width, $height, @@ -2162,8 +2173,8 @@ function graph_alert_status ($defined_alerts, $fired_alerts, $width = 300, $heig 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - $out = pie2d_graph($config['flash_charts'], $data, $width, $height, __("other"), - '', '', $config['fontpath'], $config['font_size'], 1, "hidden", $colors); + $out = pie_graph($data, $width, $height, __("other"), + '', '', $config['fontpath'], $config['font_size'], 1, "hidden", $colors, false); if ($return) { return $out; @@ -2247,11 +2258,22 @@ function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $re if (array_sum($data) == 0) { $data = array(); } - - $out = pie2d_graph($config['flash_charts'], $data, $width, $height, - __("other"), ui_get_full_url(false, false, false, false), '', - $config['fontpath'], $config['font_size'], 1, "hidden", $colors); - + + $out = pie_graph( + $data, + $width, + $height, + __("other"), + ui_get_full_url(false, false, false, false), + '', + $config['fontpath'], + $config['font_size'], + 1, + "hidden", + $colors, + 0 + ); + if ($return) { return $out; } @@ -2323,8 +2345,19 @@ function graph_event_module ($width = 300, $height = 200, $id_agent) { $config['homedir'] . "/images/logo_vertical_water.png", 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - return pie3d_graph($config['flash_charts'], $data, $width, $height, __("other"), - '', $water_mark, $config['fontpath'], $config['font_size'], 1, "bottom"); + + return pie_graph( + $data, + $width, + $height, + __("other"), + '', + $water_mark, + $config['fontpath'], + $config['font_size'], + 1, + "bottom" + ); } function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false, $options = false) { @@ -2400,31 +2433,50 @@ function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $va "&colorRGB=". $colorRGB . "' />"; } -function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $date, $daysWeek = null, $time_from = null, $time_to = null, $width, $height, $home_url, $ttl = 1, $data = false, $round_corner = null) { +function graph_sla_slicebar ( + $id, $period, $sla_min, $sla_max, + $date, $daysWeek = null, $time_from = null, + $time_to = null, $width, $height, $home_url, + $ttl = 1, $data = false, $round_corner = null) { + global $config; - + if ($round_corner === null) { $round_corner = $config['round_corner']; } - - // If the data is not provided, we got it - if ($data === false) { - $data = reporting_get_agentmodule_sla_array ($id, $period, - $sla_min, $sla_max, $date, $daysWeek, null, null); - } - + $col_planned_downtime = '#20973F'; - - $colors = array(1 => COL_NORMAL, + + $colors = array( + 1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN, 5 => COL_DOWNTIME, 6 => COL_NOTINIT, - 7 => COL_IGNORED); - - return slicesbar_graph($data, $period, $width, $height, $colors, - $config['fontpath'], $round_corner, $home_url, $ttl); + 7 => COL_IGNORED + ); + + return $return['chart'] = flot_slicesbar_graph ( + $data, + $period, + $width, + $height, + '', + $colors, + $config['fontpath'], + $round_corner, + $home_url, + '', + '', + false, + 0, + array(), + true, + $ttl, + false, + false + ); } /** @@ -2463,9 +2515,11 @@ function grafico_incidente_prioridad () { 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - return pie3d_graph($config['flash_charts'], $data, 320, 200, + return pie_graph( + $data, 320, 200, __('Other'), '', '', - $config['fontpath'], $config['font_size']); + $config['fontpath'], $config['font_size'] + ); } /** @@ -2503,8 +2557,8 @@ function graph_incidents_status () { $config['homedir'] . "/images/logo_vertical_water.png", 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - - return pie3d_graph($config['flash_charts'], $data, 320, 200, + + return pie_graph($data, 320, 200, __('Other'), '', '', $config['fontpath'], $config['font_size']); } @@ -2560,7 +2614,7 @@ function graphic_incident_group () { 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - return pie3d_graph($config['flash_charts'], $data, 320, 200, + return pie_graph($data, 320, 200, __('Other'), '', '', $config['fontpath'], $config['font_size']); } @@ -2615,7 +2669,8 @@ function graphic_incident_user () { 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - return pie3d_graph($config['flash_charts'], $data, 320, 200, + return pie_graph( + $data, 320, 200, __('Other'), '', '', $config['fontpath'], $config['font_size']); } @@ -2669,7 +2724,8 @@ function graphic_incident_source($width = 320, $height = 200) { 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - return pie3d_graph($config['flash_charts'], $data, $width, $height, + return pie_graph( + $data, $width, $height, __('Other'), '', '', $config['fontpath'], $config['font_size']); } @@ -2677,27 +2733,27 @@ function graphic_incident_source($width = 320, $height = 200) { function graph_events_validated($width = 300, $height = 200, $extra_filters = array(), $meta = false, $history = false) { global $config; global $graphic_type; - + $event_type = false; if (array_key_exists('event_type', $extra_filters)) $event_type = $extra_filters['event_type']; - + $event_severity = false; if (array_key_exists('event_severity', $extra_filters)) $event_severity = $extra_filters['event_severity']; - + $event_status = false; if (array_key_exists('event_status', $extra_filters)) $event_status = $extra_filters['event_status']; - + $event_filter_search = false; if (array_key_exists('event_filter_search', $extra_filters)) $event_filter_search = $extra_filters['event_filter_search']; - + $data_graph = events_get_count_events_validated( - array('id_group' => array_keys(users_get_groups())), null, null, + array('id_group' => array_keys(users_get_groups())), null, null, $event_severity, $event_type, $event_status, $event_filter_search); - + $colors = array(); foreach ($data_graph as $k => $v) { if ($k == __('Validated')) { @@ -2707,17 +2763,26 @@ function graph_events_validated($width = 300, $height = 200, $extra_filters = ar $colors[$k] = COL_CRITICAL; } } - + if($config["fixed_graph"] == false){ $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - - echo pie3d_graph( - true, $data_graph, $width, $height, __("other"), "", + + echo pie_graph( + $data_graph, + $width, + $height, + __("other"), + "", $water_mark, - $config['fontpath'], $config['font_size'], 1, false, $colors); + $config['fontpath'], + $config['font_size'], + 1, + false, + $colors + ); } /** @@ -2825,7 +2890,8 @@ function grafico_eventos_grupo ($width = 300, $height = 200, $url = "", $noWater $water_mark = array(); } - return pie3d_graph($config['flash_charts'], $data, $width, $height, + return pie_graph( + $data, $width, $height, __('Other'), '', $water_mark, $config['fontpath'], $config['font_size'], 1, 'bottom'); } @@ -2911,7 +2977,8 @@ function grafico_eventos_total($filter = "", $width = 320, $height = 200, $noWat $water_mark = array(); } - return pie3d_graph($config['flash_charts'], $data, $width, $height, + return pie_graph( + $data, $width, $height, __('Other'), '', $water_mark, $config['fontpath'], $config['font_size'], 1, 'bottom', $colors); } @@ -2961,7 +3028,8 @@ function grafico_eventos_usuario ($width, $height) { 'file' => $config['homedir'] . "/images/logo_vertical_water.png", 'url' => ui_get_full_url("/images/logo_vertical_water.png", false, false, false)); - return pie3d_graph($config['flash_charts'], $data, $width, $height, + return pie_graph( + $data, $width, $height, __('Other'), '', $water_mark, $config['fontpath'], $config['font_size']); } @@ -2977,10 +3045,11 @@ function grafico_eventos_usuario ($width, $height) { function graph_custom_sql_graph ($id, $width, $height, $type = 'sql_graph_vbar', $only_image = false, $homeurl = '', $ttl = 1, $max_num_elements = 8) { - + global $config; + $SQL_GRAPH_MAX_LABEL_SIZE = 20; - + $report_content = db_get_row ('treport_content', 'id_rc', $id); if($id != null){ $historical_db = db_get_value_sql("SELECT historical_db from treport_content where id_rc =".$id); @@ -2995,42 +3064,30 @@ function graph_custom_sql_graph ($id, $width, $height, $sql = db_get_row('treport_custom_sql', 'id', $report_content["treport_custom_sql_id"]); $sql = io_safe_output($sql['sql']); } - + if (($config['metaconsole'] == 1) && defined('METACONSOLE')) { $metaconsole_connection = enterprise_hook('metaconsole_get_connection', array($report_content['server_name'])); - + if ($metaconsole_connection === false) { return false; } - + if (enterprise_hook('metaconsole_load_external_db', array($metaconsole_connection)) != NOERR) { //ui_print_error_message ("Error connecting to ".$server_name); return false; } } - - - switch ($config["dbtype"]) { - case "mysql": - case "postgresql": - break; - case "oracle": - $sql = str_replace(";", "", $sql); - break; - } - + $data_result = db_get_all_rows_sql ($sql,$historical_db); - - - + if (($config['metaconsole'] == 1) && defined('METACONSOLE')) enterprise_hook('metaconsole_restore_db'); - + if ($data_result === false) $data_result = array (); - + $data = array (); - + $count = 0; foreach ($data_result as $data_item) { $count++; @@ -3073,21 +3130,15 @@ function graph_custom_sql_graph ($id, $width, $height, } } - $flash_charts = true; - if ($ttl == 2) { - $flash_charts = false; - } - if($config["fixed_graph"] == false){ $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - + switch ($type) { case 'sql_graph_vbar': // vertical bar return vbar_graph( - $flash_charts, $data, $width, $height, @@ -3111,7 +3162,6 @@ function graph_custom_sql_graph ($id, $width, $height, break; case 'sql_graph_hbar': // horizontal bar return hbar_graph( - $flash_charts, $data, $width, $height, @@ -3132,8 +3182,17 @@ function graph_custom_sql_graph ($id, $width, $height, ); break; case 'sql_graph_pie': // Pie - return pie3d_graph($flash_charts, $data, $width, $height, __("other"), $homeurl, - $water_mark, $config['fontpath'], '', $ttl); + return pie_graph( + $data, + $width, + $height, + __("other"), + $homeurl, + $water_mark, + $config['fontpath'], + $config['font_size'], + $ttl + ); break; } } @@ -3148,17 +3207,14 @@ function graph_custom_sql_graph ($id, $width, $height, * @param string homeurl * @param bool return or echo the result */ -function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false, $from_agent_view = false) { +function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $homeurl, $return = false, $from_agent_view = false, $widgets=false) { global $config; global $graphic_type; - - - $data = array (); - - //$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph - $resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph - $interval = (int) ($period / $resolution); + $data = array (); + + //TODO interval + $interval = 24; $date = get_system_time (); $datelimit = $date - $period; $periodtime = floor ($period / $interval); @@ -3167,39 +3223,34 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho $legend = array(); $full_legend = array(); $full_legend_date = array(); - + $cont = 0; for ($i = 0; $i < $interval; $i++) { $bottom = $datelimit + ($periodtime * $i); if (! $graphic_type) { - if ($config['flash_charts']) { - $name = date('H:i', $bottom); - } - else { - $name = date('H\h', $bottom); - } + $name = date('H:i', $bottom); } else { $name = $bottom; } - + // Show less values in legend if ($cont == 0 or $cont % 2) $legend[$cont] = $name; - + if ($from_agent_view) { $full_date = date('Y/m/d', $bottom); $full_legend_date[$cont] = $full_date; } $full_legend[$cont] = $name; - + $top = $datelimit + ($periodtime * ($i + 1)); $event = db_get_row_filter ('tevento', array ('id_agente' => $id_agent, 'utimestamp > '.$bottom, 'utimestamp < '.$top), 'criticity, utimestamp'); - + if (!empty($event['utimestamp'])) { $data[$cont]['utimestamp'] = $periodtime; switch ($event['criticity']) { @@ -3222,23 +3273,10 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho } $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN); - + // Draw slicebar graph - if ($config['flash_charts']) { - $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent, $full_legend_date); - } - else { - $out = slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'], $config['round_corner'], $homeurl); - - // Draw legend - $out .= "<br>"; - $out .= " "; - foreach ($legend as $hour) { - $out .= "<span style='font-size: 6pt'>" . $hour . "</span>"; - $out .= " "; - } - } - + $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent, $full_legend_date, 0, 1, $widgets); + if ($return) { return $out; } @@ -3263,13 +3301,10 @@ function graph_graphic_moduleevents ($id_agent, $id_module, $width, $height, $pe $data = array (); - //$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph - $resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph - $interval = (int) ($period / $resolution); - $date = get_system_time (); + $interval = 24; + $date = get_system_time(); $datelimit = $date - $period; $periodtime = floor ($period / $interval); - $time = array (); $data = array (); $legend = array(); $full_legend = array(); @@ -3278,12 +3313,7 @@ function graph_graphic_moduleevents ($id_agent, $id_module, $width, $height, $pe for ($i = 0; $i < $interval; $i++) { $bottom = $datelimit + ($periodtime * $i); if (! $graphic_type) { - if ($config['flash_charts']) { - $name = date('H:i:s', $bottom); - } - else { - $name = date('H\h', $bottom); - } + $name = date('H\h', $bottom); } else { $name = $bottom; @@ -3326,23 +3356,31 @@ function graph_graphic_moduleevents ($id_agent, $id_module, $width, $height, $pe $cont++; } - $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN); + $colors = array( + 1 => COL_NORMAL, + 2 => COL_WARNING, + 3 => COL_CRITICAL, + 4 => COL_UNKNOWN + ); - // Draw slicebar graph - if ($config['flash_charts']) { - $out = flot_slicesbar_graph($data, $period, $width, $height, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', '', false, $id_agent); - } - else { - $out = slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'], $config['round_corner'], $homeurl); - - // Draw legend - $out .= "<br>"; - $out .= " "; - foreach ($legend as $hour) { - $out .= "<span style='font-size: 6pt'>" . $hour . "</span>"; - $out .= " "; - } - } + $out = flot_slicesbar_graph( + $data, + $period, + 100, + $height, + $full_legend, + $colors, + $config['fontpath'], + $config['round_corner'], + $homeurl, + '', + '', + false, + $id_agent, + array(), + true, + 1 + ); if ($return) { return $out; @@ -3570,6 +3608,7 @@ function fullscale_data ( } } else{ + if ($data_uncompress === false) $data_uncompress = array(); foreach ($data_uncompress as $k) { foreach ($k["data"] as $v) { if (isset($v["type"]) && $v["type"] == 1) { # skip unnecesary virtual data @@ -3638,7 +3677,9 @@ function fullscale_data ( $data["sum" . $series_suffix]['min'] = $min_value_min; $data["sum" . $series_suffix]['max'] = $max_value_max; - $data["sum" . $series_suffix]['avg'] = $sum_data/$count_data; + $data["sum" . $series_suffix]['avg'] = $count_data == 0 + ? 0 + : $sum_data/$count_data; } if($show_percentil && !$compare){ @@ -3846,18 +3887,14 @@ function graph_netflow_aggregate_pie ($data, $aggregate, $ttl = 1, $only_image = $i++; } - $flash_chart = $config['flash_charts']; - if ($only_image) { - $flash_chart = false; - } - if($config["fixed_graph"] == false){ $water_mark = array('file' => $config['homedir'] . "/images/logo_vertical_water.png", 'url' => ui_get_full_url("images/logo_vertical_water.png", false, false, false)); } - return pie3d_graph($flash_chart, $values, 370, 200, + return pie_graph( + $values, 370, 200, __('Other'), $config['homeurl'], $water_mark, $config['fontpath'], $config['font_size'], $ttl); } @@ -4033,28 +4070,34 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu $colors = array(1 => '#38B800', 2 => '#FFFF00', 3 => '#FF0000', 4 => '#C3C3C3'); // Draw slicebar graph - if ($config['flash_charts']) { - echo flot_slicesbar_graph($data, $period, $width, 50, $legend, $colors, $config['fontpath'], $config['round_corner'], $homeurl, '', $adapt_key, $stat_win); - } - else { - echo slicesbar_graph($data, $period, $width, 15, $colors, $config['fontpath'], $config['round_corner'], $homeurl); - } + echo flot_slicesbar_graph( + $data, + $period, + $width, + 50, + $legend, + $colors, + $config['fontpath'], + $config['round_corner'], + $homeurl, + '', + $adapt_key, + $stat_win + ); } function graph_nodata_image($width = 300, $height = 110, $type = 'area', $text = '') { - $image = ui_get_full_url('images/image_problem_area_small.png', + $image = ui_get_full_url('images/image_problem_area.png', false, false, false); // if ($text == '') { // $text = __('No data to show'); // } + $text_div = '<div class="nodata_text" style="text-align:center; padding: 30px 0; display:block; font-size:9.5pt;">' . $text . '</div>'; - $text_div = '<div class="nodata_text">' . $text . '</div>'; + $image_div = $text_div . '<div class="nodata_container" style="background-position: top; width:40%;height:40%;background-size: contain;background-image: url(\'' . $image . '\');"><div></div></div>'; - $image_div = '<div class="nodata_container" style="width:80%;height:80%;background-size: 80% 80%;background-image: url(\'' . $image . '\');">' . - $text_div . '</div>'; - - $div = '<div style="width:' . $width . 'px; height:' . $height . 'px; border: 1px dotted #ddd; background-color: white; margin: 0 auto;">' . + $div = '<div style="width:' . $width . 'px; height:' . $height . 'px; background-color: white; margin: 0 auto;">' . $image_div . '</div>'; return $div; @@ -4359,7 +4402,7 @@ function graph_monitor_wheel ($width = 550, $height = 600, $filter = false) { $data_agents[$agent_id]['children'][$module_group_id]['children'][] = $data_module; unset($modules[$module_id]); } - function order_module_group_keys ($value, $key) { + function order_module_group_keys ($value) { $value['children'] = array_merge($value['children']); return $value; } diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 2ce647c324..be2c23518d 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -14,6 +14,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +global $config; + require_once ($config['homedir'].'/include/functions_users.php'); /** @@ -439,7 +441,7 @@ function groups_get_all($groupWithAgents = false) { * Get all groups recursive from an initial group. * * @param int Id of the parent group - * @param bool Whether to return All group or not + * @param bool Whether to force recursive search ignoring propagation (true) or not (false) * * @return Array with all result groups */ @@ -449,10 +451,11 @@ function groups_get_id_recursive($id_parent, $all = false) { $return = array_merge($return, array($id_parent)); //Check propagate - $id = db_get_value_filter('id_grupo', 'tgrupo', array('id_grupo' => $id_parent, 'propagate' => 1)); + $propagate = db_get_value_filter('propagate', 'tgrupo', array('id_grupo' => $id_parent)); - if (($id !== false) || $all) { + if (($propagate != 1) || $all) { $children = db_get_all_rows_filter("tgrupo", array('parent' => $id_parent, 'disabled' => 0), array('id_grupo')); + if ($children === false) { $children = array(); } @@ -1226,7 +1229,7 @@ function groups_get_monitors_counter ($group, $agent_filter = array(), $module_f else $module_status = array($module_filter["status"]); - $status_array = ""; + $status_array = array(); foreach ($module_status as $status) { switch ($status) { case AGENT_MODULE_STATUS_ALL: @@ -1699,7 +1702,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) { if ($parent === false && (!isset($group['parent']) || $group['parent'] == 0 || !in_array($group['parent'], $groups))) { $return[$id] = $group; //unset($groups[$id]); - $children = groups_get_tree_good($groups, $id); + $children = groups_get_tree_good($groups, $id, $noUse); if (!empty($children)) { $return[$id]['children'] = $children; @@ -1711,7 +1714,7 @@ function groups_get_tree_good (&$groups, $parent = false, &$childs) { else if ($parent && isset($group['parent']) && $group['parent'] == $parent) { $return[$id] = $group; //unset($groups[$id]); - $children = groups_get_tree_good($groups, $id); + $children = groups_get_tree_good($groups, $id, $noUse); if (!empty($children)) { $return[$id]['children'] = $children; diff --git a/pandora_console/include/functions_groupview.php b/pandora_console/include/functions_groupview.php index 15b4d577bf..55256313b2 100644 --- a/pandora_console/include/functions_groupview.php +++ b/pandora_console/include/functions_groupview.php @@ -68,6 +68,7 @@ function groupview_get_modules_counters($groups_ids = false) { ta.id_grupo AS g FROM $table ta WHERE ta.id_grupo IN ($groups_ids) + AND ta.disabled = 0 GROUP BY ta.id_grupo UNION ALL SELECT SUM(ta.normal_count) AS module_normal, @@ -95,16 +96,18 @@ function groupview_get_all_counters($tree_group) { ? 'tmetaconsole_agent_secondary_group' : 'tagent_secondary_group'; $sql = - "SELECT SUM(ta.normal_count) AS _monitors_ok_, - SUM(ta.critical_count) AS _monitors_critical_, + "SELECT SUM(ta.critical_count) AS _monitors_critical_, SUM(ta.warning_count) AS _monitors_warning_, SUM(ta.unknown_count) AS _monitors_unknown_, SUM(ta.notinit_count) AS _monitors_not_init_, - SUM(ta.fired_count) AS _monitors_alerts_fired_, + SUM(ta.normal_count) AS _monitors_ok_, SUM(ta.total_count) AS _monitor_checks_, + SUM(ta.fired_count) AS _monitors_alerts_fired_, SUM(IF(ta.critical_count > 0, 1, 0)) AS _agents_critical_, + SUM(IF(ta.critical_count = 0 AND ta.warning_count > 0, 1, 0)) AS _agents_warning_, SUM(IF(ta.critical_count = 0 AND ta.warning_count = 0 AND ta.unknown_count > 0, 1, 0)) AS _agents_unknown_, SUM(IF(ta.total_count = ta.notinit_count, 1, 0)) AS _agents_not_init_, + SUM(IF(ta.total_count = ta.normal_count AND ta.total_count <> ta.notinit_count, 1, 0)) AS _agents_ok_, COUNT(ta.id_agente) AS _total_agents_, '$all_name' AS _name_, 0 AS _id_, @@ -169,9 +172,11 @@ function groupview_get_groups_list($id_user = false, $access = 'AR', $is_not_pag $list[$id_group]['_id_'] = $agent_counter['id']; $list[$id_group]['_iconImg_'] = $agent_counter['icon']; - $list[$id_group]['_agents_not_init_'] = $agent_counter['counters']['not_init']; - $list[$id_group]['_agents_unknown_'] = $agent_counter['counters']['unknown']; $list[$id_group]['_agents_critical_'] = $agent_counter['counters']['critical']; + $list[$id_group]['_agents_warning_'] = $agent_counter['counters']['warning']; + $list[$id_group]['_agents_unknown_'] = $agent_counter['counters']['unknown']; + $list[$id_group]['_agents_not_init_'] = $agent_counter['counters']['not_init']; + $list[$id_group]['_agents_ok_'] = $agent_counter['counters']['ok']; $list[$id_group]['_total_agents_'] = $agent_counter['counters']['total']; $list[$id_group]['_monitors_critical_'] = (int)$modules_counters[$id_group]['total_module_critical']; diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 932e8a3457..d19dc7f513 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -97,6 +97,15 @@ function hd ($var, $file = '', $oneline = false) { html_debug_print ($var, $file, $oneline); } +function debug () { + $args_num = func_num_args(); + $arg_list = func_get_args(); + + for ($i = 0; $i < $args_num; $i++) { + html_debug_print($arg_list[$i], true); + } +} + function html_f2str($function, $params) { ob_start(); @@ -1008,7 +1017,7 @@ function html_print_input_text_extended ($name, $value, $id, $alt, $size, $maxle ++$idcounter; $valid_attrs = array ("accept", "disabled", "maxlength", - "name", "readonly", "size", "value", "accesskey", + "name", "readonly", "placeholder", "size", "value", "accesskey", "class", "dir", "id", "lang", "style", "tabindex", "title", "xml:lang", "onfocus", "onblur", "onselect", "onchange", "onclick", "ondblclick", "onmousedown", @@ -1338,6 +1347,36 @@ function html_print_input_hidden_extended($name, $value, $id, $return = false, $ echo $output; } +/** + * Render a color input element. + * + * The element will have an id like: "hidden-$name" + * + * @param string $name Input name. + * @param int $value Input value. Decimal representation of the color's hexadecimal value. + * @param string $class Set the class of input. + * @param bool $return Whether to return an output string or echo now (optional, echo by default). + * + * @return string HTML code if return parameter is true. + */ +function html_print_input_color ($name, $value, $class = false, $return = false) { + $attr_type = 'type="color"'; + $attr_id = 'id="color-' . htmlspecialchars($name, ENT_QUOTES) . '"'; + $attr_name = 'name="' . htmlspecialchars($name, ENT_QUOTES) . '"'; + $attr_value = 'value="' . htmlspecialchars($value, ENT_QUOTES) . '"'; + $attr_class = 'class="' . ($class !== false ? htmlspecialchars($class, ENT_QUOTES) : "") . '"'; + + $output = '<input ' + . $attr_type . ' ' + . $attr_id . ' ' + . $attr_name . ' ' + . $attr_value . ' ' + . $attr_class . ' />'; + + if ($return) return $output; + echo $output; +} + /** * Render an submit input button element. * @@ -2479,7 +2518,7 @@ function html_print_result_div ($text) { $text = preg_replace ('/\n/i','<br>',$text); $text = preg_replace ('/\s/i',' ',$text); - $enclose = "<div id='result_div' style='width: 100%; height: 100%; overflow: scroll; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left'>"; + $enclose = "<div id='result_div' style='width: 100%; height: 100%; overflow: auto; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left'>"; $enclose .= $text; $enclose .= "</div>"; return $enclose; diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index 058003215f..57603eca0b 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -194,7 +194,7 @@ function io_html_to_ascii($hex) { * * @return void */ -function io_safe_output_array(&$item, $key, $utf8 = true) { +function io_safe_output_array(&$item, $key=false, $utf8=true) { $item = io_safe_output($item, $utf8); } @@ -374,13 +374,18 @@ function __ ($string /*, variable arguments */) { global $l10n; global $config; static $extensions_cache = array(); - - if (array_key_exists($config["id_user"], $extensions_cache)) { - $extensions = $extensions_cache[$config["id_user"]]; + + if( !isset($config["id_user"]) && count($extensions_cache) > 0 ) { + if (array_key_exists($config["id_user"], $extensions_cache)) { + $extensions = $extensions_cache[$config["id_user"]]; + } + else { + $extensions = extensions_get_extensions(); + $extensions_cache[$config["id_user"]] = $extensions; + } } - else { - $extensions = extensions_get_extensions(); - $extensions_cache[$config["id_user"]] = $extensions; + else{ + $extension =null; } if (empty($extensions)) $extensions = array(); @@ -490,7 +495,7 @@ function io_input_password($password) { global $config; enterprise_include_once('include/functions_crypto.php'); - $ciphertext = enterprise_hook('crypto_encrypt', array($password)); + $ciphertext = enterprise_hook('openssl_encrypt_decrypt', array('encrypt', $password)); if ($ciphertext === ENTERPRISE_NOT_HOOK) { return $password; } @@ -499,7 +504,7 @@ function io_input_password($password) { } /* - * Process the given password read from the Pandora FMS Database, + * Process the given password read from the Pandora FMS Database, * decrypting it if necessary. * * @param string password Password read from the DB. @@ -510,7 +515,7 @@ function io_output_password($password) { global $config; enterprise_include_once('include/functions_crypto.php'); - $plaintext = enterprise_hook('crypto_decrypt', array($password)); + $plaintext = enterprise_hook('openssl_encrypt_decrypt', array('decrypt', $password)); if ($plaintext === ENTERPRISE_NOT_HOOK) { return $password; } diff --git a/pandora_console/include/functions_pandora_networkmap.php b/pandora_console/include/functions_pandora_networkmap.php index 22df6a582b..90d6ef3022 100644 --- a/pandora_console/include/functions_pandora_networkmap.php +++ b/pandora_console/include/functions_pandora_networkmap.php @@ -175,6 +175,7 @@ function networkmap_process_networkmap($id = 0) { $nodes_and_relations['nodes'] = array(); $index = 0; foreach ($nodes as $key => $node) { + $nodes_and_relations['nodes'][$index]['id'] = $node["id"]; $nodes_and_relations['nodes'][$index]['id_map'] = $id; $nodes_and_relations['nodes'][$index]['x'] = (int)$node['coords'][0]; @@ -303,6 +304,7 @@ function networkmap_process_networkmap($id = 0) { $index = 0; $node_center = array(); foreach ($nodes as $key => $node) { + $nodes_and_relations['nodes'][$index]['id'] = $node["id"]; $nodes_and_relations['nodes'][$index]['id_map'] = $id; $children_count = 0; @@ -1072,6 +1074,7 @@ function networkmap_loadfile($id = 0, $file = '', $node_id = $items[1]; $node_x = $items[2] * 100; //200 is for show more big $node_y = $height_map - $items[3] * 100; //200 is for show more big + $data['id'] = $node_id; $data['text'] = ''; $data['image'] = ''; $data['width'] = 10; diff --git a/pandora_console/include/functions_planned_downtimes.php b/pandora_console/include/functions_planned_downtimes.php index 67f9ec9f29..dd3e9c68bd 100644 --- a/pandora_console/include/functions_planned_downtimes.php +++ b/pandora_console/include/functions_planned_downtimes.php @@ -666,6 +666,7 @@ function planned_downtimes_stop ($downtime) { function planned_downtimes_created ($values) { global $config; + $check_id_user = (bool) db_get_value ('id_user', 'tusuario', 'id_user', $values['id_user']); $check_group = (bool) db_get_value ('id_grupo', 'tgrupo', 'id_grupo', $values['id_group']); $check = (bool) db_get_value ('name', 'tplanned_downtime', 'name', $values['name']); @@ -703,10 +704,30 @@ function planned_downtimes_created ($values) { 'message' => __('Not created. Error inserting data') . ". " . __('The end day must be higher than the start day')); } + else if ($values['type_downtime'] !== 'quiet' && $values['type_downtime'] !== 'disable_agents' && $values['type_downtime'] !== 'disable_agents_alerts') { + return array('return' => false, + 'message' => __('Not created. Error inserting data') . ". " + . __('The downtime must be quiet, disable_agents or disable_agents_alerts')); + } + else if ($values['type_execution'] !== 'periodically' && $values['type_execution'] !== 'once' ) { + return array('return' => false, + 'message' => __('Not created. Error inserting data') . ". " + . __('The execution must be once or periodically')); + } + else if ($values['type_periodicity'] !== 'weekly' && $values['type_periodicity'] !== 'monthly' ) { + return array('return' => false, + 'message' => __('Not created. Error inserting data') . ". " + . __('The periodicity must be weekly or monthly')); + } + else if (!$check_id_user){ + return array('return' => false, + 'message' => __('Not created. Error inserting data') . ". " + . __('There is no user with such id')); + } else if (!$check_group && $values['id_group'] != 0) { return array('return' => false, 'message' => __('Not created. Error inserting data') . ". " - . __('Group not exist')); + . __('There is no group with such id')); } else { if (trim(io_safe_output($values['name'])) != '') { diff --git a/pandora_console/include/functions_profile.php b/pandora_console/include/functions_profile.php index 62306ec060..01d876697d 100644 --- a/pandora_console/include/functions_profile.php +++ b/pandora_console/include/functions_profile.php @@ -144,6 +144,25 @@ function profile_delete_profile ($id_profile) { return (bool)db_process_sql_delete('tperfil', array('id_perfil' => $id_profile)); } +/** + * Delete profile from database and remove from the assigned users (tusuario_perfil) + * + * @param int Profile ID + * + * @return bool Whether or not it's deleted in both tables + */ +function profile_delete_profile_and_clean_users ($id_profile) { + + $profile_deletion = (bool)db_process_sql_delete('tperfil', array('id_perfil' => $id_profile)); + + // Delete in tusuario_perfil only if is needed + if (!(bool)db_get_value('id_perfil', 'tusuario_perfil', 'id_perfil', $id_profile)) { + return $profile_deletion; + } + return $profile_deletion && + (bool)db_process_sql_delete('tusuario_perfil', array('id_perfil' => $id_profile)); +} + /** * Print the table to display, create and delete profiles * diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index b84fef62ef..3209a61492 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -144,6 +144,36 @@ function reporting_make_reporting_data($report = null, $id_report, $metaconsole_on = is_metaconsole(); $index_content = 0; foreach ($contents as $content) { + + if (!empty($content["id_agent_module"]) && !empty($content["id_agent"]) + && tags_has_user_acl_tags($config['id_user'])) { + $where_tags = tags_get_acl_tags( + $config['id_user'], + $id_groups, + 'AR', + 'module_condition', + 'AND', + 'tagente_modulo', + false, + array(), + true); + + $sql_tags_join = "INNER JOIN tagente ON tagente.id_agente = t1.id_agente + INNER JOIN ttag_module ON ttag_module.id_agente_modulo = t1.id_agente_modulo + LEFT JOIN tagent_secondary_group tasg ON tagente.id_agente = tasg.id_agent"; + + $sql = sprintf('SELECT count(*) FROM tagente_modulo t1 + %s WHERE t1.delete_pending = 0 AND t1.id_agente_modulo = '. $content["id_agent_module"] .' + AND t1.id_agente = ' . $content['id_agent'] . ' %s', + $sql_tags_join, $where_tags); + + $result_tags = db_get_value_sql($sql); + + if (!$result_tags) { + continue; + } + } + $server_name = $content['server_name']; // General reports with 0 period means last value @@ -218,11 +248,11 @@ function reporting_make_reporting_data($report = null, $id_report, } } - if(sizeof($content['id_agent']) != 1){ + if(is_array($content['id_agent']) && sizeof($content['id_agent']) != 1){ $content['style']['name_label'] = str_replace("_agent_",sizeof($content['id_agent']).__(' agents'),$content['style']['name_label']); } - if(sizeof($content['id_agent_module']) != 1){ + if(is_array($content['id_agent_module']) && sizeof($content['id_agent_module']) != 1){ $content['style']['name_label'] = str_replace("_module_",sizeof($content['id_agent_module']).__(' modules'),$content['style']['name_label']); } @@ -274,7 +304,8 @@ function reporting_make_reporting_data($report = null, $id_report, $report['contents'][] = reporting_availability_graph( $report, $content, - $pdf); + $pdf + ); break; case 'sql': $report['contents'][] = reporting_sql( @@ -320,25 +351,33 @@ function reporting_make_reporting_data($report = null, $id_report, $report['contents'][] = reporting_value( $report, $content, - 'max',$pdf); + 'max', + $pdf + ); break; case 'avg_value': $report['contents'][] = reporting_value( $report, $content, - 'avg',$pdf); + 'avg', + $pdf + ); break; case 'min_value': $report['contents'][] = reporting_value( $report, $content, - 'min',$pdf); + 'min', + $pdf + ); break; case 'sumatory': $report['contents'][] = reporting_value( $report, $content, - 'sum'); + 'sum', + $pdf + ); break; case 'historical_data': $report['contents'][] = reporting_historical_data( @@ -349,25 +388,33 @@ function reporting_make_reporting_data($report = null, $id_report, $report['contents'][] = reporting_value( $report, $content, - 'MTTR'); + 'MTTR', + $pdf + ); break; case 'MTBF': $report['contents'][] = reporting_value( $report, $content, - 'MTBF'); + 'MTBF', + $pdf + ); break; case 'TTO': $report['contents'][] = reporting_value( $report, $content, - 'TTO'); + 'TTO', + $pdf + ); break; case 'TTRT': $report['contents'][] = reporting_value( $report, $content, - 'TTRT'); + 'TTRT', + $pdf + ); break; case 'agent_configuration': $report['contents'][] = reporting_agent_configuration( @@ -618,7 +665,9 @@ function reporting_make_reporting_data($report = null, $id_report, $content, $type, $force_width_chart, - $force_height_chart); + $force_height_chart, + $pdf + ); break; case 'module_histogram_graph': $report['contents'][] = reporting_enterprise_module_histogram_graph( @@ -634,35 +683,35 @@ function reporting_make_reporting_data($report = null, $id_report, function reporting_SLA($report, $content, $type = 'dinamic', $force_width_chart = null, $force_height_chart = null) { - + global $config; - $return = array(); + $return = array(); $return['type'] = 'SLA'; - + if (empty($content['name'])) { $content['name'] = __('S.L.A.'); } - + $return['title'] = $content['name']; $return["description"] = $content["description"]; $return["date"] = reporting_get_date_text($report, $content); - + // Get chart reporting_set_conf_charts($width, $height, $only_image, $type, $content, $ttl); - + if (!empty($force_width_chart)) { $width = $force_width_chart; } - + if (!empty($force_height_chart)) { $height = $force_height_chart; } - + $return["id_rc"] = $content['id_rc']; - + $edge_interval = 10; - + if (empty($content['subitems'])) { $slas = db_get_all_rows_field_filter ( 'treport_content_sla_combined', @@ -671,7 +720,7 @@ function reporting_SLA($report, $content, $type = 'dinamic', else { $slas = $content['subitems']; } - + if (empty($slas)) { $return['failed'] = __('There are no SLAs defined'); } @@ -684,9 +733,9 @@ function reporting_SLA($report, $content, $type = 'dinamic', $show_table = 1; } else{ - $show_table = 0; + $show_table = 0; } - + if($content['show_graph'] == 1 || $content['show_graph'] == 2){ $show_graphs = 1; } @@ -695,14 +744,13 @@ function reporting_SLA($report, $content, $type = 'dinamic', } $urlImage = ui_get_full_url(false, true, false, false); - $sla_failed = false; $total_SLA = 0; $total_result_SLA = 'ok'; $sla_showed = array(); $sla_showed_values = array(); - + foreach ($slas as $sla) { $server_name = $sla ['server_name']; //Metaconsole connection @@ -713,18 +761,18 @@ function reporting_SLA($report, $content, $type = 'dinamic', continue; } } - + if (modules_is_disable_agent($sla['id_agent_module']) || modules_is_not_init($sla['id_agent_module'])) { if ($metaconsole_on) { //Restore db connection metaconsole_restore_db(); } - + continue; } - - //controller min and max == 0 then dinamic min and max critical + + //controller min and max == 0 then dinamic min and max critical $dinamic_text = 0; if($sla['sla_min'] == 0 && $sla['sla_max'] == 0){ $sla['sla_min'] = null; @@ -744,7 +792,7 @@ function reporting_SLA($report, $content, $type = 'dinamic', } } - //for graph slice for module-interval, if not slice=0; + //for graph slice for module-interval, if not slice=0; if($show_graphs){ $module_interval = modules_get_interval ($sla['id_agent_module']); $slice = $content["period"] / $module_interval; @@ -752,35 +800,34 @@ function reporting_SLA($report, $content, $type = 'dinamic', else{ $slice = 1; } - + //call functions sla $sla_array = array(); $sla_array = reporting_advanced_sla( - $sla['id_agent_module'], - $report["datetime"] - $content['period'], - $report["datetime"], - $sla['sla_min'], // min_value -> dynamic - $sla['sla_max'], // max_value -> dynamic - $inverse_interval, // inverse_interval -> dynamic - array ( "1" => $content["sunday"], - "2" => $content["monday"], - "3" => $content["tuesday"], - "4" => $content["wednesday"], - "5" => $content["thursday"], - "6" => $content["friday"], - "7" => $content["saturday"] - ), - $content['time_from'], - $content['time_to'], - $slice - ); + $sla['id_agent_module'], + $report["datetime"] - $content['period'], + $report["datetime"], + $sla['sla_min'], // min_value -> dynamic + $sla['sla_max'], // max_value -> dynamic + $inverse_interval, // inverse_interval -> dynamic + array ( "1" => $content["sunday"], + "2" => $content["monday"], + "3" => $content["tuesday"], + "4" => $content["wednesday"], + "5" => $content["thursday"], + "6" => $content["friday"], + "7" => $content["saturday"] + ), + $content['time_from'], + $content['time_to'], + $slice + ); - if ($metaconsole_on) { //Restore db connection metaconsole_restore_db(); } - + $server_name = $sla ['server_name']; //Metaconsole connection if ($metaconsole_on && $server_name != '') { @@ -803,7 +850,7 @@ function reporting_SLA($report, $content, $type = 'dinamic', } return ($a<$b)?-1:1; }); - + // Compress (overlapped) planned downtimes $npd = count($planned_downtimes); for ($i=0; $i<$npd; $i++) { @@ -908,7 +955,7 @@ function reporting_SLA($report, $content, $type = 'dinamic', $data['sla_value'] = $sla_array['SLA']; $data['sla_fixed'] = $sla_array['sla_fixed']; } - + //checks whether or not it meets the SLA if ($data['sla_value'] >= $sla['sla_limit']) { $data['sla_status'] = 1; @@ -918,7 +965,7 @@ function reporting_SLA($report, $content, $type = 'dinamic', $sla_failed = true; $data['sla_status'] = 0; } - + //Do not show right modules if 'only_display_wrong' is active if($content['only_display_wrong'] && $sla_failed == false){ continue; @@ -927,12 +974,44 @@ function reporting_SLA($report, $content, $type = 'dinamic', //find order $data['order'] = $data['sla_value']; - if($show_table) { + if($show_table) { $return['data'][] = $data; } - + // Slice graphs calculation if ($show_graphs) { + $data_init = -1; + $acum = 0; + $sum = 0; + $array_result = array(); + $i=0; + foreach ($raw_graph as $key => $value) { + if($data_init == -1){ + $data_init = $value['data']; + $acum = $value['utimestamp']; + $sum = $value['data']; + } + else{ + if($data_init == $value['data']){ + $acum = $acum + $value['utimestamp']; + $sum = $sum + $value['real_data']; + } + else{ + $array_result[$i]['data'] = $data_init; + $array_result[$i]['utimestamp'] = $acum; + $array_result[$i]['real_data'] = $sum; + $i++; + $data_init = $value['data']; + $acum = $value['utimestamp']; + $sum = $value['real_data']; + } + } + } + + $array_result[$i]['data'] = $data_init; + $array_result[$i]['utimestamp'] = $acum; + $array_result[$i]['real_data'] = $sum; + $dataslice = array(); $dataslice['agent'] = io_safe_output(modules_get_agentmodule_agent_alias ($sla['id_agent_module'])); $dataslice['module'] = io_safe_output(modules_get_agentmodule_name ($sla['id_agent_module'])); @@ -948,13 +1027,14 @@ function reporting_SLA($report, $content, $type = 'dinamic', $content, $content['time_from'], $content['time_to'], - 1920, - 50, + 100, + 70, $urlImage, $ttl, - $raw_graph, - false); - + $array_result, + false + ); + $return['charts'][] = $dataslice; } @@ -964,7 +1044,7 @@ function reporting_SLA($report, $content, $type = 'dinamic', } } - + // SLA items sorted descending () if ($content['top_n'] == 2) { arsort($return['data']['']); @@ -1125,10 +1205,10 @@ function reporting_event_top_n($report, $content, $type = 'dinamic', } } - $ag_name = modules_get_agentmodule_agent_alias($row ['id_agent_module']); + $ag_name = modules_get_agentmodule_agent_alias($row ['id_agent_module']); $mod_name = modules_get_agentmodule_name ($row ['id_agent_module']); $unit = db_get_value('unit', 'tagente_modulo', - 'id_agente_modulo', $row ['id_agent_module']); + 'id_agente_modulo', $row ['id_agent_module']); switch ($top_n) { @@ -1307,7 +1387,7 @@ function reporting_event_top_n($report, $content, $type = 'dinamic', if ($show_graph != REPORT_TOP_N_ONLY_TABLE) { arsort($data_pie_graph); - $return['charts']['pie'] = pie3d_graph(false, + $return['charts']['pie'] = pie_graph( $data_pie_graph, $width, $height, __("other"), @@ -1320,7 +1400,6 @@ function reporting_event_top_n($report, $content, $type = 'dinamic', //Display bars graph $return['charts']['bars'] = hbar_graph( - false, $data_hbar, $width, count($data_hbar) * 50, @@ -1460,8 +1539,7 @@ function reporting_event_report_group($report, $content, $filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - $return['chart']['by_agent']= pie3d_graph( - false, + $return['chart']['by_agent']= pie_graph( $data_graph, 500, 150, @@ -1470,7 +1548,8 @@ function reporting_event_report_group($report, $content, ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); } if ($event_graph_by_user_validator) { @@ -1479,8 +1558,7 @@ function reporting_event_report_group($report, $content, $report["datetime"],$filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - $return['chart']['by_user_validator'] = pie3d_graph( - false, + $return['chart']['by_user_validator'] = pie_graph( $data_graph, 500, 150, @@ -1489,7 +1567,8 @@ function reporting_event_report_group($report, $content, ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); } if ($event_graph_by_criticity) { @@ -1500,8 +1579,7 @@ function reporting_event_report_group($report, $content, $colors = get_criticity_pie_colors($data_graph); - $return['chart']['by_criticity'] = pie3d_graph( - false, + $return['chart']['by_criticity'] = pie_graph( $data_graph, 500, 150, @@ -1512,7 +1590,8 @@ function reporting_event_report_group($report, $content, $config['font_size'], $ttl, false, - $colors); + $colors + ); } if ($event_graph_validated_vs_unvalidated) { @@ -1521,8 +1600,7 @@ function reporting_event_report_group($report, $content, $report["datetime"],$filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - $return['chart']['validated_vs_unvalidated'] = pie3d_graph( - false, + $return['chart']['validated_vs_unvalidated'] = pie_graph( $data_graph, 500, 150, @@ -1531,7 +1609,8 @@ function reporting_event_report_group($report, $content, ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); } if ($config['metaconsole']) { @@ -2195,8 +2274,7 @@ function reporting_exception($report, $content, $type = 'dinamic', } - $return["chart"]["pie"] = pie3d_graph( - false, + $return["chart"]["pie"] = pie_graph( $data_pie_graph, 600, 150, @@ -2205,11 +2283,11 @@ function reporting_exception($report, $content, $type = 'dinamic', ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); $params = array( - 'flash_chart' => false, 'chart_data' => $data_hbar, 'width' => 600, 'height' => 25 * count($data_hbar), @@ -2377,8 +2455,7 @@ function reporting_event_report_agent($report, $content, $report["datetime"],$filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - $return["chart"]["by_user_validator"] = pie3d_graph( - false, + $return["chart"]["by_user_validator"] = pie_graph( $data_graph, 500, 150, @@ -2387,7 +2464,8 @@ function reporting_event_report_agent($report, $content, ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); } if ($event_graph_by_criticity) { @@ -2397,9 +2475,8 @@ function reporting_event_report_agent($report, $content, $filter_event_status, $filter_event_filter_search); $colors = get_criticity_pie_colors($data_graph); - - $return["chart"]["by_criticity"] = pie3d_graph( - false, + + $return["chart"]["by_criticity"] = pie_graph( $data_graph, 500, 150, @@ -2410,7 +2487,8 @@ function reporting_event_report_agent($report, $content, $config['font_size'], $ttl, false, - $colors); + $colors + ); } if ($event_graph_validated_vs_unvalidated) { @@ -2419,8 +2497,7 @@ function reporting_event_report_agent($report, $content, $report["datetime"],$filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - $return["chart"]["validated_vs_unvalidated"] = pie3d_graph( - false, + $return["chart"]["validated_vs_unvalidated"] = pie_graph( $data_graph, 500, 150, @@ -2429,7 +2506,8 @@ function reporting_event_report_agent($report, $content, ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); } if ($config['metaconsole']) { @@ -3307,9 +3385,9 @@ function reporting_alert_report_module($report, $content) { function reporting_sql_graph($report, $content, $type, $force_width_chart, $force_height_chart, $type_sql_graph) { - + global $config; - + switch ($type_sql_graph) { case 'sql_graph_hbar': $return['type'] = 'sql_graph_hbar'; @@ -3321,7 +3399,7 @@ function reporting_sql_graph($report, $content, $type, $return['type'] = 'sql_graph_pie'; break; } - + if (empty($content['name'])) { switch ($type_sql_graph) { case 'sql_graph_vbar': @@ -3335,23 +3413,22 @@ function reporting_sql_graph($report, $content, $type, break; } } - + // Get chart - reporting_set_conf_charts($width, $height, $only_image, $type, - $content, $ttl); - + reporting_set_conf_charts($width, $height, $only_image, $type,$content, $ttl); + if (!empty($force_width_chart)) { $width = $force_width_chart; } - + if (!empty($force_height_chart)) { $height = $force_height_chart; } - + $return['title'] = $content['name']; $return["description"] = $content["description"]; $return["date"] = reporting_get_date_text(); - + switch ($type) { case 'dinamic': case 'static': @@ -3368,7 +3445,7 @@ function reporting_sql_graph($report, $content, $type, case 'data': break; } - + return reporting_check_structure_content($return); } @@ -3746,7 +3823,7 @@ function reporting_agent_configuration($report, $content) { return reporting_check_structure_content($return); } -function reporting_value($report, $content, $type,$pdf) { +function reporting_value($report, $content, $type, $pdf=false) { global $config; $return = array(); @@ -5483,30 +5560,29 @@ function reporting_availability($report, $content, $date=false, $time=false) { */ function reporting_availability_graph($report, $content, $pdf=false) { global $config; - $return = array(); + $return = array(); $return['type'] = 'availability_graph'; $ttl = 1; if ($pdf){ $ttl = 2; } - + if (empty($content['name'])) { $content['name'] = __('Availability'); } - + $return['title'] = $content['name']; $return["description"] = $content["description"]; $return["date"] = reporting_get_date_text($report, $content); - + // Get chart reporting_set_conf_charts($width, $height, $only_image, $type, $content, $ttl); - $return["id_rc"] = $content['id_rc']; - + $edge_interval = 10; - + if (empty($content['subitems'])) { $slas = db_get_all_rows_field_filter ( 'treport_content_sla_combined', @@ -5515,7 +5591,7 @@ function reporting_availability_graph($report, $content, $pdf=false) { else { $slas = $content['subitems']; } - + if (empty($slas)) { $return['failed'] = __('There are no SLAs defined'); } @@ -5524,7 +5600,7 @@ function reporting_availability_graph($report, $content, $pdf=false) { $metaconsole_on = is_metaconsole(); $urlImage = ui_get_full_url(false, true, false, false); - + $sla_failed = false; $total_SLA = 0; $total_result_SLA = 'ok'; @@ -5532,7 +5608,7 @@ function reporting_availability_graph($report, $content, $pdf=false) { $sla_showed_values = array(); $priority_mode = $content['style']['priority_mode']; - + foreach ($slas as $sla) { $server_name = $sla ['server_name']; //Metaconsole connection @@ -5543,18 +5619,17 @@ function reporting_availability_graph($report, $content, $pdf=false) { continue; } } - + if (modules_is_disable_agent($sla['id_agent_module']) || modules_is_not_init($sla['id_agent_module'])) { if ($metaconsole_on) { //Restore db connection metaconsole_restore_db(); } - continue; } - - //controller min and max == 0 then dinamic min and max critical + + //controller min and max == 0 then dinamic min and max critical $dinamic_text = 0; if($sla['sla_min'] == 0 && $sla['sla_max'] == 0){ $sla['sla_min'] = null; @@ -5574,38 +5649,37 @@ function reporting_availability_graph($report, $content, $pdf=false) { } } - //for graph slice for module-interval, if not slice=0; + //for graph slice for module-interval, if not slice=0; $module_interval = modules_get_interval ($sla['id_agent_module']); $slice = $content["period"] / $module_interval; - + //call functions sla $sla_array = array(); $sla_array = reporting_advanced_sla( - $sla['id_agent_module'], - $report["datetime"] - $content['period'], - $report["datetime"], - $sla['sla_min'], // min_value -> dynamic - $sla['sla_max'], // max_value -> dynamic - $inverse_interval, // inverse_interval -> dynamic - array ( "1" => $content["sunday"], - "2" => $content["monday"], - "3" => $content["tuesday"], - "4" => $content["wednesday"], - "5" => $content["thursday"], - "6" => $content["friday"], - "7" => $content["saturday"] - ), - $content['time_from'], - $content['time_to'], - $slice - ); + $sla['id_agent_module'], + $report["datetime"] - $content['period'], + $report["datetime"], + $sla['sla_min'], // min_value -> dynamic + $sla['sla_max'], // max_value -> dynamic + $inverse_interval, // inverse_interval -> dynamic + array ( "1" => $content["sunday"], + "2" => $content["monday"], + "3" => $content["tuesday"], + "4" => $content["wednesday"], + "5" => $content["thursday"], + "6" => $content["friday"], + "7" => $content["saturday"] + ), + $content['time_from'], + $content['time_to'], + $slice + ); - if ($metaconsole_on) { //Restore db connection metaconsole_restore_db(); } - + $server_name = $sla ['server_name']; //Metaconsole connection if ($metaconsole_on && $server_name != '') { @@ -5627,7 +5701,7 @@ function reporting_availability_graph($report, $content, $pdf=false) { } return ($a<$b)?-1:1; }); - + // Compress (overlapped) planned downtimes $npd = count($planned_downtimes); for ($i=0; $i<$npd; $i++) { @@ -5652,9 +5726,9 @@ function reporting_availability_graph($report, $content, $pdf=false) { $data['min'] = $sla['sla_min']; $data['sla_limit'] = $sla['sla_limit']; $data['dinamic_text'] = $dinamic_text; - + if(isset($sla_array[0])){ - $data['time_total'] = 0; + $data['time_total'] = 0; $data['time_ok'] = 0; $data['time_error'] = 0; $data['time_unknown'] = 0; @@ -5705,7 +5779,7 @@ function reporting_availability_graph($report, $content, $pdf=false) { $data['checks_not_init'] = $sla_array['checks_not_init']; $data['sla_value'] = $sla_array['SLA']; } - + //checks whether or not it meets the SLA if ($data['sla_value'] >= $sla['sla_limit']) { $data['sla_status'] = 1; @@ -5724,7 +5798,39 @@ function reporting_availability_graph($report, $content, $pdf=false) { //find order $data['order'] = $data['sla_value']; $return['data'][] = $data; - + + $data_init = -1; + $acum = 0; + $sum = 0; + $array_result = array(); + $i=0; + foreach ($raw_graph as $key => $value) { + if($data_init == -1){ + $data_init = $value['data']; + $acum = $value['utimestamp']; + $sum = $value['data']; + } + else{ + if($data_init == $value['data']){ + $acum = $acum + $value['utimestamp']; + $sum = $sum + $value['real_data']; + } + else{ + $array_result[$i]['data'] = $data_init; + $array_result[$i]['utimestamp'] = $acum; + $array_result[$i]['real_data'] = $sum; + $i++; + $data_init = $value['data']; + $acum = $value['utimestamp']; + $sum = $value['real_data']; + } + } + } + + $array_result[$i]['data'] = $data_init; + $array_result[$i]['utimestamp'] = $acum; + $array_result[$i]['real_data'] = $sum; + // Slice graphs calculation $dataslice = array(); $dataslice['agent'] = modules_get_agentmodule_agent_alias ($sla['id_agent_module']); @@ -5746,22 +5852,22 @@ function reporting_availability_graph($report, $content, $pdf=false) { $content, $content['time_from'], $content['time_to'], - 1920, - 50, + 100, + 70, $urlImage, $ttl, - $raw_graph, - false); - + $array_result, + false + ); + $return['charts'][] = $dataslice; if ($metaconsole_on) { //Restore db connection metaconsole_restore_db(); } - } - + // SLA items sorted descending () if ($content['top_n'] == 2) { arsort($return['data']['']); @@ -5990,6 +6096,7 @@ function reporting_general($report, $content) { $i = 0; $index = 0; $is_string = array(); + foreach ($generals as $row) { //Metaconsole connection $server_name = $row ['server_name']; @@ -6237,51 +6344,64 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', require_once ($config["homedir"] . '/include/functions_graph.php'); - if ($config['metaconsole']) { - $id_meta = metaconsole_get_id_server($content["server_name"]); - $server = metaconsole_get_connection_by_id ($id_meta); - metaconsole_connect($server); + if ($type_report == "custom_graph") { + if (is_metaconsole()) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + $server = metaconsole_get_connection_by_id ($id_meta); + if (metaconsole_connect ($server) != NOERR){ + return false; + } + } } $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); + $return = array(); $return['type'] = 'custom_graph'; + if (empty($content['name'])) { - if ($type_report == "custom_graph") { + if($type_report == "custom_graph"){ $content['name'] = __('Custom graph'); - $graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']); - $id_graph = $content['id_gs']; - } - else if($type_report == "automatic_graph"){ + } else if($type_report == "automatic_graph"){ $content['name'] = __('Automatic combined graph'); - $graphs[0]["stacked"] = ''; - $graphs[0]["summatory_series"] = ''; - $graphs[0]["average_series"] = ''; - $graphs[0]["modules_series"] = ''; - $graphs[0]["fullscale"] = $content['style']['fullscale']; - if(is_array($content['id_agent_module'])){ - foreach ($content['id_agent_module'] as $key => $value) { - if($content['each_agent']){ - $modules[] = $value; - } - else{ - $modules[] = $value['module']; - } + } else { + $content['name'] =''; + } + } + + if ($type_report == "custom_graph") { + $graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']); + $id_graph = $content['id_gs']; + } + else if($type_report == "automatic_graph"){ + $graphs[0]["stacked"] = ''; + $graphs[0]["summatory_series"] = ''; + $graphs[0]["average_series"] = ''; + $graphs[0]["modules_series"] = ''; + $graphs[0]["fullscale"] = $content['style']['fullscale']; + $modules = $content['id_agent_module']; + + if(!$modules){ + $module_source = db_get_all_rows_sql( + "SELECT id_agent_module, id_server + FROM tgraph_source + WHERE id_graph = " . + $content['id_gs'] + ); + + if(isset($module_source) && is_array($module_source)){ + $modules = array(); + foreach ($module_source as $key => $value) { + $modules[$key]['module'] = $value['id_agent_module']; + $modules[$key]['server'] = $value['id_server']; } } - else{ - $modules[] = $content['id_agent_module']; - } - $id_graph = 0; - } - else { - $content['name'] = __('Simple graph'); - } - } else { - if ($type_report == "custom_graph") { - $graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']); - $id_graph = $content['id_gs']; } + + $id_graph = 0; + } + else { + $content['name'] = __('Simple graph'); } $return['title'] = $content['name']; @@ -6317,7 +6437,8 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'summatory' => $graphs[0]["summatory_series"], 'average' => $graphs[0]["average_series"], 'modules_series' => $graphs[0]["modules_series"], - 'id_graph' => $id_graph + 'id_graph' => $id_graph, + 'type_report' => $type_report ); $return['chart'] = graphic_combined_module( @@ -6326,13 +6447,13 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', $params_combined ); - break; - case 'data': break; } - if ($config['metaconsole'] && $type_report != 'automatic_graph') { - metaconsole_restore_db(); + if ($type_report == "custom_graph") { + if (is_metaconsole()) { + metaconsole_restore_db(); + } } return reporting_check_structure_content($return); @@ -6561,30 +6682,30 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, $filter_event_filter_search = false, $force_width_chart = false, $event_graph_by_user_validator = false, $event_graph_by_criticity = false, $event_graph_validated_vs_unvalidated = false, $ttl = 1, $id_server = false) { - + global $config; - + $id_modules = (array)safe_int ($id_modules, 1); - + if (!is_numeric ($date)) { $date = strtotime ($date); } if (empty ($date)) { $date = get_system_time (); } - + $history = false; if ($config['history_event_enabled']) $history = true; - + $events = array (); - + foreach ($id_modules as $id_module) { - $event['data'] = events_get_agent (false, (int) $period, (int) $date, - $history, $show_summary_group, $filter_event_severity, - $filter_event_type, $filter_event_status, $filter_event_filter_search, + $event['data'] = events_get_agent (false, (int) $period, (int) $date, + $history, $show_summary_group, $filter_event_severity, + $filter_event_type, $filter_event_status, $filter_event_filter_search, false, false, $id_module, true , $id_server); - + //total_events if(isset($event['data'])){ $event['total_events'] = count($event['data']); @@ -6597,18 +6718,17 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, if (!empty($force_width_chart)) { $width = $force_width_chart; } - + if (!empty($force_height_chart)) { $height = $force_height_chart; } - + if ($event_graph_by_user_validator) { $data_graph = events_get_count_events_validated_by_user( array('id_agentmodule' => $id_module), $period, $date, $filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - - $event['chart']['by_user_validator'] = pie3d_graph( - false, + + $event['chart']['by_user_validator'] = pie_graph( $data_graph, 500, 150, @@ -6617,18 +6737,18 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); } - + if ($event_graph_by_criticity) { $data_graph = events_get_count_events_by_criticity( array('id_agentmodule' => $id_module), $period, $date, $filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - + $colors = get_criticity_pie_colors($data_graph); - - $event['chart']['by_criticity'] = pie3d_graph( - false, + + $event['chart']['by_criticity'] = pie_graph( $data_graph, 500, 150, @@ -6639,16 +6759,16 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, $config['font_size'], $ttl, false, - $colors); + $colors + ); } - + if ($event_graph_validated_vs_unvalidated) { $data_graph = events_get_count_events_validated( array('id_agentmodule' => $id_module), $period, $date, $filter_event_severity, $filter_event_type, $filter_event_status, $filter_event_filter_search); - - $event['chart']['validated_vs_unvalidated'] = pie3d_graph( - false, + + $event['chart']['validated_vs_unvalidated'] = pie_graph( $data_graph, 500, 150, @@ -6657,7 +6777,8 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0, ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", $config['fontpath'], $config['font_size'], - $ttl); + $ttl + ); } if (!empty ($event)) { @@ -7427,8 +7548,8 @@ function reporting_get_stats_alerts($data, $links = false) { $urls['monitor_alerts'] = "index.php?sec=estado&sec2=operation/agentes/alerts_status&pure=" . $config['pure']; $urls['monitor_alerts_fired'] = "index.php?sec=estado&sec2=operation/agentes/alerts_status&filter=fired&pure=" . $config['pure']; } else { - $urls['monitor_alerts'] = "index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=60"; - $urls['monitor_alerts_fired'] = "index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=60&filter=fired"; + $urls['monitor_alerts'] = $config['homeurl']."index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=60"; + $urls['monitor_alerts_fired'] = $config['homeurl']."index.php?sec=estado&sec2=operation/agentes/alerts_status&refr=60&filter=fired"; } } @@ -7484,19 +7605,19 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he // Link URLS if ($links === false) { $urls = array(); - $urls['monitor_critical'] = "index.php?" . + $urls['monitor_critical'] = $config['homeurl']."index.php?" . "sec=view&sec2=operation/agentes/status_monitor&" . "refr=60&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD . "&pure=" . $config['pure']; - $urls['monitor_warning'] = "index.php?" . + $urls['monitor_warning'] = $config['homeurl']."index.php?" . "sec=view&sec2=operation/agentes/status_monitor&" . "refr=60&status=" . AGENT_MODULE_STATUS_WARNING . "&pure=" . $config['pure']; - $urls['monitor_ok'] = "index.php?" . + $urls['monitor_ok'] = $config['homeurl']."index.php?" . "sec=view&sec2=operation/agentes/status_monitor&" . "refr=60&status=" . AGENT_MODULE_STATUS_NORMAL . "&pure=" . $config['pure']; - $urls['monitor_unknown'] = "index.php?" . + $urls['monitor_unknown'] = $config['homeurl']."index.php?" . "sec=view&sec2=operation/agentes/status_monitor&" . "refr=60&status=" . AGENT_MODULE_STATUS_UNKNOWN . "&pure=" . $config['pure']; - $urls['monitor_not_init'] = "index.php?" . + $urls['monitor_not_init'] = $config['homeurl']."index.php?" . "sec=view&sec2=operation/agentes/status_monitor&" . "refr=60&status=" . AGENT_MODULE_STATUS_NOT_INIT . "&pure=" . $config['pure']; } @@ -7510,8 +7631,7 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he } // Fixed width non interactive charts - $status_chart_width = $config["flash_charts"] == false - ? 100 : $graph_width; + $status_chart_width = $graph_width; // Modules by status table $table_mbs = html_get_predefined_table(); @@ -7600,8 +7720,8 @@ function reporting_get_stats_agents_monitors($data) { } else { $urls = array(); - $urls['total_agents'] = "index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60"; - $urls['monitor_checks'] = "index.php?sec=view&sec2=operation/agentes/status_monitor&refr=60&status=-1"; + $urls['total_agents'] = $config['homeurl']."index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60"; + $urls['monitor_checks'] = $config['homeurl']."index.php?sec=view&sec2=operation/agentes/status_monitor&refr=60&status=-1"; } // Agents and modules table @@ -7629,11 +7749,12 @@ You can of course remove the warnings, that's why we include the source and do n We added some of what seems to be "buggy" messages to the openSource version recently. This is not to force open-source users to move to the enterprise version, this is just to inform people using Pandora FMS open source that it requires skilled people to maintain and keep it running smoothly without professional support. This does not imply open-source version is limited in any way. If you check the recently added code, it contains only warnings and messages, no limitations except one: we removed the option to add custom logo in header. In the Update Manager section, it warns about the 'danger’ of applying automated updates without a proper backup, remembering in the process that the Enterprise version comes with a human-tested package. Maintaining an OpenSource version with more than 500 agents is not so easy, that's why someone using a Pandora with 8000 agents should consider asking for support. It's not a joke, we know of many setups with a huge number of agents, and we hate to hear that “its becoming unstable and slow” :( You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years. */ - - if(($data["monitor_checks"]/$data["total_agents"]>100) && !enterprise_installed()) { - $tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; + if($data["total_agents"]){ + if(($data["monitor_checks"]/$data["total_agents"]>100) && !enterprise_installed()) { + $tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>"; + } } - + $table_am->rowclass[] = ''; $table_am->data[] = $tdata; @@ -9224,6 +9345,7 @@ function reporting_get_agentmodule_data_sum ($id_agent_module, $id_module_type); $module_interval = modules_get_interval ($id_agent_module); $uncompressed_module = is_module_uncompressed ($module_name); + // Wrong module type if (is_module_data_string ($module_name)) { @@ -9232,46 +9354,23 @@ function reporting_get_agentmodule_data_sum ($id_agent_module, // Incremental modules are treated differently $module_inc = is_module_inc ($module_name); - - // Get module data - $interval_data = db_get_all_rows_sql(' + + if ($uncompressed_module) { + // Get module data + $interval_data = db_get_all_rows_sql(' SELECT * FROM tagente_datos WHERE id_agente_modulo = ' . (int) $id_agent_module . ' AND utimestamp > ' . (int) $datelimit . ' AND utimestamp < ' . (int) $date . ' ORDER BY utimestamp ASC', $search_in_history_db); + + } + else + $interval_data = db_uncompress_module_data((int) $id_agent_module, (int) $datelimit, (int) $date); + if ($interval_data === false) $interval_data = array (); - // Uncompressed module data - if ($uncompressed_module) { - $min_necessary = 1; - - // Compressed module data - } - else { - // Get previous data - $previous_data = modules_get_previous_data ($id_agent_module, $datelimit); - if ($previous_data !== false) { - $previous_data['utimestamp'] = $datelimit; - array_unshift ($interval_data, $previous_data); - } - - // Get next data - $next_data = modules_get_next_data ($id_agent_module, $date); - if ($next_data !== false) { - $next_data['utimestamp'] = $date; - array_push ($interval_data, $next_data); - } - else if (count ($interval_data) > 0) { - // Propagate the last known data to the end of the interval - $next_data = array_pop ($interval_data); - array_push ($interval_data, $next_data); - $next_data['utimestamp'] = $date; - array_push ($interval_data, $next_data); - } - - $min_necessary = 2; - } + $min_necessary = 1; if (count ($interval_data) < $min_necessary) { return false; @@ -9279,11 +9378,14 @@ function reporting_get_agentmodule_data_sum ($id_agent_module, // Set initial conditions $total = 0; - if (! $uncompressed_module) { - $previous_data = array_shift ($interval_data); - } - + $partial_total = 0; + $count_sum = 0; + foreach ($interval_data as $data) { + + $partial_total = 0; + $count_sum = 0; + switch ($config["dbtype"]) { case "mysql": case "postgresql": @@ -9294,18 +9396,25 @@ function reporting_get_agentmodule_data_sum ($id_agent_module, oracle_format_float_to_php($data['datos']); break; } - - if ($uncompressed_module) { - $total += $data['datos']; - } - else if ($module_inc) { - $total += $previous_data['datos'] * ($data['utimestamp'] - $previous_data['utimestamp']); + + if (!$module_inc) { + foreach ($data['data'] as $val) { + if (is_numeric($val['datos'])) { + $partial_total += $val['datos']; + $count_sum++; + } + } + + if ($count_sum===0) continue; + + $total += $partial_total/$count_sum; } else { - $total += $previous_data['datos'] * ($data['utimestamp'] - $previous_data['utimestamp']) / $module_interval; + $last = end($data['data']); + $total += $last['datos']; } - $previous_data = $data; } + return $total; } @@ -9528,10 +9637,10 @@ function reporting_get_planned_downtimes ($start_date, $end_date, $id_agent_modu */ function reporting_get_agentmodule_sla_day ($id_agent_module, $period = 0, $min_value = 1, $max_value = false, $date = 0, $daysWeek = null, $timeFrom = null, $timeTo = null) { global $config; - + if (empty($id_agent_module)) return false; - + // Initialize variables if (empty ($date)) { $date = get_system_time (); @@ -9541,19 +9650,24 @@ function reporting_get_agentmodule_sla_day ($id_agent_module, $period = 0, $min_ } // Limit date to start searching data $datelimit = $date - $period; - + // Substract the not working time // Initialize the working time status machine ($wt_status) // Search the first data at worktime start - list ($period_reduced, $wt_status, $datelimit_increased) = reporting_get_agentmodule_sla_day_period ($period, $date, $timeFrom, $timeTo); + $array_sla_report = reporting_get_agentmodule_sla_day_period ($period, $date, $timeFrom, $timeTo); + + $period_reduced = $array_sla_report[0]; + $wt_status = $array_sla_report[1]; + $datelimit_increased = $array_sla_report[2]; + if ($period_reduced <= 0) { return false; } - + $wt_points = reporting_get_agentmodule_sla_working_timestamp ($period, $date, $timeFrom, $timeTo); - + $search_in_history_db = db_search_in_history_db($datelimit); - + // Get interval data $sql = sprintf ('SELECT * FROM tagente_datos @@ -9561,7 +9675,7 @@ function reporting_get_agentmodule_sla_day ($id_agent_module, $period = 0, $min_ AND utimestamp > %d AND utimestamp <= %d', $id_agent_module, $datelimit, $date); - + //Add the working times (mon - tue - wed ...) and from time to time $days = array(); //Translate to mysql week days @@ -9740,331 +9854,6 @@ function reporting_get_agentmodule_sla_day ($id_agent_module, $period = 0, $min_ return (float) (100 - ($bad_period / $period_reduced) * 100); } -/** - * Get several SLA data for an agentmodule within a period divided on subperiods - * - * @param int Agent module to calculate SLA - * @param int Period to check the SLA compliance. - * @param int Minimum data value the module in the right interval - * @param int Maximum data value the module in the right interval. False will - * ignore max value - * @param array $days Array of days week to extract as array('monday' => false, 'tuesday' => true....), and by default is null. - * @param string $timeFrom Time in the day to start to extract in mysql format, by default null. - * @param string $timeTo Time in the day to end to extract in mysql format, by default null. - * - * @return Array with values either 1, 2, 3 or 4 depending if the SLA percentage for this subperiod - * is within the sla limits, on the edge, outside or with an unknown value. - */ -function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $min_value = 1, $max_value = false, $date = 0, $daysWeek = null, $timeFrom = null, $timeTo = null) { - global $config; - - if (empty($id_agent_module)) - return false; - - // Initialize variables - if (empty ($date)) { - $date = get_system_time (); - } - if ($daysWeek === null) { - $daysWeek = array(); - } - - // Hotfix: The edge values are confuse to the users - $percent = 0; - - // Limit date to start searching data - $datelimit = $date - $period; - - $search_in_history_db = db_search_in_history_db($datelimit); - - // Get interval data - $sql = sprintf ('SELECT * FROM tagente_datos - WHERE id_agente_modulo = %d - AND utimestamp > %d AND utimestamp <= %d', - $id_agent_module, $datelimit, $date); - - //Add the working times (mon - tue - wed ...) and from time to time - $days = array(); - //Translate to mysql week days - - if ($daysWeek) { - foreach ($daysWeek as $key => $value) { - if (!$value) { - if ($key == 'monday') { - $days[] = 2; - } - if ($key == 'tuesday') { - $days[] = 3; - } - if ($key == 'wednesday') { - $days[] = 4; - } - if ($key == 'thursday') { - $days[] = 5; - } - if ($key == 'friday') { - $days[] = 6; - } - if ($key == 'saturday') { - $days[] = 7; - } - if ($key == 'sunday') { - $days[] = 1; - } - } - } - } - - if (count($days) > 0) { - $sql .= ' AND DAYOFWEEK(FROM_UNIXTIME(utimestamp)) NOT IN (' . implode(',', $days) . ')'; - } - - if ($timeFrom != $timeTo) { - if ($timeFrom < $timeTo) { - $sql .= ' AND (TIME(FROM_UNIXTIME(utimestamp)) >= \'' . - $timeFrom . '\' - AND TIME(FROM_UNIXTIME(utimestamp)) <= \'' . - $timeTo . '\')'; - } - elseif ($timeFrom > $timeTo) { - $sql .= ' AND (TIME(FROM_UNIXTIME(utimestamp)) >= \'' . - $timeFrom . '\' - OR TIME(FROM_UNIXTIME(utimestamp)) <= \''. - $timeTo . '\')'; - } - } - - $sql .= ' ORDER BY utimestamp ASC'; - $interval_data = db_get_all_rows_sql ($sql, $search_in_history_db); - - if ($interval_data === false) { - $interval_data = array (); - } - - - // Indexing data - $interval_data_indexed = array(); - foreach($interval_data as $idata) { - $interval_data_indexed[$idata['utimestamp']]['data'] = $idata['datos']; - } - - //-----------Calculate unknown status events------------------------ - $events_unknown = db_get_all_rows_filter ('tevento', - array ('id_agentmodule' => $id_agent_module, - "utimestamp > $datelimit", - "utimestamp < $date", - 'order' => 'utimestamp ASC'), - array ('id_evento', 'evento', 'timestamp', 'utimestamp', 'event_type')); - - if ($events_unknown === false) { - $events_unknown = array (); - } - - // Add unknown periods to data - for ($i = 0; isset($events_unknown[$i]); $i++) { - $eu = $events_unknown[$i]; - - if ($eu['event_type'] == 'going_unknown') { - $interval_data_indexed[$eu['utimestamp']]['data'] = 0; - $interval_data_indexed[$eu['utimestamp']]['status'] = 4; - - // Search the corresponding recovery event. - for ($j = $i+1; isset($events_unknown[$j]); $j++) { - $eu = $events_unknown[$j]; - - if ($eu['event_type'] != 'going_unknown' && substr ($eu['event_type'], 0, 5) == 'going') { - $interval_data_indexed[$eu['utimestamp']]['data'] = 0; - $interval_data_indexed[$eu['utimestamp']]['status'] = 6; - - // Do not process read events again. - $i = $j; - break; - } - } - } - } - - // Get the last event before inverval to know if graph start on unknown - $prev_event = db_get_row_filter ('tevento', - array ('id_agentmodule' => $id_agent_module, - "utimestamp <= $datelimit", - 'order' => 'utimestamp DESC')); - if (isset($prev_event['event_type']) && $prev_event['event_type'] == 'going_unknown') { - $start_unknown = true; - } - else { - $start_unknown = false; - } - //------------------------------------------------------------------ - - //-----------------Set limits of the interval----------------------- - // Get previous data (This adds the first data if the begin of module data is after the begin time interval) - $previous_data = modules_get_previous_data ($id_agent_module, $datelimit); - if ($previous_data !== false ) { - $previous_value = $previous_data['datos']; - // if ((($previous_value > ($min_value - $percent)) && ($previous_value < ($min_value + $percent))) || - // (($previous_value > ($max_value - $percent)) && ($previous_value < ($max_value + $percent)))) {//2 when value is within the edges - // $previous_known_status = 2; - // } - // else - if (($previous_value >= ($min_value + $percent)) && ($previous_value <= ($max_value - $percent))) { //1 when value is OK - $previous_known_status = 1; - } - elseif (($previous_value <= ($min_value - $percent)) || ($previous_value >= ($max_value + $percent))) { //3 when value is Wrong - $previous_known_status = 3; - } - } - - // If the starting of the graph is unknown we set it - if ($start_unknown) { - $interval_data_indexed[$datelimit]['data'] = 0; - $interval_data_indexed[$datelimit]['status'] = 4; - } - else { - if ($previous_data !== false ) { - $interval_data_indexed[$datelimit]['data'] = $previous_data['datos']; - } - else { // If there are not data befor interval set unknown - $interval_data_indexed[$datelimit]['data'] = 0; - $interval_data_indexed[$datelimit]['status'] = 4; - $previous_known_status = 1; // Assume the module was in normal status if there is no previous data. - } - } - - // Get next data (This adds data before the interval of the report) - $next_data = modules_get_next_data ($id_agent_module, $date); - - if ($next_data !== false) { - $interval_data_indexed[$date]['data'] = $previous_data['datos']; - } - else if (count ($interval_data_indexed) > 0) { - // Propagate the last known data to the end of the interval (if there is no module data at the end point) - ksort($interval_data_indexed); - $last_data = end($interval_data_indexed); - $interval_data_indexed[$date] = $last_data; - } - - //------------------------------------------------------------------ - - //--------Calculate planned downtime dates-------------------------- - $downtime_dates = reporting_get_planned_downtimes_intervals($id_agent_module, $datelimit, $date); - - foreach ($downtime_dates as $downtime_date) { - // Delete data of the planned downtime and put the last data on the upper limit - $interval_data_indexed[$downtime_date['date_from']]['data'] = 0; - $interval_data_indexed[$downtime_date['date_from']]['status'] = 5; - $interval_data_indexed[$downtime_date['date_to']]['data'] = 0; - $interval_data_indexed[$downtime_date['date_to']]['status'] = 4; - - $last_downtime_data = false; - foreach ($interval_data_indexed as $idi_timestamp => $idi) { - if ($idi_timestamp != $downtime_date['date_from'] && $idi_timestamp != $downtime_date['date_to'] && - $idi_timestamp >= $downtime_date['date_from'] && $idi_timestamp <= $downtime_date['date_to']) { - $last_downtime_data = $idi['data']; - unset($interval_data_indexed[$idi_timestamp]); - } - } - - // Set the last data of the interval as limit - if ($last_downtime_data !== false) { - $interval_data_indexed[$downtime_date['date_to']]['data'] = $last_downtime_data; - } - } - //------------------------------------------------------------------ - - // Sort the array - ksort($interval_data_indexed); - - // We need more or equal two points - if (count ($interval_data_indexed) < 2) { - return false; - } - - //Get the percentage for the limits - $diff = $max_value - $min_value; - - // Get module type - $id_module_type = db_get_value('id_tipo_modulo', 'tagente_modulo', 'id_agente_modulo', $id_agent_module); - // If module is boolean don't create translation intervals (on the edge intervals) - // if ($id_module_type == 2 or $id_module_type == 6 or $id_module_type == 9 or $id_module_type == 18) { - // $percent = 0; - // } - // else { - // // Getting 10% of $diff --> $percent = ($diff/100)*10, so... - // $percent = $diff / 10; - // } - - //Set initial conditions - $first_data = array_shift ($interval_data); - $previous_utimestamp = $date - $period; - - $previous_value = $first_data ['datos']; - $previous_status = 0; - - if (isset($first_data['status'])) { - // 4 for the Unknown value and 5 for planned downtime - $previous_status = $first_data['status']; - } - // elseif ((($previous_value > ($min_value - $percent)) && ($previous_value < ($min_value + $percent))) || - // (($previous_value > ($max_value - $percent)) && ($previous_value < ($max_value + $percent)))) {//2 when value is within the edges - // $previous_status = 2; - // } - elseif (($previous_value >= ($min_value + $percent)) && ($previous_value <= ($max_value - $percent))) { //1 when value is OK - $previous_status = 1; - } - elseif (($previous_value <= ($min_value - $percent)) || ($previous_value >= ($max_value + $percent))) { //3 when value is Wrong - $previous_status = 3; - } - - $data_colors = array(); - $i = 0; - - foreach ($interval_data_indexed as $utimestamp => $data) { - $change = false; - $value = $data['data']; - if (isset($data['status'])) { - // Leaving unkown status. - if ($data['status'] == 6) { - $status = $previous_known_status; - } - // 4 unknown, 5 planned downtime. - else { - $status = $data['status']; - } - } - // elseif ((($value > ($min_value - $percent)) && ($value < ($min_value + $percent))) || - // (($value > ($max_value - $percent)) && ($value < ($max_value + $percent)))) { //2 when value is within the edges - // $status = 2; - // } - elseif (($value >= ($min_value + $percent)) && ($value <= ($max_value - $percent))) { //1 when value is OK - $status = 1; - } - elseif (($value <= ($min_value - $percent)) || ($value >= ($max_value + $percent))) { //3 when value is Wrong - $status = 3; - } - - if ($status != $previous_status) { - $change = true; - $data_colors[$i]['data'] = $previous_status; - $data_colors[$i]['utimestamp'] = $utimestamp - $previous_utimestamp; - $i++; - $previous_status = $status; - $previous_utimestamp = $utimestamp; - } - - // Save the last known status. - if ($status <= 3) { - $previous_known_status = $status; - } - } - if ($change == false) { - $data_colors[$i]['data'] = $previous_status; - $data_colors[$i]['utimestamp'] = $date - $previous_utimestamp; - } - - return $data_colors; -} - function reporting_get_stats_servers() { global $config; @@ -10214,7 +10003,7 @@ You can of course remove the warnings, that's why we include the source and do n $output .= 'parameters["page"] = "include/ajax/events";'; $output .= 'parameters["total_events"] = 1;'; - $output .= '$.ajax({type: "GET",url: "ajax.php",data: parameters,'; + $output .= '$.ajax({type: "GET",url: "/pandora_console/ajax.php",data: parameters,'; $output .= 'success: function(data) {'; $output .= '$("#total_events").text(data);'; $output .= '}'; @@ -10575,7 +10364,7 @@ function reporting_label_macro ($item, $label) { case 'MTTR': case 'automatic_graph': if (preg_match("/_agent_/", $label)) { - if (count($item['agents']) > 1) { + if (isset($item['agents']) && count($item['agents']) > 1) { $agent_name = count($item['agents']) . __(' agents'); } else { diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index f6df651464..182977207d 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -113,7 +113,10 @@ function html_do_report_info($report) { <tr> <td><b>' . __('Report date') . ': </b></td>'; if (isset($report['period'])) { - $html .= '<td>' . date($config["date_format"], ($report['datetime'] - $report['period'])); + if (is_numeric($report['datetime']) && is_numeric($report['period'])) { + $html .= '<td>' . date($config["date_format"], ($report['datetime'] - $report['period'])) . '</td>'; + } + $html .= '<td></td>'; } else { $html .= '<td>' . __('Items period before') . ' <b>' . date($config["date_format"], $report['datetime']) . '</b></td>'; @@ -346,18 +349,17 @@ function reporting_html_print_report($report, $mini = false, $report_info = 1) { function reporting_html_SLA($table, $item, $mini) { $style = db_get_value('style', 'treport_content', 'id_rc', $item['id_rc']); $style = json_decode(io_safe_output($style), true); - $hide_notinit_agent = $style['hide_notinit_agents']; $same_agent_in_resume = ""; - + global $config; - + if ($mini) { $font_size = '1.5'; } else { $font_size = '3'; } - + $metaconsole_on = is_metaconsole(); if($metaconsole_on){ $src= '../../'; @@ -371,20 +373,19 @@ function reporting_html_SLA($table, $item, $mini) { $table->data['sla']['cell'] = $item['failed']; } else { - if (!empty($item['planned_downtimes'])) { $downtimes_table = reporting_html_planned_downtimes_table($item['planned_downtimes']); - + if (!empty($downtimes_table)) { $table->colspan['planned_downtime']['cell'] = 3; $table->data['planned_downtime']['cell'] = $downtimes_table; } } - if(!(!isset($item['data']) && $hide_notinit_agent == 1)) { + if(isset($item['data'])) { $table1 = new stdClass(); $table1->width = '99%'; - + $table1->align = array(); $table1->align[0] = 'left'; $table1->align[1] = 'left'; @@ -392,9 +393,9 @@ function reporting_html_SLA($table, $item, $mini) { $table1->align[3] = 'right'; $table1->align[4] = 'right'; $table1->align[5] = 'right'; - + $table1->data = array (); - + $table1->head = array (); $table1->head[0] = __('Agent'); $table1->head[1] = __('Module'); @@ -402,7 +403,7 @@ function reporting_html_SLA($table, $item, $mini) { $table1->head[3] = __('SLA Limit'); $table1->head[4] = __('SLA Compliance'); $table1->head[5] = __('Status'); - + $table1->headstyle = array(); $table1->headstyle[2] = 'text-align: right'; $table1->headstyle[3] = 'text-align: right'; @@ -412,7 +413,7 @@ function reporting_html_SLA($table, $item, $mini) { //second_table for time globals $table2 = new stdClass(); $table2->width = '99%'; - + $table2->align = array(); $table2->align[0] = 'left'; $table2->align[1] = 'left'; @@ -421,9 +422,9 @@ function reporting_html_SLA($table, $item, $mini) { $table2->align[4] = 'right'; $table2->align[5] = 'right'; $table2->align[6] = 'right'; - + $table2->data = array (); - + $table2->head = array (); $table2->head[0] = __('Global Time'); $table2->head[1] = __('Time Total'); @@ -432,7 +433,7 @@ function reporting_html_SLA($table, $item, $mini) { $table2->head[4] = __('Time Unknown'); $table2->head[5] = __('Time Not Init'); $table2->head[6] = __('Downtime'); - + $table2->headstyle = array(); $table2->headstyle[2] = 'text-align: right'; $table2->headstyle[3] = 'text-align: right'; @@ -443,7 +444,7 @@ function reporting_html_SLA($table, $item, $mini) { //third_table for time globals $table3 = new stdClass(); $table3->width = '99%'; - + $table3->align = array(); $table3->align[0] = 'left'; $table3->align[1] = 'left'; @@ -452,16 +453,16 @@ function reporting_html_SLA($table, $item, $mini) { $table3->align[4] = 'right'; $table3->align[5] = 'right'; $table3->align[6] = 'right'; - + $table3->data = array (); - + $table3->head = array (); $table3->head[0] = __('Checks Time'); $table3->head[1] = __('Checks Total'); $table3->head[2] = __('Checks Failed'); $table3->head[3] = __('Checks OK'); $table3->head[4] = __('Checks Unknown'); - + $table3->headstyle = array(); $table3->headstyle[2] = 'text-align: right'; $table3->headstyle[3] = 'text-align: right'; @@ -478,170 +479,85 @@ function reporting_html_SLA($table, $item, $mini) { $row[] = $sla['module']; if(is_numeric($sla['dinamic_text'])){ - $row[] = sla_truncate($sla['max'], $config['graph_precision']) . " / " . - sla_truncate($sla['min'], $config['graph_precision']); + $row[] = sla_truncate($sla['max'], $config['graph_precision']) . " / " . + sla_truncate($sla['min'], $config['graph_precision']); } else{ $row[] = $sla['dinamic_text']; } $row[] = round($sla['sla_limit'], 2) . "%"; - if (!$hide_notinit_agent) { - - - if (reporting_sla_is_not_init_from_array($sla)) { - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NOTINIT.';">' . - __('N/A') . '</span>'; - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NOTINIT.';">' . - __('Not init') . '</span>'; - } elseif (reporting_sla_is_ignored_from_array($sla)) { - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_IGNORED.';">' . - __('N/A') . '</span>'; - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_IGNORED.';">' . - __('No data') . '</span>'; - // Normal calculation - } elseif ($sla['sla_status']) { - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . - sla_truncate($sla['sla_value'], $config['graph_precision']) . "%" . '</span>'; - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . - __('OK') . '</span>'; - } - else { - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . - sla_truncate($sla['sla_value'], $config['graph_precision']) . "%" . '</span>'; - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . - __('Fail') . '</span>'; - } - - //second table for time globals - $row2 = array(); - $row2[] = $sla['agent'] . ' -- [' . $sla['module'] . ']'; - - if($sla['time_total'] != 0) - $row2[] = human_time_description_raw($sla['time_total']); - else - $row2[] = '--'; - - if($sla['time_error'] != 0) - $row2[] = '<span style="color: '.COL_CRITICAL.';">' . human_time_description_raw($sla['time_error'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_ok'] != 0) - $row2[] = '<span style="color: '.COL_NORMAL.';">' . human_time_description_raw($sla['time_ok'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_unknown'] != 0) - $row2[] = '<span style="color: '.COL_UNKNOWN.';">' . human_time_description_raw($sla['time_unknown'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_not_init'] != 0) - $row2[] = '<span style="color: '.COL_NOTINIT.';">' . human_time_description_raw($sla['time_not_init'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_downtime'] != 0) - $row2[] = '<span style="color: '.COL_DOWNTIME .';">' . human_time_description_raw($sla['time_downtime'], true) . '</span>'; - else - $row2[] = '--'; - - //third table for checks globals - $row3 = array(); - $row3[] = $sla['agent'] . ' -- [' . $sla['module'] . ']'; - $row3[] = $sla['checks_total']; - $row3[] = '<span style="color: '.COL_CRITICAL.';">' . $sla['checks_error'] . '</span>'; - $row3[] = '<span style="color: '.COL_NORMAL.';">' . $sla['checks_ok'] . '</span>'; - $row3[] = '<span style="color: '.COL_UNKNOWN.';">' . $sla['checks_unknown'] . '</span>'; - + if (reporting_sla_is_not_init_from_array($sla)) { + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NOTINIT.';">' . + __('N/A') . '</span>'; + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NOTINIT.';">' . + __('Not init') . '</span>'; + } elseif (reporting_sla_is_ignored_from_array($sla)) { + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_IGNORED.';">' . + __('N/A') . '</span>'; + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_IGNORED.';">' . + __('No data') . '</span>'; + // Normal calculation + } elseif ($sla['sla_status']) { + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . + sla_truncate($sla['sla_value'], $config['graph_precision']) . "%" . '</span>'; + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . + __('OK') . '</span>'; } else { - if ($item['date']['to'] > $the_first_men_time) { - //first_table - $row = array(); - $row[] = $sla['agent']; - $row[] = $sla['module']; - - if(is_numeric($sla['dinamic_text'])){ - $row[] = sla_truncate($sla['max'], $config['graph_precision']) . " / " . - sla_truncate($sla['min'], $config['graph_precision']); - } - else{ - $row[] = $sla['dinamic_text']; - } - - $row[] = round($sla['sla_limit'], 2) . "%"; - - if ($sla['sla_value_unknown']) { - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_UNKNOWN.';">' . - __('N/A') . '</span>'; - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_UNKNOWN.';">' . - __('Unknown') . '</span>'; - } - elseif ($sla['sla_status']) { - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . - sla_truncate($sla['sla_value'], $config['graph_precision']) . "%" . '</span>'; - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_NORMAL.';">' . - __('OK') . '</span>'; - } - else { - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . - sla_truncate($sla['sla_value'], $config['graph_precision']) . "%" . '</span>'; - $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . - __('Fail') . '</span>'; - } - - //second table for time globals - $row2 = array(); - $row2[] = $sla['agent'] . ' -- [' . $sla['module'] . ']'; - - if($sla['time_total'] != 0) - $row2[] = human_time_description_raw($sla['time_total']); - else - $row2[] = '--'; - - if($sla['time_error'] != 0) - $row2[] = '<span style="color: '.COL_CRITICAL.';">' . human_time_description_raw($sla['time_error'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_ok'] != 0) - $row2[] = '<span style="color: '.COL_NORMAL.';">' . human_time_description_raw($sla['time_ok'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_unknown'] != 0) - $row2[] = '<span style="color: '.COL_UNKNOWN.';">' . human_time_description_raw($sla['time_unknown'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_not_init'] != 0) - $row2[] = '<span style="color: '.COL_NOTINIT.';">' . human_time_description_raw($sla['time_not_init'], true) . '</span>'; - else - $row2[] = '--'; - - if($sla['time_downtime'] != 0) - $row2[] = '<span style="color: '.COL_DOWNTIME .';">'. human_time_description_raw($sla['time_downtime'], true) . '</span>'; - else - $row2[] = '--'; - - //third table for checks globals - $row3 = array(); - $row3[] = $sla['agent'] . ' -- [' . $sla['module'] . ']'; - $row3[] = $sla['checks_total']; - $row3[] = '<span style="color: '.COL_CRITICAL.';">' . $sla['checks_error'] . '</span>'; - $row3[] = '<span style="color: '.COL_NORMAL.';">' . $sla['checks_ok'] . '</span>'; - $row3[] = '<span style="color: '.COL_UNKNOWN.';">' . $sla['checks_unknown'] . '</span>'; - } + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . + sla_truncate($sla['sla_value'], $config['graph_precision']) . "%" . '</span>'; + $row[] = '<span style="font: bold '.$font_size.'em Arial, Sans-serif; color: '.COL_CRITICAL.';">' . + __('Fail') . '</span>'; } + //second table for time globals + $row2 = array(); + $row2[] = $sla['agent'] . ' -- [' . $sla['module'] . ']'; + + if($sla['time_total'] != 0) + $row2[] = human_time_description_raw($sla['time_total']); + else + $row2[] = '--'; + + if($sla['time_error'] != 0) + $row2[] = '<span style="color: '.COL_CRITICAL.';">' . human_time_description_raw($sla['time_error'], true) . '</span>'; + else + $row2[] = '--'; + + if($sla['time_ok'] != 0) + $row2[] = '<span style="color: '.COL_NORMAL.';">' . human_time_description_raw($sla['time_ok'], true) . '</span>'; + else + $row2[] = '--'; + + if($sla['time_unknown'] != 0) + $row2[] = '<span style="color: '.COL_UNKNOWN.';">' . human_time_description_raw($sla['time_unknown'], true) . '</span>'; + else + $row2[] = '--'; + + if($sla['time_not_init'] != 0) + $row2[] = '<span style="color: '.COL_NOTINIT.';">' . human_time_description_raw($sla['time_not_init'], true) . '</span>'; + else + $row2[] = '--'; + + if($sla['time_downtime'] != 0) + $row2[] = '<span style="color: '.COL_DOWNTIME .';">' . human_time_description_raw($sla['time_downtime'], true) . '</span>'; + else + $row2[] = '--'; + + //third table for checks globals + $row3 = array(); + $row3[] = $sla['agent'] . ' -- [' . $sla['module'] . ']'; + $row3[] = $sla['checks_total']; + $row3[] = '<span style="color: '.COL_CRITICAL.';">' . $sla['checks_error'] . '</span>'; + $row3[] = '<span style="color: '.COL_NORMAL.';">' . $sla['checks_ok'] . '</span>'; + $row3[] = '<span style="color: '.COL_UNKNOWN.';">' . $sla['checks_unknown'] . '</span>'; + $table1->data[] = $row; $table2->data[] = $row2; $table3->data[] = $row3; } } - $table->colspan['sla']['cell'] = 2; $table->data['sla']['cell'] = html_print_table($table1, true); $table->colspan['time_global']['cell'] = 2; @@ -654,29 +570,21 @@ function reporting_html_SLA($table, $item, $mini) { $table->data['error']['cell'] = __('There are no Agent/Modules defined'); } - + if (!empty($item['charts'])) { $table1 = new stdClass(); $table1->width = '99%'; - + $table1->size = array (); + $table1->size[0] = '10%'; + $table1->data = array (); - if (!$hide_notinit_agent) { - foreach ($item['charts'] as $chart) { - $table1->data[] = array( - $chart['agent'] . "<br />" . $chart['module'], - $chart['chart']); - } - } - else{ - foreach ($item['charts'] as $chart) { - $the_first_men_time = get_agent_first_time(io_safe_output($chart['agent'])); - if ($item['date']['to'] > $the_first_men_time) { - $table1->data[] = array( - $chart['agent'] . "<br />" . $chart['module'], - $chart['chart']); - } - } + + foreach ($item['charts'] as $chart) { + $table1->data[] = array( + $chart['agent'] . "<br />" . $chart['module'], + $chart['chart']); } + $table->colspan['charts']['cell'] = 2; $table->data['charts']['cell'] = html_print_table($table1, true); @@ -689,32 +597,32 @@ function reporting_html_SLA($table, $item, $mini) { $table1->data[0][0] = '<img src ="'. $src .'images/square_green.png">'; $table1->size[1] = '14%'; $table1->data[0][1] = '<span>'.__('OK') . '</span>'; - + $table1->size[2] = '2%'; $table1->data[0][2] = '<img src ="'. $src .'images/square_red.png">'; $table1->size[3] = '14%'; $table1->data[0][3] = '<span>'.__('Critical'). '</span>'; - + $table1->size[4] = '2%'; $table1->data[0][4] = '<img src ="'. $src .'images/square_gray.png">'; $table1->size[5] = '14%'; $table1->data[0][5] = '<span>'.__('Unknow'). '</span>'; - + $table1->size[6] = '2%'; $table1->data[0][6] = '<img src ="'. $src .'images/square_blue.png">'; $table1->size[7] = '14%'; $table1->data[0][7] = '<span>'.__('Not Init'). '</span>'; - + $table1->size[8] = '2%'; $table1->data[0][8] = '<img src ="'. $src .'images/square_violet.png">'; $table1->size[9] = '14%'; $table1->data[0][9] = '<span>'.__('Downtimes'). '</span>'; - + $table1->size[10] = '2%'; $table1->data[0][10] = '<img src ="'. $src .'images/square_light_gray.png">'; $table1->size[11] = '15%'; $table1->data[0][11] = '<span>'.__('Ignore time'). '</span>'; - + $table->colspan['legend']['cell'] = 2; $table->data['legend']['cell'] = html_print_table($table1, true); } @@ -2322,16 +2230,15 @@ function reporting_html_text(&$table, $item) { function reporting_html_availability(&$table, $item) { $style = db_get_value('style', 'treport_content', 'id_rc', $item['id_rc']); $style = json_decode(io_safe_output($style), true); - $hide_notinit_agent = $style['hide_notinit_agents']; $same_agent_in_resume = ""; - + global $config; - - if (!empty($item["data"]) || $hide_notinit_agent !=1) { + + if (!empty($item["data"])) { $table1 = new stdClass(); $table1->width = '99%'; $table1->data = array (); - + $table1->head = array (); $table1->head[0] = __('Agent'); // HACK it is saved in show_graph field. @@ -2349,7 +2256,7 @@ function reporting_html_availability(&$table, $item) { $table1->head[6] = __('Time Not Init Module'); $table1->head[7] = __('Time Downtime'); $table1->head[8] = __('% Ok'); - + $table1->headstyle = array(); $table1->headstyle[0] = 'text-align: left'; $table1->headstyle[1] = 'text-align: left'; @@ -2360,7 +2267,7 @@ function reporting_html_availability(&$table, $item) { $table1->headstyle[6] = 'text-align: right'; $table1->headstyle[7] = 'text-align: right'; $table1->headstyle[8] = 'text-align: right'; - + $table1->style[0] = 'text-align: left'; $table1->style[1] = 'text-align: left'; $table1->style[2] = 'text-align: right'; @@ -2399,7 +2306,7 @@ function reporting_html_availability(&$table, $item) { $table2->headstyle[4] = 'text-align: right'; $table2->headstyle[5] = 'text-align: right'; //$table2->headstyle[6] = 'text-align: right'; - + $table2->style[0] = 'text-align: left'; $table2->style[1] = 'text-align: left'; $table2->style[2] = 'text-align: right'; @@ -2410,103 +2317,51 @@ function reporting_html_availability(&$table, $item) { foreach ($item['data'] as $row) { $the_first_men_time = get_agent_first_time(io_safe_output($row['agent'])); - - if (!$hide_notinit_agent) { - $table_row = array(); - $table_row[] = $row['agent']; - $table_row[] = $row['availability_item']; - - if($row['time_total'] != 0) - $table_row[] = human_time_description_raw($row['time_total'], true); - else - $table_row[] = '--'; - - if($row['time_error'] != 0) - $table_row[] = human_time_description_raw($row['time_error'], true); - else - $table_row[] = '--'; - - if($row['time_ok'] != 0) - $table_row[] = human_time_description_raw($row['time_ok'], true); - else - $table_row[] = '--'; - if($row['time_unknown'] != 0) - $table_row[] = human_time_description_raw($row['time_unknown'], true); - else - $table_row[] = '--'; - - if($row['time_not_init'] != 0) - $table_row[] = human_time_description_raw($row['time_not_init'], true); - else - $table_row[] = '--'; + $table_row = array(); + $table_row[] = $row['agent']; + $table_row[] = $row['availability_item']; - if($row['time_downtime'] != 0) - $table_row[] = human_time_description_raw($row['time_downtime'], true); - else - $table_row[] = '--'; - - $table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($row['SLA'], $config['graph_precision']). '%</span>'; + if($row['time_total'] != 0) + $table_row[] = human_time_description_raw($row['time_total'], true); + else + $table_row[] = '--'; - $table_row2 = array(); - $table_row2[] = $row['agent']; - $table_row2[] = $row['availability_item']; - $table_row2[] = $row['checks_total']; - $table_row2[] = $row['checks_error']; - $table_row2[] = $row['checks_ok']; - $table_row2[] = $row['checks_unknown']; - } - else { - if ($item['date']['to'] > $the_first_men_time) { - $table_row = array(); - $table_row[] = $row['agent']; - $table_row[] = $row['availability_item']; - - if($row['time_total'] != 0) - $table_row[] = human_time_description_raw($row['time_total'], true); - else - $table_row[] = '--'; - - if($row['time_error'] != 0) - $table_row[] = human_time_description_raw($row['time_error'], true); - else - $table_row[] = '--'; - - if($row['time_ok'] != 0) - $table_row[] = human_time_description_raw($row['time_ok'], true); - else - $table_row[] = '--'; + if($row['time_error'] != 0) + $table_row[] = human_time_description_raw($row['time_error'], true); + else + $table_row[] = '--'; - if($row['time_unknown'] != 0) - $table_row[] = human_time_description_raw($row['time_unknown'], true); - else - $table_row[] = '--'; - - if($row['time_not_init'] != 0) - $table_row[] = human_time_description_raw($row['time_not_init'], true); - else - $table_row[] = '--'; + if($row['time_ok'] != 0) + $table_row[] = human_time_description_raw($row['time_ok'], true); + else + $table_row[] = '--'; - if($row['time_downtime'] != 0) - $table_row[] = human_time_description_raw($row['time_downtime'], true); - else - $table_row[] = '--'; - - $table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($row['SLA'], $config['graph_precision']). '%</span>'; + if($row['time_unknown'] != 0) + $table_row[] = human_time_description_raw($row['time_unknown'], true); + else + $table_row[] = '--'; + + if($row['time_not_init'] != 0) + $table_row[] = human_time_description_raw($row['time_not_init'], true); + else + $table_row[] = '--'; + + if($row['time_downtime'] != 0) + $table_row[] = human_time_description_raw($row['time_downtime'], true); + else + $table_row[] = '--'; + + $table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($row['SLA'], $config['graph_precision']). '%</span>'; + + $table_row2 = array(); + $table_row2[] = $row['agent']; + $table_row2[] = $row['availability_item']; + $table_row2[] = $row['checks_total']; + $table_row2[] = $row['checks_error']; + $table_row2[] = $row['checks_ok']; + $table_row2[] = $row['checks_unknown']; - $table_row2 = array(); - $table_row2[] = $row['agent']; - $table_row2[] = $row['availability_item']; - $table_row2[] = $row['checks_total']; - $table_row2[] = $row['checks_error']; - $table_row2[] = $row['checks_ok']; - $table_row2[] = $row['checks_unknown']; - } - else { - $same_agent_in_resume = $item['data']['agent']; - } - } - $table1->data[] = $table_row; $table2->data[] = $table_row2; } @@ -2516,19 +2371,19 @@ function reporting_html_availability(&$table, $item) { $table->data['error']['cell'] = __('There are no Agent/Modules defined'); } - + $table->colspan[1][0] = 2; $table->colspan[2][0] = 2; $data = array(); $data[0] = html_print_table($table1, true); array_push ($table->data, $data); - + if ($item['resume']['resume']){ $data2 = array(); $data2[0] = html_print_table($table2, true); array_push ($table->data, $data2); - } - + } + if ($item['resume']['resume'] && !empty($item["data"])) { $table1->width = '99%'; $table1->data = array (); @@ -2539,29 +2394,29 @@ function reporting_html_availability(&$table, $item) { $table1->head['min_text'] = __('Agent min value'); $table1->head['min'] = __('Min Value'); $table1->head['avg'] = __('Average Value'); - + $table1->headstyle = array(); $table1->headstyle['min_text'] = 'text-align: left'; $table1->headstyle['min'] = 'text-align: right'; $table1->headstyle['max_text'] = 'text-align: left'; $table1->headstyle['max'] = 'text-align: right'; $table1->headstyle['avg'] = 'text-align: right'; - + $table1->style = array(); $table1->style['min_text'] = 'text-align: left'; $table1->style['min'] = 'text-align: right'; $table1->style['max_text'] = 'text-align: left'; $table1->style['max'] = 'text-align: right'; $table1->style['avg'] = 'text-align: right'; - + $table1->data[] = array( 'max_text' => $item['resume']['max_text'], 'max' => sla_truncate($item['resume']['max'], $config['graph_precision']) . "%", 'min_text' => $item['resume']['min_text'], 'min' => sla_truncate($item['resume']['min'], $config['graph_precision']) . "%", 'avg' => '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($item['resume']['avg'], $config['graph_precision']) . "%</span>" - ); - + ); + $table->colspan[3][0] = 3; $data = array(); $data[0] = html_print_table($table1, true); @@ -2573,15 +2428,26 @@ function reporting_html_availability(&$table, $item) { function reporting_html_availability_graph(&$table, $item, $pdf=0) { global $config; $metaconsole_on = is_metaconsole(); - if($metaconsole_on && $pdf==0){ - $src= '../../'; + + if($metaconsole_on){ + $hack_metaconsole = "../../"; } else{ - $src=$config['homeurl']; + $hack_metaconsole = ""; } + + $src=ui_get_full_url(false); + + $tables_chart = ''; + $table1 = new stdClass(); $table1->width = '99%'; $table1->data = array (); + $table1->size = array(); + $table1->size[0] = '10%'; + $table1->size[1] = '80%'; + $table1->size[2] = '5%'; + $table1->size[3] = '5%'; foreach ($item['charts'] as $chart) { $checks_resume = ''; $sla_value = ''; @@ -2606,61 +2472,58 @@ function reporting_html_availability_graph(&$table, $item, $pdf=0) { $sla_value = sla_truncate($chart['sla_value'], $config['graph_precision']) . '%'; $checks_resume = "(" . $chart['checks_ok'] . "/" . $chart['checks_total'] . ")"; } - $table1->data[] = array( - $chart['agent'] . "<br />" . $chart['module'], - $chart['chart'], - "<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>" . - $sla_value . - '</span>', - $checks_resume - ); + + $table1->data[0][0] = $chart['agent'] . "<br />" . $chart['module']; + $table1->data[0][1] = $chart['chart']; + $table1->data[0][2] = "<span style = 'font: bold 2em Arial, Sans-serif; color: ".$color."'>" . $sla_value . '</span>'; + $table1->data[0][3] = $checks_resume; + $tables_chart .= html_print_table($table1, true); } if($item['type'] == 'availability_graph'){ + //table_legend_graphs; + $table2 = new stdClass(); + $table2->width = '99%'; + $table2->data = array (); + $table2->size = array (); + $table2->size[0] = '2%'; + $table2->data[0][0] = '<img src ="'. $src . $hack_metaconsole . 'images/square_green.png">'; + $table2->size[1] = '14%'; + $table2->data[0][1] = '<span>'.__('OK') . '</span>'; - //table_legend_graphs; - $table2 = new stdClass(); - $table2->width = '99%'; - $table2->data = array (); - $table2->size = array (); - $table2->size[0] = '2%'; - $table2->data[0][0] = '<img src ="'. $src .'images/square_green.png">'; - $table2->size[1] = '14%'; - $table2->data[0][1] = '<span>'.__('OK') . '</span>'; - - $table2->size[2] = '2%'; - $table2->data[0][2] = '<img src ="'. $src .'images/square_red.png">'; - $table2->size[3] = '14%'; - $table2->data[0][3] = '<span>'.__('Critical'). '</span>'; - - $table2->size[4] = '2%'; - $table2->data[0][4] = '<img src ="'. $src .'images/square_gray.png">'; - $table2->size[5] = '14%'; - $table2->data[0][5] = '<span>'.__('Unknow'). '</span>'; + $table2->size[2] = '2%'; + $table2->data[0][2] = '<img src ="'. $src . $hack_metaconsole .'images/square_red.png">'; + $table2->size[3] = '14%'; + $table2->data[0][3] = '<span>'.__('Critical'). '</span>'; - $table2->size[6] = '2%'; - $table2->data[0][6] = '<img src ="'. $src .'images/square_blue.png">'; - $table2->size[7] = '14%'; - $table2->data[0][7] = '<span>'.__('Not Init'). '</span>'; - - $table2->size[8] = '2%'; - $table2->data[0][8] = '<img src ="'. $src .'images/square_violet.png">'; - $table2->size[9] = '14%'; - $table2->data[0][9] = '<span>'.__('Downtimes'). '</span>'; + $table2->size[4] = '2%'; + $table2->data[0][4] = '<img src ="'. $src . $hack_metaconsole .'images/square_gray.png">'; + $table2->size[5] = '14%'; + $table2->data[0][5] = '<span>'.__('Unknow'). '</span>'; - $table2->size[10] = '2%'; - $table2->data[0][10] = '<img src ="'. $src .'images/square_light_gray.png">'; - $table2->size[11] = '15%'; - $table2->data[0][11] = '<span>'.__('Ignore time'). '</span>'; - + $table2->size[6] = '2%'; + $table2->data[0][6] = '<img src ="'. $src . $hack_metaconsole .'images/square_blue.png">'; + $table2->size[7] = '14%'; + $table2->data[0][7] = '<span>'.__('Not Init'). '</span>'; + + $table2->size[8] = '2%'; + $table2->data[0][8] = '<img src ="'. $src . $hack_metaconsole .'images/square_violet.png">'; + $table2->size[9] = '14%'; + $table2->data[0][9] = '<span>'.__('Downtimes'). '</span>'; + + $table2->size[10] = '2%'; + $table2->data[0][10] = '<img src ="'. $src . $hack_metaconsole .'images/square_light_gray.png">'; + $table2->size[11] = '15%'; + $table2->data[0][11] = '<span>'.__('Ignore time'). '</span>'; } - + $table->colspan['charts']['cell'] = 2; - $table->data['charts']['cell'] = html_print_table($table1, true); + $table->data['charts']['cell'] = $tables_chart; $table->colspan['legend']['cell'] = 2; $table->data['legend']['cell'] = html_print_table($table2, true); + if($pdf){ - return html_print_table($table, true); + return $tables_chart . '<br />' . html_print_table($table2, true); } } @@ -2865,24 +2728,6 @@ function reporting_html_sql(&$table, $item) { } } - - - - - - - - - - - - - - - - - - function reporting_get_stats_summary($data, $graph_width, $graph_height) { global $config; @@ -2907,8 +2752,7 @@ function reporting_get_stats_summary($data, $graph_width, $graph_height) { if ($data["monitor_checks"] > 0) { // Fixed width non interactive charts - $status_chart_width = $config["flash_charts"] == false - ? 100 : $graph_width; + $status_chart_width = $graph_width; $tdata[0] = '<div style="margin: auto; width: ' . $graph_width . 'px;">' . @@ -3046,125 +2890,6 @@ function reporting_get_fired_alerts_table ($alerts_fired) { return $table; } -/** - * Get a report for alerts in a group of agents. - * - * It prints the numbers of alerts defined, fired and not fired in a group. - * It also prints all the alerts that were fired grouped by agents. - * - * @param int $id_group Group to get info of the alerts. - * @param int $period Period of time of the desired alert report. - * @param int $date Beggining date of the report (current date by default). - * @param bool $return Flag to return or echo the report (echo by default). - * - * @return string - */ -function reporting_alert_reporting ($id_group, $period = 0, $date = 0, $return = false) { - global $config; - - $output = ''; - $alerts = get_group_alerts ($id_group); - $alerts_fired = get_alerts_fired ($alerts, $period, $date); - - $fired_percentage = 0; - if (sizeof ($alerts) > 0) - $fired_percentage = round (sizeof ($alerts_fired) / sizeof ($alerts) * 100, 2); - $not_fired_percentage = 100 - $fired_percentage; - - $data = array (); - $data[__('Alerts fired')] = $fired_percentage; - $data[__('Alerts not fired')] = $not_fired_percentage; - - $output .= pie3d_graph(false, $data, 280, 150, - __("other"), - ui_get_full_url(false, false, false, false) . '/', - ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", - $config['fontpath'], $config['font_size']); - - $output .= '<strong>'.__('Alerts fired').': '.sizeof ($alerts_fired).'</strong><br />'; - $output .= '<strong>'.__('Total alerts monitored').': '.sizeof ($alerts).'</strong><br />'; - - if (! sizeof ($alerts_fired)) { - if (!$return) - echo $output; - - return $output; - } - $table = reporting_get_fired_alerts_table ($alerts_fired); - $table->width = '100%'; - $table->class = 'databox'; - $table->size = array (); - $table->size[0] = '100px'; - $table->style = array (); - $table->style[0] = 'font-weight: bold'; - - $output .= html_print_table ($table, true); - - if (!$return) - echo $output; - - return $output; -} - -/** - * Get a report for monitors modules in a group of agents. - * - * It prints the numbers of monitors defined, showing those which went up and down, in a group. - * It also prints all the down monitors in the group. - * - * @param int $id_group Group to get info of the monitors. - * @param int $period Period of time of the desired monitor report. - * @param int $date Beginning date of the report in UNIX time (current date by default). - * @param bool $return Flag to return or echo the report (by default). - * - * @return string - */ -function reporting_monitor_health ($id_group, $period = 0, $date = 0, $return = false) { - if (empty ($date)) //If date is 0, false or empty - $date = get_system_time (); - - $datelimit = $date - $period; - $output = ''; - - $monitors = modules_get_monitors_in_group ($id_group); - if (empty ($monitors)) //If monitors has returned false or an empty array - return; - $monitors_down = modules_get_monitors_down ($monitors, $period, $date); - $down_percentage = round (count ($monitors_down) / count ($monitors) * 100, 2); - $not_down_percentage = 100 - $down_percentage; - - $output .= '<strong>'.__('Total monitors').': '.count ($monitors).'</strong><br />'; - $output .= '<strong>'.__('Monitors down on period').': '.count ($monitors_down).'</strong><br />'; - - $table = reporting_get_monitors_down_table ($monitors_down); - $table->width = '100%'; - $table->class = 'databox'; - $table->size = array (); - $table->size[0] = '100px'; - $table->style = array (); - $table->style[0] = 'font-weight: bold'; - - $table->size = array (); - $table->size[0] = '100px'; - - $output .= html_print_table ($table, true); - - $data = array(); - $data[__('Monitors OK')] = $down_percentage; - $data[__('Monitors BAD')] = $not_down_percentage; - - $output .= pie3d_graph(false, $data, 280, 150, - __("other"), - ui_get_full_url(false, false, false, false) . '/', - ui_get_full_url(false, false, false, false) . "/images/logo_vertical_water.png", - $config['fontpath'], $config['font_size']); - - if (!$return) - echo $output; - - return $output; -} - /** * Get a report table with all the monitors down. * @@ -3805,6 +3530,7 @@ function reporting_get_last_activity() { } function reporting_get_event_histogram ($events, $text_header_event = false) { + global $config; if (!defined("METACONSOLE")) { include_once ($config['homedir'] .'/include/graphs/functions_gd.php'); @@ -3887,37 +3613,40 @@ function reporting_get_event_histogram ($events, $text_header_event = false) { ); } } - + $table = new stdClass(); - if (!$text_header_event) { - $table->width = '100%'; - } - else { - if (defined("METACONSOLE")) { - $table->width = '100%'; - } - else { - $table->width = '70%'; - } - } + $table->width = '100%'; $table->data = array (); $table->size = array (); $table->head = array (); $table->title = '<span>' . $text_header_event . '</span>'; $table->data[0][0] = "" ; - - if (!empty($graph_data)) { - if (defined("METACONSOLE")) - $slicebar = flot_slicesbar_graph($graph_data, $max_value, "100%", 35, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $url); - else { - if (!$text_header_event) { - $slicebar = slicesbar_graph($graph_data, $max_value, 700, 25, $colors, $config['fontpath'], $config['round_corner'], $urlImage, $ttl); - } - else { - $slicebar = slicesbar_graph($graph_data, $max_value, 350, 18, $colors, $config['fontpath'], $config['round_corner'], $urlImage, $ttl); - } - } + if (!empty($graph_data)) { + $url_slice = defined("METACONSOLE") + ? $url + : $urlImage; + + $slicebar = flot_slicesbar_graph ( + $graph_data, + $max_value, + 100, + 35, + $full_legend, + $colors, + $config['fontpath'], + $config['round_corner'], + $url, + '', + '', + false, + 0, + array(), + true, + $ttl, + false, + false + ); $table->data[0][0] = $slicebar; } @@ -3964,9 +3693,9 @@ function reporting_get_event_histogram_meta ($width) { $ttl = 1; $urlImage = ui_get_full_url(false, true, false, false); - + $data = array (); - + //$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph $resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph @@ -3989,10 +3718,10 @@ function reporting_get_event_histogram_meta ($width) { EVENT_CRIT_MAJOR => COL_MAJOR, EVENT_CRIT_CRITICAL => COL_CRITICAL ); - + $user_groups = users_get_groups($config['id_user'], 'ER'); $user_groups_ids = array_keys($user_groups); - + if (empty($user_groups)) { $groups_condition = ' AND 1 = 0 '; } @@ -4004,51 +3733,46 @@ function reporting_get_event_histogram_meta ($width) { $groups_condition .= " AND id_grupo != 0"; } $status_condition = " AND estado = 0 "; - + $cont = 0; for ($i = 0; $i < $interval; $i++) { $bottom = $datelimit + ($periodtime * $i); if (! $graphic_type) { - if ($config['flash_charts']) { - $name = date('H:i:s', $bottom); - } - else { - $name = date('H\h', $bottom); - } + $name = date('H:i:s', $bottom); } else { $name = $bottom; } - + // Show less values in legend if ($cont == 0 or $cont % 2) $legend[$cont] = $name; - + if ($from_agent_view) { $full_date = date('Y/m/d', $bottom); $full_legend_date[$cont] = $full_date; } $full_legend[$cont] = $name; - + $top = $datelimit + ($periodtime * ($i + 1)); - + $time_condition = 'utimestamp > '.$bottom . ' AND utimestamp < '.$top; $sql = sprintf('SELECT criticity,utimestamp FROM tmetaconsole_event WHERE %s %s %s ORDER BY criticity DESC', $time_condition, $groups_condition, $status_condition); - + $events = db_get_all_rows_sql($sql); - + $events_criticity = array(); if(is_array($events)){ foreach ($events as $key => $value) { array_push($events_criticity,$value['criticity']); } } - + if (!empty($events)) { if(array_search('4',$events_criticity) !== false){ $data[$cont]['data'] = EVENT_CRIT_CRITICAL; @@ -4069,16 +3793,14 @@ function reporting_get_event_histogram_meta ($width) { }else { $data[$cont]['data'] = EVENT_CRIT_INFORMATIONAL; } - $data[$cont]['utimestamp'] = $periodtime; - } else { $data[$cont]['utimestamp'] = $periodtime; $data[$cont]['data'] = 1; } $cont++; } - + $table = new stdClass(); $table->width = '100%'; @@ -4088,16 +3810,35 @@ function reporting_get_event_histogram_meta ($width) { $table->head = array (); $table->title = '<span>' . $text_header_event . '</span>'; $table->data[0][0] = "" ; - + if (!empty($data)) { - $slicebar = flot_slicesbar_graph($data, $period, "100%", 30, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $url, '', '', false, 0, $full_legend_date); - + $slicebar = flot_slicesbar_graph( + $data, + $period, + 100, + 30, + $full_legend, + $colors, + $config['fontpath'], + $config['round_corner'], + $url, + '', + '', + false, + 0, + $full_legend_date, + true, + 1, + false, + false + ); + $table->data[0][0] = $slicebar; } else { $table->data[0][0] = __('No events'); } - + if (!$text_header_event) { $event_graph = '<fieldset class="databox tactical_set"> <legend>' . @@ -4109,7 +3850,6 @@ function reporting_get_event_histogram_meta ($width) { $table->class = 'noclass'; $event_graph = html_print_table($table, true); } - return $event_graph; } @@ -4182,4 +3922,4 @@ function reporting_html_planned_downtimes_table ($planned_downtimes) { return $downtimes_table; } -?> \ No newline at end of file +?> diff --git a/pandora_console/include/functions_snmp.php b/pandora_console/include/functions_snmp.php index fe5333f162..769524744c 100644 --- a/pandora_console/include/functions_snmp.php +++ b/pandora_console/include/functions_snmp.php @@ -25,6 +25,7 @@ * @param string Snmp especific OID. */ function snmp_generate_trap($snmp_host_address, $snmp_community, $snmp_oid, $snmp_agent, $snmp_data, $snmp_type) { + global $config; // Call snmptrap if (empty($config['snmptrap'])) { switch (PHP_OS) { @@ -35,7 +36,9 @@ function snmp_generate_trap($snmp_host_address, $snmp_community, $snmp_oid, $snm $snmptrap_bin = '/usr/pkg/bin/snmptrap'; break; default: - $snmptrap_bin = 'snmptrap'; + $snmptrap_bin = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' + ? 'C:\Windows\snmptrap.exe' + : 'snmptrap'; break; } } diff --git a/pandora_console/include/functions_tags.php b/pandora_console/include/functions_tags.php index bd6aaebd63..b6c7647562 100644 --- a/pandora_console/include/functions_tags.php +++ b/pandora_console/include/functions_tags.php @@ -770,7 +770,7 @@ function tags_get_acl_tags_module_condition($acltags, $modules_table = '') { function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group_and_tag = false, $force_equal = false) { global $config; - $condition = ''; + $condition = array(); // Get all tags of the system $all_tags = tags_get_all_tags(false); @@ -808,8 +808,11 @@ function tags_get_acl_tags_event_condition($acltags, $meta = false, $force_group $tags_condition = $group_condition . " AND (" . implode(" OR ", $tags_condition_array) . ")"; $condition[] = "($tags_condition)\n"; } + if (!empty($condition)) { $condition = implode(' OR ', $condition); + } else { + $condition = ''; } if (!empty($without_tags)) { diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index fb3305c323..a4be0d445e 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -278,6 +278,11 @@ function treeview_printModuleTable($id_module, $server_data = false, $no_head = )); $salida = ui_get_snapshot_image($link, $is_snapshot) . '  '; } + + if($salida !== NULL){ + $last_data_str = html_print_image('images/clock2.png', true, array('title' => $last_data["timestamp"], 'width' => '18px')); + } + $last_data_str .= $salida; } else { @@ -486,16 +491,22 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals if ($agent == false) return; // Check all groups - $groups = agents_get_all_groups_agent($id_agente, $agent["id_grupo"], is_metaconsole()); + $groups = agents_get_all_groups_agent($id_agente, $agent["id_grupo"]); if (! check_acl_one_of_groups ($config["id_user"], $groups, "AR") && ! check_acl_one_of_groups ($config["id_user"], $groups, "AW") && !$is_extra) { db_pandora_audit("ACL Violation", "Trying to access Agent General Information"); require_once ("general/noaccess.php"); + if (!empty($server_data) && is_metaconsole()) { + metaconsole_restore_db(); + } return; } if ($agent === false) { ui_print_error_message(__('There was a problem loading agent')); + if (!empty($server_data) && is_metaconsole()) { + metaconsole_restore_db(); + } return; } @@ -524,7 +535,7 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals $hashdata = $user.$pwd_deserialiced['auth_token']; $hashdata = md5($hashdata); - $url = "//" . $server_data["server_url"] . "/index.php?" . + $url = $server_data["server_url"] . "/index.php?" . "sec=estado&" . "sec2=operation/agentes/ver_agente&" . "id_agente=" . $agent["id_agente"] . "&" . @@ -610,7 +621,7 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals $go_to_agent = '<div style="text-align: right;">'; if($agent["id_os"] != 100){ - $go_to_agent .= '<a target=_blank href="' . "//" . $console_url . 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$url_hash.'">'; + $go_to_agent .= '<a target=_blank href="' . $console_url . 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.$url_hash.'">'; $go_to_agent .= html_print_submit_button (__('Go to agent edition'), 'upd_button', false, 'class="sub config"', true); } else{ @@ -708,20 +719,15 @@ function treeview_printTable($id_agente, $server_data = array(), $no_head = fals ui_toggle($table_advanced, __('Advanced information')); - // Blank space below title, DONT remove this, this - // Breaks the layout when Flash charts are enabled :-o - //echo '<div id="id_div" style="height: 10px"> </div>'; - if ($config["agentaccess"]) { $access_graph = '<div style="width:100%; height:130px;">'; - $access_graph .= graphic_agentaccess($id_agente, 380, 120, SECONDS_1DAY, true, true); + $access_graph .= graphic_agentaccess ($id_agente, 380, 120, SECONDS_1DAY, true, true); $access_graph .= '</div>'; ui_toggle($access_graph, __('Agent access rate (24h)')); } - $events_graph = '<div style="margin-left: 10px;">'; - $events_graph .= graph_graphic_agentevents ($id_agente, 290, 15, - SECONDS_1DAY, '', true); + $events_graph = '<div style="margin-left:10px; width:100%;">'; + $events_graph .= graph_graphic_agentevents ($id_agente, 375, 45, SECONDS_1DAY, '', true, false, true); $events_graph .= '</div><br>'; ui_toggle($events_graph, __('Events (24h)')); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 15bb0aba0e..8f6f5a35d8 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -548,7 +548,7 @@ function ui_print_group_icon ($id_group, $return = false, $path = "groups_small" $link = false; if ($link) - $output = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$id_group.'">'; + $output = '<a href="'.$config["homeurl"].'index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$id_group.'">'; if ($config['show_group_name']) { $output .= '<span title="'. groups_get_name($id_group, true) .'">' . @@ -855,7 +855,8 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f // Restore the default connection. metaconsole_restore_db(); $errors++; - break; + //break; It does not work in the php7 version remplace for: + return false; } } @@ -978,7 +979,7 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f if ($alert["times_fired"] > 0) { $status = STATUS_ALERT_FIRED; - $title = __('Alert fired').' '.$alert["times_fired"].' '.__('times'); + $title = __('Alert fired').' '.$alert["internal_counter"].' '.__('time(s)'); } elseif ($alert["disabled"] > 0) { $status = STATUS_ALERT_DISABLED; @@ -1455,6 +1456,14 @@ function ui_process_page_head ($string, $bitfield) { $exists_css = !empty($skin_styles); } } + +// Add the jquery UI styles CSS +$config['css']['jquery-UI'] = "include/styles/jquery-ui.min.css"; +// Add the dialog styles CSS +$config['css']['dialog'] = "include/styles/dialog.css"; +// Add the dialog styles CSS +$config['css']['dialog'] = "include/javascript/introjs.css"; + //If skin's css files exists then add them if ($exists_css) { foreach ($skin_styles as $filename => $name) { @@ -1471,18 +1480,7 @@ function ui_process_page_head ($string, $bitfield) { $config['style'] => "include/styles/" . $config['style'] . ".css"), $config['css']); } - - - - // Add the jquery UI styles CSS - $config['css']['jquery-UI'] = "include/styles/jquery-ui-1.10.0.custom.css"; - // Add the dialog styles CSS - $config['css']['dialog'] = "include/styles/dialog.css"; - // Add the dialog styles CSS - $config['css']['dialog'] = "include/javascript/introjs.css"; - - - + //We can't load empty and we loaded (conditionally) ie $loaded = array ('', 'ie'); @@ -1499,18 +1497,14 @@ function ui_process_page_head ($string, $bitfield) { //////////////////////////////////////////////////////////////////// //End load CSS //////////////////////////////////////////////////////////////////// - - - - + //////////////////////////////////////////////////////////////////// //Load JS //////////////////////////////////////////////////////////////////// if (empty ($config['js'])) { $config['js'] = array (); //If it's empty, false or not init set array to empty just in case } - - + //Pandora specific JavaScript should go first $config['js'] = array_merge (array ("pandora" => "include/javascript/pandora.js"), $config['js']); //Load base64 javascript library @@ -1524,26 +1518,22 @@ function ui_process_page_head ($string, $bitfield) { $config['js']['clippy'] = "include/javascript/clippy.js"; //Load Underscore.js library $config['js']['underscore'] = "include/javascript/underscore-min.js"; - - + //Load other javascript //We can't load empty $loaded = array (''); foreach ($config['js'] as $name => $filename) { if (in_array ($name, $loaded)) continue; - array_push ($loaded, $name); - + $url_js = ui_get_full_url($filename); $output .= '<script type="text/javascript" src="' . $url_js . '"></script>'."\n\t"; } //////////////////////////////////////////////////////////////////// //End load JS //////////////////////////////////////////////////////////////////// - - - + //////////////////////////////////////////////////////////////////// //Load jQuery //////////////////////////////////////////////////////////////////// @@ -1563,9 +1553,9 @@ function ui_process_page_head ($string, $bitfield) { } else { $config['jquery'] = array_merge( - array ("jquery" => "include/javascript/jquery-1.9.0.js", + array ("jquery" => "include/javascript/jquery-3.3.1.min.js", "pandora" => "include/javascript/jquery.pandora.js", - 'jquery-ui' => 'include/javascript/jquery.jquery-ui-1.10.0.custom.js'), + 'jquery-ui' => 'include/javascript/jquery-ui.min.js'), $config['jquery']); } @@ -1593,24 +1583,16 @@ function ui_process_page_head ($string, $bitfield) { //////////////////////////////////////////////////////////////////// //End load JQuery //////////////////////////////////////////////////////////////////// - - - - - if ($config['flash_charts']) { - //Include the javascript for the js charts library - include_once($config["homedir"] . '/include/graphs/functions_flot.php'); - $output .= include_javascript_dependencies_flot_graph(true); - } - - + + include_once($config["homedir"] . '/include/graphs/functions_flot.php'); + $output .= include_javascript_dependencies_flot_graph(true); + $output .= '<!--[if gte IE 6]> <link rel="stylesheet" href="include/styles/ie.css" type="text/css"/> <![endif]-->'; - + $output .= $string; - - + return $output; } @@ -2107,7 +2089,7 @@ function ui_print_moduletype_icon ($id_moduletype, $return = false, $relative = * @return string HTML string */ function ui_print_module_warn_value ($max_warning, $min_warning, $str_warning, $max_critical, $min_critical, $str_critical) { - $data = "<span style='font-size: 8px' title='" . __("Warning") . ": " . __("Max") . $max_warning . "/" . __("Min") . $min_warning . " - " . __("Critical") . ": " . __("Max") . $max_critical . "/" . __("Min") . $min_critical . "'>"; + $data = "<span title='" . __("Warning") . ": " . __("Max") . $max_warning . "/" . __("Min") . $min_warning . " - " . __("Critical") . ": " . __("Max") . $max_critical . "/" . __("Min") . $min_critical . "'>"; if ($max_warning != $min_warning) { $data .= format_for_graph($max_warning) ."/". format_for_graph ($min_warning); @@ -2156,19 +2138,25 @@ function ui_format_filesize ($bytes) { */ function ui_get_status_images_path () { global $config; - + $imageset = $config["status_images_set"]; - + if (strpos ($imageset, ",") === false) $imageset .= ",40x18"; - list ($imageset, $sizes) = preg_split ("/\,/", $imageset); - + + $array_split = preg_split ("/\,/", $imageset); + $imageset = $array_split[0]; + $sizes = $array_split[1]; + if (strpos ($sizes, "x") === false) $sizes .= "x18"; - list ($imagewidth, $imageheight) = preg_split ("/x/", $sizes); - + + $array_split_size = preg_split ("/x/", $sizes); + $imagewidth = $array_split_size[0]; + $imageheight = $array_split_size[1]; + $imagespath = 'images/status_sets/'.$imageset; - + return array ($imagespath); } @@ -2185,20 +2173,21 @@ function ui_get_status_images_path () { */ function ui_print_status_image ($type, $title = "", $return = false, $options = false, $path = false) { if ($path === false) { - list ($imagepath) = ui_get_status_images_path (); + $imagepath_array = ui_get_status_images_path (); + $imagepath = $imagepath_array[0]; } else { $imagepath = $path; } - + $imagepath .= "/" . $type; - + if ($options === false) { $options = array(); } - + $options['title'] = $title; - + return html_print_image ($imagepath, $return, $options, false, false, false, true); } @@ -2395,6 +2384,10 @@ function ui_get_full_url ($url = '', $no_proxy = false, $add_name_php_file = fal $port = null; // null means 'use the starndard port' $proxy = false; //By default Pandora FMS doesn't run across proxy. + if(isset ($_SERVER['HTTP_X_FORWARDED_PROTO']) + && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { + $_SERVER['HTTPS'] = 'on'; + } if (isset ($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === true || $_SERVER['HTTPS'] == 'on')) { @@ -3845,8 +3838,7 @@ function ui_print_module_string_value($value, $id_agente_module, 'id_module' => $id_agente_module, 'last_data' => $value, 'interval' => $current_interval, - 'module_name' => $module_name, - 'timestamp' => db_get_value('timestamp', 'tagente_estado', 'id_agente_modulo', $id_agente_module) + 'module_name' => $module_name )); $salida = ui_get_snapshot_image($link, $is_snapshot) . '  '; } else { @@ -3892,7 +3884,7 @@ function ui_print_module_string_value($value, $id_agente_module, " / " . $module_name; $salida = "<div " . "id='hidden_value_module_" . $id_agente_module . "' - style='display: none; width: 100%; height: 100%; overflow: scroll; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left' title='" . $title_dialog . "'>" . + style='display: none; width: 100%; height: 100%; overflow: auto; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left' title='" . $title_dialog . "'>" . $value . "</div>" . "<span " . @@ -3964,8 +3956,14 @@ function ui_get_snapshot_link($params, $only_params = false) { "id=" . $params['id_module'] . "&label=" . rawurlencode(urlencode(io_safe_output($params['module_name']))). "&id_node=" . $params['id_node']; - if ($params['timestamp'] != 0) $url .= "×tamp=" . $parms['timestamp']; - if ($params['timestamp'] != 0) $url .= "&refr=" . $parms['interval']; + + if ($params['timestamp'] != 0) { + $url .= "×tamp=" . $params['timestamp']; + } + + if ($params['interval'] != 0) { + $url .= "&refr=" . $params['interval']; + } // Second parameter of js winopeng_var $win_handle = dechex(crc32('snapshot_' . $params['id_module'])); diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index d6112fb0bb..24491f592d 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -487,7 +487,7 @@ function visual_map_print_item($mode = "read", $layoutData, else { $url = ui_meta_get_url_console_child( $layoutData['id_metaconsole'], - "estado", "operation/agentes/ver_agente&id_agente=" . $layoutData['id_agent'], null, null, null, $isExternalLink); + "view", "operation/agentes/status_monitor&id_module=" . $layoutData['id_agente_modulo'], null, null, null, $isExternalLink); } } else { @@ -1203,17 +1203,17 @@ function visual_map_print_item($mode = "read", $layoutData, if ($layoutData['label_position']=='left') { if ($layoutData['type_graph'] == 'horizontal') { $img = '<div style="float:right;height:'.$himg.'px;">'. - hbar_graph(true, $module_data, + hbar_graph($module_data, 400, 400, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], $layoutData['border_color']) . '</div>'; } else { $img = '<div style="float:right;height:'.$himg.'px;">'. - vbar_graph(true, $module_data, + vbar_graph($module_data, 400, 400, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], true, false, $layoutData['border_color']) . '</div>'; } @@ -1221,33 +1221,33 @@ function visual_map_print_item($mode = "read", $layoutData, elseif($layoutData['label_position']=='right') { if ($layoutData['type_graph'] == 'horizontal') { $img = '<div style="float:left;height:'.$himg.'px;">'. - hbar_graph(true, $module_data, + hbar_graph($module_data, 400, 400, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], $layoutData['border_color']) . '</div>'; } else { $img = '<div style="float:left;height:'.$himg.'px;">'. - vbar_graph(true, $module_data, + vbar_graph($module_data, 400, 400, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], true, false, $layoutData['border_color']) . '</div>'; } } else { if ($layoutData['type_graph'] == 'horizontal') { - $img = hbar_graph(true, $module_data, + $img = hbar_graph($module_data, 400, 400, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], $layoutData['border_color']); } else { - $img = vbar_graph(true, $module_data, + $img = vbar_graph($module_data, 400, 400, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], true, false, $layoutData['border_color']); } @@ -1257,17 +1257,17 @@ function visual_map_print_item($mode = "read", $layoutData, if ($layoutData['label_position']=='left') { if ($layoutData['type_graph'] == 'horizontal') { $img = '<div style="float:right;height:'.$himg.'px;">'. - hbar_graph(true, $module_data, + hbar_graph($module_data, $width, $height, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], $layoutData['border_color']) . '</div>'; } else { $img = '<div style="float:right;height:'.$himg.'px;">'. - vbar_graph(true, $module_data, + vbar_graph($module_data, $width, $height, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], true, false, $layoutData['border_color']) . '</div>'; } @@ -1275,33 +1275,33 @@ function visual_map_print_item($mode = "read", $layoutData, elseif($layoutData['label_position']=='right') { if ($layoutData['type_graph'] == 'horizontal') { $img = '<div style="float:left;height:'.$himg.'px;">'. - hbar_graph(true, $module_data, + hbar_graph($module_data, $width, $height, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], $layoutData['border_color']) . '</div>'; } else { $img = '<div style="float:left;height:'.$himg.'px;">'. - vbar_graph(true, $module_data, + vbar_graph($module_data, $width, $height, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], true, false, $layoutData['border_color']) . '</div>'; } } else { if ($layoutData['type_graph'] == 'horizontal') { - $img = hbar_graph(true, $module_data, + $img = hbar_graph($module_data, $width, $height, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], $layoutData['border_color']); } else { - $img = vbar_graph(true, $module_data, + $img = vbar_graph($module_data, $width, $height, $color, array(), array(), - ui_get_full_url("images/image_problem.opaque.png", false, false, false), + ui_get_full_url("images/image_problem_area.png", false, false, false), "", "", $water_mark, $config['fontpath'], 6, "", 0, $config['homeurl'], $layoutData['image'], true, false, $layoutData['border_color']); } @@ -1479,7 +1479,7 @@ function visual_map_print_item($mode = "read", $layoutData, $img = '<img src="../../images/console/signes/module-events.png">'; } else{ - $img = '<img src="images/console/signes/module-events.png">'; + $img = '<img src="images/console/signes/module-events.png">'; } } else{ @@ -1494,28 +1494,28 @@ function visual_map_print_item($mode = "read", $layoutData, else { if ($width == 0 || $height == 0) { if ($layoutData['label_position']=='left') { - $img = '<div style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;">' .graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; + $img = '<div style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;width:500px;">' .graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; } elseif ($layoutData['label_position']=='right') { - $img = '<div style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;">' . graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; + $img = '<div style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;width:500px;">' . graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; } else { - $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true); + $img = '<div style="width:500px;">' . graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], 500, 50, $layoutData['period'], '', true).'</div>'; } } else{ if ($layoutData['label_position']=='left') { - $img = '<div style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;">' . graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; + $img = '<div style="z-index:'.$show_on_top_index.';float:left;height:'.$himg.'px;width:500px;">' . graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; } elseif ($layoutData['label_position']=='right') { - $img = '<div style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;">' .graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; + $img = '<div style="z-index:'.$show_on_top_index.';float:right;height:'.$himg.'px;width:500px;">' .graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; } else { - $img = graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true); + $img = '<div style="width:500px;">' . graph_graphic_moduleevents ($layoutData['id_agent'], $layoutData['id_agente_modulo'], $width, $height, $layoutData['period'], '', true).'</div>'; } } } - + //Restore db connection if ($layoutData['id_metaconsole'] != 0) { metaconsole_restore_db(); @@ -1524,7 +1524,7 @@ function visual_map_print_item($mode = "read", $layoutData, $z_index = 2 + 1; break; } - + $class = "item "; switch ($type) { case STATIC_GRAPH: @@ -1569,6 +1569,9 @@ function visual_map_print_item($mode = "read", $layoutData, case BOX_ITEM: $class .= "box_item"; break; + case COLOR_CLOUD: + $class .= "color_cloud"; + break; default: if (!empty($element_enterprise)) { $class .= $element_enterprise['class']; @@ -1633,78 +1636,11 @@ function visual_map_print_item($mode = "read", $layoutData, break; case STATIC_GRAPH: case GROUP_ITEM: - - - if (! defined ('METACONSOLE')) { - } - else { - // For each server defined and not disabled: - $servers = db_get_all_rows_sql ('SELECT * - FROM tmetaconsole_setup - WHERE disabled = 0'); - if ($servers === false) - $servers = array(); - - $result = array(); - $count_modules = 0; - foreach ($servers as $server) { - // If connection was good then retrieve all data server - if (metaconsole_connect($server) == NOERR) - $connection = true; - else - $connection = false; - - $result_server = db_get_all_rows_sql ($sql); - - if (!empty($result_server)) { - - // Create HASH login info - $pwd = $server['auth_token']; - $auth_serialized = json_decode($pwd,true); - - if (is_array($auth_serialized)) { - $pwd = $auth_serialized['auth_token']; - $api_password = $auth_serialized['api_password']; - $console_user = $auth_serialized['console_user']; - $console_password = $auth_serialized['console_password']; - } - - $user = $config['id_user']; - $user_rot13 = str_rot13($config['id_user']); - $hashdata = $user.$pwd; - $hashdata = md5($hashdata); - $url_hash = '&' . - 'loginhash=auto&' . - 'loginhash_data=' . $hashdata . '&' . - 'loginhash_user=' . $user_rot13; - - foreach ($result_server as $result_element_key => $result_element_value) { - - $result_server[$result_element_key]['server_id'] = $server['id']; - $result_server[$result_element_key]['server_name'] = $server['server_name']; - $result_server[$result_element_key]['server_url'] = $server['server_url'].'/'; - $result_server[$result_element_key]['hashdata'] = $hashdata; - $result_server[$result_element_key]['user'] = $config['id_user']; - - $count_modules++; - - } - - $result = array_merge($result, $result_server); - } - - if ($connection) { - metaconsole_restore_db(); - } - } - } - if (($layoutData['image'] != null && $layoutData['image'] != 'none') || $layoutData['show_statistics'] == 1) { $img_style_title = strip_tags($label); if ($layoutData['type'] == STATIC_GRAPH) { if ($layoutData['id_agente_modulo'] != 0) { - if ($layoutData['id_metaconsole'] != 0) { //Metaconsole db connection $connection = db_get_row_filter ('tmetaconsole_setup', @@ -1780,83 +1716,84 @@ function visual_map_print_item($mode = "read", $layoutData, else if($layoutData['label_position']=='right'){ $imgpos = 'float:left'; } - $varsize = getimagesize($config['homedir'] . '/' . $img); - - - if($layoutData['show_statistics'] == 1){ - + + if($layoutData['show_statistics'] == 1) { if (get_parameter('action') == 'edit') { - if ($width == 0 || $height == 0) { - - echo '<img id="image_'.$id.'" src="images/console/signes/group_status.png" style="width:520px;height:80px;'.$imgpos.'">'; + echo '<img id="image_'.$id.'" src="images/console/signes/group_status.png" style="width:520px;height:80px;'.$imgpos.'">'; } else{ - echo '<img id="image_'.$id.'" src="images/console/signes/group_status.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; + echo '<img id="image_'.$id.'" src="images/console/signes/group_status.png" style="width:'.$width.'px;height:'.$height.'px;'.$imgpos.'">'; } - } else{ - - $agents_critical = agents_get_agents(array ( - 'disabled' => 0, - 'id_grupo' => $layoutData['id_group'], - 'status' => AGENT_STATUS_CRITICAL), - array ('COUNT(*) as total'), 'AR', false); - - $agents_warning = agents_get_agents(array ( - 'disabled' => 0, - 'id_grupo' => $layoutData['id_group'], - 'status' => AGENT_STATUS_WARNING), - array ('COUNT(*) as total'), 'AR', false); - - $agents_unknown = agents_get_agents(array ( - 'disabled' => 0, - 'id_grupo' => $layoutData['id_group'], - 'status' => AGENT_STATUS_UNKNOWN), - array ('COUNT(*) as total'), 'AR', false); - - $agents_ok = agents_get_agents(array ( - 'disabled' => 0, - 'id_grupo' => $layoutData['id_group'], - 'status' => AGENT_STATUS_OK), - array ('COUNT(*) as total'), 'AR', false); - - $total_agents = $agents_critical[0]['total'] + $agents_warning[0]['total'] + $agents_unknown[0]['total'] + $agents_ok[0]['total']; - - $stat_agent_ok = $agents_ok[0]['total']/$total_agents*100; - $stat_agent_wa = $agents_warning[0]['total']/$total_agents*100; - $stat_agent_cr = $agents_critical[0]['total']/$total_agents*100; - $stat_agent_un = $agents_unknown[0]['total']/$total_agents*100; - - if($width == 0 || $height == 0){ - $dyn_width = 520; - $dyn_height = 80; - } - else{ - $dyn_width = $width; - $dyn_height = $height; - } - - - echo '<table cellpadding="0" cellspacing="0" border="0" class="databox" style="width:'.$dyn_width.'px;height:'.$dyn_height.'px;text-align:center;'; - - if($layoutData['label_position'] == 'left'){ - echo "float:right;"; - } - elseif ($layoutData['label_position'] == 'right') { - echo "float:left;"; - } - - echo '">'; - - echo "<tr style='height:10%;'>"; - echo "<th style='text-align:center;background-color:#9d9ea0;color:black;font-weight:bold;'>" .groups_get_name($layoutData['id_group'],true) . "</th>"; - - echo "</tr>"; - echo "<tr style='background-color:whitesmoke;height:90%;'>"; - echo "<td>"; + $agents_critical = agents_get_agents( + array ( + 'disabled' => 0, + 'id_grupo' => $layoutData['id_group'], + 'status' => AGENT_STATUS_CRITICAL + ), + array ('COUNT(*) as total'), + 'AR', + false + ); + $agents_warning = agents_get_agents( + array ( + 'disabled' => 0, + 'id_grupo' => $layoutData['id_group'], + 'status' => AGENT_STATUS_WARNING + ), + array ('COUNT(*) as total'), + 'AR', + false + ); + $agents_unknown = agents_get_agents( + array ( + 'disabled' => 0, + 'id_grupo' => $layoutData['id_group'], + 'status' => AGENT_STATUS_UNKNOWN + ), + array ('COUNT(*) as total'), + 'AR', + false + ); + $agents_ok = agents_get_agents( + array ( + 'disabled' => 0, + 'id_grupo' => $layoutData['id_group'], + 'status' => AGENT_STATUS_OK + ), + array ('COUNT(*) as total'), + 'AR', + false + ); + $total_agents = $agents_critical[0]['total'] + $agents_warning[0]['total'] + $agents_unknown[0]['total'] + $agents_ok[0]['total']; + $stat_agent_ok = $agents_ok[0]['total']/$total_agents*100; + $stat_agent_wa = $agents_warning[0]['total']/$total_agents*100; + $stat_agent_cr = $agents_critical[0]['total']/$total_agents*100; + $stat_agent_un = $agents_unknown[0]['total']/$total_agents*100; + if($width == 0 || $height == 0){ + $dyn_width = 520; + $dyn_height = 80; + } else { + $dyn_width = $width; + $dyn_height = $height; + } + echo '<table cellpadding="0" cellspacing="0" border="0" class="databox" style="width:'.$dyn_width.'px;height:'.$dyn_height.'px;text-align:center;'; + if($layoutData['label_position'] == 'left'){ + echo "float:right;"; + } + elseif ($layoutData['label_position'] == 'right') { + echo "float:left;"; + } + + echo '">'; + echo "<tr style='height:10%;'>"; + echo "<th style='text-align:center;background-color:#9d9ea0;color:black;font-weight:bold;'>" .groups_get_name($layoutData['id_group'],true) . "</th>"; + echo "</tr>"; + echo "<tr style='background-color:whitesmoke;height:90%;'>"; + echo "<td>"; echo "<div style='margin-left:2%;color: #FFF;font-size: 12px;display:inline;background-color:#FC4444;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>". remove_right_zeros(number_format($stat_agent_cr, 2)) ."%</div>"; echo "<div style='background-color:white;color: black ;font-size: 12px;display:inline;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>Critical</div>"; echo "<div style='margin-left:2%;color: #FFF;font-size: 12px;display:inline;background-color:#f8db3f;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>". remove_right_zeros(number_format($stat_agent_wa, 2)) ."%</div>"; @@ -1865,68 +1802,38 @@ function visual_map_print_item($mode = "read", $layoutData, echo "<div style='background-color:white;color: black ;font-size: 12px;display:inline;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>Normal</div>"; echo "<div style='margin-left:2%;color: #FFF;font-size: 12px;display:inline;background-color:#9d9ea0;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>". remove_right_zeros(number_format($stat_agent_un, 2)) ."%</div>"; echo "<div style='background-color:white;color: black ;font-size: 12px;display:inline;position:relative;height:80%;width:9.4%;height:80%;border-radius:2px;text-align:center;padding:5px;'>Unknown</div>"; - - echo "</td>"; - echo "</tr>"; - echo "</table>"; - - + echo "</td>"; + echo "</tr>"; + echo "</table>"; } - - } - else{ - + } else { + $options = array( + "class" => "image", + "id" => "image_" . $id, + "title" => $img_style_title, + "style" => $borderStyle.$imgpos + ); if ($width == 0 || $height == 0) { if($varsize[0] > 150 || $varsize[1] > 150){ - echo html_print_image($img, true, - array("class" => "image", - "id" => "image_" . $id, - "width" => "70px", - "height" => "70px", - "title" => $img_style_title, - "style" => $borderStyle.$imgpos), false, - false, false, $isExternalLink); - } - else{ - echo html_print_image($img, true, - array("class" => "image", - "id" => "image_" . $id, - "title" => $img_style_title, - "style" => $borderStyle.$imgpos), false, - false, false, $isExternalLink); + $options['width'] = "70px"; + $options['height'] = "70px"; } } else{ - echo html_print_image($img, true, - array("class" => "image", - "id" => "image_" . $id, - "width" => $width, - "height" => $height, - "title" => $img_style_title, - "style" => $borderStyle.$imgpos), false, - false, false, $isExternalLink); + $options['width'] = $width; + $options['height'] = $height; } - + echo html_print_image($img, true, $options, + false, false, false, $isExternalLink); } - } - - if($layoutData['label_position']=='down'){ - echo io_safe_output($text); - } - else if($layoutData['label_position']=='left' || $layoutData['label_position']=='right'){ + + if ($layoutData['label_position'] != 'up') { echo io_safe_output($text); } - - if (! defined ('METACONSOLE')) { - } - else { - metaconsole_restore_db(); - } - - - break; - + + if (is_metaconsole()) metaconsole_restore_db(); + break; case PERCENTILE_BAR: if (($layoutData['image'] == 'value') && ($value_text !== false)) { $unit_text = db_get_sql ('SELECT unit @@ -1963,6 +1870,9 @@ function visual_map_print_item($mode = "read", $layoutData, } echo $img; + + if (get_parameter('tab')=='editor') + echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>"; break; case PERCENTILE_BUBBLE: @@ -2006,6 +1916,9 @@ function visual_map_print_item($mode = "read", $layoutData, } echo $img; + + if (get_parameter('tab')=='editor') + echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>"; break; case CIRCULAR_PROGRESS_BAR: @@ -2049,6 +1962,9 @@ function visual_map_print_item($mode = "read", $layoutData, } echo $img; + + if (get_parameter('tab')=='editor') + echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>"; break; case CIRCULAR_INTERIOR_PROGRESS_BAR: @@ -2093,6 +2009,9 @@ function visual_map_print_item($mode = "read", $layoutData, } echo $img; + + if (get_parameter('tab')=='editor') + echo "<span style='color:".$fill_color.";'>".io_safe_output($text)."</span>"; break; case MODULE_GRAPH: @@ -2265,6 +2184,9 @@ function visual_map_print_item($mode = "read", $layoutData, } break; + case COLOR_CLOUD: + echo visual_map_get_color_cloud_element($layoutData); + break; default: if (!empty($element_enterprise)) { echo $element_enterprise['item']; @@ -2282,11 +2204,9 @@ function visual_map_print_item($mode = "read", $layoutData, if ($layoutData['parent_item'] != 0) { $parent = db_get_row_filter('tlayout_data', array('id' => $layoutData['parent_item'])); - + echo '<script type="text/javascript">'; - echo '$(document).ready (function() { - lines.push({"id": "' . $id . '" , "node_begin":"' . $layoutData['parent_item'] . '","node_end":"' . $id . '","color":"' . visual_map_get_color_line_status($parent) . '","thickness":"' . (empty($config["vc_line_thickness"]) ? 2 : $config["vc_line_thickness"]) . '"}); - });'; + echo 'lines.push({"id": "' . $id . '" , "node_begin":"' . $layoutData['parent_item'] . '","node_end":"' . $id . '","color":"' . visual_map_get_color_line_status($parent) . '","thickness":"' . (empty($config["vc_line_thickness"]) ? 2 : $config["vc_line_thickness"]) . '"});'; echo '</script>'; } } @@ -2306,19 +2226,35 @@ function get_if_module_is_image ($id_module) { } function get_bars_module_data ($id_module) { - $mod_values = db_get_value_filter('datos', 'tagente_estado', array('id_agente_modulo' => $id_module)); + //This charts is only serialize graphs. + //In other string show image no data to show. - if (preg_match("/\r\n/", $mod_values)) { - $values = explode("\r\n", $mod_values); - } - elseif (preg_match("/\n/", $mod_values)) { - $values = explode("\n", $mod_values); + $mod_values = db_get_value_filter( + 'datos', + 'tagente_estado', + array( + 'id_agente_modulo' => $id_module + ) + ); + + $values = false; + //avoid showing the image type modules. WUX + if(strpos($mod_values, 'data:image/png;base64') !== 0){ + if (preg_match("/\r\n/", $mod_values)) { + $values = explode("\r\n", $mod_values); + } + elseif (preg_match("/\n/", $mod_values)) { + $values = explode("\n", $mod_values); + } } $values_to_return = array(); $index = 0; $color_index = 0; $total = 0; + + if(!$values) return false; + foreach ($values as $val) { $data = explode(",", $val); $values_to_return[$data[0]] = array('g' =>$data[1]); @@ -3323,9 +3259,7 @@ function visual_map_print_user_lines($layout_data, $proportion = null) { } echo '<script type="text/javascript">'; - echo '$(document).ready (function() { - user_lines.push(' . json_encode($line) . '); - });'; + echo 'user_lines.push(' . json_encode($line) . ');'; echo '</script>'; } @@ -3369,7 +3303,7 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, var user_lines = Array(); //Fixed to wait the load of images. - $(window).load(function () { + $(window).on('load', function () { draw_lines(lines, 'background_' + id_layout); draw_user_lines_read('background_' + id_layout); //center_labels(); @@ -3531,7 +3465,9 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter $filter = array (); } else { if(!empty($filter['name'])){ - $where .= "name LIKE '%".io_safe_output($filter['name'])."%'"; + $where .= sprintf("name LIKE '%%%s%%'", + db_escape_string_sql(io_safe_output($filter['name']))); + unset($filter['name']); } } @@ -3597,17 +3533,17 @@ function visual_map_get_user_layouts ($id_user = 0, $only_names = false, $filter $retval[$layout['id']] = $layout; //add_perms - if ($groups[$layout['id_group']]['vconsole_view']){ + if (isset($groups[$layout['id_group']]['vconsole_view'])){ $retval[$layout['id']]['vr'] = $groups[$layout['id_group']]['vconsole_view']; } - if ($groups[$layout['id_group']]['vconsole_edit']){ + if (isset($groups[$layout['id_group']]['vconsole_edit'])){ $retval[$layout['id']]['vw'] = $groups[$layout['id_group']]['vconsole_edit']; } - if ($groups[$layout['id_group']]['vconsole_management']){ + if (isset($groups[$layout['id_group']]['vconsole_management'])){ $retval[$layout['id']]['vm'] = $groups[$layout['id_group']]['vconsole_management']; } } - + return $retval; } @@ -3955,6 +3891,10 @@ function visual_map_create_internal_name_item($label = null, $type, $image, $age case 'group_item': $text = __('Group') . " - "; break; + case COLOR_CLOUD: + case 'color_cloud': + $text = __('Color cloud') . " - "; + break; case 'icon': case ICON: $text = __('Icon') . " - " . @@ -4092,6 +4032,8 @@ function visual_map_type_in_js($type) { break; case LINE_ITEM: return 'line_item'; + case COLOR_CLOUD: + return 'color_cloud'; break; } } @@ -4107,5 +4049,76 @@ function visual_map_macro($label,$module){ return $label; } +function visual_map_get_color_cloud_element ($data) { + $id = (int) $data["id"]; + $diameter = (int) $data["width"]; + $dynamic_fields = array(); + + try { + // Yes, the dynamic fields object is stored into the label field. ¯\_(ツ)_/¯ + if (!empty($data["label"])) { + $dynamic_fields = json_decode($data["label"], true); + } + } catch (Exception $ex) {} + + $default_color = !empty($dynamic_fields["default_color"]) + ? $dynamic_fields["default_color"] + : "#FFFFFF"; + $color = $default_color; + // The svg gradient needs a unique identifier + $gradient_id = "grad_" . $id; + + // Color ranges + if ( + !empty($dynamic_fields["color_ranges"]) && + !empty($data["id_agente_modulo"]) + ) { + $node_id = null; + $node_connected = false; + // Connect to node + if (is_metaconsole() && !empty($data["id_metaconsole"])) { + $node_id = (int) $data["id_metaconsole"]; + if (metaconsole_connect(null, $node_id) === NOERR) $node_connected = true; + } + + // Fetch module value + $value = (!$node_id || ($node_id && $node_connected)) + ? modules_get_last_value($data["id_agente_modulo"]) + : false; + + // Restore connection + if ($node_connected) metaconsole_restore_db(); + + if ($value !== false) { + /* TODO: It would be ok to give support to string values in the future? + * It can be done by matching the range value with the value if it is a + * string. I think the function to retrieve the value only supports + * numeric values. + */ + $value = (float) $value; + foreach ($dynamic_fields["color_ranges"] as $range) { + if ($range["from_value"] <= $value && $range["to_value"] >= $value) { + $color = $range["color"]; + break; + } + } + } + } + + ob_start(); +?> + <svg height="<?php echo $diameter; ?>" width="<?php echo $diameter; ?>"> + <defs> + <radialGradient id="<?php echo $gradient_id; ?>" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"> + <stop offset="0%" style="stop-color:<?php echo $color; ?>;stop-opacity:0.9" /> + <!-- <stop offset="50%" style="stop-color:<?php echo $color; ?>;stop-opacity:0.6" /> --> + <stop offset="100%" style="stop-color:<?php echo $color; ?>;stop-opacity:0" /> + </radialGradient> + </defs> + <circle cx="50%" cy="50%" r="50%" fill="url(#<?php echo $gradient_id; ?>)" /> + </svg> +<?php + return ob_get_clean(); +} ?> \ No newline at end of file diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 81e9549fdd..4b835d65fc 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -62,7 +62,9 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { 'clock' => __('Clock'), 'group_item' => __('Group'), 'box_item' => __('Box'), - 'line_item' => __('Line')); + 'line_item' => __('Line'), + 'color_cloud' => __('Color cloud') + ); if (enterprise_installed()) { enterprise_visual_map_editor_add_title_palette($titles); @@ -203,7 +205,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['image_row']['html'] = '<td align="left">' . __('Image') . '</td> <td align="left">' . - html_print_select ($images_list, 'image', '', 'showPreview(this.value);', 'None', 'none', true) . + html_print_select ($images_list, 'image', '', 'showPreview(this.value);', 'None', '', true) . '</td>'; $form_items['clock_animation_row'] = array(); @@ -328,7 +330,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['agent_row'] = array(); $form_items['agent_row']['items'] = array('static_graph', 'percentile_bar', 'percentile_item', 'module_graph', - 'simple_value', 'datos', 'auto_sla_graph'); + 'simple_value', 'datos', 'auto_sla_graph', 'color_cloud'); $form_items['agent_row']['html'] = '<td align="left">' . __('Agent') . '</td>'; $params = array(); @@ -395,7 +397,8 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['module_row'] = array(); $form_items['module_row']['items'] = array('static_graph', 'percentile_bar', 'percentile_item', 'module_graph', - 'simple_value', 'datos', 'auto_sla_graph', 'donut_graph', 'bars_graph'); + 'simple_value', 'datos', 'auto_sla_graph', 'donut_graph', 'bars_graph', + 'color_cloud'); $form_items['module_row']['html'] = '<td align="left">' . __('Module') . '</td> <td align="left">' . @@ -510,7 +513,12 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { __('Max value') . '</td> <td align="left">' . html_print_input_text('max_percentile', 0, '', 3, 5, true) . '</td>'; - $percentile_type = array('percentile' => __('Percentile'), 'bubble' => __('Bubble'), 'circular_progress_bar' => __('Circular porgress bar'), 'interior_circular_progress_bar' => __('Circular progress bar (interior)')); + $percentile_type = array( + "percentile" => __("Percentile"), + "bubble" => __("Bubble"), + "circular_progress_bar" => __("Circular porgress bar"), + "interior_circular_progress_bar" => __("Circular progress bar (interior)") + ); $percentile_value = array('percent' => __('Percent'), 'value' => __('Value')); if (is_metaconsole()){ $form_items['percentile_item_row_3'] = array(); @@ -534,14 +542,14 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items['percentile_item_row_3']['html'] = '<td align="left">' . __('Type') . '</td> <td align="left">' . - html_print_select($percentile_type, 'type_percentile', 'percentile', '', '', '', true) . + html_print_select($percentile_type, 'type_percentile', 'percentile', '', '', '', true, false, false) . '</td>'; $form_items['percentile_item_row_4'] = array(); $form_items['percentile_item_row_4']['items'] = array('percentile_bar', 'percentile_item', 'datos'); $form_items['percentile_item_row_4']['html'] = '<td align="left">' . __('Value to show') . '</td> <td align="left">' . - html_print_select($percentile_value, 'value_show', 'percent', '', '', '', true) . + html_print_select($percentile_value, 'value_show', 'percent', '', '', '', true, false, false) . '</td>'; } @@ -580,13 +588,76 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { '<td align="left" style="">' . __('Show statistics') . '</td> <td align="left" style="">' . html_print_checkbox('show_statistics', 1, '', true) . '</td>'; + + // Start of Color Cloud rows + + // Diameter + $default_diameter = 100; + $form_items["color_cloud_diameter_row"] = array(); + $form_items["color_cloud_diameter_row"]["items"] = array("color_cloud"); + $form_items["color_cloud_diameter_row"]["html"] = + "<td align=\"left\">" . __("Diameter") . "</td> + <td align=\"left\">" . + html_print_input_text("diameter", $default_diameter, "", 3, 5, true) . + "</td>"; + + // Default color + $default_color = "#FFFFFF"; + $form_items["color_cloud_def_color_row"] = array(); + $form_items["color_cloud_def_color_row"]["items"] = array("color_cloud"); + $form_items["color_cloud_def_color_row"]["html"] = + "<td align=\"left\">" . __("Default color") . "</td> + <td align=\"left\">" . + html_print_input_color("default_color", $default_color, false, true) . + "</td>"; + + // Color ranges + $color_range_tip = __("The color of the element will be the one selected in the first range created in which the value of the module is found (with the initial and final values of the range included)") . "."; + $form_items["color_cloud_color_ranges_row"] = array(); + $form_items["color_cloud_color_ranges_row"]["items"] = array("color_cloud"); + $form_items["color_cloud_color_ranges_row"]["html"] = + "<td align=\"left\">" . + __("Ranges") . + ui_print_help_tip($color_range_tip, true) . + "</td>" . + "<td align=\"left\">" . + "<table id=\"new-color-range\" class=\"databox color-range color-range-creation\">" . + "<tr>" . + "<td>" . __("From value") . "</td>" . + "<td>" . + html_print_input_text("from_value_new", "", "", 5, 255, true) . + "</td>" . + "<td rowspan=\"4\">" . + "<a class=\"color-range-add\" href=\"#\">" . + html_print_image("images/add.png", true) . + "</a>" . + "</td>" . + "</tr>" . + "<td>" . __("To value") . "</td>" . + "<td>" . + html_print_input_text("to_value_new", "", "", 5, 255, true) . + "</td>" . + "<td></td>" . + "<tr>" . + "</tr>" . + "<tr>" . + "<td>" . __("Color") . "</td>" . + "<td>" . + html_print_input_color("color_new", $default_color, false, true) . + "</td>" . + "<td></td>" . + "</tr>" . + "</table>" . + "</td>"; + // End of Color Cloud rows + $form_items['show_on_top_row'] = array(); $form_items['show_on_top_row']['items'] = array('group_item'); $form_items['show_on_top_row']['html'] = '<td align="left" style="">' . __('Always show on top') . '</td> <td align="left" style="">' . - html_print_checkbox('show_on_top', 1, '', true) . '</td>'; + html_print_checkbox('show_on_top', 1, '', true) .ui_print_help_tip (__("It allows the element to be superimposed to the rest of items of the visual console"), true) . '</td>'; $show_last_value = array('0' => __('Hide last value on boolean modules'), '1' => __('Enabled'), '2' => __('Disabled')); $form_items['show_last_value_row'] = array(); @@ -616,7 +687,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { __('Type') . '</td> <td align="left">' . html_print_select($bars_graph_types, 'bars_graph_type', 'vertical', '', '', '', true) . '</td>'; - + //Insert and modify before the buttons to create or update. if (enterprise_installed()) { enterprise_visual_map_editor_modify_form_items_palette($form_items); @@ -640,7 +711,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { foreach ($form_items as $item => $item_options) { - echo '<tr id="' . $item . '" style="" class="' . implode(' ', $item_options['items']) . '">'; + echo '<tr id="' . $item . '" style="" class="' . implode(' ', (array)$item_options['items']) . '">'; echo $item_options['html']; echo '</tr>'; } @@ -661,7 +732,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items_advance['position_row']['items'] = array('static_graph', 'percentile_bar', 'percentile_item', 'module_graph', 'simple_value', 'label', 'icon', 'datos', 'box_item', - 'auto_sla_graph', 'bars_graph','clock', 'donut_graph'); + 'auto_sla_graph', 'bars_graph','clock', 'donut_graph', 'color_cloud'); $form_items_advance['position_row']['html'] = ' <td align="left">' . __('Position') . '</td> <td align="left">(' . html_print_input_text('left', '0', '', 3, 5, true) . @@ -696,7 +767,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { __('Parent') . '</td> <td align="left">' . html_print_input_hidden('parents_load', base64_encode(json_encode($parents)), true) . - html_print_select($parents, 'parent', '', '', __('None'), 0, true) . + html_print_select($parents, 'parent', 0, '', __('None'), 0, true) . '</td>'; $form_items_advance['map_linked_row'] = array(); @@ -721,9 +792,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $node_visual_maps = db_get_all_rows_filter("tlayout", array(), array("id", "name")); - foreach ($node_visual_maps as $node_visual_map) { - $node_visual_map["node_id"] = (int) $server["id"]; - $visual_maps[] = $node_visual_map; + if(isset($node_visual_maps) && is_array($node_visual_maps)){ + foreach ($node_visual_maps as $node_visual_map) { + $node_visual_map["node_id"] = (int) $server["id"]; + $visual_maps[] = $node_visual_map; + } } metaconsole_restore_db(); @@ -748,6 +821,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { var $mapLinkedSelect = $("select#map_linked"); var $linkedMapNodeIDInput = $("input#hidden-linked_map_node_id"); var visualMaps = <?php echo json_encode($visual_maps); ?>; + if (!(visualMaps instanceof Array)) visualMaps = []; var nodesById = <?php echo json_encode($meta_servers_by_id); ?>; visualMaps.forEach(function (vMap) { @@ -868,7 +942,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { $form_items_advance['element_group_row']['items'] = array( 'group_item', 'static_graph', 'percentile_bar', 'percentile_item', 'module_graph', 'simple_value', - 'icon', 'label', 'datos', 'donut_graph'); + 'icon', 'label', 'datos', 'donut_graph', 'color_cloud'); $form_items_advance['element_group_row']['html'] = '<td align="left">'. __('Restrict access to group') . '</td>' . '<td align="left">' . @@ -877,11 +951,12 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { "VR", true, 'element_group', - __('All'), - '', - '', 0, - true) . + '', + '', + '', + true + ) . ui_print_help_tip ( __("If selected, restrict visualization of this item in the visual console to users who have access to selected group. This is also used on calculating child visual consoles."), true) . '</td>'; @@ -900,11 +975,6 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { </tbody> </table> <?php - //------------------------------------------------------------------------------ - - - - echo '</div>'; @@ -1023,6 +1093,7 @@ function visual_map_editor_print_toolbox() { visual_map_print_button_editor('group_item', __('Group'), 'left', false, 'group_item_min', true); visual_map_print_button_editor('box_item', __('Box'), 'left', false, 'box_item_min', true); visual_map_print_button_editor('line_item', __('Line'), 'left', false, 'line_item_min', true); + visual_map_print_button_editor('color_cloud', __('Color cloud'), 'left', false, 'color_cloud_min', true); if(defined("METACONSOLE")){ echo '<a href="javascript:" class="tip"><img src="'.$config['homeurl_static'].'/images/tip.png" data-title="The data displayed in editor mode is not real" data-use_title_for_force_title="1" class="forced_title" alt="The data displayed in editor mode is not real"></a>'; diff --git a/pandora_console/include/get_file.php b/pandora_console/include/get_file.php index 76629296b8..abc1539d5a 100644 --- a/pandora_console/include/get_file.php +++ b/pandora_console/include/get_file.php @@ -13,22 +13,23 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -if (! isset($_SESSION['id_usuario'])) { - session_start(); -} -require_once('functions.php'); -require_once('functions_filemanager.php'); + +// Don't start a session before this import. +// The session is configured and started inside the config process. require_once ("config.php"); +require_once ('functions.php'); +require_once ('functions_filemanager.php'); + global $config; check_login (); $auth_method = db_get_value('value', 'tconfig', 'token', 'auth'); -if($auth_method != 'ad') +if($auth_method != 'ad' && $auth_method != 'ldap'){ require_once("auth/" . $auth_method . ".php"); - +} $styleError = "background:url(\"../images/err.png\") no-repeat scroll 0 0 transparent; padding:4px 1px 6px 30px; color:#CC0000;"; diff --git a/pandora_console/include/gettext.php b/pandora_console/include/gettext.php index 2b0eaac556..152040f327 100644 --- a/pandora_console/include/gettext.php +++ b/pandora_console/include/gettext.php @@ -266,10 +266,9 @@ class gettext_reader { return $this->find_string($string, $half, $end); } } - + /** * Translates a string - * * @access public * @param string string to be translated * @return string translated string (or original, if not found) @@ -277,8 +276,8 @@ class gettext_reader { function translate($string) { if ($this->short_circuit) return $string; - $this->load_tables(); - + $this->load_tables(); + if ($this->enable_cache) { // Caching enabled, get translated string from cache if (array_key_exists($string, $this->cache_translations)) @@ -294,99 +293,6 @@ class gettext_reader { return $this->get_translation_string($num); } } - - /** - * Get possible plural forms from MO header - * - * @access private - * @return string plural form header - */ - function get_plural_forms() { - // lets assume message number 0 is header - // this is true, right? - $this->load_tables(); - - // cache header field for plural forms - if (! is_string($this->pluralheader)) { - if ($this->enable_cache) { - $header = $this->cache_translations[""]; - } else { - $header = $this->get_translation_string(0); - } - if (eregi("plural-forms: ([^\n]*)\n", $header, $regs)) - $expr = $regs[1]; - else - $expr = "nplurals=2; plural=n == 1 ? 0 : 1;"; - $this->pluralheader = $expr; - } - return $this->pluralheader; - } - - /** - * Detects which plural form to take - * - * @access private - * @param n count - * @return int array index of the right plural form - */ - function select_string($n) { - $string = $this->get_plural_forms(); - $string = str_replace('nplurals',"\$total",$string); - $string = str_replace("n",$n,$string); - $string = str_replace('plural',"\$plural",$string); - - $total = 0; - $plural = 0; - - eval("$string"); - if ($plural >= $total) $plural = $total - 1; - return $plural; - } - - /** - * Plural version of gettext - * - * @access public - * @param string single - * @param string plural - * @param string number - * @return translated plural form - */ - function ngettext($single, $plural, $number) { - if ($this->short_circuit) { - if ($number != 1) - return $plural; - else - return $single; - } - - // find out the appropriate form - $select = $this->select_string($number); - - // this should contains all strings separated by NULLs - $key = $single.chr(0).$plural; - - - if ($this->enable_cache) { - if (! array_key_exists($key, $this->cache_translations)) { - return ($number != 1) ? $plural : $single; - } else { - $result = $this->cache_translations[$key]; - $list = explode(chr(0), $result); - return $list[$select]; - } - } else { - $num = $this->find_string($key); - if ($num == -1) { - return ($number != 1) ? $plural : $single; - } else { - $result = $this->get_translation_string($num); - $list = explode(chr(0), $result); - return $list[$select]; - } - } - } - } ?> diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index be9a2bce23..e5c6d2f77a 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -93,23 +93,6 @@ switch($graph_type) { break; } -function histogram($chart_data, $width, $height, $font, $max, $title, - $mode, $ttl = 1) { - - $graph = array(); - $graph['data'] = $chart_data; - $graph['width'] = $width; - $graph['height'] = $height; - $graph['font'] = $font; - $graph['max'] = $max; - $graph['title'] = $title; - $graph['mode'] = $mode; - - $id_graph = serialize_in_temp($graph, null, $ttl); - - return "<img src='include/graphs/functions_gd.php?static_graph=1&graph_type=histogram&ttl=".$ttl."&id_graph=".$id_graph."'>"; -} - function progressbar($progress, $width, $height, $title, $font, $mode = 1, $out_of_lim_str = false, $out_of_lim_image = false, $ttl = 1) { @@ -134,26 +117,7 @@ function progressbar($progress, $width, $height, $title, $font, } } - -function slicesbar_graph($chart_data, $period, $width, $height, $colors, - $font, $round_corner, $home_url = '', $ttl = 1) { - - $graph = array(); - $graph['data'] = $chart_data; - $graph['period'] = $period; - $graph['width'] = $width; - $graph['height'] = $height; - $graph['font'] = $font; - $graph['round_corner'] = $round_corner; - $graph['color'] = $colors; - - $id_graph = serialize_in_temp($graph, null, $ttl); - - return "<img src='".$home_url."include/graphs/functions_pchart.php?static_graph=1&graph_type=slicebar&ttl=".$ttl."&id_graph=".$id_graph."' style='width:100%;'>"; -} - function vbar_graph( - $flash_chart, $chart_data, $width, $height, @@ -177,38 +141,59 @@ function vbar_graph( setup_watermark($water_mark, $water_mark_file, $water_mark_url); if (empty($chart_data)) { - return '<img src="' . $no_data_image . '" />'; + return html_print_image ( + $no_data_image, + true, + array( + 'width' => $width, + 'height' => $height, + 'title' => __('No data to show') + ), + false, + true + ); } - if ($flash_chart) { - return flot_vcolumn_chart ($chart_data, $width, $height, $color, - $legend, $long_index, $homeurl, $unit, $water_mark_url, - $homedir,$font,$font_size, $from_ux, $from_wux, $backgroundColor, - $tick_color); - } - else { - $params['flash_chart'] = true; - $params['chart_data'] = $chart_data; - $params['width'] = $width; - $params['height'] = $height; - $params['color'] = $color; - $params['legend'] = $legend; - $params['long_index'] = $long_index; - $params['no_data_image'] = $no_data_image; - $params['xaxisname'] = $xaxisname; - $params['yaxisname'] = $yaxisname; - $params['water_mark'] = $water_mark; - $params['font'] = $font; - $params['font_size'] = $font_size; - $params['unit'] = $unit; - $params['ttl'] = 2; - $params['homeurl'] = $homeurl; - $params['backgroundColor'] = $backgroundColor; - $params['from_ux'] = $from_ux; - $params['from_wux'] = $from_wux; - $params['tick_color'] = $tick_color; + if($ttl == 2){ + $params = array( + 'chart_data' => $chart_data, + 'width' => $width, + 'height' => $height, + 'color' => $color, + 'legend' => $legend, + 'long_index' => $long_index, + 'homeurl' => $homeurl, + 'unit' => $unit, + 'water_mark_url' => $water_mark_url, + 'homedir' => $homedir, + 'font' => $font, + 'font_size' => $font_size, + 'from_ux' => $from_ux, + 'from_wux' => $from_wux, + 'backgroundColor' => $backgroundColor, + 'tick_color' => $tick_color + ); return generator_chart_to_pdf('vbar', $params); } + + return flot_vcolumn_chart ( + $chart_data, + $width, + $height, + $color, + $legend, + $long_index, + $homeurl, + $unit, + $water_mark_url, + $homedir, + $font, + $font_size, + $from_ux, + $from_wux, + $backgroundColor, + $tick_color + ); } function area_graph( @@ -287,7 +272,7 @@ function stacked_gauge($chart_data, $width, $height, ); } -function hbar_graph($flash_chart, $chart_data, $width, $height, +function hbar_graph($chart_data, $width, $height, $color, $legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "", $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '', $backgroundColor = 'white', @@ -296,61 +281,52 @@ function hbar_graph($flash_chart, $chart_data, $width, $height, setup_watermark($water_mark, $water_mark_file, $water_mark_url); if (empty($chart_data)) { - return '<img src="' . $no_data_image . '" />'; + return html_print_image ( + $no_data_image, + true, + array( + 'width' => $width, + 'height' => $height, + 'title' => __('No data to show') + ), + false, + true + ); } - if ($flash_chart) { - return flot_hcolumn_chart( - $chart_data, $width, $height, $water_mark_url, $font, $font_size, $backgroundColor, $tick_color, $val_min, $val_max); - } - else { - $params['flash_chart'] = true; - $params['chart_data'] = $chart_data; - $params['width'] = $width; - $params['height'] = $height; - $params['color'] = $color; - $params['legend'] = $legend; - $params['long_index'] = $long_index; - $params['no_data_image'] = $no_data_image; - $params['xaxisname'] = $xaxisname; - $params['yaxisname'] = $yaxisname; - $params['water_mark'] = $water_mark; - $params['font'] = $font; - $params['font_size'] = $font_size; - $params['unit'] = $unit; - $params['ttl'] = 2; - $params['homeurl'] = $homeurl; - $params['backgroundColor'] = $backgroundColor; - $params['tick_color'] = $tick_color; - $params['val_min'] = $val_min; - $params['val_max'] = $val_max; + if($ttl == 2){ + $params = array( + 'chart_data' => $chart_data, + 'width' => $width, + 'height' => $height, + 'water_mark_url' => $water_mark_url, + 'font' => $font, + 'font_size' => $font_size, + 'backgroundColor' => $backgroundColor, + 'tick_color' => $tick_color, + 'val_min' => $val_min, + 'val_max' => $val_max + ); return generator_chart_to_pdf('hbar', $params); } + + return flot_hcolumn_chart( + $chart_data, + $width, + $height, + $water_mark_url, + $font, + $font_size, + $backgroundColor, + $tick_color, + $val_min, + $val_max + ); } -function pie3d_graph($flash_chart, $chart_data, $width, $height, - $others_str = "other", $homedir = "", $water_mark = "", $font = '', - $font_size = '', $ttl = 1, $legend_position = false, $colors = '', - $hide_labels = false) { - - return pie_graph('3d', $flash_chart, $chart_data, $width, $height, - $others_str, $homedir, $water_mark, $font, $font_size, $ttl, - $legend_position, $colors, $hide_labels); -} - -function pie2d_graph($flash_chart, $chart_data, $width, $height, - $others_str = "other", $homedir="", $water_mark = "", $font = '', - $font_size = '', $ttl = 1, $legend_position = false, $colors = '', - $hide_labels = false) { - - return pie_graph('2d', $flash_chart, $chart_data, $width, $height, - $others_str, $homedir, $water_mark, $font, $font_size, $ttl, - $legend_position, $colors, $hide_labels); -} - -function pie_graph($graph_type, $flash_chart, $chart_data, $width, +function pie_graph($chart_data, $width, $height, $others_str = "other", $homedir="", $water_mark = "", - $font = '', $font_size = '', $ttl = 1, $legend_position = false, + $font = '', $font_size = 8, $ttl = 1, $legend_position = false, $colors = '', $hide_labels = false) { if (empty($chart_data)) { @@ -387,37 +363,38 @@ function pie_graph($graph_type, $flash_chart, $chart_data, $width, $chart_data = $chart_data_trunc; } - if ($flash_chart) { - return flot_pie_chart(array_values($chart_data), - array_keys($chart_data), $width, $height, $water_mark_url, - $font, $font_size, $legend_position, $colors, $hide_labels); - } - else { - //TODO SET THE LEGEND POSITION - $graph = array(); - $graph['data'] = $chart_data; - $graph['width'] = $width; - $graph['height'] = $height; - $graph['water_mark'] = $water_mark_file; - $graph['font'] = $font; - $graph['font_size'] = $font_size; - $graph['legend_position'] = $legend_position; - $graph['color'] = $colors; + if($ttl == 2){ + $params = array( + 'values' => array_values($chart_data), + 'keys' => array_keys($chart_data), + 'width' => $width, + 'height' => $height, + 'water_mark_url' => $water_mark_url, + 'font' => $font, + 'font_size' => $font_size, + 'legend_position' => $legend_position, + 'colors' => $colors, + 'hide_labels' => $hide_labels + ); - $id_graph = serialize_in_temp($graph, null, $ttl); - - switch ($graph_type) { - case "2d": - return "<img src='" . $homedir . "include/graphs/functions_pchart.php?static_graph=1&graph_type=pie2d&ttl=".$ttl."&id_graph=".$id_graph."'>"; - break; - case "3d": - return "<img src='" . $homedir . "include/graphs/functions_pchart.php?static_graph=1&graph_type=pie3d&ttl=".$ttl."&id_graph=".$id_graph."'>"; - break; - } + return generator_chart_to_pdf('pie_chart', $params); } + + return flot_pie_chart( + array_values($chart_data), + array_keys($chart_data), + $width, + $height, + $water_mark_url, + $font, + $font_size, + $legend_position, + $colors, + $hide_labels + ); } -function ring_graph($flash_chart, $chart_data, $width, +function ring_graph($chart_data, $width, $height, $others_str = "other", $homedir="", $water_mark = "", $font = '', $font_size = '', $ttl = 1, $legend_position = false, $colors = '', $hide_labels = false,$background_color = 'white') { @@ -431,64 +408,49 @@ function ring_graph($flash_chart, $chart_data, $width, // This library allows only 8 colors $max_values = 18; - if ($flash_chart) { - return flot_custom_pie_chart ($flash_chart, $chart_data, - $width, $height, $colors, $module_name_list, $long_index, - $no_data, false, '', $water_mark, $font, $font_size, - $unit, $ttl, $homeurl, $background_color, $legend_position,$background_color); + if($ttl == 2){ + $params = array( + 'chart_data' => $chart_data, + 'width' => $width, + 'height' => $height, + 'colors' => $colors, + 'module_name_list' => $module_name_list, + 'long_index' => $long_index, + 'no_data' => $no_data, + 'water_mark' => $water_mark, + 'font' => $font, + 'font_size' => $font_size, + 'unit' => $unit, + 'ttl' => $ttl, + 'homeurl' => $homeurl, + 'background_color' => $background_color, + 'legend_position' => $legend_position, + 'background_color' => $background_color + ); + + return generator_chart_to_pdf('ring_graph', $params); } - else { - $total_modules = $chart_data['total_modules']; - unset($chart_data['total_modules']); - $max_values = 9; - //Remove the html_entities - $n = 0; - $temp = array(); - $coloretes = array(); - foreach ($chart_data as $key => $value) { - if ($n < $max_values) { - $temp[io_safe_output($key)] = $value['value']; - $legend[] = io_safe_output($key) .": " . $value['value'] . " " .$value['unit']; - } - $n++; - } - $chart_data = $temp; - - $chart_data_trunc = array(); - $coloretes = array(); - $n = 1; - //~ foreach ($chart_data as $key => $value) { - //~ if ($n < $max_values) { - - //~ $chart_data_trunc[$key] = $value; - //~ } - //~ else { - //~ if (!isset($chart_data_trunc[$others_str])) { - //~ $chart_data_trunc[$others_str] = 0; - //~ } - //~ $chart_data_trunc[$others_str] += $value; - //~ } - //~ $n++; - //~ } - //~ $chart_data = $chart_data_trunc; - - //TODO SET THE LEGEND POSITION - $graph = array(); - $graph['data'] = $chart_data; - $graph['width'] = $width; - $graph['height'] = $height; - $graph['water_mark'] = $water_mark_file; - $graph['font'] = $font; - $graph['font_size'] = $font_size; - $graph['legend_position'] = $legend_position; - $graph['legend'] = $legend; - - $id_graph = serialize_in_temp($graph, null, $ttl); - - return "<img src='" . $homedir . "include/graphs/functions_pchart.php?static_graph=1&graph_type=ring3d&ttl=".$ttl."&id_graph=".$id_graph."'>"; - - } + return flot_custom_pie_chart ( + $chart_data, + $width, + $height, + $colors, + $module_name_list, + $long_index, + $no_data, + false, + '', + $water_mark, + $font, + $font_size, + $unit, + $ttl, + $homeurl, + $background_color, + $legend_position, + $background_color + ); } ?> diff --git a/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js b/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js index d5ad78cf05..5bc3ef32b1 100644 --- a/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js +++ b/pandora_console/include/graphs/flot/jquery.flot.exportdata.pandora.js @@ -159,9 +159,10 @@ if (custom_graph) { dataObject = retrieveDataOject(dataObjects,0); - dataObjects.forEach(function (element) { - elements.push(processDataObject(element)); - }); + //dataObjects.forEach(function (element) { + //elements.push(processDataObject(element)); + //}); + elements.push(processDataObject(dataObject)); graphData = elements; } else { @@ -204,7 +205,7 @@ $form .prop('method', 'POST') - .prop('action', plot.getOptions().export.homeurl + '/include/graphs/export_data.php') + .prop('action', plot.getOptions().export.homeurl + 'include/graphs/export_data.php') .append($dataInput, $typeInput, $separatorInput, $excelInput) .hide() // Firefox made me write into the DOM for this :( @@ -394,7 +395,7 @@ $form .prop('method', 'POST') - .prop('action', plot.getOptions().export.homeurl + '/include/graphs/export_data.php') + .prop('action', plot.getOptions().export.homeurl + 'include/graphs/export_data.php') .append($dataInput, $typeInput, $separatorInput, $excelInput) .hide() // Firefox made me write into the DOM for this :( diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 95985cb874..e69fb155e0 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1,15 +1,12 @@ -/* - - -*/ function pandoraFlotPie(graph_id, values, labels, nseries, width, font_size, water_mark, separator, legend_position, height, colors, hide_labels) { var labels = labels.split(separator); var data = values.split(separator); + if (colors != '') { colors = colors.split(separator); } - + var pieRadius = 0.9; var color = null; @@ -17,62 +14,43 @@ function pandoraFlotPie(graph_id, values, labels, nseries, width, font_size, wat if (colors != '') { color = colors[i]; } - data[i] = { label: labels[i], data: parseFloat(data[i]), color: color} } - var label_conf; - - if (width < 400 || hide_labels) { - label_conf = { - show: false - }; - } - else { - label_conf = { - show: true, - radius: pieRadius, - formatter: function(label, series) { - return '<div style="font-size:' + font_size + 'pt;' + - 'text-align:center;padding:2px;color:white;">' + - label + '<br/>' + series.percent.toFixed(2) + '%</div>'; - }, - background: { - opacity: 0.5, - color: '' - } - }; - } - var show_legend = true; if (legend_position == 'hidden') { show_legend = false; } var conf_pie = { - series: { - pie: { - show: true, - radius: pieRadius, - //offset: {top: -100}, - label: label_conf, - //$label_str - } - }, - legend: { - show: show_legend - }, - grid: { - hoverable: true, - clickable: true + series: { + pie: { + show: true, + radius: pieRadius } - }; - - if (width < 400) { - conf_pie.legend.labelFormatter = function(label, series) { - return label + " (" + series.percent.toFixed(2) + "%)"; - } + }, + legend: { + show: show_legend + }, + grid: { + hoverable: true, + clickable: true } + }; + + if(hide_labels != false && hide_labels != 0){ + conf_pie.series.pie.label = { + show: true, + radius: 2/3, + formatter: labelFormatter, + threshold: 0.1 + } + } + else{ + conf_pie.series.pie.label = { + show:false + } + } switch (legend_position) { case 'bottom': @@ -89,7 +67,7 @@ function pandoraFlotPie(graph_id, values, labels, nseries, width, font_size, wat var plot = $.plot($('#'+graph_id), data, conf_pie); var legends = $('#'+graph_id+' .legendLabel'); - legends.css('font-size', font_size+'pt'); + legends.css('font-size', font_size+'pt'); // Events $('#' + graph_id).bind('plothover', pieHover); @@ -106,14 +84,18 @@ function pandoraFlotPie(graph_id, values, labels, nseries, width, font_size, wat legends.eq(index).css('color', ''); } + function labelFormatter(label, series) { + return '<div style="font-size:' + font_size + 'pt;' + 'text-align:center;padding:2px;color:white;">' + + label + '<br/>' + series.percent.toFixed(2) + '%</div>'; + } + // Reset styles function resetInteractivity() { legends.css('color', '#3F3F3D'); } - + if (water_mark) { - set_watermark(graph_id, plot, - $('#watermark_image_' + graph_id).attr('src')); + set_watermark(graph_id, plot,$('#watermark_image_' + graph_id).attr('src')); } } @@ -380,10 +362,11 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark, tickFormatter: xFormatter, }, yaxis: { - color: tick_color, - axisLabelUseCanvas: true, - axisLabelFontSizePixels: font_size, - axisLabelFontFamily: font+'Font', + font: { + size: font_size + 2, + color: 'rgb(84, 84, 84)', + family: font+'Font' + }, ticks: yFormatter, }, legend: { @@ -435,7 +418,7 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark, div_attributes += "min-height: 2.5em;"; } - div_attributes += '" title="'+title+'" class="'+font+'" '+ ' style="overflow: hidden;"'; + div_attributes += '" title="'+title+'" style="overflow: hidden;"'; format.push([i,'<div ' + div_attributes + '>' + label @@ -687,16 +670,21 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors, } } -function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumulate_data, intervaltick, water_mark, maxvalue, separator, separator2, graph_javascript, id_agent, full_legend) { +function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumulate_data, intervaltick, + font, font_size, separator, separator2, id_agent, full_legend, not_interactive, show_date) { + values = values.split(separator2); labels = labels.split(separator); legend = legend.split(separator); acumulate_data = acumulate_data.split(separator); datacolor = datacolor.split(separator); + if (full_legend != false) { full_legend = full_legend.split(separator); } + var font_size = parseInt(font_size); + var font = font.split("/").pop().split(".").shift(); // Check possible adapt_keys on classes check_adaptions(graph_id); @@ -704,6 +692,7 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul for (i=0;i<values.length;i++) { var serie = values[i].split(separator); + var aux = new Array(); $.each(serie,function(i,v) { aux.push([v, i]); @@ -711,75 +700,64 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul datas.push({ data: aux, - bars: { show: true, fill: true ,fillColor: datacolor[i] , horizontal: true, lineWidth:0, steps:false } + bars: { + show: true, + fill: 1, + fillColor: { colors: [ { opacity: 1 }, { opacity: 1 } ] }, + lineWidth:0, + horizontal: true, + steps:false, + barWidth: 24 * 60 * 60 * 600 + }, + color:datacolor[i] }); } - var stack = 0, bars = true, lines = false, steps = false; - var regex = /visual_console/; var match = regex.exec(window.location.href); - if (match == null) { - var options = { - series: { - stack: stack, - shadowSize: 0.1, - color: '#ddd' + var options = { + series: { + stack: true, + bars:{ + align: 'center' + } + }, + grid: { + borderWidth:1, + borderColor: '#C1C1C1', + tickColor: '#fff' }, - grid: { - hoverable: true, - clickable: true, - borderWidth:1, - borderColor: '', - tickColor: '#fff' - }, - xaxes: [ { - tickFormatter: xFormatter, - color: '', - tickSize: intervaltick, - tickLength: 0 - } ], - yaxes: [ { - show: false, - tickLength: 0 - }], - legend: { - show: false + xaxes: [ { + show:show_date, + tickFormatter: xFormatter, + color: '', + tickSize: intervaltick, + tickLength: 0, + font: { + size: font_size + 2, + family: font+'Font' } - }; + } ], + yaxes: [ { + show: false, + tickLength: 0 + }], + legend: { + show: false + } + }; + + if (match == null && not_interactive == 0) { + options.grid['hoverable'] = true; + options.grid['clickable'] = true; } - else { - var options = { - series: { - stack: stack, - shadowSize: 0.1, - color: '#ddd' - }, - grid: { - hoverable: false, - clickable: false, - borderWidth:1, - borderColor: '', - tickColor: '#fff' - }, - xaxes: [ { - tickFormatter: xFormatter, - color: '', - tickSize: intervaltick, - tickLength: 0 - } ], - yaxes: [ { - show: false, - tickLength: 0 - }], - legend: { - show: false - } - }; + else{ + options.grid['hoverable'] = false; + options.grid['clickable'] = false; } - var plot = $.plot($('#'+graph_id), datas, options ); + $.plot($('#'+graph_id), datas, options ); if (match == null) { // Events @@ -849,12 +827,10 @@ function pandoraFlotSlicebar(graph_id, values, datacolor, labels, legend, acumul // Format functions function xFormatter(v, axis) { - for (i = 0; i < acumulate_data.length; i++) { - if (acumulate_data[i] == v) { - return '<span style=\'font-size: 6pt\'>' + legend[i] + '</span>'; - } - } - return ''; + v = new Date(1000*v); + date_format = (v.getHours()<10?'0':'') + v.getHours() + ":" + + (v.getMinutes()<10?'0':'') + v.getMinutes(); + return date_format; } } @@ -1899,7 +1875,7 @@ function pandoraFlotArea( graph_id, values, legend, })); } - $('#menu_cancelzoom_' + graph_id).attr('src', homeurl + '/images/zoom_cross_grey.png'); + $('#menu_cancelzoom_' + graph_id).attr('src', homeurl + 'images/zoom_cross_grey.png'); max_draw['max'] = ranges.yaxis.to; max_draw['min'] = ranges.yaxis.from; @@ -1988,7 +1964,7 @@ function pandoraFlotArea( graph_id, values, legend, if(series.data[j]){ var y = series.data[j][1]; - var x = series.data[j][0] -1 ; + var x = Math.round(series.data[j][0]) -1; } } @@ -2356,7 +2332,7 @@ function pandoraFlotArea( graph_id, values, legend, legend: { show: true } })); $('#menu_cancelzoom_' + graph_id) - .attr('src', homeurl + '/images/zoom_cross.disabled.png'); + .attr('src', homeurl + 'images/zoom_cross.disabled.png'); overview.clearSelection(); currentRanges = null; thresholded = false; @@ -2516,7 +2492,6 @@ function update_left_width_canvas(graph_id) { function check_adaptions(graph_id) { var classes = $('#'+graph_id).attr('class').split(' '); - $.each(classes, function(i,v) { // If has a class starting with adapted, we adapt it if (v.split('_')[0] == 'adapted') { diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index bf423d2267..46191aed93 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -371,16 +371,16 @@ function menu_graph( function flot_pie_chart ($values, $labels, $width, $height, $water_mark, $font = '', $font_size = 8, $legend_position = '', $colors = '', $hide_labels = false) { - + // include_javascript_dependencies_flot_graph(); - + $series = sizeof($values); if (($series != sizeof ($labels)) || ($series == 0) ) { return; } - + $graph_id = uniqid('graph_'); - + switch ($legend_position) { case 'bottom': $height = $height + (count($values) * 24); @@ -390,9 +390,9 @@ function flot_pie_chart ($values, $labels, $width, $height, $water_mark, //TODO FOR TOP OR LEFT OR RIGHT break; } - + $return = "<div id='$graph_id' class='graph' style='width: ".$width."px; height: ".$height."px;'></div>"; - + if ($water_mark != '') { $return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>"; $water_mark = 'true'; @@ -400,28 +400,30 @@ function flot_pie_chart ($values, $labels, $width, $height, $water_mark, else { $water_mark = 'false'; } - + $separator = ';;::;;'; - + $labels = implode($separator, $labels); $values = implode($separator, $values); if (!empty($colors)) { $colors = implode($separator, $colors); } - + + include_javascript_dependencies_flot_graph(); + $return .= "<script type='text/javascript'>"; - + $return .= "$(document).ready( function () {"; $return .= "pandoraFlotPie('$graph_id', '$values', '$labels', '$series', '$width', $font_size, $water_mark, '$separator', '$legend_position', '$height', '$colors', " . json_encode($hide_labels) . ")"; - + $return .= "});"; $return .= "</script>"; - + return $return; } // Prints a FLOT pie chart -function flot_custom_pie_chart ($flash_charts, $graph_values, +function flot_custom_pie_chart ($graph_values, $width, $height, $colors, $module_name_list, $long_index, $no_data,$xaxisname, $yaxisname, $water_mark, $fontpath, $font_size, $unit, $ttl, $homeurl, $background_color, $legend_position) { @@ -474,11 +476,11 @@ function flot_custom_pie_chart ($flash_charts, $graph_values, $colors = implode($separator, $temp_colors); $return .= "<script type='text/javascript'>"; - + $return .= "$(document).ready( function () {"; $return .= "pandoraFlotPieCustom('$graph_id', '$values', '$labels', '$width', $font_size, '$fontpath', $water_mark, '$separator', '$legend_position', '$height', '$colors','$legend','$background_color')"; - + $return .= "});"; $return .= "</script>"; return $return; @@ -575,10 +577,10 @@ function flot_hcolumn_chart ($graph_data, $width, $height, $water_mark, $font = // Javascript code $return .= "<script type='text/javascript'>"; - + $return .= "$(document).ready( function () {"; $return .= "pandoraFlotHBars('$graph_id', '$values', '$labels', false, $max, '$water_mark', '$separator', '$separator2', '$font', $font_size, '$background_color', '$tick_color', $val_min, $val_max)"; - + $return .= "});"; $return .= "</script>"; return $return; @@ -666,7 +668,7 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon // Javascript code $return .= "<script type='text/javascript'>"; - + $return .= "$(document).ready( function () {"; if ($from_ux) { if($from_wux){ $return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2','$font',$font_size, true, true, '$background_color', '$tick_color')"; @@ -678,84 +680,115 @@ function flot_vcolumn_chart ($graph_data, $width, $height, $color, $legend, $lon else { $return .= "pandoraFlotVBars('$graph_id', '$values', '$labels', '$labels', '$legend', '$colors', false, $max, '$water_mark', '$separator', '$separator2','$font',$font_size, false, false, '$background_color', '$tick_color')"; } - + $return .= "});"; $return .= "</script>"; return $return; } -function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $colors, $fontpath, $round_corner, $homeurl, $watermark = '', $adapt_key = '', $stat_win = false, $id_agent = 0, $full_legend_date = array()) { +function flot_slicesbar_graph ( + $graph_data, $period, $width, + $height, $legend, $colors, $fontpath, + $round_corner, $homeurl, $watermark = '', + $adapt_key = '', $stat_win = false, + $id_agent = 0, $full_legend_date = array(), + $not_interactive = 0, $ttl = 1, + $widgets = false, $show = true) { + global $config; - - // include_javascript_dependencies_flot_graph(); - - $stacked_str = 'stack: stack,'; - + + if($ttl == 2){ + $params = array( + 'graph_data' => $graph_data, + 'period' => $period, + 'width' => $width, + 'height' => $height, + 'legend' => $legend, + 'colors' => $colors, + 'fontpath' => $fontpath, + 'round_corner' => $round_corner, + 'homeurl' => $homeurl, + 'watermark' => $watermark, + 'adapt_key' => $adapt_key, + 'stat_win' => $stat_win, + 'id_agent' => $id_agent, + 'full_legend_date' => $full_legend_date, + 'not_interactive' => $not_interactive, + 'ttl' => 1, + 'widgets' => $widgets, + 'show' => $show + ); + + return generator_chart_to_pdf('slicebar', $params); + } + // Get a unique identifier to graph $graph_id = uniqid('graph_'); - + // Set some containers to legend, graph, timestamp tooltip, etc. if ($stat_win) { $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width."%; height: ".$height."px; display: inline-block;'></div>"; } else { - $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width."%; height: ".$height."px;'></div>"; + if($widgets){ + $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>"; + } + else{ + $return = "<div id='$graph_id' class='noresizevc graph $adapt_key' style='width: ".$width."%; height: ".$height."px;'></div>"; + } } + $return .= "<div id='value_$graph_id' style='display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px'></div>"; - + // Set a weird separator to serialize and unserialize passing data from php to javascript $separator = ';;::;;'; $separator2 = ':,:,,,:,:'; - + // Transform data from our format to library format $labels = array(); $a = array(); $vars = array(); - + $datacolor = array(); - + $max = 0; - + $i = count($graph_data); - + $intervaltick = $period / $i; - - $leg_max_length = 0; - foreach ($legend as $l) { - if (strlen($l) > $leg_max_length) { - $leg_max_length = strlen($l); - } - } - - $fontsize = 7; - + + $fontsize = $config['font_size']; + $fontpath = $config['fontpath']; + $extra_height = 15; if (defined("METACONSOLE")) $extra_height = 20; - + $return .= "<div id='extra_$graph_id' style='font-size: ".$fontsize."pt; display:none; position:absolute; overflow: auto; height: ".$extra_height."px; background:#fff; padding: 2px 2px 2px 2px; border: solid #000 1px;'></div>"; - - $maxticks = (int) ($width / ($fontsize * $leg_max_length)); - + + $maxticks = (int) 20; + $i_aux = $i; + while(1) { if ($i_aux <= $maxticks ) { break; } - + $intervaltick*= 2; - + $i_aux /= 2; } - + $intervaltick = (int) $intervaltick; + $acumulate = 0; $c = 0; $acumulate_data = array(); foreach ($graph_data as $label => $values) { $labels[] = $label; $i--; - + foreach ($values as $key => $value) { $jsvar = "d_".$graph_id."_".$i; if ($key == 'data') { @@ -763,54 +796,59 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $ continue; } $data[$jsvar][] = $value; - + $acumulate_data[$c] = $acumulate; $acumulate += $value; $c++; - + if ($value > $max) { $max = $value; } } } - + // Store serialized data to use it from javascript $labels = implode($separator,$labels); $datacolor = implode($separator,$datacolor); - $legend = io_safe_output(implode($separator,$legend)); - if (!empty($full_legend_date)) { + if(is_array($legend)){ + $legend = io_safe_output(implode($separator,$legend)); + } + + if (!empty($full_legend_date) && count($full_legend_date) > 0 ) { $full_legend_date = io_safe_output(implode($separator,$full_legend_date)); } else { $full_legend_date = false; } $acumulate_data = io_safe_output(implode($separator,$acumulate_data)); - + // Store data series in javascript format $jsvars = ''; $jsseries = array(); - + $date = get_system_time (); $datelimit = ($date - $period) * 1000; - + $i = 0; - + $values2 = array(); - + foreach ($data as $jsvar => $values) { $values2[] = implode($separator,$values); $i ++; } - + $values = implode($separator2, $values2); - + // Javascript code $return .= "<script type='text/javascript'>"; $return .= "//<![CDATA[\n"; - $return .= "pandoraFlotSlicebar('$graph_id', '$values', '$datacolor', '$labels', '$legend', '$acumulate_data', $intervaltick, false, $max, '$separator', '$separator2', '', $id_agent, '$full_legend_date')"; + $return .= "$(document).ready( function () {"; + $return .= "pandoraFlotSlicebar('$graph_id','$values','$datacolor','$labels','$legend','$acumulate_data',$intervaltick,'$fontpath',$fontsize,'$separator','$separator2',$id_agent,'$full_legend_date',$not_interactive, '$show')"; + $return .= "});"; $return .= "\n//]]>"; $return .= "</script>"; - + return $return; } ?> diff --git a/pandora_console/include/graphs/functions_pchart.php b/pandora_console/include/graphs/functions_pchart.php deleted file mode 100644 index 8ce6faeaa5..0000000000 --- a/pandora_console/include/graphs/functions_pchart.php +++ /dev/null @@ -1,966 +0,0 @@ -<?php - -ob_start(); //HACK TO EAT ANYTHING THAT CORRUPS THE IMAGE FILE - -// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas -// Please see http://pandorafms.org for full contribution list - -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation for version 2. -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -include_once('functions_utils.php'); -include_once('../functions_io.php'); -include_once('../functions.php'); -include_once('../functions_html.php'); - -/* pChart library inclusions */ -include_once("pChart/pData.class.php"); -include_once("pChart/pDraw.class.php"); -include_once("pChart/pImage.class.php"); -include_once("pChart/pPie.class.php"); -include_once("pChart/pScatter.class.php"); -include_once("pChart/pRadar.class.php"); - -// Define default fine colors - -$default_fine_colors = array(); -$default_fine_colors[] = "#2222FF"; -$default_fine_colors[] = "#00DD00"; -$default_fine_colors[] = "#CC0033"; -$default_fine_colors[] = "#9900CC"; -$default_fine_colors[] = "#FFCC66"; -$default_fine_colors[] = "#999999"; - -// Default values - -$antialiasing = true; -$font = '../fonts/unicode.ttf'; -$xaxisname = ''; -$yaxisname = ''; -$legend = null; -$colors = null; -$font_size = 8; -$force_steps = true; -$legend_position = null; -$series_type = null; - - -$graph_type = get_parameter('graph_type', ''); - -$id_graph = get_parameter('id_graph', false); - -$graph_threshold = get_parameter('graph_threshold', false); - -$id_module = get_parameter('id_module'); - - -if (!$id_graph) { - exit; -} - -$ttl = get_parameter('ttl', 1); - -$graph = unserialize_in_temp($id_graph, true, $ttl); - -if (!$graph) { - exit; -} - -$data = $graph['data']; -$width = $graph['width']; -$height = $graph['height']; - -if (isset($graph['legend_position'])) { - $legend_position = $graph['legend_position']; -} -if (isset($graph['color'])) { - $colors = $graph['color']; -} -if (isset($graph['legend'])) { - $legend = $graph['legend']; -} -if (isset($graph['xaxisname'])) { - $xaxisname = $graph['xaxisname']; -} -if (isset($graph['yaxisname'])) { - $yaxisname = $graph['yaxisname']; -} -if (isset($graph['round_corner'])) { - $round_corner = $graph['round_corner']; -} -if (isset($graph['font'])) { - if (!empty($graph['font'])) { - $font = $graph['font']; - } -} -if (isset($graph['font_size'])) { - if (!empty($graph['font_size'])) { - $font_size = $graph['font_size']; - } -} -if (isset($graph['backgroundColor'])) { - if (!empty($graph['backgroundColor'])) { - $backgroundColor = $graph['backgroundColor']; - } -} -if (isset($graph['antialiasing'])) { - $antialiasing = $graph['antialiasing']; -} -$force_height = true; -if (isset($graph['force_height'])) { - $force_height = $graph['force_height']; -} -if (isset($graph['period'])) { - $period = $graph['period']; -} -if (isset($graph['unit'])){ - $unit = $graph['unit']; -} - -if (!$force_height) { - if ($height < (count($graph['data']) * 14)) { - $height = (count($graph['data']) * 14); - } -} - -$water_mark = ''; -if (isset($graph['water_mark'])) { - //"/var/www/pandora_console/images/logo_vertical_water.png"; - $water_mark = $graph['water_mark']; -} - -if (isset($graph['force_steps'])) { - $force_steps = $graph['force_steps']; -} - -if (isset($graph['series_type'])) { - $series_type = $graph['series_type']; -} - -if (isset($graph['percentil'])){ - $percentil = $graph['percentil']; -} - -$step = 1; -if ($force_steps) { - $pixels_between_xdata = 50; - $max_xdata_display = round($width / $pixels_between_xdata); - $ndata = count($data); - if ($max_xdata_display > $ndata) { - $xdata_display = $ndata; - } - else { - $xdata_display = $max_xdata_display; - } - - $step = round($ndata/$xdata_display); -} - -$c = 1; - -switch ($graph_type) { - case 'hbar': - case 'vbar': - foreach ($data as $i => $values) { - foreach ($values as $name => $val) { - $data_values[$name][] = $val; - } - - $data_keys[] = $i; - - } - $fine_colors = array(); - - // If is set fine colors we store it or set default - - foreach ($colors as $i => $fine_color) { - $rgb_fine = html_html2rgb($fine_color); - $fine_colors[$i]['R'] = $rgb_fine[0]; - $fine_colors[$i]['G'] = $rgb_fine[1]; - $fine_colors[$i]['B'] = $rgb_fine[2]; - $fine_colors[$i]['Alpha'] = 100; - } - $colors = $fine_colors; - - break; - case 'bullet_chart': - $anterior = 0; - foreach ($data as $i => $values) { - foreach ($values as $key => $val) { - switch ($key) { - case 0: - $name = __("Max"); - break; - case 1: - $name = __("Actual"); - break; - case 2: - $name = __("Min"); - break; - } - $data_values[$name][] = ($val - $anterior); - $anterior += (($val - $anterior)<0) ? 0 : ($val - $anterior); - } - $anterior = 0; - $data_keys[] = $i; - - } - break; - case 'progress': - case 'area': - case 'stacked_area': - case 'stacked_line': - case 'line': - case 'threshold': - case 'scatter': - - if (!empty($percentil)) { - $count_percentil = count($percentil); - for ($j=0; $j < $count_percentil; $j++) { - $i=0; - foreach ($data as $key => $value) { - $data[$key]['percentil' . $j] = $percentil[$j][$i]; - if($graph_type == 'area'){ - $series_type['percentil' . $j] = 'line'; - } - $i++; - } - } - } - foreach ($data as $i => $d) { - $data_values[] = $d; - - if (($c % $step) == 0) { - $data_keys[] = $i; - } - else { - $data_keys[] = ""; - } - - $c++; - } - - break; - case 'slicebar': - case 'polar': - case 'radar': - case 'pie3d': - case 'pie2d': - case 'ring3d': - - break; -} - -switch($graph_type) { - case 'slicebar': - case 'polar': - case 'radar': - case 'pie3d': - case 'pie2d': - case 'ring3d': - case 'bullet_chart': - break; - default: - if (!is_array(reset($data_values))) { - $data_values = array($data_values); - if (is_array($colors) && !empty($colors)) { - $colors = array($colors); - } - } - break; -} - -$rgb_color = array(); - -if (!isset($colors)) - $colors = array(); - -if (empty($colors)) { - $colors = array(); -} - -foreach ($colors as $i => $color) { - if (isset ($color['border'])) { - $rgb['border'] = html_html2rgb($color['border']); - - if (isset($rgb['border'])) { - $rgb_color[$i]['border']['R'] = $rgb['border'][0]; - $rgb_color[$i]['border']['G'] = $rgb['border'][1]; - $rgb_color[$i]['border']['B'] = $rgb['border'][2]; - } - } - - if (isset ($color['color'])) { - $rgb['color'] = html_html2rgb($color['color']); - - if (isset($rgb['color'])) { - $rgb_color[$i]['color']['R'] = $rgb['color'][0]; - $rgb_color[$i]['color']['G'] = $rgb['color'][1]; - $rgb_color[$i]['color']['B'] = $rgb['color'][2]; - } - } - - if (isset ($color['alpha'])) { - $rgb_color[$i]['alpha'] = $color['alpha']; - } -} - -//add color for percentil -if($percentil){ - for ($j=0; $j < $count_percentil; $j++) { - if (isset ($colors[$j]['border'])) { - $rgb['border'] = html_html2rgb($colors[$j]['border']); - - if (isset($rgb['border'])) { - $rgb_color['percentil' . $j]['border']['R'] = $rgb['border'][0]; - $rgb_color['percentil' . $j]['border']['G'] = $rgb['border'][1]; - $rgb_color['percentil' . $j]['border']['B'] = $rgb['border'][2]; - } - } - - if (isset ($colors[$j]['color'])) { - $rgb['color'] = html_html2rgb($colors[$j]['color']); - - if (isset($rgb['color'])) { - $rgb_color['percentil' . $j]['color']['R'] = $rgb['color'][0]; - $rgb_color['percentil' . $j]['color']['G'] = $rgb['color'][1]; - $rgb_color['percentil' . $j]['color']['B'] = $rgb['color'][2]; - } - } - - if (isset ($colors[$j]['alpha'])) { - $rgb_color['percentil' . $j]['alpha'] = $colors[$j]['alpha']; - } - } -} - -//add for report with max 15 modules comparation repeat -$countlegend = count($legend); -if($countlegend > 15){ - $i=16; - $l=0; - while ($countlegend > 15){ - $rgb_color[$i] = $rgb_color[$l]; - $l++; - $i++; - $countlegend--; - } -} - -ob_get_clean(); //HACK TO EAT ANYTHING THAT CORRUPS THE IMAGE FILE - -switch ($graph_type) { - case 'ring3d': - pch_ring_graph($graph_type, array_values($data), $legend, - $width, $height, $font, $water_mark, $font_size, $legend_position, $colors); - break; - case 'bullet_chart': - pch_bullet_chart($graph_type, $data_values, $legend, - $width, $height, $font, $water_mark, $font_size, $legend_position, $colors); - break; - case 'pie3d': - case 'pie2d': - pch_pie_graph($graph_type, array_values($data), array_keys($data), - $width, $height, $font, $water_mark, $font_size, $legend_position, $colors); - break; - case 'slicebar': - pch_slicebar_graph($graph_type, $data, $period, $width, $height, $colors, $font, $round_corner, $font_size); - break; - case 'polar': - case 'radar': - pch_kiviat_graph($graph_type, array_values($data), array_keys($data), - $width, $height, $font, $font_size); - break; - case 'hbar': - case 'vbar': - pch_bar_graph($graph_type, $data_keys, $data_values, $width, $height, - $font, $antialiasing, $rgb_color, $xaxisname, $yaxisname, false, - $legend, $fine_colors, $water_mark, $font_size); - break; - default: - case 'threshold': - pch_threshold_graph($graph_type, $data_keys, $data_values, $width, - $height, $font, $antialiasing, $xaxisname, $yaxisname, $title, - $font_size); - break; -} - -function pch_slicebar_graph ($graph_type, $data, $period, $width, $height, $colors, $font, $round_corner, $font_size) { - /* CAT:Slicebar charts */ - - set_time_limit (0); - - // Dataset definition - $myPicture = new pImage($width,$height); - - /* Turn of Antialiasing */ - $myPicture->Antialias = 0; - - $myPicture->setFontProperties(array("FontName"=> $font, "FontSize"=>$font_size,"R"=>80,"G"=>80,"B"=>80)); - - // Round corners defined in global setup - if ($round_corner != 0) - $radius = ($height > 18) ? 8 : 0; - else - $radius = 0; - - $thinest_slice = $width / $period; - - /* Color stuff */ - $colorsrgb = array(); - foreach($colors as $key => $col) { - $rgb = html_html2rgb($col); - $colorsrgb[$key]['R'] = $rgb[0]; - $colorsrgb[$key]['G'] = $rgb[1]; - $colorsrgb[$key]['B'] = $rgb[2]; - } - - $i = 0; - foreach ($data as $d) { - $color = $d['data']; - $color = $colorsrgb[$color]; - $ratio = $thinest_slice * $d['utimestamp']; - $myPicture->drawRoundedFilledRectangle ($i, 0, $ratio+$i, - $height, $radius, - array('R' => $color['R'], - 'G' => $color['G'], - 'B' => $color['B']) - ); - $i+=$ratio; - } - - if ($round_corner) { - /* Under this value, the rounded rectangle is painted great */ - if ($thinest_slice <= 16) { - /* Clean a bit of pixels */ - for ($i = 0; $i < 7; $i++) { - $myPicture->drawLine (0, $i, 6 - $i, $i, array('R' => 255, 'G' => 255, 'B' => 255)); - } - $end = $height - 1; - for ($i = 0; $i < 7; $i++) { - $myPicture->drawLine (0, $end - $i, 5 - $i, $end - $i, array('R' => 255, 'G' => 255, 'B' => 255)); - } - } - } - - $myPicture->drawRoundedRectangle (0, 0, $width, - $height - 1, $radius, array('R' => 157, 'G' => 157, 'B' => 157)); - - $myPicture->Stroke (); -} - -function pch_pie_graph ($graph_type, $data_values, $legend_values, $width, - $height, $font, $water_mark, $font_size, $legend_position, $colors) { - /* CAT:Pie charts */ - - /* Create and populate the pData object */ - $MyData = new pData(); - $MyData->addPoints($data_values,"ScoreA"); - $MyData->setSerieDescription("ScoreA","Application A"); - - /* Define the absissa serie */ - $MyData->addPoints($legend_values,"Labels"); - $MyData->setAbscissa("Labels"); - - /* Create the pChart object */ - $myPicture = new pImage($width,$height,$MyData,TRUE); - - /* Set the default font properties */ - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size,"R"=>80,"G"=>80,"B"=>80)); - - $water_mark_height = 0; - $water_mark_width = 0; - if (!empty($water_mark)) { - if (is_array($water_mark)) { - if (!empty($water_mark['file'])) { - $water_mark = $water_mark['file']; - } - } - - $size_water_mark = getimagesize($water_mark); - $water_mark_height = $size_water_mark[1]; - $water_mark_width = $size_water_mark[0]; - - $myPicture->drawFromPNG(($width - $water_mark_width), - ($height - $water_mark_height) - 50, $water_mark); - } - - - /* Create the pPie object */ - $PieChart = new pPie($myPicture,$MyData); - foreach ($legend_values as $key => $value) { - if (isset($colors[$value])) { - $PieChart->setSliceColor($key, hex_2_rgb($colors[$value])); - } - } - - /* Draw an AA pie chart */ - switch($graph_type) { - case "pie2d": - $PieChart->draw2DPie($width/4,$height/2,array("DataGapAngle"=>0,"DataGapRadius"=>0, "Border"=>FALSE, "BorderR"=>200, "BorderG"=>200, "BorderB"=>200, "Radius"=>$width/4, "ValueR"=>0, "ValueG"=>0, "ValueB"=>0, "WriteValues"=>TRUE)); - break; - case "pie3d": - $PieChart->draw3DPie($width/4, $height/2,array("DataGapAngle"=>5,"DataGapRadius"=>6, "Border"=>TRUE, "Radius"=>$width/4, "ValueR"=>0, "ValueG"=>0, "ValueB"=>0, "WriteValues"=>TRUE, "SecondPass"=>FALSE)); - break; - } - - /* Write down the legend next to the 2nd chart*/ - //Calculate the bottom margin from the size of string in each index - $max_chars = graph_get_max_index($legend_values); - - if ($legend_position != 'hidden') { - // This is a hardcore adjustment to match most of the graphs, please don't alter - $legend_with_aprox = 32 + (9.5 * $max_chars); - - $PieChart->drawPieLegend($width - $legend_with_aprox, 5, array("R"=>255,"G"=>255,"B"=>255, "BoxSize"=>10)); - } - - /* Enable shadow computing */ - $myPicture->setShadow(TRUE, - array("X" => 3, "Y" => 3, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10)); - - /* Render the picture */ - $myPicture->stroke(); -} - -function pch_ring_graph ($graph_type, $data_values, $legend_values, $width, - $height, $font, $water_mark, $font_size, $legend_position, $colors) { - /* CAT:Ring charts */ - - /* Create and populate the pData object */ - $MyData = new pData(); - $MyData->addPoints($data_values,"ScoreA"); - $MyData->setSerieDescription("ScoreA","Application A"); - - /* Define the absissa serie */ - $MyData->addPoints($legend_values,"Labels"); - $MyData->setAbscissa("Labels"); - - /* Create the pChart object */ - $myPicture = new pImage($width,$height,$MyData,TRUE); - - /* Set the default font properties */ - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size,"R"=>80,"G"=>80,"B"=>80)); - - $water_mark_height = 0; - $water_mark_width = 0; - if (!empty($water_mark)) { - if (is_array($water_mark)) { - if (!empty($water_mark['file'])) { - $water_mark = $water_mark['file']; - } - } - - $size_water_mark = getimagesize($water_mark); - $water_mark_height = $size_water_mark[1]; - $water_mark_width = $size_water_mark[0]; - - $myPicture->drawFromPNG(($width - $water_mark_width), - ($height - $water_mark_height) - 50, $water_mark); - } - - - /* Create the pPie object */ - $PieChart = new pPie($myPicture,$MyData); - foreach ($legend_values as $key => $value) { - if (isset($colors[$value])) { - $PieChart->setSliceColor($key, hex_2_rgb($colors[$value])); - } - } - - /* Draw an AA pie chart */ - $PieChart->draw3DRing($width/3, $height/2,array("InnerRadius"=>100, "InnerRadius"=>10,"DrawLabels"=>TRUE,"LabelStacked"=>FALSE,"Precision"=>2,"Border"=>FALSE,"WriteValues"=>TRUE,"ValueR"=>0,"ValueG"=>0,"ValueB"=>0,"ValuePadding" => 15)); - - - /* Write down the legend next to the 2nd chart*/ - //Calculate the bottom margin from the size of string in each index - $max_chars = graph_get_max_index($legend_values); - - if ($legend_position != 'hidden') { - // This is a hardcore adjustment to match most of the graphs, please don't alter - $legend_with_aprox = 150 + (4.5 * $max_chars); - - $PieChart->drawPieLegend($width - $legend_with_aprox, 10, array("R"=>255,"G"=>255,"B"=>255, "BoxSize"=>10)); - } - - /* Enable shadow computing */ - $myPicture->setShadow(TRUE, - array("X" => 3, "Y" => 3, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10)); - - /* Render the picture */ - $myPicture->stroke(); -} - -function pch_kiviat_graph ($graph_type, $data_values, $legend_values, $width, - $height, $font, $font_size) { - /* CAT:Radar/Polar charts */ - - /* Create and populate the pData object */ - $MyData = new pData(); - $MyData->addPoints($data_values,"ScoreA"); - $MyData->setSerieDescription("ScoreA","Application A"); - - /* Define the absissa serie */ - $MyData->addPoints($legend_values,"Labels"); - $MyData->setAbscissa("Labels"); - - /* Create the pChart object */ - $myPicture = new pImage($width,$height,$MyData,TRUE); - - /* Set the default font properties */ - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size,"R"=>80,"G"=>80,"B"=>80)); - - /* Create the pRadar object */ - $SplitChart = new pRadar(); - - /* Draw a radar chart */ - $myPicture->setGraphArea(20,25,$width-10,$height-10); - - /* Draw an AA pie chart */ - switch($graph_type) { - case "radar": - $Options = array("SkipLabels"=>0,"LabelPos"=>RADAR_LABELS_HORIZONTAL, - "LabelMiddle"=>FALSE,"Layout"=>RADAR_LAYOUT_STAR, - "BackgroundGradient"=>array("StartR"=>255,"StartG"=>255,"StartB"=>255, - "StartAlpha"=>100,"EndR"=>207,"EndG"=>227,"EndB"=>125,"EndAlpha"=>50), - "FontName"=>$font,"FontSize"=>$font_size); - $SplitChart->drawRadar($myPicture,$MyData,$Options); - break; - case "polar": - $Options = array("Layout"=>RADAR_LAYOUT_CIRCLE,"BackgroundGradient"=>array("StartR"=>255,"StartG"=>255,"StartB"=>255,"StartAlpha"=>100,"EndR"=>207,"EndG"=>227,"EndB"=>125,"EndAlpha"=>50), - "FontName"=>$font,"FontSize"=>$font_size); - $SplitChart->drawRadar($myPicture,$MyData,$Options); - break; - } - - /* Render the picture */ - $myPicture->stroke(); -} - -function pch_bar_graph ($graph_type, $index, $data, $width, $height, $font, - $antialiasing, $rgb_color = false, $xaxisname = "", $yaxisname = "", - $show_values = false, $legend = array(), $fine_colors = array(), $water_mark = '', $font_size) { - /* CAT: Vertical Bar Chart */ - if (!is_array($legend) || empty($legend)) { - unset($legend); - } - - /* Create and populate the pData object */ - $MyData = new pData(); - $overridePalette = array(); - foreach ($data as $i => $values) { - $MyData->addPoints($values,$i); - - if (!empty($rgb_color)) { - $MyData->setPalette($i, - array("R" => $rgb_color[$i]['color']["R"], - "G" => $rgb_color[$i]['color']["G"], - "B" => $rgb_color[$i]['color']["B"], - "BorderR" => $rgb_color[$i]['border']["R"], - "BorderG" => $rgb_color[$i]['border']["G"], - "BorderB" => $rgb_color[$i]['border']["B"], - "Alpha" => $rgb_color[$i]['alpha'])); - } - - // Assign cyclic colors to bars if are setted - if ($fine_colors) { - $c = 0; - foreach ($values as $ii => $vv) { - if (!isset($fine_colors[$c])) { - $c = 0; - } - $overridePalette[$ii] = $fine_colors[$c]; - $c++; - } - } - else { - $overridePalette = false; - } - } - - $MyData->setAxisName(0,$yaxisname); - $MyData->addPoints($index,"Xaxis"); - $MyData->setSerieDescription("Xaxis", $xaxisname); - $MyData->setAbscissa("Xaxis"); - - - /* Create the pChart object */ - $myPicture = new pImage($width,$height,$MyData); - - - - /* Turn of Antialiasing */ - $myPicture->Antialias = $antialiasing; - - /* Add a border to the picture */ - //$myPicture->drawRectangle(0,0,$width,$height,array("R"=>0,"G"=>0,"B"=>0)); - - /* Turn on shadow computing */ - $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>120,"G"=>120,"B"=>120,"Alpha"=>10)); - - $pdf = get_parameter('pdf',false); - - if($pdf == true){ - $font_size = $font_size+1; - } - - - - /* Set the default font */ - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size)); - - /* Draw the scale */ - // TODO: AvoidTickWhenEmpty = FALSE When the distance between two ticks will be less than 50 px - // TODO: AvoidTickWhenEmpty = TRUE When the distance between two ticks will be greater than 50 px - - //Calculate the top margin from the size of string in each index - $max_chars = graph_get_max_index($index); - $margin_top = 10 * $max_chars; - - switch($graph_type) { - case "vbar": - $scaleSettings = array("AvoidTickWhenEmpty" => FALSE, "AvoidGridWhenEmpty" => FALSE, - "GridR"=>1000,"GridG"=>1000,"GridB"=>1000,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE, - "Mode"=>SCALE_MODE_START0, "LabelRotation" => 45); - $margin_left = 40+50; - $margin_right = 90; - $margin_top = 10; - $margin_bottom = (3 * $max_chars)+80; - break; - case "hbar": - $scaleSettings = array("GridR"=>1000,"GridG"=>1000,"GridB"=>1000,"DrawSubTicks"=>TRUE, - "CycleBackground"=>TRUE, "Mode"=>SCALE_MODE_START0, "Pos"=>SCALE_POS_TOPBOTTOM, - "LabelValuesRotation" => 30); - $margin_left = $font_size * $max_chars; - $margin_right = 15; - $margin_top = 40; - $margin_bottom = 10; - break; - } - - /* Define the chart area */ - $myPicture->setGraphArea($margin_left, $margin_top, $width - $margin_right, $height - $margin_bottom); - - $myPicture->drawScale($scaleSettings); - - /* Turn on shadow computing */ - $myPicture->setShadow(TRUE,array("X"=>0,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10)); - - - /* Draw the chart */ - $settings = array("ForceTransparency"=>"-1", "Gradient"=>FALSE,"GradientMode"=>GRADIENT_EFFECT_CAN,"DisplayValues"=>$show_values,"DisplayZeroValues"=>FALSE,"DisplayR"=>100,"DisplayG"=>100,"DisplayB"=>100,"DisplayShadow"=>TRUE,"Surrounding"=>5,"AroundZero"=>FALSE, "OverrideColors"=>$overridePalette); - - /* goes through a series of colors and assigns them to the bars, when it ends it starts from the beginning */ - - for ($i=0,$j=1; $i < count($settings['OverrideColors']); $i++) { - - switch ($j) { - case 1: - $settings['OverrideColors'][$i]['R'] = 43; - $settings['OverrideColors'][$i]['G'] = 98; - $settings['OverrideColors'][$i]['B'] = 201; - $j++; - break; - - case 2: - $settings['OverrideColors'][$i]['R'] = 243; - $settings['OverrideColors'][$i]['G'] = 86; - $settings['OverrideColors'][$i]['B'] = 157; - $j++; - break; - - case 3: - $settings['OverrideColors'][$i]['R'] = 191; - $settings['OverrideColors'][$i]['G'] = 191; - $settings['OverrideColors'][$i]['B'] = 191; - $j++; - break; - - case 4: - $settings['OverrideColors'][$i]['R'] = 251; - $settings['OverrideColors'][$i]['G'] = 183; - $settings['OverrideColors'][$i]['B'] = 50; - $j++; - break; - - case 5: - $settings['OverrideColors'][$i]['R'] = 157; - $settings['OverrideColors'][$i]['G'] = 117; - $settings['OverrideColors'][$i]['B'] = 177; - $j++; - break; - - case 6: - $settings['OverrideColors'][$i]['R'] = 39; - $settings['OverrideColors'][$i]['G'] = 172; - $settings['OverrideColors'][$i]['B'] = 151; - $j++; - break; - - case 7: - $settings['OverrideColors'][$i]['R'] = 171; - $settings['OverrideColors'][$i]['G'] = 42; - $settings['OverrideColors'][$i]['B'] = 46; - $j++; - break; - - case 8: - $settings['OverrideColors'][$i]['R'] = 185; - $settings['OverrideColors'][$i]['G'] = 218; - $settings['OverrideColors'][$i]['B'] = 87; - $j++; - break; - - case 9: - $settings['OverrideColors'][$i]['R'] = 60; - $settings['OverrideColors'][$i]['G'] = 182; - $settings['OverrideColors'][$i]['B'] = 203; - $j++; - break; - - case 10: - $settings['OverrideColors'][$i]['R'] = 105; - $settings['OverrideColors'][$i]['G'] = 65; - $settings['OverrideColors'][$i]['B'] = 179; - $j++; - break; - - case 11: - $settings['OverrideColors'][$i]['R'] = 228; - $settings['OverrideColors'][$i]['G'] = 35; - $settings['OverrideColors'][$i]['B'] = 102; - $j++; - break; - - case 12: - $settings['OverrideColors'][$i]['R'] = 252; - $settings['OverrideColors'][$i]['G'] = 130; - $settings['OverrideColors'][$i]['B'] = 53; - $j = 1; - break; - - - default: - - break; - - } - - } - - $myPicture->drawBarChart($settings); - - // Paint the water mark at the last moment to show it in front - if (!empty($water_mark)) { - $size_water_mark = getimagesize($water_mark); - $water_mark_width = $size_water_mark[0]; - - $myPicture->drawFromPNG(($width - $water_mark_width - $margin_right), - $margin_top, $water_mark); - } - - /* Render the picture */ - $myPicture->stroke(); -} - -function pch_threshold_graph ($graph_type, $index, $data, $width, $height, $font, - $antialiasing, $xaxisname = "", $yaxisname = "", $title = "", - $show_values = false, $show_legend = false, $font_size) { - /* CAT:Threshold Chart */ - - /* Create and populate the pData object */ - $MyData = new pData(); - $MyData->addPoints($data,"DEFCA"); - $MyData->setAxisName(0,$yaxisname); - $MyData->setAxisDisplay(0,AXIS_FORMAT_CURRENCY); - $MyData->addPoints($index,"Labels"); - $MyData->setSerieDescription("Labels",$xaxisname); - $MyData->setAbscissa("Labels"); - $MyData->setPalette("DEFCA",array("R"=>55,"G"=>91,"B"=>127)); - - /* Create the pChart object */ - $myPicture = new pImage(700,230,$MyData); - $myPicture->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,array("StartR"=>220,"StartG"=>220,"StartB"=>220,"EndR"=>255,"EndG"=>255,"EndB"=>255,"Alpha"=>100)); - $myPicture->drawRectangle(0,0,699,229,array("R"=>200,"G"=>200,"B"=>200)); - - /* Write the picture title */ - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size)); - $myPicture->drawText(60,35,$title,array("FontSize"=>$font_size,"Align"=>TEXT_ALIGN_BOTTOMLEFT)); - - /* Do some cosmetic and draw the chart */ - $myPicture->setGraphArea(60,40,670,190); - $myPicture->drawFilledRectangle(60,40,670,190,array("R"=>255,"G"=>255,"B"=>255,"Surrounding"=>-200,"Alpha"=>10)); - $myPicture->drawScale(array("GridR"=>180,"GridG"=>180,"GridB"=>180, "Mode" => SCALE_MODE_START0)); - $myPicture->setShadow(TRUE,array("X"=>2,"Y"=>2,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10)); - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size)); - $settings = array("Gradient"=>TRUE,"GradientMode"=>GRADIENT_EFFECT_CAN,"DisplayValues"=>$show_values,"DisplayZeroValues"=>FALSE,"DisplayR"=>100,"DisplayG"=>100,"DisplayB"=>100,"DisplayShadow"=>TRUE,"Surrounding"=>5,"AroundZero"=>FALSE); - $myPicture->drawSplineChart($settings); - $myPicture->setShadow(FALSE); - - if ($show_legend) { - /* Write the chart legend */ - $myPicture->drawLegend(643,210,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL)); - } - - /* Render the picture */ - $myPicture->stroke(); -} - -function pch_bullet_chart($graph_type, $data, $legend, - $width, $height, $font, $water_mark, $font_size, $legend_position, $colors) { - - - /* Create and populate the pData object */ - $MyData = new pData(); - - foreach ($data as $key => $dat) { - $MyData->addPoints($dat, $key); - } - $MyData->setPalette(__("Min"),array("R"=>55,"G"=>91,"B"=>127)); - $MyData->setPalette(__("Actual"),array("R"=>70,"G"=>130,"B"=>180)); - $MyData->setPalette(__("Max"),array("R"=>221,"G"=>221,"B"=>221)); - - $MyData->addPoints($legend,"Labels"); - - - $MyData->setAbscissa("Labels"); - $MyData->setSerieDescription("Labels", __("Agents/Modules")); - - $height_t = ($height * count($data) ) + 40; - $height_t = $height; - $max_chars = graph_get_max_index($legend); - $width_t = ($width + ( 100 + $max_chars)); - - /* Create the pChart object */ - $myPicture = new pImage($width_t, $height_t,$MyData); - - /* Write the picture title */ - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size)); - - /* Write the chart title */ - $myPicture->setFontProperties(array("FontName"=>$font,"FontSize"=>$font_size)); - - $height_t - 10; - /* Draw the scale and chart */ - $myPicture->setGraphArea(250,20,($width + 100), $height_t); - $myPicture->drawScale(array("Pos"=>SCALE_POS_TOPBOTTOM, "Mode"=>SCALE_MODE_ADDALL_START0, - "LabelingMethod"=>LABELING_DIFFERENT, "GridR"=>255, "GridG"=>255, - "GridB"=>255, "GridAlpha"=>50, "TickR"=>0,"TickG"=>0, "TickB"=>0, - "TickAlpha"=>50, "LabelRotation"=>0, "CycleBackground"=>1, - "DrawXLines"=>1, "DrawSubTicks"=>1, "SubTickR"=>255, - "SubTickG"=>0, "SubTickB"=>0, "SubTickAlpha"=>50, - "DrawYLines"=>ALL)); - $myPicture->drawStackedBarChart(array("MODE"=>SCALE_MODE_START0)); - - /* Write the chart legend */ - //$myPicture->drawLegend(0,205,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL)); - - /* Render the picture */ - $myPicture->stroke(); -} -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/data/128B.db b/pandora_console/include/graphs/pChart/data/128B.db deleted file mode 100755 index 20de3c9937..0000000000 --- a/pandora_console/include/graphs/pChart/data/128B.db +++ /dev/null @@ -1,107 +0,0 @@ -0;32;11011001100 -1;33;11001101100 -2;34;11001100110 -3;35;10010011000 -4;36;10010001100 -5;37;10001001100 -6;38;10011001000 -7;39;10011000100 -8;40;10001100100 -9;41;11001001000 -10;42;11001000100 -11;43;11000100100 -12;44;10110011100 -13;45;10011011100 -14;46;10011001110 -15;47;10111001100 -16;48;10011101100 -17;49;10011100110 -18;50;11001110010 -19;51;11001011100 -20;52;11001001110 -21;53;11011100100 -22;54;11001110100 -23;55;11101101110 -24;56;11101001100 -25;57;11100101100 -26;58;11100100110 -27;59;11101100100 -28;60;11100110100 -29;61;11100110010 -30;62;11011011000 -31;63;11011000110 -32;64;11000110110 -33;65;10100011000 -34;66;10001011000 -35;67;10001000110 -36;68;10110001000 -37;69;10001101000 -38;70;10001100010 -39;71;11010001000 -40;72;11000101000 -41;73;11000100010 -42;74;10110111000 -43;75;10110001110 -44;76;10001101110 -45;77;10111011000 -46;78;10111000110 -47;79;10001110110 -48;80;11101110110 -49;81;11010001110 -50;82;11000101110 -51;83;11011101000 -52;84;11011100010 -53;85;11011101110 -54;86;11101011000 -55;87;11101000110 -56;88;11100010110 -57;89;11101101000 -58;90;11101100010 -59;91;11100011010 -60;92;11101111010 -61;93;11001000010 -62;94;11110001010 -63;95;10100110000 -64;96;10100001100 -65;97;10010110000 -66;98;10010000110 -67;99;10000101100 -68;100;10000100110 -69;101;10110010000 -70;102;10110000100 -71;103;10011010000 -72;104;10011000010 -73;105;10000110100 -74;106;10000110010 -75;107;11000010010 -76;108;11001010000 -77;109;11110111010 -78;110;11000010100 -79;111;10001111010 -80;112;10100111100 -81;113;10010111100 -82;114;10010011110 -83;115;10111100100 -84;116;10011110100 -85;117;10011110010 -86;118;11110100100 -87;119;11110010100 -88;120;11110010010 -89;121;11011011110 -90;122;11011110110 -91;123;11110110110 -92;124;10101111000 -93;125;10100011110 -94;126;10001011110 -95;200;10111101000 -96;201;10111100010 -97;202;11110101000 -98;203;11110100010 -99;204;10111011110 -100;205;10111101110 -101;206;11101011110 -102;207;11110101110 -103;208;11010000100 -104;209;11010010000 -105;210;11010011100 -106;211;1100011101011 \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/data/39.db b/pandora_console/include/graphs/pChart/data/39.db deleted file mode 100755 index b1a74d6ec6..0000000000 --- a/pandora_console/include/graphs/pChart/data/39.db +++ /dev/null @@ -1,44 +0,0 @@ -0;101001101101 -1;110100101011 -2;101100101011 -3;110110010101 -4;101001101011 -5;110100110101 -6;101100110101 -7;101001011011 -8;110100101101 -9;101100101101 -A;110101001011 -B;101101001011 -C;110110100101 -D;101011001011 -E;110101100101 -F;101101100101 -G;101010011011 -H;110101001101 -I;101101001101 -J;101011001101 -K;110101010011 -L;101101010011 -M;110110101001 -N;101011010011 -O;110101101001 -P;101101101001 -Q;101010110011 -R;110101011001 -S;101101011001 -T;101011011001 -U;110010101011 -V;100110101011 -W;110011010101 -X;100101101011 -Y;110010110101 -Z;100110110101 --;100101011011 -.;110010101101 - ;100110101101 -$;100100100101 -/;100100101001 -+;100101001001 -%;101001001001 -*;100101101101 \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/fonts/Bedizen.ttf b/pandora_console/include/graphs/pChart/fonts/Bedizen.ttf deleted file mode 100755 index d115733305..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/Bedizen.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/Forgotte.ttf b/pandora_console/include/graphs/pChart/fonts/Forgotte.ttf deleted file mode 100755 index a2f7f4ab11..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/Forgotte.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/GeosansLight.ttf b/pandora_console/include/graphs/pChart/fonts/GeosansLight.ttf deleted file mode 100755 index 055932aac8..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/GeosansLight.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/MankSans.ttf b/pandora_console/include/graphs/pChart/fonts/MankSans.ttf deleted file mode 100755 index a6146a9004..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/MankSans.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/Silkscreen.ttf b/pandora_console/include/graphs/pChart/fonts/Silkscreen.ttf deleted file mode 100755 index ae4425ddab..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/Silkscreen.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/advent_light.ttf b/pandora_console/include/graphs/pChart/fonts/advent_light.ttf deleted file mode 100755 index 514030a885..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/advent_light.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/calibri.ttf b/pandora_console/include/graphs/pChart/fonts/calibri.ttf deleted file mode 100755 index 8b6e3c9743..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/calibri.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/code.ttf b/pandora_console/include/graphs/pChart/fonts/code.ttf deleted file mode 100755 index f077861ccd..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/code.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/pf_arma_five.ttf b/pandora_console/include/graphs/pChart/fonts/pf_arma_five.ttf deleted file mode 100755 index db04ec3b04..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/pf_arma_five.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/fonts/verdana.ttf b/pandora_console/include/graphs/pChart/fonts/verdana.ttf deleted file mode 100755 index 5a059d23c4..0000000000 Binary files a/pandora_console/include/graphs/pChart/fonts/verdana.ttf and /dev/null differ diff --git a/pandora_console/include/graphs/pChart/pBarcode128.class.php b/pandora_console/include/graphs/pChart/pBarcode128.class.php deleted file mode 100755 index 855c1b34ff..0000000000 --- a/pandora_console/include/graphs/pChart/pBarcode128.class.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php - /* - pBarcode128 - class to create barcodes (128B) - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - /* pData class definition */ - class pBarcode128 - { - var $Codes; - var $Reverse; - var $Result; - var $pChartObject; - var $CRC; - - /* Class creator */ - function pBarcode128($BasePath="") - { - $this->Codes = ""; - $this->Reverse = ""; - - $FileHandle = @fopen($BasePath."data/128B.db", "r"); - - if (!$FileHandle) { die("Cannot find barcode database (".$BasePath."128B.db)."); } - - while (!feof($FileHandle)) - { - $Buffer = fgets($FileHandle,4096); - $Buffer = str_replace(chr(10),"",$Buffer); - $Buffer = str_replace(chr(13),"",$Buffer); - $Values = preg_split("/;/",$Buffer); - - $this->Codes[$Values[1]]["ID"] = $Values[0]; - $this->Codes[$Values[1]]["Code"] = $Values[2]; - $this->Reverse[$Values[0]]["Code"] = $Values[2]; - $this->Reverse[$Values[0]]["Asc"] = $Values[1]; - } - fclose($FileHandle); - } - - /* Return the projected size of a barcode */ - function getSize($TextString,$Format="") - { - $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; - $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; - $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; - $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : 12; - $Height = isset($Format["Height"]) ? $Format["Height"] : 30; - - $TextString = $this->encode128($TextString); - $BarcodeLength = strlen($this->Result); - - if ( $DrawArea ) { $WOffset = 20; } else { $WOffset = 0; } - if ( $ShowLegend ) { $HOffset = $FontSize+$LegendOffset+$WOffset; } else { $HOffset = 0; } - - $X1 = cos($Angle * PI / 180) * ($WOffset+$BarcodeLength); - $Y1 = sin($Angle * PI / 180) * ($WOffset+$BarcodeLength); - - $X2 = $X1 + cos(($Angle+90) * PI / 180) * ($HOffset+$Height); - $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * ($HOffset+$Height); - - - $AreaWidth = max(abs($X1),abs($X2)); - $AreaHeight = max(abs($Y1),abs($Y2)); - - return(array("Width"=>$AreaWidth,"Height"=>$AreaHeight)); - } - - function encode128($Value,$Format="") - { - $this->Result = "11010010000"; - $this->CRC = 104; - $TextString = ""; - - for($i=1;$i<=strlen($Value);$i++) - { - $CharCode = ord($this->mid($Value,$i,1)); - if ( isset($this->Codes[$CharCode]) ) - { - $this->Result = $this->Result.$this->Codes[$CharCode]["Code"]; - $this->CRC = $this->CRC + $i*$this->Codes[$CharCode]["ID"]; - $TextString = $TextString.chr($CharCode); - } - } - $this->CRC = $this->CRC - floor($this->CRC/103)*103; - - $this->Result = $this->Result.$this->Reverse[$this->CRC]["Code"]; - $this->Result = $this->Result."1100011101011"; - - return($TextString); - } - - /* Create the encoded string */ - function draw($Object,$Value,$X,$Y,$Format="") - { - $this->pChartObject = $Object; - - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Height = isset($Format["Height"]) ? $Format["Height"] : 30; - $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; - $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; - $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; - $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; - $AreaR = isset($Format["AreaR"]) ? $Format["AreaR"] : 255; - $AreaG = isset($Format["AreaG"]) ? $Format["AreaG"] : 255; - $AreaB = isset($Format["AreaB"]) ? $Format["AreaB"] : 255; - $AreaBorderR = isset($Format["AreaBorderR"]) ? $Format["AreaBorderR"] : $AreaR; - $AreaBorderG = isset($Format["AreaBorderG"]) ? $Format["AreaBorderG"] : $AreaG; - $AreaBorderB = isset($Format["AreaBorderB"]) ? $Format["AreaBorderB"] : $AreaB; - - $TextString = $this->encode128($Value); - - if ( $DrawArea ) - { - $X1 = $X + cos(($Angle-135) * PI / 180) * 10; - $Y1 = $Y + sin(($Angle-135) * PI / 180) * 10; - - $X2 = $X1 + cos($Angle * PI / 180) * (strlen($this->Result)+20); - $Y2 = $Y1 + sin($Angle * PI / 180) * (strlen($this->Result)+20); - - if ( $ShowLegend ) - { - $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); - $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); - } - else - { - $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+20); - $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+20); - } - - $X4 = $X3 + cos(($Angle+180) * PI / 180) * (strlen($this->Result)+20); - $Y4 = $Y3 + sin(($Angle+180) * PI / 180) * (strlen($this->Result)+20); - - $Polygon = array($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4); - $Settings = array("R"=>$AreaR,"G"=>$AreaG,"B"=>$AreaB,"BorderR"=>$AreaBorderR,"BorderG"=>$AreaBorderG,"BorderB"=>$AreaBorderB); - $this->pChartObject->drawPolygon($Polygon,$Settings); - } - - for($i=1;$i<=strlen($this->Result);$i++) - { - if ( $this->mid($this->Result,$i,1) == 1 ) - { - $X1 = $X + cos($Angle * PI / 180) * $i; - $Y1 = $Y + sin($Angle * PI / 180) * $i; - $X2 = $X1 + cos(($Angle+90) * PI / 180) * $Height; - $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * $Height; - - $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); - $this->pChartObject->drawLine($X1,$Y1,$X2,$Y2,$Settings); - } - } - - if ( $ShowLegend ) - { - $X1 = $X + cos($Angle * PI / 180) * (strlen($this->Result)/2); - $Y1 = $Y + sin($Angle * PI / 180) * (strlen($this->Result)/2); - - $LegendX = $X1 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset); - $LegendY = $Y1 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset); - - $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Angle"=>-$Angle,"Align"=>TEXT_ALIGN_TOPMIDDLE); - $this->pChartObject->drawText($LegendX,$LegendY,$TextString,$Settings); - } - } - - function left($value,$NbChar) { return substr($value,0,$NbChar); } - function right($value,$NbChar) { return substr($value,strlen($value)-$NbChar,$NbChar); } - function mid($value,$Depart,$NbChar) { return substr($value,$Depart-1,$NbChar); } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pBarcode39.class.php b/pandora_console/include/graphs/pChart/pBarcode39.class.php deleted file mode 100755 index 3aada8fe14..0000000000 --- a/pandora_console/include/graphs/pChart/pBarcode39.class.php +++ /dev/null @@ -1,200 +0,0 @@ -<?php - /* - pBarcode39 - class to create barcodes (39B) - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - /* pData class definition */ - class pBarcode39 - { - var $Codes; - var $Reverse; - var $Result; - var $pChartObject; - var $CRC; - var $MOD43; - - /* Class creator */ - function pBarcode39($BasePath="",$EnableMOD43=FALSE) - { - $this->MOD43 = $EnableMOD43; - $this->Codes = ""; - $this->Reverse = ""; - - $FileHandle = @fopen($BasePath."data/39.db", "r"); - - if (!$FileHandle) { die("Cannot find barcode database (".$BasePath."data/39.db)."); } - - while (!feof($FileHandle)) - { - $Buffer = fgets($FileHandle,4096); - $Buffer = str_replace(chr(10),"",$Buffer); - $Buffer = str_replace(chr(13),"",$Buffer); - $Values = preg_split("/;/",$Buffer); - - $this->Codes[$Values[0]] = $Values[1]; - } - fclose($FileHandle); - } - - /* Return the projected size of a barcode */ - function getSize($TextString,$Format="") - { - $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; - $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; - $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; - $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : 12; - $Height = isset($Format["Height"]) ? $Format["Height"] : 30; - - $TextString = $this->encode39($TextString); - $BarcodeLength = strlen($this->Result); - - if ( $DrawArea ) { $WOffset = 20; } else { $WOffset = 0; } - if ( $ShowLegend ) { $HOffset = $FontSize+$LegendOffset+$WOffset; } else { $HOffset = 0; } - - $X1 = cos($Angle * PI / 180) * ($WOffset+$BarcodeLength); - $Y1 = sin($Angle * PI / 180) * ($WOffset+$BarcodeLength); - - $X2 = $X1 + cos(($Angle+90) * PI / 180) * ($HOffset+$Height); - $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * ($HOffset+$Height); - - - $AreaWidth = max(abs($X1),abs($X2)); - $AreaHeight = max(abs($Y1),abs($Y2)); - - return(array("Width"=>$AreaWidth,"Height"=>$AreaHeight)); - } - - /* Create the encoded string */ - function encode39($Value) - { - $this->Result = "100101101101"."0"; - $TextString = ""; - for($i=1;$i<=strlen($Value);$i++) - { - $CharCode = ord($this->mid($Value,$i,1)); - if ( $CharCode >= 97 && $CharCode <= 122 ) { $CharCode = $CharCode - 32; } - - if ( isset($this->Codes[chr($CharCode)]) ) - { - $this->Result = $this->Result.$this->Codes[chr($CharCode)]."0"; - $TextString = $TextString.chr($CharCode); - } - } - - if ( $this->MOD43 ) - { - $Checksum = $this->checksum($TextString); - $this->Result = $this->Result.$this->Codes[$Checksum]."0"; - } - - $this->Result = $this->Result."100101101101"; - $TextString = "*".$TextString."*"; - - return($TextString); - } - - /* Create the encoded string */ - function draw($Object,$Value,$X,$Y,$Format="") - { - $this->pChartObject = $Object; - - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Height = isset($Format["Height"]) ? $Format["Height"] : 30; - $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; - $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; - $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; - $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; - $AreaR = isset($Format["AreaR"]) ? $Format["AreaR"] : 255; - $AreaG = isset($Format["AreaG"]) ? $Format["AreaG"] : 255; - $AreaB = isset($Format["AreaB"]) ? $Format["AreaB"] : 255; - $AreaBorderR = isset($Format["AreaBorderR"]) ? $Format["AreaBorderR"] : $AreaR; - $AreaBorderG = isset($Format["AreaBorderG"]) ? $Format["AreaBorderG"] : $AreaG; - $AreaBorderB = isset($Format["AreaBorderB"]) ? $Format["AreaBorderB"] : $AreaB; - - $TextString = $this->encode39($Value); - - if ( $DrawArea ) - { - $X1 = $X + cos(($Angle-135) * PI / 180) * 10; - $Y1 = $Y + sin(($Angle-135) * PI / 180) * 10; - - $X2 = $X1 + cos($Angle * PI / 180) * (strlen($this->Result)+20); - $Y2 = $Y1 + sin($Angle * PI / 180) * (strlen($this->Result)+20); - - if ( $ShowLegend ) - { - $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); - $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); - } - else - { - $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+20); - $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+20); - } - - $X4 = $X3 + cos(($Angle+180) * PI / 180) * (strlen($this->Result)+20); - $Y4 = $Y3 + sin(($Angle+180) * PI / 180) * (strlen($this->Result)+20); - - $Polygon = array($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4); - $Settings = array("R"=>$AreaR,"G"=>$AreaG,"B"=>$AreaB,"BorderR"=>$AreaBorderR,"BorderG"=>$AreaBorderG,"BorderB"=>$AreaBorderB); - $this->pChartObject->drawPolygon($Polygon,$Settings); - } - - for($i=1;$i<=strlen($this->Result);$i++) - { - if ( $this->mid($this->Result,$i,1) == 1 ) - { - $X1 = $X + cos($Angle * PI / 180) * $i; - $Y1 = $Y + sin($Angle * PI / 180) * $i; - $X2 = $X1 + cos(($Angle+90) * PI / 180) * $Height; - $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * $Height; - - $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); - $this->pChartObject->drawLine($X1,$Y1,$X2,$Y2,$Settings); - } - } - - if ( $ShowLegend ) - { - $X1 = $X + cos($Angle * PI / 180) * (strlen($this->Result)/2); - $Y1 = $Y + sin($Angle * PI / 180) * (strlen($this->Result)/2); - - $LegendX = $X1 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset); - $LegendY = $Y1 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset); - - $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Angle"=>-$Angle,"Align"=>TEXT_ALIGN_TOPMIDDLE); - $this->pChartObject->drawText($LegendX,$LegendY,$TextString,$Settings); - } - } - - function checksum( $string ) - { - $checksum = 0; - $length = strlen( $string ); - $charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%'; - - for( $i=0; $i < $length; ++$i ) - $checksum += strpos( $charset, $string[$i] ); - - return substr( $charset, ($checksum % 43), 1 ); - } - - function left($value,$NbChar) { return substr($value,0,$NbChar); } - function right($value,$NbChar) { return substr($value,strlen($value)-$NbChar,$NbChar); } - function mid($value,$Depart,$NbChar) { return substr($value,$Depart-1,$NbChar); } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pBubble.class.php b/pandora_console/include/graphs/pChart/pBubble.class.php deleted file mode 100755 index a6785c77c8..0000000000 --- a/pandora_console/include/graphs/pChart/pBubble.class.php +++ /dev/null @@ -1,191 +0,0 @@ -<?php - /* - pBubble - class to draw bubble charts - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - /* pBubble class definition */ - class pBubble - { - var $pChartObject; - var $pDataObject; - - /* Class creator */ - function pBubble($pChartObject,$pDataObject) - { - $this->pChartObject = $pChartObject; - $this->pDataObject = $pDataObject; - } - - /* Prepare the scale */ - function bubbleScale($DataSeries,$WeightSeries) - { - if ( !is_array($DataSeries) ) { $DataSeries = array($DataSeries); } - if ( !is_array($WeightSeries) ) { $WeightSeries = array($WeightSeries); } - - /* Parse each data series to find the new min & max boundaries to scale */ - $NewPositiveSerie = ""; $NewNegativeSerie = ""; $MaxValues = 0; $LastPositive = 0; $LastNegative = 0; - foreach($DataSeries as $Key => $SerieName) - { - $SerieWeightName = $WeightSeries[$Key]; - - $this->pDataObject->setSerieDrawable($SerieWeightName,FALSE); - - if ( count($this->pDataObject->Data["Series"][$SerieName]["Data"]) > $MaxValues ) { $MaxValues = count($this->pDataObject->Data["Series"][$SerieName]["Data"]); } - - foreach($this->pDataObject->Data["Series"][$SerieName]["Data"] as $Key => $Value) - { - if ( $Value >= 0 ) - { - $BubbleBounds = $Value + $this->pDataObject->Data["Series"][$SerieWeightName]["Data"][$Key]; - - if ( !isset($NewPositiveSerie[$Key]) ) - { $NewPositiveSerie[$Key] = $BubbleBounds; } - elseif ( $NewPositiveSerie[$Key] < $BubbleBounds ) - { $NewPositiveSerie[$Key] = $BubbleBounds; } - - $LastPositive = $BubbleBounds; - } - else - { - $BubbleBounds = $Value - $this->pDataObject->Data["Series"][$SerieWeightName]["Data"][$Key]; - - if ( !isset($NewNegativeSerie[$Key]) ) - { $NewNegativeSerie[$Key] = $BubbleBounds; } - elseif ( $NewNegativeSerie[$Key] > $BubbleBounds ) - { $NewNegativeSerie[$Key] = $BubbleBounds; } - - $LastNegative = $BubbleBounds; - } - } - } - - /* Check for missing values and all the fake positive serie */ - if ( $NewPositiveSerie != "" ) - { - for ($i=0; $i<$MaxValues; $i++) { if (!isset($NewPositiveSerie[$i])) { $NewPositiveSerie[$i] = $LastPositive; } } - - $this->pDataObject->addPoints($NewPositiveSerie,"BubbleFakePositiveSerie"); - } - - /* Check for missing values and all the fake negative serie */ - if ( $NewNegativeSerie != "" ) - { - for ($i=0; $i<$MaxValues; $i++) { if (!isset($NewNegativeSerie[$i])) { $NewNegativeSerie[$i] = $LastNegative; } } - - $this->pDataObject->addPoints($NewNegativeSerie,"BubbleFakeNegativeSerie"); - } - } - - function resetSeriesColors() - { - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - $ID = 0; - foreach($Data["Series"] as $SerieName => $SeriesParameters) - { - if ( $SeriesParameters["isDrawable"] ) - { - $this->pDataObject->Data["Series"][$SerieName]["Color"]["R"] = $Palette[$ID]["R"]; - $this->pDataObject->Data["Series"][$SerieName]["Color"]["G"] = $Palette[$ID]["G"]; - $this->pDataObject->Data["Series"][$SerieName]["Color"]["B"] = $Palette[$ID]["B"]; - $this->pDataObject->Data["Series"][$SerieName]["Color"]["Alpha"] = $Palette[$ID]["Alpha"]; - $ID++; - } - } - } - - /* Prepare the scale */ - function drawBubbleChart($DataSeries,$WeightSeries,$Format="") - { - $DrawBorder = isset($Format["DrawBorder"]) ? $Format["DrawBorder"] : TRUE; - $DrawSquare = isset($Format["DrawSquare"]) ? $Format["DrawSquare"] : FALSE; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 0; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 0; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 0; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 30; - - if ( !is_array($DataSeries) ) { $DataSeries = array($DataSeries); } - if ( !is_array($WeightSeries) ) { $WeightSeries = array($WeightSeries); } - - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - if ( isset($Data["Series"]["BubbleFakePositiveSerie"] ) ) { $this->pDataObject->setSerieDrawable("BubbleFakePositiveSerie",FALSE); } - if ( isset($Data["Series"]["BubbleFakeNegativeSerie"] ) ) { $this->pDataObject->setSerieDrawable("BubbleFakeNegativeSerie",FALSE); } - - $this->resetSeriesColors(); - - list($XMargin,$XDivs) = $this->pChartObject->scaleGetXSettings(); - - foreach($DataSeries as $Key => $SerieName) - { - $AxisID = $Data["Series"][$SerieName]["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; - - $X = $this->pChartObject->GraphAreaX1 + $XMargin; - $Y = $this->pChartObject->GraphAreaY1 + $XMargin; - - $Color = array("R"=>$Palette[$Key]["R"],"G"=>$Palette[$Key]["G"],"B"=>$Palette[$Key]["B"],"Alpha"=>$Palette[$Key]["Alpha"]); - - if ( $DrawBorder ) - { - $Color["BorderAlpha"] = $BorderAlpha; - - if ( $Surrounding != NULL ) - { $Color["BorderR"] = $Palette[$Key]["R"]+$Surrounding; $Color["BorderG"] = $Palette[$Key]["G"]+$Surrounding; $Color["BorderB"] = $Palette[$Key]["B"]+$Surrounding; } - else - { $Color["BorderR"] = $BorderR; $Color["BorderG"] = $BorderG; $Color["BorderB"] = $BorderB; } - } - - foreach($Data["Series"][$SerieName]["Data"] as $iKey => $Point) - { - $Weight = $Point + $Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]; - - $PosArray = $this->pChartObject->scaleComputeY($Point,array("AxisID"=>$AxisID)); - $WeightArray = $this->pChartObject->scaleComputeY($Weight,array("AxisID"=>$AxisID)); - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; } - $Y = floor($PosArray); $CircleRadius = floor(abs($PosArray - $WeightArray)/2); - - if ( $DrawSquare ) - $this->pChartObject->drawFilledRectangle($X-$CircleRadius,$Y-$CircleRadius,$X+$CircleRadius,$Y+$CircleRadius,$Color); - else - $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius,$Color); - - $X = $X + $XStep; - } - elseif ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) - { - if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1-$XMargin*2)/$XDivs; } - $X = floor($PosArray); $CircleRadius = floor(abs($PosArray - $WeightArray)/2); - - if ( $DrawSquare ) - $this->pChartObject->drawFilledRectangle($X-$CircleRadius,$Y-$CircleRadius,$X+$CircleRadius,$Y+$CircleRadius,$Color); - else - $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius,$Color); - - $Y = $Y + $XStep; - } - } - } - } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pCache.class.php b/pandora_console/include/graphs/pChart/pCache.class.php deleted file mode 100755 index 94dba229b0..0000000000 --- a/pandora_console/include/graphs/pChart/pCache.class.php +++ /dev/null @@ -1,271 +0,0 @@ -<?php - /* - pCache - speed up the rendering by caching up the pictures - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - /* pData class definition */ - class pCache - { - var $CacheFolder; - var $CacheIndex; - var $CacheDB; - - /* Class creator */ - function pCache($Settings="") - { - $CacheFolder = isset($Settings["CacheFolder"]) ? $Settings["CacheFolder"] : "cache"; - $CacheIndex = isset($Settings["CacheIndex"]) ? $Settings["CacheIndex"] : "index.db"; - $CacheDB = isset($Settings["CacheDB"]) ? $Settings["CacheDB"] : "cache.db"; - - $this->CacheFolder = $CacheFolder; - $this->CacheIndex = $CacheIndex; - $this->CacheDB = $CacheDB; - - if (!file_exists($this->CacheFolder."/".$this->CacheIndex)) { touch($this->CacheFolder."/".$this->CacheIndex); } - if (!file_exists($this->CacheFolder."/".$this->CacheDB)) { touch($this->CacheFolder."/".$this->CacheDB); } - } - - /* Flush the cache contents */ - function flush() - { - if (file_exists($this->CacheFolder."/".$this->CacheIndex)) { unlink($this->CacheFolder."/".$this->CacheIndex); touch($this->CacheFolder."/".$this->CacheIndex); } - if (file_exists($this->CacheFolder."/".$this->CacheDB)) { unlink($this->CacheFolder."/".$this->CacheDB); touch($this->CacheFolder."/".$this->CacheDB); } - } - - /* Return the MD5 of the data array to clearly identify the chart */ - function getHash($Data,$Marker="") - { return(md5($Marker.serialize($Data->Data))); } - - /* Write the generated picture to the cache */ - function writeToCache($ID,$pChartObject) - { - /* Compute the paths */ - $TemporaryFile = $this->CacheFolder."/tmp_".rand(0,1000).".png"; - $Database = $this->CacheFolder."/".$this->CacheDB; - $Index = $this->CacheFolder."/".$this->CacheIndex; - - /* Flush the picture to a temporary file */ - imagepng($pChartObject->Picture ,$TemporaryFile); - - /* Retrieve the files size */ - $PictureSize = filesize($TemporaryFile); - $DBSize = filesize($Database); - - /* Save the index */ - $Handle = fopen($Index,"a"); - fwrite($Handle, $ID.",".$DBSize.",".$PictureSize.",".time().",0 \r\n"); - fclose($Handle); - - /* Get the picture raw contents */ - $Handle = fopen($TemporaryFile,"r"); - $Raw = fread($Handle,$PictureSize); - fclose($Handle); - - /* Save the picture in the solid database file */ - $Handle = fopen($Database,"a"); - fwrite($Handle, $Raw); - fclose($Handle); - - /* Remove temporary file */ - unlink($TemporaryFile); - } - - /* Remove object older than the specified TS */ - function removeOlderThan($Expiry) - { $this->dbRemoval(array("Expiry"=>$Expiry)); } - - /* Remove an object from the cache */ - function remove($ID) - { $this->dbRemoval(array("Name"=>$ID)); } - - /* Remove with specified criterias */ - function dbRemoval($Settings) - { - $ID = isset($Settings["Name"]) ? $Settings["Name"] : NULL; - $Expiry = isset($Settings["Expiry"]) ? $Settings["Expiry"] : -(24*60*60); - $TS = time()-$Expiry; - - /* Compute the paths */ - $Database = $this->CacheFolder."/".$this->CacheDB; - $Index = $this->CacheFolder."/".$this->CacheIndex; - $DatabaseTemp = $this->CacheFolder."/".$this->CacheDB.".tmp"; - $IndexTemp = $this->CacheFolder."/".$this->CacheIndex.".tmp"; - - /* Single file removal */ - if ( $ID != NULL ) - { - /* Retrieve object informations */ - $Object = $this->isInCache($ID,TRUE); - - /* If it's not in the cache DB, go away */ - if ( !$Object ) { return(0); } - } - - /* Create the temporary files */ - if (!file_exists($DatabaseTemp)) { touch($DatabaseTemp); } - if (!file_exists($IndexTemp)) { touch($IndexTemp); } - - /* Open the file handles */ - $IndexHandle = @fopen($Index, "r"); - $IndexTempHandle = @fopen($IndexTemp, "w"); - $DBHandle = @fopen($Database, "r"); - $DBTempHandle = @fopen($DatabaseTemp, "w"); - - /* Remove the selected ID from the database */ - while (!feof($IndexHandle)) - { - $Entry = fgets($IndexHandle, 4096); - $Entry = str_replace("\r","",$Entry); - $Entry = str_replace("\n","",$Entry); - $Settings = preg_split("/,/",$Entry); - - if ( $Entry != "" ) - { - $PicID = $Settings[0]; - $DBPos = $Settings[1]; - $PicSize = $Settings[2]; - $GeneratedTS = $Settings[3]; - $Hits = $Settings[4]; - - if ( $Settings[0] != $ID && $GeneratedTS > $TS) - { - $CurrentPos = ftell($DBTempHandle); - fwrite($IndexTempHandle, $PicID.",".$CurrentPos.",".$PicSize.",".$GeneratedTS.",".$Hits."\r\n"); - - fseek($DBHandle,$DBPos); - $Picture = fread($DBHandle,$PicSize); - fwrite($DBTempHandle,$Picture); - } - } - } - - /* Close the handles */ - fclose($IndexHandle); - fclose($IndexTempHandle); - fclose($DBHandle); - fclose($DBTempHandle); - - /* Remove the prod files */ - unlink($Database); - unlink($Index); - - /* Swap the temp & prod DB */ - rename($DatabaseTemp,$Database); - rename($IndexTemp,$Index); - } - - function isInCache($ID,$Verbose=FALSE,$UpdateHitsCount=FALSE) - { - /* Compute the paths */ - $Index = $this->CacheFolder."/".$this->CacheIndex; - - /* Search the picture in the index file */ - $Handle = @fopen($Index, "r"); - while (!feof($Handle)) - { - $IndexPos = ftell($Handle); - $Entry = fgets($Handle, 4096); - if ( $Entry != "" ) - { - $Settings = preg_split("/,/",$Entry); - $PicID = $Settings[0]; - if ( $PicID == $ID ) - { - fclose($Handle); - - $DBPos = $Settings[1]; - $PicSize = $Settings[2]; - $GeneratedTS = $Settings[3]; - $Hits = intval($Settings[4]); - - if ( $UpdateHitsCount ) - { - $Hits++; - if ( strlen($Hits) < 7 ) { $Hits = $Hits.str_repeat(" ",7-strlen($Hits)); } - - $Handle = @fopen($Index, "r+"); - fseek($Handle,$IndexPos); - fwrite($Handle, $PicID.",".$DBPos.",".$PicSize.",".$GeneratedTS.",".$Hits."\r\n"); - fclose($Handle); - } - - if ($Verbose) - { return(array("DBPos"=>$DBPos,"PicSize"=>$PicSize,"GeneratedTS"=>$GeneratedTS,"Hits"=>$Hits)); } - else - { return(TRUE); } - } - } - } - fclose($Handle); - - /* Picture isn't in the cache */ - return(FALSE); - } - - function strokeFromCache($ID) - { - /* Get the raw picture from the cache */ - $Picture = $this->getFromCache($ID); - - /* Do we have a hit? */ - if ( $Picture == NULL ) { return(FALSE); } - - header('Content-type: image/png'); - echo $Picture; - - return(TRUE); - } - - function saveFromCache($ID,$Destination) - { - /* Get the raw picture from the cache */ - $Picture = $this->getFromCache($ID); - - /* Do we have a hit? */ - if ( $Picture == NULL ) { return(FALSE); } - - /* Flush the picture to a file */ - $Handle = fopen($Destination,"w"); - fwrite($Handle,$Picture); - fclose($Handle); - - /* All went fine */ - return(TRUE); - } - - function getFromCache($ID) - { - /* Compute the path */ - $Database = $this->CacheFolder."/".$this->CacheDB; - - /* Lookup for the picture in the cache */ - $CacheInfo = $this->isInCache($ID,TRUE,TRUE); - - /* Not in the cache */ - if (!$CacheInfo) { return(NULL); } - - /* Get the database extended information */ - $DBPos = $CacheInfo["DBPos"]; - $PicSize = $CacheInfo["PicSize"]; - - /* Extract the picture from the solid cache file */ - $Handle = @fopen($Database, "r"); - fseek($Handle,$DBPos); - $Picture = fread($Handle,$PicSize); - fclose($Handle); - - /* Return back the raw picture data */ - return($Picture); - } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pData.class.php b/pandora_console/include/graphs/pChart/pData.class.php deleted file mode 100755 index 5cbb22b395..0000000000 --- a/pandora_console/include/graphs/pChart/pData.class.php +++ /dev/null @@ -1,637 +0,0 @@ -<?php - /* - pDraw - class to manipulate data arrays - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - /* Axis configuration */ - define("AXIS_FORMAT_DEFAULT" , 680001); - define("AXIS_FORMAT_TIME" , 680002); - define("AXIS_FORMAT_DATE" , 680003); - define("AXIS_FORMAT_METRIC" , 680004); - define("AXIS_FORMAT_CURRENCY" , 680005); - define("AXIS_FORMAT_TWO_SIGNIFICANT" , 680006); // ARTICA-PANDORA HACK - - /* Axis position */ - define("AXIS_POSITION_LEFT" , 681001); - define("AXIS_POSITION_RIGHT" , 681002); - define("AXIS_POSITION_TOP" , 681001); - define("AXIS_POSITION_BOTTOM" , 681002); - - /* Axis position */ - define("AXIS_X" , 682001); - define("AXIS_Y" , 682002); - - /* Define value limits */ - define("ABSOLUTE_MIN" , -10000000000000); - define("ABSOLUTE_MAX" , 10000000000000); - - /* Replacement to the PHP NULL keyword */ - define("VOID" , 0.12345); - - /* pData class definition */ - class pData - { - var $Data; - - var $Palette = array("0"=>array("R"=>138,"G"=>226,"B"=>52,"Alpha"=>100), - "1"=>array("R"=>204,"G"=>0,"B"=>0,"Alpha"=>100), - "2"=>array("R"=>255,"G"=>204,"B"=>0,"Alpha"=>100), - "3"=>array("R"=>195,"G"=>195,"B"=>195,"Alpha"=>100), - "4"=>array("R"=>59,"G"=>160,"B"=>255,"Alpha"=>100), - "5"=>array("R"=>176,"G"=>46,"B"=>224,"Alpha"=>100), - "6"=>array("R"=>224,"G"=>46,"B"=>117,"Alpha"=>100), - "7"=>array("R"=>92,"G"=>224,"B"=>46,"Alpha"=>100), - "8"=>array("R"=>224,"G"=>176,"B"=>46,"Alpha"=>100)); - - /* Class creator */ - function pData() - { - $this->Data = ""; - $this->Data["XAxisDisplay"] = AXIS_FORMAT_DEFAULT; - $this->Data["XAxisFormat"] = NULL; - $this->Data["XAxisName"] = NULL; - $this->Data["XAxisUnit"] = NULL; - $this->Data["Abscissa"] = NULL; - $this->Data["Axis"][0]["Display"] = AXIS_FORMAT_DEFAULT; - $this->Data["Axis"][0]["Position"] = AXIS_POSITION_LEFT; - $this->Data["Axis"][0]["Identity"] = AXIS_Y; - } - - /* Add a single point or an array to the given serie */ - function addPoints($Values,$SerieName="Serie1") - { - if (!isset($this->Data["Series"][$SerieName])) - $this->initialise($SerieName); - - if ( is_array($Values) ) - { - foreach($Values as $Key => $Value) - { $this->Data["Series"][$SerieName]["Data"][] = $Value; } - } - else - $this->Data["Series"][$SerieName]["Data"][] = $Values; - - if ( $Values != VOID ) - { - $this->Data["Series"][$SerieName]["Max"] = max($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); - $this->Data["Series"][$SerieName]["Min"] = min($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); - } - } - - /* Strip VOID values */ - function stripVOID($Values) - { $Result = ""; foreach($Values as $Key => $Value) { if ( $Value != VOID ) { $Result[] = $Value; } } return($Result); } - - /* Return the number of values contained in a given serie */ - function getSerieCount($Serie=NULL) - { if (isset($this->Data["Series"][$Serie]["Data"])) { return(sizeof($this->Data["Series"][$Serie]["Data"])); } else { return(0); } } - - /* Remove a serie from the pData object */ - function removeSerie($Serie=NULL) - { if (isset($this->Data["Series"][$Serie])) { unset($this->Data["Series"][$Serie]); } } - - /* Return a value from given serie & index */ - function getValueAt($Serie,$Index=0) - { if (isset($this->Data["Series"][$Serie]["Data"][$Index])) { return($this->Data["Series"][$Serie]["Data"][$Index]); } else { return(NULL); } } - - /* Return the values array */ - function getValues($Serie=NULL) - { if (isset($this->Data["Series"][$Serie]["Data"])) { return($this->Data["Series"][$Serie]["Data"]); } else { return(NULL); } } - - /* Reverse the values in the given serie */ - function reverseSerie($Serie=NULL) - { if (isset($this->Data["Series"][$Serie]["Data"])) { $this->Data["Series"][$Serie]["Data"] = array_reverse($this->Data["Series"][$Serie]["Data"]); } } - - /* Return the sum of the serie values */ - function getSum($Serie) - { if (isset($this->Data["Series"][$Serie])) { return(array_sum($this->Data["Series"][$Serie]["Data"])); } else { return(NULL); } } - - /* Return the max value of a given serie */ - function getMax($Serie) - { if (isset($this->Data["Series"][$Serie]["Max"])) { return($this->Data["Series"][$Serie]["Max"]); } else { return(NULL); } } - - /* Return the min value of a given serie */ - function getMin($Serie) - { if (isset($this->Data["Series"][$Serie]["Min"])) { return($this->Data["Series"][$Serie]["Min"]); } else { return(NULL); } } - - /* Set the description of a given serie */ - function setSerieDescription($Serie=NULL,$Description="My serie") - { if (isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Description"] = $Description; } } - - /* Set a serie as "drawable" while calling a rendering function */ - function setSerieDrawable($Serie=NULL ,$Drawable=TRUE) - { if (isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["isDrawable"] = $Drawable; } } - - /* Set the icon associated to a given serie */ - function setSeriePicture($Serie=NULL,$Picture=NULL) - { if (isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Picture"] = $Picture; } } - - /* Set the name of the X Axis */ - function setXAxisName($Name=NULL) - { $this->Data["XAxisName"] = $Name; } - - /* Set the display mode of the X Axis */ - function setXAxisDisplay($Mode,$Format=NULL) - { $this->Data["XAxisDisplay"] = $Mode; $this->Data["XAxisFormat"] = $Format; } - - /* Set the unit that will be displayed on the X axis */ - function setXAxisUnit($Unit) - { $this->Data["XAxisUnit"] = $Unit; } - - /* Set the serie that will be used as abscissa */ - function setAbscissa($Serie) - { if (isset($this->Data["Series"][$Serie])) { $this->Data["Abscissa"] = $Serie; } } - - function setAbsicssaPosition($Position = AXIS_POSITION_BOTTOM) - { $this->Data["AbsicssaPosition"] = $Position; } - - /* Set the name of the abscissa axis */ - function setAbscissaName($Name) - { $this->Data["AbscissaName"] = $Name; } - - /* Create a scatter group specifyin X and Y data series */ - function setScatterSerie($SerieX,$SerieY,$ID=0) - { if (isset($this->Data["Series"][$SerieX]) && isset($this->Data["Series"][$SerieY]) ) { $this->initScatterSerie($ID); $this->Data["ScatterSeries"][$ID]["X"] = $SerieX; $this->Data["ScatterSeries"][$ID]["Y"] = $SerieY; } } - - /* Set the shape of a given sctatter serie */ - function setScatterSerieShape($ID,$Shape=SERIE_SHAPE_FILLEDCIRCLE) - { if (isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Shape"] = $Shape; } } - - /* Set the description of a given scatter serie */ - function setScatterSerieDescription($ID,$Description="My serie") - { if (isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Description"] = $Description; } } - - /* Set the icon associated to a given scatter serie */ - function setScatterSeriePicture($ID,$Picture=NULL) - { if (isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Picture"] = $Picture; } } - - /* Set a scatter serie as "drawable" while calling a rendering function */ - function setScatterSerieDrawable($ID ,$Drawable=TRUE) - { if (isset($this->Data["ScatterSeries"][ID]) ) { $this->Data["ScatterSeries"][ID]["isDrawable"] = $Drawable; } } - - /* Define if a scatter serie should be draw with ticks */ - function setScatterSerieTicks($ID,$Width=0) - { if ( isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Ticks"] = $Width; } } - - /* Define if a scatter serie should be draw with a special weight */ - function setScatterSerieWeight($ID,$Weight=0) - { if ( isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Weight"] = $Weight; } } - - /* Associate a color to a scatter serie */ - function setScatterSerieColor($ID,$Format) - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - - if ( isset($this->Data["ScatterSeries"][$ID]) ) - { - $this->Data["ScatterSeries"][$ID]["Color"]["R"] = $R; - $this->Data["ScatterSeries"][$ID]["Color"]["G"] = $G; - $this->Data["ScatterSeries"][$ID]["Color"]["B"] = $B; - $this->Data["ScatterSeries"][$ID]["Color"]["Alpha"] = $Alpha; - } - } - - /* Compute the series limits for an individual and global point of view */ - function limits() - { - $GlobalMin = ABSOLUTE_MAX; - $GlobalMax = ABSOLUTE_MIN; - - foreach($this->Data["Series"] as $Key => $Value) - { - if ( $this->Data["Abscissa"] != $Key && $this->Data["Series"][$Key]["isDrawable"] == TRUE) - { - if ( $GlobalMin > $this->Data["Series"][$Key]["Min"] ) { $GlobalMin = $this->Data["Series"][$Key]["Min"]; } - if ( $GlobalMax < $this->Data["Series"][$Key]["Max"] ) { $GlobalMax = $this->Data["Series"][$Key]["Max"]; } - } - } - $this->Data["Min"] = $GlobalMin; - $this->Data["Max"] = $GlobalMax; - - return(array($GlobalMin,$GlobalMax)); - } - - /* Mark all series as drawable */ - function drawAll() - { foreach($this->Data["Series"] as $Key => $Value) { if ( $this->Data["Abscissa"] != $Key ) { $this->Data["Series"][$Key]["isDrawable"]=TRUE; } } } - - /* Return the average value of the given serie */ - function getSerieAverage($Serie) - { - if ( isset($this->Data["Series"][$Serie]) ) - return(array_sum($this->Data["Series"][$Serie]["Data"])/sizeof($this->Data["Series"][$Serie]["Data"])); - else - return(NULL); - } - - /* Return the x th percentil of the given serie */ - function getSeriePercentile($Serie="Serie1",$Percentil=95) - { - if (!isset($this->Data["Series"][$Serie]["Data"])) { return(NULL); } - - $Values = count($this->Data["Series"][$Serie]["Data"])-1; - if ( $Values < 0 ) { $Values = 0; } - - $PercentilID = floor(($Values/100)*$Percentil+.5); - $SortedValues = $this->Data["Series"][$Serie]["Data"]; - sort($SortedValues); - - if ( is_numeric($SortedValues[$PercentilID]) ) - return($SortedValues[$PercentilID]); - else - return(NULL); - } - - /* Add random values to a given serie */ - function addRandomValues($SerieName="Serie1",$Options="") - { - $Values = isset($Options["Values"]) ? $Options["Values"] : 20; - $Min = isset($Options["Min"]) ? $Options["Min"] : 0; - $Max = isset($Options["Max"]) ? $Options["Max"] : 100; - $withFloat = isset($Options["withFloat"]) ? $Options["withFloat"] : FALSE; - - for ($i=0;$i<=$Values;$i++) - { - if ( $withFloat ) { $Value = rand($Min*100,$Max*100)/100; } else { $Value = rand($Min,$Max); } - $this->addPoints($Value,$SerieName); - } - } - - /* Test if we have valid data */ - function containsData() - { - if (!isset($this->Data["Series"])) { return(FALSE); } - - $Result = FALSE; - foreach($this->Data["Series"] as $Key => $Value) - { if ( $this->Data["Abscissa"] != $Key && $this->Data["Series"][$Key]["isDrawable"]==TRUE) { $Result=TRUE; } } - return($Result); - } - - /* Set the display mode of an Axis */ - function setAxisDisplay($AxisID,$Mode=AXIS_FORMAT_DEFAULT,$Format=NULL) - { - if ( isset($this->Data["Axis"][$AxisID] ) ) - { - $this->Data["Axis"][$AxisID]["Display"] = $Mode; - if ( $Format != NULL ) { $this->Data["Axis"][$AxisID]["Format"] = $Format; } - } - } - - /* Set the position of an Axis */ - function setAxisPosition($AxisID,$Position=AXIS_POSITION_LEFT) - { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Position"] = $Position; } } - - /* Associate an unit to an axis */ - function setAxisUnit($AxisID,$Unit) - { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Unit"] = $Unit; } } - - /* Associate a name to an axis */ - function setAxisName($AxisID,$Name) - { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Name"] = $Name; } } - - /* Associate a color to an axis */ - function setAxisColor($AxisID,$Format) - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - - if ( isset($this->Data["Axis"][$AxisID] ) ) - { - $this->Data["Axis"][$AxisID]["Color"]["R"] = $R; - $this->Data["Axis"][$AxisID]["Color"]["G"] = $G; - $this->Data["Axis"][$AxisID]["Color"]["B"] = $B; - $this->Data["Axis"][$AxisID]["Color"]["Alpha"] = $Alpha; - } - } - - - /* Design an axis as X or Y member */ - function setAxisXY($AxisID,$Identity=AXIS_Y) - { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Identity"] = $Identity; } } - - /* Associate one data serie with one axis */ - function setSerieOnAxis($Serie,$AxisID) - { - $PreviousAxis = $this->Data["Series"][$Serie]["Axis"]; - - /* Create missing axis */ - if ( !isset($this->Data["Axis"][$AxisID] ) ) - { $this->Data["Axis"][$AxisID]["Position"] = AXIS_POSITION_LEFT; $this->Data["Axis"][$AxisID]["Identity"] = AXIS_Y;} - - $this->Data["Series"][$Serie]["Axis"] = $AxisID; - - /* Cleanup unused axis */ - $Found = FALSE; - foreach($this->Data["Series"] as $SerieName => $Values) { if ( $Values["Axis"] == $PreviousAxis ) { $Found = TRUE; } } - if (!$Found) { unset($this->Data["Axis"][$PreviousAxis]); } - } - - /* Define if a serie should be draw with ticks */ - function setSerieTicks($Serie,$Width=0) - { if ( isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Ticks"] = $Width; } } - - /* Define if a serie should be draw with a special weight */ - function setSerieWeight($Serie,$Weight=0) - { if ( isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Weight"] = $Weight; } } - - /* Set the color of one serie */ - function setPalette($Serie,$Format=NULL) - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; - - if (isset($this->Data["Series"][$Serie]) ) - { - $OldR = $this->Data["Series"][$Serie]["Color"]["R"]; - $OldG = $this->Data["Series"][$Serie]["Color"]["G"]; - $OldB = $this->Data["Series"][$Serie]["Color"]["B"]; - $this->Data["Series"][$Serie]["Color"]["R"] = $R; - $this->Data["Series"][$Serie]["Color"]["G"] = $G; - $this->Data["Series"][$Serie]["Color"]["B"] = $B; - $this->Data["Series"][$Serie]["Color"]["BorderR"] = $BorderR; - $this->Data["Series"][$Serie]["Color"]["BorderG"] = $BorderG; - $this->Data["Series"][$Serie]["Color"]["BorderB"] = $BorderB; - $this->Data["Series"][$Serie]["Color"]["Alpha"] = $Alpha; - - /* Do reverse processing on the internal palette array */ - foreach ($this->Palette as $Key => $Value) { - if ($Value["R"] == $OldR && $Value["G"] == $OldG && $Value["B"] == $OldB) { - $this->Palette[$Key]["R"] = $R; - $this->Palette[$Key]["G"] = $G; - $this->Palette[$Key]["B"] = $B; - $this->Palette[$Key]["BorderR"] = $BorderR; - $this->Palette[$Key]["BorderG"] = $BorderG; - $this->Palette[$Key]["BorderB"] = $BorderB; - $this->Palette[$Key]["Alpha"] = $Alpha;} - } - } - } - - /* Load a palette file */ - function loadPalette($FileName,$Overwrite=FALSE) - { - if ( !file_exists($FileName) ) { return(-1); } - if ( $Overwrite ) { $this->Palette = ""; } - - $fileHandle = @fopen($FileName, "r"); - if (!$fileHandle) { return(-1); } - while (!feof($fileHandle)) - { - $buffer = fgets($fileHandle, 4096); - if ( preg_match("/,/",$buffer) ) - { - list($R,$G,$B,$Alpha) = preg_split("/,/",$buffer); - if ( $this->Palette == "" ) { $ID = 0; } else { $ID = count($this->Palette); } - $this->Palette[$ID] = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); - } - } - fclose($fileHandle); - - /* Apply changes to current series */ - $ID = 0; - if ( isset($this->Data["Series"])) - { - foreach($this->Data["Series"] as $Key => $Value) - { - if ( !isset($this->Palette[$ID]) ) - $this->Data["Series"][$Key]["Color"] = array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>0); - else - $this->Data["Series"][$Key]["Color"] = $this->Palette[$ID]; - $ID++; - } - } - } - - /* Initialise a given scatter serie */ - function initScatterSerie($ID) - { - if ( isset($this->Data["ScatterSeries"][$ID]) ) { return(0); } - - $this->Data["ScatterSeries"][$ID]["Description"] = "Scatter ".$ID; - $this->Data["ScatterSeries"][$ID]["isDrawable"] = TRUE; - $this->Data["ScatterSeries"][$ID]["Picture"] = NULL; - $this->Data["ScatterSeries"][$ID]["Ticks"] = 0; - $this->Data["ScatterSeries"][$ID]["Weight"] = 0; - - if ( isset($this->Palette[$ID]) ) - $this->Data["ScatterSeries"][$ID]["Color"] = $this->Palette[$ID]; - else - { - $this->Data["ScatterSeries"][$ID]["Color"]["R"] = rand(0,255); - $this->Data["ScatterSeries"][$ID]["Color"]["G"] = rand(0,255); - $this->Data["ScatterSeries"][$ID]["Color"]["B"] = rand(0,255); - $this->Data["ScatterSeries"][$ID]["Color"]["Alpha"] = 100; - } - } - - /* Initialise a given serie */ - function initialise($Serie) - { - if ( isset($this->Data["Series"]) ) { $ID = count($this->Data["Series"]); } else { $ID = 0; } - - $this->Data["Series"][$Serie]["Description"] = $Serie; - $this->Data["Series"][$Serie]["isDrawable"] = TRUE; - $this->Data["Series"][$Serie]["Picture"] = NULL; - $this->Data["Series"][$Serie]["Max"] = NULL; - $this->Data["Series"][$Serie]["Min"] = NULL; - $this->Data["Series"][$Serie]["Axis"] = 0; - $this->Data["Series"][$Serie]["Ticks"] = 0; - $this->Data["Series"][$Serie]["Weight"] = 0; - - if ( isset($this->Palette[$ID]) ) - $this->Data["Series"][$Serie]["Color"] = $this->Palette[$ID]; - else - { - $this->Data["Series"][$Serie]["Color"]["R"] = rand(0,255); - $this->Data["Series"][$Serie]["Color"]["G"] = rand(0,255); - $this->Data["Series"][$Serie]["Color"]["B"] = rand(0,255); - $this->Data["Series"][$Serie]["Color"]["Alpha"] = 100; - } - } - - function normalize($NormalizationFactor=100,$UnitChange=NULL,$Round=1) - { - $Abscissa = $this->Data["Abscissa"]; - - $SelectedSeries = ""; - $MaxVal = 0; - foreach($this->Data["Axis"] as $AxisID => $Axis) - { - if ( $UnitChange != NULL ) { $this->Data["Axis"][$AxisID]["Unit"] = $UnitChange; } - - foreach($this->Data["Series"] as $SerieName => $Serie) - { - if ($Serie["Axis"] == $AxisID && $Serie["isDrawable"] == TRUE && $SerieName != $Abscissa) - { - $SelectedSeries[$SerieName] = $SerieName; - - if ( count($Serie["Data"] ) > $MaxVal ) { $MaxVal = count($Serie["Data"]); } - } - } - } - - for($i=0;$i<=$MaxVal-1;$i++) - { - $Factor = 0; - foreach ($SelectedSeries as $Key => $SerieName ) - { - $Value = $this->Data["Series"][$SerieName]["Data"][$i]; - if ( $Value != VOID ) - $Factor = $Factor + abs($Value); - } - - if ( $Factor != 0 ) - { - $Factor = $NormalizationFactor / $Factor; - - foreach ($SelectedSeries as $Key => $SerieName ) - { - $Value = $this->Data["Series"][$SerieName]["Data"][$i]; - - if ( $Value != VOID && $Factor != $NormalizationFactor ) - $this->Data["Series"][$SerieName]["Data"][$i] = round(abs($Value)*$Factor,$Round); - elseif ( $Value == VOID || $Value == 0 ) - $this->Data["Series"][$SerieName]["Data"][$i] = VOID; - elseif ( $Factor == $NormalizationFactor ) - $this->Data["Series"][$SerieName]["Data"][$i] = $NormalizationFactor; - } - } - } - - foreach ($SelectedSeries as $Key => $SerieName ) - { - $this->Data["Series"][$SerieName]["Max"] = max($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); - $this->Data["Series"][$SerieName]["Min"] = min($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); - } - } - - /* Load data from a CSV (or similar) data source */ - function importFromCSV($FileName,$Options="") - { - $Delimiter = isset($Options["Delimiter"]) ? $Options["Delimiter"] : ","; - $GotHeader = isset($Options["GotHeader"]) ? $Options["GotHeader"] : FALSE; - $SkipColumns = isset($Options["SkipColumns"]) ? $Options["SkipColumns"] : array(-1); - $DefaultSerieName = isset($Options["DefaultSerieName"]) ? $Options["DefaultSerieName"] : "Serie"; - - $Handle = @fopen($FileName,"r"); - if ($Handle) - { - $HeaderParsed = FALSE; $SerieNames = ""; - while (!feof($Handle)) - { - $Buffer = fgets($Handle, 4096); - $Buffer = str_replace(chr(10),"",$Buffer); - $Buffer = str_replace(chr(13),"",$Buffer); - $Values = preg_split("/".$Delimiter."/",$Buffer); - - if ( $Buffer != "" ) - { - if ( $GotHeader && !$HeaderParsed ) - { - foreach($Values as $Key => $Name) { if ( !in_array($Key,$SkipColumns) ) { $SerieNames[$Key] = $Name; } } - $HeaderParsed = TRUE; - } - else - { - if ($SerieNames == "" ) { foreach($Values as $Key => $Name) { if ( !in_array($Key,$SkipColumns) ) { $SerieNames[$Key] = $DefaultSerieName.$Key; } } } - foreach($Values as $Key => $Value) { if ( !in_array($Key,$SkipColumns) ) { $this->addPoints($Value,$SerieNames[$Key]); } } - } - } - } - fclose($Handle); - } - } - - /* Create a dataset based on a formula */ - function createFunctionSerie($SerieName,$Formula="",$Options="") - { - $MinX = isset($Options["MinX"]) ? $Options["MinX"] : -10; - $MaxX = isset($Options["MaxX"]) ? $Options["MaxX"] : 10; - $XStep = isset($Options["XStep"]) ? $Options["XStep"] : 1; - $AutoDescription = isset($Options["AutoDescription"]) ? $Options["AutoDescription"] : FALSE; - $RecordAbscissa = isset($Options["RecordAbscissa"]) ? $Options["RecordAbscissa"] : FALSE; - $AbscissaSerie = isset($Options["AbscissaSerie"]) ? $Options["AbscissaSerie"] : "Abscissa"; - - if ( $Formula == "" ) { return(0); } - - $Result = ""; $Abscissa = ""; - for($i=$MinX; $i<=$MaxX; $i=$i+$XStep) - { - $Expression = "\$return = '!'.(".str_replace("z",$i,$Formula).");"; - if ( @eval($Expression) === FALSE ) { $return = VOID; } - if ( $return == "!" ) { $return = VOID; } else { $return = $this->right($return,strlen($return)-1); } - if ( $return == "NAN" ) { $return = VOID; } - if ( $return == "INF" ) { $return = VOID; } - if ( $return == "-INF" ) { $return = VOID; } - - $Abscissa[] = $i; - $Result[] = $return; - } - - $this->addPoints($Result,$SerieName); - if ( $AutoDescription ) { $this->setSerieDescription($SerieName,$Formula); } - if ( $RecordAbscissa ) { $this->addPoints($Abscissa,$AbscissaSerie); } - } - - function negateValues($Series) - { - if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } - foreach($Series as $Key => $SerieName) - { - if (isset($this->Data["Series"][$SerieName])) - { - $Data = ""; - foreach($this->Data["Series"][$SerieName]["Data"] as $Key => $Value) - { if ( $Value == VOID ) { $Data[] = VOID; } else { $Data[] = -$Value; } } - $this->Data["Series"][$SerieName]["Data"] = $Data; - - $this->Data["Series"][$SerieName]["Max"] = max($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); - $this->Data["Series"][$SerieName]["Min"] = min($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); - } - } - } - - /* Return the data & configuration of the series */ - function getData() - { return($this->Data); } - - /* Save a palette element */ - function savePalette($ID,$Color) - { $this->Palette[$ID] = $Color; } - - /* Return the palette of the series */ - function getPalette() - { return($this->Palette); } - - /* Called by the scaling algorithm to save the config */ - function saveAxisConfig($Axis) { $this->Data["Axis"]=$Axis; } - - /* Called by the scaling algorithm to save the orientation of the scale */ - function saveOrientation($Orientation) { $this->Data["Orientation"]=$Orientation; } - - /* Class string wrapper */ - function __toString() - { return("pData object."); } - } -?> diff --git a/pandora_console/include/graphs/pChart/pDraw.class.php b/pandora_console/include/graphs/pChart/pDraw.class.php deleted file mode 100755 index 76ed6030bb..0000000000 --- a/pandora_console/include/graphs/pChart/pDraw.class.php +++ /dev/null @@ -1,5322 +0,0 @@ -<?php - /* - pDraw - class extension with drawing methods - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - define("DIRECTION_VERTICAL" , 690001); - define("DIRECTION_HORIZONTAL" , 690002); - - define("SCALE_POS_LEFTRIGHT" , 690101); - define("SCALE_POS_TOPBOTTOM" , 690102); - - define("SCALE_MODE_FLOATING" , 690201); - define("SCALE_MODE_START0" , 690202); - define("SCALE_MODE_ADDALL" , 690203); - define("SCALE_MODE_ADDALL_START0" , 690204); - define("SCALE_MODE_MANUAL" , 690205); - - define("SCALE_SKIP_NONE" , 690301); - define("SCALE_SKIP_SAME" , 690302); - define("SCALE_SKIP_NUMBERS" , 690303); - - define("TEXT_ALIGN_TOPLEFT" , 690401); - define("TEXT_ALIGN_TOPMIDDLE" , 690402); - define("TEXT_ALIGN_TOPRIGHT" , 690403); - define("TEXT_ALIGN_MIDDLELEFT" , 690404); - define("TEXT_ALIGN_MIDDLEMIDDLE" , 690405); - define("TEXT_ALIGN_MIDDLERIGHT" , 690406); - define("TEXT_ALIGN_BOTTOMLEFT" , 690407); - define("TEXT_ALIGN_BOTTOMMIDDLE" , 690408); - define("TEXT_ALIGN_BOTTOMRIGHT" , 690409); - - define("POSITION_TOP" , 690501); - define("POSITION_BOTTOM" , 690502); - - define("LABEL_POS_LEFT" , 690601); - define("LABEL_POS_CENTER" , 690602); - define("LABEL_POS_RIGHT" , 690603); - define("LABEL_POS_TOP" , 690604); - define("LABEL_POS_BOTTOM" , 690605); - define("LABEL_POS_INSIDE" , 690606); - define("LABEL_POS_OUTSIDE" , 690607); - - define("ORIENTATION_HORIZONTAL" , 690701); - define("ORIENTATION_VERTICAL" , 690702); - - define("LEGEND_NOBORDER" , 690800); - define("LEGEND_BOX" , 690801); - define("LEGEND_ROUND" , 690802); - - define("LEGEND_VERTICAL" , 690901); - define("LEGEND_HORIZONTAL" , 690902); - - define("LEGEND_FAMILY_BOX" , 691051); - define("LEGEND_FAMILY_CIRCLE" , 691052); - define("LEGEND_FAMILY_LINE" , 691053); - - define("DISPLAY_AUTO" , 691001); - define("DISPLAY_MANUAL" , 691002); - - define("LABELING_ALL" , 691011); - define("LABELING_DIFFERENT" , 691012); - - define("BOUND_MIN" , 691021); - define("BOUND_MAX" , 691022); - define("BOUND_BOTH" , 691023); - - define("BOUND_LABEL_POS_TOP" , 691031); - define("BOUND_LABEL_POS_BOTTOM" , 691032); - define("BOUND_LABEL_POS_AUTO" , 691033); - - define("CAPTION_LEFT_TOP" , 691041); - define("CAPTION_RIGHT_BOTTOM" , 691042); - - define("GRADIENT_SIMPLE" , 691051); - define("GRADIENT_EFFECT_CAN" , 691052); - - define("PI" , 3.14159265); - define("ALL" , 69); - define("NONE" , 31); - define("AUTO" , 690000); - define("OUT_OF_SIGHT" , -10000000000000); - - class pDraw - { - /* Returns the number of drawable series */ - function countDrawableSeries() - { - $Results = 0; - $Data = $this->DataSet->getData(); - - foreach($Data["Series"] as $SerieName => $Serie) - { if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) { $Results++; } } - - return($Results); - } - - /* Fix box coordinates */ - function fixBoxCoordinates($Xa,$Ya,$Xb,$Yb) - { - $X1 = min($Xa,$Xb); $Y1 = min($Ya,$Yb); - $X2 = max($Xa,$Xb); $Y2 = max($Ya,$Yb); - - return(array($X1,$Y1,$X2,$Y2)); - } - - /* Draw a polygon */ - function drawPolygon($Points,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $NoBorder = isset($Format["NoBorder"]) ? $Format["NoBorder"] : FALSE; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; - $BorderAlpha = isset($Format["Alpha"]) ? $Format["Alpha"] : $Alpha / 2; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $SkipX = isset($Format["SkipX"]) ? $Format["SkipX"] : OUT_OF_SIGHT; - $SkipY = isset($Format["SkipY"]) ? $Format["SkipY"] : OUT_OF_SIGHT; - - /* Calling the ImageFilledPolygon() function over the $Points array will round it */ - $Backup = $Points; - - if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - - if ( $SkipX != OUT_OF_SIGHT ) { $SkipX = floor($SkipX); } - if ( $SkipY != OUT_OF_SIGHT ) { $SkipY = floor($SkipY); } - - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - for($i=0;$i<=count($Points)-1;$i=$i+2) - { $Shadow[] = $Points[$i] + $this->ShadowX; $Shadow[] = $Points[$i+1] + $this->ShadowY; } - $this->drawPolygon($Shadow,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"NoBorder"=>TRUE)); - } - - $FillColor = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - - if ( count($Points) >= 6 ) - { ImageFilledPolygon($this->Picture,$Points,count($Points)/2,$FillColor); } - - if ( !$NoBorder ) - { - $Points = $Backup; - - $BorderSettings = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha); - for($i=0;$i<=count($Points)-1;$i=$i+2) - { - if ( isset($Points[$i+2]) ) - { - if ( !($Points[$i] == $Points[$i+2] && $Points[$i] == $SkipX ) && !($Points[$i+1] == $Points[$i+3] && $Points[$i+1] == $SkipY ) ) - $this->drawLine($Points[$i],$Points[$i+1],$Points[$i+2],$Points[$i+3],$BorderSettings); - } - else - { - if ( !($Points[$i] == $Points[0] && $Points[$i] == $SkipX ) && !($Points[$i+1] == $Points[1] && $Points[$i+1] == $SkipY ) ) - $this->drawLine($Points[$i],$Points[$i+1],$Points[0],$Points[1],$BorderSettings); - } - } - } - - $this->Shadow = $RestoreShadow; - } - - /* Apply AALias correction to the rounded box boundaries */ - function offsetCorrection($Value,$Mode) - { - $Value = round($Value,1); - - if ( $Value == 0 && $Mode == 1 ) { return(.9); } - if ( $Value == 0 ) { return(0); } - - if ( $Mode == 1) - { if ( $Value == 1 ) { return(.9); }; if ( $Value == .1 ) { return(.9); }; if ( $Value == .2 ) { return(.8); }; if ( $Value == .3 ) { return(.8); }; if ( $Value == .4 ) { return(.7); }; if ( $Value == .5 ) { return(.5); }; if ( $Value == .6 ) { return(.8); }; if ( $Value == .7 ) { return(.7); }; if ( $Value == .8 ) { return(.6); }; if ( $Value == .9 ) { return(.9); }; } - - if ( $Mode == 2) - { if ( $Value == 1 ) { return(.9); }; if ( $Value == .1 ) { return(.1); }; if ( $Value == .2 ) { return(.2); }; if ( $Value == .3 ) { return(.3); }; if ( $Value == .4 ) { return(.4); }; if ( $Value == .5 ) { return(.5); }; if ( $Value == .6 ) { return(.8); }; if ( $Value == .7 ) { return(.7); }; if ( $Value == .8 ) { return(.8); }; if ( $Value == .9 ) { return(.9); }; } - - if ( $Mode == 3) - { if ( $Value == 1 ) { return(.1); }; if ( $Value == .1 ) { return(.1); }; if ( $Value == .2 ) { return(.2); }; if ( $Value == .3 ) { return(.3); }; if ( $Value == .4 ) { return(.4); }; if ( $Value == .5 ) { return(.9); }; if ( $Value == .6 ) { return(.6); }; if ( $Value == .7 ) { return(.7); }; if ( $Value == .8 ) { return(.4); }; if ( $Value == .9 ) { return(.5); }; } - - if ( $Mode == 4) - { if ( $Value == 1 ) { return(-1); }; if ( $Value == .1 ) { return(.1); }; if ( $Value == .2 ) { return(.2); }; if ( $Value == .3 ) { return(.3); }; if ( $Value == .4 ) { return(.1); }; if ( $Value == .5 ) { return(-.1); }; if ( $Value == .6 ) { return(.8); }; if ( $Value == .7 ) { return(.1); }; if ( $Value == .8 ) { return(.1); }; if ( $Value == .9 ) { return(.1); }; } - } - - /* Draw a rectangle with rounded corners */ - function drawRoundedRectangle($X1,$Y1,$X2,$Y2,$Radius,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - - list($X1,$Y1,$X2,$Y2) = $this->fixBoxCoordinates($X1,$Y1,$X2,$Y2); - - if ( $X2 - $X1 < $Radius ) { $Radius = floor((($X2-$X1))/2); } - if ( $Y2 - $Y1 < $Radius ) { $Radius = floor((($Y2-$Y1))/2); } - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"NoBorder"=>TRUE); - - if ( $Radius <= 0 ) { $this->drawRectangle($X1,$Y1,$X2,$Y2,$Color); return(0); } - - if ( $this->Antialias ) - { - $this->drawLine($X1+$Radius,$Y1,$X2-$Radius,$Y1,$Color); - $this->drawLine($X2,$Y1+$Radius,$X2,$Y2-$Radius,$Color); - $this->drawLine($X2-$Radius,$Y2,$X1+$Radius,$Y2,$Color); - $this->drawLine($X1,$Y1+$Radius,$X1,$Y2-$Radius,$Color); - } - else - { - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - imageline($this->Picture,$X1+$Radius,$Y1,$X2-$Radius,$Y1,$Color); - imageline($this->Picture,$X2,$Y1+$Radius,$X2,$Y2-$Radius,$Color); - imageline($this->Picture,$X2-$Radius,$Y2,$X1+$Radius,$Y2,$Color); - imageline($this->Picture,$X1,$Y1+$Radius,$X1,$Y2-$Radius,$Color); - } - - $Step = 360 / (2 * PI * $Radius); - for($i=0;$i<=90;$i=$i+$Step) - { - $X = cos(($i+180)*PI/180) * $Radius + $X1 + $Radius; - $Y = sin(($i+180)*PI/180) * $Radius + $Y1 + $Radius; - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - - $X = cos(($i+90)*PI/180) * $Radius + $X1 + $Radius; - $Y = sin(($i+90)*PI/180) * $Radius + $Y2 - $Radius; - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - - $X = cos($i*PI/180) * $Radius + $X2 - $Radius; - $Y = sin($i*PI/180) * $Radius + $Y2 - $Radius; - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - - $X = cos(($i+270)*PI/180) * $Radius + $X2 - $Radius; - $Y = sin(($i+270)*PI/180) * $Radius + $Y1 + $Radius; - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - } - } - - /* Draw a rectangle with rounded corners */ - function drawRoundedFilledRectangle($X1,$Y1,$X2,$Y2,$Radius,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - - if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - if ( $BorderR == -1 ) { $BorderR = $R; $BorderG = $G; $BorderB = $B; } - - list($X1,$Y1,$X2,$Y2) = $this->fixBoxCoordinates($X1,$Y1,$X2,$Y2); - - if ( $X2 - $X1 < $Radius ) { $Radius = floor((($X2-$X1))/2); } - if ( $Y2 - $Y1 < $Radius ) { $Radius = floor((($Y2-$Y1))/2); } - - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - $this->drawRoundedFilledRectangle($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,$Radius,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); - } - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"NoBorder"=>TRUE); - - if ( $Radius <= 0 ) { $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); return(0); } - - $YTop = $Y1+$Radius; - $YBottom = $Y2-$Radius; - - $Step = 360 / (2 * PI * $Radius); - $Positions = ""; $Radius--; $MinY = ""; $MaxY = ""; - for($i=0;$i<=90;$i=$i+$Step) - { - $Xp1 = cos(($i+180)*PI/180) * $Radius + $X1 + $Radius; - $Xp2 = cos(((90-$i)+270)*PI/180) * $Radius + $X2 - $Radius; - $Yp = floor(sin(($i+180)*PI/180) * $Radius + $YTop); - if ( $MinY == "" || $Yp > $MinY ) { $MinY = $Yp; } - - if ( !isset($Positions[$Yp]) ) - { $Positions[$Yp]["X1"] = $Xp1; $Positions[$Yp]["X2"] = $Xp2; } - else - { $Positions[$Yp]["X1"] = min($Positions[$Yp]["X1"],$Xp1); $Positions[$Yp]["X2"] = max($Positions[$Yp]["X2"],$Xp2); } - - $Xp1 = cos(($i+90)*PI/180) * $Radius + $X1 + $Radius; - $Xp2 = cos((90-$i)*PI/180) * $Radius + $X2 - $Radius; - $Yp = floor(sin(($i+90)*PI/180) * $Radius + $YBottom); - if ( $MaxY == "" || $Yp < $MaxY ) { $MaxY = $Yp; } - - if ( !isset($Positions[$Yp]["Bottom"]) ) - { $Positions[$Yp]["X1"] = $Xp1; $Positions[$Yp]["X2"] = $Xp2; } - else - { $Positions[$Yp]["X1"] = min($Positions[$Yp]["X1"],$Xp1); $Positions[$Yp]["X2"] = max($Positions[$Yp]["X2"],$Xp2); } - } - - $ManualColor = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - foreach($Positions as $Yp => $Bounds) - { - $X1 = $Bounds["X1"]; $X1Dec = $this->getFirstDecimal($X1); if ( $X1Dec != 0 ) { $X1 = floor($X1)+1; } - $X2 = $Bounds["X2"]; $X2Dec = $this->getFirstDecimal($X2); if ( $X2Dec != 0 ) { $X2 = floor($X2)-1; } - - imageline($this->Picture,$X1,$Yp,$X2,$Yp,$ManualColor); - } - $this->drawFilledRectangle($X1,$MinY+1,floor($X2),$MaxY-1,$Color); - - $Radius++; - $this->drawRoundedRectangle($X1,$Y1,$X2+1,$Y2-1,$Radius,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - - $this->Shadow = $RestoreShadow; - } - - /* Draw a rectangle with rounded corners */ - function drawRoundedFilledRectangle_deprecated($X1,$Y1,$X2,$Y2,$Radius,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - - if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - if ( $BorderR == -1 ) { $BorderR = $R; $BorderG = $G; $BorderB = $B; } - - list($X1,$Y1,$X2,$Y2) = $this->fixBoxCoordinates($X1,$Y1,$X2,$Y2); - - if ( $X2 - $X1 < $Radius ) { $Radius = floor((($X2-$X1)+2)/2); } - if ( $Y2 - $Y1 < $Radius ) { $Radius = floor((($Y2-$Y1)+2)/2); } - - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - $this->drawRoundedFilledRectangle($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,$Radius,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); - } - - if ( $this->getFirstDecimal($X2) >= 5 ) { $XOffset2 = 1; } else { $XOffset2 = 0; } - if ( $this->getFirstDecimal($X1) <= 5 ) { $XOffset1 = 1; } else { $XOffset1 = 0; } - - if ( !$this->Antialias ) { $XOffset1 = 1; $XOffset2 = 1; } - - $YTop = floor($Y1+$Radius); - $YBottom = floor($Y2-$Radius); - - $this->drawFilledRectangle($X1-$XOffset1,$YTop,$X2+$XOffset2,$YBottom,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"NoBorder"=>TRUE)); - - $Step = 360 / (2 * PI * $Radius); - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - $Color2 = $this->allocateColor($this->Picture,255,0,0,$Alpha); - $Drawn = ""; - - if ( $Alpha < 100 ) { $Drawn[$YTop] = FALSE; } - if ( $Alpha < 100 ) { $Drawn[$YBottom] = TRUE; } - - for($i=0;$i<=90;$i=$i+$Step) - { - $Xp1 = cos(($i+180)*PI/180) * $Radius + $X1 + $Radius; - $Xp2 = cos(((90-$i)+270)*PI/180) * $Radius + $X2 - $Radius; - $Yp = sin(($i+180)*PI/180) * $Radius + $YTop; - - if ( $this->getFirstDecimal($Xp1) > 5 ) { $XOffset1 = 1; } else { $XOffset1 = 0; } - if ( $this->getFirstDecimal($Xp2) > 5 ) { $XOffset2 = 1; } else { $XOffset2 = 0; } - if ( $this->getFirstDecimal($Yp) > 5 ) { $YOffset = 1; } else { $YOffset = 0; } - - if ( !isset($Drawn[$Yp+$YOffset]) || $Alpha == 100 ) - imageline($this->Picture,$Xp1+$XOffset1,$Yp+$YOffset,$Xp2+$XOffset2,$Yp+$YOffset,$Color); - - $Drawn[$Yp+$YOffset] = $Xp2; - - $Xp1 = cos(($i+90)*PI/180) * $Radius + $X1 + $Radius; - $Xp2 = cos((90-$i)*PI/180) * $Radius + $X2 - $Radius; - $Yp = sin(($i+90)*PI/180) * $Radius + $YBottom; - - if ( $this->getFirstDecimal($Xp1) > 7 ) { $XOffset1 = 1; } else { $XOffset1 = 0; } - if ( $this->getFirstDecimal($Xp2) > 7 ) { $XOffset2 = 1; } else { $XOffset2 = 0; } - if ( $this->getFirstDecimal($Yp) > 5 ) { $YOffset = 1; } else { $YOffset = 0; } - - if ( !isset($Drawn[$Yp+$YOffset]) || $Alpha == 100 ) - imageline($this->Picture,$Xp1+$XOffset1,$Yp+$YOffset,$Xp2+$XOffset2,$Yp+$YOffset,$Color); - - $Drawn[$Yp+$YOffset] = $Xp2; - } - - $this->drawRoundedRectangle($X1,$Y1,$X2,$Y2,$Radius,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - - $this->Shadow = $RestoreShadow; - } - - /* Draw a rectangle */ - function drawRectangle($X1,$Y1,$X2,$Y2,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - $NoAngle = isset($Format["NoAngle"]) ? $Format["NoAngle"] : FALSE; - - if ($X1 > $X2) { list($X1, $X2) = array($X2, $X1); } - if ($Y1 > $Y2) { list($Y1, $Y2) = array($Y2, $Y1); } - - if ( $this->Antialias ) - { - if ( $NoAngle ) - { - $this->drawLine($X1+1,$Y1,$X2-1,$Y1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - $this->drawLine($X2,$Y1+1,$X2,$Y2-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - $this->drawLine($X2-1,$Y2,$X1+1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - $this->drawLine($X1,$Y1+1,$X1,$Y2-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - else - { - $this->drawLine($X1+1,$Y1,$X2-1,$Y1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - $this->drawLine($X2,$Y1,$X2,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - $this->drawLine($X2-1,$Y2,$X1+1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - $this->drawLine($X1,$Y1,$X1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - } - else - { - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - imagerectangle($this->Picture,$X1,$Y1,$X2,$Y2,$Color); - } - } - - /* Draw a filled rectangle */ - function drawFilledRectangle($X1,$Y1,$X2,$Y2,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - $NoAngle = isset($Format["NoAngle"]) ? $Format["NoAngle"] : NULL; - $Dash = isset($Format["Dash"]) ? $Format["Dash"] : FALSE; - $DashStep = isset($Format["DashStep"]) ? $Format["DashStep"] : 4; - $DashR = isset($Format["DashR"]) ? $Format["DashR"] : 0; - $DashG = isset($Format["DashG"]) ? $Format["DashG"] : 0; - $DashB = isset($Format["DashB"]) ? $Format["DashB"] : 0; - $NoBorder = isset($Format["NoBorder"]) ? $Format["NoBorder"] : FALSE; - - if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - - if ($X1 > $X2) { list($X1, $X2) = array($X2, $X1); } - if ($Y1 > $Y2) { list($Y1, $Y2) = array($Y2, $Y1); } - - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - $this->drawFilledRectangle($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Ticks"=>$Ticks,"NoAngle"=>$NoAngle)); - } - - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - if ( $NoAngle ) - { - imagefilledrectangle($this->Picture,ceil($X1)+1,ceil($Y1),floor($X2)-1,floor($Y2),$Color); - imageline($this->Picture,ceil($X1),ceil($Y1)+1,ceil($X1),floor($Y2)-1,$Color); - imageline($this->Picture,floor($X2),ceil($Y1)+1,floor($X2),floor($Y2)-1,$Color); - } - else - imagefilledrectangle($this->Picture,ceil($X1),ceil($Y1),floor($X2),floor($Y2),$Color); - - if ( $Dash ) - { - if ( $BorderR != -1 ) { $iX1=$X1+1; $iY1=$Y1+1; $iX2=$X2-1; $iY2=$Y2-1; } else { $iX1=$X1; $iY1=$Y1; $iX2=$X2; $iY2=$Y2; } - - $Color = $this->allocateColor($this->Picture,$DashR,$DashG,$DashB,$Alpha); - $Y=$iY1-$DashStep; - for($X=$iX1; $X<=$iX2+($iY2-$iY1); $X=$X+$DashStep) - { - $Y=$Y+$DashStep; - if ( $X > $iX2 ) { $Xa = $X-($X-$iX2); $Ya = $iY1+($X-$iX2); } else { $Xa = $X; $Ya = $iY1; } - if ( $Y > $iY2 ) { $Xb = $iX1+($Y-$iY2); $Yb = $Y-($Y-$iY2); } else { $Xb = $iX1; $Yb = $Y; } - imageline($this->Picture,$Xa,$Ya,$Xb,$Yb,$Color); - } - } - - if ( $this->Antialias && !$NoBorder ) - { - if ( $X1 < ceil($X1) ) - { - $AlphaA = $Alpha * (ceil($X1) - $X1); - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); - imageline($this->Picture,ceil($X1)-1,ceil($Y1),ceil($X1)-1,floor($Y2),$Color); - } - - if ( $Y1 < ceil($Y1) ) - { - $AlphaA = $Alpha * (ceil($Y1) - $Y1); - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); - imageline($this->Picture,ceil($X1),ceil($Y1)-1,floor($X2),ceil($Y1)-1,$Color); - } - - if ( $X2 > floor($X2) ) - { - $AlphaA = $Alpha * (.5-($X2 - floor($X2))); - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); - imageline($this->Picture,floor($X2)+1,ceil($Y1),floor($X2)+1,floor($Y2),$Color); - } - - if ( $Y2 > floor($Y2) ) - { - $AlphaA = $Alpha * (.5-($Y2 - floor($Y2))); - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); - imageline($this->Picture,ceil($X1),floor($Y2)+1,floor($X2),floor($Y2)+1,$Color); - } - } - - if ( $BorderR != -1 ) - $this->drawRectangle($X1,$Y1,$X2,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$Ticks,"NoAngle"=>$NoAngle)); - - $this->Shadow = $RestoreShadow; - } - - /* Draw a rectangular marker of the specified size */ - function drawRectangleMarker($X,$Y,$Format="") - { - $Size = isset($Format["Size"]) ? $Format["Size"] : 4; - - $HalfSize = floor($Size/2); - $this->drawFilledRectangle($X-$HalfSize,$Y-$HalfSize,$X+$HalfSize,$Y+$HalfSize,$Format); - } - - /* Drawn a spline based on the bezier function */ - function drawSpline($Coordinates,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Force = isset($Format["Force"]) ? $Format["Force"] : 30; - $Forces = isset($Format["Forces"]) ? $Format["Forces"] : NULL; - $ShowC = isset($Format["ShowControl"]) ? $Format["ShowControl"] : FALSE; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - $PathOnly = isset($Format["PathOnly"]) ? $Format["PathOnly"] : FALSE; - $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; - - $Cpt = NULL; $Mode = NULL; $Result = ""; - for($i=1;$i<=count($Coordinates)-1;$i++) - { - $X1 = $Coordinates[$i-1][0]; $Y1 = $Coordinates[$i-1][1]; - $X2 = $Coordinates[$i][0]; $Y2 = $Coordinates[$i][1]; - - if ( $Forces != NULL ) { $Force = $Forces[$i]; } - - /* First segment */ - if ( $i == 1 ) - { $Xv1 = $X1; $Yv1 = $Y1; } - else - { - $Angle1 = $this->getAngle($XLast,$YLast,$X1,$Y1); - $Angle2 = $this->getAngle($X1,$Y1,$X2,$Y2); - $XOff = cos($Angle2 * PI / 180) * $Force + $X1; - $YOff = sin($Angle2 * PI / 180) * $Force + $Y1; - - $Xv1 = cos($Angle1 * PI / 180) * $Force + $XOff; - $Yv1 = sin($Angle1 * PI / 180) * $Force + $YOff; - } - - /* Last segment */ - if ( $i == count($Coordinates)-1 ) - { $Xv2 = $X2; $Yv2 = $Y2; } - else - { - $Angle1 = $this->getAngle($X2,$Y2,$Coordinates[$i+1][0],$Coordinates[$i+1][1]); - $Angle2 = $this->getAngle($X1,$Y1,$X2,$Y2); - $XOff = cos(($Angle2+180) * PI / 180) * $Force + $X2; - $YOff = sin(($Angle2+180) * PI / 180) * $Force + $Y2; - - $Xv2 = cos(($Angle1+180) * PI / 180) * $Force + $XOff; - $Yv2 = sin(($Angle1+180) * PI / 180) * $Force + $YOff; - } - - $Path = $this->drawBezier($X1,$Y1,$X2,$Y2,$Xv1,$Yv1,$Xv2,$Yv2,$Format); - if ($PathOnly) { $Result[] = $Path; } - - $XLast = $X1; $YLast = $Y1; - } - - return($Result); - } - - /* Draw a bezier curve with two controls points */ - function drawBezier($X1,$Y1,$X2,$Y2,$Xv1,$Yv1,$Xv2,$Yv2,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $ShowC = isset($Format["ShowControl"]) ? $Format["ShowControl"] : FALSE; - $Segments = isset($Format["Segments"]) ? $Format["Segments"] : NULL; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - $NoDraw = isset($Format["NoDraw"]) ? $Format["NoDraw"] : FALSE; - $PathOnly = isset($Format["PathOnly"]) ? $Format["PathOnly"] : FALSE; - $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; - $DrawArrow = isset($Format["DrawArrow"]) ? $Format["DrawArrow"] : FALSE; - $ArrowSize = isset($Format["ArrowSize"]) ? $Format["ArrowSize"] : 10; - $ArrowRatio = isset($Format["ArrowRatio"]) ? $Format["ArrowRatio"] : .5; - $ArrowTwoHeads = isset($Format["ArrowTwoHeads"]) ? $Format["ArrowTwoHeads"] : FALSE; - - if ( $Segments == NULL ) - { - $Length = $this->getLength($X1,$Y1,$X2,$Y2); - $Precision = ($Length*125)/1000; - } - else - $Precision = $Segments; - - $P[0]["X"] = $X1; $P[0]["Y"] = $Y1; - $P[1]["X"] = $Xv1; $P[1]["Y"] = $Yv1; - $P[2]["X"] = $Xv2; $P[2]["Y"] = $Yv2; - $P[3]["X"] = $X2; $P[3]["Y"] = $Y2; - - /* Compute the bezier points */ - $Q = ""; $ID = 0; $Path = ""; - for($i=0;$i<=$Precision;$i=$i+1) - { - $u = $i / $Precision; - - $C = ""; - $C[0] = (1 - $u) * (1 - $u) * (1 - $u); - $C[1] = ($u * 3) * (1 - $u) * (1 - $u); - $C[2] = 3 * $u * $u * (1 - $u); - $C[3] = $u * $u * $u; - - for($j=0;$j<=3;$j++) - { - if ( !isset($Q[$ID]) ) { $Q[$ID] = ""; } - if ( !isset($Q[$ID]["X"]) ) { $Q[$ID]["X"] = 0; } - if ( !isset($Q[$ID]["Y"]) ) { $Q[$ID]["Y"] = 0; } - - $Q[$ID]["X"] = $Q[$ID]["X"] + $P[$j]["X"] * $C[$j]; - $Q[$ID]["Y"] = $Q[$ID]["Y"] + $P[$j]["Y"] * $C[$j]; - } - $ID++; - } - $Q[$ID]["X"] = $X2; $Q[$ID]["Y"] = $Y2; - - if ( !$NoDraw ) - { - /* Display the control points */ - if ( $ShowC && !$PathOnly ) - { - $Xv1 = floor($Xv1); $Yv1 = floor($Yv1); $Xv2 = floor($Xv2); $Yv2 = floor($Yv2); - - $this->drawLine($X1,$Y1,$X2,$Y2,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>30)); - - $MyMarkerSettings = array("R"=>255,"G"=>0,"B"=>0,"BorderR"=>255,"BorderB"=>255,"BorderG"=>255,"Size"=>4); - $this->drawRectangleMarker($Xv1,$Yv1,$MyMarkerSettings); - $this->drawText($Xv1+4,$Yv1,"v1"); - $MyMarkerSettings = array("R"=>0,"G"=>0,"B"=>255,"BorderR"=>255,"BorderB"=>255,"BorderG"=>255,"Size"=>4); - $this->drawRectangleMarker($Xv2,$Yv2,$MyMarkerSettings); - $this->drawText($Xv2+4,$Yv2,"v2"); - } - - /* Draw the bezier */ - $LastX = NULL; $LastY = NULL; $Cpt = NULL; $Mode = NULL; $ArrowS = NULL; - foreach ($Q as $Key => $Point) - { - $X = $Point["X"]; $Y = $Point["Y"]; - - /* Get the first segment */ - if ( $ArrowS == NULL && $LastX != NULL && $LastY != NULL ) - { $ArrowS["X2"] = $LastX; $ArrowS["Y2"] = $LastY; $ArrowS["X1"] = $X; $ArrowS["Y1"] = $Y; } - - if ( $LastX != NULL && $LastY != NULL && !$PathOnly) - list($Cpt,$Mode) = $this->drawLine($LastX,$LastY,$X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Cpt"=>$Cpt,"Mode"=>$Mode,"Weight"=>$Weight)); - - /* Get the last segment */ - $ArrowE["X1"] = $LastX; $ArrowE["Y1"] = $LastY; $ArrowE["X2"] = $X; $ArrowE["Y2"] = $Y; - - $LastX = $X; $LastY = $Y; - } - - if ( $DrawArrow && !$PathOnly ) - { - $ArrowSettings = array("FillR"=>$R,"FillG"=>$G,"FillB"=>$B,"Alpha"=>$Alpha,"Size"=>$ArrowSize,"Ratio"=>$ArrowRatio); - if ( $ArrowTwoHeads ) - $this->drawArrow($ArrowS["X1"],$ArrowS["Y1"],$ArrowS["X2"],$ArrowS["Y2"],$ArrowSettings); - - $this->drawArrow($ArrowE["X1"],$ArrowE["Y1"],$ArrowE["X2"],$ArrowE["Y2"],$ArrowSettings); - } - } - return($Q); - } - - /* Draw a line between two points */ - function drawLine($X1,$Y1,$X2,$Y2,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - $Cpt = isset($Format["Cpt"]) ? $Format["Cpt"] : 1; - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : 1; - $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; - - if ( $this->Antialias == FALSE && $Ticks == NULL ) - { - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$this->Shadowa); - imageline($this->Picture,$X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,$ShadowColor); - } - - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - imageline($this->Picture,$X1,$Y1,$X2,$Y2,$Color); - return(0); - } - - $Distance = sqrt(($X2-$X1)*($X2-$X1)+($Y2-$Y1)*($Y2-$Y1)); - if ( $Distance == 0 ) { return(-1); } - - /* Derivative algorithm for overweighted lines, re-route to polygons primitives */ - if ( $Weight != NULL ) - { - $Angle = $this->getAngle($X1,$Y1,$X2,$Y2); - $PolySettings = array ("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderAlpha"=>$Alpha); - - if ( $Ticks == NULL ) - { - $Points = ""; - $Points[] = cos(deg2rad($Angle-90)) * $Weight + $X1; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Y1; - $Points[] = cos(deg2rad($Angle+90)) * $Weight + $X1; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Y1; - $Points[] = cos(deg2rad($Angle+90)) * $Weight + $X2; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Y2; - $Points[] = cos(deg2rad($Angle-90)) * $Weight + $X2; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Y2; - - $this->drawPolygon($Points,$PolySettings); - } - else - { - for($i=0;$i<=$Distance;$i=$i+$Ticks*2) - { - $Xa = (($X2-$X1)/$Distance) * $i + $X1; $Ya = (($Y2-$Y1)/$Distance) * $i + $Y1; - $Xb = (($X2-$X1)/$Distance) * ($i+$Ticks) + $X1; $Yb = (($Y2-$Y1)/$Distance) * ($i+$Ticks) + $Y1; - - $Points = ""; - $Points[] = cos(deg2rad($Angle-90)) * $Weight + $Xa; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Ya; - $Points[] = cos(deg2rad($Angle+90)) * $Weight + $Xa; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Ya; - $Points[] = cos(deg2rad($Angle+90)) * $Weight + $Xb; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Yb; - $Points[] = cos(deg2rad($Angle-90)) * $Weight + $Xb; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Yb; - - $this->drawPolygon($Points,$PolySettings); - } - } - - return(1); - } - - $XStep = ($X2-$X1) / $Distance; - $YStep = ($Y2-$Y1) / $Distance; - - for($i=0;$i<=$Distance;$i++) - { - $X = $i * $XStep + $X1; - $Y = $i * $YStep + $Y1; - - if ( $Ticks != NULL ) - { - if ( $Cpt % $Ticks == 0 ) - { $Cpt = 0; if ( $Mode == 1 ) { $Mode = 0; } else { $Mode = 1; } } - - if ( $Mode == 1 ) - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - - $Cpt++; - } - else - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - } - return(array($Cpt,$Mode)); - } - - /* Draw a circle */ - function drawCircle($Xc,$Yc,$Height,$Width,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - - $Height = abs($Height); - $Width = abs($Width); - - if ( $Height == 0 ) { $Height = 1; } - if ( $Width == 0 ) { $Width = 1; } - $Xc = floor($Xc); $Yc = floor($Yc); - - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - $this->drawCircle($Xc+$this->ShadowX,$Yc+$this->ShadowY,$Height,$Width,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Ticks"=>$Ticks)); - } - - if ( $Width == 0 ) { $Width = $Height; } - if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } - if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } - if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } - - $Step = 360 / (2 * PI * max($Width,$Height)); - $Mode = 1; $Cpt = 1; - for($i=0;$i<=360;$i=$i+$Step) - { - $X = cos($i*PI/180) * $Height + $Xc; - $Y = sin($i*PI/180) * $Width + $Yc; - - if ( $Ticks != NULL ) - { - if ( $Cpt % $Ticks == 0 ) - { $Cpt = 0; if ( $Mode == 1 ) { $Mode = 0; } else { $Mode = 1; } } - - if ( $Mode == 1 ) - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - - $Cpt++; - } - else - $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - - } - $this->Shadow = $RestoreShadow; - } - - /* Draw a filled circle */ - function drawFilledCircle($X,$Y,$Radius,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - - if ( $Radius == 0 ) { $Radius = 1; } - if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - $X = floor($X); $Y = floor($Y); - - $Radius = abs($Radius); - - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - $this->drawFilledCircle($X+$this->ShadowX,$Y+$this->ShadowY,$Radius,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Ticks"=>$Ticks)); - } - - $this->Mask = ""; - $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - for ($i=0; $i<=$Radius*2; $i++) - { - $Slice = sqrt($Radius * $Radius - ($Radius - $i) * ($Radius - $i)); - $XPos = floor($Slice); - $YPos = $Y + $i - $Radius; - $AAlias = $Slice - floor($Slice); - - $this->Mask[$X-$XPos][$YPos] = TRUE; - $this->Mask[$X+$XPos][$YPos] = TRUE; - imageline($this->Picture,$X-$XPos,$YPos,$X+$XPos,$YPos,$Color); - } - if ( $this->Antialias ) - $this->drawCircle($X,$Y,$Radius,$Radius,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - - $this->Mask = ""; - - if ( $BorderR != -1 ) - $this->drawCircle($X,$Y,$Radius,$Radius,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$Ticks)); - - $this->Shadow = $RestoreShadow; - } - - /* Write text */ - function drawText($X,$Y,$Text,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : $this->FontColorR; - $G = isset($Format["G"]) ? $Format["G"] : $this->FontColorG; - $B = isset($Format["B"]) ? $Format["B"] : $this->FontColorB; - $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; - $Align = isset($Format["Align"]) ? $Format["Align"] : TEXT_ALIGN_BOTTOMLEFT; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : $this->FontColorA; - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; - $ShowOrigine = isset($Format["ShowOrigine"]) ? $Format["ShowOrigine"] : FALSE; - $TOffset = isset($Format["TOffset"]) ? $Format["TOffset"] : 2; - $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : FALSE; - $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : TRUE; - $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 6; - $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : FALSE; - $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 6; - $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 255; - $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 255; - $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 255; - $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 50; - $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; - $BoxBorderR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; - $BoxBorderG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; - $BoxBorderB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; - $BoxBorderAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 50; - $NoShadow = isset($Format["NoShadow"]) ? $Format["NoShadow"] : FALSE; - - $Shadow = $this->Shadow; - if ( $NoShadow ) { $this->Shadow = FALSE; } - - if ( $BoxSurrounding != "" ) { $BoxBorderR = $BoxR - $BoxSurrounding; $BoxBorderG = $BoxG - $BoxSurrounding; $BoxBorderB = $BoxB - $BoxSurrounding; $BoxBorderAlpha = $Boxalpha; } - - if ( $ShowOrigine ) - { - $MyMarkerSettings = array("R"=>255,"G"=>0,"B"=>0,"BorderR"=>255,"BorderB"=>255,"BorderG"=>255,"Size"=>4); - $this->drawRectangleMarker($X,$Y,$MyMarkerSettings); - } - - $TxtPos = $this->getTextBox($X,$Y,$FontName,$FontSize,$Angle,$Text); - - if ( $DrawBox && ($Angle == 0 || $Angle == 90 || $Angle == 180 || $Angle == 270)) - { - $T[0]["X"]=0;$T[0]["Y"]=0;$T[1]["X"]=0;$T[1]["Y"]=0;$T[2]["X"]=0;$T[2]["Y"]=0;$T[3]["X"]=0;$T[3]["Y"]=0; - if ( $Angle == 0 ) { $T[0]["X"]=-$TOffset;$T[0]["Y"]=$TOffset;$T[1]["X"]=$TOffset;$T[1]["Y"]=$TOffset;$T[2]["X"]=$TOffset;$T[2]["Y"]=-$TOffset;$T[3]["X"]=-$TOffset;$T[3]["Y"]=-$TOffset; } - - $X1 = min($TxtPos[0]["X"],$TxtPos[1]["X"],$TxtPos[2]["X"],$TxtPos[3]["X"]) - $BorderOffset + 3; - $Y1 = min($TxtPos[0]["Y"],$TxtPos[1]["Y"],$TxtPos[2]["Y"],$TxtPos[3]["Y"]) - $BorderOffset; - $X2 = max($TxtPos[0]["X"],$TxtPos[1]["X"],$TxtPos[2]["X"],$TxtPos[3]["X"]) + $BorderOffset + 3; - $Y2 = max($TxtPos[0]["Y"],$TxtPos[1]["Y"],$TxtPos[2]["Y"],$TxtPos[3]["Y"]) + $BorderOffset - 3; - - $X1 = $X1 - $TxtPos[$Align]["X"] + $X + $T[0]["X"]; - $Y1 = $Y1 - $TxtPos[$Align]["Y"] + $Y + $T[0]["Y"]; - $X2 = $X2 - $TxtPos[$Align]["X"] + $X + $T[0]["X"]; - $Y2 = $Y2 - $TxtPos[$Align]["Y"] + $Y + $T[0]["Y"]; - - $Settings = array("R"=>$BoxR,"G"=>$BoxG,"B"=>$BoxB,"Alpha"=>$BoxAlpha,"BorderR"=>$BoxBorderR,"BorderG"=>$BoxBorderG,"BorderB"=>$BoxBorderB,"BorderAlpha"=>$BoxBorderAlpha); - - if ( $BoxRounded ) - { $this->drawRoundedFilledRectangle($X1,$Y1,$X2,$Y2,$RoundedRadius,$Settings); } - else - { $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Settings); } - } - - $X = $X - $TxtPos[$Align]["X"] + $X; - $Y = $Y - $TxtPos[$Align]["Y"] + $Y; - - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $C_ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$this->Shadowa); - imagettftext($this->Picture,$FontSize,$Angle,$X+$this->ShadowX,$Y+$this->ShadowY,$C_ShadowColor,$FontName,$Text); - } - - $C_TextColor = $this->AllocateColor($this->Picture,$R,$G,$B,$Alpha); - imagettftext($this->Picture,$FontSize,$Angle,$X,$Y,$C_TextColor,$FontName,$Text); - - $this->Shadow = $Shadow; - - return($TxtPos); - } - - /* Draw a gradient within a defined area */ - function drawGradientArea($X1,$Y1,$X2,$Y2,$Direction,$Format="") - { - $StartR = isset($Format["StartR"]) ? $Format["StartR"] : 90; - $StartG = isset($Format["StartG"]) ? $Format["StartG"] : 90; - $StartB = isset($Format["StartB"]) ? $Format["StartB"] : 90; - $EndR = isset($Format["EndR"]) ? $Format["EndR"] : 0; - $EndG = isset($Format["EndG"]) ? $Format["EndG"] : 0; - $EndB = isset($Format["EndB"]) ? $Format["EndB"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Levels = isset($Format["Levels"]) ? $Format["Levels"] : NULL; - - $Shadow = $this->Shadow; - $this->Shadow = FALSE; - - if ( $StartR == $EndR && $StartG == $EndG && $StartB == $EndB ) - { - $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,array("R"=>$StartR,"G"=>$StartG,"B"=>$StartB,"Alpha"=>$Alpha)); - return(0); - } - - if ( $Levels != NULL ) - { $EndR=$StartR+$Levels; $EndG=$StartG+$Levels; $EndB=$StartB+$Levels; } - - if ($X1 > $X2) { list($X1, $X2) = array($X2, $X1); } - if ($Y1 > $Y2) { list($Y1, $Y2) = array($Y2, $Y1); } - - if ( $Direction == DIRECTION_VERTICAL ) { $Width = abs($Y2-$Y1); } - if ( $Direction == DIRECTION_HORIZONTAL ) { $Width = abs($X2-$X1); } - - $Step = max(abs($EndR-$StartR),abs($EndG-$StartG),abs($EndB-$StartB)); - $StepSize = $Width/$Step; - $RStep = ($EndR-$StartR)/$Step; - $GStep = ($EndG-$StartG)/$Step; - $BStep = ($EndB-$StartB)/$Step; - - $R=$StartR;$G=$StartG;$B=$StartB; - switch($Direction) - { - case DIRECTION_VERTICAL: - $StartY = $Y1; $EndY = floor($Y2)+1; $LastY2 = $StartY; - for($i=0;$i<=$Step;$i++) - { - $Y2 = floor($StartY + ($i * $StepSize)); - - if ($Y2 > $EndY) { $Y2 = $EndY; } - if (($Y1 != $Y2 && $Y1 < $Y2) || $Y2 == $EndY) - { - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); - $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); - $LastY2 = max($LastY2,$Y2); - $Y1 = $Y2+1; - } - $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; - } - if ( $LastY2 < $EndY && isset($Color)) { for ($i=$LastY2+1;$i<=$EndY;$i++) { $this->drawLine($X1,$i,$X2,$i,$Color); } } - break; - - case DIRECTION_HORIZONTAL: - $StartX = $X1; $EndX = $X2; - for($i=0;$i<=$Step;$i++) - { - $X2 = floor($StartX + ($i * $StepSize)); - - if ($X2 > $EndX) { $X2 = $EndX; } - if (($X1 != $X2 && $X1 < $X2) || $X2 == $EndX) - { - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); - $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); - $X1 = $X2+1; - } - $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; - } - if ( $X2 < $EndX && isset($Color)) { $this->drawFilledRectangle($X2,$Y1,$EndX,$Y2,$Color); } - break; - } - - $this->Shadow = $Shadow; - - } - - /* Draw an aliased pixel */ - function drawAntialiasPixel($X,$Y,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - - if ( $X < 0 || $Y < 0 || $X >= $this->XSize || $Y >= $this->YSize ) - return(-1); - - if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } - if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } - if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } - - if ( !$this->Antialias ) - { - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$this->Shadowa); - imagesetpixel($this->Picture,$X+$this->ShadowX,$Y+$this->ShadowY,$ShadowColor); - } - - $PlotColor = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - imagesetpixel($this->Picture,$X,$Y,$PlotColor); - - return(0); - } - - $Plot = ""; - $Xi = floor($X); - $Yi = floor($Y); - - if ( $Xi == $X && $Yi == $Y) - { - if ( $Alpha == 100 ) - $this->drawAlphaPixel($X,$Y,100,$R,$G,$B); - else - $this->drawAlphaPixel($X,$Y,$Alpha,$R,$G,$B); - } - else - { - $Alpha1 = (((1 - ($X - floor($X))) * (1 - ($Y - floor($Y))) * 100) / 100) * $Alpha; - if ( $Alpha1 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi,$Yi,$Alpha1,$R,$G,$B); } - - $Alpha2 = ((($X - floor($X)) * (1 - ($Y - floor($Y))) * 100) / 100) * $Alpha; - if ( $Alpha2 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi+1,$Yi,$Alpha2,$R,$G,$B); } - - $Alpha3 = (((1 - ($X - floor($X))) * ($Y - floor($Y)) * 100) / 100) * $Alpha; - if ( $Alpha3 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi,$Yi+1,$Alpha3,$R,$G,$B); } - - $Alpha4 = ((($X - floor($X)) * ($Y - floor($Y)) * 100) / 100) * $Alpha; - if ( $Alpha4 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi+1,$Yi+1,$Alpha4,$R,$G,$B); } - } - } - - /* Draw a semi-transparent pixel */ - function drawAlphaPixel($X,$Y,$Alpha,$R,$G,$B) - { - if ( isset($this->Mask[$X])) { if ( isset($this->Mask[$X][$Y]) ) { return(0); } } - - if ( $X < 0 || $Y < 0 || $X >= $this->XSize || $Y >= $this->YSize ) - return(-1); - - if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } - if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } - if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } - - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $AlphaFactor = floor(($Alpha / 100) * $this->Shadowa); - $ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$AlphaFactor); - imagesetpixel($this->Picture,$X+$this->ShadowX,$Y+$this->ShadowY,$ShadowColor); - } - - $C_Aliased = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); - imagesetpixel($this->Picture,$X,$Y,$C_Aliased); - } - - /* Convert apha to base 10 */ - function convertAlpha($AlphaValue) - { return((127/100)*(100-$AlphaValue)); } - - /* Allocate a color with transparency */ - function allocateColor($Picture,$R,$G,$B,$Alpha=100) - { - if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } - if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } - if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } - if ( $Alpha < 0 ) { $Alpha = 0; } - if ( $Alpha > 100) { $Alpha = 100; } - - $Alpha = $this->convertAlpha($Alpha); - return(imagecolorallocatealpha($Picture,$R,$G,$B,$Alpha)); - } - - /* Load a PNG file and draw it over the chart */ - function drawFromPNG($X,$Y,$FileName) - { $this->drawFromPicture(1,$FileName,$X,$Y); } - - /* Load a GIF file and draw it over the chart */ - function drawFromGIF($X,$Y,$FileName) - { $this->drawFromPicture(2,$FileName,$X,$Y); } - - /* Load a JPEG file and draw it over the chart */ - function drawFromJPG($X,$Y,$FileName) - { $this->drawFromPicture(3,$FileName,$X,$Y); } - - function getPicInfo($FileName) - { - $Infos = getimagesize($FileName); - $Width = $Infos[0]; - $Height = $Infos[1]; - $Type = $Infos["mime"]; - - if ( $Type == "image/png") { $Type = 1; } - if ( $Type == "image/gif") { $Type = 2; } - if ( $Type == "image/jpeg ") { $Type = 3; } - - return(array($Width,$Height,$Type)); - } - - /* Generic loader function for external pictures */ - function drawFromPicture($PicType,$FileName,$X,$Y) - { - if ( file_exists($FileName)) - { - list($Width,$Height) = $this->getPicInfo($FileName); - - if ( $PicType == 1 ) - { $Raster = imagecreatefrompng($FileName); } - elseif ( $PicType == 2 ) - { $Raster = imagecreatefromgif($FileName); } - elseif ( $PicType == 3 ) - { $Raster = imagecreatefromjpeg($FileName); } - else - { return(0); } - - - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - if ( $PicType == 3 ) - $this->drawFilledRectangle($X+$this->ShadowX,$Y+$this->ShadowY,$X+$Width+$this->ShadowX,$Y+$Height+$this->ShadowY,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); - else - { - $TranparentID = imagecolortransparent($Raster); - for ($Xc=0;$Xc<=$Width-1;$Xc++) - { - for ($Yc=0;$Yc<=$Height-1;$Yc++) - { - $RGBa = imagecolorat($Raster,$Xc,$Yc); - $Values = imagecolorsforindex($Raster,$RGBa); - if ( $Values["alpha"] < 120 ) - { - $AlphaFactor = floor(($this->Shadowa / 100) * ((100 / 127) * (127-$Values["alpha"]))); - $this->drawAlphaPixel($X+$Xc+$this->ShadowX,$Y+$Yc+$this->ShadowY,$AlphaFactor,$this->ShadowR,$this->ShadowG,$this->ShadowB); - } - } - } - } - } - $this->Shadow = $RestoreShadow; - - imagecopy($this->Picture,$Raster,$X,$Y,0,0,$Width,$Height); - imagedestroy($Raster); - } - } - - /* Draw an arrow */ - function drawArrow($X1,$Y1,$X2,$Y2,$Format="") - { - $FillR = isset($Format["FillR"]) ? $Format["FillR"] : 0; - $FillG = isset($Format["FillG"]) ? $Format["FillG"] : 0; - $FillB = isset($Format["FillB"]) ? $Format["FillB"] : 0; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $FillR; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $FillG; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $FillB; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Size = isset($Format["Size"]) ? $Format["Size"] : 10; - $Ratio = isset($Format["Ratio"]) ? $Format["Ratio"] : .5; - $TwoHeads = isset($Format["TwoHeads"]) ? $Format["TwoHeads"] : FALSE; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : FALSE; - - /* Calculate the line angle */ - $Angle = $this->getAngle($X1,$Y1,$X2,$Y2); - - /* Override Shadow support, this will be managed internally */ - $RestoreShadow = $this->Shadow; - if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) - { - $this->Shadow = FALSE; - $this->drawArrow($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,array("FillR"=>$this->ShadowR,"FillG"=>$this->ShadowG,"FillB"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Size"=>$Size,"Ratio"=>$Ratio,"TwoHeads"=>$TwoHeads,"Ticks"=>$Ticks)); - } - - /* Draw the 1st Head */ - $TailX = cos(($Angle-180)*PI/180)*$Size+$X2; - $TailY = sin(($Angle-180)*PI/180)*$Size+$Y2; - - $Points = ""; - $Points[] = $X2; $Points[] = $Y2; - $Points[] = cos(($Angle-90)*PI/180)*$Size*$Ratio+$TailX; $Points[] = sin(($Angle-90)*PI/180)*$Size*$Ratio+$TailY; - $Points[] = cos(($Angle-270)*PI/180)*$Size*$Ratio+$TailX; $Points[] = sin(($Angle-270)*PI/180)*$Size*$Ratio+$TailY; - $Points[] = $X2; $Points[] = $Y2; - - /* Visual correction */ - if ($Angle == 180 || $Angle == 360 ) { $Points[4] = $Points[2]; } - if ($Angle == 90 || $Angle == 270 ) { $Points[5] = $Points[3]; } - - $ArrowColor = $this->allocateColor($this->Picture,$FillR,$FillG,$FillB,$Alpha); - ImageFilledPolygon($this->Picture,$Points,4,$ArrowColor); - - $this->drawLine($Points[0],$Points[1],$Points[2],$Points[3],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - $this->drawLine($Points[2],$Points[3],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - $this->drawLine($Points[0],$Points[1],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - - /* Draw the second head */ - if ( $TwoHeads ) - { - $Angle = $this->getAngle($X2,$Y2,$X1,$Y1); - - $TailX2 = cos(($Angle-180)*PI/180)*$Size+$X1; - $TailY2 = sin(($Angle-180)*PI/180)*$Size+$Y1; - - $Points = ""; - $Points[] = $X1; $Points[] = $Y1; - $Points[] = cos(($Angle-90)*PI/180)*$Size*$Ratio+$TailX2; $Points[] = sin(($Angle-90)*PI/180)*$Size*$Ratio+$TailY2; - $Points[] = cos(($Angle-270)*PI/180)*$Size*$Ratio+$TailX2; $Points[] = sin(($Angle-270)*PI/180)*$Size*$Ratio+$TailY2; - $Points[] = $X1; $Points[] = $Y1; - - /* Visual correction */ - if ($Angle == 180 || $Angle == 360 ) { $Points[4] = $Points[2]; } - if ($Angle == 90 || $Angle == 270 ) { $Points[5] = $Points[3]; } - - $ArrowColor = $this->allocateColor($this->Picture,$FillR,$FillG,$FillB,$Alpha); - ImageFilledPolygon($this->Picture,$Points,4,$ArrowColor); - - $this->drawLine($Points[0],$Points[1],$Points[2],$Points[3],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - $this->drawLine($Points[2],$Points[3],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - $this->drawLine($Points[0],$Points[1],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - - $this->drawLine($TailX,$TailY,$TailX2,$TailY2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - else - $this->drawLine($X1,$Y1,$TailX,$TailY,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - - /* Re-enable shadows */ - $this->Shadow = $RestoreShadow; - } - - /* Draw a label with associated arrow */ - function drawArrowLabel($X1,$Y1,$Text,$Format="") - { - $FillR = isset($Format["FillR"]) ? $Format["FillR"] : 0; - $FillG = isset($Format["FillG"]) ? $Format["FillG"] : 0; - $FillB = isset($Format["FillB"]) ? $Format["FillB"] : 0; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $FillR; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $FillG; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $FillB; - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Length = isset($Format["Length"]) ? $Format["Length"] : 50; - $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 315; - $Size = isset($Format["Size"]) ? $Format["Size"] : 10; - $Position = isset($Format["Position"]) ? $Format["Position"] : POSITION_TOP; - $RoundPos = isset($Format["RoundPos"]) ? $Format["RoundPos"] : FALSE; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; - - $Angle = $Angle % 360; - - $X2 = sin(($Angle+180)*PI/180)*$Length+$X1; - $Y2 = cos(($Angle+180)*PI/180)*$Length+$Y1; - - if ( $RoundPos && $Angle > 0 && $Angle < 180 ) { $Y2 = ceil($Y2); } - if ( $RoundPos && $Angle > 180 ) { $Y2 = floor($Y2); } - - $this->drawArrow($X2,$Y2,$X1,$Y1,$Format); - - $Size = imagettfbbox($FontSize,0,$FontName,$Text); - $TxtWidth = max(abs($Size[2]-$Size[0]),abs($Size[0]-$Size[6])); - $TxtHeight = max(abs($Size[1]-$Size[7]),abs($Size[3]-$Size[1])); - - if ( $Angle > 0 && $Angle < 180 ) - { - $this->drawLine($X2,$Y2,$X2-$TxtWidth,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - if ( $Position == POSITION_TOP ) - $this->drawText($X2,$Y2-2,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Align"=>TEXT_ALIGN_BOTTOMRIGHT)); - else - $this->drawText($X2,$Y2+4,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Align"=>TEXT_ALIGN_TOPRIGHT)); - } - else - { - $this->drawLine($X2,$Y2,$X2+$TxtWidth,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - if ( $Position == POSITION_TOP ) - $this->drawText($X2,$Y2-2,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); - else - $this->drawText($X2,$Y2+4,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Align"=>TEXT_ALIGN_TOPLEFT)); - } - } - - /* Draw a progress bar filled with specified % */ - function drawProgress($X,$Y,$Percent,$Format="") - { - if ( $Percent > 100 ) { $Percent = 100; } - if ( $Percent < 0 ) { $Percent = 0; } - - $Width = isset($Format["Width"]) ? $Format["Width"] : 200; - $Height = isset($Format["Height"]) ? $Format["Height"] : 20; - $Orientation = isset($Format["Orientation"]) ? $Format["Orientation"] : ORIENTATION_HORIZONTAL; - $ShowLabel = isset($Format["ShowLabel"]) ? $Format["ShowLabel"] : FALSE; - $LabelPos = isset($Format["LabelPos"]) ? $Format["LabelPos"] : LABEL_POS_INSIDE; - $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 10; - $R = isset($Format["R"]) ? $Format["R"] : 130; - $G = isset($Format["G"]) ? $Format["G"] : 130; - $B = isset($Format["B"]) ? $Format["B"] : 130; - $RFade = isset($Format["RFade"]) ? $Format["RFade"] : -1; - $GFade = isset($Format["GFade"]) ? $Format["GFade"] : -1; - $BFade = isset($Format["BFade"]) ? $Format["BFade"] : -1; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; - $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 0; - $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 0; - $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 0; - $BoxBackR = isset($Format["BoxBackR"]) ? $Format["BoxBackR"] : 255; - $BoxBackG = isset($Format["BoxBackG"]) ? $Format["BoxBackG"] : 255; - $BoxBackB = isset($Format["BoxBackB"]) ? $Format["BoxBackB"] : 255; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : NULL; - $NoAngle = isset($Format["NoAngle"]) ? $Format["NoAngle"] : FALSE; - - if ( $RFade != -1 && $GFade != -1 && $BFade != -1 ) - { - $RFade = (($RFade-$R)/100)*$Percent+$R; - $GFade = (($GFade-$G)/100)*$Percent+$G; - $BFade = (($BFade-$B)/100)*$Percent+$B; - } - - if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } - if ( $BoxSurrounding != NULL ) { $BoxBorderR = $BoxBackR + $Surrounding; $BoxBorderG = $BoxBackG + $Surrounding; $BoxBorderB = $BoxBackB + $Surrounding; } - - if ( $Orientation == ORIENTATION_VERTICAL ) - { - $InnerHeight = (($Height-2)/100)*$Percent; - $this->drawFilledRectangle($X,$Y,$X+$Width,$Y-$Height,array("R"=>$BoxBackR,"G"=>$BoxBackG,"B"=>$BoxBackB,"BorderR"=>$BoxBorderR,"BorderG"=>$BoxBorderG,"BorderB"=>$BoxBorderB,"NoAngle"=>$NoAngle)); - - $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; - if ( $RFade != -1 && $GFade != -1 && $BFade != -1 ) - { - $GradientOptions = array("StartR"=>$RFade,"StartG"=>$GFade,"StartB"=>$BFade,"EndR"=>$R,"EndG"=>$G,"EndB"=>$B); - $this->drawGradientArea($X+1,$Y-1,$X+$Width-1,$Y-$InnerHeight,DIRECTION_VERTICAL,$GradientOptions); - - if ( $Surrounding ) - $this->drawRectangle($X+1,$Y-1,$X+$Width-1,$Y-$InnerHeight,array("R"=>255,"G"=>255,"B"=>255,"Alpha"=>$Surrounding)); - } - else - $this->drawFilledRectangle($X+1,$Y-1,$X+$Width-1,$Y-$InnerHeight,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - - $this->Shadow = $RestoreShadow; - - if ( $ShowLabel && $LabelPos == LABEL_POS_BOTTOM ) { $this->drawText($X+($Width/2),$Y+$Margin,$Percent."%",array("Align"=>TEXT_ALIGN_TOPMIDDLE)); } - if ( $ShowLabel && $LabelPos == LABEL_POS_TOP ) { $this->drawText($X+($Width/2),$Y-$Height-$Margin,$Percent."%",array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } - if ( $ShowLabel && $LabelPos == LABEL_POS_INSIDE ) { $this->drawText($X+($Width/2),$Y-$InnerHeight-$Margin,$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLELEFT,"Angle"=>90)); } - if ( $ShowLabel && $LabelPos == LABEL_POS_CENTER ) { $this->drawText($X+($Width/2),$Y-($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"Angle"=>90)); } - } - else - { - if ( $Percent == 100 ) - $InnerWidth = $Width-1; - else - $InnerWidth = (($Width-2)/100)*$Percent; - - $this->drawFilledRectangle($X,$Y,$X+$Width,$Y+$Height,array("R"=>$BoxBackR,"G"=>$BoxBackG,"B"=>$BoxBackB,"BorderR"=>$BoxBorderR,"BorderG"=>$BoxBorderG,"BorderB"=>$BoxBorderB,"NoAngle"=>$NoAngle)); - - $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; - if ( $RFade != -1 && $GFade != -1 && $BFade != -1 ) - { - $GradientOptions = array("StartR"=>$R,"StartG"=>$G,"StartB"=>$B,"EndR"=>$RFade,"EndG"=>$GFade,"EndB"=>$BFade); - $this->drawGradientArea($X+1,$Y+1,$X+$InnerWidth,$Y+$Height-1,DIRECTION_HORIZONTAL,$GradientOptions); - - if ( $Surrounding ) - $this->drawRectangle($X+1,$Y+1,$X+$InnerWidth,$Y+$Height-1,array("R"=>255,"G"=>255,"B"=>255,"Alpha"=>$Surrounding)); - } - else - $this->drawFilledRectangle($X+1,$Y+1,$X+$InnerWidth,$Y+$Height-1,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - - $this->Shadow = $RestoreShadow; - - if ( $ShowLabel && $LabelPos == LABEL_POS_LEFT ) { $this->drawText($X-$Margin,$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); } - if ( $ShowLabel && $LabelPos == LABEL_POS_RIGHT ) { $this->drawText($X+$Width+$Margin,$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } - if ( $ShowLabel && $LabelPos == LABEL_POS_CENTER ) { $this->drawText($X+($Width/2),$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); } - if ( $ShowLabel && $LabelPos == LABEL_POS_INSIDE ) { $this->drawText($X+$InnerWidth+$Margin,$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } - } - } - - /* Get the legend box size */ - function getLegendSize($Format="") - { - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; - $BoxSize = isset($Format["BoxSize"]) ? $Format["BoxSize"] : 5; - $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; - $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; - $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 5; - $BoxHeight = isset($Format["BoxHeight"]) ? $Format["BoxHeight"] : 5; - $IconAreaWidth = isset($Format["IconAreaWidth"]) ? $Format["IconAreaWidth"] : $BoxWidth; - $IconAreaHeight = isset($Format["IconAreaHeight"]) ? $Format["IconAreaHeight"] : $BoxHeight; - $XSpacing = isset($Format["XSpacing"]) ? $Format["XSpacing"] : 5; - - $Data = $this->DataSet->getData(); - - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] && isset($Serie["Picture"])) - { - list($PicWidth,$PicHeight) = $this->getPicInfo($Serie["Picture"]); - if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } - if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } - } - } - - $YStep = max($this->FontSize,$IconAreaHeight) + 5; - $XStep = $IconAreaWidth + 5; - $XStep = $XSpacing; - - $X=100; $Y=100; - - $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - if ( $Mode == LEGEND_VERTICAL ) - { - $BoxArray = $this->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Serie["Description"]); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Lines = preg_split("/\n/",$Serie["Description"]); - $vY = $vY + max($this->FontSize*count($Lines),$IconAreaHeight) + 5; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - $Lines = preg_split("/\n/",$Serie["Description"]); - $Width = ""; - foreach($Lines as $Key => $Value) - { - $BoxArray = $this->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Width[] = $BoxArray[1]["X"]; - } - - $vX=max($Width)+$XStep; - } - } - } - $vY=$vY-$YStep; $vX=$vX-$XStep; - - $TopOffset = $Y - $Boundaries["T"]; - if ( $Boundaries["B"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries["B"] = $vY+$IconAreaHeight+$TopOffset; } - - $Width = ($Boundaries["R"]+$Margin) - ($Boundaries["L"]-$Margin); - $Height = ($Boundaries["B"]+$Margin) - ($Boundaries["T"]-$Margin); - - return(array("Width"=>$Width,"Height"=>$Height)); - } - - /* Draw the legend of the active series */ - function drawLegend($X,$Y,$Format="") - { - $Family = isset($Format["Family"]) ? $Format["Family"] : LEGEND_FAMILY_BOX; - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; - $FontR = isset($Format["FontR"]) ? $Format["FontR"] : $this->FontColorR; - $FontG = isset($Format["FontG"]) ? $Format["FontG"] : $this->FontColorG; - $FontB = isset($Format["FontB"]) ? $Format["FontB"] : $this->FontColorB; - $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 5; - $BoxHeight = isset($Format["BoxHeight"]) ? $Format["BoxHeight"] : 5; - $IconAreaWidth = isset($Format["IconAreaWidth"]) ? $Format["IconAreaWidth"] : $BoxWidth; - $IconAreaHeight = isset($Format["IconAreaHeight"]) ? $Format["IconAreaHeight"] : $BoxHeight; - $XSpacing = isset($Format["XSpacing"]) ? $Format["XSpacing"] : 5; - $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; - $R = isset($Format["R"]) ? $Format["R"] : 200; - $G = isset($Format["G"]) ? $Format["G"] : 200; - $B = isset($Format["B"]) ? $Format["B"] : 200; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; - - if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } - - $Data = $this->DataSet->getData(); - - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] && isset($Serie["Picture"])) - { - list($PicWidth,$PicHeight) = $this->getPicInfo($Serie["Picture"]); - if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } - if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } - } - } - - - $YStep = max($this->FontSize,$IconAreaHeight) + 5; - $XStep = $IconAreaWidth + 5; - $XStep = $XSpacing; - - $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - if ( $Mode == LEGEND_VERTICAL ) - { - $BoxArray = $this->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Serie["Description"]); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Lines = preg_split("/\n/",$Serie["Description"]); - $vY = $vY + max($this->FontSize*count($Lines),$IconAreaHeight) + 5; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - $Lines = preg_split("/\n/",$Serie["Description"]); - $Width = ""; - foreach($Lines as $Key => $Value) - { - $BoxArray = $this->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Width[] = $BoxArray[1]["X"]; - } - - $vX=max($Width)+$XStep; - } - } - } - $vY=$vY-$YStep; $vX=$vX-$XStep; - - $TopOffset = $Y - $Boundaries["T"]; - if ( $Boundaries["B"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries["B"] = $vY+$IconAreaHeight+$TopOffset; } - - if ( $Style == LEGEND_ROUND ) - $this->drawRoundedFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - elseif ( $Style == LEGEND_BOX ) - $this->drawFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - - $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; - $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; - - if ( isset($Serie["Picture"]) ) - { - $Picture = $Serie["Picture"]; - list($PicWidth,$PicHeight) = $this->getPicInfo($Picture); - $PicX = $X+$IconAreaWidth/2; $PicY = $Y+$IconAreaHeight/2; - - $this->drawFromPNG($PicX-$PicWidth/2,$PicY-$PicHeight/2,$Picture); - } - else - { - if ( $Family == LEGEND_FAMILY_BOX ) - { - if ( $BoxWidth != $IconAreaWidth ) { $XOffset = floor(($IconAreaWidth-$BoxWidth)/2); } else { $XOffset = 0; } - if ( $BoxHeight != $IconAreaHeight ) { $YOffset = floor(($IconAreaHeight-$BoxHeight)/2); } else { $YOffset = 0; } - - $this->drawFilledRectangle($X+1+$XOffset,$Y+1+$YOffset,$X+$BoxWidth+$XOffset+1,$Y+$BoxHeight+1+$YOffset,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); - $this->drawFilledRectangle($X+$XOffset,$Y+$YOffset,$X+$BoxWidth+$XOffset,$Y+$BoxHeight+$YOffset,array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); - } - elseif ( $Family == LEGEND_FAMILY_CIRCLE ) - { - $this->drawFilledCircle($X+1+$IconAreaWidth/2,$Y+1+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); - $this->drawFilledCircle($X+$IconAreaWidth/2,$Y+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); - } - elseif ( $Family == LEGEND_FAMILY_LINE ) - { - $this->drawLine($X+1,$Y+1+$IconAreaHeight/2,$X+1+$IconAreaWidth,$Y+1+$IconAreaHeight/2,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20,"Ticks"=>$Ticks,"Weight"=>$Weight)); - $this->drawLine($X,$Y+$IconAreaHeight/2,$X+$IconAreaWidth,$Y+$IconAreaHeight/2,array("R"=>$R,"G"=>$G,"B"=>$B,"Ticks"=>$Ticks,"Weight"=>$Weight)); - } - } - - if ( $Mode == LEGEND_VERTICAL ) - { - $Lines = preg_split("/\n/",$Serie["Description"]); - foreach($Lines as $Key => $Value) - $this->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); - - $Y=$Y+max($this->FontSize*count($Lines),$IconAreaHeight) + 5; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - $Lines = preg_split("/\n/",$Serie["Description"]); - $Width = ""; - foreach($Lines as $Key => $Value) - { - $BoxArray = $this->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); - $Width[] = $BoxArray[1]["X"]; - } - $X=max($Width)+2+$XStep; - } - } - } - - - $this->Shadow = $RestoreShadow; - } - - function drawScale($Format="") - { - $Pos = isset($Format["Pos"]) ? $Format["Pos"] : SCALE_POS_LEFTRIGHT; - $Floating = isset($Format["Floating"]) ? $Format["Floating"] : FALSE; - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : SCALE_MODE_FLOATING; - $MinDivHeight = isset($Format["MinDivHeight"]) ? $Format["MinDivHeight"] : 20; - $Factors = isset($Format["Factors"]) ? $Format["Factors"] : array(1,2,5); - $ManualScale = isset($Format["ManualScale"]) ? $Format["ManualScale"] : array("0"=>array("Min"=>-100,"Max"=>100)); - $XMargin = isset($Format["XMargin"]) ? $Format["XMargin"] : AUTO; - $YMargin = isset($Format["YMargin"]) ? $Format["YMargin"] : 0; - $ScaleSpacing = isset($Format["ScaleSpacing"]) ? $Format["ScaleSpacing"] : 15; - $InnerTickWidth = isset($Format["InnerTickWidth"]) ? $Format["InnerTickWidth"] : 2; - $OuterTickWidth = isset($Format["OuterTickWidth"]) ? $Format["OuterTickWidth"] : 2; - $DrawXLines = isset($Format["DrawXLines"]) ? $Format["DrawXLines"] : TRUE; - $DrawYLines = isset($Format["DrawYLines"]) ? $Format["DrawYLines"] : ALL; - $AvoidGridWhenEmpty = isset($Format["AvoidGridWhenEmpty"]) ? $Format["AvoidGridWhenEmpty"] : FALSE; - $GridTicks = isset($Format["GridTicks"]) ? $Format["GridTicks"] : 4; - $GridR = isset($Format["GridR"]) ? $Format["GridR"] : 255; - $GridG = isset($Format["GridG"]) ? $Format["GridG"] : 255; - $GridB = isset($Format["GridB"]) ? $Format["GridB"] : 255; - $GridAlpha = isset($Format["GridAlpha"]) ? $Format["GridAlpha"] : 40; - $AxisRo = isset($Format["AxisR"]) ? $Format["AxisR"] : 0; - $AxisGo = isset($Format["AxisG"]) ? $Format["AxisG"] : 0; - $AxisBo = isset($Format["AxisB"]) ? $Format["AxisB"] : 0; - $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 100; - $AvoidTickWhenEmpty = isset($Format["AvoidTickWhenEmpty"]) ? $Format["AvoidTickWhenEmpty"] : FALSE; - $TickRo = isset($Format["TickR"]) ? $Format["TickR"] : 0; - $TickGo = isset($Format["TickG"]) ? $Format["TickG"] : 0; - $TickBo = isset($Format["TickB"]) ? $Format["TickB"] : 0; - $TickAlpha = isset($Format["TickAlpha"]) ? $Format["TickAlpha"] : 100; - $DrawSubTicks = isset($Format["DrawSubTicks"]) ? $Format["DrawSubTicks"] : FALSE; - $InnerSubTickWidth = isset($Format["InnerSubTickWidth"]) ? $Format["InnerSubTickWidth"] : 0; - $OuterSubTickWidth = isset($Format["OuterSubTickWidth"]) ? $Format["OuterSubTickWidth"] : 2; - $SubTickR = isset($Format["SubTickR"]) ? $Format["SubTickR"] : 255; - $SubTickG = isset($Format["SubTickG"]) ? $Format["SubTickG"] : 0; - $SubTickB = isset($Format["SubTickB"]) ? $Format["SubTickB"] : 0; - $SubTickAlpha = isset($Format["SubTickAlpha"]) ? $Format["SubTickAlpha"] : 100; - $AutoAxisLabels = isset($Format["AutoAxisLabels"]) ? $Format["AutoAxisLabels"] : TRUE; - $XReleasePercent = isset($Format["XReleasePercent"]) ? $Format["XReleasePercent"] : 1; - $DrawArrows = isset($Format["DrawArrows"]) ? $Format["DrawArrows"] : FALSE; - $ArrowSize = isset($Format["ArrowSize"]) ? $Format["ArrowSize"] : 8; - $CycleBackground = isset($Format["CycleBackground"]) ? $Format["CycleBackground"] : FALSE; - $BackgroundR1 = isset($Format["BackgroundR1"]) ? $Format["BackgroundR1"] : 255; - $BackgroundG1 = isset($Format["BackgroundG1"]) ? $Format["BackgroundG1"] : 255; - $BackgroundB1 = isset($Format["BackgroundB1"]) ? $Format["BackgroundB1"] : 255; - $BackgroundAlpha1 = isset($Format["BackgroundAlpha1"]) ? $Format["BackgroundAlpha1"] : 20; - $BackgroundR2 = isset($Format["BackgroundR2"]) ? $Format["BackgroundR2"] : 230; - $BackgroundG2 = isset($Format["BackgroundG2"]) ? $Format["BackgroundG2"] : 230; - $BackgroundB2 = isset($Format["BackgroundB2"]) ? $Format["BackgroundB2"] : 230; - $BackgroundAlpha2 = isset($Format["BackgroundAlpha2"]) ? $Format["BackgroundAlpha2"] : 20; - $LabelingMethod = isset($Format["LabelingMethod"]) ? $Format["LabelingMethod"] : LABELING_ALL; - $LabelSkip = isset($Format["LabelSkip"]) ? $Format["LabelSkip"] : 1; - $TicksFontSize = isset($Format["TicksFontSize"]) ? $Format["TicksFontSize"] : $this->FontSize; - $LabelRotation = isset($Format["LabelRotation"]) ? $Format["LabelRotation"] : 0; - $LabelValuesRotation = isset($Format["LabelValuesRotation"]) ? $Format["LabelValuesRotation"] : 0; - $SkippedAxisTicks = isset($Format["SkippedAxisTicks"]) ? $Format["SkippedAxisTicks"] : $GridTicks+2; - $SkippedAxisR = isset($Format["SkippedAxisR"]) ? $Format["SkippedAxisR"] : $GridR; - $SkippedAxisG = isset($Format["SkippedAxisG"]) ? $Format["SkippedAxisG"] : $GridG; - $SkippedAxisB = isset($Format["SkippedAxisB"]) ? $Format["SkippedAxisB"] : $GridB; - $SkippedAxisAlpha = isset($Format["SkippedAxisAlpha"]) ? $Format["SkippedAxisAlpha"] : $GridAlpha-30; - $SkippedTickR = isset($Format["SkippedTickR"]) ? $Format["SkippedTickR"] : $TickRo; - $SkippedTickG = isset($Format["SkippedTickG"]) ? $Format["SkippedTickG"] : $TickGo; - $SkippedTickB = isset($Format["SkippedTicksB"]) ? $Format["SkippedTickB"] : $TickBo; - $SkippedTickAlpha = isset($Format["SkippedTickAlpha"]) ? $Format["SkippedTickAlpha"] : $TickAlpha-80; - $SkippedInnerTickWidth = isset($Format["SkippedInnerTickWidth"]) ? $Format["SkippedInnerTickWidth"] : 0; - $SkippedOuterTickWidth = isset($Format["SkippedOuterTickWidth"]) ? $Format["SkippedOuterTickWidth"] : 2; - $ScaleModeAuto = isset($Format["ScaleModeAuto"]) ? $Format["ScaleModeAuto"] : FALSE; - $LabelSkipOffset = isset($Format["LabelSkipOffset"]) ? $Format["LabelSkipOffset"] : 0; - $LabelShowBoundaries = isset($Format["LabelShowBoundaries"]) ? $Format["LabelShowBoundaries"] : FALSE; - $DrawXBoundaryLines = isset($Format["DrawXBoundaryLines"]) ? $Format["DrawXBoundaryLines"] : FALSE; - $ScaleModeAutoGridInterval = isset($Format["ScaleModeAutoGridInterval"]) ? $Format["ScaleModeAutoGridInterval"] : 0; - $ScaleModeAutoGridLabel = isset($Format["ScaleModeAutoGridLabel"]) ? $Format["ScaleModeAutoGridLabel"] : FALSE; - - /* Floating scale require X & Y margins to be set manually */ - if ( $Floating && ( $XMargin == AUTO || $YMargin == 0 ) ) { $Floating = FALSE; } - - /* Skip a NOTICE event in case of an empty array */ - if ( $DrawYLines == NONE || $DrawYLines == FALSE ) { $DrawYLines = array("zarma"=>"31"); } - - /* Define the color for the skipped elements */ - $SkippedAxisColor = array("R"=>$SkippedAxisR,"G"=>$SkippedAxisG,"B"=>$SkippedAxisB,"Alpha"=>$SkippedAxisAlpha,"Ticks"=>$SkippedAxisTicks); - $SkippedTickColor = array("R"=>$SkippedTickR,"G"=>$SkippedTickG,"B"=>$SkippedTickB,"Alpha"=>$SkippedTickAlpha); - - $Data = $this->DataSet->getData(); - if ( isset($Data["Abscissa"]) ) { $Abscissa = $Data["Abscissa"]; } else { $Abscissa = NULL; } - - /* Unset the abscissa axis, needed if we display multiple charts on the same picture */ - if ( $Abscissa != NULL ) - { - foreach($Data["Axis"] as $AxisID => $Parameters) - { if ($Parameters["Identity"] == AXIS_X) { unset($Data["Axis"][$AxisID]); } } - } - - /* Build the scale settings */ - $GotXAxis = FALSE; - foreach($Data["Axis"] as $AxisID => $AxisParameter) - { - if ( $AxisParameter["Identity"] == AXIS_X ) { $GotXAxis = TRUE; } - - if ( $Pos == SCALE_POS_LEFTRIGHT && $AxisParameter["Identity"] == AXIS_Y) - { $Height = $this->GraphAreaY2-$this->GraphAreaY1 - $YMargin*2; } - elseif ( $Pos == SCALE_POS_LEFTRIGHT && $AxisParameter["Identity"] == AXIS_X) - { $Height = $this->GraphAreaX2-$this->GraphAreaX1; } - elseif ( $Pos == SCALE_POS_TOPBOTTOM && $AxisParameter["Identity"] == AXIS_Y) - { $Height = $this->GraphAreaX2-$this->GraphAreaX1 - $YMargin*2;; } - else - { $Height = $this->GraphAreaY2-$this->GraphAreaY1; } - - $AxisMin = ABSOLUTE_MAX; $AxisMax = OUT_OF_SIGHT; - if ( $Mode == SCALE_MODE_FLOATING || $Mode == SCALE_MODE_START0 ) - { - foreach($Data["Series"] as $SerieID => $SerieParameter) - { - if ( $SerieParameter["Axis"] == $AxisID && $Data["Series"][$SerieID]["isDrawable"] && $Data["Abscissa"] != $SerieID) - { - $AxisMax = max($AxisMax,$Data["Series"][$SerieID]["Max"]); - $AxisMin = min($AxisMin,$Data["Series"][$SerieID]["Min"]); - } - } - $AutoMargin = (($AxisMax-$AxisMin)/100)*$XReleasePercent; - - $Data["Axis"][$AxisID]["Min"] = $AxisMin-$AutoMargin; $Data["Axis"][$AxisID]["Max"] = $AxisMax+$AutoMargin; - if ( $Mode == SCALE_MODE_START0 ) { - $Data["Axis"][$AxisID]["Min"] = 0; - // Hack: When max and min graph values are equal to zero then force max = 1 - if($Data["Axis"][$AxisID]["Max"] == 0) { - $Data["Axis"][$AxisID]["Max"] = 1; - } - } - } - elseif ( $Mode == SCALE_MODE_MANUAL ) - { - if ( isset($ManualScale[$AxisID]["Min"]) && isset($ManualScale[$AxisID]["Max"]) ) - { - $Data["Axis"][$AxisID]["Min"] = $ManualScale[$AxisID]["Min"]; - $Data["Axis"][$AxisID]["Max"] = $ManualScale[$AxisID]["Max"]; - } - else - { echo "Manual scale boundaries not set."; exit(); } - } - elseif ( $Mode == SCALE_MODE_ADDALL || $Mode == SCALE_MODE_ADDALL_START0 ) - { - $Series = ""; - foreach($Data["Series"] as $SerieID => $SerieParameter) - { if ( $SerieParameter["Axis"] == $AxisID && $SerieParameter["isDrawable"] && $Data["Abscissa"] != $SerieID ) { $Series[$SerieID] = count($Data["Series"][$SerieID]["Data"]); } } - - for ($ID=0;$ID<=max($Series)-1;$ID++) - { - $PointMin = 0; $PointMax = 0; - foreach($Series as $SerieID => $ValuesCount ) - { - if (isset($Data["Series"][$SerieID]["Data"][$ID]) && $Data["Series"][$SerieID]["Data"][$ID] != NULL ) - { - $Value = $Data["Series"][$SerieID]["Data"][$ID]; - if ( $Value > 0 ) { $PointMax = $PointMax + $Value; } else { $PointMin = $PointMin + $Value; } - } - } - $AxisMax = max($AxisMax,$PointMax); - $AxisMin = min($AxisMin,$PointMin); - } - $AutoMargin = (($AxisMax-$AxisMin)/100)*$XReleasePercent; - $Data["Axis"][$AxisID]["Min"] = $AxisMin-$AutoMargin; $Data["Axis"][$AxisID]["Max"] = $AxisMax+$AutoMargin; - } - $MaxDivs = floor($Height/$MinDivHeight); - if ($MaxDivs == 0) { $MaxDivs = 1;} - - if ( $Mode == SCALE_MODE_ADDALL_START0 ) { $Data["Axis"][$AxisID]["Min"] = 0; } - - $Scale = $this->computeScale($Data["Axis"][$AxisID]["Min"],$Data["Axis"][$AxisID]["Max"],$MaxDivs,$Factors,$AxisID); - - $Data["Axis"][$AxisID]["Margin"] = $AxisParameter["Identity"] == AXIS_X ? $XMargin : $YMargin; - $Data["Axis"][$AxisID]["ScaleMin"] = $Scale["XMin"]; - $Data["Axis"][$AxisID]["ScaleMax"] = $Scale["XMax"]; - $Data["Axis"][$AxisID]["Rows"] = $Scale["Rows"]; - $Data["Axis"][$AxisID]["RowHeight"] = $Scale["RowHeight"]; - - if ( isset($Scale["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = $Scale["Format"]; } - - if ( !isset($Data["Axis"][$AxisID]["Display"]) ) { $Data["Axis"][$AxisID]["Display"] = NULL; } - if ( !isset($Data["Axis"][$AxisID]["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = NULL; } - if ( !isset($Data["Axis"][$AxisID]["Unit"]) ) { $Data["Axis"][$AxisID]["Unit"] = NULL; } - } - - /* Still no X axis */ - if ( $GotXAxis == FALSE ) - { - if ( $Abscissa != NULL ) - { - $Points = count($Data["Series"][$Abscissa]["Data"]); - if ( $AutoAxisLabels ) - $AxisName = isset($Data["Series"][$Abscissa]["Description"]) ? $Data["Series"][$Abscissa]["Description"] : NULL; - else - $AxisName = NULL; - } - else - { - $Points = 0; - $AxisName = isset($Data["XAxisName"]) ? $Data["XAxisName"] : NULL; - if (count($Data["Series"]) > 0) { - foreach($Data["Series"] as $SerieID => $SerieParameter) - { if ( $SerieParameter["isDrawable"] ) { $Points = max($Points,count($SerieParameter["Data"])); } } - } - } - - $AxisID = count($Data["Axis"]); - $Data["Axis"][$AxisID]["Identity"] = AXIS_X; - if ( $Pos == SCALE_POS_LEFTRIGHT ) { $Data["Axis"][$AxisID]["Position"] = AXIS_POSITION_BOTTOM; } else { $Data["Axis"][$AxisID]["Position"] = AXIS_POSITION_LEFT; } - if ( $AxisName != NULL ) { $Data["Axis"][$AxisID]["Name"] = $AxisName; } - if ( $XMargin == AUTO ) - { - if ( $Pos == SCALE_POS_LEFTRIGHT ) - { $Height = $this->GraphAreaX2-$this->GraphAreaX1; } - else - { $Height = $this->GraphAreaY2-$this->GraphAreaY1; } - - if ( $Points == 1 ) - $Data["Axis"][$AxisID]["Margin"] = $Height / 2; - else if ($Points > 1) - $Data["Axis"][$AxisID]["Margin"] = ($Height/$Points) / 2; - } - else - { $Data["Axis"][$AxisID]["Margin"] = $XMargin; } - $Data["Axis"][$AxisID]["Rows"] = $Points-1; - if ( !isset($Data["Axis"][$AxisID]["Display"]) ) { $Data["Axis"][$AxisID]["Display"] = NULL; } - if ( !isset($Data["Axis"][$AxisID]["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = NULL; } - if ( !isset($Data["Axis"][$AxisID]["Unit"]) ) { $Data["Axis"][$AxisID]["Unit"] = NULL; } - } - - $this->DataSet->saveOrientation($Pos); - $this->DataSet->saveAxisConfig($Data["Axis"]); - - $FontColorRo = $this->FontColorR; $FontColorGo = $this->FontColorG; $FontColorBo = $this->FontColorB; - - $AxisPos["L"] = $this->GraphAreaX1; $AxisPos["R"] = $this->GraphAreaX2; $AxisPos["T"] = $this->GraphAreaY1; $AxisPos["B"] = $this->GraphAreaY2; - foreach($Data["Axis"] as $AxisID => $Parameters) - { - if ( isset($Parameters["Color"]) ) - { - $AxisR = $Parameters["Color"]["R"]; $AxisG = $Parameters["Color"]["G"]; $AxisB = $Parameters["Color"]["B"]; - $TickR = $Parameters["Color"]["R"]; $TickG = $Parameters["Color"]["G"]; $TickB = $Parameters["Color"]["B"]; - $this->setFontProperties(array("R"=>$Parameters["Color"]["R"],"G"=>$Parameters["Color"]["G"],"B"=>$Parameters["Color"]["B"])); - } - else - { - $AxisR = $AxisRo; $AxisG = $AxisGo; $AxisB = $AxisBo; - $TickR = $TickRo; $TickG = $TickGo; $TickB = $TickBo; - $this->setFontProperties(array("R"=>$FontColorRo,"G"=>$FontColorGo,"B"=>$FontColorBo)); - } - - $LastValue = "w00t"; $ID = 1; - if ( $Parameters["Identity"] == AXIS_X ) - { - if ( $Pos == SCALE_POS_LEFTRIGHT ) - { - $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Parameters["Margin"]*2; - - if ( $ScaleModeAuto && isset($Data["Series"][$Abscissa]["Data"][0]) ) { - $AbscissaScaleValueMin = $Data["Series"][$Abscissa]["Data"][0]; - } else { - $AbscissaScaleValueMin = 0; - } - if ( $ScaleModeAuto && isset($Data["Series"][$Abscissa]["Data"][$Parameters["Rows"]]) ) { - $AbscissaScaleValueMax = $Data["Series"][$Abscissa]["Data"][$Parameters["Rows"]]; - } else { - $AbscissaScaleValueMax = $Width; - } - $AbscissaScaleValueWidth = $AbscissaScaleValueMax - $AbscissaScaleValueMin; - if ($AbscissaScaleValueWidth > 0) - $AbscissaScaleFactor = $AbscissaScaleValueWidth / $Width; - else - $AbscissaScaleFactor = 1; - - if ( $Parameters["Position"] == AXIS_POSITION_BOTTOM ) - { - if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $YLabelOffset = 2; } - if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $YLabelOffset = 5; } - if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $YLabelOffset = 5; } - if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $YLabelOffset = 2; } - - if ( $Floating ) - { $FloatingOffset = $YMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["B"],$this->GraphAreaX2,$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["B"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - if ($Parameters["Rows"] == 0 ) { $Step = $Width; } else { $Step = $Width / ($Parameters["Rows"]); } - - $MaxBottom = $AxisPos["B"]; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - if ( $ScaleModeAuto && $Abscissa != NULL ) { - if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { - $AbscissaScaleValue = $Data["Series"][$Abscissa]["Data"][$i] - $AbscissaScaleValueMin; - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $AbscissaScaleValue / $AbscissaScaleFactor; - } else { - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; - } - } else { - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; - } - - $YPos = $AxisPos["B"]; - - if ( $Abscissa != NULL ) - { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } - else - { - if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); - else - $Value = $i; - } - - $ID++; $Skipped = TRUE; - if ( ($LabelShowBoundaries && ($i==0 || $i==$Parameters["Rows"])) || $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip,$LabelSkipOffset) ) - { - $Bounds = $this->drawText($XPos,$YPos+$OuterTickWidth+$YLabelOffset,$Value,array("FontSize"=>$TicksFontSize,"Angle"=>$LabelRotation,"Align"=>$LabelAlign)); - $TxtBottom = $YPos+$OuterTickWidth+2+($Bounds[0]["Y"]-$Bounds[2]["Y"]); - $MaxBottom = max($MaxBottom,$TxtBottom); - $LastValue = $Value; - $Skipped = FALSE; - } - - if ( $DrawXBoundaryLines && ($i==0 || $i==$Parameters["Rows"]) ) - { - $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - } - - if ( $Skipped ) - { - if ( $DrawXLines ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$SkippedAxisColor); } - if ( $SkippedInnerTickWidth !=0 || $SkippedOuterTickWidth != 0 ) { $this->drawLine($XPos,$YPos-$SkippedInnerTickWidth,$XPos,$YPos+$SkippedOuterTickWidth,$SkippedTickColor); } - } - else - { - if ( $DrawXLines && ($XPos != $this->GraphAreaX1 && $XPos != $this->GraphAreaX2) ) { - if($Data["Series"][$Abscissa]["Data"][$i] != "" || $AvoidGridWhenEmpty) { - $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - } - } - if ( $InnerTickWidth !=0 || $OuterTickWidth != 0 ) { - if($Data["Series"][$Abscissa]["Data"][$i] != "" || $AvoidTickWhenEmpty) { - $this->drawLine($XPos,$YPos-$InnerTickWidth,$XPos,$YPos+$OuterTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - } - } - } - - } - - if ( $ScaleModeAuto && ($ScaleModeAutoGridInterval > 0) ) - { - $ScaleModeAutoGridIntervalDraw = true; - $ScaleModeAutoGridIntervalStep = 0; - - while ($ScaleModeAutoGridIntervalDraw) { - $ScaleModeAutoGridIntervalStep++; - $ScaleModeAutoGridIntervalValue = $ScaleModeAutoGridIntervalStep*$ScaleModeAutoGridInterval; - - if ($ScaleModeAutoGridIntervalValue < ($AbscissaScaleValueMax-$AbscissaScaleValueMin)) { - $ScaleModeAutoGridIntervalX = $this->GraphAreaX1 + $Parameters["Margin"] + $ScaleModeAutoGridIntervalValue / $AbscissaScaleFactor; - $this->drawLine($ScaleModeAutoGridIntervalX,$this->GraphAreaY1+$FloatingOffset,$ScaleModeAutoGridIntervalX,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - - if ($ScaleModeAutoGridLabel) { - $ScaleModeAutoGridLabelDescription = $this->scaleFormat($AbscissaScaleValueMin+$ScaleModeAutoGridIntervalValue,$Data["XAxisDisplay"],$Data["XAxisFormat"],""); - - $this->drawText($ScaleModeAutoGridIntervalX,$this->GraphAreaY1+$FloatingOffset+5,$ScaleModeAutoGridLabelDescription,array("Align"=>TEXT_ALIGN_MIDDLERIGHT,"Angle"=>90,"R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>floor($GridAlpha*2))); - } - } else { - $ScaleModeAutoGridIntervalDraw = false; - } - } - } - - if ( isset($Parameters["Name"]) ) - { - $YPos = $MaxBottom+2; - $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_TOPMIDDLE)); - $MaxBottom = $Bounds[0]["Y"]; - - $this->DataSet->Data["GraphArea"]["Y2"] = $MaxBottom + $this->FontSize; - } - - $AxisPos["B"] = $MaxBottom + $ScaleSpacing; - } - elseif ( $Parameters["Position"] == AXIS_POSITION_TOP ) - { - if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $YLabelOffset = 2; } - if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $YLabelOffset = 2; } - if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $YLabelOffset = 5; } - if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $YLabelOffset = 5; } - - if ( $Floating ) - { $FloatingOffset = $YMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["T"],$this->GraphAreaX2,$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["T"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - if ($Parameters["Rows"] == 0 ) { $Step = $Width; } else { $Step = $Width / $Parameters["Rows"]; } - - $MinTop = $AxisPos["T"]; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - if ( $ScaleModeAuto && $Abscissa != NULL ) { - if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { - $AbscissaScaleValue = $Data["Series"][$Abscissa]["Data"][$i] - $AbscissaScaleValueMin; - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $AbscissaScaleValue / $AbscissaScaleFactor; - } else { - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; - } - } else { - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; - } - $YPos = $AxisPos["T"]; - - if ( $Abscissa != NULL ) - { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } - else - { - if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); - else - $Value = $i; - } - - $ID++; $Skipped = TRUE; - if ( ($LabelShowBoundaries && ($i==0 || $i==$Parameters["Rows"])) || $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip,$LabelSkipOffset) ) - { - $Bounds = $this->drawText($XPos,$YPos-$OuterTickWidth-$YLabelOffset,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); - $TxtBox = $YPos-$OuterTickWidth-2-($Bounds[0]["Y"]-$Bounds[2]["Y"]); - $MinTop = min($MinTop,$TxtBox); - $LastValue = $Value; - $Skipped = FALSE; - } - - if ( $DrawXBoundaryLines && ($i==0 || $i==$Parameters["Rows"]) ) - { - $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - } - - if ( $Skipped ) - { - if ( $DrawXLines ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$SkippedAxisColor); } - if ( $SkippedInnerTickWidth !=0 || $SkippedOuterTickWidth != 0 ) { $this->drawLine($XPos,$YPos+$SkippedInnerTickWidth,$XPos,$YPos-$SkippedOuterTickWidth,$SkippedTickColor); } - } - else - { - if ( $DrawXLines ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - if ( $InnerTickWidth !=0 || $OuterTickWidth != 0 ) { $this->drawLine($XPos,$YPos+$InnerTickWidth,$XPos,$YPos-$OuterTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); } - } - - } - - if ( $ScaleModeAuto && ($ScaleModeAutoGridInterval > 0) ) - { - $ScaleModeAutoGridIntervalDraw = true; - $ScaleModeAutoGridIntervalStep = 0; - - while ($ScaleModeAutoGridIntervalDraw) { - $ScaleModeAutoGridIntervalStep++; - $ScaleModeAutoGridIntervalValue = $ScaleModeAutoGridIntervalStep*$ScaleModeAutoGridInterval; - - if ($ScaleModeAutoGridIntervalValue < ($AbscissaScaleValueMax-$AbscissaScaleValueMin)) { - $ScaleModeAutoGridIntervalX = $this->GraphAreaX1 + $Parameters["Margin"] + $ScaleModeAutoGridIntervalValue / $AbscissaScaleFactor; - $this->drawLine($ScaleModeAutoGridIntervalX,$this->GraphAreaY1+$FloatingOffset,$ScaleModeAutoGridIntervalX,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - - if ($ScaleModeAutoGridLabel) { - $ScaleModeAutoGridLabelDescription = $this->scaleFormat($AbscissaScaleValueMin+$ScaleModeAutoGridIntervalValue,$Data["XAxisDisplay"],$Data["XAxisFormat"],""); - - $this->drawText($ScaleModeAutoGridIntervalX,$this->GraphAreaY1+$FloatingOffset+5,$ScaleModeAutoGridLabelDescription,array("Align"=>TEXT_ALIGN_MIDDLERIGHT,"Angle"=>90,"R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>floor($GridAlpha*2))); - } - } else { - $ScaleModeAutoGridIntervalDraw = false; - } - } - } - - if ( isset($Parameters["Name"]) ) - { - $YPos = $MinTop-2; - $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - $MinTop = $Bounds[2]["Y"]; - - $this->DataSet->Data["GraphArea"]["Y1"] = $MinTop; - } - - $AxisPos["T"] = $MinTop - $ScaleSpacing; - } - } - elseif ( $Pos == SCALE_POS_TOPBOTTOM ) - { - $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Parameters["Margin"]*2; - - if ( $ScaleModeAuto && isset($Data["Series"][$Abscissa]["Data"][0]) ) { - $AbscissaScaleValueMin = $Data["Series"][$Abscissa]["Data"][0]; - } else { - $AbscissaScaleValueMin = 0; - } - if ( $ScaleModeAuto && isset($Data["Series"][$Abscissa]["Data"][$Parameters["Rows"]]) ) { - $AbscissaScaleValueMax = $Data["Series"][$Abscissa]["Data"][$Parameters["Rows"]]; - } else { - $AbscissaScaleValueMax = $Height; - } - $AbscissaScaleValueWidth = $AbscissaScaleValueMax - $AbscissaScaleValueMin; - $AbscissaScaleFactor = $AbscissaScaleValueWidth / $Height; - - if ( $Parameters["Position"] == AXIS_POSITION_LEFT ) - { - if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = -2; } - if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = -6; } - if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = -2; } - if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = -5; } - - if ( $Floating ) - { $FloatingOffset = $YMargin; $this->drawLine($AxisPos["L"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($AxisPos["L"],$this->GraphAreaY1,$AxisPos["L"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($AxisPos["L"],$this->GraphAreaY2-$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY2+($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - if ($Parameters["Rows"] == 0 ) { $Step = $Height; } else { $Step = $Height / $Parameters["Rows"]; } - - $MinLeft = $AxisPos["L"]; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - if ( $ScaleModeAuto && $Abscissa != NULL ) { - if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { - $AbscissaScaleValue = $Data["Series"][$Abscissa]["Data"][$i] - $AbscissaScaleValueMin; - $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $AbscissaScaleValue / $AbscissaScaleFactor; - } else { - $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $Step*$i; - } - } else { - $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $Step*$i; - } - $XPos = $AxisPos["L"]; - - if ( $Abscissa != NULL ) - { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } - else - { - if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); - else - $Value = $i; - } - - $ID++; $Skipped = TRUE; - if ( ($LabelShowBoundaries && ($i==0 || $i==$Parameters["Rows"])) || $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip,$LabelSkipOffset) ) - { - $Bounds = $this->drawText($XPos-$OuterTickWidth+$XLabelOffset,$YPos,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); - $TxtBox = $XPos-$OuterTickWidth-2-($Bounds[1]["X"]-$Bounds[0]["X"]); - $MinLeft = min($MinLeft,$TxtBox); - $LastValue = $Value; - $Skipped = FALSE; - } - - if ( $DrawXBoundaryLines && ($i==0 || $i==$Parameters["Rows"]) ) - { - $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - } - - if ( $Skipped ) - { - if ( $DrawXLines ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,$SkippedAxisColor); } - if ( $SkippedInnerTickWidth !=0 || $SkippedOuterTickWidth != 0 ) { $this->drawLine($XPos-$SkippedOuterTickWidth,$YPos,$XPos+$SkippedInnerTickWidth,$YPos,$SkippedTickColor); } - } - else - { - if ( $DrawXLines && ($YPos != $this->GraphAreaY1 && $YPos != $this->GraphAreaY2) ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - if ( $InnerTickWidth !=0 || $OuterTickWidth != 0 ) { $this->drawLine($XPos-$OuterTickWidth,$YPos,$XPos+$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); } - } - - } - - if ( $ScaleModeAuto && ($ScaleModeAutoGridInterval > 0) ) - { - $ScaleModeAutoGridIntervalDraw = true; - $ScaleModeAutoGridIntervalStep = 0; - - while ($ScaleModeAutoGridIntervalDraw) { - $ScaleModeAutoGridIntervalStep++; - $ScaleModeAutoGridIntervalValue = $ScaleModeAutoGridIntervalStep*$ScaleModeAutoGridInterval; - - if ($ScaleModeAutoGridIntervalValue < ($AbscissaScaleValueMax-$AbscissaScaleValueMin)) { - $ScaleModeAutoGridIntervalY = $this->GraphAreaY1 + $Parameters["Margin"] + $ScaleModeAutoGridIntervalValue / $AbscissaScaleFactor; - $this->drawLine($this->GraphAreaX1+$FloatingOffset,$ScaleModeAutoGridIntervalY,$this->GraphAreaX2-$FloatingOffset,$ScaleModeAutoGridIntervalY,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - - if ($ScaleModeAutoGridLabel) { - $ScaleModeAutoGridLabelDescription = $this->scaleFormat($AbscissaScaleValueMin+$ScaleModeAutoGridIntervalValue,$Data["XAxisDisplay"],$Data["XAxisFormat"],""); - - $this->drawText($this->GraphAreaX2+$FloatingOffset-5,$ScaleModeAutoGridIntervalY,$ScaleModeAutoGridLabelDescription,array("Align"=>TEXT_ALIGN_MIDDLERIGHT,"Angle"=>0,"R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>floor($GridAlpha*2))); - } - } else { - $ScaleModeAutoGridIntervalDraw = false; - } - } - } - - if ( isset($Parameters["Name"]) ) - { - $XPos = $MinLeft-2; - $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>90)); - $MinLeft = $Bounds[0]["X"]; - - $this->DataSet->Data["GraphArea"]["X1"] = $MinLeft; - } - - $AxisPos["L"] = $MinLeft - $ScaleSpacing; - } - elseif ( $Parameters["Position"] == AXIS_POSITION_RIGHT ) - { - if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = 2; } - if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = 6; } - if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = 5; } - if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = 7; } - - if ( $Floating ) - { $FloatingOffset = $YMargin; $this->drawLine($AxisPos["R"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($AxisPos["R"],$this->GraphAreaY1,$AxisPos["R"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($AxisPos["R"],$this->GraphAreaY2-$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY2+($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - if ($Parameters["Rows"] == 0 ) { $Step = $Height; } else { $Step = $Height / $Parameters["Rows"]; } - - $MaxRight = $AxisPos["R"]; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - if ( $ScaleModeAuto && $Abscissa != NULL ) { - if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { - $AbscissaScaleValue = $Data["Series"][$Abscissa]["Data"][$i] - $AbscissaScaleValueMin; - $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $AbscissaScaleValue / $AbscissaScaleFactor; - } else { - $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $Step*$i; - } - } else { - $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $Step*$i; - } - $XPos = $AxisPos["R"]; - - if ( $Abscissa != NULL ) - { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } - else - { - if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); - else - $Value = $i; - } - - $ID++; $Skipped = TRUE; - if ( ($LabelShowBoundaries && ($i==0 || $i==$Parameters["Rows"])) || $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip,$LabelSkipOffset) ) - { - $Bounds = $this->drawText($XPos+$OuterTickWidth+$XLabelOffset,$YPos,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); - $TxtBox = $XPos+$OuterTickWidth+2+($Bounds[1]["X"]-$Bounds[0]["X"]); - $MaxRight = max($MaxRight,$TxtBox); - $LastValue = $Value; - $Skipped = FALSE; - } - - if ( $DrawXBoundaryLines && ($i==0 || $i==$Parameters["Rows"]) ) - { - $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - } - - if ( $Skipped ) - { - if ( $DrawXLines ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,$SkippedAxisColor); } - if ( $SkippedInnerTickWidth !=0 || $SkippedOuterTickWidth != 0 ) { $this->drawLine($XPos+$SkippedOuterTickWidth,$YPos,$XPos-$SkippedInnerTickWidth,$YPos,$SkippedTickColor); } - } - else - { - if ( $DrawXLines ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - if ( $InnerTickWidth !=0 || $OuterTickWidth != 0 ) { $this->drawLine($XPos+$OuterTickWidth,$YPos,$XPos-$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); } - } - - } - - if ( $ScaleModeAuto && ($ScaleModeAutoGridInterval > 0) ) - { - $ScaleModeAutoGridIntervalDraw = true; - $ScaleModeAutoGridIntervalStep = 0; - - while ($ScaleModeAutoGridIntervalDraw) { - $ScaleModeAutoGridIntervalStep++; - $ScaleModeAutoGridIntervalValue = $ScaleModeAutoGridIntervalStep*$ScaleModeAutoGridInterval; - - if ($ScaleModeAutoGridIntervalValue < ($AbscissaScaleValueMax-$AbscissaScaleValueMin)) { - $ScaleModeAutoGridIntervalY = $this->GraphAreaY1 + $Parameters["Margin"] + $ScaleModeAutoGridIntervalValue / $AbscissaScaleFactor; - $this->drawLine($this->GraphAreaX1+$FloatingOffset,$ScaleModeAutoGridIntervalY,$this->GraphAreaX2-$FloatingOffset,$ScaleModeAutoGridIntervalY,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); - - if ($ScaleModeAutoGridLabel) { - $ScaleModeAutoGridLabelDescription = $this->scaleFormat($AbscissaScaleValueMin+$ScaleModeAutoGridIntervalValue,$Data["XAxisDisplay"],$Data["XAxisFormat"],""); - - $this->drawText($this->GraphAreaX2+$FloatingOffset-5,$ScaleModeAutoGridIntervalY,$ScaleModeAutoGridLabelDescription,array("Align"=>TEXT_ALIGN_MIDDLERIGHT,"Angle"=>0,"R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>floor($GridAlpha*2))); - } - } else { - $ScaleModeAutoGridIntervalDraw = false; - } - } - } - - if ( isset($Parameters["Name"]) ) - { - $XPos = $MaxRight+4; - $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>270)); - $MaxRight = $Bounds[1]["X"]; - - $this->DataSet->Data["GraphArea"]["X2"] = $MaxRight + $this->FontSize; - } - - $AxisPos["R"] = $MaxRight + $ScaleSpacing; - } - } - } - - - - if ( $Parameters["Identity"] == AXIS_Y ) - { - if ( $Pos == SCALE_POS_LEFTRIGHT ) - { - if ( $Parameters["Position"] == AXIS_POSITION_LEFT ) - { - - if ( $Floating ) - { $FloatingOffset = $XMargin; $this->drawLine($AxisPos["L"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($AxisPos["L"],$this->GraphAreaY1,$AxisPos["L"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($AxisPos["L"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Parameters["Margin"]*2; - $Step = $Height / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MinLeft = $AxisPos["L"]; - $LastY = NULL; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - $YPos = $this->GraphAreaY2 - $Parameters["Margin"] - $Step*$i; - $XPos = $AxisPos["L"]; - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($this->GraphAreaX1+$FloatingOffset,$LastY,$this->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } - - if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - - if ( $DrawSubTicks && $i != $Parameters["Rows"] ) - $this->drawLine($XPos-$OuterSubTickWidth,$YPos-$SubTicksSize,$XPos+$InnerSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->drawLine($XPos-$OuterTickWidth,$YPos,$XPos+$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - $Bounds = $this->drawText($XPos-$OuterTickWidth-2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); - $TxtLeft = $XPos-$OuterTickWidth-2-($Bounds[1]["X"]-$Bounds[0]["X"]); - $MinLeft = min($MinLeft,$TxtLeft); - - $LastY = $YPos; - } - - if ( isset($Parameters["Name"]) ) - { - $XPos = $MinLeft-2; - $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>90)); - $MinLeft = $Bounds[2]["X"]; - - $this->DataSet->Data["GraphArea"]["X1"] = $MinLeft; - } - - $AxisPos["L"] = $MinLeft - $ScaleSpacing; - } - elseif ( $Parameters["Position"] == AXIS_POSITION_RIGHT ) - { - if ( $Floating ) - { $FloatingOffset = $XMargin; $this->drawLine($AxisPos["R"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($AxisPos["R"],$this->GraphAreaY1,$AxisPos["R"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($AxisPos["R"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Parameters["Margin"]*2; - $Step = $Height / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MaxLeft = $AxisPos["R"]; - $LastY = NULL; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - $YPos = $this->GraphAreaY2 - $Parameters["Margin"] - $Step*$i; - $XPos = $AxisPos["R"]; - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($this->GraphAreaX1+$FloatingOffset,$LastY,$this->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } - - if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - - if ( $DrawSubTicks && $i != $Parameters["Rows"] ) - $this->drawLine($XPos-$OuterSubTickWidth,$YPos-$SubTicksSize,$XPos+$InnerSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->drawLine($XPos-$InnerTickWidth,$YPos,$XPos+$OuterTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - $Bounds = $this->drawText($XPos+$OuterTickWidth+2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); - $TxtLeft = $XPos+$OuterTickWidth+2+($Bounds[1]["X"]-$Bounds[0]["X"]); - $MaxLeft = max($MaxLeft,$TxtLeft); - - $LastY = $YPos; - } - - if ( isset($Parameters["Name"]) ) - { - $XPos = $MaxLeft+6; - $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>270)); - $MaxLeft = $Bounds[2]["X"]; - - $this->DataSet->Data["GraphArea"]["X2"] = $MaxLeft + $this->FontSize; - } - $AxisPos["R"] = $MaxLeft + $ScaleSpacing; - } - } - elseif ( $Pos == SCALE_POS_TOPBOTTOM ) - { - if ( $Parameters["Position"] == AXIS_POSITION_TOP ) - { - if ( $Floating ) - { $FloatingOffset = $XMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["T"],$this->GraphAreaX2,$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["T"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Parameters["Margin"]*2; - $Step = $Width / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MinTop = $AxisPos["T"]; - $LastX = NULL; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; - $YPos = $AxisPos["T"]; - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastX != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($LastX,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$BGColor); } - - if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - - if ( $DrawSubTicks && $i != $Parameters["Rows"] ) - $this->drawLine($XPos+$SubTicksSize,$YPos-$OuterSubTickWidth,$XPos+$SubTicksSize,$YPos+$InnerSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->drawLine($XPos,$YPos-$OuterTickWidth,$XPos,$YPos+$InnerTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - - if($LabelValuesRotation != 0) { - $_xpos = $XPos+6; - $_ypos = $YPos-$OuterTickWidth-7; - } - else { - $_xpos = $XPos; - $_ypos = $YPos-$OuterTickWidth-2; - } - - $Bounds = $this->drawText($_xpos,$_ypos,$Value,array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE, "Angle" => $LabelValuesRotation)); - - $TxtHeight = $YPos-$OuterTickWidth-2-($Bounds[1]["Y"]-$Bounds[2]["Y"]); - $MinTop = min($MinTop,$TxtHeight); - - $LastX = $XPos; - } - - if ( isset($Parameters["Name"]) ) - { - $YPos = $MinTop-2; - $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - $MinTop = $Bounds[2]["Y"]; - - $this->DataSet->Data["GraphArea"]["Y1"] = $MinTop; - } - - $AxisPos["T"] = $MinTop - $ScaleSpacing; - } - elseif ( $Parameters["Position"] == AXIS_POSITION_BOTTOM ) - { - if ( $Floating ) - { $FloatingOffset = $XMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["B"],$this->GraphAreaX2,$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["B"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Parameters["Margin"]*2; - $Step = $Width / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MaxBottom = $AxisPos["B"]; - $LastX = NULL; - for($i=0;$i<=$Parameters["Rows"];$i++) - { - $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; - $YPos = $AxisPos["B"]; - $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastX != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($LastX,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$BGColor); } - - if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - - if ( $DrawSubTicks && $i != $Parameters["Rows"] ) - $this->drawLine($XPos+$SubTicksSize,$YPos-$OuterSubTickWidth,$XPos+$SubTicksSize,$YPos+$InnerSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->drawLine($XPos,$YPos-$OuterTickWidth,$XPos,$YPos+$InnerTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - $Bounds = $this->drawText($XPos,$YPos+$OuterTickWidth+2,$Value,array("Align"=>TEXT_ALIGN_TOPMIDDLE)); - $TxtHeight = $YPos+$OuterTickWidth+2+($Bounds[1]["Y"]-$Bounds[2]["Y"]); - $MaxBottom = max($MaxBottom,$TxtHeight); - - $LastX = $XPos; - } - - if ( isset($Parameters["Name"]) ) - { - $YPos = $MaxBottom+2; - $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; - $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_TOPMIDDLE)); - $MaxBottom = $Bounds[0]["Y"]; - - $this->DataSet->Data["GraphArea"]["Y2"] = $MaxBottom + $this->FontSize; - } - - $AxisPos["B"] = $MaxBottom + $ScaleSpacing; - } - } - } - } - } - - function isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip,$LabelSkipOffset=0) - { - if ( $LabelingMethod == LABELING_DIFFERENT && $Value != $LastValue ) { return(TRUE); } - if ( $LabelingMethod == LABELING_DIFFERENT && $Value == $LastValue ) { return(FALSE); } - if ( $LabelingMethod == LABELING_ALL && $LabelSkip == 0 ) { return(TRUE); } - if ( $LabelingMethod == LABELING_ALL && ($ID+$LabelSkip+$LabelSkipOffset) % ($LabelSkip+1) != 1 ) { return(FALSE); } - - return(TRUE); - } - - /* Compute the scale, check for the best visual factors */ - function computeScale($XMin,$XMax,$MaxDivs,$Factors,$AxisID=0) - { - /* Compute each factors */ - $Results = ""; - foreach ($Factors as $Key => $Factor) - $Results[$Factor] = $this->processScale($XMin,$XMax,$MaxDivs,array($Factor),$AxisID); - - /* Remove scales that are creating to much decimals */ - $GoodScaleFactors = ""; - foreach ($Results as $Key => $Result) - { - $Decimals = preg_split("/\./",$Result["RowHeight"]); - if ( (!isset($Decimals[1])) || (strlen($Decimals[1]) < 6) ) { $GoodScaleFactors[] = $Key; } - } - - /* Found no correct scale, shame,... returns the 1st one as default */ - if ( $GoodScaleFactors == "" ) { return($Results[$Factors[0]]); } - - /* Find the factor that cause the maximum number of Rows */ - $MaxRows = 0; $BestFactor = 0; - foreach($GoodScaleFactors as $Key => $Factor) - { if ( $Results[$Factor]["Rows"] > $MaxRows ) { $MaxRows = $Results[$Factor]["Rows"]; $BestFactor = $Factor; } } - - /* Return the best visual scale */ - return($Results[$BestFactor]); - } - - /* Compute the best matching scale based on size & factors */ - function processScale($XMin,$XMax,$MaxDivs,$Factors,$AxisID) - { - $ScaleHeight = abs(ceil($XMax)-floor($XMin)); - - if ( isset($this->DataSet->Data["Axis"][$AxisID]["Display"]) ) - $Mode = $this->DataSet->Data["Axis"][$AxisID]["Display"]; - else - $Mode = AXIS_FORMAT_DEFAULT; - - $Scale = ""; - if ( $XMin != $XMax ) - { - $Found = FALSE; $Rescaled = FALSE; $Scaled10Factor = .0001; $Result = 0; - while(!$Found) - { - foreach($Factors as $Key => $Factor) - { - if ( !$Found ) - { - if ( !($this->modulo($XMin,$Factor*$Scaled10Factor) == 0) || ($XMin != floor($XMin))) { $XMinRescaled = floor($XMin/($Factor*$Scaled10Factor))*$Factor*$Scaled10Factor; } else { $XMinRescaled = $XMin; } - if ( !($this->modulo($XMax,$Factor*$Scaled10Factor) == 0) || ($XMax != floor($XMax))) { $XMaxRescaled = floor($XMax/($Factor*$Scaled10Factor))*$Factor*$Scaled10Factor+($Factor*$Scaled10Factor); } else { $XMaxRescaled = $XMax; } - $ScaleHeightRescaled = abs($XMaxRescaled-$XMinRescaled); - - if ( !$Found && floor($ScaleHeightRescaled/($Factor*$Scaled10Factor)) <= $MaxDivs ) { $Found = TRUE; $Rescaled = TRUE; $Result = $Factor * $Scaled10Factor; } - } - } - $Scaled10Factor = $Scaled10Factor * 10; - } - - /* ReCall Min / Max / Height */ - if ( $Rescaled ) { $XMin = $XMinRescaled; $XMax = $XMaxRescaled; $ScaleHeight = $ScaleHeightRescaled; } - - /* Compute rows size */ - $Rows = floor($ScaleHeight / $Result); - $RowHeight = $ScaleHeight / $Rows; - - /* Return the results */ - $Scale["Rows"] = $Rows; $Scale["RowHeight"] = $RowHeight; $Scale["XMin"] = $XMin; $Scale["XMax"] = $XMax; - - /* Compute the needed decimals for the metric view to avoid repetition of the same X Axis labels */ - if ( $Mode == AXIS_FORMAT_METRIC ) - { - $Done = FALSE; $GoodDecimals = 0; - for($Decimals=0;$Decimals<=10;$Decimals++) - { - if ( !$Done ) - { - $LastLabel = "zob"; $ScaleOK = TRUE; - for($i=0;$i<=$Rows;$i++) - { - $Value = $XMin + $i*$RowHeight; - $Label = $this->scaleFormat($Value,AXIS_FORMAT_METRIC,$Decimals); - - if ( $LastLabel == $Label ) { $ScaleOK = FALSE; } - $LastLabel = $Label; - } - if ( $ScaleOK ) { $Done = TRUE; $GoodDecimals = $Decimals; } - } - } - - $Scale["Format"] = $GoodDecimals; - } - } - else - { - /* If all values are the same we keep a +1/-1 scale */ - $Rows = 2; $XMin = $XMax-1; $XMax = $XMax+1; $RowHeight = 1; - - /* Return the results */ - $Scale["Rows"] = $Rows; $Scale["RowHeight"] = $RowHeight; $Scale["XMin"] = $XMin; $Scale["XMax"] = $XMax; - } - - return($Scale); - } - - function mod_check($x, $y) { - return @($x % $y) === FALSE; - } - - function modulo($Value1,$Value2) - { - if (floor($Value1) == 0) { return(0); } - if (floor($Value2) == 0) { return(0); } - if (is_infinite($Value2)) { return(0); } - if ($Value2 == 0.0) { return(0); } - if ($Value1 > $Value2) { return(0); } - if ($this->mod_check($Value1, $Value2)) { return(0); } - if (floor($Value2) != 0) { return($Value1 % $Value2); } - - $MinValue = min($Value1,$Value2); $Factor = 10; - while ( floor($MinValue*$Factor) == 0 ) - { $Factor = $Factor * 10; } - - return(($Value1*$Factor) % ($Value2*$Factor)); - } - - /* Draw a threshold with the computed scale */ - function drawThreshold($Value,$Format="") - { - $AxisID = isset($Format["AxisID"]) ? $Format["AxisID"] : 0; - $R = isset($Format["R"]) ? $Format["R"] : 255; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 50; - $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : 6; - $Wide = isset($Format["Wide"]) ? $Format["Wide"] : FALSE; - $WideFactor = isset($Format["WideFactor"]) ? $Format["WideFactor"] : 5; - $WriteCaption = isset($Format["WriteCaption"]) ? $Format["WriteCaption"] : FALSE; - $Caption = isset($Format["Caption"]) ? $Format["Caption"] : NULL; - $CaptionAlign = isset($Format["CaptionAlign"]) ? $Format["CaptionAlign"] : CAPTION_LEFT_TOP; - $CaptionOffset = isset($Format["CaptionOffset"]) ? $Format["CaptionOffset"] : 10; - $CaptionR = isset($Format["CaptionR"]) ? $Format["CaptionR"] : 255; - $CaptionG = isset($Format["CaptionG"]) ? $Format["CaptionG"] : 255; - $CaptionB = isset($Format["CaptionB"]) ? $Format["CaptionB"] : 255; - $CaptionAlpha = isset($Format["CaptionAlpha"]) ? $Format["CaptionAlpha"] : 100; - $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : TRUE; - $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : FALSE; - $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 3; - $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : TRUE; - $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 3; - $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; - $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; - $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; - $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 30; - $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; - $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 255; - $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 255; - $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 255; - $BoxBorderAlpha = isset($Format["BoxBorderAlpha"]) ? $Format["BoxBorderAlpha"] : 100; - - $CaptionSettings = array("DrawBox"=>$DrawBox,"DrawBoxBorder"=>$DrawBoxBorder,"BorderOffset"=>$BorderOffset,"BoxRounded"=>$BoxRounded,"RoundedRadius"=>$RoundedRadius, - "BoxR"=>$BoxR,"BoxG"=>$BoxG,"BoxB"=>$BoxB,"BoxAlpha"=>$BoxAlpha,"BoxSurrounding"=>$BoxSurrounding, - "BoxBorderR"=>$BoxBorderR,"BoxBorderG"=>$BoxBorderG,"BoxBorderB"=>$BoxBorderB,"BoxBorderAlpha"=>$BoxBorderAlpha, - "R"=>$CaptionR,"G"=>$CaptionG,"B"=>$CaptionB,"Alpha"=>$CaptionAlpha); - - if ( $Caption == NULL ) { $Caption = $Value; } - - $Data = $this->DataSet->getData(); - if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - $YPos = $this->scaleComputeY($Value,array("AxisID"=>$AxisID)); - if ( $YPos >= $this->GraphAreaY1 && $YPos <= $this->GraphAreaY2 ) - { - $this->drawLine($this->GraphAreaX1,$YPos,$this->GraphAreaX2,$YPos,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); - - if ( $Wide ) - { - $this->drawLine($this->GraphAreaX1,$YPos-1,$this->GraphAreaX2,$YPos-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); - $this->drawLine($this->GraphAreaX1,$YPos+1,$this->GraphAreaX2,$YPos+1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); - } - - if ( $WriteCaption ) - { - if ( $CaptionAlign == CAPTION_LEFT_TOP ) - { $X = $this->GraphAreaX1 + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLELEFT; } - else - { $X = $this->GraphAreaX2 - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLERIGHT; } - - $this->drawText($X,$YPos,$Caption,$CaptionSettings); - } - } - - return(array("Y"=>$YPos)); - } - - if ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) - { - $XPos = $this->scaleComputeY($Value,array("AxisID"=>$AxisID)); - if ( $XPos >= $this->GraphAreaX1 && $XPos <= $this->GraphAreaX2 ) - { - $this->drawLine($XPos,$this->GraphAreaY1,$XPos,$this->GraphAreaY2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); - - if ( $Wide ) - { - $this->drawLine($XPos-1,$this->GraphAreaY1,$XPos-1,$this->GraphAreaY2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); - $this->drawLine($XPos+1,$this->GraphAreaY1,$XPos+1,$this->GraphAreaY2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); - } - - if ( $WriteCaption ) - { - if ( $CaptionAlign == CAPTION_LEFT_TOP ) - { $Y = $this->GraphAreaY1 + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_TOPMIDDLE; } - else - { $Y = $this->GraphAreaY2 - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_BOTTOMMIDDLE; } - - $CaptionSettings["Align"] = TEXT_ALIGN_TOPMIDDLE; - $this->drawText($XPos,$Y,$Caption,$CaptionSettings); - } - } - - return(array("Y"=>$XPos)); - } - } - - /* Draw a threshold with the computed scale */ - function drawThresholdArea($Value1,$Value2,$Format="") - { - $AxisID = isset($Format["AxisID"]) ? $Format["AxisID"] : 0; - $R = isset($Format["R"]) ? $Format["R"] : 255; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 20; - $Border = isset($Format["Border"]) ? $Format["Border"] : TRUE; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha + 20; - $BorderTicks = isset($Format["BorderTicks"]) ? $Format["BorderTicks"] : 2; - - if ($BorderAlpha >100) { $BorderAlpha = 100;} - - $Data = $this->DataSet->getData(); - if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - $YPos1 = $this->scaleComputeY($Value1,array("AxisID"=>$AxisID)); - $YPos2 = $this->scaleComputeY($Value2,array("AxisID"=>$AxisID)); - - if ( $YPos1 > $this->GraphAreaY2 ) { $YPos1 = $this->GraphAreaY2; } if ( $YPos1 < $this->GraphAreaY1 ) { $YPos1 = $this->GraphAreaY1; } - if ( $YPos2 > $this->GraphAreaY2 ) { $YPos2 = $this->GraphAreaY2; } if ( $YPos2 < $this->GraphAreaY1 ) { $YPos2 = $this->GraphAreaY1; } - - $this->drawFilledRectangle($this->GraphAreaX1+1,$YPos1,$this->GraphAreaX2-1,$YPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - if ( $Border ) - { - $this->drawLine($this->GraphAreaX1+1,$YPos1,$this->GraphAreaX2-1,$YPos1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); - $this->drawLine($this->GraphAreaX1+1,$YPos2,$this->GraphAreaX2-1,$YPos2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); - } - return(array("Y1"=>$YPos1,"Y2"=>$YPos2)); - } - - if ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) - { - $XPos1 = $this->scaleComputeY($Value1,array("AxisID"=>$AxisID)); - $XPos2 = $this->scaleComputeY($Value2,array("AxisID"=>$AxisID)); - - if ( $XPos1 > $this->GraphAreaX2 ) { $XPos1 = $this->GraphAreaX2; } if ( $XPos1 < $this->GraphAreaX1 ) { $XPos1 = $this->GraphAreaX1; } - if ( $XPos2 > $this->GraphAreaX2 ) { $XPos2 = $this->GraphAreaX2; } if ( $XPos2 < $this->GraphAreaX1 ) { $XPos2 = $this->GraphAreaX1; } - - $this->drawFilledRectangle($XPos1,$this->GraphAreaY1+1,$XPos2,$this->GraphAreaY2-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); - if ( $Border ) - { - $this->drawLine($XPos1,$this->GraphAreaY1+1,$XPos1,$this->GraphAreaY2-1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); - $this->drawLine($XPos2,$this->GraphAreaY1+1,$XPos2,$this->GraphAreaY2-1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); - } - return(array("Y1"=>$XPos1,"Y2"=>$XPos2)); - } - } - - function scaleGetXSettings() - { - $Data = $this->DataSet->getData(); - foreach($Data["Axis"] as $AxisID => $Settings) - { - if ( $Settings["Identity"] == AXIS_X ) - { - $Rows = $Settings["Rows"]; - - return(array($Settings["Margin"],$Rows)); - } - } - } - - function scaleComputeY($Values,$Option="",$ReturnOnly0Height=FALSE) - { - $AxisID = isset($Option["AxisID"]) ? $Option["AxisID"] : 0; - $SerieName = isset($Option["SerieName"]) ? $Option["SerieName"] : NULL; - - $Data = $this->DataSet->getData(); - if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } - - if ( $SerieName != NULL ) { $AxisID = $Data["Series"][$SerieName]["Axis"]; } - if ( !is_array($Values) ) { $tmp = $Values; $Values = ""; $Values[0] = $tmp; } - - $Result = ""; - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Data["Axis"][$AxisID]["Margin"]*2; - $ScaleHeight = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; - $Step = $Height / $ScaleHeight; - - if ( $ReturnOnly0Height ) - { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $Step * $Value; } } } - else - { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $this->GraphAreaY2 - $Data["Axis"][$AxisID]["Margin"] - ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); } } } - } - else - { - $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Data["Axis"][$AxisID]["Margin"]*2; - $ScaleWidth = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; - $Step = $Width / $ScaleWidth; - - if ( $ReturnOnly0Height ) - { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $Step * $Value; } } } - else - { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $this->GraphAreaX1 + $Data["Axis"][$AxisID]["Margin"] + ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); } } } - } - - if ( count($Result) == 1 ) - return($Result[0]); - else - return($Result); - } - - /* Format the axis values */ - function scaleFormat($Value,$Mode=NULL,$Format=NULL,$Unit=NULL) - { - if ( $Mode == AXIS_FORMAT_DATE ) - { if ( $Format == NULL ) { $Pattern = "d/m/Y"; } else { $Pattern = $Format; } return(date($Pattern,$Value)); } - - if ( $Mode == AXIS_FORMAT_TIME ) - { if ( $Format == NULL ) { $Pattern = "H:i:s"; } else { $Pattern = $Format; } return(date($Pattern,$Value)); } - - if ( $Mode == AXIS_FORMAT_CURRENCY ) - { return($Format.number_format($Value,2)); } - - if ( $Mode == AXIS_FORMAT_METRIC ) - { - if (abs($Value) >= 1000000000) - return(round($Value/1000000000,$Format)."G".$Unit); - if (abs($Value) >= 1000000) - return(round($Value/1000000,$Format)."M".$Unit); - elseif (abs($Value) >= 1000) - return(round($Value/1000,$Format)."K".$Unit); - - } - // ARTICA-PANDORA HACK BEGIN - if ( $Mode == AXIS_FORMAT_TWO_SIGNIFICANT ) - { - // Display only two significant numbers - if ($Value != 0) { - $multiplier = floor(log(abs($Value), 10)) - 1; - $Value = round($Value/pow(10, $multiplier), 0) * pow(10, $multiplier); - } - if (abs($Value) >= 1000000000) - return(round($Value/1000000000,$Format)."G".$Unit); - if (abs($Value) >= 1000000) - return(round($Value/1000000,$Format)."M".$Unit); - elseif (abs($Value) >= 1000) - return(round($Value/1000,$Format)."K".$Unit); - } - // ARTICA-PANDORA HACK END - return($Value.$Unit); - } - - /* Write Max value on a chart */ - function writeBounds($Type=BOUND_BOTH,$Format=NULL) - { - $MaxLabelTxt = isset($Format["MaxLabelTxt"]) ? $Format["MaxLabelTxt"] : "max="; - $MinLabelTxt = isset($Format["MinLabelTxt"]) ? $Format["MinLabelTxt"] : "min="; - $Decimals = isset($Format["Decimals"]) ? $Format["Decimals"] : 1; - $ExcludedSeries = isset($Format["ExcludedSeries"]) ? $Format["ExcludedSeries"] : ""; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 4; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $MaxDisplayR = isset($Format["MaxDisplayR"]) ? $Format["MaxDisplayR"] : 0; - $MaxDisplayG = isset($Format["MaxDisplayG"]) ? $Format["MaxDisplayG"] : 0; - $MaxDisplayB = isset($Format["MaxDisplayB"]) ? $Format["MaxDisplayB"] : 0; - $MinDisplayR = isset($Format["MinDisplayR"]) ? $Format["MinDisplayR"] : 255; - $MinDisplayG = isset($Format["MinDisplayG"]) ? $Format["MinDisplayG"] : 255; - $MinDisplayB = isset($Format["MinDisplayB"]) ? $Format["MinDisplayB"] : 255; - $MinLabelPos = isset($Format["MinLabelPos"]) ? $Format["MinLabelPos"] : BOUND_LABEL_POS_AUTO; - $MaxLabelPos = isset($Format["MaxLabelPos"]) ? $Format["MaxLabelPos"] : BOUND_LABEL_POS_AUTO; - $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : TRUE; - $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : FALSE; - $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 3; - $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : TRUE; - $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 3; - $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; - $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; - $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; - $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 20; - $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; - $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 255; - $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 255; - $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 255; - $BoxBorderAlpha = isset($Format["BoxBorderAlpha"]) ? $Format["BoxBorderAlpha"] : 100; - - $CaptionSettings = array("DrawBox"=>$DrawBox,"DrawBoxBorder"=>$DrawBoxBorder,"BorderOffset"=>$BorderOffset,"BoxRounded"=>$BoxRounded,"RoundedRadius"=>$RoundedRadius, - "BoxR"=>$BoxR,"BoxG"=>$BoxG,"BoxB"=>$BoxB,"BoxAlpha"=>$BoxAlpha,"BoxSurrounding"=>$BoxSurrounding, - "BoxBorderR"=>$BoxBorderR,"BoxBorderG"=>$BoxBorderG,"BoxBorderB"=>$BoxBorderB,"BoxBorderAlpha"=>$BoxBorderAlpha); - - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - $Data = $this->DataSet->getData(); - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] && !isset($ExcludedSeries[$SerieName])) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $MinValue = $this->DataSet->getMin($SerieName); - $MaxValue = $this->DataSet->getMax($SerieName); - - $MinPos = VOID; $MaxPos = VOID; - foreach($Serie["Data"] as $Key => $Value) - { - if ( $Value == $MinValue && $MinPos == VOID ) { $MinPos = $Key; } - if ( $Value == $MaxValue ) { $MaxPos = $Key; } - } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; - $X = $this->GraphAreaX1 + $XMargin; - $SerieOffset = isset($Serie["XOffset"]) ? $Serie["XOffset"] : 0; - - if ( $Type == BOUND_MAX || $Type == BOUND_BOTH ) - { - if ( $MaxLabelPos == BOUND_LABEL_POS_TOP || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue >= 0) ) { $YPos = $PosArray[$MaxPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_BOTTOMMIDDLE; } - if ( $MaxLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue < 0) ) { $YPos = $PosArray[$MaxPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_TOPMIDDLE; } - - $XPos = $X + $MaxPos*$XStep + $SerieOffset; - $Label = $MaxLabelTxt.$this->scaleFormat(round($MaxValue,$Decimals),$Mode,$Format,$Unit); - - $TxtPos = $this->getTextBox($XPos,$YPos,$this->FontName,$this->FontSize,0,$Label); - $XOffset = 0; $YOffset = 0; - if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = (($this->GraphAreaX1 - $TxtPos[0]["X"])/2); } - if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -(($TxtPos[1]["X"] - $this->GraphAreaX2)/2); } - if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = $this->GraphAreaY1 - $TxtPos[2]["Y"]; } - if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -($TxtPos[0]["Y"] - $this->GraphAreaY2); } - - $CaptionSettings["R"] = $MaxDisplayR; $CaptionSettings["G"] = $MaxDisplayG; - $CaptionSettings["B"] = $MaxDisplayB; $CaptionSettings["Align"] = $Align; - - $this->drawText($XPos+$XOffset,$YPos+$YOffset,$Label,$CaptionSettings); - } - - if ( $Type == BOUND_MIN || $Type == BOUND_BOTH ) - { - if ( $MinLabelPos == BOUND_LABEL_POS_TOP || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue >= 0) ) { $YPos = $PosArray[$MinPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_BOTTOMMIDDLE; } - if ( $MinLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue < 0) ) { $YPos = $PosArray[$MinPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_TOPMIDDLE; } - - $XPos = $X + $MinPos*$XStep + $SerieOffset; - $Label = $MinLabelTxt.$this->scaleFormat(round($MinValue,$Decimals),$Mode,$Format,$Unit); - - $TxtPos = $this->getTextBox($XPos,$YPos,$this->FontName,$this->FontSize,0,$Label); - $XOffset = 0; $YOffset = 0; - if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = (($this->GraphAreaX1 - $TxtPos[0]["X"])/2); } - if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -(($TxtPos[1]["X"] - $this->GraphAreaX2)/2); } - if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = $this->GraphAreaY1 - $TxtPos[2]["Y"]; } - if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -($TxtPos[0]["Y"] - $this->GraphAreaY2); } - - $CaptionSettings["R"] = $MinDisplayR; $CaptionSettings["G"] = $MinDisplayG; - $CaptionSettings["B"] = $MinDisplayB; $CaptionSettings["Align"] = $Align; - - $this->drawText($XPos+$XOffset,$YPos-$DisplayOffset+$YOffset,$Label,$CaptionSettings); - } - } - else - { - $XStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; - $X = $this->GraphAreaY1 + $XMargin; - $SerieOffset = isset($Serie["XOffset"]) ? $Serie["XOffset"] : 0; - - if ( $Type == BOUND_MAX || $Type == BOUND_BOTH ) - { - if ( $MaxLabelPos == BOUND_LABEL_POS_TOP || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue >= 0) ) { $YPos = $PosArray[$MaxPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLELEFT; } - if ( $MaxLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue < 0) ) { $YPos = $PosArray[$MaxPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLERIGHT; } - - $XPos = $X + $MaxPos*$XStep + $SerieOffset; - $Label = $MaxLabelTxt.$this->scaleFormat($MaxValue,$Mode,$Format,$Unit); - - $TxtPos = $this->getTextBox($YPos,$XPos,$this->FontName,$this->FontSize,0,$Label); - $XOffset = 0; $YOffset = 0; - if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = $this->GraphAreaX1 - $TxtPos[0]["X"]; } - if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -($TxtPos[1]["X"] - $this->GraphAreaX2); } - if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = ($this->GraphAreaY1 - $TxtPos[2]["Y"])/2; } - if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -(($TxtPos[0]["Y"] - $this->GraphAreaY2)/2);} - - $CaptionSettings["R"] = $MaxDisplayR; $CaptionSettings["G"] = $MaxDisplayG; - $CaptionSettings["B"] = $MaxDisplayB; $CaptionSettings["Align"] = $Align; - - $this->drawText($YPos+$XOffset,$XPos+$YOffset,$Label,$CaptionSettings); - } - - if ( $Type == BOUND_MIN || $Type == BOUND_BOTH ) - { - if ( $MinLabelPos == BOUND_LABEL_POS_TOP || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue >= 0) ) { $YPos = $PosArray[$MinPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLELEFT; } - if ( $MinLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue < 0) ) { $YPos = $PosArray[$MinPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLERIGHT; } - - $XPos = $X + $MinPos*$XStep + $SerieOffset; - $Label = $MinLabelTxt.$this->scaleFormat($MinValue,$Mode,$Format,$Unit); - - $TxtPos = $this->getTextBox($YPos,$XPos,$this->FontName,$this->FontSize,0,$Label); - $XOffset = 0; $YOffset = 0; - if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = $this->GraphAreaX1 - $TxtPos[0]["X"]; } - if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -($TxtPos[1]["X"] - $this->GraphAreaX2); } - if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = ($this->GraphAreaY1 - $TxtPos[2]["Y"])/2; } - if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -(($TxtPos[0]["Y"] - $this->GraphAreaY2)/2);} - - $CaptionSettings["R"] = $MinDisplayR; $CaptionSettings["G"] = $MinDisplayG; - $CaptionSettings["B"] = $MinDisplayB; $CaptionSettings["Align"] = $Align; - - $this->drawText($YPos+$XOffset,$XPos+$YOffset,$Label,$CaptionSettings); - } - } - } - } - } - - /* Draw a plot chart */ - function drawPlotChart($Format=NULL) - { - $PlotSize = isset($Format["PlotSize"]) ? $Format["PlotSize"] : 3; - $PlotBorder = isset($Format["PlotBorder"]) ? $Format["PlotBorder"] : FALSE; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 50; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 50; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 50; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 30; - $BorderSize = isset($Format["BorderSize"]) ? $Format["BorderSize"] : 2; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 4; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; - if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } - if ( isset($Serie["Picture"]) ) - { $Picture = $Serie["Picture"]; list($PicWidth,$PicHeight,$PicType) = $this->getPicInfo($Picture); } - else { $Picture = NULL; $PicOffset = 0; } - - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - if ( $Picture != NULL ) { $PicOffset = $PicHeight / 2; $PlotSize = 0; } - $X = $this->GraphAreaX1 + $XMargin; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - foreach($PosArray as $Key => $Y) - { - if ( $DisplayValues ) - $this->drawText($X,$Y-$DisplayOffset-$PlotSize-$BorderSize-$PicOffset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - - if ( $Y != VOID ) - { - if ( $Picture != NULL ) - { $this->drawFromPicture($PicType,$Picture,$X-$PicWidth/2,$Y-$PicHeight/2); } - else - { - if ( $PlotBorder ) { $this->drawFilledCircle($X,$Y,$PlotSize+$BorderSize,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } - $this->drawFilledCircle($X,$Y,$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - } - $X = $X + $XStep; - } - } - else - { - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - if ( $Picture != NULL ) { $PicOffset = $PicWidth / 2; $PlotSize = 0; } - $Y = $this->GraphAreaY1 + $XMargin; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - foreach($PosArray as $Key => $X) - { - if ( $DisplayValues ) - $this->drawText($X+$DisplayOffset+$PlotSize+$BorderSize+$PicOffset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - - if ( $X != VOID ) - { - if ( $Picture != NULL ) - { $this->drawFromPicture($PicType,$Picture,$X-$PicWidth/2,$Y-$PicHeight/2); } - else - { - if ( $PlotBorder ) { $this->drawFilledCircle($X,$Y,$PlotSize+$BorderSize,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } - $this->drawFilledCircle($X,$Y,$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - } - $Y = $Y + $YStep; - } - } - } - } - } - - /* Draw a spline chart */ - function drawSplineChart($Format=NULL) - { - $BreakVoid = isset($Format["BreakVoid"]) ? $Format["BreakVoid"] : TRUE; - $VoidTicks = isset($Format["VoidTicks"]) ? $Format["VoidTicks"] : 4; - $BreakR = isset($Format["BreakR"]) ? $Format["BreakR"] : NULL; // 234 - $BreakG = isset($Format["BreakG"]) ? $Format["BreakG"] : NULL; // 55 - $BreakB = isset($Format["BreakB"]) ? $Format["BreakB"] : NULL; // 26 - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - - $Data = $this->DataSet->getData(); - - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; - - if ( $BreakR == NULL ) - $BreakSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks); - else - $BreakSettings = array("R"=>$BreakR,"G"=>$BreakG,"B"=>$BreakB,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); - - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; $WayPoints = ""; - $Force = $XStep / 5; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; $LastX = 1; $LastY = 1; - foreach($PosArray as $Key => $Y) - { - if ( $DisplayValues ) - $this->drawText($X,$Y-$DisplayOffset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - - if ( $Y == VOID && $LastY != NULL ) - { $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); $WayPoints = ""; } - - if ( $Y != VOID && $LastY == NULL && $LastGoodY != NULL && !$BreakVoid ) - { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); } - - if ( $Y != VOID ) - $WayPoints[] = array($X,$Y); - - if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } - if ( $Y == VOID ) { $Y = NULL; } - - $LastX = $X; $LastY = $Y; - $X = $X + $XStep; - } - $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); - } - else - { - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; $WayPoints = ""; - $Force = $YStep / 5; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; $LastX = 1; $LastY = 1; - foreach($PosArray as $Key => $X) - { - if ( $DisplayValues ) - $this->drawText($X+$DisplayOffset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - - if ( $X == VOID && $LastX != NULL ) - { $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); $WayPoints = ""; } - - if ( $X != VOID && $LastX == NULL && $LastGoodX != NULL && !$BreakVoid ) - { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); } - - if ( $X != VOID ) - $WayPoints[] = array($X,$Y); - - if ( $X != VOID ) { $LastGoodX = $X; $LastGoodY = $Y; } - if ( $X == VOID ) { $X = NULL; } - - $LastX = $X; $LastY = $Y; - $Y = $Y + $YStep; - } - $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); - } - } - } - } - - /* Draw a filled spline chart */ - function drawFilledSplineChart($Format=NULL) - { - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - if ( $AroundZero ) { $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); } - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; $WayPoints = ""; - $Force = $XStep / 5; - - if ( !$AroundZero ) { $YZero = $this->GraphAreaY2-1; } - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } - - $LastX = ""; $LastY = ""; - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - foreach($PosArray as $Key => $Y) - { - if ( $DisplayValues ) - $this->drawText($X,$Y-$DisplayOffset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - - if ( $Y == VOID ) - { - $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); - - if ( $Area != "" ) - { - foreach ($Area as $key => $Points) - { - $Corners = ""; $Corners[] = $Area[$key][0]["X"]; $Corners[] = $YZero; - foreach($Points as $subKey => $Point) - { - if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } - $Corners[] = $Point["Y"]+1; - } - $Corners[] = $Points[$subKey]["X"]-1; $Corners[] = $YZero; - - $this->drawPolygon($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE)); - } - $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - - $WayPoints = ""; - } - else - $WayPoints[] = array($X,$Y-.5); /* -.5 for AA visual fix */ - - $X = $X + $XStep; - } - $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); - - if ( $Area != "" ) - { - foreach ($Area as $key => $Points) - { - $Corners = ""; $Corners[] = $Area[$key][0]["X"]; $Corners[] = $YZero; - foreach($Points as $subKey => $Point) - { - if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } - $Corners[] = $Point["Y"]+1; - } - $Corners[] = $Points[$subKey]["X"]-1; $Corners[] = $YZero; - - $this->drawPolygon($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE)); - } - $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - } - else - { - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; $WayPoints = ""; - $Force = $YStep / 5; - - if ( !$AroundZero ) { $YZero = $this->GraphAreaX1+1; } - if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } - if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - foreach($PosArray as $Key => $X) - { - if ( $DisplayValues ) - $this->drawText($X+$DisplayOffset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - - if ( $X == VOID ) - { - $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); - - if ( $Area != "" ) - { - foreach ($Area as $key => $Points) - { - $Corners = ""; $Corners[] = $YZero; $Corners[] = $Area[$key][0]["Y"]; - foreach($Points as $subKey => $Point) - { - if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } - $Corners[] = $Point["Y"]; - } - $Corners[] = $YZero; $Corners[] = $Points[$subKey]["Y"]-1; - - $this->drawPolygon($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE)); - } - $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - - $WayPoints = ""; - } - else - $WayPoints[] = array($X,$Y); - - $Y = $Y + $YStep; - } - $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); - - if ( $Area != "" ) - { - foreach ($Area as $key => $Points) - { - $Corners = ""; $Corners[] = $YZero; $Corners[] = $Area[$key][0]["Y"]; - foreach($Points as $subKey => $Point) - { - if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } - $Corners[] = $Point["Y"]; - } - $Corners[] = $YZero; $Corners[] = $Points[$subKey]["Y"]-1; - - $this->drawPolygon($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE)); - } - $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); - } - - } - } - } - } - - /* Draw a line chart */ - function drawLineChart($Format=NULL) - { - $BreakVoid = isset($Format["BreakVoid"]) ? $Format["BreakVoid"] : TRUE; - $VoidTicks = isset($Format["VoidTicks"]) ? $Format["VoidTicks"] : 4; - $BreakR = isset($Format["BreakR"]) ? $Format["BreakR"] : NULL; - $BreakG = isset($Format["BreakG"]) ? $Format["BreakG"] : NULL; - $BreakB = isset($Format["BreakB"]) ? $Format["BreakB"] : NULL; - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; - - if ( $BreakR == NULL ) - $BreakSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); - else - $BreakSettings = array("R"=>$BreakR,"G"=>$BreakG,"B"=>$BreakB,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); - - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; - foreach($PosArray as $Key => $Y) - { - if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) - { - if ( $Serie["Data"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } - $this->drawText($X,$Y-$Offset-$Weight,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); - } - - if ( $Y != VOID && $LastX != NULL && $LastY != NULL ) - $this->drawLine($LastX,$LastY,$X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); - - if ( $Y != VOID && $LastY == NULL && $LastGoodY != NULL && !$BreakVoid ) - { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); $LastGoodY = NULL; } - - if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } - if ( $Y == VOID ) { $Y = NULL; } - - $LastX = $X; $LastY = $Y; - $X = $X + $XStep; - } - } - else - { - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; - foreach($PosArray as $Key => $X) - { - if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) - { $this->drawText($X+$DisplayOffset+$Weight,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } - - if ( $X != VOID && $LastX != NULL && $LastY != NULL ) - $this->drawLine($LastX,$LastY,$X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); - - if ( $X != VOID && $LastX == NULL && $LastGoodY != NULL && !$BreakVoid ) - { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); $LastGoodY = NULL; } - - if ( $X != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } - if ( $X == VOID ) { $X = NULL; } - - $LastX = $X; $LastY = $Y; - $Y = $Y + $YStep; - } - } - } - } - } - - /* Draw a step chart */ - function drawStepChart($Format=NULL) - { - $BreakVoid = isset($Format["BreakVoid"]) ? $Format["BreakVoid"] : FALSE; - $ReCenter = isset($Format["ReCenter"]) ? $Format["ReCenter"] : TRUE; - $VoidTicks = isset($Format["VoidTicks"]) ? $Format["VoidTicks"] : 4; - $BreakR = isset($Format["BreakR"]) ? $Format["BreakR"] : NULL; - $BreakG = isset($Format["BreakG"]) ? $Format["BreakG"] : NULL; - $BreakB = isset($Format["BreakB"]) ? $Format["BreakB"] : NULL; - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] :FALSE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - $ScaleModeAuto = isset($Format["ScaleModeAuto"]) ? $Format["ScaleModeAuto"] : FALSE; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; - - if ( $BreakR == NULL ) - $BreakSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); - else - $BreakSettings = array("R"=>$BreakR,"G"=>$BreakG,"B"=>$BreakB,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); - - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight); - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - $Width = $this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2; - $Height = $this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2; - if ( $ScaleModeAuto && isset($Data["Series"][$Data["Abscissa"]]["Data"][0]) ) { - $AbscissaScaleValueMin = $Data["Series"][$Data["Abscissa"]]["Data"][0]; - } else { - $AbscissaScaleValueMin = 0; - } - if ( $ScaleModeAuto && isset($Data["Series"][$Data["Abscissa"]]["Data"][$XDivs]) ) { - $AbscissaScaleValueMax = $Data["Series"][$Data["Abscissa"]]["Data"][$XDivs]; - } else { - $AbscissaScaleValueMax = $Width; - } - $AbscissaScaleValueWidth = $AbscissaScaleValueMax - $AbscissaScaleValueMin; - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) { - if ($AbscissaScaleValueWidth > 0) - $AbscissaScaleFactor = $AbscissaScaleValueWidth / $Width; - else - $AbscissaScaleFactor = 1; - } else { - if ($AbscissaScaleValueWidth > 0) - $AbscissaScaleFactor = $AbscissaScaleValueWidth / $Height; - else - $AbscissaScaleFactor = 1; - } - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; $Init = FALSE; - foreach($PosArray as $Key => $Y) - { - if ($ScaleModeAuto) { - $AbscissaScaleValue = $Data["Series"][$Data["Abscissa"]]["Data"][$Key] - $AbscissaScaleValueMin; - $X = $this->GraphAreaX1 + $XMargin + $AbscissaScaleValue / $AbscissaScaleFactor; - } - - if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) - { - if ( $Y <= $LastY ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } - $this->drawText($X,$Y-$Offset-$Weight,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); - } - - if ( $Y != VOID && $LastX != NULL && $LastY != NULL ) - { - $this->drawLine($LastX,$LastY,$X,$LastY,$Color); - $this->drawLine($X,$LastY,$X,$Y,$Color); - if ( $ReCenter && $X+$XStep < $this->GraphAreaX2 - $XMargin ) { $this->drawLine($X,$Y,$X+$XStep,$Y,$Color); } - } - - if ( $Y != VOID && $LastY == NULL && $LastGoodY != NULL && !$BreakVoid ) - { - if ( $ReCenter ) - $this->drawLine($LastGoodX+$XStep,$LastGoodY,$X,$LastGoodY,$BreakSettings); - else - $this->drawLine($LastGoodX,$LastGoodY,$X,$LastGoodY,$BreakSettings); - - $this->drawLine($X,$LastGoodY,$X,$Y,$BreakSettings); - $LastGoodY = NULL; - } - elseif( !$BreakVoid && $LastGoodY == NULL && $Y != VOID ) - $this->drawLine($this->GraphAreaX1 + $XMargin,$Y,$X,$Y,$BreakSettings); - - if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } - if ( $Y == VOID ) { $Y = NULL; } - - if ( !$Init && $ReCenter ) { $X = $X - $XStep/2; $Init = TRUE; } - $LastX = $X; $LastY = $Y; - if ( $LastX < $this->GraphAreaX1 + $XMargin ) { $LastX = $this->GraphAreaX1 + $XMargin; } - - if (!$ScaleModeAuto) { - $X = $X + $XStep; - } - } - if ( $ReCenter ) { $this->drawLine($LastX,$LastY,$this->GraphAreaX2 - $XMargin,$LastY,$Color); } - } - else - { - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; $Init = FALSE; - foreach($PosArray as $Key => $X) - { - if ($ScaleModeAuto) { - $AbscissaScaleValue = $Data["Series"][$Data["Abscissa"]]["Data"][$Key] - $AbscissaScaleValueMin; - $Y = $this->GraphAreaY1 + $XMargin + $AbscissaScaleValue / $AbscissaScaleFactor; - } - - if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) - { - if ( $X >= $LastX ) { $Align = TEXT_ALIGN_MIDDLELEFT; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_MIDDLERIGHT; $Offset = -$DisplayOffset; } - $this->drawText($X+$Offset+$Weight,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); - } - - if ( $X != VOID && $LastX != NULL && $LastY != NULL ) - { - $this->drawLine($LastX,$LastY,$LastX,$Y,$Color); - $this->drawLine($LastX,$Y,$X,$Y,$Color); - } - - if ( $X != VOID && $LastX == NULL && $LastGoodY != NULL && !$BreakVoid ) - { - $this->drawLine($LastGoodX,$LastGoodY,$LastGoodX,$LastGoodY+$YStep,$Color); - - $this->drawLine($LastGoodX,$LastGoodY+$YStep,$LastGoodX,$Y,$BreakSettings); - $this->drawLine($LastGoodX,$Y,$X,$Y,$BreakSettings); - $LastGoodY = NULL; - } - elseif ( $X != VOID && $LastGoodY == NULL && !$BreakVoid ) - $this->drawLine($X,$this->GraphAreaY1 + $XMargin,$X,$Y,$BreakSettings); - - if ( $X != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } - if ( $X == VOID ) { $X = NULL; } - - if ( !$Init && $ReCenter ) { $Y = $Y - $YStep/2; $Init = TRUE; } - $LastX = $X; $LastY = $Y; - if ( $LastY < $this->GraphAreaY1 + $XMargin ) { $LastY = $this->GraphAreaY1 + $XMargin; } - - if (!$ScaleModeAuto) { - $Y = $Y + $YStep; - } - } - if ( $ReCenter ) { $this->drawLine($LastX,$LastY,$LastX,$this->GraphAreaY2 - $XMargin,$Color); } - } - } - } - } - - /* Draw a step chart */ - function drawFilledStepChart($Format=NULL) - { - $ReCenter = isset($Format["ReCenter"]) ? $Format["ReCenter"] : TRUE; - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] :FALSE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $ForceTransparency = isset($Format["ForceTransparency"]) ? $Format["ForceTransparency"] : -1; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; - $ScaleModeAuto = isset($Format["ScaleModeAuto"]) ? $Format["ScaleModeAuto"] : FALSE; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; - - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B); - if ( $ForceTransparency != -1 ) { $Color["Alpha"] = $ForceTransparency; } else { $Color["Alpha"] = $Alpha; } - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - $Width = $this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2; - $Height = $this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2; - if ( $ScaleModeAuto && isset($Data["Series"][$Data["Abscissa"]]["Data"][0]) ) { - $AbscissaScaleValueMin = $Data["Series"][$Data["Abscissa"]]["Data"][0]; - } else { - $AbscissaScaleValueMin = 0; - } - if ( $ScaleModeAuto && isset($Data["Series"][$Data["Abscissa"]]["Data"][$XDivs]) ) { - $AbscissaScaleValueMax = $Data["Series"][$Data["Abscissa"]]["Data"][$XDivs]; - } else { - $AbscissaScaleValueMax = $Width; - } - $AbscissaScaleValueWidth = $AbscissaScaleValueMax - $AbscissaScaleValueMin; - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) { - if ($AbscissaScaleValueWidth > 0) - $AbscissaScaleFactor = $AbscissaScaleValueWidth / $Width; - else - $AbscissaScaleFactor = 1; - } else { - if ($AbscissaScaleValueWidth > 0) - $AbscissaScaleFactor = $AbscissaScaleValueWidth / $Height; - else - $AbscissaScaleFactor = 1; - } - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } - - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !$AroundZero ) { $YZero = $this->GraphAreaY2-1; } - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; $Points = ""; $Init = FALSE; - foreach($PosArray as $Key => $Y) - { - if ($ScaleModeAuto) { - $AbscissaScaleValue = $Data["Series"][$Data["Abscissa"]]["Data"][$Key] - $AbscissaScaleValueMin; - $X = $this->GraphAreaX1 + $XMargin + $AbscissaScaleValue / $AbscissaScaleFactor; - } - - if ( $Y == VOID && $LastX != NULL && $LastY != NULL && $Points !="" ) - { - $Points[] = $LastX; $Points[] = $LastY; - $Points[] = $X; $Points[] = $LastY; - $Points[] = $X; $Points[] = $YZero; - $this->drawPolygon($Points,$Color); - $Points = ""; - } - - if ( $Y != VOID && $LastX != NULL && $LastY != NULL ) - { - if ( $Points == "") { $Points[] = $LastX; $Points[] = $YZero; } - $Points[] = $LastX; $Points[] = $LastY; - $Points[] = $X; $Points[] = $LastY; - $Points[] = $X; $Points[] = $Y; - } - - if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } - if ( $Y == VOID ) { $Y = NULL; } - - if ( !$Init && $ReCenter ) { $X = $X - $XStep/2; $Init = TRUE; } - $LastX = $X; $LastY = $Y; - if ( $LastX < $this->GraphAreaX1 + $XMargin ) { $LastX = $this->GraphAreaX1 + $XMargin; } - - if (!$ScaleModeAuto) { - $X = $X + $XStep; - } - } - - if ( $ReCenter ) - { - $Points[] = $LastX+$XStep/2; $Points[] = $LastY; - $Points[] = $LastX+$XStep/2; $Points[] = $YZero; - } - else - { $Points[] = $LastX; $Points[] = $YZero; } - - $this->drawPolygon($Points,$Color); - } - else - { - if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } - if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } - - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $LastGoodY = NULL; $LastGoodX = NULL; $Points = ""; - foreach($PosArray as $Key => $X) - { - if ($ScaleModeAuto) { - $AbscissaScaleValue = $Data["Series"][$Data["Abscissa"]]["Data"][$Key] - $AbscissaScaleValueMin; - $Y = $this->GraphAreaY1 + $XMargin + $AbscissaScaleValue / $AbscissaScaleFactor; - } - - if ( $X == VOID && $LastX != NULL && $LastY != NULL && $Points !="" ) - { - $Points[] = $LastX; $Points[] = $LastY; - $Points[] = $LastX; $Points[] = $Y; - $Points[] = $YZero; $Points[] = $Y; - $this->drawPolygon($Points,$Color); - $Points = ""; - } - - if ( $X != VOID && $LastX != NULL && $LastY != NULL ) - { - if ( $Points == "") { $Points[] = $YZero; $Points[] = $LastY; } - $Points[] = $LastX; $Points[] = $LastY; - $Points[] = $LastX; $Points[] = $Y; - $Points[] = $X; $Points[] = $Y; - } - - if ( $X != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } - if ( $X == VOID ) { $X = NULL; } - - if ( $LastX == NULL && $ReCenter ) { $Y = $Y - $YStep/2; } - $LastX = $X; $LastY = $Y; - if ( $LastY < $this->GraphAreaY1 + $XMargin ) { $LastY = $this->GraphAreaY1 + $XMargin; } - - if (!$ScaleModeAuto) { - $Y = $Y + $YStep; - } - } - - if ( $ReCenter ) - { - $Points[] = $LastX; $Points[] = $LastY+$YStep/2; - $Points[] = $YZero; $Points[] = $LastY+$YStep/2; - } - else - { $Points[] = $YZero; $Points[] = $LastY; } - - $this->drawPolygon($Points,$Color); - } - } - } - } - - /* Draw an area chart */ - function drawAreaChart($Format=NULL) - { - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayZeros = isset($Format["DisplayZeros"]) ? $Format["DisplayZeros"] : TRUE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - $ForceTransparency = isset($Format["ForceTransparency"]) ? $Format["ForceTransparency"] : 50; - $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; - $G = $Serie["Color"]["G"]; - $B = $Serie["Color"]["B"]; - if (isset($Serie["Color"]["BorderR"])) - $BorderR = $Serie["Color"]["BorderR"]; - else - $BorderR = $R / 1.5; //Set the same color for border, some dark. - if (isset($Serie["Color"]["BorderG"])) - $BorderG = $Serie["Color"]["BorderG"]; - else - $BorderG = $G / 1.5; //Set the same color for border, some dark. - if (isset($Serie["Color"]["BorderB"])) - $BorderB = $Serie["Color"]["BorderB"]; - else - $BorderB = $B / 1.5; //Set the same color for border, some dark. - $Alpha = $Serie["Color"]["Alpha"]; - $Ticks = $Serie["Ticks"]; - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - - $Areas = ""; $AreaID = 0; - $Areas[$AreaID][] = $this->GraphAreaX1 + $XMargin; - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } - - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $lastKey = 0; - foreach($PosArray as $Key => $Y) - { - // Hack to avoid draw zero values - if(isset($Serie["Data"][$Key + 1])) { - $nextKey = $Serie["Data"][$Key + 1]; - } - else { - $nextKey = -1; - } - if((!$DisplayZeros && $Serie["Data"][$Key] == 0 && $lastKey == 0 && $nextKey == 0 && $Key != 0)) { - $Y = VOID; - } - - $lastKey = $Serie["Data"][$Key]; - - if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) - { - if ( $Serie["Data"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } - $this->drawText($X,$Y-$Offset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); - } - - if ( $Y == VOID && isset($Areas[$AreaID]) ) - { - $Areas[$AreaID][] = $LastX; - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } - - $AreaID++; - } - elseif ($Y != VOID) - { - if ( !isset($Areas[$AreaID]) ) - { - $Areas[$AreaID][] = $X; - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } - } - - $Areas[$AreaID][] = $X; - $Areas[$AreaID][] = $Y; - } - - $LastX = $X; - $X = $X + $XStep; - } - $Areas[$AreaID][] = $LastX; - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } - - $Alpha = $ForceTransparency != -1 ? $ForceTransparency : $Alpha; - $Color = array("BorderR" => $BorderR, "BorderG" => $BorderG, "BorderB" => $BorderB, "R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); - foreach($Areas as $Key => $Points) - $this->drawPolygon($Points,$Color); - } - else - { - if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } - if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } - - $Areas = ""; $AreaID = 0; - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } - $Areas[$AreaID][] = $this->GraphAreaY1 + $XMargin; - - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - foreach($PosArray as $Key => $X) - { - if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) - { - if ( $Serie["Data"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } - $this->drawText($X+$Offset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); - } - - - if ( $X == VOID && isset($Areas[$AreaID]) ) - { - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } - $Areas[$AreaID][] = $LastY; - - $AreaID++; - } - elseif ($X != VOID) - { - if ( !isset($Areas[$AreaID]) ) - { - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } - $Areas[$AreaID][] = $Y; - } - - $Areas[$AreaID][] = $X; - $Areas[$AreaID][] = $Y; - } - - $LastX = $X; $LastY = $Y; - $Y = $Y + $YStep; - } - if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } - $Areas[$AreaID][] = $LastY; - - $Alpha = $ForceTransparency != -1 ? $ForceTransparency : $Alpha; - $Color = array("BorderR" => $BorderR, "BorderG" => $BorderG, "BorderB" => $BorderB, "R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); - foreach($Areas as $Key => $Points) - $this->drawPolygon($Points,$Color); - } - } - } - } - - - /* Draw a bar chart */ - function drawBarChart($Format=NULL) - { - $Floating0Serie = isset($Format["Floating0Serie"]) ? $Format["Floating0Serie"] : NULL; - $Floating0Value = isset($Format["Floating0Value"]) ? $Format["Floating0Value"] : NULL; - $Draw0Line = isset($Format["Draw0Line"]) ? $Format["Draw0Line"] : FALSE; - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayZeroValues = isset($Format["DisplayZeroValues"]) ? $Format["DisplayZeroValues"] : TRUE; - $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayFont = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontName; - $DisplaySize = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontSize; - $DisplayPos = isset($Format["DisplayPos"]) ? $Format["DisplayPos"] : LABEL_POS_OUTSIDE; - $DisplayShadow = isset($Format["DisplayShadow"]) ? $Format["DisplayShadow"] : TRUE; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; - $Interleave = isset($Format["Interleave"]) ? $Format["Interleave"] : .3; - $Rounded = isset($Format["Rounded"]) ? $Format["Rounded"] : FALSE; - $RoundRadius = isset($Format["RoundRadius"]) ? $Format["RoundRadius"] : 4; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; - $Gradient = isset($Format["Gradient"]) ? $Format["Gradient"] : FALSE; - $GradientMode = isset($Format["GradientMode"]) ? $Format["GradientMode"] : GRADIENT_SIMPLE; - $GradientAlpha = isset($Format["GradientAlpha"]) ? $Format["GradientAlpha"] : 20; - $GradientStartR = isset($Format["GradientStartR"]) ? $Format["GradientStartR"] : 255; - $GradientStartG = isset($Format["GradientStartG"]) ? $Format["GradientStartG"] : 255; - $GradientStartB = isset($Format["GradientStartB"]) ? $Format["GradientStartB"] : 255; - $GradientEndR = isset($Format["GradientEndR"]) ? $Format["GradientEndR"] : 0; - $GradientEndG = isset($Format["GradientEndG"]) ? $Format["GradientEndG"] : 0; - $GradientEndB = isset($Format["GradientEndB"]) ? $Format["GradientEndB"] : 0; - $TxtMargin = isset($Format["TxtMargin"]) ? $Format["TxtMargin"] : 6; - $OverrideColors = isset($Format["OverrideColors"]) ? $Format["OverrideColors"] : NULL; - $OverrideSurrounding = isset($Format["OverrideSurrounding"]) ? $Format["OverrideSurrounding"] : 30; - - if ( $OverrideColors != NULL ) { $OverrideColors = $this->validatePalette($OverrideColors,$OverrideSurrounding); } - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - $RestoreShadow = $this->Shadow; - - $SeriesCount = $this->countDrawableSeries(); - $CurrentSerie = 0; - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } - if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB); - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - if ( $Floating0Value != NULL ) - { $YZero = $this->scaleComputeY($Floating0Value,array("AxisID"=>$Serie["Axis"])); } - else - { $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); } - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } - - if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; - - if ( $AroundZero ) { $Y1 = $YZero; } else { $Y1 = $this->GraphAreaY2-1; } - if ( $XDivs == 0 ) { $XSize = ($this->GraphAreaX2-$this->GraphAreaX1)/($SeriesCount+$Interleave); } else { $XSize = ($XStep / ($SeriesCount+$Interleave) ); } - - $XOffset = -($XSize*$SeriesCount)/2 + $CurrentSerie * $XSize; - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = $XOffset + $XSize / 2; - - - if ( $Rounded || $BorderR != -1) { $XSpace = 1; } else { $XSpace = 0; } - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - - $ID = 0; - foreach($PosArray as $Key => $Y2) - { - if ( $Floating0Serie != NULL ) - { - if ( isset($Data["Series"][$Floating0Serie]["Data"][$Key]) ) - $Value = $Data["Series"][$Floating0Serie]["Data"][$Key]; - else { $Value = 0; } - - $YZero = $this->scaleComputeY($Value,array("AxisID"=>$Serie["Axis"])); - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } - - if ( $AroundZero ) { $Y1 = $YZero; } else { $Y1 = $this->GraphAreaY2-1; } - } - - if ( $OverrideColors != NULL ) - { if ( isset($OverrideColors[$ID]) ) { $Color = array("R"=>$OverrideColors[$ID]["R"],"G"=>$OverrideColors[$ID]["G"],"B"=>$OverrideColors[$ID]["B"],"Alpha"=>$OverrideColors[$ID]["Alpha"],"BorderR"=>$OverrideColors[$ID]["BorderR"],"BorderG"=>$OverrideColors[$ID]["BorderG"],"BorderB"=>$OverrideColors[$ID]["BorderB"]); } else { $Color = $this->getRandomColor(); } } - - if ( $Y2 != VOID ) - { - $BarHeight = $Y1 - $Y2; - - if ( $Serie["Data"][$Key] == 0 ) - $this->drawLine($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y1,$Color); - else - { - if ( $Rounded ) - $this->drawRoundedFilledRectangle($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,$RoundRadius,$Color); - else - { - $this->drawFilledRectangle($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,$Color); - - if ( $Gradient ) - { - $this->Shadow = FALSE; - - if ( $GradientMode == GRADIENT_SIMPLE ) - { - if ( $Serie["Data"][$Key] >= 0 ) - $GradienColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - else - $GradienColor = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); - - $this->drawGradientArea($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,DIRECTION_VERTICAL,$GradienColor); - } - elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) - { - $GradienColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); - $GradienColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - $XSpan = floor($XSize / 3); - - $this->drawGradientArea($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSpan-$XSpace,$Y2,DIRECTION_HORIZONTAL,$GradienColor1); - $this->drawGradientArea($X+$XOffset+$XSpan+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,DIRECTION_HORIZONTAL,$GradienColor2); - } - $this->Shadow = $RestoreShadow; - } - } - - if ( $Draw0Line ) - { - $Line0Color = array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20); - - if ( abs($Y1 - $Y2) > 3 ) { $Line0Width = 3; } else { $Line0Width = 1; } - if ( $Y1 - $Y2 < 0 ) { $Line0Width = -$Line0Width; } - - $this->drawFilledRectangle($X+$XOffset+$XSpace,floor($Y1),$X+$XOffset+$XSize-$XSpace,floor($Y1)-$Line0Width,$Line0Color); - $this->drawLine($X+$XOffset+$XSpace,floor($Y1),$X+$XOffset+$XSize-$XSpace,floor($Y1),$Line0Color); - } - } - - if ( $DisplayValues && $Serie["Data"][$Key] != VOID && ($DisplayZeroValues || $Serie["Data"][$Key] != 0)) - { - if ( $DisplayShadow ) { $this->Shadow = TRUE; } - - $Caption = $this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,90,$Caption); - $TxtHeight = $TxtPos[0]["Y"] - $TxtPos[1]["Y"] + $TxtMargin; - - if ( $DisplayPos == LABEL_POS_INSIDE && abs($TxtHeight) < abs($BarHeight) ) - { - $CenterX = (($X+$XOffset+$XSize-$XSpace)-($X+$XOffset+$XSpace))/2 + $X+$XOffset+$XSpace; - $CenterY = ($Y2-$Y1)/2 + $Y1; - - $this->drawText($CenterX,$CenterY,$Caption,array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"Angle"=>90)); - } - else - { - if ( $Serie["Data"][$Key] >= 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } - $this->drawText($X+$XOffset+$XSize/2,$Y2-$Offset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align,"FontSize"=>$DisplaySize)); - } - - $this->Shadow = $RestoreShadow; - } - } - - $X = $X + $XStep; - $ID++; - } - } - else - { - if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } - if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } - - if ( $XDivs == 0 ) { $YStep = 0; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - - $Y = $this->GraphAreaY1 + $XMargin; - - if ( $AroundZero ) { $X1 = $YZero; } else { $X1 = $this->GraphAreaX1+1; } - if ( $XDivs == 0 ) { $YSize = ($this->GraphAreaY2-$this->GraphAreaY1)/($SeriesCount+$Interleave); } else { $YSize = ($YStep / ($SeriesCount+$Interleave) ); } - - $YOffset = -($YSize*$SeriesCount)/2 + $CurrentSerie * $YSize; - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = $YOffset + $YSize / 2; - - if ( $Rounded || $BorderR != -1 ) { $YSpace = 1; } else { $YSpace = 0; } - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - - $ID = 0 ; - foreach($PosArray as $Key => $X2) - { - if ( $Floating0Serie != NULL ) - { - if ( isset($Data["Series"][$Floating0Serie]["Data"][$Key]) ) - $Value = $Data["Series"][$Floating0Serie]["Data"][$Key]; - else { $Value = 0; } - - $YZero = $this->scaleComputeY($Value,array("AxisID"=>$Serie["Axis"])); - if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } - if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } - if ( $AroundZero ) { $X1 = $YZero; } else { $X1 = $this->GraphAreaX1+1; } - } - - if ( $OverrideColors != NULL ) - { if ( isset($OverrideColors[$ID]) ) { $Color = array("R"=>$OverrideColors[$ID]["R"],"G"=>$OverrideColors[$ID]["G"],"B"=>$OverrideColors[$ID]["B"],"Alpha"=>$OverrideColors[$ID]["Alpha"],"BorderR"=>$OverrideColors[$ID]["BorderR"],"BorderG"=>$OverrideColors[$ID]["BorderG"],"BorderB"=>$OverrideColors[$ID]["BorderB"]); } else { $Color = $this->getRandomColor(); } } - - if ( $X2 != VOID ) - { - $BarWidth = $X2 - $X1; - - if ( $Serie["Data"][$Key] == 0 ) - $this->drawLine($X1,$Y+$YOffset+$YSpace,$X1,$Y+$YOffset+$YSize-$YSpace,$Color); - else - { - if ( $Rounded ) - $this->drawRoundedFilledRectangle($X1+1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSize-$YSpace,$RoundRadius,$Color); - else - { - $this->drawFilledRectangle($X1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSize-$YSpace,$Color); - - if ( $Gradient ) - { - $this->Shadow = FALSE; - - if ( $GradientMode == GRADIENT_SIMPLE ) - { - if ( $Serie["Data"][$Key] >= 0 ) - $GradienColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - else - $GradienColor = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); - - $this->drawGradientArea($X1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSize-$YSpace,DIRECTION_HORIZONTAL,$GradienColor); - } - elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) - { - $GradienColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); - $GradienColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - $YSpan = floor($YSize / 3); - - $this->drawGradientArea($X1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSpan-$YSpace,DIRECTION_VERTICAL,$GradienColor1); - $this->drawGradientArea($X1,$Y+$YOffset+$YSpan,$X2,$Y+$YOffset+$YSize-$YSpace,DIRECTION_VERTICAL,$GradienColor2); - } - $this->Shadow = $RestoreShadow; - } - } - - if ( $Draw0Line ) - { - $Line0Color = array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20); - - if ( abs($X1 - $X2) > 3 ) { $Line0Width = 3; } else { $Line0Width = 1; } - if ( $X2 - $X1 < 0 ) { $Line0Width = -$Line0Width; } - - $this->drawFilledRectangle(floor($X1),$Y+$YOffset+$YSpace,floor($X1)+$Line0Width,$Y+$YOffset+$YSize-$YSpace,$Line0Color); - $this->drawLine(floor($X1),$Y+$YOffset+$YSpace,floor($X1),$Y+$YOffset+$YSize-$YSpace,$Line0Color); - } - } - - if ( $DisplayValues && $Serie["Data"][$Key] != VOID && ($DisplayZeroValues || $Serie["Data"][$Key] != 0)) - { - if ( $DisplayShadow ) { $this->Shadow = TRUE; } - - $Caption = $this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); - $TxtWidth = $TxtPos[1]["X"] - $TxtPos[0]["X"] + $TxtMargin; - - if ( $DisplayPos == LABEL_POS_INSIDE && abs($TxtWidth) < abs($BarWidth) ) - { - $CenterX = ($X2-$X1)/2 + $X1; - $CenterY = (($Y+$YOffset+$YSize-$YSpace)-($Y+$YOffset+$YSpace))/2 + ($Y+$YOffset+$YSpace); - - $this->drawText($CenterX,$CenterY,$Caption,array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize)); - } - else - { - if ( $Serie["Data"][$Key] > 0 ) { $Align = TEXT_ALIGN_MIDDLELEFT; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_MIDDLERIGHT; $Offset = -$DisplayOffset; } - $this->drawText($X2+$Offset,$Y+$YOffset+$YSize/2,$Caption,array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align,"FontSize"=>$DisplaySize)); - } - - $this->Shadow = $RestoreShadow; - } - } - $Y = $Y + $YStep; - $ID++; - } - } - $CurrentSerie++; - } - } - } - - /* Draw a bar chart */ - function drawStackedBarChart($Format=NULL) - { - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayRound = isset($Format["DisplayRound"]) ? $Format["DisplayRound"] : 0; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayFont = isset($Format["DisplayFont"]) ? $Format["DisplayFont"] : $this->FontName; - $DisplaySize = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontSize; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - $Interleave = isset($Format["Interleave"]) ? $Format["Interleave"] : .5; - $Rounded = isset($Format["Rounded"]) ? $Format["Rounded"] : FALSE; - $RoundRadius = isset($Format["RoundRadius"]) ? $Format["RoundRadius"] : 4; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; - $Gradient = isset($Format["Gradient"]) ? $Format["Gradient"] : FALSE; - $GradientMode = isset($Format["GradientMode"]) ? $Format["GradientMode"] : GRADIENT_SIMPLE; - $GradientAlpha = isset($Format["GradientAlpha"]) ? $Format["GradientAlpha"] : 20; - $GradientStartR = isset($Format["GradientStartR"]) ? $Format["GradientStartR"] : 255; - $GradientStartG = isset($Format["GradientStartG"]) ? $Format["GradientStartG"] : 255; - $GradientStartB = isset($Format["GradientStartB"]) ? $Format["GradientStartB"] : 255; - $GradientEndR = isset($Format["GradientEndR"]) ? $Format["GradientEndR"] : 0; - $GradientEndG = isset($Format["GradientEndG"]) ? $Format["GradientEndG"] : 0; - $GradientEndB = isset($Format["GradientEndB"]) ? $Format["GradientEndB"] : 0; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - $RestoreShadow = $this->Shadow; - - $LastX = ""; $LastY = ""; - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = 255; $DisplayG = 255; $DisplayB = 255; } - if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"]),TRUE); - $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - $Color = array("TransCorner"=>TRUE,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB); - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; - - $XSize = ($XStep / (1+$Interleave) ); - $XOffset = -($XSize/2); - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - foreach($PosArray as $Key => $Height) - { - if ( $Height != VOID && $Serie["Data"][$Key] != 0 ) - { - if ( $Serie["Data"][$Key] > 0 ) { $Pos = "+"; } else { $Pos = "-"; } - - if ( !isset($LastY[$Key] ) ) { $LastY[$Key] = ""; } - if ( !isset($LastY[$Key][$Pos] ) ) { $LastY[$Key][$Pos] = $YZero; } - - $Y1 = $LastY[$Key][$Pos]; - $Y2 = $Y1 - $Height; - - if ( ($Rounded || $BorderR != -1) && ($Pos == "+" && $Y1 != $YZero) ) { $YSpaceUp = 1; } else { $YSpaceUp = 0; } - if ( ($Rounded || $BorderR != -1) && ($Pos == "-" && $Y1 != $YZero) ) { $YSpaceDown = 1; } else { $YSpaceDown = 0; } - - if ( $Rounded ) - $this->drawRoundedFilledRectangle($X+$XOffset,$Y1-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2,$RoundRadius,$Color); - else - { - $this->drawFilledRectangle($X+$XOffset,$Y1-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2,$Color); - - if ( $Gradient ) - { - $this->Shadow = FALSE; - - if ( $GradientMode == GRADIENT_SIMPLE ) - { - $GradientColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - $this->drawGradientArea($X+$XOffset-.5,$Y1-.5-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2+.5,DIRECTION_VERTICAL,$GradientColor); - } - elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) - { - $GradientColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); - $GradientColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - $XSpan = floor($XSize / 3); - - $this->drawGradientArea($X+$XOffset-.5,$Y1-.5-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSpan,$Y2+.5,DIRECTION_HORIZONTAL,$GradientColor1); - $this->drawGradientArea($X+$XSpan+$XOffset-.5,$Y1-.5-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2+.5,DIRECTION_HORIZONTAL,$GradientColor2); - } - $this->Shadow = $RestoreShadow; - } - } - - if ( $DisplayValues ) - { - $BarHeight = abs($Y2-$Y1); - - $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); - $TxtHeight = abs($TxtPos[2]["Y"] - $TxtPos[0]["Y"]); - - if ( $BarHeight > $TxtHeight ) - { - $XCenter = ( ($X+$XOffset+$XSize) - ($X+$XOffset) ) / 2 + $X+$XOffset; - $YCenter = ( ($Y2) - ($Y1-$YSpaceUp+$YSpaceDown) ) / 2 + $Y1-$YSpaceUp+$YSpaceDown; - - $this->drawText($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); - } - } - - $LastY[$Key][$Pos] = $Y2; - } - - $X = $X + $XStep; - } - } - else - { - if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } - if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } - - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; - - $YSize = $YStep / (1+$Interleave); - $YOffset = -($YSize/2); - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - foreach($PosArray as $Key => $Width) - { - if ( $Width != VOID && $Serie["Data"][$Key] != 0 ) - { - if ( $Serie["Data"][$Key] > 0 ) { $Pos = "+"; } else { $Pos = "-"; } - - if ( !isset($LastX[$Key] ) ) { $LastX[$Key] = ""; } - if ( !isset($LastX[$Key][$Pos] ) ) { $LastX[$Key][$Pos] = $YZero; } - - $X1 = $LastX[$Key][$Pos]; - $X2 = $X1 + $Width; - - if ( ($Rounded || $BorderR != -1) && ($Pos == "+" && $X1 != $YZero) ) { $XSpaceLeft = 2; } else { $XSpaceLeft = 0; } - if ( ($Rounded || $BorderR != -1) && ($Pos == "-" && $X1 != $YZero) ) { $XSpaceRight = 2; } else { $XSpaceRight = 0; } - - if ( $Rounded ) - $this->drawRoundedFilledRectangle($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSize,$RoundRadius,$Color); - else - { - $this->drawFilledRectangle($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSize,$Color); - - if ( $Gradient ) - { - $this->Shadow = FALSE; - - if ( $GradientMode == GRADIENT_SIMPLE ) - { - $GradientColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - $this->drawGradientArea($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSize,DIRECTION_HORIZONTAL,$GradientColor); - } - elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) - { - $GradientColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); - $GradientColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); - $YSpan = floor($YSize / 3); - - $this->drawGradientArea($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSpan,DIRECTION_VERTICAL,$GradientColor1); - $this->drawGradientArea($X1+$XSpaceLeft,$Y+$YOffset+$YSpan,$X2-$XSpaceRight,$Y+$YOffset+$YSize,DIRECTION_VERTICAL,$GradientColor2); - } - $this->Shadow = $RestoreShadow; - } - } - - if ( $DisplayValues ) - { - $BarWidth = abs($X2-$X1); - - $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); - $TxtWidth = abs($TxtPos[1]["X"] - $TxtPos[0]["X"]); - - if ( $BarWidth > $TxtWidth ) - { - $XCenter = ( $X2 - $X1 ) / 2 + $X1; - $YCenter = ( ($Y+$YOffset+$YSize) - ($Y+$YOffset) ) / 2 + $Y+$YOffset; - - $this->drawText($XCenter,$YCenter,$Caption,array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); - } - } - - $LastX[$Key][$Pos] = $X2; - } - - $Y = $Y + $YStep; - } - } - } - } - } - - /* Draw a bar chart */ - function drawStackedAreaChart($Format=NULL) - { - $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; - $DisplayRound = isset($Format["DisplayRound"]) ? $Format["DisplayRound"] : 0; - $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; - $DisplayFont = isset($Format["DisplayFont"]) ? $Format["DisplayFont"] : $this->FontName; - $DisplaySize = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontSize; - $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; - $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; - $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; - $ForceTransparency = isset($Format["ForceTransparency"]) ? $Format["ForceTransparency"] : 80; - - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - $RestoreShadow = $this->Shadow; - - /* Determine if we only have positive or negatives values */ - $Sign["+"] = 0; $Sign["-"] = 0; - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { foreach($Serie["Data"] as $Key => $Value) { if ($Value > 0) { $Sign["+"]++; } elseif ($Value < 0) { $Sign["-"]++; } } } - } - if ( $Sign["+"] == 0 || $Sign["-"] == 0 ) { $SingleWay = TRUE; } else { $SingleWay = FALSE; } - - $LastX = ""; $LastY = ""; - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; - - if ( $ForceTransparency != -1 ) { $Alpha = $ForceTransparency; } - if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = 255; $DisplayG = 255; $DisplayB = 255; } - if ( $Surrounding != NULL ) - { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } - else - { $BorderR = $R; $BorderG = $G; $BorderB = $B; } - - $AxisID = $Serie["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"]),TRUE); - $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); - - $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB,"SkipY"=>$YZero); - - if ( $SingleWay ) { unset($Color["SkipY"]); } - - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - - $PointsTop = ""; $PointsBottom = ""; $Labels = ""; $Pos = "+"; - foreach($PosArray as $Key => $Height) - { - if ( !isset($LastY[$Key] ) ) { $LastY[$Key] = ""; } - if ( !isset($LastY[$Key][$Pos] ) ) { $LastY[$Key][$Pos] = $YZero; } - - if ( $Height != VOID && $Serie["Data"][$Key] >= 0) - { - $Y1 = $LastY[$Key][$Pos]; - $Y2 = $Y1 - $Height; - - $PointsTop[] = $X; $PointsTop[] = $Y2; - $PointsBottom[] = $X; $PointsBottom[] = $Y1; - - if ( $DisplayValues ) - { - $BarHeight = abs($Y2-$Y1); - - $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); - $TxtHeight = abs($TxtPos[2]["Y"] - $TxtPos[0]["Y"]); - - if ( $BarHeight > $TxtHeight ) - { - $XCenter = $X; - $YCenter = $Y1- $BarHeight / 2; - - $Labels[] = array($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); - } - } - - $LastY[$Key][$Pos] = $Y2; - } - else - { $PointsTop[] = $X; $PointsTop[] = $LastY[$Key][$Pos]; $PointsBottom[] = $X; $PointsBottom[] = $LastY[$Key][$Pos]; } - - $X = $X + $XStep; - } - $Points = $PointsTop; - for($i=count($PointsBottom)-2;$i>=0;$i-=2) { $Points[] = $PointsBottom[$i]; $Points[] = $PointsBottom[$i+1]; } - $this->drawPolygon($Points,$Color); - - /* Reset the X axis parser for the negative values pass */ - $X = $this->GraphAreaX1 + $XMargin; - - $PointsTop = ""; $PointsBottom = ""; $Pos = "-"; - foreach($PosArray as $Key => $Height) - { - if ( !isset($LastY[$Key] ) ) { $LastY[$Key] = ""; } - if ( !isset($LastY[$Key][$Pos] ) ) { $LastY[$Key][$Pos] = $YZero; } - - if ( $Height != VOID && $Serie["Data"][$Key] < 0) - { - $Y1 = $LastY[$Key][$Pos]; - $Y2 = $Y1 - $Height; - - $PointsTop[] = $X; $PointsTop[] = $Y2; - $PointsBottom[] = $X; $PointsBottom[] = $Y1; - - if ( $DisplayValues ) - { - $BarHeight = abs($Y2-$Y1); - - $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); - $TxtHeight = abs($TxtPos[2]["Y"] - $TxtPos[0]["Y"]); - - if ( $BarHeight > $TxtHeight ) - { - $XCenter = $X; - $YCenter = $BarHeight / 2 + $Y1; - - $Labels[] = array($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); - } - } - - $LastY[$Key][$Pos] = $Y2; - } - else - { $PointsTop[] = $X; $PointsTop[] = $LastY[$Key][$Pos]; $PointsBottom[] = $X; $PointsBottom[] = $LastY[$Key][$Pos]; } - - $X = $X + $XStep; - } - $Points = $PointsTop; - for($i=count($PointsBottom)-2;$i>=0;$i-=2) { $Points[] = $PointsBottom[$i]; $Points[] = $PointsBottom[$i+1]; } - $this->drawPolygon($Points,$Color); - - if ( $DisplayValues ) { foreach($Labels as $Key => $Value) { $this->drawText($Value[0],$Value[1],$Value[2],$Value[3]);} } - } - else - { - if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } - if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB,"SkipX"=>$YZero); - - if ( $SingleWay ) { unset($Color["SkipX"]); } - - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - - $PointsTop = ""; $PointsBottom = ""; $Labels = ""; $Pos = "+"; - foreach($PosArray as $Key => $Width) - { - if ( !isset($LastX[$Key] ) ) { $LastX[$Key] = ""; } - if ( !isset($LastX[$Key][$Pos] ) ) { $LastX[$Key][$Pos] = $YZero; } - - if ( $Width != VOID && $Serie["Data"][$Key] >= 0) - { - $X1 = $LastX[$Key][$Pos]; - $X2 = $X1 + $Width; - - $PointsTop[] = $X1; $PointsTop[] = $Y; - $PointsBottom[] = $X2; $PointsBottom[] = $Y; - - if ( $DisplayValues ) - { - $BarWidth = abs($X2-$X1); - - $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); - $TxtWidth = abs($TxtPos[1]["X"] - $TxtPos[0]["X"]); - - if ( $BarWidth > $TxtWidth ) - { - $XCenter = $X1 + $BarWidth / 2; - $YCenter = $Y; - - $Labels[] = array($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); - } - } - - $LastX[$Key][$Pos] = $X2; - } - else - { $PointsTop[] = $LastX[$Key][$Pos]; $PointsTop[] = $Y; $PointsBottom[] = $LastX[$Key][$Pos]; $PointsBottom[] = $Y; } - - $Y = $Y + $YStep; - } - $Points = $PointsTop; - for($i=count($PointsBottom)-2;$i>=0;$i-=2) { $Points[] = $PointsBottom[$i]; $Points[] = $PointsBottom[$i+1]; } - $this->drawPolygon($Points,$Color); - - - /* Reset the X axis parser for the negative values pass */ - $Y = $this->GraphAreaY1 + $XMargin; - - - $PointsTop = ""; $PointsBottom = ""; $Pos = "-"; - foreach($PosArray as $Key => $Width) - { - if ( !isset($LastX[$Key] ) ) { $LastX[$Key] = ""; } - if ( !isset($LastX[$Key][$Pos] ) ) { $LastX[$Key][$Pos] = $YZero; } - - if ( $Width != VOID && $Serie["Data"][$Key] < 0) - { - $X1 = $LastX[$Key][$Pos]; - $X2 = $X1 + $Width; - - $PointsTop[] = $X1; $PointsTop[] = $Y; - $PointsBottom[] = $X2; $PointsBottom[] = $Y; - - if ( $DisplayValues ) - { - $BarWidth = abs($X2-$X1); - - $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); - $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); - $TxtWidth = abs($TxtPos[1]["X"] - $TxtPos[0]["X"]); - - if ( $BarWidth > $TxtWidth ) - { - $XCenter = $X1 - $BarWidth / 2; - $YCenter = $Y; - - $Labels[] = array($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); - } - } - - $LastX[$Key][$Pos] = $X2; - } - else - { $PointsTop[] = $LastX[$Key][$Pos]; $PointsTop[] = $Y; $PointsBottom[] = $LastX[$Key][$Pos]; $PointsBottom[] = $Y; } - - $Y = $Y + $YStep; - } - $Points = $PointsTop; - for($i=count($PointsBottom)-2;$i>=0;$i-=2) { $Points[] = $PointsBottom[$i]; $Points[] = $PointsBottom[$i+1]; } - $this->drawPolygon($Points,$Color); - - if ( $DisplayValues ) { foreach($Labels as $Key => $Value) { $this->drawText($Value[0],$Value[1],$Value[2],$Value[3]);} } - } - } - } - } - - /* Returns a random color */ - function getRandomColor($Alpha=100) - { return(array("R"=>rand(0,255),"G"=>rand(0,255),"B"=>rand(0,255),"Alpha"=>$Alpha)); } - - /* Validate a palette */ - function validatePalette($Colors,$Surrounding=NULL) - { - $Result = ""; - - if ( !is_array($Colors) ) { return($this->getRandomColor()); } - - foreach($Colors as $Key => $Values) - { - if ( isset($Values["R"]) ) { $Result[$Key]["R"] = $Values["R"]; } else { $Result[$Key]["R"] = rand(0,255); } - if ( isset($Values["G"]) ) { $Result[$Key]["G"] = $Values["G"]; } else { $Result[$Key]["G"] = rand(0,255); } - if ( isset($Values["B"]) ) { $Result[$Key]["B"] = $Values["B"]; } else { $Result[$Key]["B"] = rand(0,255); } - if ( isset($Values["Alpha"]) ) { $Result[$Key]["Alpha"] = $Values["Alpha"]; } else { $Result[$Key]["Alpha"] = 100; } - - if ( $Surrounding != NULL ) - { - $Result[$Key]["BorderR"] = $Result[$Key]["R"] + $Surrounding; - $Result[$Key]["BorderG"] = $Result[$Key]["G"] + $Surrounding; - $Result[$Key]["BorderB"] = $Result[$Key]["B"] + $Surrounding; - } - else - { - if ( isset($Values["BorderR"]) ) { $Result[$Key]["BorderR"] = $Values["BorderR"]; } else { $Result[$Key]["BorderR"] = $Result[$Key]["R"]; } - if ( isset($Values["BorderG"]) ) { $Result[$Key]["BorderG"] = $Values["BorderG"]; } else { $Result[$Key]["BorderG"] = $Result[$Key]["G"]; } - if ( isset($Values["BorderB"]) ) { $Result[$Key]["BorderB"] = $Values["BorderB"]; } else { $Result[$Key]["BorderB"] = $Result[$Key]["B"]; } - if ( isset($Values["BorderAlpha"]) ) { $Result[$Key]["BorderAlpha"] = $Values["BorderAlpha"]; } else { $Result[$Key]["BorderAlpha"] = $Result[$Key]["Alpha"]; } - } - } - - return($Result); - } - - /* Draw the derivative chart associated to the data series */ - function drawDerivative($Format=NULL) - { - $Offset = isset($Format["Offset"]) ? $Format["Offset"] : 10; - $SerieSpacing = isset($Format["SerieSpacing"]) ? $Format["SerieSpacing"] : 3; - $DerivativeHeight = isset($Format["DerivativeHeight"]) ? $Format["DerivativeHeight"] : 4; - $ShadedSlopeBox = isset($Format["ShadedSlopeBox"]) ? $Format["ShadedSlopeBox"] : FALSE; - $DrawBackground = isset($Format["DrawBackground"]) ? $Format["DrawBackground"] : TRUE; - $BackgroundR = isset($Format["BackgroundR"]) ? $Format["BackgroundR"] : 255; - $BackgroundG = isset($Format["BackgroundG"]) ? $Format["BackgroundG"] : 255; - $BackgroundB = isset($Format["BackgroundB"]) ? $Format["BackgroundB"] : 255; - $BackgroundAlpha = isset($Format["BackgroundAlpha"]) ? $Format["BackgroundAlpha"] : 20; - $DrawBorder = isset($Format["DrawBorder"]) ? $Format["DrawBorder"] : TRUE; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 0; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 0; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 0; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 100; - $Caption = isset($Format["Caption"]) ? $Format["Caption"] : TRUE; - $CaptionHeight = isset($Format["CaptionHeight"]) ? $Format["CaptionHeight"] : 10; - $CaptionWidth = isset($Format["CaptionWidth"]) ? $Format["CaptionWidth"] : 20; - $CaptionMargin = isset($Format["CaptionMargin"]) ? $Format["CaptionMargin"] : 4; - $CaptionLine = isset($Format["CaptionLine"]) ? $Format["CaptionLine"] : FALSE; - $CaptionBox = isset($Format["CaptionBox"]) ? $Format["CaptionBox"] : FALSE; - $CaptionBorderR = isset($Format["CaptionBorderR"]) ? $Format["CaptionBorderR"] : 0; - $CaptionBorderG = isset($Format["CaptionBorderG"]) ? $Format["CaptionBorderG"] : 0; - $CaptionBorderB = isset($Format["CaptionBorderB"]) ? $Format["CaptionBorderB"] : 0; - $CaptionFillR = isset($Format["CaptionFillR"]) ? $Format["CaptionFillR"] : 255; - $CaptionFillG = isset($Format["CaptionFillG"]) ? $Format["CaptionFillG"] : 255; - $CaptionFillB = isset($Format["CaptionFillB"]) ? $Format["CaptionFillB"] : 255; - $CaptionFillAlpha = isset($Format["CaptionFillAlpha"]) ? $Format["CaptionFillAlpha"] : 80; - $PositiveSlopeStartR = isset($Format["PositiveSlopeStartR"]) ? $Format["PositiveSlopeStartR"] : 184; - $PositiveSlopeStartG = isset($Format["PositiveSlopeStartG"]) ? $Format["PositiveSlopeStartG"] : 234; - $PositiveSlopeStartB = isset($Format["PositiveSlopeStartB"]) ? $Format["PositiveSlopeStartB"] : 88; - $PositiveSlopeEndR = isset($Format["PositiveSlopeStartR"]) ? $Format["PositiveSlopeStartR"] : 239; - $PositiveSlopeEndG = isset($Format["PositiveSlopeStartG"]) ? $Format["PositiveSlopeStartG"] : 31; - $PositiveSlopeEndB = isset($Format["PositiveSlopeStartB"]) ? $Format["PositiveSlopeStartB"] : 36; - $NegativeSlopeStartR = isset($Format["NegativeSlopeStartR"]) ? $Format["NegativeSlopeStartR"] : 184; - $NegativeSlopeStartG = isset($Format["NegativeSlopeStartG"]) ? $Format["NegativeSlopeStartG"] : 234; - $NegativeSlopeStartB = isset($Format["NegativeSlopeStartB"]) ? $Format["NegativeSlopeStartB"] : 88; - $NegativeSlopeEndR = isset($Format["NegativeSlopeStartR"]) ? $Format["NegativeSlopeStartR"] : 67; - $NegativeSlopeEndG = isset($Format["NegativeSlopeStartG"]) ? $Format["NegativeSlopeStartG"] : 124; - $NegativeSlopeEndB = isset($Format["NegativeSlopeStartB"]) ? $Format["NegativeSlopeStartB"] : 227; - - $Data = $this->DataSet->getData(); - - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - $YPos = $this->DataSet->Data["GraphArea"]["Y2"] + $Offset; - else - $XPos = $this->DataSet->Data["GraphArea"]["X2"] + $Offset; - - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; - - $AxisID = $Serie["Axis"]; - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $Caption ) - { - if ( $CaptionLine ) - { - $StartX = floor($this->GraphAreaX1-$CaptionWidth+$XMargin-$CaptionMargin); - $EndX = floor($this->GraphAreaX1-$CaptionMargin+$XMargin); - - $CaptionSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight); - if ( $CaptionBox ) { $this->drawFilledRectangle($StartX,$YPos,$EndX,$YPos+$CaptionHeight,array("R"=>$CaptionFillR,"G"=>$CaptionFillG,"B"=>$CaptionFillB,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB,"Alpha"=>$CaptionFillAlpha)); } - $this->drawLine($StartX+2,$YPos+($CaptionHeight/2),$EndX-2,$YPos+($CaptionHeight/2),$CaptionSettings); - } - else - $this->drawFilledRectangle($this->GraphAreaX1-$CaptionWidth+$XMargin-$CaptionMargin,$YPos,$this->GraphAreaX1-$CaptionMargin+$XMargin,$YPos+$CaptionHeight,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB)); - } - - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; - - $TopY = $YPos + ($CaptionHeight/2) - ($DerivativeHeight/2); - $BottomY = $YPos + ($CaptionHeight/2) + ($DerivativeHeight/2); - - $StartX = floor($this->GraphAreaX1+$XMargin); - $EndX = floor($this->GraphAreaX2-$XMargin); - - if ( $DrawBackground ) { $this->drawFilledRectangle($StartX-1,$TopY-1,$EndX+1,$BottomY+1,array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha)); } - if ( $DrawBorder ) { $this->drawRectangle($StartX-1,$TopY-1,$EndX+1,$BottomY+1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - - $RestoreShadow = $this->Shadow; - $this->Shadow = FALSE; - - /* Determine the Max slope index */ - $LastX = NULL; $LastY = NULL; $MinSlope = 0; $MaxSlope = 1; - foreach($PosArray as $Key => $Y) - { - if ( $Y != VOID && $LastX != NULL ) - { $Slope = ($LastY - $Y); if ( $Slope > $MaxSlope ) { $MaxSlope = $Slope; } if ( $Slope < $MinSlope ) { $MinSlope = $Slope; } } - - if ( $Y == VOID ) - { $LastX = NULL; $LastY = NULL; } - else - { $LastX = $X; $LastY = $Y; } - } - - $LastX = NULL; $LastY = NULL; $LastColor = NULL; - foreach($PosArray as $Key => $Y) - { - if ( $Y != VOID && $LastY != NULL ) - { - $Slope = ($LastY - $Y); - - if ( $Slope >= 0 ) - { - $SlopeIndex = (100 / $MaxSlope) * $Slope; - $R = (($PositiveSlopeEndR - $PositiveSlopeStartR)/100)*$SlopeIndex+$PositiveSlopeStartR; - $G = (($PositiveSlopeEndG - $PositiveSlopeStartG)/100)*$SlopeIndex+$PositiveSlopeStartG; - $B = (($PositiveSlopeEndB - $PositiveSlopeStartB)/100)*$SlopeIndex+$PositiveSlopeStartB; - } - elseif ( $Slope < 0 ) - { - $SlopeIndex = (100 / abs($MinSlope)) * abs($Slope); - $R = (($NegativeSlopeEndR - $NegativeSlopeStartR)/100)*$SlopeIndex+$NegativeSlopeStartR; - $G = (($NegativeSlopeEndG - $NegativeSlopeStartG)/100)*$SlopeIndex+$NegativeSlopeStartG; - $B = (($NegativeSlopeEndB - $NegativeSlopeStartB)/100)*$SlopeIndex+$NegativeSlopeStartB; - } - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B); - - if ( $ShadedSlopeBox && $LastColor != NULL ) // && $Slope != 0 - { - $GradientSettings = array("StartR"=>$LastColor["R"],"StartG"=>$LastColor["G"],"StartB"=>$LastColor["B"],"EndR"=>$R,"EndG"=>$G,"EndB"=>$B); - $this->drawGradientArea($LastX,$TopY,$X,$BottomY,DIRECTION_HORIZONTAL,$GradientSettings); - } - elseif ( !$ShadedSlopeBox || $LastColor == NULL ) // || $Slope == 0 - $this->drawFilledRectangle(floor($LastX),$TopY,floor($X),$BottomY,$Color); - - $LastColor = $Color; - } - - if ( $Y == VOID ) - { $LastY = NULL; } - else - { $LastX = $X; $LastY = $Y; } - - $X = $X + $XStep; - } - - $YPos = $YPos + $CaptionHeight + $SerieSpacing; - } - else - { - if ( $Caption ) - { - $StartY = floor($this->GraphAreaY1-$CaptionWidth+$XMargin-$CaptionMargin); - $EndY = floor($this->GraphAreaY1-$CaptionMargin+$XMargin); - if ( $CaptionLine ) - { - $CaptionSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight); - if ( $CaptionBox ) { $this->drawFilledRectangle($XPos,$StartY,$XPos+$CaptionHeight,$EndY,array("R"=>$CaptionFillR,"G"=>$CaptionFillG,"B"=>$CaptionFillB,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB,"Alpha"=>$CaptionFillAlpha)); } - $this->drawLine($XPos+($CaptionHeight/2),$StartY+2,$XPos+($CaptionHeight/2),$EndY-2,$CaptionSettings); - } - else - $this->drawFilledRectangle($XPos,$StartY,$XPos+$CaptionHeight,$EndY,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB)); - } - - - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $XStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; - - $TopX = $XPos + ($CaptionHeight/2) - ($DerivativeHeight/2); - $BottomX = $XPos + ($CaptionHeight/2) + ($DerivativeHeight/2); - - $StartY = floor($this->GraphAreaY1+$XMargin); - $EndY = floor($this->GraphAreaY2-$XMargin); - - if ( $DrawBackground ) { $this->drawFilledRectangle($TopX-1,$StartY-1,$BottomX+1,$EndY+1,array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha)); } - if ( $DrawBorder ) { $this->drawRectangle($TopX-1,$StartY-1,$BottomX+1,$EndY+1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - - $RestoreShadow = $this->Shadow; - $this->Shadow = FALSE; - - /* Determine the Max slope index */ - $LastX = NULL; $LastY = NULL; $MinSlope = 0; $MaxSlope = 1; - foreach($PosArray as $Key => $X) - { - if ( $X != VOID && $LastX != NULL ) - { $Slope = ($X - $LastX); if ( $Slope > $MaxSlope ) { $MaxSlope = $Slope; } if ( $Slope < $MinSlope ) { $MinSlope = $Slope; } } - - if ( $X == VOID ) - { $LastX = NULL; } - else - { $LastX = $X; } - } - - $LastX = NULL; $LastY = NULL; $LastColor = NULL; - foreach($PosArray as $Key => $X) - { - if ( $X != VOID && $LastX != NULL ) - { - $Slope = ($X - $LastX); - - if ( $Slope >= 0 ) - { - $SlopeIndex = (100 / $MaxSlope) * $Slope; - $R = (($PositiveSlopeEndR - $PositiveSlopeStartR)/100)*$SlopeIndex+$PositiveSlopeStartR; - $G = (($PositiveSlopeEndG - $PositiveSlopeStartG)/100)*$SlopeIndex+$PositiveSlopeStartG; - $B = (($PositiveSlopeEndB - $PositiveSlopeStartB)/100)*$SlopeIndex+$PositiveSlopeStartB; - } - elseif ( $Slope < 0 ) - { - $SlopeIndex = (100 / abs($MinSlope)) * abs($Slope); - $R = (($NegativeSlopeEndR - $NegativeSlopeStartR)/100)*$SlopeIndex+$NegativeSlopeStartR; - $G = (($NegativeSlopeEndG - $NegativeSlopeStartG)/100)*$SlopeIndex+$NegativeSlopeStartG; - $B = (($NegativeSlopeEndB - $NegativeSlopeStartB)/100)*$SlopeIndex+$NegativeSlopeStartB; - } - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B); - - if ( $ShadedSlopeBox && $LastColor != NULL ) - { - $GradientSettings = array("StartR"=>$LastColor["R"],"StartG"=>$LastColor["G"],"StartB"=>$LastColor["B"],"EndR"=>$R,"EndG"=>$G,"EndB"=>$B); - - $this->drawGradientArea($TopX,$LastY,$BottomX,$Y,DIRECTION_VERTICAL,$GradientSettings); - } - elseif ( !$ShadedSlopeBox || $LastColor == NULL ) - $this->drawFilledRectangle($TopX,floor($LastY),$BottomX,floor($Y),$Color); - - $LastColor = $Color; - } - - if ( $X == VOID ) - { $LastX = NULL; } - else - { $LastX = $X; $LastY = $Y; } - - $Y = $Y + $XStep; - } - - $XPos = $XPos + $CaptionHeight + $SerieSpacing; - } - - $this->Shadow = $RestoreShadow; - } - } - } - - /* Draw the line of best fit */ - function drawBestFit($Format="") - { - $Data = $this->DataSet->getData(); - list($XMargin,$XDivs) = $this->scaleGetXSettings(); - - foreach($Data["Series"] as $SerieName => $Serie) - { - if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) - { - $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; - - $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight); - - $AxisID = $Serie["Axis"]; - $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } - $X = $this->GraphAreaX1 + $XMargin; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $Sxy = 0; $Sx = 0; $Sy = 0; $Sxx = 0; - foreach($PosArray as $Key => $Y) - { - $Sxy = $Sxy + $X*$Y; - $Sx = $Sx + $X; - $Sy = $Sy + $Y; - $Sxx = $Sxx + $X*$X; - - $X = $X + $XStep; - } - $n = count($PosArray); - $M = (($n*$Sxy)-($Sx*$Sy)) / (($n*$Sxx)-($Sx*$Sx)); - $B = (($Sy)-($M*$Sx))/($n); - - $X1 = $this->GraphAreaX1 + $XMargin; - $Y1 = $M * $X1 + $B; - $X2 = $this->GraphAreaX2 - $XMargin; - $Y2 = $M * $X2 + $B; - - if ( $Y1 < $this->GraphAreaY1 ) { $X1 = $X1 + ($this->GraphAreaY1-$Y1); $Y1 = $this->GraphAreaY1; } - if ( $Y1 > $this->GraphAreaY2 ) { $X1 = $X1 + ($Y1-$this->GraphAreaY2); $Y1 = $this->GraphAreaY2; } - if ( $Y2 < $this->GraphAreaY1 ) { $X2 = $X2 - ($this->GraphAreaY1-$Y2); $Y2 = $this->GraphAreaY1; } - if ( $Y2 > $this->GraphAreaY2 ) { $X2 = $X2 - ($Y2-$this->GraphAreaY2); $Y2 = $this->GraphAreaY2; } - - $this->drawLine($X1,$Y1,$X2,$Y2,$Color); - } - else - { - if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } - $Y = $this->GraphAreaY1 + $XMargin; - - if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } - $Sxy = 0; $Sx = 0; $Sy = 0; $Sxx = 0; - foreach($PosArray as $Key => $X) - { - $Sxy = $Sxy + $X*$Y; - $Sx = $Sx + $Y; - $Sy = $Sy + $X; - $Sxx = $Sxx + $Y*$Y; - - $Y = $Y + $YStep; - } - $n = count($PosArray); - $M = (($n*$Sxy)-($Sx*$Sy)) / (($n*$Sxx)-($Sx*$Sx)); - $B = (($Sy)-($M*$Sx))/($n); - - $Y1 = $this->GraphAreaY1 + $XMargin; - $X1 = $M * $Y1 + $B; - $Y2 = $this->GraphAreaY2 - $XMargin; - $X2 = $M * $Y2 + $B; - - if ( $X1 < $this->GraphAreaX1 ) { $Y1 = $Y1 + ($this->GraphAreaX1-$X1); $X1 = $this->GraphAreaX1; } - if ( $X1 > $this->GraphAreaX2 ) { $Y1 = $Y1 + ($X1-$this->GraphAreaX2); $X1 = $this->GraphAreaX2; } - if ( $X2 < $this->GraphAreaX1 ) { $Y2 = $Y2 - ($this->GraphAreaY1-$X2); $X2 = $this->GraphAreaX1; } - if ( $X2 > $this->GraphAreaX2 ) { $Y2 = $Y2 - ($X2-$this->GraphAreaX2); $X2 = $this->GraphAreaX2; } - - $this->drawLine($X1,$Y1,$X2,$Y2,$Color); - } - } - } - } - } -?> diff --git a/pandora_console/include/graphs/pChart/pImage.class.php b/pandora_console/include/graphs/pChart/pImage.class.php deleted file mode 100755 index c48c38d8e4..0000000000 --- a/pandora_console/include/graphs/pChart/pImage.class.php +++ /dev/null @@ -1,254 +0,0 @@ -<?php - /* - pDraw - pChart core class - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - /* The GD extension is mandatory */ - if (!extension_loaded('gd') && !extension_loaded('gd2')) - { - echo "GD extension must be loaded. \r\n"; - exit(); - } - - class pImage extends pDraw - { - /* Image settings, size, quality, .. */ - var $XSize = NULL; // Width of the picture - var $YSize = NULL; // Height of the picture - var $Picture = NULL; // GD picture object - var $Antialias = TRUE; // Turn antialias on or off - var $AntialiasQuality = 0; // Quality of the antialiasing implementation (0-1) - var $Mask = ""; // Already drawn pixels mask (Filled circle implementation) - var $TransparentBackground = FALSE; // Just to know if we need to flush the alpha channels when rendering - - /* Graph area settings */ - var $GraphAreaX1 = NULL; // Graph area X origin - var $GraphAreaY1 = NULL; // Graph area Y origin - var $GraphAreaX2 = NULL; // Graph area bottom right X position - var $GraphAreaY2 = NULL; // Graph area bottom right Y position - - /* Scale settings */ - var $ScaleMinDivHeight = 20; // Minimum height for scame divs - - /* Font properties */ - var $FontName = "fonts/GeosansLight.ttf"; // Default font file - var $FontSize = 12; // Default font size - var $FontBox = NULL; // Return the bounding box of the last written string - var $FontColorR = 0; // Default color settings - var $FontColorG = 0; // Default color settings - var $FontColorB = 0; // Default color settings - var $FontColorA = 100; // Default transparency - - /* Shadow properties */ - var $Shadow = TRUE; // Turn shadows on or off - var $ShadowX = NULL; // X Offset of the shadow - var $ShadowY = NULL; // Y Offset of the shadow - var $ShadowR = NULL; // R component of the shadow - var $ShadowG = NULL; // G component of the shadow - var $ShadowB = NULL; // B component of the shadow - var $Shadowa = NULL; // Alpha level of the shadow - - /* Data Set */ - var $DataSet = NULL; // Attached dataset - - /* Class constructor */ - function pImage($XSize,$YSize,$DataSet=NULL,$TransparentBackground=FALSE, $ColorBackground = 'white', $FontColor = array('R' => 0, 'G' => 0, 'B' => 0)) - { - $this->TransparentBackground = $TransparentBackground; - $this->FontColorR = $FontColor['R']; - $this->FontColorG = $FontColor['G']; - $this->FontColorB = $FontColor['B']; - - if ( $DataSet != NULL ) { $this->DataSet = $DataSet; } - - $this->XSize = $XSize; - $this->YSize = $YSize; - $this->Picture = imagecreatetruecolor($XSize,$YSize); - - if ( $this->TransparentBackground ) - { - imagealphablending($this->Picture,FALSE); - imagefilledrectangle($this->Picture, 0,0,$XSize, $YSize, imagecolorallocatealpha($this->Picture, 255, 255, 255, 127)); - imagealphablending($this->Picture,TRUE); - imagesavealpha($this->Picture,true); - } - else - { - switch($ColorBackground) { - case 'black': - $C = $this->AllocateColor($this->Picture,0,0,0); - break; - case 'white': - default: - $C = $this->AllocateColor($this->Picture,255,255,255); - break; - } - imagefilledrectangle($this->Picture,0,0,$XSize,$YSize,$C); - } - } - - /* Enable / Disable and set shadow properties */ - function setShadow($Enabled=TRUE,$Format="") - { - $X = isset($Format["X"]) ? $Format["X"] : 2; - $Y = isset($Format["Y"]) ? $Format["Y"] : 2; - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 10; - - $this->Shadow = $Enabled; - $this->ShadowX = $X; - $this->ShadowY = $Y; - $this->ShadowR = $R; - $this->ShadowG = $G; - $this->ShadowB = $B; - $this->Shadowa = $Alpha; - } - - /* Set the graph area position */ - function setGraphArea($X1,$Y1,$X2,$Y2) - { - if ( $X2 < $X1 || $X1 == $X2 || $Y2 < $Y1 || $Y1 == $Y2 ) { return(-1); } - - $this->GraphAreaX1 = $X1; $this->DataSet->Data["GraphArea"]["X1"] = $X1; - $this->GraphAreaY1 = $Y1; $this->DataSet->Data["GraphArea"]["Y1"] = $Y1; - $this->GraphAreaX2 = $X2; $this->DataSet->Data["GraphArea"]["X2"] = $X2; - $this->GraphAreaY2 = $Y2; $this->DataSet->Data["GraphArea"]["Y2"] = $Y2; - } - - /* Return the width of the picture */ - function getWidth() - { return($this->XSize); } - - /* Return the heigth of the picture */ - function getHeight() - { return($this->YSize); } - - /* Render the picture to a file */ - function render($FileName) - { - if ( $this->TransparentBackground ) { imagealphablending($this->Picture,false); imagesavealpha($this->Picture,true); } - imagepng($this->Picture,$FileName); - } - - /* Render the picture to a web browser stream */ - function stroke() - { - if ( $this->TransparentBackground ) { imagealphablending($this->Picture,false); imagesavealpha($this->Picture,true); } - - header('Content-type: image/png'); - imagepng($this->Picture); - } - - /* Automatic output method based on the calling interface */ - function autoOutput($FileName="output.png") - { - if (php_sapi_name() == "cli") - $this->Render($FileName); - else - $this->Stroke(); - } - - /* Return the length between two points */ - function getLength($X1,$Y1,$X2,$Y2) - { return(sqrt(pow(max($X1,$X2)-min($X1,$X2),2)+pow(max($Y1,$Y2)-min($Y1,$Y2),2))); } - - /* Return the orientation of a line */ - function getAngle($X1,$Y1,$X2,$Y2) - { - $Opposite = $Y2 - $Y1; $Adjacent = $X2 - $X1;$Angle = rad2deg(atan2($Opposite,$Adjacent)); - if ($Angle > 0) { return($Angle); } else { return(360-abs($Angle)); } - } - - /* Return the surrounding box of text area */ - function getTextBox_deprecated($X,$Y,$FontName,$FontSize,$Angle,$Text) - { - $Size = imagettfbbox($FontSize,$Angle,$FontName,$Text); - $Width = $this->getLength($Size[0],$Size[1],$Size[2],$Size[3])+1; - $Height = $this->getLength($Size[2],$Size[3],$Size[4],$Size[5])+1; - - $RealPos[0]["X"] = $X; $RealPos[0]["Y"] = $Y; - $RealPos[1]["X"] = cos((360-$Angle)*PI/180)*$Width + $RealPos[0]["X"]; $RealPos[1]["Y"] = sin((360-$Angle)*PI/180)*$Width + $RealPos[0]["Y"]; - $RealPos[2]["X"] = cos((270-$Angle)*PI/180)*$Height + $RealPos[1]["X"]; $RealPos[2]["Y"] = sin((270-$Angle)*PI/180)*$Height + $RealPos[1]["Y"]; - $RealPos[3]["X"] = cos((180-$Angle)*PI/180)*$Width + $RealPos[2]["X"]; $RealPos[3]["Y"] = sin((180-$Angle)*PI/180)*$Width + $RealPos[2]["Y"]; - - $RealPos[TEXT_ALIGN_BOTTOMLEFT]["X"] = $RealPos[0]["X"]; $RealPos[TEXT_ALIGN_BOTTOMLEFT]["Y"] = $RealPos[0]["Y"]; - $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["X"] = $RealPos[1]["X"]; $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["Y"] = $RealPos[1]["Y"]; - - return($RealPos); - } - - /* Return the surrounding box of text area */ - function getTextBox($X,$Y,$FontName,$FontSize,$Angle,$Text) - { - $coords = imagettfbbox($FontSize, 0, $FontName, $Text); - - $a = deg2rad($Angle); $ca = cos($a); $sa = sin($a); $RealPos = array(); - for($i = 0; $i < 7; $i += 2) - { - $RealPos[$i/2]["X"] = $X + round($coords[$i] * $ca + $coords[$i+1] * $sa); - $RealPos[$i/2]["Y"] = $Y + round($coords[$i+1] * $ca - $coords[$i] * $sa); - } - - $RealPos[TEXT_ALIGN_BOTTOMLEFT]["X"] = $RealPos[0]["X"]; $RealPos[TEXT_ALIGN_BOTTOMLEFT]["Y"] = $RealPos[0]["Y"]; - $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["X"] = $RealPos[1]["X"]; $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["Y"] = $RealPos[1]["Y"]; - $RealPos[TEXT_ALIGN_TOPLEFT]["X"] = $RealPos[3]["X"]; $RealPos[TEXT_ALIGN_TOPLEFT]["Y"] = $RealPos[3]["Y"]; - $RealPos[TEXT_ALIGN_TOPRIGHT]["X"] = $RealPos[2]["X"]; $RealPos[TEXT_ALIGN_TOPRIGHT]["Y"] = $RealPos[2]["Y"]; - $RealPos[TEXT_ALIGN_BOTTOMMIDDLE]["X"] = ($RealPos[1]["X"]-$RealPos[0]["X"])/2+$RealPos[0]["X"]; $RealPos[TEXT_ALIGN_BOTTOMMIDDLE]["Y"] = ($RealPos[0]["Y"]-$RealPos[1]["Y"])/2+$RealPos[1]["Y"]; - $RealPos[TEXT_ALIGN_TOPMIDDLE]["X"] = ($RealPos[2]["X"]-$RealPos[3]["X"])/2+$RealPos[3]["X"]; $RealPos[TEXT_ALIGN_TOPMIDDLE]["Y"] = ($RealPos[3]["Y"]-$RealPos[2]["Y"])/2+$RealPos[2]["Y"]; - $RealPos[TEXT_ALIGN_MIDDLELEFT]["X"] = ($RealPos[0]["X"]-$RealPos[3]["X"])/2+$RealPos[3]["X"]; $RealPos[TEXT_ALIGN_MIDDLELEFT]["Y"] = ($RealPos[0]["Y"]-$RealPos[3]["Y"])/2+$RealPos[3]["Y"]; - $RealPos[TEXT_ALIGN_MIDDLERIGHT]["X"] = ($RealPos[1]["X"]-$RealPos[2]["X"])/2+$RealPos[2]["X"]; $RealPos[TEXT_ALIGN_MIDDLERIGHT]["Y"] = ($RealPos[1]["Y"]-$RealPos[2]["Y"])/2+$RealPos[2]["Y"]; - $RealPos[TEXT_ALIGN_MIDDLEMIDDLE]["X"] = ($RealPos[1]["X"]-$RealPos[3]["X"])/2+$RealPos[3]["X"]; $RealPos[TEXT_ALIGN_MIDDLEMIDDLE]["Y"] = ($RealPos[0]["Y"]-$RealPos[2]["Y"])/2+$RealPos[2]["Y"]; - - return($RealPos); - } - - /* Set current font properties */ - function setFontProperties($Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : -1; - $G = isset($Format["G"]) ? $Format["G"] : -1; - $B = isset($Format["B"]) ? $Format["B"] : -1; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : NULL; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : NULL; - - if ( $R != -1) { $this->FontColorR = $R; } - if ( $G != -1) { $this->FontColorG = $G; } - if ( $B != -1) { $this->FontColorB = $B; } - if ( $Alpha != NULL) { $this->FontColorA = $Alpha; } - - if ( $FontName != NULL ) - $this->FontName = $FontName; - - if ( $FontSize != NULL ) - $this->FontSize = $FontSize; - } - - /* Returns the 1st decimal values (used to correct AA bugs) */ - function getFirstDecimal($Value) - { - $Values = preg_split("/\./",$Value); - if ( isset($Values[1]) ) { return(substr($Values[1],0,1)); } else { return(0); } - } - - /* Attach a dataset to your pChart Object */ - function setDataSet(&$DataSet) - { $this->DataSet = $DataSet; } - - /* Print attached dataset contents to STDOUT */ - function printDataSet() - { print_r($this->DataSet); } - } -?> diff --git a/pandora_console/include/graphs/pChart/pPie.class.php b/pandora_console/include/graphs/pChart/pPie.class.php deleted file mode 100755 index b84ab82328..0000000000 --- a/pandora_console/include/graphs/pChart/pPie.class.php +++ /dev/null @@ -1,1457 +0,0 @@ -<?php - /* - pPie - class to draw pie charts - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - /* Class return codes */ - define("PIE_NO_ABSCISSA" , 140001); - define("PIE_NO_DATASERIE" , 140002); - define("PIE_SUMISNULL" , 140003); - define("PIE_RENDERED" , 140000); - - define("PIE_LABEL_COLOR_AUTO" , 140010); - define("PIE_LABEL_COLOR_MANUAL", 140011); - - define("PIE_VALUE_NATURAL" , 140020); - define("PIE_VALUE_PERCENTAGE" , 140021); - - define("PIE_VALUE_INSIDE" , 140030); - define("PIE_VALUE_OUTSIDE" , 140031); - - /* pPie class definition */ - class pPie - { - var $pChartObject; - var $pDataObject; - var $LabelPos = "" ; - - /* Class creator */ - function pPie($Object,$pDataObject) - { - /* Cache the pChart object reference */ - $this->pChartObject = $Object; - - /* Cache the pData object reference */ - $this->pDataObject = $pDataObject; - } - - /* Draw a pie chart */ - function draw2DPie($X,$Y,$Format="") - { - /* Rendering layout */ - $Radius = isset($Format["Radius"]) ? $Format["Radius"] : 60; - $Precision = isset($Format["Precision"]) ? $Format["Precision"] : 0; - $DataGapAngle = isset($Format["DataGapAngle"]) ? $Format["DataGapAngle"] : 0; - $DataGapRadius = isset($Format["DataGapRadius"]) ? $Format["DataGapRadius"] : 0; - $SecondPass = isset($Format["SecondPass"]) ? $Format["SecondPass"] : TRUE; - $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; - $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; - $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; - $LabelStacked = isset($Format["LabelStacked"]) ? $Format["LabelStacked"] : FALSE; - $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; - $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; - $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; - $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; - $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; - $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : NULL; - $ValuePosition = isset($Format["ValuePosition"]) ? $Format["ValuePosition"] : PIE_VALUE_OUTSIDE; - $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : 15; - $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; - $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; - $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; - $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; - $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; - $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; - - /* Data Processing */ - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - /* Do we have an abscissa serie defined? */ - if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } - - /* Try to find the data serie */ - $DataSerie = ""; - foreach ($Data["Series"] as $SerieName => $SerieData) - { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } - - /* Do we have data to compute? */ - if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } - - /* Remove unused data */ - list($Data,$Palette) = $this->clean0Values($Data,$Palette,$DataSerie,$Data["Abscissa"]); - - /* Compute the pie sum */ - $SerieSum = $this->pDataObject->getSum($DataSerie); - - /* Do we have data to draw? */ - if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } - - /* Dump the real number of data to draw */ - $Values = ""; - $PaletteAux = array(); // Fix to store only necesary colors - foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) - { if ($Value != 0) { $Values[$Key] = $Value; $PaletteAux[] = $Palette[$Key]; } } - - $Palette = $PaletteAux; - - /* Compute the wasted angular space between series */ - if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = count($Values) * $DataGapAngle; } - - /* Compute the scale */ - $ScaleFactor = (360 - $WastedAngular) / $SerieSum; - - $RestoreShadow = $this->pChartObject->Shadow; - if ( $this->pChartObject->Shadow ) - { - $this->pChartObject->Shadow = FALSE; - - $ShadowFormat = $Format; $ShadowFormat["Shadow"] = TRUE; - $this->draw2DPie($X+$this->pChartObject->ShadowX,$Y+$this->pChartObject->ShadowY,$ShadowFormat); - } - - /* Draw the polygon pie elements */ - $Step = 360 / (2 * PI * $Radius); - $Offset = 0; $ID = 0; - foreach($Values as $Key => $Value) - { - if ( $Shadow ) - $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); - else - $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); - - if ( !$SecondPass && !$Shadow ) - { - if ( !$Border ) - $Settings["Surrounding"] = 10; - else - { $Settings["BorderR"] = $BorderR; $Settings["BorderG"] = $BorderG; $Settings["BorderB"] = $BorderB; } - } - - $Plots = ""; - $EndAngle = $Offset+($Value*$ScaleFactor); if ( $EndAngle > 360 ) { $EndAngle = 360; } - - $Angle = ($EndAngle - $Offset)/2 + $Offset; - if ($DataGapAngle == 0) - { $X0 = $X; $Y0 = $Y; } - else - { - $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; - $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius + $Y; - } - - $Plots[] = $X0; $Plots[] = $Y0; - - - for($i=$Offset;$i<=$EndAngle;$i=$i+$Step) - { - $Xc = cos(($i-90)*PI/180) * $Radius + $X; - $Yc = sin(($i-90)*PI/180) * $Radius + $Y; - - if ( $SecondPass && ( $i<90 )) { $Yc++; } - if ( $SecondPass && ( $i>180 && $i<270 )) { $Xc++; } - if ( $SecondPass && ( $i>=270 )) { $Xc++; $Yc++; } - - $Plots[] = $Xc; $Plots[] = $Yc; - } - - $this->pChartObject->drawPolygon($Plots,$Settings); - if ( $RecordImageMap && !$Shadow ) { $this->pChartObject->addToImageMap("POLY",$this->arraySerialize($Plots),$this->pChartObject->toHTMLColor($Palette[$ID]["R"],$Palette[$ID]["G"],$Palette[$ID]["B"]),$Data["Series"][$Data["Abscissa"]]["Data"][$Key],$Value); } - - if ( $DrawLabels && !$Shadow && !$SecondPass ) - { - if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) - { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} - else - { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } - - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; - $Yc = sin(($Angle-90)*PI/180) * $Radius + $Y; - - $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; - - $Settings["Angle"] = 360-$Angle; - $Settings["Length"] = 25; - $Settings["Size"] = 8; - $this->pChartObject->drawArrowLabel($Xc,$Yc," ".$Label." ",$Settings); - } - - $Offset = $i + $DataGapAngle; $ID++; - } - - /* Second pass to smooth the angles */ - if ( $SecondPass ) - { - $Step = 360 / (2 * PI * $Radius); - $Offset = 0; $ID = 0; - foreach($Values as $Key => $Value) - { - $FirstPoint = TRUE; - if ( $Shadow ) - $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); - else - { - if ( $Border ) - $Settings = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB); - else - $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); - } - - $EndAngle = $Offset+($Value*$ScaleFactor); if ( $EndAngle > 360 ) { $EndAngle = 360; } - - if ($DataGapAngle == 0) - { $X0 = $X; $Y0 = $Y; } - else - { - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; - $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius + $Y; - } - $Plots[] = $X0; $Plots[] = $Y0; - - for($i=$Offset;$i<=$EndAngle;$i=$i+$Step) - { - $Xc = cos(($i-90)*PI/180) * $Radius + $X; - $Yc = sin(($i-90)*PI/180) * $Radius + $Y; - - if ( $FirstPoint ) { $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); } { $FirstPoint = FALSE; } - - $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); - } - $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); - - if ( $DrawLabels && !$Shadow ) - { - if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) - { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} - else - { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } - - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; - $Yc = sin(($Angle-90)*PI/180) * $Radius + $Y; - - $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; - - $Settings["Angle"] = 360-$Angle; - $Settings["Length"] = 25; - $Settings["Size"] = 8; - - $this->pChartObject->drawArrowLabel($Xc,$Yc," ".$Label." ",$Settings); - } - - $Offset = $i + $DataGapAngle; $ID++; - } - } - - $this->pChartObject->Shadow = $RestoreShadow; - - return(PIE_RENDERED); - } - - /* Draw a 3D pie chart */ - function draw3DPie($X,$Y,$Format="") - { - /* Rendering layout */ - $Radius = isset($Format["Radius"]) ? $Format["Radius"] : 80; - $SkewFactor = isset($Format["SkewFactor"]) ? $Format["SkewFactor"] : .5; - $SliceHeight = isset($Format["SliceHeight"]) ? $Format["SliceHeight"] : 20; - $DataGapAngle = isset($Format["DataGapAngle"]) ? $Format["DataGapAngle"] : 0; - $DataGapRadius = isset($Format["DataGapRadius"]) ? $Format["DataGapRadius"] : 0; - $SecondPass = isset($Format["SecondPass"]) ? $Format["SecondPass"] : TRUE; - $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; - $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; - $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; - $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; - $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; - $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; - $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; - $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; - $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : PIE_VALUE_PERCENTAGE; - $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; - $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; - $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; - $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; - $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; - - /* Error correction for overlaying rounded corners */ - if ( $SkewFactor < .5 ) { $SkewFactor = .5; } - - /* Data Processing */ - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - /* Do we have an abscissa serie defined? */ - if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } - - /* Try to find the data serie */ - $DataSerie = ""; - foreach ($Data["Series"] as $SerieName => $SerieData) - { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } - - /* Do we have data to compute? */ - if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } - - /* Compute the pie sum */ - $SerieSum = $this->pDataObject->getSum($DataSerie); - - /* Do we have data to draw? */ - if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } - - /* Dump the real number of data to draw */ - $Values = ""; - $PaletteAux = array(); // Fix to store only necesary colors - foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) - { if ($Value != 0) { $Values[$Key] = $Value; $PaletteAux[] = $Palette[$Key]; } } - - $Palette = $PaletteAux; - - /* Compute the wasted angular space between series */ - if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = count($Values) * $DataGapAngle; } - - /* Compute the scale */ - $ScaleFactor = (360 - $WastedAngular) / $SerieSum; - - $RestoreShadow = $this->pChartObject->Shadow; - if ( $this->pChartObject->Shadow ) { $this->pChartObject->Shadow = FALSE; } - - /* Draw the polygon pie elements */ - $Step = 360 / (2 * PI * $Radius); - $Offset = 360; - - $ID = count($Values)-1; - - $Values = array_reverse($Values); - $Slice = 0; $Slices = ""; $SliceColors = ""; $Visible = ""; $SliceAngle = ""; - foreach($Values as $Key => $Value) - { - - $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); - $SliceColors[$Slice] = $Settings; - - $StartAngle = $Offset; - $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } - - if ( $StartAngle > 180 ) { $Visible[$Slice]["Start"] = TRUE; } else { $Visible[$Slice]["Start"] = TRUE; } - if ( $EndAngle < 180 ) { $Visible[$Slice]["End"] = FALSE; } else { $Visible[$Slice]["End"] = TRUE; } - - if ($DataGapAngle == 0) - { $X0 = $X; $Y0 = $Y; } - else - { - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; - $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius*$SkewFactor + $Y; - } - $Slices[$Slice][] = $X0; $Slices[$Slice][] = $Y0; $SliceAngle[$Slice][] = 0; - - for($i=$Offset;$i>=$EndAngle;$i=$i-$Step) - { - $Xc = cos(($i-90)*PI/180) * $Radius + $X; - $Yc = sin(($i-90)*PI/180) * $Radius*$SkewFactor + $Y; - - if ( ($SecondPass || $RestoreShadow ) && ( $i<90 )) { $Yc++; } - if ( ($SecondPass || $RestoreShadow ) && ( $i>90 && $i<180 )) { $Xc++; } - if ( ($SecondPass || $RestoreShadow ) && ( $i>180 && $i<270 )) { $Xc++; } - if ( ($SecondPass || $RestoreShadow ) && ( $i>=270 )) { $Xc++; $Yc++; } - - $Slices[$Slice][] = $Xc; $Slices[$Slice][] = $Yc; $SliceAngle[$Slice][] = $i; - } - - $Offset = $i - $DataGapAngle; $ID--; $Slice++; - } - - /* Draw the bottom shadow if needed */ - if ( $RestoreShadow && ($this->pChartObject->ShadowX != 0 || $this->pChartObject->ShadowY !=0 )) - { - foreach($Slices as $SliceID => $Plots) - { - $ShadowPie = ""; - for($i=0;$i<count($Plots);$i=$i+2) - { $ShadowPie[] = $Plots[$i]+$this->pChartObject->ShadowX; $ShadowPie[] = $Plots[$i+1]+$this->pChartObject->ShadowY; } - - $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa,"NoBorder"=>TRUE); - $this->pChartObject->drawPolygon($ShadowPie,$Settings); - } - - $Step = 360 / (2 * PI * $Radius); - $Offset = 360; - foreach($Values as $Key => $Value) - { - $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } - - for($i=$Offset;$i>=$EndAngle;$i=$i-$Step) - { - $Xc = cos(($i-90)*PI/180) * $Radius + $X + $this->pChartObject->ShadowX; - $Yc = sin(($i-90)*PI/180) * $Radius*$SkewFactor + $Y + $this->pChartObject->ShadowY; - - $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); - } - - $Offset = $i - $DataGapAngle; $ID--; - } - } - - /* Draw the bottom pie splice */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $this->pChartObject->drawPolygon($Plots,$Settings); - - if ( $SecondPass ) - { - $Settings = $SliceColors[$SliceID]; - if ( $Border ) - { $Settings["R"]+= 30; $Settings["G"]+= 30; $Settings["B"]+= 30;; } - - $Angle = $SliceAngle[$SliceID][1]; - $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; - $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; - $this->pChartObject->drawLine($Plots[0],$Plots[1],$Xc,$Yc,$Settings); - - $Angle = $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1]; - $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; - $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; - $this->pChartObject->drawLine($Plots[0],$Plots[1],$Xc,$Yc,$Settings); - } - } - - /* Draw the two vertical edges */ - $Slices = array_reverse($Slices); - $SliceColors = array_reverse($SliceColors); - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; - $Settings["R"]+= 10; $Settings["G"]+= 10; $Settings["B"]+= 10; $Settings["NoBorder"] = TRUE; - - if ( $Visible[$SliceID]["Start"] ) - { - $this->pChartObject->drawLine($Plots[2],$Plots[3],$Plots[2],$Plots[3]- $SliceHeight,array("R"=>255,"G"=>255,"B"=>255)); - $Border = ""; - $Border[] = $Plots[0]; $Border[] = $Plots[1]; $Border[] = $Plots[0]; $Border[] = $Plots[1] - $SliceHeight; - $Border[] = $Plots[2]; $Border[] = $Plots[3] - $SliceHeight; $Border[] = $Plots[2]; $Border[] = $Plots[3]; - $this->pChartObject->drawPolygon($Border,$Settings); - } - } - - $Slices = array_reverse($Slices); - $SliceColors = array_reverse($SliceColors); - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; - $Settings["R"]+= 10; $Settings["G"]+= 10; $Settings["B"]+= 10; $Settings["NoBorder"] = TRUE; - if ( $Visible[$SliceID]["End"] ) - { - $this->pChartObject->drawLine($Plots[count($Plots)-2],$Plots[count($Plots)-1],$Plots[count($Plots)-2],$Plots[count($Plots)-1]- $SliceHeight,array("R"=>255,"G"=>255,"B"=>255)); - - $Border = ""; - $Border[] = $Plots[0]; $Border[] = $Plots[1]; $Border[] = $Plots[0]; $Border[] = $Plots[1] - $SliceHeight; - $Border[] = $Plots[count($Plots)-2]; $Border[] = $Plots[count($Plots)-1] - $SliceHeight; $Border[] = $Plots[count($Plots)-2]; $Border[] = $Plots[count($Plots)-1]; - $this->pChartObject->drawPolygon($Border,$Settings); - } - } - - /* Draw the rounded edges */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; - $Settings["R"]+= 10; $Settings["G"]+= 10; $Settings["B"]+= 10; $Settings["NoBorder"] = TRUE; - - for ($j=2;$j<count($Plots)-2;$j=$j+2) - { - $Angle = $SliceAngle[$SliceID][$j/2]; - if ( $Angle < 270 && $Angle > 90 ) - { - $Border = ""; - $Border[] = $Plots[$j]; $Border[] = $Plots[$j+1]; - $Border[] = $Plots[$j+2]; $Border[] = $Plots[$j+3]; - $Border[] = $Plots[$j+2]; $Border[] = $Plots[$j+3] - $SliceHeight; - $Border[] = $Plots[$j]; $Border[] = $Plots[$j+1] - $SliceHeight; - $this->pChartObject->drawPolygon($Border,$Settings); - } - } - - if ( $SecondPass ) - { - $Settings = $SliceColors[$SliceID]; - if ( $Border ) - { $Settings["R"]+= 30; $Settings["G"]+= 30; $Settings["B"]+= 30; } - - $Angle = $SliceAngle[$SliceID][1]; - if ( $Angle < 270 && $Angle > 90 ) - { - $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; - $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; - $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); - } - - $Angle = $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1]; - if ( $Angle < 270 && $Angle > 90 ) - { - $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; - $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; - $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); - } - - if ( $SliceAngle[$SliceID][1] > 270 && $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1] < 270 ) - { - $Xc = cos((270-90)*PI/180) * $Radius + $X; - $Yc = sin((270-90)*PI/180) * $Radius*$SkewFactor + $Y; - $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); - } - - if ( $SliceAngle[$SliceID][1] > 90 && $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1] < 90 ) - { - $Xc = cos((0)*PI/180) * $Radius + $X; - $Yc = sin((0)*PI/180) * $Radius*$SkewFactor + $Y; - $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); - } - - } - } - - /* Draw the top splice */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; - $Settings["R"]+= 20; $Settings["G"]+= 20; $Settings["B"]+= 20; - - $Top = ""; - for($j=0;$j<count($Plots);$j=$j+2) { $Top[] = $Plots[$j]; $Top[] = $Plots[$j+1]- $SliceHeight; } - $this->pChartObject->drawPolygon($Top,$Settings); - } - - - /* Second pass to smooth the angles */ - if ( $SecondPass ) - { - $Step = 360 / (2 * PI * $Radius); - $Offset = 360; - $ID = count($Values)-1; - foreach($Values as $Key => $Value) - { - $FirstPoint = TRUE; - if ( $Shadow ) - $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); - else - { - if ( $Border ) - { - $Settings = array( - "R" => $Palette[$ID]["R"] + 30, - "G" => $Palette[$ID]["G"] + 30, - "B" => $Palette[$ID]["B"] + 30, - "Alpha" => $Palette[$ID]["Alpha"]); - } - else - $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); - } - - $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } - - if ($DataGapAngle == 0) - { $X0 = $X; $Y0 = $Y- $SliceHeight; } - else - { - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; - $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius*$SkewFactor + $Y - $SliceHeight; - } - $Plots[] = $X0; $Plots[] = $Y0; - - for ($i=$Offset;$i>=$EndAngle;$i=$i-$Step) - { - $Xc = cos(($i-90)*PI/180) * $Radius + $X; - $Yc = sin(($i-90)*PI/180) * $Radius*$SkewFactor + $Y - $SliceHeight; - - if ( $FirstPoint ) - { $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); } - else - { $FirstPoint = FALSE; } - - $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); - if ($i < 270 && $i > 90 ) - { $this->pChartObject->drawAntialiasPixel($Xc,$Yc+$SliceHeight,$Settings); } - } - $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); - - $Offset = $i - $DataGapAngle; $ID--; - } - } - - if ( $WriteValues != NULL ) - { - $Step = 360 / (2 * PI * $Radius); - $Offset = 360; $ID = count($Values)-1; - $Settings = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"R"=>$ValueR,"G"=>$ValueG,"B"=>$ValueB,"Alpha"=>$ValueAlpha); - foreach($Values as $Key => $Value) - { - $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } - - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $Xc = cos(($Angle-90)*PI/180) * ($Radius)/2 + $X; - $Yc = sin(($Angle-90)*PI/180) * ($Radius*$SkewFactor)/2 + $Y - $SliceHeight; - - if ( $WriteValues == PIE_VALUE_PERCENTAGE ) - $Display = round(( 100 / $SerieSum ) * $Value)."%"; - elseif ( $WriteValues == PIE_VALUE_NATURAL ) - $Display = $Value.$ValueSuffix; - - $this->pChartObject->drawText($Xc,$Yc,$Display,$Settings); - - $Offset = $EndAngle - $DataGapAngle; $ID--; - } - } - - if ( $DrawLabels ) - { - $Step = 360 / (2 * PI * $Radius); - $Offset = 360; $ID = count($Values)-1; - foreach($Values as $Key => $Value) - { - if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) - { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} - else - { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } - - $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } - - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; - $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y - $SliceHeight; - - if ( isset($Data["Series"][$Data["Abscissa"]]["Data"][$ID]) ) - { - $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$ID]; - - $Settings["Angle"] = 360-$Angle; - $Settings["Length"] = 25; - $Settings["Size"] = 8; - $this->pChartObject->drawArrowLabel($Xc,$Yc," ".$Label." ",$Settings); - } - - $Offset = $EndAngle - $DataGapAngle; $ID--; - } - } - - $this->pChartObject->Shadow = $RestoreShadow; - - return(PIE_RENDERED); - } - - /* Draw the legend of pie chart */ - function drawPieLegend($X,$Y,$Format="") - { - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; - $FontR = isset($Format["FontR"]) ? $Format["FontR"] : $this->pChartObject->FontColorR; - $FontG = isset($Format["FontG"]) ? $Format["FontG"] : $this->pChartObject->FontColorG; - $FontB = isset($Format["FontB"]) ? $Format["FontB"] : $this->pChartObject->FontColorB; - $BoxSize = isset($Format["BoxSize"]) ? $Format["BoxSize"] : 5; - $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; - $R = isset($Format["R"]) ? $Format["R"] : 200; - $G = isset($Format["G"]) ? $Format["G"] : 200; - $B = isset($Format["B"]) ? $Format["B"] : 200; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; - - if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } - - $YStep = max($this->pChartObject->FontSize,$BoxSize) + 5; - $XStep = $BoxSize + 5; - - /* Data Processing */ - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - /* Do we have an abscissa serie defined? */ - if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } - - $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; - foreach($Data["Series"][$Data["Abscissa"]]["Data"] as $Key => $Value) - { - $BoxArray = $this->pChartObject->getTextBox($vX+$BoxSize+4,$vY+$BoxSize/2,$FontName,$FontSize,0,$Value); - - if ( $Mode == LEGEND_VERTICAL ) - { - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$BoxSize/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$BoxSize/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$BoxSize/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$BoxSize/2; } - $vY=$vY+$YStep; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$BoxSize/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$BoxSize/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$BoxSize/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$BoxSize/2; } - $vX=$Boundaries["R"]+$XStep; - } - } - $vY=$vY-$YStep; $vX=$vX-$XStep; - - $TopOffset = $Y - $Boundaries["T"]; - if ( $Boundaries["B"]-($vY+$BoxSize) < $TopOffset ) { $Boundaries["B"] = $vY+$BoxSize+$TopOffset; } - - if ( $Style == LEGEND_ROUND ) - $this->pChartObject->drawRoundedFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - elseif ( $Style == LEGEND_BOX ) - $this->pChartObject->drawFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - - $RestoreShadow = $this->pChartObject->Shadow; $this->pChartObject->Shadow = FALSE; - foreach($Data["Series"][$Data["Abscissa"]]["Data"] as $Key => $Value) - { - $R = $Palette[$Key]["R"]; $G = $Palette[$Key]["G"]; $B = $Palette[$Key]["B"]; - - $this->pChartObject->drawFilledRectangle($X+1,$Y+1,$X+$BoxSize+1,$Y+$BoxSize+1,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); - $this->pChartObject->drawFilledRectangle($X,$Y,$X+$BoxSize,$Y+$BoxSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); - if ( $Mode == LEGEND_VERTICAL ) - { - $this->pChartObject->drawText($X+$BoxSize+4,$Y+$BoxSize/2,$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); - $Y=$Y+$YStep; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - $BoxArray = $this->pChartObject->drawText($X+$BoxSize+4,$Y+$BoxSize/2,$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); - $X=$BoxArray[1]["X"]+2+$XStep; - } - } - - $this->Shadow = $RestoreShadow; - } - - /* Set the color of the specified slice */ - function setSliceColor($SliceID,$Format="") - { - $R = isset($Format["R"]) ? $Format["R"] : 0; - $G = isset($Format["G"]) ? $Format["G"] : 0; - $B = isset($Format["B"]) ? $Format["B"] : 0; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - - $this->pDataObject->Palette[$SliceID]["R"] = $R; - $this->pDataObject->Palette[$SliceID]["G"] = $G; - $this->pDataObject->Palette[$SliceID]["B"] = $B; - $this->pDataObject->Palette[$SliceID]["Alpha"] = $Alpha; - } - - /* Internally used compute the label positions */ - function writePieLabel($X,$Y,$Label,$Angle,$Settings,$Stacked,$Xc=0,$Yc=0,$Radius=0,$Reversed=FALSE) - { - $LabelOffset = 30; - $FontName = $this->pChartObject->FontName; - $FontSize = $this->pChartObject->FontSize; - - if ( !$Stacked ) - { - $Settings["Angle"] = 360-$Angle; - $Settings["Length"] = 25; - $Settings["Size"] = 8; - - $this->pChartObject->drawArrowLabel($X,$Y," ".$Label." ",$Settings); - } - else - { - $X2 = cos(deg2rad($Angle-90))*20+$X; - $Y2 = sin(deg2rad($Angle-90))*20+$Y; - - $TxtPos = $this->pChartObject->getTextBox($X,$Y,$FontName,$FontSize,0,$Label); - $Height = $TxtPos[0]["Y"] - $TxtPos[2]["Y"]; - $YTop = $Y2 - $Height/2 - 2; - $YBottom = $Y2 + $Height/2 + 2; - - if ( $this->LabelPos != "" ) - { - $Done = FALSE; - foreach($this->LabelPos as $Key => $Settings) - { - if ( !$Done ) - { - if ( $Angle <= 90 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) - { $this->shift(0,180,-($Height+2),$Reversed); $Done = TRUE; } - if ( $Angle > 90 && $Angle <= 180 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) - { $this->shift(0,180,-($Height+2),$Reversed); $Done = TRUE; } - if ( $Angle > 180 && $Angle <= 270 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) - { $this->shift(180,360,($Height+2),$Reversed); $Done = TRUE; } - if ( $Angle > 270 && $Angle <= 360 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) - { $this->shift(180,360,($Height+2),$Reversed); $Done = TRUE; } - } - } - } - - $LabelSettings = array("YTop"=>$YTop,"YBottom"=>$YBottom,"Label"=>$Label,"Angle"=>$Angle,"X1"=>$X,"Y1"=>$Y,"X2"=>$X2,"Y2"=>$Y2); - if ( $Angle <= 180 ) { $LabelSettings["X3"] = $Xc+$Radius+$LabelOffset; } - if ( $Angle > 180 ) { $LabelSettings["X3"] = $Xc-$Radius-$LabelOffset; } - $this->LabelPos[] = $LabelSettings; - } - } - - /* Internally used to shift label positions */ - function shift($StartAngle,$EndAngle,$Offset,$Reversed) - { - if ( $Reversed ) { $Offset = -$Offset; } - foreach($this->LabelPos as $Key => $Settings) - { - if ( $Settings["Angle"] > $StartAngle && $Settings["Angle"] <= $EndAngle ) { $this->LabelPos[$Key]["YTop"] = $Settings["YTop"] + $Offset; $this->LabelPos[$Key]["YBottom"] = $Settings["YBottom"] + $Offset; $this->LabelPos[$Key]["Y2"] = $Settings["Y2"] + $Offset; } - } - } - - /* Internally used to write the re-computed labels */ - function writeShiftedLabels() - { - if ( $this->LabelPos == "" ) { return(0); } - foreach($this->LabelPos as $Key => $Settings) - { - $X1 = $Settings["X1"]; $Y1 = $Settings["Y1"]; - $X2 = $Settings["X2"]; $Y2 = $Settings["Y2"]; - $X3 = $Settings["X3"]; - $Angle = $Settings["Angle"]; - $Label = $Settings["Label"]; - - $this->pChartObject->drawArrow($X2,$Y2,$X1,$Y1,array("Size"=>8)); - if ( $Angle <= 180 ) - { - $this->pChartObject->drawLine($X2,$Y2,$X3,$Y2); - $this->pChartObject->drawText($X3+2,$Y2,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); - } - else - { - $this->pChartObject->drawLine($X2,$Y2,$X3,$Y2); - $this->pChartObject->drawText($X3-2,$Y2,$Label,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); - } - } - } - - /* Draw a ring chart */ - function draw2DRing($X,$Y,$Format="") - { - $OuterRadius = isset($Format["Radius"]) ? $Format["Radius"] : 60; - $Precision = isset($Format["Precision"]) ? $Format["Precision"] : 0; - $InnerRadius = isset($Format["Radius"]) ? $Format["Radius"] : 30; - $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 100; - $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; - $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; - $LabelStacked = isset($Format["LabelStacked"]) ? $Format["LabelStacked"] : FALSE; - $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; - $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; - $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; - $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; - $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; - $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : NULL; //PIE_VALUE_PERCENTAGE - $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : 5; - $ValuePosition = isset($Format["ValuePosition"]) ? $Format["ValuePosition"] : PIE_VALUE_OUTSIDE; - $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; - $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; - $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; - $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; - $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; - $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; - - /* Data Processing */ - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - /* Do we have an abscissa serie defined? */ - if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } - - /* Try to find the data serie */ - $DataSerie = ""; - foreach ($Data["Series"] as $SerieName => $SerieData) - { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } - - /* Do we have data to compute? */ - if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } - - /* Remove unused data */ - list($Data,$Palette) = $this->clean0Values($Data,$Palette,$DataSerie,$Data["Abscissa"]); - - /* Compute the pie sum */ - $SerieSum = $this->pDataObject->getSum($DataSerie); - - /* Do we have data to draw? */ - if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } - - /* Dump the real number of data to draw */ - $Values = ""; - foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) - { if ($Value != 0) { $Values[] = $Value; } } - - /* Compute the wasted angular space between series */ - if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = 0; } // count($Values) - - /* Compute the scale */ - $ScaleFactor = (360 - $WastedAngular) / $SerieSum; - - $RestoreShadow = $this->pChartObject->Shadow; - if ( $this->pChartObject->Shadow ) - { - $this->pChartObject->Shadow = FALSE; - - $ShadowFormat = $Format; $ShadowFormat["Shadow"] = TRUE; - $this->draw2DRing($X+$this->pChartObject->ShadowX,$Y+$this->pChartObject->ShadowY,$ShadowFormat); - } - - /* Draw the polygon pie elements */ - $Step = 360 / (2 * PI * $OuterRadius); - $Offset = 0; $ID = 0; - foreach($Values as $Key => $Value) - { - if ( $Shadow ) - { - $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); - $BorderColor = $Settings; - } - else - { - if ( !isset($Palette[$ID]["R"]) ) { $Color = $this->pChartObject->getRandomColor(); $Palette[$ID] = $Color; $this->pDataObject->savePalette($ID,$Color); } - $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); - - if ( $Border ) - $BorderColor = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha); - else - $BorderColor = $Settings; - } - - $Plots = ""; $Boundaries = ""; $AAPixels = ""; - $EndAngle = $Offset+($Value*$ScaleFactor); if ( $EndAngle > 360 ) { $EndAngle = 360; } - for($i=$Offset;$i<=$EndAngle;$i=$i+$Step) - { - $Xc = cos(($i-90)*PI/180) * $OuterRadius + $X; - $Yc = sin(($i-90)*PI/180) * $OuterRadius + $Y; - - if ( !isset($Boundaries[0]["X1"]) ) { $Boundaries[0]["X1"] = $Xc; $Boundaries[0]["Y1"] = $Yc; } - $AAPixels[] = array($Xc,$Yc); - - if ( $i<90 ) { $Yc++; } - if ( $i>180 && $i<270 ) { $Xc++; } - if ( $i>=270 ) { $Xc++; $Yc++; } - - $Plots[] = $Xc; $Plots[] = $Yc; - } - $Boundaries[1]["X1"] = $Xc; $Boundaries[1]["Y1"] = $Yc; - $Lasti = $EndAngle; - - for($i=$EndAngle;$i>=$Offset;$i=$i-$Step) - { - $Xc = cos(($i-90)*PI/180) * ($InnerRadius-1) + $X; - $Yc = sin(($i-90)*PI/180) * ($InnerRadius-1) + $Y; - - if ( !isset($Boundaries[1]["X2"]) ) { $Boundaries[1]["X2"] = $Xc; $Boundaries[1]["Y2"] = $Yc; } - $AAPixels[] = array($Xc,$Yc); - - $Xc = cos(($i-90)*PI/180) * $InnerRadius + $X; - $Yc = sin(($i-90)*PI/180) * $InnerRadius + $Y; - - if ( $i<90 ) { $Yc++; } - if ( $i>180 && $i<270 ) { $Xc++; } - if ( $i>=270 ) { $Xc++; $Yc++; } - - $Plots[] = $Xc; $Plots[] = $Yc; - } - $Boundaries[0]["X2"] = $Xc; $Boundaries[0]["Y2"] = $Yc; - - /* Draw the polygon */ - $this->pChartObject->drawPolygon($Plots,$Settings); - if ( $RecordImageMap && !$Shadow ) { $this->pChartObject->addToImageMap("POLY",$this->arraySerialize($Plots),$this->pChartObject->toHTMLColor($Palette[$ID]["R"],$Palette[$ID]["G"],$Palette[$ID]["B"]),$Data["Series"][$Data["Abscissa"]]["Data"][$Key],$Value); } - - /* Smooth the edges using AA */ - foreach($AAPixels as $iKey => $Pos ) { $this->pChartObject->drawAntialiasPixel($Pos[0],$Pos[1],$BorderColor); } - $this->pChartObject->drawLine($Boundaries[0]["X1"],$Boundaries[0]["Y1"],$Boundaries[0]["X2"],$Boundaries[0]["Y2"],$BorderColor); - $this->pChartObject->drawLine($Boundaries[1]["X1"],$Boundaries[1]["Y1"],$Boundaries[1]["X2"],$Boundaries[1]["Y2"],$BorderColor); - - if ( $DrawLabels && !$Shadow ) - { - if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) - { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} - else - { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } - - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $Xc = cos(($Angle-90)*PI/180) * $OuterRadius + $X; - $Yc = sin(($Angle-90)*PI/180) * $OuterRadius + $Y; - - $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; - - if ( $LabelStacked ) - $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,TRUE,$X,$Y,$OuterRadius); - else - $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,FALSE); - } - - $Offset = $Lasti; $ID++; - } - - if ( $DrawLabels && $LabelStacked ) { $this->writeShiftedLabels(); } - - if ( $WriteValues && !$Shadow ) - { - $Step = 360 / (2 * PI * $OuterRadius); - $Offset = 0; - foreach($Values as $Key => $Value) - { - $EndAngle = $Offset+($Value*$ScaleFactor); - if ( $EndAngle > 360 ) { $EndAngle = 360; } - - $Angle = $Offset+($Value*$ScaleFactor)/2; - if ( $ValuePosition == PIE_VALUE_OUTSIDE ) - { - $Xc = cos(($Angle-90)*PI/180) * ($OuterRadius+$ValuePadding) + $X; - $Yc = sin(($Angle-90)*PI/180) * ($OuterRadius+$ValuePadding) + $Y; - if ( $Angle >=0 && $Angle <= 90 ) { $Align = TEXT_ALIGN_BOTTOMLEFT; } - if ( $Angle > 90 && $Angle <= 180 ) { $Align = TEXT_ALIGN_TOPLEFT; } - if ( $Angle > 180 && $Angle <= 270 ) { $Align = TEXT_ALIGN_TOPRIGHT; } - if ( $Angle > 270 ) { $Align = TEXT_ALIGN_BOTTOMRIGHT; } - } - else - { - $Xc = cos(($Angle-90)*PI/180) * (($OuterRadius-$InnerRadius)/2+$InnerRadius) + $X; - $Yc = sin(($Angle-90)*PI/180) * (($OuterRadius-$InnerRadius)/2+$InnerRadius) + $Y; - $Align = TEXT_ALIGN_MIDDLEMIDDLE; - } - - if ( $WriteValues == PIE_VALUE_PERCENTAGE ) - $Display = round(( 100 / $SerieSum ) * $Value,$Precision)."%"; - elseif ( $WriteValues == PIE_VALUE_NATURAL ) - $Display = $Value.$ValueSuffix; - else - $Label = ""; - - $this->pChartObject->drawText($Xc,$Yc,$Display,array("Align"=>$Align,"R"=>$ValueR,"G"=>$ValueG,"B"=>$ValueB)); - $Offset = $EndAngle; - } - } - - $this->pChartObject->Shadow = $RestoreShadow; - - return(PIE_RENDERED); - } - - /* Draw a 3D ring chart */ - function draw3DRing($X,$Y,$Format="") - { - $OuterRadius = isset($Format["OuterRadius"]) ? $Format["OuterRadius"] : 100; - $Precision = isset($Format["Precision"]) ? $Format["Precision"] : 0; - $InnerRadius = isset($Format["InnerRadius"]) ? $Format["InnerRadius"] : 30; - $SkewFactor = isset($Format["SkewFactor"]) ? $Format["SkewFactor"] : .6; - $SliceHeight = isset($Format["SliceHeight"]) ? $Format["SliceHeight"] : 10; - $DataGapAngle = isset($Format["DataGapAngle"]) ? $Format["DataGapAngle"] : 10; - $DataGapRadius = isset($Format["DataGapRadius"]) ? $Format["DataGapRadius"] : 10; - $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; - $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; - $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; - $LabelStacked = isset($Format["LabelStacked"]) ? $Format["LabelStacked"] : FALSE; - $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; - $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; - $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; - $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; - $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; - $Cf = isset($Format["Cf"]) ? $Format["Cf"] : 20; - $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : PIE_VALUE_NATURAL; - $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : $SliceHeight + 15; - $ValuePosition = isset($Format["ValuePosition"]) ? $Format["ValuePosition"] : PIE_VALUE_OUTSIDE; - $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; - $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; - $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; - $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; - $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; - $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; - - /* Error correction for overlaying rounded corners */ - if ( $SkewFactor < .5 ) { $SkewFactor = .5; } - - /* Data Processing */ - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - /* Do we have an abscissa serie defined? */ - if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } - - /* Try to find the data serie */ - $DataSerie = ""; - foreach ($Data["Series"] as $SerieName => $SerieData) - { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } - - /* Do we have data to compute? */ - if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } - - /* Remove unused data */ - list($Data,$Palette) = $this->clean0Values($Data,$Palette,$DataSerie,$Data["Abscissa"]); - - /* Compute the pie sum */ - $SerieSum = $this->pDataObject->getSum($DataSerie); - - /* Do we have data to draw? */ - if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } - - /* Dump the real number of data to draw */ - $Values = ""; - foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) - { if ($Value != 0) { $Values[] = $Value; } } - - /* Compute the wasted angular space between series */ - if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = count($Values) * $DataGapAngle; } - - /* Compute the scale */ - $ScaleFactor = (360 - $WastedAngular) / $SerieSum; - - $RestoreShadow = $this->pChartObject->Shadow; - if ( $this->pChartObject->Shadow ) { $this->pChartObject->Shadow = FALSE; } - - /* Draw the polygon ring elements */ - $Offset = 360; $ID = count($Values)-1; - $Values = array_reverse($Values); - $Slice = 0; $Slices = ""; $SliceColors = ""; $Visible = ""; $SliceAngle = ""; - foreach($Values as $Key => $Value) - { - if ( !isset($Palette[$ID]["R"]) ) { $Color = $this->pChartObject->getRandomColor(); $Palette[$ID] = $Color; $this->pDataObject->savePalette($ID,$Color); } - $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); - - $SliceColors[$Slice] = $Settings; - - $StartAngle = $Offset; - $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } - - if ( $StartAngle > 180 ) { $Visible[$Slice]["Start"] = TRUE; } else { $Visible[$Slice]["Start"] = TRUE; } - if ( $EndAngle < 180 ) { $Visible[$Slice]["End"] = FALSE; } else { $Visible[$Slice]["End"] = TRUE; } - - $Step = (360 / (2 * PI * $OuterRadius))/2; - $OutX1 = VOID; $OutY1 = VOID; - for($i=$Offset;$i>=$EndAngle;$i=$i-$Step) - { - $Xc = cos(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-2) + $X; - $Yc = sin(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-2)*$SkewFactor + $Y; - $Slices[$Slice]["AA"][] = array($Xc,$Yc); - - $Xc = cos(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-1) + $X; - $Yc = sin(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-1)*$SkewFactor + $Y; - $Slices[$Slice]["AA"][] = array($Xc,$Yc); - - $Xc = cos(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius) + $X; - $Yc = sin(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius)*$SkewFactor + $Y; - $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); - - if ( $OutX1 == VOID ) { $OutX1 = $Xc; $OutY1 = $Yc; } - - if ( $i<90 ) { $Yc++; } - if ( $i>90 && $i<180 ) { $Xc++; } - if ( $i>180 && $i<270 ) { $Xc++; } - if ( $i>=270 ) { $Xc++; $Yc++; } - - $Slices[$Slice]["BottomPoly"][] = floor($Xc); $Slices[$Slice]["BottomPoly"][] = floor($Yc); - $Slices[$Slice]["TopPoly"][] = floor($Xc); $Slices[$Slice]["TopPoly"][] = floor($Yc)-$SliceHeight; - $Slices[$Slice]["Angle"][] = $i; - } - $OutX2 = $Xc; $OutY2 = $Yc; - - $Slices[$Slice]["Angle"][] = VOID; - $Lasti = $i; - - $Step = (360 / (2 * PI * $InnerRadius))/2; - $InX1 = VOID; $InY1 = VOID; - for($i=$EndAngle;$i<=$Offset;$i=$i+$Step) - { - $Xc = cos(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius-1) + $X; - $Yc = sin(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius-1)*$SkewFactor + $Y; - $Slices[$Slice]["AA"][] = array($Xc,$Yc); - - $Xc = cos(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius) + $X; - $Yc = sin(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius)*$SkewFactor + $Y; - $Slices[$Slice]["AA"][] = array($Xc,$Yc); - - if ( $InX1 == VOID ) { $InX1 = $Xc; $InY1 = $Yc; } - - if ( $i<90 ) { $Yc++; } - if ( $i>90 && $i<180 ) { $Xc++; } - if ( $i>180 && $i<270 ) { $Xc++; } - if ( $i>=270 ) { $Xc++; $Yc++; } - - $Slices[$Slice]["BottomPoly"][] = floor($Xc); $Slices[$Slice]["BottomPoly"][] = floor($Yc); - $Slices[$Slice]["TopPoly"][] = floor($Xc); $Slices[$Slice]["TopPoly"][] = floor($Yc)-$SliceHeight; - $Slices[$Slice]["Angle"][] = $i; - } - $InX2 = $Xc; $InY2 = $Yc; - - $Slices[$Slice]["InX1"] = $InX1; $Slices[$Slice]["InY1"] = $InY1; - $Slices[$Slice]["InX2"] = $InX2; $Slices[$Slice]["InY2"] = $InY2; - $Slices[$Slice]["OutX1"] = $OutX1; $Slices[$Slice]["OutY1"] = $OutY1; - $Slices[$Slice]["OutX2"] = $OutX2; $Slices[$Slice]["OutY2"] = $OutY2; - - $Offset = $Lasti - $DataGapAngle; $ID--; $Slice++; - } - - /* Draw the bottom pie splice */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $this->pChartObject->drawPolygon($Plots["BottomPoly"],$Settings); - - foreach($Plots["AA"] as $Key => $Pos) - $this->pChartObject->drawAntialiasPixel($Pos[0],$Pos[1],$Settings); - - $this->pChartObject->drawLine($Plots["InX1"],$Plots["InY1"],$Plots["OutX2"],$Plots["OutY2"],$Settings); - $this->pChartObject->drawLine($Plots["InX2"],$Plots["InY2"],$Plots["OutX1"],$Plots["OutY1"],$Settings); - } - - $Slices = array_reverse($Slices); - $SliceColors = array_reverse($SliceColors); - - /* Draw the vertical edges (semi-visible) */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; - - $StartAngle = $Plots["Angle"][0]; - foreach($Plots["Angle"] as $Key =>$Angle) { if ($Angle == VOID) { $EndAngle = $Plots["Angle"][$Key-1]; } } - - if ( $StartAngle >= 270 || $StartAngle <= 90 ) - $this->pChartObject->drawLine($Plots["OutX1"],$Plots["OutY1"],$Plots["OutX1"],$Plots["OutY1"]-$SliceHeight,$Settings); - if ( $StartAngle >= 270 || $StartAngle <= 90 ) - $this->pChartObject->drawLine($Plots["OutX2"],$Plots["OutY2"],$Plots["OutX2"],$Plots["OutY2"]-$SliceHeight,$Settings); - - $this->pChartObject->drawLine($Plots["InX1"],$Plots["InY1"],$Plots["InX1"],$Plots["InY1"]-$SliceHeight,$Settings); - $this->pChartObject->drawLine($Plots["InX2"],$Plots["InY2"],$Plots["InX2"],$Plots["InY2"]-$SliceHeight,$Settings); - } - - /* Draw the inner vertical slices */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; - - $Outer = TRUE; $Inner = FALSE; - $InnerPlotsA = ""; $InnerPlotsB = ""; - foreach($Plots["Angle"] as $ID => $Angle) - { - if ( $Angle == VOID ) - { $Outer = FALSE; $Inner = TRUE; } - elseif( $Inner ) - { - if (( $Angle < 90 || $Angle > 270 ) && isset($Plots["BottomPoly"][$ID*2]) ) - { - $Xo = $Plots["BottomPoly"][$ID*2]; - $Yo = $Plots["BottomPoly"][$ID*2+1]; - - $InnerPlotsA[] = $Xo; $InnerPlotsA[] = $Yo; - $InnerPlotsB[] = $Xo; $InnerPlotsB[] = $Yo-$SliceHeight; - } - } - } - - if ( $InnerPlotsA != "" ) - { $InnerPlots = array_merge($InnerPlotsA,$this->arrayReverse($InnerPlotsB)); $this->pChartObject->drawPolygon($InnerPlots,$Settings); } - } - - /* Draw the splice top and left poly */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $Settings["R"] = $Settings["R"]+$Cf*1.5; $Settings["G"] = $Settings["G"]+$Cf*1.5; $Settings["B"] = $Settings["B"]+$Cf*1.5; - - $StartAngle = $Plots["Angle"][0]; - foreach($Plots["Angle"] as $Key =>$Angle) { if ($Angle == VOID) { $EndAngle = $Plots["Angle"][$Key-1]; } } - - if ( $StartAngle < 180 ) - { - $Points = ""; - $Points[] = $Plots["InX2"]; - $Points[] = $Plots["InY2"]; - $Points[] = $Plots["InX2"]; - $Points[] = $Plots["InY2"]-$SliceHeight; - $Points[] = $Plots["OutX1"]; - $Points[] = $Plots["OutY1"]-$SliceHeight; - $Points[] = $Plots["OutX1"]; - $Points[] = $Plots["OutY1"]; - - $this->pChartObject->drawPolygon($Points,$Settings); - } - - if ( $EndAngle > 180 ) - { - $Points = ""; - $Points[] = $Plots["InX1"]; - $Points[] = $Plots["InY1"]; - $Points[] = $Plots["InX1"]; - $Points[] = $Plots["InY1"]-$SliceHeight; - $Points[] = $Plots["OutX2"]; - $Points[] = $Plots["OutY2"]-$SliceHeight; - $Points[] = $Plots["OutX2"]; - $Points[] = $Plots["OutY2"]; - - $this->pChartObject->drawPolygon($Points,$Settings); - } - } - - - /* Draw the vertical edges (visible) */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; - - $StartAngle = $Plots["Angle"][0]; - foreach($Plots["Angle"] as $Key =>$Angle) { if ($Angle == VOID) { $EndAngle = $Plots["Angle"][$Key-1]; } } - - if ( $StartAngle <= 270 && $StartAngle >= 90 ) - $this->pChartObject->drawLine($Plots["OutX1"],$Plots["OutY1"],$Plots["OutX1"],$Plots["OutY1"]-$SliceHeight,$Settings); - if ( $EndAngle <= 270 && $EndAngle >= 90 ) - $this->pChartObject->drawLine($Plots["OutX2"],$Plots["OutY2"],$Plots["OutX2"],$Plots["OutY2"]-$SliceHeight,$Settings); - } - - - /* Draw the outer vertical slices */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; - - $Outer = TRUE; $Inner = FALSE; - $OuterPlotsA = ""; $OuterPlotsB = ""; $InnerPlotsA = ""; $InnerPlotsB = ""; - foreach($Plots["Angle"] as $ID => $Angle) - { - if ( $Angle == VOID ) - { $Outer = FALSE; $Inner = TRUE; } - elseif( $Outer ) - { - if ( ( $Angle > 90 && $Angle < 270 ) && isset($Plots["BottomPoly"][$ID*2]) ) - { - $Xo = $Plots["BottomPoly"][$ID*2]; - $Yo = $Plots["BottomPoly"][$ID*2+1]; - - $OuterPlotsA[] = $Xo; $OuterPlotsA[] = $Yo; - $OuterPlotsB[] = $Xo; $OuterPlotsB[] = $Yo-$SliceHeight; - } - } - } - if ( $OuterPlotsA != "" ) - { $OuterPlots = array_merge($OuterPlotsA,$this->arrayReverse($OuterPlotsB)); $this->pChartObject->drawPolygon($OuterPlots,$Settings); } - } - - $Slices = array_reverse($Slices); - $SliceColors = array_reverse($SliceColors); - - - /* Draw the top pie splice */ - foreach($Slices as $SliceID => $Plots) - { - $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; - $Settings["R"] = $Settings["R"]+$Cf*2; $Settings["G"] = $Settings["G"]+$Cf*2; $Settings["B"] = $Settings["B"]+$Cf*2; - - $this->pChartObject->drawPolygon($Plots["TopPoly"],$Settings); - - if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("POLY",$this->arraySerialize($Plots["TopPoly"]),$this->pChartObject->toHTMLColor($Settings["R"],$Settings["G"],$Settings["B"]),$Data["Series"][$Data["Abscissa"]]["Data"][$SliceID],$Data["Series"][$DataSerie]["Data"][count($Slices)-$SliceID-1]); } - - foreach($Plots["AA"] as $Key => $Pos) - $this->pChartObject->drawAntialiasPixel($Pos[0],$Pos[1]-$SliceHeight,$Settings); - - $this->pChartObject->drawLine($Plots["InX1"],$Plots["InY1"]-$SliceHeight,$Plots["OutX2"],$Plots["OutY2"]-$SliceHeight,$Settings); - $this->pChartObject->drawLine($Plots["InX2"],$Plots["InY2"]-$SliceHeight,$Plots["OutX1"],$Plots["OutY1"]-$SliceHeight,$Settings); - } - - if ( $DrawLabels ) - { - $Offset = 360; - foreach($Values as $Key => $Value) - { - $StartAngle = $Offset; - $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } - - if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) - { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} - else - { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } - - $Angle = ($EndAngle - $Offset)/2 + $Offset; - $Xc = cos(($Angle-90)*PI/180) * ($OuterRadius+$DataGapRadius) + $X; - $Yc = sin(($Angle-90)*PI/180) * ($OuterRadius+$DataGapRadius)*$SkewFactor + $Y; - - if ( $WriteValues == PIE_VALUE_PERCENTAGE ) - $Label = $Display = round(( 100 / $SerieSum ) * $Value,$Precision)."%"; - elseif ( $WriteValues == PIE_VALUE_NATURAL ) - $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; - else - $Label = ""; - - if ( $LabelStacked ) - $this->writePieLabel($Xc,$Yc-$SliceHeight,$Label,$Angle,$Settings,TRUE,$X,$Y,$OuterRadius); - else - $this->writePieLabel($Xc,$Yc-$SliceHeight,$Label,$Angle,$Settings,FALSE); - - $Offset = $EndAngle - $DataGapAngle; $ID--; $Slice++; - } - } - if ( $DrawLabels && $LabelStacked ) { $this->writeShiftedLabels(); } - - $this->pChartObject->Shadow = $RestoreShadow; - - return(PIE_RENDERED); - } - - /* Serialize an array */ - function arraySerialize($Data) - { - $Result = ""; - foreach($Data as $Key => $Value) - { if ($Result == "") { $Result = floor($Value); } else { $Result = $Result.",".floor($Value); } } - - return($Result); - } - - /* Reverse an array */ - function arrayReverse($Plots) - { - $Result = ""; - - for($i=count($Plots)-1;$i>=0;$i=$i-2) - { $Result[] = $Plots[$i-1]; $Result[] = $Plots[$i]; } - - return($Result); - } - - /* Remove unused series & values */ - function clean0Values($Data,$Palette,$DataSerie,$AbscissaSerie) - { - $NewPalette = ""; $NewData = ""; $NewAbscissa = ""; - - /* Remove unused series */ - foreach($Data["Series"] as $SerieName => $SerieSettings) - { if ( $SerieName != $DataSerie && $SerieName != $AbscissaSerie ) { unset($Data["Series"][$SerieName]); } } - - /* Remove NULL values */ - foreach($Data["Series"][$DataSerie]["Data"] as $Key => $Value) - { - if ($Value != 0 ) - { - $NewData[] = $Value; - $NewAbscissa[] = $Data["Series"][$AbscissaSerie]["Data"][$Key]; - if ( isset($Palette[$Key]) ) { $NewPalette[] = $Palette[$Key]; } - } - } - $Data["Series"][$DataSerie]["Data"] = $NewData; - $Data["Series"][$AbscissaSerie]["Data"] = $NewAbscissa; - - return(array($Data,$NewPalette)); - } - } -?> diff --git a/pandora_console/include/graphs/pChart/pRadar.class.php b/pandora_console/include/graphs/pChart/pRadar.class.php deleted file mode 100755 index 95d0c1f593..0000000000 --- a/pandora_console/include/graphs/pChart/pRadar.class.php +++ /dev/null @@ -1,598 +0,0 @@ -<?php - /* - pRadar - class to draw radar charts - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - define("SEGMENT_HEIGHT_AUTO" , 690001); - - define("RADAR_LAYOUT_STAR" , 690011); - define("RADAR_LAYOUT_CIRCLE" , 690012); - - define("RADAR_LABELS_ROTATED" , 690021); - define("RADAR_LABELS_HORIZONTAL" , 690022); - - /* pRadar class definition */ - class pRadar - { - var $pChartObject; - - /* Class creator */ - function pRadar() - { } - - /* Draw a radar chart */ - function drawRadar($Object,$Values,$Format="") - { - $this->pChartObject = $Object; - - $AxisR = isset($Format["AxisR"]) ? $Format["AxisR"] : 60; - $AxisG = isset($Format["AxisG"]) ? $Format["AxisG"] : 60; - $AxisB = isset($Format["AxisB"]) ? $Format["AxisB"] : 60; - $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 50; - $AxisRotation = isset($Format["AxisRotation"]) ? $Format["AxisRotation"] : 0; - $DrawTicks = isset($Format["DrawTicks"]) ? $Format["DrawTicks"] : TRUE; - $TicksLength = isset($Format["TicksLength"]) ? $Format["TicksLength"] : 2; - $DrawAxisValues = isset($Format["DrawAxisValues"]) ? $Format["DrawAxisValues"] : TRUE; - $AxisBoxRounded = isset($Format["AxisBoxRounded"]) ? $Format["AxisBoxRounded"] : TRUE; - $AxisFontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; - $AxisFontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; - $DrawBackground = isset($Format["DrawBackground"]) ? $Format["DrawBackground"] : TRUE; - $BackgroundR = isset($Format["BackgroundR"]) ? $Format["BackgroundR"] : 255; - $BackgroundG = isset($Format["BackgroundG"]) ? $Format["BackgroundG"] : 255; - $BackgroundB = isset($Format["BackgroundB"]) ? $Format["BackgroundB"] : 255; - $BackgroundAlpha = isset($Format["BackgroundAlpha"]) ? $Format["BackgroundAlpha"] : 50; - $BackgroundGradient= isset($Format["BackgroundGradient"]) ? $Format["BackgroundGradient"] : NULL; - $Layout = isset($Format["Layout"]) ? $Format["Layout"] : RADAR_LAYOUT_STAR; - $SegmentHeight = isset($Format["SegmentHeight"]) ? $Format["SegmentHeight"] : SEGMENT_HEIGHT_AUTO; - $Segments = isset($Format["Segments"]) ? $Format["Segments"] : 4; - $WriteLabels = isset($Format["WriteLabels"]) ? $Format["WriteLabels"] : TRUE; - $SkipLabels = isset($Format["SkipLabels"]) ? $Format["SkipLabels"] : 1; - $LabelMiddle = isset($Format["LabelMiddle"]) ? $Format["LabelMiddle"] : FALSE; - $LabelsBackground = isset($Format["LabelsBackground"]) ? $Format["LabelsBackground"] : TRUE; - $LabelsBGR = isset($Format["LabelsBGR"]) ? $Format["LabelsBGR"] : 255; - $LabelsBGG = isset($Format["LabelsBGR"]) ? $Format["LabelsBGG"] : 255; - $LabelsBGB = isset($Format["LabelsBGR"]) ? $Format["LabelsBGB"] : 255; - $LabelsBGAlpha = isset($Format["LabelsBGAlpha"]) ? $Format["LabelsBGAlpha"] : 50; - $LabelPos = isset($Format["LabelPos"]) ? $Format["LabelPos"] : RADAR_LABELS_ROTATED; - $LabelPadding = isset($Format["LabelPadding"]) ? $Format["LabelPadding"] : 4; - $DrawPoints = isset($Format["DrawPoints"]) ? $Format["DrawPoints"] : TRUE; - $PointRadius = isset($Format["PointRadius"]) ? $Format["PointRadius"] : 4; - $PointSurrounding = isset($Format["PointRadius"]) ? $Format["PointRadius"] : -30; - $DrawLines = isset($Format["DrawLines"]) ? $Format["DrawLines"] : TRUE; - $LineLoopStart = isset($Format["LineLoopStart"]) ? $Format["LineLoopStart"] : TRUE; - $DrawPoly = isset($Format["DrawPoly"]) ? $Format["DrawPoly"] : FALSE; - $PolyAlpha = isset($Format["PolyAlpha"]) ? $Format["PolyAlpha"] : 40; - $FontSize = $Object->FontSize; - $X1 = $Object->GraphAreaX1; - $Y1 = $Object->GraphAreaY1; - $X2 = $Object->GraphAreaX2; - $Y2 = $Object->GraphAreaY2; - - // if ( $AxisBoxRounded ) { $DrawAxisValues = TRUE; } - - /* Cancel default tick length if ticks not enabled */ - if ( $DrawTicks == FALSE ) { $TicksLength = 0; } - - /* Data Processing */ - $Data = $Values->getData(); - $Palette = $Values->getPalette(); - - /* Catch the number of required axis */ - $LabelSerie = $Data["Abscissa"]; - if ( $LabelSerie != "" ) - { $Points = count($Data["Series"][$LabelSerie]["Data"]); } - else - { - $Points = 0; - foreach($Data["Series"] as $SerieName => $DataArray) - { if ( count($DataArray["Data"]) > $Points ) { $Points = count($DataArray["Data"]); } } - } - - /* Draw the axis */ - $CenterX = ($X2-$X1)/2 + $X1; - $CenterY = ($Y2-$Y1)/2 + $Y1; - - $EdgeHeight = min(($X2-$X1)/2,($Y2-$Y1)/2); - if ( $WriteLabels ) - $EdgeHeight = $EdgeHeight - $FontSize - $LabelPadding - $TicksLength; - - /* Determine the scale if set to automatic */ - if ( $SegmentHeight == SEGMENT_HEIGHT_AUTO) - { - $Max = 0; - foreach($Data["Series"] as $SerieName => $DataArray) - { - if ( $SerieName != $LabelSerie ) - { - if ( max($DataArray["Data"]) > $Max ) { $Max = max($DataArray["Data"]); } - } - } - $MaxSegments = $EdgeHeight/20; - $Scale = $Object->computeScale(0,$Max,$MaxSegments,array(1,2,5)); - - $Segments = $Scale["Rows"]; - $SegmentHeight = $Scale["RowHeight"]; - } - - if ( $LabelMiddle && $SkipLabels == 1 ) - { $Axisoffset = (360/$Points)/2; } - elseif ( $LabelMiddle && $SkipLabels != 1 ) - { $Axisoffset = (360/($Points/$SkipLabels))/2; } - elseif ( !$LabelMiddle ) - { $Axisoffset = 0; } - - /* Background processing */ - if ( $DrawBackground ) - { - $RestoreShadow = $Object->Shadow; - $Object->Shadow = FALSE; - - if ($BackgroundGradient == NULL) - { - if ( $Layout == RADAR_LAYOUT_STAR ) - { - $Color = array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha); - $PointArray = ""; - for($i=0;$i<=360;$i=$i+(360/$Points)) - { - $PointArray[] = cos(deg2rad($i+$AxisRotation)) * $EdgeHeight + $CenterX; - $PointArray[] = sin(deg2rad($i+$AxisRotation)) * $EdgeHeight + $CenterY; - } - $Object->drawPolygon($PointArray,$Color); - } - elseif ( $Layout == RADAR_LAYOUT_CIRCLE ) - { - $Color = array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha); - $Object->drawFilledCircle($CenterX,$CenterY,$EdgeHeight,$Color); - } - } - else - { - $GradientROffset = ($BackgroundGradient["EndR"] - $BackgroundGradient["StartR"]) / $Segments; - $GradientGOffset = ($BackgroundGradient["EndG"] - $BackgroundGradient["StartG"]) / $Segments; - $GradientBOffset = ($BackgroundGradient["EndB"] - $BackgroundGradient["StartB"]) / $Segments; - $GradientAlphaOffset = ($BackgroundGradient["EndAlpha"] - $BackgroundGradient["StartAlpha"]) / $Segments; - - if ( $Layout == RADAR_LAYOUT_STAR ) - { - for($j=$Segments;$j>=1;$j--) - { - $Color = array("R"=>$BackgroundGradient["StartR"]+$GradientROffset*$j,"G"=>$BackgroundGradient["StartG"]+$GradientGOffset*$j,"B"=>$BackgroundGradient["StartB"]+$GradientBOffset*$j,"Alpha"=>$BackgroundGradient["StartAlpha"]+$GradientAlphaOffset*$j); - $PointArray = ""; - - for($i=0;$i<=360;$i=$i+(360/$Points)) - { - $PointArray[] = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; - $PointArray[] = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; - } - $Object->drawPolygon($PointArray,$Color); - } - } - elseif ( $Layout == RADAR_LAYOUT_CIRCLE ) - { - for($j=$Segments;$j>=1;$j--) - { - $Color = array("R"=>$BackgroundGradient["StartR"]+$GradientROffset*$j,"G"=>$BackgroundGradient["StartG"]+$GradientGOffset*$j,"B"=>$BackgroundGradient["StartB"]+$GradientBOffset*$j,"Alpha"=>$BackgroundGradient["StartAlpha"]+$GradientAlphaOffset*$j); - $Object->drawFilledCircle($CenterX,$CenterY,($EdgeHeight/$Segments)*$j,$Color); - } - } - } - $Object->Shadow = $RestoreShadow; - } - - /* Axis to axis lines */ - $Color = array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha); - $ColorDotted = array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha*.8, "Ticks"=>2); - if ( $Layout == RADAR_LAYOUT_STAR ) - { - for($j=1;$j<=$Segments;$j++) - { - for($i=0;$i<360;$i=$i+(360/$Points)) - { - $EdgeX1 = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; - $EdgeY1 = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; - $EdgeX2 = cos(deg2rad($i+$AxisRotation+(360/$Points))) * ($EdgeHeight/$Segments)*$j + $CenterX; - $EdgeY2 = sin(deg2rad($i+$AxisRotation+(360/$Points))) * ($EdgeHeight/$Segments)*$j + $CenterY; - - $Object->drawLine($EdgeX1,$EdgeY1,$EdgeX2,$EdgeY2,$Color); - } - } - } - elseif ( $Layout == RADAR_LAYOUT_CIRCLE ) - { - for($j=1;$j<=$Segments;$j++) - { - $Radius = ($EdgeHeight/$Segments)*$j; - $Object->drawCircle($CenterX,$CenterY,$Radius,$Radius,$Color); - } - } - - if ( $DrawAxisValues ) - { - if ( $LabelsBackground ) - $Options = array("DrawBox"=>TRUE, "Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"BoxR"=>$LabelsBGR,"BoxG"=>$LabelsBGG,"BoxB"=>$LabelsBGB,"BoxAlpha"=>$LabelsBGAlpha); - else - $Options = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE); - - if ( $AxisBoxRounded ) { $Options["BoxRounded"] = TRUE; } - - $Options["FontName"] = $AxisFontName; - $Options["FontSize"] = $AxisFontSize; - - $Angle = 360 / ($Points*2); - for($j=1;$j<=$Segments;$j++) - { - $Label = $j * $SegmentHeight; - - if ( $Layout == RADAR_LAYOUT_CIRCLE ) - { - $EdgeX1 = cos(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; - $EdgeY1 = sin(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; - } - elseif ( $Layout == RADAR_LAYOUT_STAR ) - { - $EdgeX1 = cos(deg2rad($AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; - $EdgeY1 = sin(deg2rad($AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; - $EdgeX2 = cos(deg2rad((360 / $Points) + $AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; - $EdgeY2 = sin(deg2rad((360 / $Points) + $AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; - - $EdgeX1 = ($EdgeX2 - $EdgeX1)/2 + $EdgeX1; - $EdgeY1 = ($EdgeY2 - $EdgeY1)/2 + $EdgeY1; - } - - $Object->drawText($EdgeX1,$EdgeY1,$Label,$Options); - } - } - - /* Axis lines */ - $ID = 0; - for($i=0;$i<360;$i=$i+(360/$Points)) - { - $EdgeX = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterX; - $EdgeY = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterY; - - if ($ID % $SkipLabels == 0) - { $Object->drawLine($CenterX,$CenterY,$EdgeX,$EdgeY,$Color); } - else - { $Object->drawLine($CenterX,$CenterY,$EdgeX,$EdgeY,$ColorDotted); } - - if ( $WriteLabels ) - { - $LabelX = cos(deg2rad($i+$AxisRotation+$Axisoffset)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterX; - $LabelY = sin(deg2rad($i+$AxisRotation+$Axisoffset)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterY; - - if ( $LabelSerie != "" ) - { $Label = isset($Data["Series"][$LabelSerie]["Data"][$ID]) ? $Data["Series"][$LabelSerie]["Data"][$ID] : ""; } - else - $Label = $ID; - - if ($ID % $SkipLabels == 0) - { - if ( $LabelPos == RADAR_LABELS_ROTATED ) - $Object->drawText($LabelX,$LabelY,$Label,array("Angle"=>(360-($i+$AxisRotation+$Axisoffset))-90,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - else - { - if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } - if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMLEFT)); } - if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } - if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPLEFT)); } - if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMRIGHT)); } - if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); } - if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPRIGHT)); } - if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPMIDDLE)); } - } - } - } - $ID++; - } - - /* Compute the plots position */ - $ID = 0; $Plot = ""; - foreach($Data["Series"] as $SerieName => $Data) - { - if ( $SerieName != $LabelSerie ) - { - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); - foreach($Data["Data"] as $Key => $Value) - { - $Angle = (360/$Points) * $Key; - $Length = ($EdgeHeight/($Segments*$SegmentHeight))*$Value; - - $X = cos(deg2rad($Angle+$AxisRotation)) * $Length + $CenterX; - $Y = sin(deg2rad($Angle+$AxisRotation)) * $Length + $CenterY; - - $Plot[$ID][] = array($X,$Y); - } - $ID++; - } - } - - /* Draw all that stuff! */ - foreach($Plot as $ID => $Points) - { - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); - - /* Draw the polygons */ - if ( $DrawPoly ) - { - if ($PolyAlpha != NULL) - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$PolyAlpha,"Surrounding"=>$PointSurrounding); - - $PointsArray = ""; - for($i=0; $i<count($Points);$i++) - { $PointsArray[] = $Points[$i][0]; $PointsArray[] = $Points[$i][1]; } - $Object->drawPolygon($PointsArray,$Color); - } - - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); - - /* Draw the lines & points */ - for($i=0; $i<count($Points);$i++) - { - if ( $DrawLines && $i < count($Points)-1) - $Object->drawLine($Points[$i][0],$Points[$i][1],$Points[$i+1][0],$Points[$i+1][1],$Color); - - if ( $DrawPoints ) - $Object->drawFilledCircle($Points[$i][0],$Points[$i][1],$PointRadius,$Color); - } - - /* Loop to the starting points if asked */ - if ( $LineLoopStart && $DrawLines ) - $Object->drawLine($Points[$i-1][0],$Points[$i-1][1],$Points[0][0],$Points[0][1],$Color); - - } - } - - - - /* Draw a radar chart */ - function drawPolar($Object,$Values,$Format="") - { - $this->pChartObject = $Object; - - $AxisR = isset($Format["AxisR"]) ? $Format["AxisR"] : 60; - $AxisG = isset($Format["AxisG"]) ? $Format["AxisG"] : 60; - $AxisB = isset($Format["AxisB"]) ? $Format["AxisB"] : 60; - $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 50; - $AxisRotation = isset($Format["AxisRotation"]) ? $Format["AxisRotation"] : -90; - $DrawTicks = isset($Format["DrawTicks"]) ? $Format["DrawTicks"] : TRUE; - $TicksLength = isset($Format["TicksLength"]) ? $Format["TicksLength"] : 2; - $DrawAxisValues = isset($Format["DrawAxisValues"]) ? $Format["DrawAxisValues"] : TRUE; - $AxisBoxRounded = isset($Format["AxisBoxRounded"]) ? $Format["AxisBoxRounded"] : TRUE; - $AxisFontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; - $AxisFontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; - $DrawBackground = isset($Format["DrawBackground"]) ? $Format["DrawBackground"] : TRUE; - $BackgroundR = isset($Format["BackgroundR"]) ? $Format["BackgroundR"] : 255; - $BackgroundG = isset($Format["BackgroundG"]) ? $Format["BackgroundG"] : 255; - $BackgroundB = isset($Format["BackgroundB"]) ? $Format["BackgroundB"] : 255; - $BackgroundAlpha = isset($Format["BackgroundAlpha"]) ? $Format["BackgroundAlpha"] : 50; - $BackgroundGradient= isset($Format["BackgroundGradient"]) ? $Format["BackgroundGradient"] : NULL; - $AxisSteps = isset($Format["AxisSteps"]) ? $Format["AxisSteps"] : 20; - $SegmentHeight = isset($Format["SegmentHeight"]) ? $Format["SegmentHeight"] : SEGMENT_HEIGHT_AUTO; - $Segments = isset($Format["Segments"]) ? $Format["Segments"] : 4; - $WriteLabels = isset($Format["WriteLabels"]) ? $Format["WriteLabels"] : TRUE; - $LabelsBackground = isset($Format["LabelsBackground"]) ? $Format["LabelsBackground"] : TRUE; - $LabelsBGR = isset($Format["LabelsBGR"]) ? $Format["LabelsBGR"] : 255; - $LabelsBGG = isset($Format["LabelsBGR"]) ? $Format["LabelsBGG"] : 255; - $LabelsBGB = isset($Format["LabelsBGR"]) ? $Format["LabelsBGB"] : 255; - $LabelsBGAlpha = isset($Format["LabelsBGAlpha"]) ? $Format["LabelsBGAlpha"] : 50; - $LabelPos = isset($Format["LabelPos"]) ? $Format["LabelPos"] : RADAR_LABELS_ROTATED; - $LabelPadding = isset($Format["LabelPadding"]) ? $Format["LabelPadding"] : 4; - $DrawPoints = isset($Format["DrawPoints"]) ? $Format["DrawPoints"] : TRUE; - $PointRadius = isset($Format["PointRadius"]) ? $Format["PointRadius"] : 4; - $PointSurrounding = isset($Format["PointRadius"]) ? $Format["PointRadius"] : -30; - $DrawLines = isset($Format["DrawLines"]) ? $Format["DrawLines"] : TRUE; - $LineLoopStart = isset($Format["LineLoopStart"]) ? $Format["LineLoopStart"] : FALSE; - $DrawPoly = isset($Format["DrawPoly"]) ? $Format["DrawPoly"] : FALSE; - $PolyAlpha = isset($Format["PolyAlpha"]) ? $Format["PolyAlpha"] : NULL; - $FontSize = $Object->FontSize; - $X1 = $Object->GraphAreaX1; - $Y1 = $Object->GraphAreaY1; - $X2 = $Object->GraphAreaX2; - $Y2 = $Object->GraphAreaY2; - - if ( $AxisBoxRounded ) { $DrawAxisValues = TRUE; } - - /* Cancel default tick length if ticks not enabled */ - if ( $DrawTicks == FALSE ) { $TicksLength = 0; } - - /* Data Processing */ - $Data = $Values->getData(); - $Palette = $Values->getPalette(); - - /* Catch the number of required axis */ - $LabelSerie = $Data["Abscissa"]; - if ( $LabelSerie != "" ) - { $Points = count($Data["Series"][$LabelSerie]["Data"]); } - else - { - $Points = 0; - foreach($Data["Series"] as $SerieName => $DataArray) - { if ( count($DataArray["Data"]) > $Points ) { $Points = count($DataArray["Data"]); } } - } - - /* Draw the axis */ - $CenterX = ($X2-$X1)/2 + $X1; - $CenterY = ($Y2-$Y1)/2 + $Y1; - - $EdgeHeight = min(($X2-$X1)/2,($Y2-$Y1)/2); - if ( $WriteLabels ) - $EdgeHeight = $EdgeHeight - $FontSize - $LabelPadding - $TicksLength; - - /* Determine the scale if set to automatic */ - if ( $SegmentHeight == SEGMENT_HEIGHT_AUTO) - { - $Max = 0; - foreach($Data["Series"] as $SerieName => $DataArray) - { - if ( $SerieName != $LabelSerie ) - { - if ( max($DataArray["Data"]) > $Max ) { $Max = max($DataArray["Data"]); } - } - } - $MaxSegments = $EdgeHeight/20; - $Scale = $Object->computeScale(0,$Max,$MaxSegments,array(1,2,5)); - - $Segments = $Scale["Rows"]; - $SegmentHeight = $Scale["RowHeight"]; - } - - - /* Background processing */ - if ( $DrawBackground ) - { - $RestoreShadow = $Object->Shadow; - $Object->Shadow = FALSE; - - if ($BackgroundGradient == NULL) - { - $Color = array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha); - $Object->drawFilledCircle($CenterX,$CenterY,$EdgeHeight,$Color); - } - else - { - $GradientROffset = ($BackgroundGradient["EndR"] - $BackgroundGradient["StartR"]) / $Segments; - $GradientGOffset = ($BackgroundGradient["EndG"] - $BackgroundGradient["StartG"]) / $Segments; - $GradientBOffset = ($BackgroundGradient["EndB"] - $BackgroundGradient["StartB"]) / $Segments; - $GradientAlphaOffset = ($BackgroundGradient["EndAlpha"] - $BackgroundGradient["StartAlpha"]) / $Segments; - - for($j=$Segments;$j>=1;$j--) - { - $Color = array("R"=>$BackgroundGradient["StartR"]+$GradientROffset*$j,"G"=>$BackgroundGradient["StartG"]+$GradientGOffset*$j,"B"=>$BackgroundGradient["StartB"]+$GradientBOffset*$j,"Alpha"=>$BackgroundGradient["StartAlpha"]+$GradientAlphaOffset*$j); - $Object->drawFilledCircle($CenterX,$CenterY,($EdgeHeight/$Segments)*$j,$Color); - } - } - $Object->Shadow = $RestoreShadow; - } - - /* Axis to axis lines */ - $Color = array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha); - for($j=1;$j<=$Segments;$j++) - { - $Radius = ($EdgeHeight/$Segments)*$j; - $Object->drawCircle($CenterX,$CenterY,$Radius,$Radius,$Color); - } - - if ( $DrawAxisValues ) - { - if ( $LabelsBackground ) - $Options = array("DrawBox"=>TRUE, "Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"BoxR"=>$LabelsBGR,"BoxG"=>$LabelsBGG,"BoxB"=>$LabelsBGB,"BoxAlpha"=>$LabelsBGAlpha); - else - $Options = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE); - - if ( $AxisBoxRounded ) { $Options["BoxRounded"] = TRUE; } - - $Options["FontName"] = $AxisFontName; - $Options["FontSize"] = $AxisFontSize; - - $Angle = 360 / ($Points*2); - for($j=1;$j<=$Segments;$j++) - { - $EdgeX1 = cos(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; - $EdgeY1 = sin(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; - $Label = $j*$SegmentHeight; - - $Object->drawText($EdgeX1,$EdgeY1,$Label,$Options); - } - } - - /* Axis lines */ - $ID = 0; - for($i=0;$i<=359;$i=$i+$AxisSteps) - { - $EdgeX = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterX; - $EdgeY = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterY; - - $Object->drawLine($CenterX,$CenterY,$EdgeX,$EdgeY,$Color); - - if ( $WriteLabels ) - { - $LabelX = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterX; - $LabelY = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterY; - $Label = $i.""; - - if ( $LabelPos == RADAR_LABELS_ROTATED ) - $Object->drawText($LabelX,$LabelY,$Label,array("Angle"=>(360-$i),"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - else - { - if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } - if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMLEFT)); } - if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } - if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPLEFT)); } - if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMRIGHT)); } - if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); } - if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPRIGHT)); } - if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPMIDDLE)); } - } - } - $ID++; - } - - /* Compute the plots position */ - $ID = 0; $Plot = ""; - foreach($Data["Series"] as $SerieName => $DataSet) - { - if ( $SerieName != $LabelSerie ) - { - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); - foreach($DataSet["Data"] as $Key => $Value) - { - $Angle = $Data["Series"][$LabelSerie]["Data"][$Key]; - $Length = ($EdgeHeight/($Segments*$SegmentHeight))*$Value; - - $X = cos(deg2rad($Angle+$AxisRotation)) * $Length + $CenterX; - $Y = sin(deg2rad($Angle+$AxisRotation)) * $Length + $CenterY; - - $Plot[$ID][] = array($X,$Y); - } - $ID++; - } - } - - /* Draw all that stuff! */ - foreach($Plot as $ID => $Points) - { - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); - - /* Draw the polygons */ - if ( $DrawPoly ) - { - if ($PolyAlpha != NULL) - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$PolyAlpha,"Surrounding"=>$PointSurrounding); - - $PointsArray = ""; - for($i=0; $i<count($Points);$i++) - { $PointsArray[] = $Points[$i][0]; $PointsArray[] = $Points[$i][1]; } - - $Object->drawPolygon($PointsArray,$Color); - } - - $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); - - /* Draw the lines & points */ - for($i=0; $i<count($Points);$i++) - { - if ( $DrawLines && $i < count($Points)-1) - $Object->drawLine($Points[$i][0],$Points[$i][1],$Points[$i+1][0],$Points[$i+1][1],$Color); - - if ( $DrawPoints ) - $Object->drawFilledCircle($Points[$i][0],$Points[$i][1],$PointRadius,$Color); - } - - /* Loop to the starting points if asked */ - if ( $LineLoopStart && $DrawLines ) - $Object->drawLine($Points[$i-1][0],$Points[$i-1][1],$Points[0][0],$Points[0][1],$Color); - } - } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pScatter.class.php b/pandora_console/include/graphs/pChart/pScatter.class.php deleted file mode 100755 index 18b7dea53c..0000000000 --- a/pandora_console/include/graphs/pChart/pScatter.class.php +++ /dev/null @@ -1,828 +0,0 @@ -<?php - /* - pScatter - class to draw scatter charts - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - define("SCATTER_MISSING_X_SERIE" , 190001); - define("SCATTER_MISSING_Y_SERIE" , 190002); - - /* pScatter class definition */ - class pScatter - { - var $pChartObject; - var $pDataObject; - - /* Class creator */ - function pScatter($pChartObject,$pDataObject) - { - $this->pChartObject = $pChartObject; - $this->pDataObject = $pDataObject; - } - - /* Prepare the scale */ - function drawScatterScale($Format="") - { - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : SCALE_MODE_FLOATING; - $Floating = isset($Format["Floating"]) ? $Format["Floating"] : FALSE; - $XLabelsRotation = isset($Format["XLabelsRotation"]) ? $Format["XLabelsRotation"] : 90; - $MinDivHeight = isset($Format["MinDivHeight"]) ? $Format["MinDivHeight"] : 20; - $Factors = isset($Format["Factors"]) ? $Format["Factors"] : array(1,2,5); - $ManualScale = isset($Format["ManualScale"]) ? $Format["ManualScale"] : array("0"=>array("Min"=>-100,"Max"=>100)); - $XMargin = isset($Format["XMargin"]) ? $Format["XMargin"] : 0; - $YMargin = isset($Format["YMargin"]) ? $Format["YMargin"] : 0; - $ScaleSpacing = isset($Format["ScaleSpacing"]) ? $Format["ScaleSpacing"] : 15; - $InnerTickWidth = isset($Format["InnerTickWidth"]) ? $Format["InnerTickWidth"] : 2; - $OuterTickWidth = isset($Format["OuterTickWidth"]) ? $Format["OuterTickWidth"] : 2; - $DrawXLines = isset($Format["DrawXLines"]) ? $Format["DrawXLines"] : ALL; - $DrawYLines = isset($Format["DrawYLines"]) ? $Format["DrawYLines"] : ALL; - $GridTicks = isset($Format["GridTicks"]) ? $Format["GridTicks"] : 4; - $GridR = isset($Format["GridR"]) ? $Format["GridR"] : 255; - $GridG = isset($Format["GridG"]) ? $Format["GridG"] : 255; - $GridB = isset($Format["GridB"]) ? $Format["GridB"] : 255; - $GridAlpha = isset($Format["GridAlpha"]) ? $Format["GridAlpha"] : 40; - $AxisRo = isset($Format["AxisR"]) ? $Format["AxisR"] : 0; - $AxisGo = isset($Format["AxisG"]) ? $Format["AxisG"] : 0; - $AxisBo = isset($Format["AxisB"]) ? $Format["AxisB"] : 0; - $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 100; - $TickRo = isset($Format["TickR"]) ? $Format["TickR"] : 0; - $TickGo = isset($Format["TickG"]) ? $Format["TickG"] : 0; - $TickBo = isset($Format["TickB"]) ? $Format["TickB"] : 0; - $TickAlpha = isset($Format["TickAlpha"]) ? $Format["TickAlpha"] : 100; - $DrawSubTicks = isset($Format["DrawSubTicks"]) ? $Format["DrawSubTicks"] : FALSE; - $InnerSubTickWidth = isset($Format["InnerSubTickWidth"]) ? $Format["InnerSubTickWidth"] : 0; - $OuterSubTickWidth = isset($Format["OuterSubTickWidth"]) ? $Format["OuterSubTickWidth"] : 2; - $SubTickR = isset($Format["SubTickR"]) ? $Format["SubTickR"] : 255; - $SubTickG = isset($Format["SubTickG"]) ? $Format["SubTickG"] : 0; - $SubTickB = isset($Format["SubTickB"]) ? $Format["SubTickB"] : 0; - $SubTickAlpha = isset($Format["SubTickAlpha"]) ? $Format["SubTickAlpha"] : 100; - $XReleasePercent = isset($Format["XReleasePercent"]) ? $Format["XReleasePercent"] : 1; - $DrawArrows = isset($Format["DrawArrows"]) ? $Format["DrawArrows"] : FALSE; - $ArrowSize = isset($Format["ArrowSize"]) ? $Format["ArrowSize"] : 8; - $CycleBackground = isset($Format["CycleBackground"]) ? $Format["CycleBackground"] : FALSE; - $BackgroundR1 = isset($Format["BackgroundR1"]) ? $Format["BackgroundR1"] : 255; - $BackgroundG1 = isset($Format["BackgroundG1"]) ? $Format["BackgroundG1"] : 255; - $BackgroundB1 = isset($Format["BackgroundB1"]) ? $Format["BackgroundB1"] : 255; - $BackgroundAlpha1 = isset($Format["BackgroundAlpha1"]) ? $Format["BackgroundAlpha1"] : 10; - $BackgroundR2 = isset($Format["BackgroundR2"]) ? $Format["BackgroundR2"] : 230; - $BackgroundG2 = isset($Format["BackgroundG2"]) ? $Format["BackgroundG2"] : 230; - $BackgroundB2 = isset($Format["BackgroundB2"]) ? $Format["BackgroundB2"] : 230; - $BackgroundAlpha2 = isset($Format["BackgroundAlpha2"]) ? $Format["BackgroundAlpha2"] : 10; - - /* Check if we have at least both one X and Y axis */ - $GotXAxis = FALSE; $GotYAxis = FALSE; - foreach($this->pDataObject->Data["Axis"] as $AxisID => $AxisSettings) - { - if ( $AxisSettings["Identity"] == AXIS_X ) { $GotXAxis = TRUE; } - if ( $AxisSettings["Identity"] == AXIS_Y ) { $GotYAxis = TRUE; } - } - if ( !$GotXAxis ) { return(SCATTER_MISSING_X_SERIE); } - if ( !$GotYAxis ) { return(SCATTER_MISSING_Y_SERIE); } - - /* Skip a NOTICE event in case of an empty array */ - if ( $DrawYLines == NONE ) { $DrawYLines = array("zarma"=>"31"); } - - $Data = $this->pDataObject->getData(); - - foreach($Data["Axis"] as $AxisID => $AxisSettings) - { - if ( $AxisSettings["Identity"] == AXIS_X) - { $Width = $this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1 - $XMargin*2; } - else - { $Width = $this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1 - $YMargin*2; } - - $AxisMin = ABSOLUTE_MAX; $AxisMax = OUT_OF_SIGHT; - if ( $Mode == SCALE_MODE_FLOATING ) - { - foreach($Data["Series"] as $SerieID => $SerieParameter) - { - if ( $SerieParameter["Axis"] == $AxisID && $Data["Series"][$SerieID]["isDrawable"] ) - { - $AxisMax = max($AxisMax,$Data["Series"][$SerieID]["Max"]); - $AxisMin = min($AxisMin,$Data["Series"][$SerieID]["Min"]); - } - } - $AutoMargin = (($AxisMax-$AxisMin)/100)*$XReleasePercent; - - $Data["Axis"][$AxisID]["Min"] = $AxisMin-$AutoMargin; $Data["Axis"][$AxisID]["Max"] = $AxisMax+$AutoMargin; - } - elseif ( $Mode == SCALE_MODE_MANUAL ) - { - if ( isset($ManualScale[$AxisID]["Min"]) && isset($ManualScale[$AxisID]["Max"]) ) - { - $Data["Axis"][$AxisID]["Min"] = $ManualScale[$AxisID]["Min"]; - $Data["Axis"][$AxisID]["Max"] = $ManualScale[$AxisID]["Max"]; - } - else - { echo "Manual scale boundaries not set."; exit(); } - } - - /* Full manual scale */ - if ( isset($ManualScale[$AxisID]["Rows"]) && isset($ManualScale[$AxisID]["RowHeight"]) ) - $Scale = array("Rows"=>$ManualScale[$AxisID]["Rows"],"RowHeight"=>$ManualScale[$AxisID]["RowHeight"],"XMin"=>$ManualScale[$AxisID]["Min"],"XMax"=>$ManualScale[$AxisID]["Max"]); - else - { - $MaxDivs = floor($Width/$MinDivHeight); - $Scale = $this->pChartObject->computeScale($Data["Axis"][$AxisID]["Min"],$Data["Axis"][$AxisID]["Max"],$MaxDivs,$Factors,$AxisID); - } - - $Data["Axis"][$AxisID]["Margin"] = $AxisSettings["Identity"] == AXIS_X ? $XMargin : $YMargin; - $Data["Axis"][$AxisID]["ScaleMin"] = $Scale["XMin"]; - $Data["Axis"][$AxisID]["ScaleMax"] = $Scale["XMax"]; - $Data["Axis"][$AxisID]["Rows"] = $Scale["Rows"]; - $Data["Axis"][$AxisID]["RowHeight"] = $Scale["RowHeight"]; - - if ( isset($Scale["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = $Scale["Format"]; } - - if ( !isset($Data["Axis"][$AxisID]["Display"]) ) { $Data["Axis"][$AxisID]["Display"] = NULL; } - if ( !isset($Data["Axis"][$AxisID]["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = NULL; } - if ( !isset($Data["Axis"][$AxisID]["Unit"]) ) { $Data["Axis"][$AxisID]["Unit"] = NULL; } - } - - /* Get the default font color */ - $FontColorRo = $this->pChartObject->FontColorR; $FontColorGo = $this->pChartObject->FontColorG; $FontColorBo = $this->pChartObject->FontColorB; - - /* Set the original boundaries */ - $AxisPos["L"] = $this->pChartObject->GraphAreaX1; $AxisPos["R"] = $this->pChartObject->GraphAreaX2; $AxisPos["T"] = $this->pChartObject->GraphAreaY1; $AxisPos["B"] = $this->pChartObject->GraphAreaY2; - - foreach($Data["Axis"] as $AxisID => $AxisSettings) - { - if ( isset($AxisSettings["Color"]) ) - { - $AxisR = $AxisSettings["Color"]["R"]; $AxisG = $AxisSettings["Color"]["G"]; $AxisB = $AxisSettings["Color"]["B"]; - $TickR = $AxisSettings["Color"]["R"]; $TickG = $AxisSettings["Color"]["G"]; $TickB = $AxisSettings["Color"]["B"]; - $this->pChartObject->setFontProperties(array("R"=>$AxisSettings["Color"]["R"],"G"=>$AxisSettings["Color"]["G"],"B"=>$AxisSettings["Color"]["B"])); - } - else - { - $AxisR = $AxisRo; $AxisG = $AxisGo; $AxisB = $AxisBo; - $TickR = $TickRo; $TickG = $TickGo; $TickB = $TickBo; - $this->pChartObject->setFontProperties(array("R"=>$FontColorRo,"G"=>$FontColorGo,"B"=>$FontColorBo)); - } - - $LastValue = "w00t"; $ID = 1; - if ( $AxisSettings["Identity"] == AXIS_X ) - { - if ( $AxisSettings["Position"] == AXIS_POSITION_BOTTOM ) - { - if ( $XLabelsRotation == 0 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $LabelOffset = 2; } - if ( $XLabelsRotation > 0 && $XLabelsRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $LabelOffset = 5; } - if ( $XLabelsRotation == 180 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $LabelOffset = 5; } - if ( $XLabelsRotation > 180 && $XLabelsRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $LabelOffset = 2; } - - if ( $Floating ) - { $FloatingOffset = $YMargin; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$AxisSettings["Margin"],$AxisPos["B"],$this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1,$AxisPos["B"],$this->pChartObject->GraphAreaX2,$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->pChartObject->drawArrow($this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["B"],$this->pChartObject->GraphAreaX2+($ArrowSize*2),$AxisPos["B"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Width = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) - $AxisSettings["Margin"]*2; - $Step = $Width / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MaxBottom = $AxisPos["B"]; - $LastX = NULL; - for($i=0;$i<=$AxisSettings["Rows"];$i++) - { - $XPos = $this->pChartObject->GraphAreaX1 + $AxisSettings["Margin"] + $Step*$i; - $YPos = $AxisPos["B"]; - $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastX != NULL && $CycleBackground && ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) )) { $this->pChartObject->drawFilledRectangle($LastX,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,$BGColor); } - - if ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) ) { $this->pChartObject->drawLine($XPos,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) - $this->pChartObject->drawLine($XPos+$SubTicksSize,$YPos-$InnerSubTickWidth,$XPos+$SubTicksSize,$YPos+$OuterSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->pChartObject->drawLine($XPos,$YPos-$InnerTickWidth,$XPos,$YPos+$OuterTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - $Bounds = $this->pChartObject->drawText($XPos,$YPos+$OuterTickWidth+$LabelOffset,$Value,array("Angle"=>$XLabelsRotation,"Align"=>$LabelAlign)); - $TxtBottom = $YPos+2+$OuterTickWidth+2+($Bounds[0]["Y"]-$Bounds[2]["Y"]); - $MaxBottom = max($MaxBottom,$TxtBottom); - - $LastX = $XPos; - } - - if ( isset($AxisSettings["Name"]) ) - { - $YPos = $MaxBottom+2; - $XPos = $this->pChartObject->GraphAreaX1+($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1)/2; - $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_TOPMIDDLE)); - $MaxBottom = $Bounds[0]["Y"]; - - $this->pDataObject->Data["GraphArea"]["Y2"] = $MaxBottom + $this->pChartObject->FontSize; - } - - $AxisPos["B"] = $MaxBottom + $ScaleSpacing; - } - elseif ( $AxisSettings["Position"] == AXIS_POSITION_TOP ) - { - if ( $XLabelsRotation == 0 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $LabelOffset = 2; } - if ( $XLabelsRotation > 0 && $XLabelsRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $LabelOffset = 2; } - if ( $XLabelsRotation == 180 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $LabelOffset = 5; } - if ( $XLabelsRotation > 180 && $SLabelxRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $LabelOffset = 5; } - - if ( $Floating ) - { $FloatingOffset = $YMargin; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$AxisSettings["Margin"],$AxisPos["T"],$this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1,$AxisPos["T"],$this->pChartObject->GraphAreaX2,$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->pChartObject->drawArrow($this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["T"],$this->pChartObject->GraphAreaX2+($ArrowSize*2),$AxisPos["T"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Width = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) - $AxisSettings["Margin"]*2; - $Step = $Width / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MinTop = $AxisPos["T"]; - $LastX = NULL; - for($i=0;$i<=$AxisSettings["Rows"];$i++) - { - $XPos = $this->pChartObject->GraphAreaX1 + $AxisSettings["Margin"] + $Step*$i; - $YPos = $AxisPos["T"]; - $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastX != NULL && $CycleBackground && ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) )) { $this->pChartObject->drawFilledRectangle($LastX,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,$BGColor); } - - if ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) ) { $this->pChartObject->drawLine($XPos,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - - if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) - $this->pChartObject->drawLine($XPos+$SubTicksSize,$YPos-$OuterSubTickWidth,$XPos+$SubTicksSize,$YPos+$InnerSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->pChartObject->drawLine($XPos,$YPos-$OuterTickWidth,$XPos,$YPos+$InnerTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - $Bounds = $this->pChartObject->drawText($XPos,$YPos-$OuterTickWidth-$LabelOffset,$Value,array("Angle"=>$XLabelsRotation,"Align"=>$LabelAlign)); - $TxtBox = $YPos-$OuterTickWidth-4-($Bounds[0]["Y"]-$Bounds[2]["Y"]); - $MinTop = min($MinTop,$TxtBox); - - $LastX = $XPos; - } - - if ( isset($AxisSettings["Name"]) ) - { - $YPos = $MinTop-2; - $XPos = $this->pChartObject->GraphAreaX1+($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1)/2; - $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); - $MinTop = $Bounds[2]["Y"]; - - $this->pDataObject->Data["GraphArea"]["Y1"] = $MinTop; - } - - $AxisPos["T"] = $MinTop - $ScaleSpacing; - } - } - elseif ( $AxisSettings["Identity"] == AXIS_Y ) - { - if ( $AxisSettings["Position"] == AXIS_POSITION_LEFT ) - { - - if ( $Floating ) - { $FloatingOffset = $XMargin; $this->pChartObject->drawLine($AxisPos["L"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["L"],$this->pChartObject->GraphAreaY2-$AxisSettings["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->pChartObject->drawLine($AxisPos["L"],$this->pChartObject->GraphAreaY1,$AxisPos["L"],$this->pChartObject->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->pChartObject->drawArrow($AxisPos["L"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["L"],$this->pChartObject->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Height = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) - $AxisSettings["Margin"]*2; - $Step = $Height / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MinLeft = $AxisPos["L"]; - $LastY = NULL; - for($i=0;$i<=$AxisSettings["Rows"];$i++) - { - $YPos = $this->pChartObject->GraphAreaY2 - $AxisSettings["Margin"] - $Step*$i; - $XPos = $AxisPos["L"]; - $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->pChartObject->drawFilledRectangle($this->pChartObject->GraphAreaX1+$FloatingOffset,$LastY,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } - - if ( ($YPos != $this->pChartObject->GraphAreaY1 && $YPos != $this->pChartObject->GraphAreaY2) && ($DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$FloatingOffset,$YPos,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - - if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) - $this->pChartObject->drawLine($XPos-$OuterSubTickWidth,$YPos-$SubTicksSize,$XPos+$InnerSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->pChartObject->drawLine($XPos-$OuterTickWidth,$YPos,$XPos+$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - $Bounds = $this->pChartObject->drawText($XPos-$OuterTickWidth-2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); - $TxtLeft = $XPos-$OuterTickWidth-2-($Bounds[1]["X"]-$Bounds[0]["X"]); - $MinLeft = min($MinLeft,$TxtLeft); - - $LastY = $YPos; - } - - if ( isset($AxisSettings["Name"]) ) - { - $XPos = $MinLeft-2; - $YPos = $this->pChartObject->GraphAreaY1+($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1)/2; - $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>90)); - $MinLeft = $Bounds[2]["X"]; - - $this->pDataObject->Data["GraphArea"]["X1"] = $MinLeft; - } - - $AxisPos["L"] = $MinLeft - $ScaleSpacing; - } - elseif ( $AxisSettings["Position"] == AXIS_POSITION_RIGHT ) - { - - if ( $Floating ) - { $FloatingOffset = $XMargin; $this->pChartObject->drawLine($AxisPos["R"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["R"],$this->pChartObject->GraphAreaY2-$AxisSettings["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - else - { $FloatingOffset = 0; $this->pChartObject->drawLine($AxisPos["R"],$this->pChartObject->GraphAreaY1,$AxisPos["R"],$this->pChartObject->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } - - if ( $DrawArrows ) { $this->pChartObject->drawArrow($AxisPos["R"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["R"],$this->pChartObject->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } - - $Height = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) - $AxisSettings["Margin"]*2; - $Step = $Height / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MaxLeft = $AxisPos["R"]; - $LastY = NULL; - for($i=0;$i<=$AxisSettings["Rows"];$i++) - { - $YPos = $this->pChartObject->GraphAreaY2 - $AxisSettings["Margin"] - $Step*$i; - $XPos = $AxisPos["R"]; - $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); - - if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } - if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->pChartObject->drawFilledRectangle($this->pChartObject->GraphAreaX1+$FloatingOffset,$LastY,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } - - if ( ($YPos != $this->pChartObject->GraphAreaY1 && $YPos != $this->pChartObject->GraphAreaY2) && ($DrawYLines == ALL || in_array($AxisID,$DrawYLines)) ) { $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$FloatingOffset,$YPos,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } - - if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) - $this->pChartObject->drawLine($XPos-$InnerSubTickWidth,$YPos-$SubTicksSize,$XPos+$OuterSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); - - $this->pChartObject->drawLine($XPos-$InnerTickWidth,$YPos,$XPos+$OuterTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); - $Bounds = $this->pChartObject->drawText($XPos+$OuterTickWidth+2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); - $TxtLeft = $XPos+$OuterTickWidth+2+($Bounds[1]["X"]-$Bounds[0]["X"]); - $MaxLeft = max($MaxLeft,$TxtLeft); - - $LastY = $YPos; - } - - if ( isset($AxisSettings["Name"]) ) - { - $XPos = $MaxLeft+6; - $YPos = $this->pChartObject->GraphAreaY1+($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1)/2; - $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>270)); - $MaxLeft = $Bounds[2]["X"]; - - $this->pDataObject->Data["GraphArea"]["X2"] = $MaxLeft + $this->pChartObject->FontSize; - } - - $AxisPos["R"] = $MaxLeft + $ScaleSpacing; - } - } - } - - $this->pDataObject->saveAxisConfig($Data["Axis"]); - } - - /* Draw a scatter plot chart */ - function drawScatterPlotChart($Format=NULL) - { - $PlotSize = isset($Format["PlotSize"]) ? $Format["PlotSize"] : 3; - $PlotBorder = isset($Format["PlotBorder"]) ? $Format["PlotBorder"] : FALSE; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 250; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 250; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 250; - $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 30; - $BorderSize = isset($Format["BorderSize"]) ? $Format["BorderSize"] : 1; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - $BorderColor = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha); - - foreach($Data["ScatterSeries"] as $Key => $Series) - { - $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; - $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; - - if ( isset($Series["Picture"]) && $Series["Picture"] != "" ) - { $Picture = $Series["Picture"]; list($PicWidth,$PicHeight,$PicType) = $this->pChartObject->getPicInfo($Picture); } - else - { $Picture = NULL; } - - $PosArrayX = $this->getPosArray($SerieValuesX,$SerieXAxis); - if ( !is_array($PosArrayX) ) { $Value = $PosArrayX; $PosArrayX = ""; $PosArrayX[0] = $Value; } - $PosArrayY = $this->getPosArray($SerieValuesY,$SerieYAxis); - if ( !is_array($PosArrayY) ) { $Value = $PosArrayY; $PosArrayY = ""; $PosArrayY[0] = $Value; } - - $Color = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); - - foreach($PosArrayX as $Key => $Value) - { - $X = $Value; $Y = $PosArrayY[$Key]; - - if ( $X != VOID && $Y != VOID ) - { - if ( $Picture == NULL ) - { - if ( $PlotBorder ) { $this->pChartObject->drawFilledCircle($X,$Y,$PlotSize+$BorderSize,$BorderColor); } - $this->pChartObject->drawFilledCircle($X,$Y,$PlotSize,$Color); - } - else - { $this->pChartObject->drawFromPicture($PicType,$Picture,$X-$PicWidth/2,$Y-$PicHeight/2); } - } - } - } - } - - /* Draw a scatter line chart */ - function drawScatterLineChart($Format=NULL) - { - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - /* Parse all the series to draw */ - foreach($Data["ScatterSeries"] as $Key => $Series) - { - $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; - $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; - $Ticks = $Series["Ticks"]; - $Weight = $Series["Weight"]; - - $PosArrayX = $this->getPosArray($SerieValuesX,$SerieXAxis); - if ( !is_array($PosArrayX) ) { $Value = $PosArrayX; $PosArrayX = ""; $PosArrayX[0] = $Value; } - $PosArrayY = $this->getPosArray($SerieValuesY,$SerieYAxis); - if ( !is_array($PosArrayY) ) { $Value = $PosArrayY; $PosArrayY = ""; $PosArrayY[0] = $Value; } - - $Color = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); - if ( $Ticks != 0 ) { $Color["Ticks"] = $Ticks; } - if ( $Weight != 0 ) { $Color["Weight"] = $Weight; } - - $LastX = VOID; $LastY = VOID; - foreach($PosArrayX as $Key => $Value) - { - $X = $Value; $Y = $PosArrayY[$Key]; - - if ( $X != VOID && $Y != VOID && $LastX != VOID && $LastY != VOID) - $this->pChartObject->drawLine($LastX,$LastY,$X,$Y,$Color); - - $LastX = $X; $LastY = $Y; - } - } - } - - /* Draw a scatter spline chart */ - function drawScatterSplineChart($Format=NULL) - { - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - foreach($Data["ScatterSeries"] as $Key => $Series) - { - $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; - $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; - $Ticks = $Series["Ticks"]; - $Weight = $Series["Weight"]; - - $PosArrayX = $this->getPosArray($SerieValuesX,$SerieXAxis); - if ( !is_array($PosArrayX) ) { $Value = $PosArrayX; $PosArrayX = ""; $PosArrayX[0] = $Value; } - $PosArrayY = $this->getPosArray($SerieValuesY,$SerieYAxis); - if ( !is_array($PosArrayY) ) { $Value = $PosArrayY; $PosArrayY = ""; $PosArrayY[0] = $Value; } - - $SplineSettings = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); - if ( $Ticks != 0 ) { $SplineSettings["Ticks"] = $Ticks; } - if ( $Weight != 0 ) { $SplineSettings["Weight"] = $Weight; } - - $LastX = VOID; $LastY = VOID; $WayPoints = ""; $Forces = ""; - foreach($PosArrayX as $Key => $Value) - { - $X = $Value; $Y = $PosArrayY[$Key]; - - $Force = $this->pChartObject->getLength($LastX,$LastY,$X,$Y)/5; - - if ( $X != VOID && $Y != VOID ) - { $WayPoints[] = array($X,$Y); $Forces[] = $Force; } - - if ( $Y == VOID && $LastY != NULL ) - { $SplineSettings["Forces"] = $Forces; $this->pChartObject->drawSpline($WayPoints,$SplineSettings); $WayPoints = ""; $Forces = "";} - - $LastX = $X; $LastY = $Y; - } - $SplineSettings["Forces"] = $Forces; - $this->pChartObject->drawSpline($WayPoints,$SplineSettings); - } - } - - /* Return the scaled plot position */ - function getPosArray($Values,$AxisID) - { - $Data = $this->pDataObject->getData(); - - if ( !is_array($Values) ) { $Values = array($Values); } - - if ( $Data["Axis"][$AxisID]["Identity"] == AXIS_X ) - { - $Height = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) - $Data["Axis"][$AxisID]["Margin"]*2; - $ScaleHeight = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; - $Step = $Height / $ScaleHeight; - - $Result = ""; - foreach($Values as $Key => $Value) - { - if ( $Value == VOID ) - $Result[] = VOID; - else - $Result[] = $this->pChartObject->GraphAreaX1 + $Data["Axis"][$AxisID]["Margin"] + ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); - } - - if ( count($Result) == 1 ) { return($Result[0]); } else { return($Result); } - } - else - { - $Height = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) - $Data["Axis"][$AxisID]["Margin"]*2; - $ScaleHeight = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; - $Step = $Height / $ScaleHeight; - - $Result = ""; - foreach($Values as $Key => $Value) - { - if ( $Value == VOID ) - $Result[] = VOID; - else - $Result[] = $this->pChartObject->GraphAreaY2 - $Data["Axis"][$AxisID]["Margin"] - ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); - } - - if ( count($Result) == 1 ) { return($Result[0]); } else { return($Result); } - } - } - - /* Draw the legend of the active series */ - function drawScatterLegend($X,$Y,$Format="") - { - $Family = isset($Format["Family"]) ? $Format["Family"] : LEGEND_FAMILY_BOX; - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; - $FontR = isset($Format["FontR"]) ? $Format["FontR"] : $this->pChartObject->FontColorR; - $FontG = isset($Format["FontG"]) ? $Format["FontG"] : $this->pChartObject->FontColorG; - $FontB = isset($Format["FontB"]) ? $Format["FontB"] : $this->pChartObject->FontColorB; - $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 5; - $BoxHeight = isset($Format["BoxHeight"]) ? $Format["BoxHeight"] : 5; - $IconAreaWidth = isset($Format["IconAreaWidth"]) ? $Format["IconAreaWidth"] : $BoxWidth; - $IconAreaHeight = isset($Format["IconAreaHeight"]) ? $Format["IconAreaHeight"] : $BoxHeight; - $XSpacing = isset($Format["XSpacing"]) ? $Format["XSpacing"] : 5; - $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; - $R = isset($Format["R"]) ? $Format["R"] : 200; - $G = isset($Format["G"]) ? $Format["G"] : 200; - $B = isset($Format["B"]) ? $Format["B"] : 200; - $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; - $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; - $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; - $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; - - if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } - - $Data = $this->pDataObject->getData(); - - foreach($Data["ScatterSeries"] as $Key => $Series) - { - if ( $Series["isDrawable"] == TRUE && isset($Series["Picture"])) - { - list($PicWidth,$PicHeight) = $this->pChartObject->getPicInfo($Series["Picture"]); - if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } - if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } - } - } - - $YStep = max($this->pChartObject->FontSize,$IconAreaHeight) + 5; - $XStep = $IconAreaWidth + 5; - $XStep = $XSpacing; - - $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; - foreach($Data["ScatterSeries"] as $Key => $Series) - { - if ( $Series["isDrawable"] == TRUE ) - { - if ( $Mode == LEGEND_VERTICAL ) - { - $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Series["Description"]); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Lines = preg_split("/\n/",$Series["Description"]); - $vY = $vY + max($this->pChartObject->FontSize*count($Lines),$IconAreaHeight) + 5; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - $Lines = preg_split("/\n/",$Series["Description"]); - $Width = ""; - foreach($Lines as $Key => $Value) - { - $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Width[] = $BoxArray[1]["X"]; - } - - $vX=max($Width)+$XStep; - } - } - } - $vY=$vY-$YStep; $vX=$vX-$XStep; - - $TopOffset = $Y - $Boundaries["T"]; - if ( $Boundaries["B"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries["B"] = $vY+$IconAreaHeight+$TopOffset; } - - if ( $Style == LEGEND_ROUND ) - $this->pChartObject->drawRoundedFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - elseif ( $Style == LEGEND_BOX ) - $this->pChartObject->drawFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); - - $RestoreShadow = $this->pChartObject->Shadow; $this->Shadow = FALSE; - foreach($Data["ScatterSeries"] as $Key => $Series) - { - if ( $Series["isDrawable"] == TRUE ) - { - $R = $Series["Color"]["R"]; $G = $Series["Color"]["G"]; $B = $Series["Color"]["B"]; - $Ticks = $Series["Ticks"]; $Weight = $Series["Weight"]; - - if ( isset($Series["Picture"]) ) - { - $Picture = $Series["Picture"]; - list($PicWidth,$PicHeight) = $this->pChartObject->getPicInfo($Picture); - $PicX = $X+$IconAreaWidth/2; $PicY = $Y+$IconAreaHeight/2; - - $this->pChartObject->drawFromPNG($PicX-$PicWidth/2,$PicY-$PicHeight/2,$Picture); - } - else - { - if ( $Family == LEGEND_FAMILY_BOX ) - { - if ( $BoxWidth != $IconAreaWidth ) { $XOffset = floor(($IconAreaWidth-$BoxWidth)/2); } else { $XOffset = 0; } - if ( $BoxHeight != $IconAreaHeight ) { $YOffset = floor(($IconAreaHeight-$BoxHeight)/2); } else { $YOffset = 0; } - - $this->pChartObject->drawFilledRectangle($X+1+$XOffset,$Y+1+$YOffset,$X+$BoxWidth+$XOffset+1,$Y+$BoxHeight+1+$YOffset,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); - $this->pChartObject->drawFilledRectangle($X+$XOffset,$Y+$YOffset,$X+$BoxWidth+$XOffset,$Y+$BoxHeight+$YOffset,array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); - } - elseif ( $Family == LEGEND_FAMILY_CIRCLE ) - { - $this->pChartObject->drawFilledCircle($X+1+$IconAreaWidth/2,$Y+1+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); - $this->pChartObject->drawFilledCircle($X+$IconAreaWidth/2,$Y+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); - } - elseif ( $Family == LEGEND_FAMILY_LINE ) - { - $this->pChartObject->drawLine($X+1,$Y+1+$IconAreaHeight/2,$X+1+$IconAreaWidth,$Y+1+$IconAreaHeight/2,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20,"Ticks"=>$Ticks,"Weight"=>$Weight)); - $this->pChartObject->drawLine($X,$Y+$IconAreaHeight/2,$X+$IconAreaWidth,$Y+$IconAreaHeight/2,array("R"=>$R,"G"=>$G,"B"=>$B,"Ticks"=>$Ticks,"Weight"=>$Weight)); - } - } - - if ( $Mode == LEGEND_VERTICAL ) - { - $Lines = preg_split("/\n/",$Series["Description"]); - foreach($Lines as $Key => $Value) - $this->pChartObject->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); - - $Y=$Y+max($this->pChartObject->FontSize*count($Lines),$IconAreaHeight) + 5; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - $Lines = preg_split("/\n/",$Series["Description"]); - $Width = ""; - foreach($Lines as $Key => $Value) - { - $BoxArray = $this->pChartObject->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); - $Width[] = $BoxArray[1]["X"]; - } - $X=max($Width)+2+$XStep; - } - } - } - - $this->Shadow = $RestoreShadow; - } - - /* Get the legend box size */ - function getScatterLegendSize($Format="") - { - $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; - $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; - $BoxSize = isset($Format["BoxSize"]) ? $Format["BoxSize"] : 5; - $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; - $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; - $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; - - $YStep = max($this->pChartObject->FontSize,$BoxSize) + 5; - $XStep = $BoxSize + 5; - - $X=100; $Y=100; - - $Data = $this->pDataObject->getData(); - - foreach($Data["ScatterSeries"] as $Key => $Series) - { - if ( $Series["isDrawable"] == TRUE && isset($Series["Picture"])) - { - list($PicWidth,$PicHeight) = $this->pChartObject->getPicInfo($Series["Picture"]); - if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } - if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } - } - } - - $YStep = max($this->pChartObject->FontSize,$IconAreaHeight) + 5; - $XStep = $IconAreaWidth + 5; - $XStep = $XSpacing; - - $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; - foreach($Data["ScatterSeries"] as $Key => $Series) - { - if ( $Series["isDrawable"] == TRUE ) - { - if ( $Mode == LEGEND_VERTICAL ) - { - $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Series["Description"]); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Lines = preg_split("/\n/",$Series["Description"]); - $vY = $vY + max($this->pChartObject->FontSize*count($Lines),$IconAreaHeight) + 5; - } - elseif ( $Mode == LEGEND_HORIZONTAL ) - { - $Lines = preg_split("/\n/",$Series["Description"]); - $Width = ""; - foreach($Lines as $Key => $Value) - { - $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); - - if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } - if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } - if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } - - $Width[] = $BoxArray[1]["X"]; - } - - $vX=max($Width)+$XStep; - } - } - } - $vY=$vY-$YStep; $vX=$vX-$XStep; - - $TopOffset = $Y - $Boundaries["T"]; - if ( $Boundaries["B"]-($vY+$BoxSize) < $TopOffset ) { $Boundaries["B"] = $vY+$BoxSize+$TopOffset; } - - $Width = ($Boundaries["R"]+$Margin) - ($Boundaries["L"]-$Margin); - $Height = ($Boundaries["B"]+$Margin) - ($Boundaries["T"]-$Margin); - - return(array("Width"=>$Width,"Height"=>$Height)); - } - - /* Draw the line of best fit */ - function drawScatterBestFit($Format="") - { - $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : 0; - - $Data = $this->pDataObject->getData(); - - foreach($Data["ScatterSeries"] as $Key => $Series) - { - $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; - $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; - - $Color = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); - $Color["Ticks"] = $Ticks; - - $PosArrayX = $Data["Series"][$Series["X"]]["Data"]; - $PosArrayY = $Data["Series"][$Series["Y"]]["Data"]; - - $Sxy = 0; $Sx = 0; $Sy = 0; $Sxx = 0; - foreach($PosArrayX as $Key => $Value) - { - $X = $Value; $Y = $PosArrayY[$Key]; - - $Sxy = $Sxy + $X*$Y; - $Sx = $Sx + $X; - $Sy = $Sy + $Y; - $Sxx = $Sxx + $X*$X; - } - - $n = count($PosArrayX); - $M = (($n*$Sxy)-($Sx*$Sy)) / (($n*$Sxx)-($Sx*$Sx)); - $B = (($Sy)-($M*$Sx))/($n); - - $X1 = $this->getPosArray($Data["Axis"][$SerieXAxis]["ScaleMin"],$SerieXAxis); - $Y1 = $this->getPosArray($M * $Data["Axis"][$SerieXAxis]["ScaleMin"] + $B,$SerieYAxis); - $X2 = $this->getPosArray($Data["Axis"][$SerieXAxis]["ScaleMax"],$SerieXAxis); - $Y2 = $this->getPosArray($M * $Data["Axis"][$SerieXAxis]["ScaleMax"] + $B,$SerieYAxis); - - if ( $Y1 < $this->pChartObject->GraphAreaY1 ) { $X1 = $X1 + ($this->pChartObject->GraphAreaY1-$Y1); $Y1 = $this->pChartObject->GraphAreaY1; } - if ( $Y1 > $this->pChartObject->GraphAreaY2 ) { $X1 = $X1 + ($Y1-$this->pChartObject->GraphAreaY2); $Y1 = $this->pChartObject->GraphAreaY2; } - if ( $Y2 < $this->pChartObject->GraphAreaY1 ) { $X2 = $X2 - ($this->pChartObject->GraphAreaY1-$Y2); $Y2 = $this->pChartObject->GraphAreaY1; } - if ( $Y2 > $this->pChartObject->GraphAreaY2 ) { $X2 = $X2 - ($Y2-$this->pChartObject->GraphAreaY2); $Y2 = $this->pChartObject->GraphAreaY2; } - - $this->pChartObject->drawLine($X1,$Y1,$X2,$Y2,$Color); - } - } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pSplit.class.php b/pandora_console/include/graphs/pChart/pSplit.class.php deleted file mode 100755 index fb5a8b85c6..0000000000 --- a/pandora_console/include/graphs/pChart/pSplit.class.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - /* - pSplit - class to draw spline splitted charts - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - define("TEXT_POS_TOP" , 690001); - define("TEXT_POS_RIGHT" , 690002); - - /* pSplit class definition */ - class pSplit - { - var $pChartObject; - - /* Class creator */ - function pSplit() - { } - - /* Create the encoded string */ - function drawSplitPath($Object,$Values,$Format="") - { - $this->pChartObject = $Object; - - $Spacing = isset($Format["Spacing"]) ? $Format["Spacing"] : 20; - $TextPadding = isset($Format["TextPadding"]) ? $Format["TextPadding"] : 2; - $TextPos = isset($Format["TextPos"]) ? $Format["TextPos"] : TEXT_POS_TOP; - $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; - $Force = isset($Format["Force"]) ? $Format["Force"] : 70; - $Segments = isset($Format["Segments"]) ? $Format["Segments"] : 15; - $FontSize = $Object->FontSize; - $X1 = $Object->GraphAreaX1; - $Y1 = $Object->GraphAreaY1; - $X2 = $Object->GraphAreaX2; - $Y2 = $Object->GraphAreaY2; - - /* Data Processing */ - $Data = $Values->getData(); - $Palette = $Values->getPalette(); - - $LabelSerie = $Data["Abscissa"]; - $DataSerie = ""; - - foreach($Data["Series"] as $SerieName => $Value) - { if ( $SerieName != $LabelSerie && $DataSerie == "" ) { $DataSerie = $SerieName; } } - - $DataSerieSum = array_sum($Data["Series"][$DataSerie]["Data"]); - $DataSerieCount = count($Data["Series"][$DataSerie]["Data"]); - - /* Scale Processing */ - if ( $TextPos == TEXT_POS_RIGHT ) - $YScale = (($Y2-$Y1) - (($DataSerieCount+1)*$Spacing)) / $DataSerieSum; - else - $YScale = (($Y2-$Y1) - ($DataSerieCount*$Spacing)) / $DataSerieSum; - $LeftHeight = $DataSerieSum * $YScale; - - /* Re-compute graph width depending of the text mode choosen */ - if ( $TextPos == TEXT_POS_RIGHT ) - { - $MaxWidth = 0; - foreach($Data["Series"][$LabelSerie]["Data"] as $Key => $Label) - { - $Boundardies = $Object->getTextBox(0,0,$Object->FontName,$Object->FontSize,0,$Label); - if ( $Boundardies[1]["X"] > $MaxWidth ) { $MaxWidth = $Boundardies[1]["X"] + $TextPadding*2; } - } - $X2 = $X2 - $MaxWidth; - } - - /* Drawing */ - $LeftY = ((($Y2-$Y1) / 2) + $Y1) - ($LeftHeight/2); - $RightY = $Y1; - $VectorX = (($X2-$X1) / 2); - - foreach($Data["Series"][$DataSerie]["Data"] as $Key => $Value) - { - if ( isset($Data["Series"][$LabelSerie]["Data"][$Key]) ) - $Label = $Data["Series"][$LabelSerie]["Data"][$Key]; - else - $Label = "-"; - - $LeftY1 = $LeftY; - $LeftY2 = $LeftY + $Value * $YScale; - - $RightY1 = $RightY + $Spacing; - $RightY2 = $RightY + $Spacing + $Value * $YScale;; - - $Settings = array("R"=>$Palette[$Key]["R"],"G"=>$Palette[$Key]["G"],"B"=>$Palette[$Key]["B"],"Alpha"=>$Palette[$Key]["Alpha"],"NoDraw"=>TRUE,"Segments"=>$Segments,"Surrounding"=>$Surrounding); - - $PolyGon = ""; - - $Angle = $Object->getAngle($X2,$RightY1,$X1,$LeftY1); - $VectorX1 = cos(deg2rad($Angle+90)) * $Force + ($X2-$X1)/2 + $X1; - $VectorY1 = sin(deg2rad($Angle+90)) * $Force + ($RightY1-$LeftY1)/2 + $LeftY1; - $VectorX2 = cos(deg2rad($Angle-90)) * $Force + ($X2-$X1)/2 + $X1; - $VectorY2 = sin(deg2rad($Angle-90)) * $Force + ($RightY1-$LeftY1)/2 + $LeftY1; - - $Points = $Object->drawBezier($X1,$LeftY1,$X2,$RightY1,$VectorX1,$VectorY1,$VectorX2,$VectorY2,$Settings); - foreach($Points as $Key => $Pos) { $PolyGon[] = $Pos["X"]; $PolyGon[] = $Pos["Y"]; } - - - $Angle = $Object->getAngle($X2,$RightY2,$X1,$LeftY2); - $VectorX1 = cos(deg2rad($Angle+90)) * $Force + ($X2-$X1)/2 +$X1; - $VectorY1 = sin(deg2rad($Angle+90)) * $Force + ($RightY2-$LeftY2)/2 + $LeftY2; - $VectorX2 = cos(deg2rad($Angle-90)) * $Force + ($X2-$X1)/2 +$X1; - $VectorY2 = sin(deg2rad($Angle-90)) * $Force + ($RightY2-$LeftY2)/2 + $LeftY2; - - $Points = $Object->drawBezier($X1,$LeftY2,$X2,$RightY2,$VectorX1,$VectorY1,$VectorX2,$VectorY2,$Settings); - $Points = array_reverse($Points); - foreach($Points as $Key => $Pos) { $PolyGon[] = $Pos["X"]; $PolyGon[] = $Pos["Y"]; } - - $Object->drawPolygon($PolyGon,$Settings); - - if ( $TextPos == TEXT_POS_RIGHT ) - $Object->drawText($X2+$TextPadding,($RightY2-$RightY1)/2+$RightY1,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); - else - $Object->drawText($X2,$RightY1-$TextPadding,$Label,array("Align"=>TEXT_ALIGN_BOTTOMRIGHT)); - - $LeftY = $LeftY2; - $RightY = $RightY2; - } - } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pSpring.class.php b/pandora_console/include/graphs/pChart/pSpring.class.php deleted file mode 100755 index 59a305a278..0000000000 --- a/pandora_console/include/graphs/pChart/pSpring.class.php +++ /dev/null @@ -1,868 +0,0 @@ -<?php - /* - pSpring - class to draw spring graphs - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - define("NODE_TYPE_FREE" , 690001); - define("NODE_TYPE_CENTRAL" , 690002); - - define("NODE_SHAPE_CIRCLE" , 690011); - define("NODE_SHAPE_TRIANGLE" , 690012); - define("NODE_SHAPE_SQUARE" , 690013); - - define("ALGORITHM_RANDOM" , 690021); - define("ALGORITHM_WEIGHTED" , 690022); - define("ALGORITHM_CIRCULAR" , 690023); - define("ALGORITHM_CENTRAL" , 690024); - - define("LABEL_CLASSIC" , 690031); - define("LABEL_LIGHT" , 690032); - - /* pSpring class definition */ - class pSpring - { - var $History; - var $pChartObject; - var $Data; - var $Links; - var $X1; - var $Y1; - var $X2; - var $Y2; - var $AutoComputeFreeZone; - var $Labels; - - /* Class creator */ - function pSpring() - { - /* Initialise data arrays */ - $this->Data = ""; - $this->Links = ""; - - /* Set nodes defaults */ - $this->Default["R"] = 255; - $this->Default["G"] = 255; - $this->Default["B"] = 255; - $this->Default["Alpha"] = 100; - $this->Default["BorderR"] = 0; - $this->Default["BorderG"] = 0; - $this->Default["BorderB"] = 0; - $this->Default["BorderAlpha"] = 100; - $this->Default["Surrounding"] = NULL; - $this->Default["BackgroundR"] = 255; - $this->Default["BackgroundG"] = 255; - $this->Default["BackgroundB"] = 255; - $this->Default["BackgroundAlpha"] = 0; - $this->Default["Force"] = 1; - $this->Default["NodeType"] = NODE_TYPE_FREE; - $this->Default["Size"] = 5; - $this->Default["Shape"] = NODE_SHAPE_CIRCLE; - $this->Default["FreeZone"] = 40; - $this->Default["LinkR"] = 0; - $this->Default["LinkG"] = 0; - $this->Default["LinkB"] = 0; - $this->Default["LinkAlpha"] = 0; - - $this->Labels["Type"] = LABEL_CLASSIC; - $this->Labels["R"] = 0; - $this->Labels["G"] = 0; - $this->Labels["B"] = 0; - $this->Labels["Alpha"] = 100; - - $this->AutoComputeFreeZone = FALSE; - } - - /* Set default links options */ - function setLinkDefaults($Settings="") - { - if ( isset($Settings["R"]) ) { $this->Default["LinkR"] = $Settings["R"]; } - if ( isset($Settings["G"]) ) { $this->Default["LinkG"] = $Settings["G"]; } - if ( isset($Settings["B"]) ) { $this->Default["LinkB"] = $Settings["B"]; } - if ( isset($Settings["Alpha"]) ) { $this->Default["LinkAlpha"] = $Settings["Alpha"]; } - } - - /* Set default links options */ - function setLabelsSettings($Settings="") - { - if ( isset($Settings["Type"]) ) { $this->Labels["Type"] = $Settings["Type"]; } - if ( isset($Settings["R"]) ) { $this->Labels["R"] = $Settings["R"]; } - if ( isset($Settings["G"]) ) { $this->Labels["G"] = $Settings["G"]; } - if ( isset($Settings["B"]) ) { $this->Labels["B"] = $Settings["B"]; } - if ( isset($Settings["Alpha"]) ) { $this->Labels["Alpha"] = $Settings["Alpha"]; } - } - - /* Auto compute the FreeZone size based on the number of connections */ - function autoFreeZone() - { - /* Check connections reciprocity */ - foreach($this->Data as $Key => $Settings) - { - if ( isset($Settings["Connections"]) ) - { $this->Data[$Key]["FreeZone"] = count($Settings["Connections"])*10 + 20; } - else - { $this->Data[$Key]["FreeZone"] = 20; } - } - - } - - /* Set link properties */ - function linkProperties($FromNode,$ToNode,$Settings) - { - if ( !isset($this->Data[$FromNode]) ) { return(0); } - if ( !isset($this->Data[$ToNode]) ) { return(0); } - - $R = isset($Settings["R"]) ? $Settings["R"] : 0; - $G = isset($Settings["G"]) ? $Settings["G"] : 0; - $B = isset($Settings["B"]) ? $Settings["B"] : 0; - $Alpha = isset($Settings["Alpha"]) ? $Settings["Alpha"] : 100; - $Name = isset($Settings["Name"]) ? $Settings["Name"] : NULL; - $Ticks = isset($Settings["Ticks"]) ? $Settings["Ticks"] : NULL; - - $this->Links[$FromNode][$ToNode]["R"] = $R; $this->Links[$ToNode][$FromNode]["R"] = $R; - $this->Links[$FromNode][$ToNode]["G"] = $G; $this->Links[$ToNode][$FromNode]["G"] = $G; - $this->Links[$FromNode][$ToNode]["B"] = $B; $this->Links[$ToNode][$FromNode]["B"] = $B; - $this->Links[$FromNode][$ToNode]["Alpha"] = $Alpha; $this->Links[$ToNode][$FromNode]["Alpha"] = $Alpha; - $this->Links[$FromNode][$ToNode]["Name"] = $Name; $this->Links[$ToNode][$FromNode]["Name"] = $Name; - $this->Links[$FromNode][$ToNode]["Ticks"] = $Ticks; $this->Links[$ToNode][$FromNode]["Ticks"] = $Ticks; - } - - function setNodeDefaults($Settings="") - { - if ( isset($Settings["R"]) ) { $this->Default["R"] = $Settings["R"]; } - if ( isset($Settings["G"]) ) { $this->Default["G"] = $Settings["G"]; } - if ( isset($Settings["B"]) ) { $this->Default["B"] = $Settings["B"]; } - if ( isset($Settings["Alpha"]) ) { $this->Default["Alpha"] = $Settings["Alpha"]; } - if ( isset($Settings["BorderR"]) ) { $this->Default["BorderR"] = $Settings["BorderR"]; } - if ( isset($Settings["BorderG"]) ) { $this->Default["BorderG"] = $Settings["BorderG"]; } - if ( isset($Settings["BorderB"]) ) { $this->Default["BorderB"] = $Settings["BorderB"]; } - if ( isset($Settings["BorderAlpha"]) ) { $this->Default["BorderAlpha"] = $Settings["BorderAlpha"]; } - if ( isset($Settings["Surrounding"]) ) { $this->Default["Surrounding"] = $Settings["Surrounding"]; } - if ( isset($Settings["BackgroundR"]) ) { $this->Default["BackgroundR"] = $Settings["BackgroundR"]; } - if ( isset($Settings["BackgroundG"]) ) { $this->Default["BackgroundG"] = $Settings["BackgroundG"]; } - if ( isset($Settings["BackgroundB"]) ) { $this->Default["BackgroundB"] = $Settings["BackgroundB"]; } - if ( isset($Settings["BackgroundAlpha"]) ) { $this->Default["BackgroundAlpha"] = $Settings["BackgroundAlpha"]; } - if ( isset($Settings["NodeType"]) ) { $this->Default["NodeType"] = $Settings["NodeType"]; } - if ( isset($Settings["Size"]) ) { $this->Default["Size"] = $Settings["Size"]; } - if ( isset($Settings["Shape"]) ) { $this->Default["Shape"] = $Settings["Shape"]; } - if ( isset($Settings["FreeZone"]) ) { $this->Default["FreeZone"] = $Settings["FreeZone"]; } - } - - /* Add a node */ - function addNode($NodeID,$Settings="") - { - /* if the node already exists, ignore */ - if (isset($this->Data[$NodeID])) { return(0); } - - $Name = isset($Settings["Name"]) ? $Settings["Name"] : "Node ".$NodeID; - $Connections = isset($Settings["Connections"]) ? $Settings["Connections"] : NULL; - - $R = isset($Settings["R"]) ? $Settings["R"] : $this->Default["R"]; - $G = isset($Settings["G"]) ? $Settings["G"] : $this->Default["G"]; - $B = isset($Settings["B"]) ? $Settings["B"] : $this->Default["B"]; - $Alpha = isset($Settings["Alpha"]) ? $Settings["Alpha"] : $this->Default["Alpha"]; - $BorderR = isset($Settings["BorderR"]) ? $Settings["BorderR"] : $this->Default["BorderR"]; - $BorderG = isset($Settings["BorderG"]) ? $Settings["BorderG"] : $this->Default["BorderG"]; - $BorderB = isset($Settings["BorderB"]) ? $Settings["BorderB"] : $this->Default["BorderB"]; - $BorderAlpha = isset($Settings["BorderAlpha"]) ? $Settings["BorderAlpha"] : $this->Default["BorderAlpha"]; - $Surrounding = isset($Settings["Surrounding"]) ? $Settings["Surrounding"] : $this->Default["Surrounding"]; - $BackgroundR = isset($Settings["BackgroundR"]) ? $Settings["BackgroundR"] : $this->Default["BackgroundR"]; - $BackgroundG = isset($Settings["BackgroundG"]) ? $Settings["BackgroundG"] : $this->Default["BackgroundG"]; - $BackgroundB = isset($Settings["BackgroundB"]) ? $Settings["BackgroundB"] : $this->Default["BackgroundB"]; - $BackgroundAlpha = isset($Settings["BackgroundAlpha"]) ? $Settings["BackgroundAlpha"] : $this->Default["BackgroundAlpha"]; - $Force = isset($Settings["Force"]) ? $Settings["Force"] : $this->Default["Force"]; - $NodeType = isset($Settings["NodeType"]) ? $Settings["NodeType"] : $this->Default["NodeType"]; - $Size = isset($Settings["Size"]) ? $Settings["Size"] : $this->Default["Size"]; - $Shape = isset($Settings["Shape"]) ? $Settings["Shape"] : $this->Default["Shape"]; - $FreeZone = isset($Settings["FreeZone"]) ? $Settings["FreeZone"] : $this->Default["FreeZone"]; - - if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } - - $this->Data[$NodeID]["R"] = $R; $this->Data[$NodeID]["G"] = $G; $this->Data[$NodeID]["B"] = $B; $this->Data[$NodeID]["Alpha"] = $Alpha; - $this->Data[$NodeID]["BorderR"] = $BorderR; $this->Data[$NodeID]["BorderG"] = $BorderG; $this->Data[$NodeID]["BorderB"] = $BorderB; $this->Data[$NodeID]["BorderAlpha"] = $BorderAlpha; - $this->Data[$NodeID]["BackgroundR"] = $BackgroundR; $this->Data[$NodeID]["BackgroundG"] = $BackgroundG; $this->Data[$NodeID]["BackgroundB"] = $BackgroundB; $this->Data[$NodeID]["BackgroundAlpha"] = $BackgroundAlpha; - $this->Data[$NodeID]["Name"] = $Name; - $this->Data[$NodeID]["Force"] = $Force; - $this->Data[$NodeID]["Type"] = $NodeType; - $this->Data[$NodeID]["Size"] = $Size; - $this->Data[$NodeID]["Shape"] = $Shape; - $this->Data[$NodeID]["FreeZone"] = $FreeZone; - if ( $Connections != NULL ) - { - if ( is_array($Connections ) ) - { - foreach($Connections as $Key => $Value) - $this->Data[$NodeID]["Connections"][] = $Value; - } - else - $this->Data[$NodeID]["Connections"][] = $Connections; - } - } - - /* Set color attribute for a list of nodes */ - function setNodesColor($Nodes,$Settings="") - { - if ( is_array($Nodes) ) - { - foreach ($Nodes as $Key => $NodeID) - { - if (isset($this->Data[$NodeID]) ) - { - if ( isset($Settings["R"]) ) { $this->Data[$NodeID]["R"] = $Settings["R"]; } - if ( isset($Settings["G"]) ) { $this->Data[$NodeID]["G"] = $Settings["G"]; } - if ( isset($Settings["B"]) ) { $this->Data[$NodeID]["B"] = $Settings["B"]; } - if ( isset($Settings["Alpha"]) ) { $this->Data[$NodeID]["Alpha"] = $Settings["Alpha"]; } - if ( isset($Settings["BorderR"]) ) { $this->Data[$NodeID]["BorderR"] = $Settings["BorderR"]; } - if ( isset($Settings["BorderG"]) ) { $this->Data[$NodeID]["BorderG"] = $Settings["BorderG"]; } - if ( isset($Settings["BorderB"]) ) { $this->Data[$NodeID]["BorderB"] = $Settings["BorderB"]; } - if ( isset($Settings["BorderAlpha"]) ) { $this->Data[$NodeID]["BorderAlpha"] = $Settings["BorderAlpha"]; } - if ( isset($Settings["Surrounding"]) ) { $this->Data[$NodeID]["BorderR"] = $this->Data[$NodeID]["R"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderG"] = $this->Data[$NodeID]["G"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderB"] = $this->Data[$NodeID]["B"] + $Settings["Surrounding"]; } - } - } - } - else - { - if ( isset($Settings["R"]) ) { $this->Data[$Nodes]["R"] = $Settings["R"]; } - if ( isset($Settings["G"]) ) { $this->Data[$Nodes]["G"] = $Settings["G"]; } - if ( isset($Settings["B"]) ) { $this->Data[$Nodes]["B"] = $Settings["B"]; } - if ( isset($Settings["Alpha"]) ) { $this->Data[$Nodes]["Alpha"] = $Settings["Alpha"]; } - if ( isset($Settings["BorderR"]) ) { $this->Data[$Nodes]["BorderR"] = $Settings["BorderR"]; } - if ( isset($Settings["BorderG"]) ) { $this->Data[$Nodes]["BorderG"] = $Settings["BorderG"]; } - if ( isset($Settings["BorderB"]) ) { $this->Data[$Nodes]["BorderB"] = $Settings["BorderB"]; } - if ( isset($Settings["BorderAlpha"]) ) { $this->Data[$Nodes]["BorderAlpha"] = $Settings["BorderAlpha"]; } - if ( isset($Settings["Surrounding"]) ) { $this->Data[$Nodes]["BorderR"] = $this->Data[$NodeID]["R"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderG"] = $this->Data[$NodeID]["G"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderB"] = $this->Data[$NodeID]["B"] + $Settings["Surrounding"]; } - } - } - - /* Returns all the nodes details */ - function dumpNodes() - { return($this->Data); } - - /* Check if a connection exists and create it if required */ - function checkConnection($SourceID, $TargetID) - { - if ( isset($this->Data[$SourceID]["Connections"]) ) - { - foreach ($this->Data[$SourceID]["Connections"] as $Key => $ConnectionID) - { if ( $TargetID == $ConnectionID ) { return(TRUE); } } - } - $this->Data[$SourceID]["Connections"][] = $TargetID; - } - /* Get the median linked nodes position */ - function getMedianOffset($Key,$X,$Y) - { - $Cpt = 1; - if ( isset($this->Data[$Key]["Connections"]) ) - { - foreach($this->Data[$Key]["Connections"] as $ID => $NodeID) - { - if ( isset($this->Data[$NodeID]["X"]) && isset($this->Data[$NodeID]["Y"]) ) - { - $X = $X + $this->Data[$NodeID]["X"]; - $Y = $Y + $this->Data[$NodeID]["Y"]; - $Cpt++; - } - } - } - return(array("X"=>$X/$Cpt,"Y"=>$Y/$Cpt)); - } - - /* Return the ID of the attached partner with the biggest weight */ - function getBiggestPartner($Key) - { - if ( !isset($this->Data[$Key]["Connections"]) ) { return(""); } - - $MaxWeight = 0; $Result = ""; - foreach($this->Data[$Key]["Connections"] as $Key => $PeerID) - { - if ( $this->Data[$PeerID]["Weight"] > $MaxWeight ) - { $MaxWeight = $this->Data[$PeerID]["Weight"]; $Result = $PeerID; } - } - return($Result); - } - - /* Do the initial node positions computing pass */ - function firstPass($Algorithm) - { - $CenterX = ($this->X2 - $this->X1) / 2 + $this->X1; - $CenterY = ($this->Y2 - $this->Y1) / 2 + $this->Y1; - - /* Check connections reciprocity */ - foreach($this->Data as $Key => $Settings) - { - if ( isset($Settings["Connections"]) ) - { - foreach($Settings["Connections"] as $ID => $ConnectionID) - $this->checkConnection($ConnectionID,$Key); - } - } - - if ( $this->AutoComputeFreeZone ) { $this->autoFreeZone(); } - - /* Get the max number of connections */ - $MaxConnections = 0; - foreach($this->Data as $Key => $Settings) - { if ( isset($Settings["Connections"]) ) { if ( $MaxConnections < count($Settings["Connections"] ) ) { $MaxConnections = count($Settings["Connections"]); } } } - - if ( $Algorithm == ALGORITHM_WEIGHTED ) - { - foreach($this->Data as $Key => $Settings) - { - if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } - if ( $Settings["Type"] == NODE_TYPE_FREE ) - { - if ( isset($Settings["Connections"]) ) - { $Connections = count($Settings["Connections"]); } - else - { $Connections = 0; } - - $Ring = $MaxConnections - $Connections; - $Angle = rand(0,360); - - $this->Data[$Key]["X"] = cos(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterX; - $this->Data[$Key]["Y"] = sin(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterY; - } - } - } - elseif ( $Algorithm == ALGORITHM_CENTRAL ) - { - /* Put a weight on each nodes */ - foreach($this->Data as $Key => $Settings) - { - if ( isset($Settings["Connections"]) ) - $this->Data[$Key]["Weight"] = count($Settings["Connections"]); - else - $this->Data[$Key]["Weight"] = 0; - } - - $MaxConnections = $MaxConnections + 1; - for($i=$MaxConnections;$i>=0;$i--) - { - foreach($this->Data as $Key => $Settings) - { - if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } - if ( $Settings["Type"] == NODE_TYPE_FREE ) - { - if ( isset($Settings["Connections"]) ) - { $Connections = count($Settings["Connections"]); } - else - { $Connections = 0; } - - if ( $Connections == $i ) - { - $BiggestPartner = $this->getBiggestPartner($Key); - if ( $BiggestPartner != "" ) - { - $Ring = $this->Data[$BiggestPartner]["FreeZone"]; - $Weight = $this->Data[$BiggestPartner]["Weight"]; - $AngleDivision = 360 / $this->Data[$BiggestPartner]["Weight"]; - $Done = FALSE; $Tries = 0; - while (!$Done && $Tries <= $Weight*2) - { - $Tries++; - $Angle = floor(rand(0,$Weight)*$AngleDivision); - if ( !isset($this->Data[$BiggestPartner]["Angular"][$Angle]) || !isset($this->Data[$BiggestPartner]["Angular"]) ) - { - $this->Data[$BiggestPartner]["Angular"][$Angle] = $Angle; - $Done = TRUE; - } - } - if ( !$Done ) - { $Angle = rand(0,360); $this->Data[$BiggestPartner]["Angular"][$Angle] = $Angle; } - - $X = cos(deg2rad($Angle)) * ($Ring) + $this->Data[$BiggestPartner]["X"]; - $Y = sin(deg2rad($Angle)) * ($Ring) + $this->Data[$BiggestPartner]["Y"]; - - $this->Data[$Key]["X"] = $X; - $this->Data[$Key]["Y"] = $Y; - } - } - } - } - } - } - elseif ( $Algorithm == ALGORITHM_CIRCULAR ) - { - $MaxConnections = $MaxConnections + 1; - for($i=$MaxConnections;$i>=0;$i--) - { - foreach($this->Data as $Key => $Settings) - { - if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } - if ( $Settings["Type"] == NODE_TYPE_FREE ) - { - if ( isset($Settings["Connections"]) ) - { $Connections = count($Settings["Connections"]); } - else - { $Connections = 0; } - - if ( $Connections == $i ) - { - $Ring = $MaxConnections - $Connections; - $Angle = rand(0,360); - - $X = cos(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterX; - $Y = sin(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterY; - - $MedianOffset = $this->getMedianOffset($Key,$X,$Y); - - $this->Data[$Key]["X"] = $MedianOffset["X"]; - $this->Data[$Key]["Y"] = $MedianOffset["Y"]; - } - } - } - } - } - elseif ( $Algorithm == ALGORITHM_RANDOM ) - { - foreach($this->Data as $Key => $Settings) - { - if ( $Settings["Type"] == NODE_TYPE_FREE ) - { - $this->Data[$Key]["X"] = $CenterX + rand(-20,20); - $this->Data[$Key]["Y"] = $CenterY + rand(-20,20); - } - if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } - } - } - } - - /* Compute one pass */ - function doPass() - { - /* Compute vectors */ - foreach($this->Data as $Key => $Settings) - { - if ( $Settings["Type"] != NODE_TYPE_CENTRAL ) - { - unset($this->Data[$Key]["Vectors"]); - - $X1 = $Settings["X"]; - $Y1 = $Settings["Y"]; - - /* Repulsion vectors */ - foreach($this->Data as $Key2 => $Settings2) - { - if ( $Key != $Key2 ) - { - $X2 = $this->Data[$Key2]["X"]; - $Y2 = $this->Data[$Key2]["Y"]; - $FreeZone = $this->Data[$Key2]["FreeZone"]; - - $Distance = $this->getDistance($X1,$Y1,$X2,$Y2); - $Angle = $this->getAngle($X1,$Y1,$X2,$Y2) + 180; - - /* Nodes too close, repulsion occurs */ - if ( $Distance < $FreeZone ) - { - $Force = log(pow(2,$FreeZone-$Distance)); - if ( $Force > 1 ) - { $this->Data[$Key]["Vectors"][] = array("Type"=>"R","Angle"=>$Angle % 360,"Force"=>$Force); } - } - } - } - - /* Attraction vectors */ - if ( isset($Settings["Connections"]) ) - { - foreach($Settings["Connections"] as $ID => $NodeID) - { - if ( isset($this->Data[$NodeID]) ) - { - $X2 = $this->Data[$NodeID]["X"]; - $Y2 = $this->Data[$NodeID]["Y"]; - $FreeZone = $this->Data[$Key2]["FreeZone"]; - - $Distance = $this->getDistance($X1,$Y1,$X2,$Y2); - $Angle = $this->getAngle($X1,$Y1,$X2,$Y2); - - if ( $Distance > $FreeZone ) - $Force = log(($Distance-$FreeZone)+1); - else - { $Force = log(($FreeZone-$Distance)+1); ($Angle = $Angle + 180); } - - if ( $Force > 1 ) - $this->Data[$Key]["Vectors"][] = array("Type"=>"A","Angle"=>$Angle % 360,"Force"=>$Force); - } - } - } - } - } - - /* Move the nodes accoding to the vectors */ - foreach($this->Data as $Key => $Settings) - { - $X = $Settings["X"]; - $Y = $Settings["Y"]; - - if ( isset($Settings["Vectors"]) && $Settings["Type"] != NODE_TYPE_CENTRAL ) - { - foreach($Settings["Vectors"] as $ID => $Vector) - { - $Type = $Vector["Type"]; - $Force = $Vector["Force"]; - $Angle = $Vector["Angle"]; - $Factor = $Type == "A" ? $this->MagneticForceA : $this->MagneticForceR; - - $X = cos(deg2rad($Angle)) * $Force * $Factor + $X; - $Y = sin(deg2rad($Angle)) * $Force * $Factor + $Y; - } - } - - $this->Data[$Key]["X"] = $X; - $this->Data[$Key]["Y"] = $Y; - } - } - - function lastPass() - { - /* Put everything inside the graph area */ - foreach($this->Data as $Key => $Settings) - { - $X = $Settings["X"]; - $Y = $Settings["Y"]; - - if ( $X < $this->X1 ) { $X = $this->X1; } - if ( $X > $this->X2 ) { $X = $this->X2; } - if ( $Y < $this->Y1 ) { $Y = $this->Y1; } - if ( $Y > $this->Y2 ) { $Y = $this->Y2; } - - $this->Data[$Key]["X"] = $X; - $this->Data[$Key]["Y"] = $Y; - } - - /* Dump all links */ - $Links = ""; - foreach($this->Data as $Key => $Settings) - { - $X1 = $Settings["X"]; - $Y1 = $Settings["Y"]; - - if ( isset($Settings["Connections"]) ) - { - foreach ($Settings["Connections"] as $ID => $NodeID) - { - if ( isset($this->Data[$NodeID]) ) - { - $X2 = $this->Data[$NodeID]["X"]; - $Y2 = $this->Data[$NodeID]["Y"]; - - $Links[] = array("X1"=>$X1,"Y1"=>$Y1,"X2"=>$X2,"Y2"=>$Y2,"Source"=>$Settings["Name"],"Destination"=>$this->Data[$NodeID]["Name"]); - } - } - } - } - - /* Check collisions */ - $Conflicts = 0; - foreach($this->Data as $Key => $Settings) - { - $X1 = $Settings["X"]; - $Y1 = $Settings["Y"]; - - if ( isset($Settings["Connections"]) ) - { - foreach ($Settings["Connections"] as $ID => $NodeID) - { - if ( isset($this->Data[$NodeID]) ) - { - $X2 = $this->Data[$NodeID]["X"]; - $Y2 = $this->Data[$NodeID]["Y"]; - - foreach($Links as $IDLinks => $Link) - { - $X3 = $Link["X1"]; $Y3 = $Link["Y1"]; $X4 = $Link["X2"]; $Y4 = $Link["Y2"]; - - if ( !($X1 == $X3 && $X2 == $X4 && $Y1 == $Y3 && $Y2 == $Y4 ) ) - { - if ( $this->intersect($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4) ) - { - if ( $Link["Source"] != $Settings["Name"] && $Link["Source"] != $this->Data[$NodeID]["Name"] && $Link["Destination"] != $Settings["Name"] && $Link["Destination"] != $this->Data[$NodeID]["Name"] ) - { $Conflicts++; } - } - } - } - } - } - } - } - return($Conflicts/2); - } - - /* Center the graph */ - function center() - { - /* Determine the real center */ - $TargetCenterX = ($this->X2 - $this->X1) / 2 + $this->X1; - $TargetCenterY = ($this->Y2 - $this->Y1) / 2 + $this->Y1; - - /* Get current boundaries */ - $XMin = $this->X2; $XMax = $this->X1; - $YMin = $this->Y2; $YMax = $this->Y1; - foreach($this->Data as $Key => $Settings) - { - $X = $Settings["X"]; - $Y = $Settings["Y"]; - - if ( $X < $XMin) { $XMin = $X; } - if ( $X > $XMax) { $XMax = $X; } - if ( $Y < $YMin) { $YMin = $Y; } - if ( $Y > $YMax) { $YMax = $Y; } - } - $CurrentCenterX = ($XMax - $XMin) / 2 + $XMin; - $CurrentCenterY = ($YMax - $YMin) / 2 + $YMin; - - /* Compute the offset to apply */ - $XOffset = $TargetCenterX - $CurrentCenterX; - $YOffset = $TargetCenterY - $CurrentCenterY; - - /* Correct the points position */ - foreach($this->Data as $Key => $Settings) - { - $this->Data[$Key]["X"] = $Settings["X"] + $XOffset; - $this->Data[$Key]["Y"] = $Settings["Y"] + $YOffset; - } - } - - /* Create the encoded string */ - function drawSpring($Object,$Settings="") - { - $this->pChartObject = $Object; - - $Pass = isset($Settings["Pass"]) ? $Settings["Pass"] : 50; - $Retries = isset($Settings["Retry"]) ? $Settings["Retry"] : 10; - $this->MagneticForceA = isset($Settings["MagneticForceA"]) ? $Settings["MagneticForceA"] : 1.5; - $this->MagneticForceR = isset($Settings["MagneticForceR"]) ? $Settings["MagneticForceR"] : 2; - $this->RingSize = isset($Settings["RingSize"]) ? $Settings["RingSize"] : 40; - $DrawVectors = isset($Settings["DrawVectors"]) ? $Settings["DrawVectors"] : FALSE; - $DrawQuietZone = isset($Settings["DrawQuietZone"]) ? $Settings["DrawQuietZone"] : FALSE; - $CenterGraph = isset($Settings["CenterGraph"]) ? $Settings["CenterGraph"] : TRUE; - $TextPadding = isset($Settings["TextPadding"]) ? $Settings["TextPadding"] : 4; - $Algorithm = isset($Settings["Algorithm"]) ? $Settings["Algorithm"] : ALGORITHM_WEIGHTED; - - $FontSize = $Object->FontSize; - $this->X1 = $Object->GraphAreaX1; - $this->Y1 = $Object->GraphAreaY1; - $this->X2 = $Object->GraphAreaX2; - $this->Y2 = $Object->GraphAreaY2; - - $Conflicts = 1; $Jobs = 0; $this->History["MinimumConflicts"] = -1; - while ($Conflicts != 0 && $Jobs < $Retries ) - { - $Jobs++; - - /* Compute the initial settings */ - $this->firstPass($Algorithm); - - /* Apply the vectors */ - if ( $Pass > 0 ) - { - for ($i=0; $i<=$Pass; $i++) { $this->doPass(); } - } - - $Conflicts = $this->lastPass(); - if ( $this->History["MinimumConflicts"] == -1 || $Conflicts < $this->History["MinimumConflicts"] ) - { $this->History["MinimumConflicts"] = $Conflicts; $this->History["Result"] = $this->Data; } - } - - $Conflicts = $this->History["MinimumConflicts"]; - $this->Data = $this->History["Result"]; - - if ( $CenterGraph ) { $this->center(); } - - /* Draw the connections */ - $Drawn = ""; - foreach($this->Data as $Key => $Settings) - { - $X = $Settings["X"]; - $Y = $Settings["Y"]; - - if ( isset($Settings["Connections"]) ) - { - foreach ($Settings["Connections"] as $ID => $NodeID) - { - if ( !isset($Drawn[$Key]) ) { $Drawn[$Key] = ""; } - if ( !isset($Drawn[$NodeID]) ) { $Drawn[$NodeID] = ""; } - - if ( isset($this->Data[$NodeID]) && !isset($Drawn[$Key][$NodeID]) && !isset($Drawn[$NodeID][$Key]) ) - { - $Color = array("R"=>$this->Default["LinkR"],"G"=>$this->Default["LinkG"],"B"=>$this->Default["LinkB"],"Alpha"=>$this->Default["Alpha"]); - - if ( $this->Links != "" ) - { - if ( isset($this->Links[$Key][$NodeID]["R"]) ) - { $Color = array("R"=>$this->Links[$Key][$NodeID]["R"],"G"=>$this->Links[$Key][$NodeID]["G"],"B"=>$this->Links[$Key][$NodeID]["B"],"Alpha"=>$this->Links[$Key][$NodeID]["Alpha"]); } - - if ( isset($this->Links[$Key][$NodeID]["Ticks"]) ) - { $Color["Ticks"] = $this->Links[$Key][$NodeID]["Ticks"]; } - } - - $X2 = $this->Data[$NodeID]["X"]; - $Y2 = $this->Data[$NodeID]["Y"]; - $this->pChartObject->drawLine($X,$Y,$X2,$Y2,$Color); - $Drawn[$Key][$NodeID] = TRUE; - - if ( isset($this->Links) && $this->Links != "" ) - { - if ( isset($this->Links[$Key][$NodeID]["Name"]) || isset($this->Links[$NodeID][$Key]["Name"]) ) - { - $Name = isset($this->Links[$Key][$NodeID]["Name"]) ? $this->Links[$Key][$NodeID]["Name"] : $this->Links[$NodeID][$Key]["Name"]; - $TxtX = ($X2 - $X)/2 + $X; - $TxtY = ($Y2 - $Y)/2 + $Y; - - if ( $X <= $X2 ) - $Angle = (360-$this->getAngle($X,$Y,$X2,$Y2)) % 360; - else - $Angle = (360-$this->getAngle($X2,$Y2,$X,$Y)) % 360; - - $Settings = $Color; - $Settings["Angle"] = $Angle; - $Settings["Align"] = TEXT_ALIGN_BOTTOMMIDDLE; - $this->pChartObject->drawText($TxtX,$TxtY,$Name,$Settings); - } - } - } - } - } - } - - /* Draw the quiet zones */ - if ( $DrawQuietZone ) - { - foreach($this->Data as $Key => $Settings) - { - $X = $Settings["X"]; - $Y = $Settings["Y"]; - $FreeZone = $Settings["FreeZone"]; - - $this->pChartObject->drawFilledCircle($X,$Y,$FreeZone,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>2)); - } - } - - - /* Draw the nodes */ - foreach($this->Data as $Key => $Settings) - { - $X = $Settings["X"]; - $Y = $Settings["Y"]; - $Name = $Settings["Name"]; - $FreeZone = $Settings["FreeZone"]; - $Shape = $Settings["Shape"]; - $Size = $Settings["Size"]; - - $Color = array("R"=>$Settings["R"],"G"=>$Settings["G"],"B"=>$Settings["B"],"Alpha"=>$Settings["Alpha"],"BorderR"=>$Settings["BorderR"],"BorderG"=>$Settings["BorderG"],"BorderB"=>$Settings["BorderB"],"BorderApha"=>$Settings["BorderAlpha"]); - - if ( $Shape == NODE_SHAPE_CIRCLE ) - { - $this->pChartObject->drawFilledCircle($X,$Y,$Size,$Color); - } - elseif ( $Shape == NODE_SHAPE_TRIANGLE ) - { - $Points = ""; - $Points[] = cos(deg2rad(270)) * $Size + $X; $Points[] = sin(deg2rad(270)) * $Size + $Y; - $Points[] = cos(deg2rad(45)) * $Size + $X; $Points[] = sin(deg2rad(45)) * $Size + $Y; - $Points[] = cos(deg2rad(135)) * $Size + $X; $Points[] = sin(deg2rad(135)) * $Size + $Y; - $this->pChartObject->drawPolygon($Points,$Color); - } - elseif ( $Shape == NODE_SHAPE_SQUARE ) - { - $Offset = $Size/2; $Size = $Size / 2; - $this->pChartObject->drawFilledRectangle($X-$Offset,$Y-$Offset,$X+$Offset,$Y+$Offset,$Color); - } - - if ( $Name != "" ) - { - $LabelOptions = array("R"=>$this->Labels["R"],"G"=>$this->Labels["G"],"B"=>$this->Labels["B"],"Alpha"=>$this->Labels["Alpha"]); - - if ( $this->Labels["Type"] == LABEL_LIGHT ) - { - $LabelOptions["Align"] = TEXT_ALIGN_BOTTOMLEFT; - $this->pChartObject->drawText($X,$Y,$Name,$LabelOptions); - } - elseif ( $this->Labels["Type"] == LABEL_CLASSIC ) - { - $LabelOptions["Align"] = TEXT_ALIGN_TOPMIDDLE; - $LabelOptions["DrawBox"] = TRUE; - $LabelOptions["BoxAlpha"] = 50; - $LabelOptions["BorderOffset"] = 4; - $LabelOptions["RoundedRadius"] = 3; - $LabelOptions["BoxRounded"] = TRUE; - $LabelOptions["NoShadow"] = TRUE; - - $this->pChartObject->drawText($X,$Y+$Size+$TextPadding,$Name,$LabelOptions); - } - } - } - - /* Draw the vectors */ - if ( $DrawVectors ) - { - foreach($this->Data as $Key => $Settings) - { - $X1 = $Settings["X"]; - $Y1 = $Settings["Y"]; - - if ( isset($Settings["Vectors"]) && $Settings["Type"] != NODE_TYPE_CENTRAL ) - { - foreach($Settings["Vectors"] as $ID => $Vector) - { - $Type = $Vector["Type"]; - $Force = $Vector["Force"]; - $Angle = $Vector["Angle"]; - $Factor = $Type == "A" ? $this->MagneticForceA : $this->MagneticForceR; - $Color = $Type == "A" ? array("FillR"=>255,"FillG"=>0,"FillB"=>0) : array("FillR"=>0,"FillG"=>255,"FillB"=>0); - - $X2 = cos(deg2rad($Angle)) * $Force * $Factor + $X1; - $Y2 = sin(deg2rad($Angle)) * $Force * $Factor + $Y1; - - $this->pChartObject->drawArrow($X1,$Y1,$X2,$Y2,$Color); - } - } - } - } - - return(array("Pass"=>$Jobs,"Conflicts"=>$Conflicts)); - } - - /* Return the distance between two points */ - function getDistance($X1,$Y1,$X2,$Y2) - { return (sqrt(($X2-$X1)*($X2-$X1)+($Y2-$Y1)*($Y2-$Y1))); } - - /* Return the angle made by a line and the X axis */ - function getAngle($X1,$Y1,$X2,$Y2) - { - $Opposite = $Y2 - $Y1; $Adjacent = $X2 - $X1;$Angle = rad2deg(atan2($Opposite,$Adjacent)); - if ($Angle > 0) { return($Angle); } else { return(360-abs($Angle)); } - } - - function intersect($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4) - { - $A = (($X3 * $Y4 - $X4 * $Y3) * ($X1 - $X2) - ($X1 * $Y2 - $X2 * $Y1) * ($X3 - $X4)); - $B = (($Y1 - $Y2) * ($X3 - $X4) - ($Y3 - $Y4) * ($X1 - $X2)); - - if ( $B == 0 ) { return(FALSE); } - $Xi = $A / $B; - - $C = ($X1 - $X2); - if ( $C == 0 ) { return(FALSE); } - $Yi = $Xi * (($Y1 - $Y2)/$C) + (($X1 * $Y2 - $X2 * $Y1)/$C); - - if ( $Xi >= min($X1,$X2) && $Xi >= min($X3,$X4) && $Xi <= max($X1,$X2) && $Xi <= max($X3,$X4)) - { - if ( $Yi >= min($Y1,$Y2) && $Yi >= min($Y3,$Y4) && $Yi <= max($Y1,$Y2) && $Yi <= max($Y3,$Y4)) - { return(TRUE); } - } - - return(FALSE); - } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/pStock.class.php b/pandora_console/include/graphs/pChart/pStock.class.php deleted file mode 100755 index 0889e2b56b..0000000000 --- a/pandora_console/include/graphs/pChart/pStock.class.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php - /* - pStock - class to draw stock charts - - Version : 2.1.0 - Made by : Jean-Damien POGOLOTTI - Last Update : 26/01/11 - - This file can be distributed under the license you can find at : - - http://www.pchart.net/license - - You can find the whole class documentation on the pChart web site. - */ - - define("STOCK_MISSING_SERIE" , 180001); - - /* pStock class definition */ - class pStock - { - var $pChartObject; - var $pDataObject; - - /* Class creator */ - function pStock($pChartObject,$pDataObject) - { - $this->pChartObject = $pChartObject; - $this->pDataObject = $pDataObject; - } - - /* Draw a stock chart */ - function drawStockChart($Format="") - { - $SerieOpen = isset($Format["SerieOpen"]) ? $Format["SerieOpen"] : "Open"; - $SerieClose = isset($Format["SerieClose"]) ? $Format["SerieClose"] : "Close"; - $SerieMin = isset($Format["SerieMin"]) ? $Format["SerieMin"] : "Min"; - $SerieMax = isset($Format["SerieMax"]) ? $Format["SerieMax"] : "Max"; - $LineWidth = isset($Format["LineWidth"]) ? $Format["LineWidth"] : 1; - $LineR = isset($Format["LineR"]) ? $Format["LineR"] : 0; - $LineG = isset($Format["LineG"]) ? $Format["LineG"] : 0; - $LineB = isset($Format["LineB"]) ? $Format["LineB"] : 0; - $LineAlpha = isset($Format["LineAlpha"]) ? $Format["LineAlpha"] : 100; - $ExtremityWidth = isset($Format["ExtremityWidth"]) ? $Format["ExtremityWidth"] : 1; - $ExtremityLength = isset($Format["ExtremityLength"]) ? $Format["ExtremityLength"] : 3; - $ExtremityR = isset($Format["ExtremityR"]) ? $Format["ExtremityR"] : 0; - $ExtremityG = isset($Format["ExtremityG"]) ? $Format["ExtremityG"] : 0; - $ExtremityB = isset($Format["ExtremityB"]) ? $Format["ExtremityB"] : 0; - $ExtremityAlpha = isset($Format["ExtremityAlpha"]) ? $Format["ExtremityAlpha"] : 100; - $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 8; - $BoxUpR = isset($Format["BoxUpR"]) ? $Format["BoxUpR"] : 188; - $BoxUpG = isset($Format["BoxUpG"]) ? $Format["BoxUpG"] : 224; - $BoxUpB = isset($Format["BoxUpB"]) ? $Format["BoxUpB"] : 46; - $BoxUpAlpha = isset($Format["BoxUpAlpha"]) ? $Format["BoxUpAlpha"] : 100; - $BoxUpSurrounding = isset($Format["BoxUpSurrounding"]) ? $Format["BoxUpSurrounding"] : NULL; - $BoxUpBorderR = isset($Format["BoxUpBorderR"]) ? $Format["BoxUpBorderR"] : $BoxUpR-20; - $BoxUpBorderG = isset($Format["BoxUpBorderG"]) ? $Format["BoxUpBorderG"] : $BoxUpG-20; - $BoxUpBorderB = isset($Format["BoxUpBorderB"]) ? $Format["BoxUpBorderB"] : $BoxUpB-20; - $BoxUpBorderAlpha = isset($Format["BoxUpBorderAlpha"]) ? $Format["BoxUpBorderAlpha"] : 100; - $BoxDownR = isset($Format["BoxDownR"]) ? $Format["BoxDownR"] : 224; - $BoxDownG = isset($Format["BoxDownG"]) ? $Format["BoxDownG"] : 100; - $BoxDownB = isset($Format["BoxDownB"]) ? $Format["BoxDownB"] : 46; - $BoxDownAlpha = isset($Format["BoxDownAlpha"]) ? $Format["BoxDownAlpha"] : 100; - $BoxDownSurrounding= isset($Format["BoxDownSurrounding"]) ? $Format["BoxDownSurrounding"] : NULL; - $BoxDownBorderR = isset($Format["BoxDownBorderR"]) ? $Format["BoxDownBorderR"] : $BoxDownR-20; - $BoxDownBorderG = isset($Format["BoxDownBorderG"]) ? $Format["BoxDownBorderG"] : $BoxDownG-20; - $BoxDownBorderB = isset($Format["BoxDownBorderB"]) ? $Format["BoxDownBorderB"] : $BoxDownB-20; - $BoxDownBorderAlpha= isset($Format["BoxDownBorderAlpha"]) ? $Format["BoxDownBorderAlpha"] : 100; - $ShadowOnBoxesOnly = isset($Format["ShadowOnBoxesOnly"]) ? $Format["ShadowOnBoxesOnly"] : TRUE; - - /* Data Processing */ - $Data = $this->pDataObject->getData(); - $Palette = $this->pDataObject->getPalette(); - - if ( $BoxUpSurrounding != NULL ) { $BoxUpBorderR = $BoxUpR + $BoxUpSurrounding; $BoxUpBorderG = $BoxUpG + $BoxUpSurrounding; $BoxUpBorderB = $BoxUpB + $BoxUpSurrounding; } - if ( $BoxDownSurrounding != NULL ) { $BoxDownBorderR = $BoxDownR + $BoxDownSurrounding; $BoxDownBorderG = $BoxDownG + $BoxDownSurrounding; $BoxDownBorderB = $BoxDownB + $BoxDownSurrounding; } - - if ( $LineWidth != 1 ) { $LineOffset = $LineWidth / 2; } - $BoxOffset = $BoxWidth / 2; - - $Data = $this->pChartObject->DataSet->getData(); - list($XMargin,$XDivs) = $this->pChartObject->scaleGetXSettings(); - - if ( !isset($Data["Series"][$SerieOpen]) || !isset($Data["Series"][$SerieClose]) || !isset($Data["Series"][$SerieMin]) || !isset($Data["Series"][$SerieMax]) ) - return(STOCK_MISSING_SERIE); - - $Plots = ""; - foreach($Data["Series"][$SerieOpen]["Data"] as $Key => $Value) - { - if ( isset($Data["Series"][$SerieClose]["Data"][$Key]) || isset($Data["Series"][$SerieMin]["Data"][$Key]) || isset($Data["Series"][$SerieMax]["Data"][$Key]) ) - $Plots[] = array($Value,$Data["Series"][$SerieClose]["Data"][$Key],$Data["Series"][$SerieMin]["Data"][$Key],$Data["Series"][$SerieMax]["Data"][$Key]); - } - - $AxisID = $Data["Series"][$SerieOpen]["Axis"]; - $Mode = $Data["Axis"][$AxisID]["Display"]; - $Format = $Data["Axis"][$AxisID]["Format"]; - $Unit = $Data["Axis"][$AxisID]["Unit"]; - - $YZero = $this->pChartObject->scaleComputeY(0,array("AxisID"=>$AxisID)); - $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; - - $X = $this->pChartObject->GraphAreaX1 + $XMargin; - $Y = $this->pChartObject->GraphAreaY1 + $XMargin; - - $LineSettings = array("R"=>$LineR,"G"=>$LineG,"B"=>$LineB,"Alpha"=>$LineAlpha); - $ExtremitySettings = array("R"=>$ExtremityR,"G"=>$ExtremityG,"B"=>$ExtremityB,"Alpha"=>$ExtremityAlpha); - $BoxUpSettings = array("R"=>$BoxUpR,"G"=>$BoxUpG,"B"=>$BoxUpB,"Alpha"=>$BoxUpAlpha,"BorderR"=>$BoxUpBorderR,"BorderG"=>$BoxUpBorderG,"BorderB"=>$BoxUpBorderB,"BorderAlpha"=>$BoxUpBorderAlpha); - $BoxDownSettings = array("R"=>$BoxDownR,"G"=>$BoxDownG,"B"=>$BoxDownB,"Alpha"=>$BoxDownAlpha,"BorderR"=>$BoxDownBorderR,"BorderG"=>$BoxDownBorderG,"BorderB"=>$BoxDownBorderB,"BorderAlpha"=>$BoxDownBorderAlpha); - - foreach($Plots as $Key =>$Points) - { - $PosArray = $this->pChartObject->scaleComputeY($Points,array("AxisID"=>$AxisID)); - - if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) - { - if ( $YZero > $this->pChartObject->GraphAreaY2-1 ) { $YZero = $this->pChartObject->GraphAreaY2-1; } - if ( $YZero < $this->pChartObject->GraphAreaY1+1 ) { $YZero = $this->pChartObject->GraphAreaY1+1; } - - if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; } - - if ( $ShadowOnBoxesOnly ) { $RestoreShadow = $this->pChartObject->Shadow; $this->pChartObject->Shadow = FALSE; } - - if ( $LineWidth == 1 ) - $this->pChartObject->drawLine($X,$PosArray[2],$X,$PosArray[3],$LineSettings); - else - $this->pChartObject->drawFilledRectangle($X-$LineOffset,$PosArray[2],$X+$LineOffset,$PosArray[3],$LineSettings); - - if ( $ExtremityWidth == 1 ) - { - $this->pChartObject->drawLine($X-$ExtremityLength,$PosArray[2],$X+$ExtremityLength,$PosArray[2],$ExtremitySettings); - $this->pChartObject->drawLine($X-$ExtremityLength,$PosArray[3],$X+$ExtremityLength,$PosArray[3],$ExtremitySettings); - } - else - { - $this->pChartObject->drawFilledRectangle($X-$ExtremityLength,$PosArray[2],$X+$ExtremityLength,$PosArray[2]-$ExtremityWidth,$ExtremitySettings); - $this->pChartObject->drawFilledRectangle($X-$ExtremityLength,$PosArray[3],$X+$ExtremityLength,$PosArray[3]+$ExtremityWidth,$ExtremitySettings); - } - - if ( $ShadowOnBoxesOnly ) { $this->pChartObject->Shadow = $RestoreShadow; } - - if ( $PosArray[0] > $PosArray[1] ) - $this->pChartObject->drawFilledRectangle($X-$BoxOffset,$PosArray[0],$X+$BoxOffset,$PosArray[1],$BoxUpSettings); - else - $this->pChartObject->drawFilledRectangle($X-$BoxOffset,$PosArray[0],$X+$BoxOffset,$PosArray[1],$BoxDownSettings); - - $X = $X + $XStep; - } - elseif ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) - { - if ( $YZero > $this->pChartObject->GraphAreaX2-1 ) { $YZero = $this->pChartObject->GraphAreaX2-1; } - if ( $YZero < $this->pChartObject->GraphAreaX1+1 ) { $YZero = $this->pChartObject->GraphAreaX1+1; } - - if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1-$XMargin*2)/$XDivs; } - - if ( $LineWidth == 1 ) - $this->pChartObject->drawLine($PosArray[2],$Y,$PosArray[3],$Y,$LineSettings); - else - $this->pChartObject->drawFilledRectangle($PosArray[2],$Y-$LineOffset,$PosArray[3],$Y+$LineOffset,$LineSettings); - - if ( $ShadowOnBoxesOnly ) { $RestoreShadow = $this->pChartObject->Shadow; $this->pChartObject->Shadow = FALSE; } - - if ( $ExtremityWidth == 1 ) - { - $this->pChartObject->drawLine($PosArray[2],$Y-$ExtremityLength,$PosArray[2],$Y+$ExtremityLength,$ExtremitySettings); - $this->pChartObject->drawLine($PosArray[3],$Y-$ExtremityLength,$PosArray[3],$Y+$ExtremityLength,$ExtremitySettings); - } - else - { - $this->pChartObject->drawFilledRectangle($PosArray[2],$Y-$ExtremityLength,$PosArray[2]-$ExtremityWidth,$Y+$ExtremityLength,$ExtremitySettings); - $this->pChartObject->drawFilledRectangle($PosArray[3],$Y-$ExtremityLength,$PosArray[3]+$ExtremityWidth,$Y+$ExtremityLength,$ExtremitySettings); - } - - if ( $ShadowOnBoxesOnly ) { $this->pChartObject->Shadow = $RestoreShadow; } - - if ( $PosArray[0] < $PosArray[1] ) - $this->pChartObject->drawFilledRectangle($PosArray[0],$Y-$BoxOffset,$PosArray[1],$Y+$BoxOffset,$BoxUpSettings); - else - $this->pChartObject->drawFilledRectangle($PosArray[0],$Y-$BoxOffset,$PosArray[1],$Y+$BoxOffset,$BoxDownSettings); - - $Y = $Y + $XStep; - } - } - } - } -?> \ No newline at end of file diff --git a/pandora_console/include/graphs/pChart/palettes/autumn.color b/pandora_console/include/graphs/pChart/palettes/autumn.color deleted file mode 100755 index 80ffbc04a7..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/autumn.color +++ /dev/null @@ -1,6 +0,0 @@ -185,106,154,100 -216,137,184,100 -156,192,137,100 -216,243,201,100 -253,232,215,100 -255,255,255,100 diff --git a/pandora_console/include/graphs/pChart/palettes/blind.color b/pandora_console/include/graphs/pChart/palettes/blind.color deleted file mode 100755 index 9d62238397..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/blind.color +++ /dev/null @@ -1,6 +0,0 @@ -109,152,171,100 -0,39,94,100 -254,183,41,100 -168,177,184,100 -255,255,255,100 -0,0,0,100 diff --git a/pandora_console/include/graphs/pChart/palettes/evening.color b/pandora_console/include/graphs/pChart/palettes/evening.color deleted file mode 100755 index 5d0c1a5a93..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/evening.color +++ /dev/null @@ -1,6 +0,0 @@ -242,245,237,100 -255,194,0,100 -255,91,0,100 -184,0,40,100 -132,0,46,100 -74,192,242,100 diff --git a/pandora_console/include/graphs/pChart/palettes/kitchen.color b/pandora_console/include/graphs/pChart/palettes/kitchen.color deleted file mode 100755 index b0eeb33d92..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/kitchen.color +++ /dev/null @@ -1,6 +0,0 @@ -155,225,251,100 -197,239,253,100 -189,32,49,100 -35,31,32,100 -255,255,255,100 -0,98,149,100 diff --git a/pandora_console/include/graphs/pChart/palettes/light.color b/pandora_console/include/graphs/pChart/palettes/light.color deleted file mode 100755 index d0657dbe6b..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/light.color +++ /dev/null @@ -1,7 +0,0 @@ -239,210,121,100 -149,203,233,100 -2,71,105,100 -175,215,117,100 -44,87,0,100 -222,157,127,100 - diff --git a/pandora_console/include/graphs/pChart/palettes/navy.color b/pandora_console/include/graphs/pChart/palettes/navy.color deleted file mode 100755 index 3b6df5ebaf..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/navy.color +++ /dev/null @@ -1,6 +0,0 @@ -25,78,132,100 -59,107,156,100 -31,36,42,100 -55,65,74,100 -96,187,34,100 -242,186,187,100 diff --git a/pandora_console/include/graphs/pChart/palettes/shade.color b/pandora_console/include/graphs/pChart/palettes/shade.color deleted file mode 100755 index 0e43a1d2bb..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/shade.color +++ /dev/null @@ -1,6 +0,0 @@ -117,113,22,100 -174,188,33,100 -217,219,86,100 -0,71,127,100 -76,136,190,100 -141,195,233,100 diff --git a/pandora_console/include/graphs/pChart/palettes/spring.color b/pandora_console/include/graphs/pChart/palettes/spring.color deleted file mode 100755 index 386cbc42a5..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/spring.color +++ /dev/null @@ -1,6 +0,0 @@ -146,123,81,100 -168,145,102,100 -128,195,28,100 -188,221,90,100 -255,121,0,100 -251,179,107,100 diff --git a/pandora_console/include/graphs/pChart/palettes/summer.color b/pandora_console/include/graphs/pChart/palettes/summer.color deleted file mode 100755 index 1609534944..0000000000 --- a/pandora_console/include/graphs/pChart/palettes/summer.color +++ /dev/null @@ -1,6 +0,0 @@ -253,184,19,100 -246,139,31,100 -241,112,34,100 -98,194,204,100 -228,246,248,100 -238,246,108,100 diff --git a/pandora_console/include/help/en/help_plugin_macros.php b/pandora_console/include/help/en/help_plugin_macros.php index 1660c45e13..6d1e508b21 100644 --- a/pandora_console/include/help/en/help_plugin_macros.php +++ b/pandora_console/include/help/en/help_plugin_macros.php @@ -31,10 +31,10 @@ Hidden this macros because they cannot edit in the module form --> <li>_plugin_parameters_ : Plug-in Parameters of the module.</li> -<li>_name_tag_ : Nombre de los tags asociados al módulo.</li> -<li>_email_tag_ : Emails asociados a los tags de módulos.</li> -<li>_phone_tag_ : Teléfonos asociados a los tags de módulos.</li> -<li>_moduletags_ : Teléfonos asociados a los tags de módulos.</li> +<li>_name_tag_ : Names of the tags associated to the module.</li> +<li>_email_tag_ : Emails associated to module tags.</li> +<li>_phone_tag_ : Phone numbers associated to module tags.</li> +<li>_moduletags_ : URLs associated to module tags.</li> <li>_agentcustomfield_<i>n</i>_: Agent custom field number <i>n</i> (eg. _agentcustomfield_9_).</li> </ul> <p> diff --git a/pandora_console/include/help/es/help_plugin_macros.php b/pandora_console/include/help/es/help_plugin_macros.php index 701d15f35e..77c97aa4d7 100644 --- a/pandora_console/include/help/es/help_plugin_macros.php +++ b/pandora_console/include/help/es/help_plugin_macros.php @@ -30,9 +30,9 @@ Hidden this macros because they cannot edit in the module form --> <li>_plugin_parameters_ : Parámetros del Plug-in del módulo.</li> -<li>_name_tag_ : Names of the tags associated to the module.</li> -<li>_email_tag_ : Emails associated to the module tags.</li> -<li>_phone_tag_ : Phone numbers associated to the module tags.</li> -<li>_moduletags_ : URLs associated to the module tags.</li> +<li>_name_tag_ : Nombre de los tags asociados al módulo.</li> +<li>_email_tag_ : Emails asociados a los tags de módulos.</li> +<li>_phone_tag_ : Teléfonos asociados a los tags de módulos.</li> +<li>_moduletags_ : URLs asociadas a los tags de módulos.</li> <li>_agentcustomfield_<i>n</i>_: Campo personalizado número <i>n</i> del agente (eg. _agentcustomfield_9_). </li> </ul> diff --git a/pandora_console/include/help/ja/help_alert_config.php b/pandora_console/include/help/ja/help_alert_config.php index d8dab9c2fa..5e2790dc76 100644 --- a/pandora_console/include/help/ja/help_alert_config.php +++ b/pandora_console/include/help/ja/help_alert_config.php @@ -27,14 +27,14 @@ email アクションを設定するには、_field1_ (送信先アドレス)、 <ul> <li>_address_ : アラートが発生したエージェントのアドレス</li> <li>_address_n_ : "n" で示される位置に対応するエージェントのアドレス。例: address_1_ , address_2_</li> - <li>_agent_: Alias of the agent that triggered the alert. If there is no alias assigned, the name of the agent will be used instead.</li> - <li>_agentalias_: Alias of the agent that triggered the alert.</li> + <li>_agent_: アラートが発生したエージェントの別名。別名が無い場合は、エージェント名が利用されます。</li> + <li>_agentalias_: アラートが発生したエージェントの別名</li> <li>_agentcustomfield_<i>n</i>_ : エージェントカスタムフィールド番号<i>n</i> (例: _agentcustomfield_9_). </li> <li>_agentcustomid_: エージェントカスタムID</li> <li>_agentdescription_ : 発生したアラートの説明</li> <li>_agentgroup_ : エージェントグループ名</li> <li>_agentname_: アラートが発生したエージェント.</li> - <li>_agentos_: Agent's operative system</li> + <li>_agentos_: エージェントの OS</li> <li>_agentstatus_ : エージェントの現在の状態</li> <li>_alert_critical_instructions_: モジュールが障害状態の場合の手順</li> <li>_alert_description_ : アラートの説明</li> @@ -48,9 +48,9 @@ email アクションを設定するには、_field1_ (送信先アドレス)、 <li>_all_address_ : アラートを発報した全エージェントのアドレス</li> <li>_data_ : アラート発生時のモジュールのデータ(値)</li> <li>_email_tag_ : モジュールタグに関連付けられた Email。</li> - <li>_event_cfX_ : (イベントアラートのみ) アラートを発報したイベントのカスタムフィールドのキー。 For example, if there is a custom field whose key is IPAM, its value can be obtained using the _event_cfIPAM_ macro.</li> + <li>_event_cfX_ : (イベントアラートのみ) アラートを発報したイベントのカスタムフィールドのキー。 例えば、キーが IPAM のカスタムフィールドがある場合、_event_cfIPAM_ マクロにて値を得ることができます。</li> <li>_event_description_ : (イベントアラートのみ) <?php echo get_product_name();?> イベントの説明 です</li> - <li>_event_extra_id_: (Only event alerts) Extra id.</li> + <li>_event_extra_id_: (イベントアラートのみ) 拡張 ID</li> <li>_event_id_ : (イベントアラートのみ) アラート発生元のイベントID</li> <li>_event_text_severity_ : (イベントアラートのみ) イベント(アラートの発生元)のテキストでの重要度 (Maintenance, Informational, Normal Minor, Warning, Major, Critical)</li> <li>_field1_ : ユーザ定義フィールド1</li> @@ -91,7 +91,7 @@ email アクションを設定するには、_field1_ (送信先アドレス)、 <li>_plugin_parameters_ : モジュールのプラグインパラメータ</li> <li>_policy_ : モジュールが属するポリシー名 (存在する場合)</li> <li>_prevdata_ : アラートを発報する前のモジュールデータ</li> - <li>_rca_: Root cause analysis chain (only for services).</li> + <li>_rca_: 根本原因分析 (サービスのみ).</li> <li>_server_ip_ : エージェントが割り当てられているサーバ IP。</li> <li>_server_name_ : エージェントが割り当てられているサーバ名。 </li> <li>_target_ip_ : モジュールの対象IPアドレス</li> diff --git a/pandora_console/include/help/ja/help_context_module_unknow.php b/pandora_console/include/help/ja/help_context_module_unknow.php new file mode 100644 index 0000000000..1590bc118e --- /dev/null +++ b/pandora_console/include/help/ja/help_context_module_unknow.php @@ -0,0 +1,24 @@ +<?php +/** + * @package Include/help/ja + */ +?> +<h1><?php echo get_product_name();?>における不明モジュール</h1> +<p> +さまざまな理由で不明モジュールが発生することがあります。不明モジュールは、モジュールにおける特別な状態で、"直近で監視結果があるべきなのに、それが無い" ということを意味します。監視間隔の 2倍を超えて監視データを受信できない場合に不明になります。例えば、5分間隔の監視であれば、10分データを受信できないと不明になります。 +</p> +<p> +不明モジュールの発生にはいくつかのケースがあります。 +</p> +<ul style="list-style-type: disc; margin-left: 30px;"> + <li><?php echo get_product_name();?> サーバがダウンしている場合。それを再起動してくください。なぜダウンしたかを確認するために /var/log/pandora/pandora_server.log をチェックするのを忘れないようにしてください。</li> + <li>tentacle サーバがダウンしている場合で、リモートサーバにインストールしている <?php echo get_product_name();?> からデータを取得できない場合。</li> + <li>エージェントとサーバの間でネットワークの問題が発生している場合。</li> + <li><?php echo get_product_name();?> エージェントが停止していて、サーバに情報を送信していない場合。</li> + <li>ネットワークがダウンしているか、監視対象のリモートデバイスがダウンしているか IP アドレスが変わった場合(例えば、SNMP のクエリなど)。</li> + <li>エージェントが間違った日時を報告していたり、過去の日時でデータを送っている場合。</li> + <li>スクリプトやモジュールが動作する前に、エージェント自体で何らかの問題が発生している場合。この場合はエージェントを確認してください。</li> +</ul> +<p> +不明状態は、時には監視することが有用です。上記のような状態を警告するために、不明状態にアラートを設定することができます。 +</p> diff --git a/pandora_console/include/help/ja/help_cron.php b/pandora_console/include/help/ja/help_cron.php index b5208694c0..f6a5d02be5 100644 --- a/pandora_console/include/help/ja/help_cron.php +++ b/pandora_console/include/help/ja/help_cron.php @@ -3,44 +3,36 @@ * @package Include/help/ja */ ?> -<h1>Cron for server modules</h1> +<h1>サーバモジュールの cron</h1> -Using the configuration parameter sets <b>Cron from</b> and <b>Cron to</b> makes -it possible for a module to run only for certain periods of time. -The way in which it is configured is similar to the syntax of -<a style="font-size:14px;" href="https://en.wikipedia.org/wiki/Cron">cron</a>. -Just as they appear in the <?php echo get_product_name();?> console, each one of the parameters -has three options. +設定パラメータ <b>Cron from</b> および <b>Cron to</b> を用いることにより、特定の時間にのみモジュールを実行するようにできます。 +設定のための書式は、<a style="font-size:14px;" href="https://en.wikipedia.org/wiki/Cron">cron</a> に似ています。 +<?php echo get_product_name();?> コンソールに表示され、それぞれのパラメータには 3つのオプションがあります。 <h4>Cron from: any</h4> -The module will not have restrictions in that parameter. Whatever the value is -will be executed, and it is equivalent to the asterisk (*) in the cron nomenclature. In this -case <b>Cron to</b> is ignored. +パラメータによるモジュールに対する制限はありません。値が何であっても実行され、cron のアスタリスク(*)と同等です。この場合、<b>Cron to</b> は無視されます。 <h4>Cron from: different from any. Cron to: any</h4> -The module will run only during the time in which the date matches that -parameter. It is equivalent to writingjust one number in cron nomenclature. +パラメータにマッチする日時の間のみモジュールが実行されます。cron に一つの値を記載するのと同等です。 <h4>Cron from: different from any. Cron to: different from any</h4> -The module will run only during the time specified between <b>Cron from</b> and <b>Cron to</b>. -It is equivalent to writing number dash number (n-n) in cron nomenclature. +モジュールは、<b>Cron from</b> と <b>Cron to</b> で指定された間の時間のみ実行されます。 +cron で、ハイフンを用いた数値(n-n)を記載するのと同等です。 -<h2>Agent interval</h2> +<h2>エージェントの実行間隔</h2> -As long as cron conditions are met, the agent will run following -its execution interval. +cron 条件が満たされている限り、エージェントは実行間隔に従って実行されます。 -<h2>Examples</h2> +<h2>例</h2> <ul> - <li><i>* * * * *</i>: No cron configured.</li> - <li><i>15 20 * * *</i>: It will run every day at 20:15.</li> - <li><i>* 20 * * *</i>: It will run every day during the hour 20, that is, from 20:00 to 20:59.</li> - <li><i>* 8-19 * * *</i>: It will run everyday from 8:00 to 19:59.</li> - <li><i>15-45 * 1-16 * *</i>: It will run every first 16 days of the month every hour, from quarter past to quarter to.</li> - <li><i>* * * 5 *</i>: It will run only in May.</li> + <li><i>* * * * *</i>: cron 設定なし。</li> + <li><i>15 20 * * *</i>: 毎日 20:15 に実行します。</li> + <li><i>* 20 * * *</i>: 毎日 20時台、20:00 から 20:59 の間に実行します。</li> + <li><i>* 8-19 * * *</i>: 毎日 8:00 から 19:59 の間に実行します。</li> + <li><i>15-45 * 1-16 * *</i>: 毎月 1日から 16日まで、毎時 15分から 45分の間で実行します。</li> + <li><i>* * * 5 *</i>: 5月にのみ実行します。</li> <ul> - diff --git a/pandora_console/include/help/ja/help_event_alert.php b/pandora_console/include/help/ja/help_event_alert.php index ea34c43d5c..927fbf6ecc 100644 --- a/pandora_console/include/help/ja/help_event_alert.php +++ b/pandora_console/include/help/ja/help_event_alert.php @@ -4,27 +4,25 @@ */ ?> -<h1>イベントアラート、イベント相関</h1> +<h1>イベントアラート</h1> -<?php echo get_product_name();?> バージョン 4.0 から、イベントにアラートを定義できるようになりました。より柔軟な完全に新たなアプローチです。これはエンタープライズ版の機能です。 +イベントにアラートを設定することができます。これによりより柔軟なアプローチを実現します。これは、Enterprise 版の機能です。 新たなイベントアラートを作成するには、システム管理メニューのイベントアラートメニューで作成ボタンをクリックします。 <br><br> -イベントアラートは、論理式(and、or、xor、nand、nor、nxor)で結合されたルールで組み立てられます。 <br><br> - <?php html_print_image ("images/help/event01.png", false, array('width' => '250px')); ?> - <br> -簡単にいうと、イベントアラートのパラメータ設定はモジュールアラートと同様です。 +イベントアラートは、論理式(and、or、xor、nand、nor、nxor)で結合されたルールで組 +み立てられます。 <br><br> <?php html_print_image ("images/help/event02.png", false, array('width' => '550px')); ?> - -イベントアラート特有のパラメータとしては、以下の 2つがあります。 +<br> +簡単に言うと、イベントアラートの設定パラメータは、モジュールアラートと同じです。イベントアラート特有のパラメータは2つだけです。 <br><br> <b>ルール評価モード: </b> drop モードでは、一つのルールが満たされなければ、残りのアラートルールは評価されません。pass モードでは、残りのルールも評価されます。 <br><br> @@ -36,7 +34,7 @@ <?php html_print_image ("images/help/event03.png", false, array('width' => '550px')); ?> - +<br> 一つのルールの設定パラメータは次の通りです。 <br><br> @@ -63,4 +61,3 @@ <p>* <?php echo get_product_name();?> データベースに保存できるイベント数に関しては、pandora_server.conf ファイルの event_window パラメータにて定義します。この時間範囲を越えるイベントが発生した場合は、サーバは処理を行いません。そのため、サーバの設定よりも大きな時間間隔を設定しても意味がありません。 </p> - diff --git a/pandora_console/include/help/ja/help_graphs.php b/pandora_console/include/help/ja/help_graphs.php index 7e5136af91..f95773d983 100644 --- a/pandora_console/include/help/ja/help_graphs.php +++ b/pandora_console/include/help/ja/help_graphs.php @@ -1,6 +1,6 @@ <?php /* -* @package Include/help/es/ +* @package Include/help/ja */ ?> @@ -48,69 +48,67 @@ div.img_title { </style> <body class="hlp_graphs"> -<h1>INTERPRETING GHRAPHS IN <?php echo get_product_name();?></h1> +<h1><?php echo get_product_name();?> におけるグラフ処理</h1> +<p><?php echo get_product_name();?>では、グラフは指定した期間においてモジュールが持つ値を表現します。</p> +<p><?php echo get_product_name();?>には、大量のデータが保存されるため、2つの異なるタイプの機能を提供しています。</p> -<p>In <?php echo get_product_name();?>, graphs represent the values a module has had during a given period.</p> -<p>Due to the large amount of data that <?php echo get_product_name();?> stores, two different types of functionality are offered</p> - - -<h2>NORMAL GRAPHS</h2> +<h2>通常グラフ</h2> <img class="hlp_graphs" src="<?php echo $config["homeurl"];?>images/help/chart_normal_sample.png" alt="regular chart sample" /> -<h4>General characteristics</h4> -<p>These are graphs that represent the information stored by the module at a basic level.</p> -<p>They allow us to see an approximation of the values in which our module oscillates.</p> -<p>The module data are divided into <i>boxes</i> in such a way that a sample of the module values is represented, <b>not all values are shown</b>. This is complemented by dividing the view into three graphs, <b>Max</b> (maximum values), <b>min</b> (minimum values) and <b>avg</b> (average values)</p> +<h4>一般的な特性</h4> +<p>基本的なレベルでモジュールに保存された情報を表現するグラフがあります。</p> +<p>モジュールの変動する値の近似値を見ることができます。<p> +<p>モジュールデータは表示をシンプルにするための<i>箱</i>に分割され、<b>全ての値が表示されるわけではありません</b>。これは、表示を <b>最大</b>、<b>最小</b>、<b>平均</b>の 3つのグラフに分割することによって補完しています。</p> <ul class="clean"> -<li><b>Advantages</b>: They are generated very quickly without consuming hardly any resources.</li> -<li><b>Disadvantages</b>: The information provided is approximate. The status of the monitors they represent are calculated on an event-driven basis.</li> +<li><b>利点</b>: 多くのリソースを消費することなく素早く表示されます。</li> +<li><b>欠点</b>: 提供される情報はおおよその値です。それらが表す監視状況は、イベント発生状況に基づいて計算されます。</li> -<h4>Display options</h4> +<h4>表示オプション</h4> <dl> -<dt>Refresh time</dt> -<dd>Time the graph will take to be created again.</dd> +<dt>リフレッシュ時間</dt> +<dd>グラフが再生成された時間です。</dd> -<dt>Avg. Only</dt> -<dd>Only the averages graph will be created.</dd> +<dt>平均のみ</dt> +<dd>平均のみのグラフが生成されます。</dd> -<dt>Starting date</dt> -<dd>Date until which the graphic will be created.</dd> +<dt>開始日時</dt> +<dd>この日時までのグラフが生成されます。</dd> -<dt>Startup time</dt> -<dd>Hour minutes and seconds until the graphic is created.</dd> +<dt>開始時間</dt> +<dd>グラフが生成されるまでの時間、分、秒です。</dd> -<dt>Zoom factor</dt> -<dd>Graph viewfinder size, multiplicative.</dd> +<dt>拡大率(Zoom)</dt> +<dd>グラフの拡大率です。</dd> -<dt>Time Range</dt> -<dd>Sets the time period from which data will be collected.</dd> +<dt>時間範囲</dt> +<dd>データを集める時間設定です。</dd> -<dt>Show events</dt> -<dd>Displays indicator points with event information at the top.</dd> +<dt>イベント表示</dt> +<dd>一番上にイベント情報をポイント表示します。</dd> -<dt>Show alerts</dt> -<dd>Shows indicator points with triggered alert information at the top.</dd> +<dt>アラート表示</dt> +<dd>一番上に発生したアラートの情報をポイント表示します。</dd> -<dt>Show percentile</dt> -<dd>Adds a graph that indicates the percentile line (configurable in general visual options of <?php echo get_product_name();?>).</dd> +<dt>パーセント表示</dt> +<dd>グラフにパーセント表示の線を追加します。(<?php echo get_product_name();?> の表示オプションで設定できます)</dd> -<dt>Time comparison (superimposed)</dt> -<dd>Displays the same graphic overlay, but in the period before the selected one. For example, if we request a period of one week and activate this option, the week before the chosen one will also be shown superimposed.</dd> +<dt>時間比較 (重ね合わせ)</dt> +<dd>同一のグラフを重ね合わせて表示します。ただし、選択した期間より前との重ね合わせです。例えば、期間として 1週間を選択し、このオプションをチェックすると、選択した期間の前の 1週間が重ねあわされて表示されます。</dd> -<dt>Time comparison (independent)</dt> -<dd>Displays the same graph, but in the period before the selected one, in a separate area. For example, if we request a period of one week and activate this option, the week before the chosen one will also be shown.</dd> +<dt>時間比較 (分割)</dt> +<dd>同一のグラフを表示します。ただし、選択した期間より前のグラフを別々に表示します。例えば、期間として 1週間を選択し、このオプションをチェックすると、選択した期間の前の 1週間のグラフも表示されます。</dd> -<dt>Display unknown graphic</dt> -<dd>It shows boxes in grey shading covering the periods in which <?php echo get_product_name();?> cannot guarantee the module's status, either due to data loss, disconnection of a software agent, etc.</dd> +<dt>不明グラフ表示</dt> +<dd><?php echo get_product_name();?> がモジュールの状態を把握していない、データ欠損、ソフトウエアエージェントの接続断などがあった期間を、グレーの箱で表示します。</dd> -<dt>Show Full Scale Graph (TIP)</dt> -<dd>Switches the creation mode from "normal" to "TIP". In this mode, the graphs will show real data rather than approximations, so the time it will take to generate them will be longer. More detailed information on this type of graphs can be found in the following section.</dd> +<dt>詳細グラフ表示 (TIP)</dt> +<dd>生成モードを "通常" から "TIP" へ切り替えます。このモードでは、グラフを近似値ではなく実データで表示します。そのため、生成にかかる時間は長くなります。このグラフでは、次に説明するより詳細の情報が参照できます。</dd> </dl> @@ -121,27 +119,27 @@ div.img_title { <br /> -<h2>TIP GRAPS</h2> +<h2>詳細グラフ</h2> <img class="hlp_graphs "src="<?php echo $config["homeurl"];?>images/help/chart_tip_sample.png" alt="TIP chart sample" /> -<h4>General characteristics</h4> -<p>These are graphs that represent <b>real data</b>.</p> -<p>They show us a true representation of the data reported by our module.</p> -<p>As these are real data, it will not be necessary to supplement the information with extra graphs (avg, min, max).</p> -<p>The calculation of periods in unknown state is supported by events, such as normal graphs, but is complemented by extra detection if there is any.</p> -<p>Examples of resolution offered by normal and TIP methods:</p> +<h4>一般的な特性</h4> +<p><b>実データ</b>を表現するグラフです。</p> +<p>モジュールが収集したデータをそのままの状態で表示します。</p> +<p>実データのため、追加のグラフ(平均、最小、最大)で情報を補足する必要はありませせん。</p> +<p>通常のグラフど同様に、不明状態の期間の計算に対応していますが、存在する場合は補完されます。</p> +<p>通常と TIP グラフで提供される表示例:</p> -<div class="img_title">Example of normal graph in unknown interval</div> -<img class="hlp_graphs "src="<?php echo $config["homeurl"];?>images/help/chart_normal_detail.png" alt="TIP chart detail" /> +<div class="img_title">不明期間の通常グラフの例</div> +<img class="hlp_graphs "src="<?php echo $config["homeurl"];?>images/help/chart_normal_detail.png" alt="Normal chart detail" /> -<div class="img_title">Example of TIP graph in unknown interval</div> +<div class="img_title">不明期間の TIP グラフの例</div> <img class="hlp_graphs "src="<?php echo $config["homeurl"];?>images/help/chart_tip_detail.png" alt="TIP chart detail" /> <br /> <ul class="clean"> -<li><b>Advantages</b>: The data represented are real data. This is the most realistic way to review module data.</li> -<li><b>Disadvantages</b>: Processing is slower than in normal graphs. Depending on the time range and the volume of data to be displayed, your display may be less fluid.</li> +<li><b>利点</b>: 表示されるのは実データです。モジュールのデータを最も忠実に表現します。</li> +<li><b>欠点</b>: 通常のグラフより処理が遅くなります。表示する時間間隔やデータ量によっては、表示が遅くなります。</li> </ul> </body> diff --git a/pandora_console/include/ics-parser/class.iCalReader.php b/pandora_console/include/ics-parser/class.iCalReader.php index 792882c6fa..362dd9edb0 100644 --- a/pandora_console/include/ics-parser/class.iCalReader.php +++ b/pandora_console/include/ics-parser/class.iCalReader.php @@ -346,7 +346,9 @@ class ICal $rrules = array(); $rrule_strings = explode(';', $anEvent['RRULE']); foreach ($rrule_strings as $s) { - list($k, $v) = explode('=', $s); + $s_array = explode('=', $s); + $k = $s_array[0]; + $v = $s_array[1]; $rrules[$k] = $v; } // Get frequency diff --git a/pandora_console/include/include_graph_dependencies.php b/pandora_console/include/include_graph_dependencies.php index 4f3bbf0e27..37dc34ef11 100644 --- a/pandora_console/include/include_graph_dependencies.php +++ b/pandora_console/include/include_graph_dependencies.php @@ -19,14 +19,14 @@ function include_graphs_dependencies($home_url = '', $serialize_ttl = 1) { global $config; global $ttl; global $homeurl; - + $ttl = $serialize_ttl; $homeurl = $home_url; include_once($homeurl . 'include/functions_io.php'); include_once($homeurl . 'include/functions.php'); include_once($homeurl . 'include/functions_html.php'); - - if ($config['flash_charts'] && !defined('AJAX') && !get_parameter('static_graph',0)) { + + if (!defined('AJAX') && !get_parameter('static_graph',0)) { include_once($homeurl . 'include/graphs/functions_flot.php'); } include_once($homeurl . 'include/graphs/functions_gd.php'); diff --git a/pandora_console/include/javascript/OpenLayers/theme/default/style.css b/pandora_console/include/javascript/OpenLayers/theme/default/style.css index cd29d4dad2..6dca6061c9 100755 --- a/pandora_console/include/javascript/OpenLayers/theme/default/style.css +++ b/pandora_console/include/javascript/OpenLayers/theme/default/style.css @@ -3,6 +3,7 @@ div.olMap { padding: 0px!important; margin: 0px!important; cursor: default; + position: relative !important; } div.olMapViewport { diff --git a/pandora_console/include/javascript/datatables.min.js b/pandora_console/include/javascript/datatables.min.js new file mode 100644 index 0000000000..ce584c1da6 --- /dev/null +++ b/pandora_console/include/javascript/datatables.min.js @@ -0,0 +1,209 @@ +/* + * This combined file was created by the DataTables downloader builder: + * https://datatables.net/download + * + * To rebuild or modify this file with the latest versions of the included + * software please visit: + * https://datatables.net/download/#ju-1.12.1/jq-3.3.1/dt-1.10.18 + * + * Included libraries: + * jQuery UI 1.12.1, jQuery 3 3.3.1, DataTables 1.10.18 + */ + +/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w}); + + +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n) +}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n; +this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s)) +}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"'")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?" ":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())} +},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog +},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1 +},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter; +this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip}); + +/*! + DataTables 1.10.18 + ©2008-2018 SpryMedia Ltd - datatables.net/license +*/ +(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(H,E,E.document)}:h(jQuery,window,document)})(function(h,E,H,k){function Z(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()), +d[c]=e,"o"===b[1]&&Z(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Z(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=n.defaults.oLanguage,c=b.sDecimal;c&&Da(c);if(a){var d=a.sZeroRecords;!a.sEmptyTable&&(d&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(d&&"Loading..."===b.sLoadingRecords)&&F(a, +a,"sZeroRecords","sLoadingRecords");a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&c!==a&&Da(a)}}function eb(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%": +"");"boolean"===typeof a.scrollX&&(a.scrollX=a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&J(n.models.oSearch,a[b])}function fb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function gb(a){if(!n.__browser){var b={};n.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1, +overflow:"hidden"}).append(h("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,n.__browser);a.oScroll.iBarWidth=n.__browser.barWidth} +function hb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ea(a,b){var c=n.defaults.column,d=a.aoColumns.length,c=h.extend({},n.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},n.models.oSearch,c[d]);ka(a,d,h(b).data())}function ka(a,b,c){var b=a.aoColumns[b], +d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(fb(c),J(n.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=S(g),i=b.mRender? +S(b.mRender):null,c=function(a){return"string"===typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return N(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone, +b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function $(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Fa(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&la(a);r(a,null,"column-sizing",[a])}function aa(a,b){var c=ma(a,"bVisible");return"number"=== +typeof c[b]?c[b]:null}function ba(a,b){var c=ma(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function V(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function ma(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ga(a){var b=a.aoColumns,c=a.aoData,d=n.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g< +j;g++){i=0;for(h=c.length;i<h;i++){t[i]===k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function ib(a,b,c,d){var e,f,g,j,i,m,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){m=b[e];var q=m.targets!==k?m.targets:m.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Ea(a);d(q[f],m)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],m);else if("string"=== +typeof q[f]){j=0;for(i=l.length;j<i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,m)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function O(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},n.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ha(a,e,c,d);return e}function na(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b, +e){c=Ia(a,e);return O(a,c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a, +b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function Ja(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function S(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=S(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")|| +-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=Ja(f);for(var i=0,m=j.length;i<m;i++){f=j[i].match(ca);g=j[i].match(W);if(f){j[i]=j[i].replace(ca,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(m=a.length;i<m;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(W,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}} +function N(a){if(h.isPlainObject(a))return N(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ja(e),f;f=e[e.length-1];for(var g,j,i=0,m=e.length-1;i<m;i++){g=e[i].match(ca);j=e[i].match(W);if(g){e[i]=e[i].replace(ca,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(m=d.length;j<m;j++)f={},b(f,d[j],g), +a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(W,""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(W))a[f.replace(W,"")](d);else a[f.replace(ca,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ka(a){return D(a.aoData,"_aData")}function oa(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function pa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d, +1)}function da(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ia(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;La(a,e)}}function Ia(a,b,c,d){var e=[],f=b.firstChild,g, +j,i=0,m,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),N(a)(d,b.getAttribute(c)))}},G=function(a){if(c===k||c===i)j=l[i],m=h.trim(a.innerHTML),j&&j._bAttrSrc?(N(j.mData._)(d,m),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=N(j.mData)),j._setter(d,m)):d[i]=m;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)G(f),e.push(f);f=f.nextSibling}else{e=b.anCells; +f=0;for(g=e.length;f<g;f++)G(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&N(a.rowId)(d,b);return{data:d,cells:e}}function Ha(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,m,l,q;if(null===e.nTr){j=c||H.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;La(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){m=a.aoColumns[l];i=c?d[l]:H.createElement(m.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||m.mRender||m.mData!==l)&&(!h.isPlainObject(m.mData)||m.mData._!==l+".display"))i.innerHTML= +B(a,b,l,"display");m.sClass&&(i.className+=" "+m.sClass);m.bVisible&&!c?j.appendChild(i):!m.bVisible&&c&&i.parentNode.removeChild(i);m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}r(a,"aoRowCreatedCallback",null,[j,f,b,g])}e.nTr.setAttribute("role","row")}function La(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?qa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass)); +d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function kb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===h("th, td",g).length,m=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),Ma(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Na(a,"header")(a,d, +f,m);i&&ea(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(m.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(m.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function fa(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,m;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d= +0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(m=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+m]!==k&&g[d][f].cell==g[d][f+m].cell;){for(c=0;c<i;c++)j[d+c][f+m]=1;m++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",m)}}}}function P(a){var b=r(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e= +d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,m=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!lb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:m;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ha(a,l);var t=q.nTr;if(0!==e){var G=d[c%e];q._sRowStripe!=G&&(h(t).removeClass(q._sRowStripe).addClass(G), +q._sRowStripe=G)}r(a,"aoRowCallback",null,[t,q._aData,c,j,l]);b.push(t);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:V(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ka(a),g,m,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ka(a),g,m,i]);d=h(a.nTBody);d.children().detach(); +d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function T(a,b){var c=a.oFeatures,d=c.bFilter;c.bSort&&mb(a);d?ga(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;P(a);a._drawHold=!1}function nb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore= +a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,m,l,q,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];m=f[k+1];if("'"==m||'"'==m){l="";for(q=2;f[k+q]!=m;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(m=l.split("."),i.id=m[0].substr(1,m[0].length-1),i.className=m[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=ob(a);else if("f"==j&& +d.bFilter)g=pb(a);else if("r"==j&&d.bProcessing)g=qb(a);else if("t"==j)g=rb(a);else if("i"==j&&d.bInfo)g=sb(a);else if("p"==j&&d.bPaginate)g=tb(a);else if(0!==n.ext.feature.length){i=n.ext.feature;q=0;for(m=i.length;q<m;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function ea(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,m,l,q,k;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f< +i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;m=g;k=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][m+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ra(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],ea(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]|| +!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function sa(a,b,c){r(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var m="function"===typeof f?f(b,a):f,b="function"===typeof f&&m?m:h.extend(!0,b,m);delete g.data}m={data:b,success:function(b){var c= +b.error||b.sError;c&&K(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=r(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?K(a,0,"Invalid JSON response",1):4===b.readyState&&K(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;r(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(m,{url:g||a.sAjaxSource})): +"function"===typeof g?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(m,g)),g.data=f)}function lb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,!0),sa(a,ub(a),function(b){vb(a,b)}),!1):!0}function ub(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,m,l,k=X(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var t=function(a,b){j.push({name:a,value:b})};t("sEcho",a.iDraw);t("iColumns",c);t("sColumns",D(b,"sName").join(","));t("iDisplayStart",g);t("iDisplayLength", +i);var G={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)m=b[g],l=f[g],i="function"==typeof m.mData?"function":m.mData,G.columns.push({data:i,name:m.sName,searchable:m.bSearchable,orderable:m.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),t("mDataProp_"+g,i),d.bFilter&&(t("sSearch_"+g,l.sSearch),t("bRegex_"+g,l.bRegex),t("bSearchable_"+g,m.bSearchable)),d.bSort&&t("bSortable_"+g,m.bSortable);d.bFilter&&(t("sSearch",e.sSearch),t("bRegex", +e.bRegex));d.bSort&&(h.each(k,function(a,b){G.order.push({column:b.col,dir:b.dir});t("iSortCol_"+a,b.col);t("sSortDir_"+a,b.dir)}),t("iSortingCols",k.length));b=n.ext.legacy.ajax;return null===b?a.sAjaxSource?j:G:b?j:G}function vb(a,b){var c=ta(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}oa(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f, +10);d=0;for(e=c.length;d<e;d++)O(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;P(a);a._bInitComplete||ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?S(c)(b):b}function pb(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_", +g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?"":this.value;b!=e.sSearch&&(ga(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,P(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",g?Oa(f,g):f).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls", +c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==H.activeElement&&i.val(e.sSearch)}catch(d){}});return b[0]}function ga(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ga(a);if("ssp"!=y(a)){wb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)xb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex, +e[b].bSmart,e[b].bCaseInsensitive);yb(a)}else f(b);a.bFiltered=!0;r(a,null,"search",[a])}function yb(a){for(var b=n.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,m=c.length;i<m;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function xb(a,b,c,d,e,f){if(""!==b){for(var g=[],j=a.aiDisplay,d=Pa(b,d,e,f),e=0;e<j.length;e++)b=a.aoData[j[e]]._aFilterData[c],d.test(b)&&g.push(j[e]);a.aiDisplay=g}}function wb(a,b,c,d,e,f){var d=Pa(b, +d,e,f),f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster,j,e=[];0!==n.ext.search.length&&(c=!0);j=zb(a);if(0>=b.length)a.aiDisplay=g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function Pa(a,b,c,d){a=b?a:Qa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"', +"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function zb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=n.ext.type.search;c=!1;d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i); +h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function Ab(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,caseInsensitive:a.bCaseInsensitive}}function Bb(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function sb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Cb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby", +b+"_info"));return d[0]}function Cb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Db(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Db(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g, +c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ha(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){nb(a);kb(a);fa(a,a.aoHeader);fa(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Fa(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=v(f.sWidth));r(a,null,"preInit",[a]);T(a);e= +y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)O(a,f[b]);a.iInitDisplayStart=d;T(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ha(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&$(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Ra(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Sa(a);r(a,null,"length",[a,c])}function ob(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f= +e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Ra(a,h(this).val());P(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a=== +c&&h("select",i).val(d)});return i[0]}function tb(a){var b=a.sPaginationType,c=n.ext.pager[b],d="function"===typeof c,e=function(a){P(a)},b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Na(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a, +e)},sName:"pagination"}));return b}function Ta(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:K(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(r(a,null,"page",[a]),c&&P(a));return b}function qb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]} +function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",b?"block":"none");r(a,null,"processing",[a,b])}function rb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),m=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden", +position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>", +{"class":f.sScrollFootInner}).append(m.removeAttr("id").css("margin-left",0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:la,sName:"scrolling"});return i[0]}function la(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth, +f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,m=j.children("table"),j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),n=t.children("table"),o=h(a.nTHead),p=h(a.nTable),s=p[0],r=s.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,U=x.bScrollOversize,Xb=D(a.aoColumns,"nTh"),Q,L,R,w,Ua=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};L=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!== +L&&a.scrollBarVis!==k)a.scrollBarVis=L,$(a);else{a.scrollBarVis=L;p.children("thead, tfoot").remove();u&&(R=u.clone().prependTo(p),Q=u.find("tr"),R=R.find("tr"));w=o.clone().prependTo(p);o=o.find("tr");L=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ra(a,w),function(b,c){B=aa(a,b);c.style.width=a.aoColumns[B].sWidth});u&&I(function(a){a.style.width=""},R);f=p.outerWidth();if(""===c){r.width="100%";if(U&&(p.find("tbody").height()>j.offsetHeight|| +"scroll"==l.css("overflow-y")))r.width=v(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(r.width=v(d),f=p.outerWidth());I(C,L);I(function(a){z.push(a.innerHTML);Ua.push(v(h(a).css("width")))},L);I(function(a,b){if(h.inArray(a,Xb)!==-1)a.style.width=Ua[b]},o);h(L).height(0);u&&(I(C,R),I(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},R),I(function(a,b){a.style.width=y[b]},Q),h(R).height(0));I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+z[b]+"</div>";a.childNodes[0].style.height= +"0";a.childNodes[0].style.overflow="hidden";a.style.width=Ua[b]},L);u&&I(function(a,b){a.innerHTML='<div class="dataTables_sizing">'+A[b]+"</div>";a.childNodes[0].style.height="0";a.childNodes[0].style.overflow="hidden";a.style.width=y[b]},R);if(p.outerWidth()<f){Q=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(U&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(Q-b);(""===c||""!==d)&&K(a,1,"Possible column misalignment",6)}else Q="100%";q.width=v(Q); +g.width=v(Q);u&&(a.nScrollFoot.style.width=v(Q));!e&&U&&(q.height=v(s.offsetHeight+b));c=p.outerWidth();m[0].style.width=v(c);i.width=v(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(n[0].style.width=v(c),t[0].style.width=v(c),t[0].style[e]=d?b+"px":"0px");p.children("colgroup").insertBefore(p.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function I(a,b,c){for(var d=0,e=0, +f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Fa(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=ma(a,"bVisible"),m=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,n,o,p=a.oBrowser,d=p.bScrollOversize;(n=b.style.width)&&-1!==n.indexOf("%")&&(l=n);for(n=0;n<i.length;n++)o=c[i[n]],null!==o.sWidth&&(o.sWidth=Eb(o.sWidthOrig,k),t=!0);if(d|| +!t&&!f&&!e&&j==V(a)&&j==m.length)for(n=0;n<j;n++)i=aa(a,n),null!==i&&(c[i].sWidth=v(m.eq(n).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");m=ra(a,j.find("thead")[0]);for(n=0;n<i.length;n++)o=c[i[n]],m[n].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?v(o.sWidthOrig): +"",o.sWidthOrig&&f&&h(m[n]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(n=0;n<i.length;n++)t=i[n],o=c[t],h(Fb(a,t)).clone(!1).append(o.sContentPadding).appendTo(s);h("[name]",j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth): +l&&j.width(l);for(n=e=0;n<i.length;n++)k=h(m[n]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(m[n].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[n]].sWidth=v(k-g);b.style.width=v(e);o.remove()}l&&(b.style.width=v(l));if((l||f)&&!a._reszEvt)b=function(){h(E).on("resize.DT-"+a.sInstance,Oa(function(){$(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function Eb(a,b){if(!a)return 0;var c=h("<div/>").css("width",v(a)).appendTo(b||H.body),d=c[0].offsetWidth;c.remove();return d}function Fb(a, +b){var c=Gb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Gb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(Yb,""),c=c.replace(/ /g," "),c.length>d&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function X(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var m=[];f=function(a){a.length&& +!h.isArray(a[0])?m.push(a):h.merge(m,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<m.length;a++){i=m[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||"string",m[a]._idx===k&&(m[a]._idx=h.inArray(m[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:m[a][1],index:m[a]._idx,type:j,formatter:n.ext.type.order[j+"-pre"]})}return d}function mb(a){var b,c,d=[],e=n.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Ga(a);h=X(a);b=0;for(c=h.length;b< +c;b++)j=h[b],j.formatter&&g++,Hb(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,n=f[b]._aSortData;for(g=0;g<i;g++)if(j=h[g],c=k[j.col],e=n[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,n=f[a]._aSortData,o=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=n[i.col],g=o[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir], +c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Ib(a){for(var b,c,d=a.aoColumns,e=X(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Va(a, +b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);T(a);"function"== +typeof d&&d(a)}function Ma(a,b,c,d){var e=a.aoColumns[c];Wa(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Va(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Va(a,c,b.shiftKey,d))})}function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=X(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(D(a.aoData,"anCells",g)).addClass(c+ +(2>e?e+1:3))}a.aLastSort=d}function Hb(a,b){var c=a.aoColumns[b],d=n.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,ba(a,b)));for(var f,g=n.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:Ab(a.oPreviousSearch), +columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Ab(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Jb(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&& +(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==k&&h.extend(a.oPreviousSearch,Bb(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Bb(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g= +a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=n.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function K(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+" - ":"")+c;d&&(c+=". For more information about this error, please see http://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=n.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"== +typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Xa(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Wa(a,b,c){h(a).on("click.DT",b,function(b){h(a).blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT", +function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Sa(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Na(a,b){var c=a.renderer,d=n.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"=== +typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ia(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=Y(0,b):a<=d?(c=Y(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=Y(b-(c-2),b):(c=Y(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function Da(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Ya)},"html-num":function(b){return za(b, +a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Ya)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=[ya(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[a].apply(this,b)}}var n=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)}; +this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&la(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a, +b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data(): +c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]}; +this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[x.iApiIndex])};this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust(); +(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in n.ext.internal)e&&(this[e]=Lb(e));this.each(function(){var e={},g=1<d?Xa(e,a,!0):a,j=0,i,e=this.getAttribute("id"),m=!1,l=n.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())K(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{eb(l);fb(l.column);J(l,l,!0);J(l.column,l.column,!0);J(l,h.extend(g,q.data()));var t=n.settings, +j=0;for(i=t.length;j<i;j++){var o=t[j];if(o.nTable==this||o.nTHead&&o.nTHead.parentNode==this||o.nTFoot&&o.nTFoot.parentNode==this){var s=g.bRetrieve!==k?g.bRetrieve:l.bRetrieve;if(c||s)return o.oInstance;if(g.bDestroy!==k?g.bDestroy:l.bDestroy){o.oInstance.fnDestroy();break}else{K(o,0,"Cannot reinitialise DataTable",3);return}}if(o.sTableId==this.id){t.splice(j,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+n.ext._unique++;var p=h.extend(!0,{},n.models.oSettings,{sDestroyWidth:q[0].style.width, +sInstance:e,sTableId:e});p.nTable=this;p.oApi=b.internal;p.oInit=g;t.push(p);p.oInstance=1===b.length?b:q.dataTable();eb(g);Ca(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=h.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);g=Xa(h.extend(!0,{},l),g);F(p.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));F(p,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod", +"aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);F(p.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(p.oLanguage,g,"fnInfoCallback"); +z(p,"aoDrawCallback",g.fnDrawCallback,"user");z(p,"aoServerParams",g.fnServerParams,"user");z(p,"aoStateSaveParams",g.fnStateSaveParams,"user");z(p,"aoStateLoadParams",g.fnStateLoadParams,"user");z(p,"aoStateLoaded",g.fnStateLoaded,"user");z(p,"aoRowCallback",g.fnRowCallback,"user");z(p,"aoRowCreatedCallback",g.fnCreatedRow,"user");z(p,"aoHeaderCallback",g.fnHeaderCallback,"user");z(p,"aoFooterCallback",g.fnFooterCallback,"user");z(p,"aoInitComplete",g.fnInitComplete,"user");z(p,"aoPreDrawCallback", +g.fnPreDrawCallback,"user");p.rowIdFn=S(g.rowId);gb(p);var u=p.oClasses;h.extend(u,n.ext.classes,g.oClasses);q.addClass(u.sTable);p.iInitDisplayStart===k&&(p.iInitDisplayStart=g.iDisplayStart,p._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(p.bDeferLoading=!0,e=h.isArray(g.iDeferLoading),p._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,p._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var v=p.oLanguage;h.extend(!0,v,g.oLanguage);v.sUrl&&(h.ajax({dataType:"json",url:v.sUrl,success:function(a){Ca(a); +J(l.oLanguage,a);h.extend(true,v,a);ha(p)},error:function(){ha(p)}}),m=!0);null===g.asStripeClasses&&(p.asStripeClasses=[u.sStripeOdd,u.sStripeEven]);var e=p.asStripeClasses,x=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(e,function(a){return x.hasClass(a)}))&&(h("tbody tr",this).removeClass(e.join(" ")),p.asDestroyStripes=e.slice());e=[];t=this.getElementsByTagName("thead");0!==t.length&&(ea(p.aoHeader,t[0]),e=ra(p));if(null===g.aoColumns){t=[];j=0;for(i=e.length;j<i;j++)t.push(null)}else t= +g.aoColumns;j=0;for(i=t.length;j<i;j++)Ea(p,e?e[j]:null);ib(p,g.aoColumnDefs,t,function(a,b){ka(p,a,b)});if(x.length){var w=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(x[0]).children("th, td").each(function(a,b){var c=p.aoColumns[a];if(c.mData===a){var d=w(b,"sort")||w(b,"order"),e=w(b,"filter")||w(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ka(p,a)}}})}var U=p.oFeatures, +e=function(){if(g.aaSorting===k){var a=p.aaSorting;j=0;for(i=a.length;j<i;j++)a[j][1]=p.aoColumns[j].asSorting[0]}wa(p);U.bSort&&z(p,"aoDrawCallback",function(){if(p.bSorted){var a=X(p),b={};h.each(a,function(a,c){b[c.src]=c.dir});r(p,null,"order",[p,a,b]);Ib(p)}});z(p,"aoDrawCallback",function(){(p.bSorted||y(p)==="ssp"||U.bDeferRender)&&wa(p)},"sc");var a=q.children("caption").each(function(){this._captionSide=h(this).css("caption-side")}),b=q.children("thead");b.length===0&&(b=h("<thead/>").appendTo(q)); +p.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("<tbody/>").appendTo(q));p.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(p.oScroll.sX!==""||p.oScroll.sY!==""))b=h("<tfoot/>").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);else if(b.length>0){p.nTFoot=b[0];ea(p.aoFooter,p.nTFoot)}if(g.aaData)for(j=0;j<g.aaData.length;j++)O(p,g.aaData[j]);else(p.bDeferLoading||y(p)=="dom")&&na(p,h(p.nTBody).children("tr"));p.aiDisplay=p.aiDisplayMaster.slice(); +p.bInitialised=true;m===false&&ha(p)};g.bStateSave?(U.bStateSave=!0,z(p,"aoDrawCallback",xa,"state_save"),Jb(p,g,e)):e()}});b=null;return this},x,s,o,u,Za={},Mb=/[\r\n]/g,Aa=/<.*?>/g,Zb=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,$b=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),Ya=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,M=function(a){return!a||!0===a||"-"===a?!0:!1},Nb=function(a){var b=parseInt(a,10);return!isNaN(b)&& +isFinite(a)?b:null},Ob=function(a,b){Za[b]||(Za[b]=RegExp(Qa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Za[b],"."):a},$a=function(a,b,c){var d="string"===typeof a;if(M(a))return!0;b&&d&&(a=Ob(a,b));c&&d&&(a=a.replace(Ya,""));return!isNaN(parseFloat(a))&&isFinite(a)},Pb=function(a,b,c){return M(a)?!0:!(M(a)||"string"===typeof a)?null:$a(a.replace(Aa,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e< +f;e++)a[e]&&d.push(a[e][b]);return d},ja=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},Y=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Qb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);return b},qa=function(a){var b;a:{if(!(2>a.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice(); +b=[];var e=a.length,f,g=0,d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b};n.util={throttle:function(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}},escapeRegex:function(a){return a.replace($b,"\\$1")}};var A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ca=/\[.*?\]$/,W=/\(\)$/,Qa=n.util.escapeRegex,va=h("<div>")[0],Wb=va.textContent!==k,Yb= +/<.*?>/g,Oa=n.util.throttle,Rb=[],w=Array.prototype,ac=function(a){var b,c,d=n.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};s=function(a,b){if(!(this instanceof +s))return new s(a,b);var c=[],d=function(a){(a=ac(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=qa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};s.extend(this,this,Rb)};n.Api=s;h.extend(s.prototype,{any:function(){return 0!==this.count()},concat:w.concat,context:[],count:function(){return this.flatten().length},each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b= +this.context;return b.length>a?new s(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new s(this.context,b)},flatten:function(){var a=[];return new s(this.context,a.concat.apply(a,this.toArray()))},join:w.join,indexOf:w.indexOf||function(a,b){for(var c=b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,j,h,m,l=this.context, +n,o,u=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(j=l.length;g<j;g++){var r=new s(l[g]);if("table"===b)f=c.call(r,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(r,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){o=this[g];"column-rows"===b&&(n=Ba(l[g],u.opts));h=0;for(m=o.length;h<m;h++)f=o[h],f="cell"===b?c.call(r,l[g],f.row,f.column,g,h):c.call(r,l[g],f,g,h,n),f!==k&&e.push(f)}}return e.length||d?(a=new s(l,a? +e.concat.apply([],e):e),b=a.selector,b.rows=u.rows,b.cols=u.cols,b.opts=u.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new s(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return hb(this,a,b,0,this.length, +1)},reduceRight:w.reduceRight||function(a,b){return hb(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,slice:function(){return new s(this.context,this)},sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new s(this.context,qa(this))},unshift:w.unshift});s.extend=function(a,b,c){if(c.length&&b&&(b instanceof s||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d= +b.apply(a,arguments);s.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,s.extend(a,b[f.name],f.propExt)}};s.register=o=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)s.register(a[c],b);else for(var e=a.split("."),f=Rb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var m=f.length;i<m;i++)if(f[i].name===g){i= +f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};s.registerPlural=u=function(a,b,c){s.register(a,c);s.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof s?a.length?h.isArray(a[0])?new s(a.context,a[0]):a[0]:k:a})};o("tables()",function(a){var b;if(a){b=s;var c=this.context;if("number"===typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this, +d);return c[a]}).toArray();b=new b(a)}else b=this;return b});o("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new s(b[0]):a});u("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});u("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});u("tables().header()","table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});u("tables().footer()", +"table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});u("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});o("draw()",function(a){return this.iterator("table",function(b){"page"===a?P(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),T(b,!1===a))})});o("page()",function(a){return a===k?this.page.info().page:this.iterator("table",function(b){Ta(b,a)})});o("page.info()",function(){if(0=== +this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});o("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:k:this.iterator("table",function(b){Ra(b,a)})});var Sb=function(a,b,c){if(c){var d=new s(a); +d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))T(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();sa(a,[],function(c){oa(a);for(var c=ta(a,c),d=0,e=c.length;d<e;d++)O(a,c[d]);T(a,b);C(a,!1)})}};o("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});o("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});o("ajax.reload()",function(a,b){return this.iterator("table",function(c){Sb(c,!1===b,a)})});o("ajax.url()",function(a){var b= +this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});o("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Sb(c,!1===b,a)})});var ab=function(a,b,c,d,e){var f=[],g,j,i,m,l,n;i=typeof b;if(!b||"string"===i||"function"===i||b.length===k)b=[b];i=0;for(m=b.length;i<m;i++){j=b[i]&&b[i].split&&!b[i].match(/[\[\(:]/)?b[i].split(","): +[b[i]];l=0;for(n=j.length;l<n;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=x.selector[a];if(a.length){i=0;for(m=a.length;i<m;i++)f=a[i](d,e,f)}return qa(f)},bb=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},cb=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c, +d,e,f=[],g=a.aiDisplay;e=a.aiDisplayMaster;var j=b.search;c=b.order;d=b.page;if("ssp"==y(a))return"removed"===j?[]:Y(0,e.length);if("current"==d){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==c||"applied"==c)if("none"==j)f=e.slice();else if("applied"==j)f=g.slice();else{if("removed"==j){var i={};c=0;for(d=g.length;c<d;c++)i[g[c]]=null;f=h.map(e,function(a){return!i.hasOwnProperty(a)?a:null})}}else if("index"==c||"original"==c){c=0;for(d=a.aoData.length;c<d;c++)"none"== +j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};o("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=b,f;return ab("row",a,function(a){var b=Nb(a),i=c.aoData;if(b!==null&&!e)return[b];f||(f=Ba(c,e));if(b!==null&&h.inArray(b,f)!==-1)return[b];if(a===null||a===k||a==="")return f;if(typeof a==="function")return h.map(f,function(b){var c=i[b];return a(b,c._aData,c.nTr)?b:null});if(a.nodeName){var b= +a._DT_RowIndex,m=a._DT_CellIndex;if(b!==k)return i[b]&&i[b].nTr===a?[b]:[];if(m)return i[m.row]&&i[m.row].nTr===a?[m.row]:[];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){b=c.aIds[a.replace(/^#/,"")];if(b!==k)return[b.idx]}b=Qb(ja(c.aoData,f,"nTr"));return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});o("rows().nodes()",function(){return this.iterator("row", +function(a,b){return a.aoData[b].nTr||k},1)});o("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ja(a.aoData,b,"_aData")},1)});u("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});u("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){da(b,c,a)})});u("rows().indexes()","row().index()",function(){return this.iterator("row", +function(a,b){return b},1)});u("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new s(c,b)});u("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,m,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(m= +l.length;i<m;i++)l[i]._DT_CellIndex.row=g}pa(b.aiDisplayMaster,c);pa(b.aiDisplay,c);pa(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;Sa(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});o("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(na(b,c)[0]):h.push(O(b,c));return h}, +1),c=this.rows(-1);c.pop();h.merge(c,b);return c});o("row()",function(a,b){return cb(this.rows(a,b))});o("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;var c=b[0].aoData[this[0]];c._aData=a;h.isArray(a)&&c.nTr.id&&N(b[0].rowId)(a,c.nTr.id);da(b[0],this[0],"data");return this});o("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});o("row.add()",function(a){a instanceof h&& +a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&"TR"===a.nodeName.toUpperCase()?na(b,a)[0]:O(b,a)});return this.row(b[0])});var db=function(a,b){var c=a.context;if(c.length&&(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Tb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new s(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"); +0<D(g,"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=V(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&db(f,c)}))}}};o("row().child()",function(a,b){var c= +this.context;if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)db(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=V(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e); +c._detailsShow&&c._details.insertAfter(c.nTr)}return this});o(["row().child.show()","row().child().show()"],function(){Tb(this,!0);return this});o(["row().child.hide()","row().child().hide()"],function(){Tb(this,!1);return this});o(["row().child.remove()","row().child().remove()"],function(){db(this);return this});o("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var bc=/^([^:]+):(name|visIdx|visible)$/,Ub=function(a,b, +c,d,e){for(var c=[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};o("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=bb(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return ab("column",e,function(a){var b=Nb(a);if(a==="")return Y(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Ub(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(bc): +"";if(k)switch(k[2]){case "visIdx":case "visible":b=parseInt(k[1],10);if(b<0){var n=h.map(g,function(a,b){return a.bVisible?b:null});return[n[n.length+b]]}return[aa(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)}, +1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()","column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Ub,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData}, +1)});u("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ja(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ja(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData, +i,m,l;if(a!==k&&g.bVisible!==a){if(a){var n=h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(m=j.length;i<m;i++)l=j[i].nTr,f=j[i].anCells,l&&l.insertBefore(f[c],f[n]||null)}else h(D(b.aoData,"anCells",c)).detach();g.bVisible=a;fa(b,b.aoHeader);fa(b,b.aoFooter);b.aiDisplay.length||h(b.nTBody).find("td[colspan]").attr("colspan",V(b));xa(b)}});a!==k&&(this.iterator("column",function(c,e){r(c,null,"column-visibility",[c,e,a,b])}),(b===k||b)&&this.columns.adjust());return c});u("columns().indexes()","column().index()", +function(a){return this.iterator("column",function(b,c){return"visible"===a?ba(b,c):c},1)});o("columns.adjust()",function(){return this.iterator("table",function(a){$(a)},1)});o("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return aa(c,b);if("fromData"===a||"toVisible"===a)return ba(c,b)}});o("column()",function(a,b){return cb(this.columns(a,b))});o("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null)); +h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=bb(c),f=b.aoData,g=Ba(b,e),j=Qb(ja(f,g,"anCells")),i=h([].concat.apply([],j)),l,m=b.aoColumns.length,n,o,u,s,r,v;return ab("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){n=[];o=0;for(u=g.length;o<u;o++){l=g[o];for(s=0;s<m;s++){r={row:l,column:s};if(c){v=f[l];a(r,B(b,l,s),v.anCells?v.anCells[s]:null)&&n.push(r)}else n.push(r)}}return n}if(h.isPlainObject(a))return a.column!== +k&&a.row!==k&&h.inArray(a.row,g)!==-1?[a]:[];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||!a.nodeName)return c;v=h(a).closest("*[data-dt-row]");return v.length?[{row:v.data("dt-row"),column:v.data("dt-column")}]:[]},b,e)});var d=this.columns(b),e=this.rows(a),f,g,j,i,m;this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(m=d[b].length;i<m;i++)f.push({row:e[b][g],column:d[b][i]})}},1);var l=this.cells(f, +c);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});u("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&a.anCells?a.anCells[c]:k},1)});o("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});u("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});u("cells().render()","cell().render()", +function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});u("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,b,c){return{row:b,column:c,columnVisible:ba(a,c)}},1)});u("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){da(b,c,a,d)})});o("cell()",function(a,b,c){return cb(this.cells(a,b,c))});o("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0], +c[0].row,c[0].column):k;jb(b[0],c[0].row,c[0].column,a);da(b[0],c[0].row,"data",c[0].column);return this});o("order()",function(a,b){var c=this.context;if(a===k)return 0!==c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:a.length&&!h.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});o("order.listener()",function(a,b,c){return this.iterator("table",function(d){Ma(d,a,b,c)})});o("order.fixed()",function(a){if(!a){var b= +this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});o(["columns().order()","column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});o("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&ga(e, +h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});u("columns().search()","column().search()",function(a,b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),ga(e,e.oPreviousSearch,1))})});o("state()",function(){return this.context.length?this.context[0].oSavedState: +null});o("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});o("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null});o("state.save()",function(){return this.iterator("table",function(a){xa(a)})});n.versionCheck=n.fnVersionCheck=function(a){for(var b=n.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};n.isDataTable= +n.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof n.Api)return!0;h.each(n.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};n.tables=n.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(n.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new s(c):c};n.camelToHungarian=J;o("$()",function(a,b){var c= +this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){o(b+"()",function(){var a=Array.prototype.slice.call(arguments);a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});o("clear()",function(){return this.iterator("table",function(a){oa(a)})});o("settings()",function(){return new s(this.context,this.context)});o("init()",function(){var a= +this.context;return a.length?a[0].oInit:null});o("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});o("destroy()",function(a){a=a||!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;r(b,"aoDestroyCallback","destroy",[b]);a||(new s(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT"); +h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));b.aaSorting=[];b.aaSortingFixed=[];wa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable), +(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])}));c=h.inArray(b,n.settings);-1!==c&&n.settings.splice(c,1)})});h.each(["column","row","cell"],function(a,b){o(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,m){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,m)})})});o("i18n()",function(a,b,c){var d=this.context[0],a=S(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]: +a._);return a.replace("%d",c)});n.version="1.10.18";n.settings=[];n.models={};n.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};n.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};n.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null, +sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};n.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1, +bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+ +a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"}, +oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({}, +n.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};Z(n.defaults);n.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null}; +Z(n.defaults.column);n.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[], +aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button", +iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal: +this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};n.ext=x={buttons:{}, +classes:{},build:"ju-1.12.1/jq-3.3.1/dt-1.10.18",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager}); +h.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled", +sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"", +sJUIHeader:"",sJUIFooter:""});var Kb=n.ext.pager;h.extend(Kb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ia(a,b)]},simple_numbers:function(a,b){return["previous",ia(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ia(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ia(a,b),"last"]},_numbers:ia,numbers_length:7});h.extend(!0,n.ext.renderer,{pageButton:{_:function(a,b,c,d,e, +f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},m,l,n=0,o=function(b,d){var k,s,u,r,v=function(b){Ta(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{m=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">…</span>');break;case "first":m=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":m=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":m= +j.sNext;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":m=j.sLast;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:m=r+1;l=e===r?g.sPageButtonActive:""}if(m!==null){u=h("<a>",{"class":g.sPageButton+" "+l,"aria-controls":a.sTableId,"aria-label":i[r],"data-dt-idx":n,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(m).appendTo(b);Wa(u,{action:r},v);n++}}}},s;try{s=h(b).find(H.activeElement).data("dt-idx")}catch(u){}o(h(b).empty(),d);s!==k&&h(b).find("[data-dt-idx="+ +s+"]").focus()}}});h.extend(n.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!Zb.test(a))return null;var b=Date.parse(a);return null!==b&&!isNaN(b)||M(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return $a(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Pb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Pb(a,c,!0)?"html-num-fmt"+c:null},function(a){return M(a)|| +"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(n.ext.type.search,{html:function(a){return M(a)?a:"string"===typeof a?a.replace(Mb," ").replace(Aa,""):""},string:function(a){return M(a)?a:"string"===typeof a?a.replace(Mb," "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Ob(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){a=Date.parse(a);return isNaN(a)?-Infinity:a},"html-pre":function(a){return M(a)? +"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return M(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});Da("");h.extend(!0,n.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc: +c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]== +"asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Vb=function(a){return"string"===typeof a?a.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):a};n.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Vb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g, +a)+f+(e||"")}}},text:function(){return{display:Vb}}};h.extend(n.ext.internal,{_fnExternApiFunc:Lb,_fnBuildAjax:sa,_fnAjaxUpdate:lb,_fnAjaxParameters:ub,_fnAjaxUpdateDraw:vb,_fnAjaxDataSrc:ta,_fnAddColumn:Ea,_fnColumnOptions:ka,_fnAdjustColumnSizing:$,_fnVisibleToColumnIndex:aa,_fnColumnIndexToVisible:ba,_fnVisbleColumns:V,_fnGetColumns:ma,_fnColumnTypes:Ga,_fnApplyColumnDefs:ib,_fnHungarianMap:Z,_fnCamelToHungarian:J,_fnLanguageCompat:Ca,_fnBrowserDetect:gb,_fnAddData:O,_fnAddTr:na,_fnNodeToDataIndex:function(a, +b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:jb,_fnSplitObjNotation:Ja,_fnGetObjectDataFn:S,_fnSetObjectDataFn:N,_fnGetDataMaster:Ka,_fnClearTable:oa,_fnDeleteIndex:pa,_fnInvalidate:da,_fnGetRowElements:Ia,_fnCreateTr:Ha,_fnBuildHead:kb,_fnDrawHead:fa,_fnDraw:P,_fnReDraw:T,_fnAddOptionsHtml:nb,_fnDetectHeader:ea,_fnGetUniqueThs:ra,_fnFeatureHtmlFilter:pb,_fnFilterComplete:ga,_fnFilterCustom:yb, +_fnFilterColumn:xb,_fnFilter:wb,_fnFilterCreateSearch:Pa,_fnEscapeRegex:Qa,_fnFilterData:zb,_fnFeatureHtmlInfo:sb,_fnUpdateInfo:Cb,_fnInfoMacros:Db,_fnInitialise:ha,_fnInitComplete:ua,_fnLengthChange:Ra,_fnFeatureHtmlLength:ob,_fnFeatureHtmlPaginate:tb,_fnPageChange:Ta,_fnFeatureHtmlProcessing:qb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:rb,_fnScrollDraw:la,_fnApplyToChildren:I,_fnCalculateColumnWidths:Fa,_fnThrottle:Oa,_fnConvertToWidth:Eb,_fnGetWidestNode:Fb,_fnGetMaxLenString:Gb,_fnStringToCss:v, +_fnSortFlatten:X,_fnSort:mb,_fnSortAria:Ib,_fnSortListener:Va,_fnSortAttachListener:Ma,_fnSortingClasses:wa,_fnSortData:Hb,_fnSaveState:xa,_fnLoadState:Jb,_fnSettingsFromNode:ya,_fnLog:K,_fnMap:F,_fnBindAction:Wa,_fnCallbackReg:z,_fnCallbackFire:r,_fnLengthOverflow:Sa,_fnRenderer:Na,_fnDataSource:y,_fnRowAttributes:La,_fnExtend:Xa,_fnCalculateEnd:function(){}});h.fn.dataTable=n;n.$=h;h.fn.dataTableSettings=n.settings;h.fn.dataTableExt=n.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()}; +h.each(n,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable}); + + +/*! + DataTables jQuery UI integration + ©2011-2014 SpryMedia Ltd - datatables.net/license +*/ +(function(a){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(b){return a(b,window,document)}):"object"===typeof exports?module.exports=function(b,d){b||(b=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(b,d).$;return a(d,b,b.document)}:a(jQuery,window,document)})(function(a){var b=a.fn.dataTable;a.extend(!0,b.defaults,{dom:'<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-tl ui-corner-tr"lfr>t<"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-bl ui-corner-br"ip>', +renderer:"jqueryui"});a.extend(b.ext.classes,{sWrapper:"dataTables_wrapper dt-jqueryui",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default sorting_asc",sSortDesc:"ui-state-default sorting_desc",sSortable:"ui-state-default sorting",sSortableAsc:"ui-state-default sorting_asc_disabled",sSortableDesc:"ui-state-default sorting_desc_disabled", +sSortableNone:"ui-state-default sorting_disabled",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sHeaderTH:"ui-state-default",sFooterTH:"ui-state-default"});b.ext.renderer.header.jqueryui=function(b,h,e,c){var f="css_right ui-icon ui-icon-caret-2-n-s",g=-1!==a.inArray("asc",e.asSorting),i=-1!==a.inArray("desc",e.asSorting);!e.bSortable||!g&&!i?f="":g&&!i?f="css_right ui-icon ui-icon-caret-1-n":!g&&i&&(f="css_right ui-icon ui-icon-caret-1-s"); +a("<div/>").addClass("DataTables_sort_wrapper").append(h.contents()).append(a("<span/>").addClass(c.sSortIcon+" "+f)).appendTo(h);a(b.nTable).on("order.dt",function(a,g,i,j){b===g&&(a=e.idx,h.removeClass(c.sSortAsc+" "+c.sSortDesc).addClass("asc"==j[a]?c.sSortAsc:"desc"==j[a]?c.sSortDesc:e.sSortingClass),h.find("span."+c.sSortIcon).removeClass("css_right ui-icon ui-icon-triangle-1-n css_right ui-icon ui-icon-triangle-1-s css_right ui-icon ui-icon-caret-2-n-s css_right ui-icon ui-icon-caret-1-n css_right ui-icon ui-icon-caret-1-s").addClass("asc"== +j[a]?"css_right ui-icon ui-icon-triangle-1-n":"desc"==j[a]?"css_right ui-icon ui-icon-triangle-1-s":f))})};b.TableTools&&a.extend(!0,b.TableTools.classes,{container:"DTTT_container ui-buttonset ui-buttonset-multi",buttons:{normal:"DTTT_button ui-button ui-state-default"},collection:{container:"DTTT_collection ui-buttonset ui-buttonset-multi"}});return b}); + + diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 3a8f29d6c0..8871950f3e 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -2721,7 +2721,7 @@ function init_graph(parameter_object) { } window.scale_minimap = 4.2; window.translation = [0, 0]; - window.scale = (typeof (z_dash) != "undefined") ? z_dash : 0.5; + window.scale = z_dash || 0.5; window.node_radius = 40; if (typeof (parameter_object.node_radius) != "undefined") { window.node_radius = parameter_object.node_radius; @@ -3306,7 +3306,7 @@ function draw_elements_graph() { }) .attr("startOffset", function (d) { if (d.source.x < d.target.x) { - return ""; + return "0%"; } else { return "85%"; @@ -3356,7 +3356,7 @@ function draw_elements_graph() { return "85%"; } else { - return ""; + return "0%"; } }) .attr("text-anchor", function (d) { diff --git a/pandora_console/include/javascript/jquery-1.6.1.min.js b/pandora_console/include/javascript/jquery-1.6.1.min.js deleted file mode 100644 index b2ac1747f3..0000000000 --- a/pandora_console/include/javascript/jquery-1.6.1.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * jQuery JavaScript Library v1.6.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu May 12 15:04:36 2011 -0400 - */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c.body.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write("<!doctype><html><body></body></html>");b=cl.createElement(a),cl.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ck)}cj[a]=d}return cj[a]}function cu(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function ct(){cq=b}function cs(){setTimeout(ct,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bF.test(a)?d(a,e):b_(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bU,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bQ),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bD(a,b,c){var d=b==="width"?bx:by,e=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return e;f.each(d,function(){c||(e-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?e+=parseFloat(f.css(a,"margin"+this))||0:e-=parseFloat(f.css(a,"border"+this+"Width"))||0});return e}function bn(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bm(a){f.nodeName(a,"input")?bl(a):a.getElementsByTagName&&f.grep(a.getElementsByTagName("input"),bl)}function bl(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bk(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bj(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bi(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bh(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(S.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function O(a,b){return(a&&a!=="*"?a+".":"")+b.replace(A,"`").replace(B,"&")}function N(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(y,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function L(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function F(){return!0}function E(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?C.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:E?function(a){return a==null?"":E.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?C.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(F)return F.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=D.call(arguments,2),g=function(){return a.apply(c,f.concat(D.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){G["[object "+b+"]"]=b.toLowerCase()}),x=e.uaMatch(w),x.browser&&(e.browser[x.browser]=!0,e.browser.version=x.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?z=function(){c.removeEventListener("DOMContentLoaded",z,!1),e.ready()}:c.attachEvent&&(z=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",z),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};f=c.createElement("select"),g=f.appendChild(c.createElement("option")),h=a.getElementsByTagName("input")[0],j={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},h.checked=!0,j.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,j.optDisabled=!g.disabled;try{delete a.test}catch(s){j.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function b(){j.noCloneEvent=!1,a.detachEvent("onclick",b)}),a.cloneNode(!0).fireEvent("onclick")),h=c.createElement("input"),h.value="t",h.setAttribute("type","radio"),j.radioValue=h.value==="t",h.setAttribute("checked","checked"),a.appendChild(h),k=c.createDocumentFragment(),k.appendChild(a.firstChild),j.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",l=c.createElement("body"),m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(q in m)l.style[q]=m[q];l.appendChild(a),b.insertBefore(l,b.firstChild),j.appendChecked=h.checked,j.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,j.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",n=a.getElementsByTagName("td"),r=n[0].offsetHeight===0,n[0].style.display="",n[1].style.display="none",j.reliableHiddenOffsets=r&&n[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(i=c.createElement("div"),i.style.width="0",i.style.marginRight="0",a.appendChild(i),j.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(i,null)||{marginRight:0}).marginRight,10)||0)===0),l.innerHTML="",b.removeChild(l);if(a.attachEvent)for(q in{submit:1,change:1,focusin:1})p="on"+q,r=p in a,r||(a.setAttribute(p,"return;"),r=typeof a[p]=="function"),j[q+"Bubbles"]=r;return j}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.addClass(a.call(this,b,c.attr("class")||""))});if(a&&typeof a=="string"){var b=(a||"").split(o);for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.nodeType===1)if(!e.className)e.className=a;else{var g=" "+e.className+" ",h=e.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);e.className=f.trim(h)}}}return this},removeClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a=="string"||a===b){var c=(a||"").split(o);for(var d=0,e=this.length;d<e;d++){var g=this[d];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(n," ");for(var i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){var d=f(this);d.toggleClass(a.call(this,c,d.attr("class"),b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c],i||(!t.test(c)||typeof d!="boolean"&&d!==b&&d.toLowerCase()!==c.toLowerCase()?v&&(f.nodeName(a,"form")||u.test(c))&&(i=v):i=w);if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem -)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,O(a.origType,a.selector),f.extend({},a,{handler:N,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,O(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?F:E):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=F;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=F;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=F,this.stopPropagation()},isDefaultPrevented:E,isPropagationStopped:E,isImmediatePropagationStopped:E};var G=function(a){var b=a.relatedTarget;a.type=a.data;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&f.event.handle.apply(this,arguments)}catch(d){}},H=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?H:G,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?H:G)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&L("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&L("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var I,J=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},K=function(c){var d=c.target,e,g;if(!!z.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=J(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:K,beforedeactivate:K,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&K.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&K.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",J(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in I)f.event.add(this,c+".specialChange",I[c]);return z.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return z.test(this.nodeName)}},I=f.event.special.change.filters,I.focus=I.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var M={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||E,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=y.exec(h),k="",j&&(k=j[0],h=h.replace(y,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,M[h]?(a.push(M[h]+k),h=h+k):h=(M[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+O(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+O(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var P=/Until$/,Q=/^(?:parents|prevUntil|prevAll)/,R=/,/,S=/^.[^:#\[\.,]*$/,T=Array.prototype.slice,U=f.expr.match.POS,V={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(X(this,a,!1),"not",a)},filter:function(a){return this.pushStack(X(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=U.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=U.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(W(c[0])||W(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=T.call(arguments);P.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!V[a]?f.unique(e):e,(this.length>1||R.test(d))&&Q.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,_=/<([\w:]+)/,ba=/<tbody/i,bb=/<|&#?\w+;/,bc=/<(?:script|object|embed|option|style)/i,bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Y,""):null;if(typeof a=="string"&&!bc.test(a)&&(f.support.leadingWhitespace||!Z.test(a))&&!bg[(_.exec(a)||["",""])[1].toLowerCase()]){a=a.replace($,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bh(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bn)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bc.test(a[0])&&(f.support.checkClone||!bd.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bj(a,d),e=bk(a),g=bk(d);for(h=0;e[h];++h)bj(e[h],g[h])}if(b){bi(a,d);if(c){e=bk(a),g=bk(d);for(h=0;e[h];++h)bi(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument|| -b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1></$2>");var l=(_.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=ba.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Z.test(k)&&o.insertBefore(b.createTextNode(Z.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bm(k[i]);else bm(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bo=/alpha\([^)]*\)/i,bp=/opacity=([^)]*)/,bq=/-([a-z])/ig,br=/([A-Z]|^ms)/g,bs=/^-?\d+(?:px)?$/i,bt=/^-?\d/,bu=/^[+\-]=/,bv=/[^+\-\.\de]+/g,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB,bC=function(a,b){return b.toUpperCase()};f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,widows:!0,orphans:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bu.test(d)&&(d=+d.replace(bv,"")+parseFloat(f.css(a,c))),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bq,bC)}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){a.offsetWidth!==0?e=bD(a,b,d):f.swap(a,bw,function(){e=bD(a,b,d)});if(e<=0){e=bz(a,b,b),e==="0px"&&bB&&(e=bB(a,b,b));if(e!=null)return e===""||e==="auto"?"0px":e}if(e<0||e==null){e=a.style[b];return e===""||e==="auto"?"0px":e}return typeof e=="string"?e:e+"px"}},set:function(a,b){if(!bs.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bp.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bo.test(g)?g.replace(bo,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,c){var d,e,g;c=c.replace(br,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bs.test(d)&&bt.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bE=/%20/g,bF=/\[\]$/,bG=/\r?\n/g,bH=/#.*$/,bI=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bJ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bL=/^(?:GET|HEAD)$/,bM=/^\/\//,bN=/\?/,bO=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bP=/^(?:select|textarea)/i,bQ=/\s+/,bR=/([?&])_=[^&]*/,bS=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bT=f.fn.load,bU={},bV={},bW,bX;try{bW=e.href}catch(bY){bW=c.createElement("a"),bW.href="",bW=bW.href}bX=bS.exec(bW.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bT)return bT.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bO,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bP.test(this.nodeName)||bJ.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bG,"\r\n")}}):{name:b.name,value:c.replace(bG,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bW,isLocal:bK.test(bX[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bZ(bU),ajaxTransport:bZ(bV),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?ca(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=cb(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bI.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bH,"").replace(bM,bX[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bQ),d.crossDomain==null&&(r=bS.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bX[1]&&r[2]==bX[2]&&(r[3]||(r[1]==="http:"?80:443))==(bX[3]||(bX[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bU,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bL.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bN.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bR,"$1_="+x);d.url=y+(y===d.url?(bN.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bV,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bE,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq,cr=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cv(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cm.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=cn.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this),f.isFunction(d.old)&&d.old.call(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cq||cs(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!co&&(cr?(co=1,g=function(){co&&(cr(g),e.tick())},cr(g)):co=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cq||cs(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/pandora_console/include/javascript/jquery-1.7.1.js b/pandora_console/include/javascript/jquery-1.7.1.js deleted file mode 100644 index 8ccd0ea786..0000000000 --- a/pandora_console/include/javascript/jquery-1.7.1.js +++ /dev/null @@ -1,9266 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 - */ -(function( window, undefined ) { - -// Use the correct document accordingly with window argument (sandbox) -var document = window.document, - navigator = window.navigator, - location = window.location; -var jQuery = (function() { - -// Define a local copy of jQuery -var jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // A central reference to the root jQuery(document) - rootjQuery, - - // A simple way to check for HTML strings or ID strings - // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) - quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Matches dashed string for camelizing - rdashAlpha = /-([a-z]|[0-9])/ig, - rmsPrefix = /^-ms-/, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = quickExpr.exec( selector ); - } - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context ? context.ownerDocument || context : document ); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.7.1", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.add( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.fireWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).off( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery.Callbacks( "once memory" ); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { - break; - } - } - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array, i ) { - var len; - - if ( array ) { - if ( indexOf ) { - return indexOf.call( array, elem, i ); - } - - len = array.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in array && array[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - if ( typeof context === "string" ) { - var tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - var args = slice.call( arguments, 2 ), - proxy = function() { - return fn.apply( context, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can optionally be executed if it's a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -return jQuery; - -})(); - - -// String to Object flags format cache -var flagsCache = {}; - -// Convert String-formatted flags into Object-formatted ones and store in cache -function createFlags( flags ) { - var object = flagsCache[ flags ] = {}, - i, length; - flags = flags.split( /\s+/ ); - for ( i = 0, length = flags.length; i < length; i++ ) { - object[ flags[i] ] = true; - } - return object; -} - -/* - * Create a callback list using the following parameters: - * - * flags: an optional list of space-separated flags that will change how - * the callback list behaves - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible flags: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( flags ) { - - // Convert flags from String-formatted to Object-formatted - // (we check in cache first) - flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; - - var // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = [], - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Add one or several callbacks to the list - add = function( args ) { - var i, - length, - elem, - type, - actual; - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - // Inspect recursively - add( elem ); - } else if ( type === "function" ) { - // Add if not in unique mode and callback is not in - if ( !flags.unique || !self.has( elem ) ) { - list.push( elem ); - } - } - } - }, - // Fire callbacks - fire = function( context, args ) { - args = args || []; - memory = !flags.memory || [ context, args ]; - firing = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { - memory = true; // Mark as halted - break; - } - } - firing = false; - if ( list ) { - if ( !flags.once ) { - if ( stack && stack.length ) { - memory = stack.shift(); - self.fireWith( memory[ 0 ], memory[ 1 ] ); - } - } else if ( memory === true ) { - self.disable(); - } else { - list = []; - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - var length = list.length; - add( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away, unless previous - // firing was halted (stopOnFalse) - } else if ( memory && memory !== true ) { - firingStart = length; - fire( memory[ 0 ], memory[ 1 ] ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - var args = arguments, - argIndex = 0, - argLength = args.length; - for ( ; argIndex < argLength ; argIndex++ ) { - for ( var i = 0; i < list.length; i++ ) { - if ( args[ argIndex ] === list[ i ] ) { - // Handle firingIndex and firingLength - if ( firing ) { - if ( i <= firingLength ) { - firingLength--; - if ( i <= firingIndex ) { - firingIndex--; - } - } - } - // Remove the element - list.splice( i--, 1 ); - // If we have some unicity property then - // we only need to do this once - if ( flags.unique ) { - break; - } - } - } - } - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - if ( list ) { - var i = 0, - length = list.length; - for ( ; i < length; i++ ) { - if ( fn === list[ i ] ) { - return true; - } - } - } - return false; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory || memory === true ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( stack ) { - if ( firing ) { - if ( !flags.once ) { - stack.push( [ context, args ] ); - } - } else if ( !( flags.once && memory ) ) { - fire( context, args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!memory; - } - }; - - return self; -}; - - - - -var // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - - Deferred: function( func ) { - var doneList = jQuery.Callbacks( "once memory" ), - failList = jQuery.Callbacks( "once memory" ), - progressList = jQuery.Callbacks( "memory" ), - state = "pending", - lists = { - resolve: doneList, - reject: failList, - notify: progressList - }, - promise = { - done: doneList.add, - fail: failList.add, - progress: progressList.add, - - state: function() { - return state; - }, - - // Deprecated - isResolved: doneList.fired, - isRejected: failList.fired, - - then: function( doneCallbacks, failCallbacks, progressCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); - return this; - }, - always: function() { - deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); - return this; - }, - pipe: function( fnDone, fnFail, fnProgress ) { - return jQuery.Deferred(function( newDefer ) { - jQuery.each( { - done: [ fnDone, "resolve" ], - fail: [ fnFail, "reject" ], - progress: [ fnProgress, "notify" ] - }, function( handler, data ) { - var fn = data[ 0 ], - action = data[ 1 ], - returned; - if ( jQuery.isFunction( fn ) ) { - deferred[ handler ](function() { - returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - }); - } else { - deferred[ handler ]( newDefer[ action ] ); - } - }); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - obj = promise; - } else { - for ( var key in promise ) { - obj[ key ] = promise[ key ]; - } - } - return obj; - } - }, - deferred = promise.promise({}), - key; - - for ( key in lists ) { - deferred[ key ] = lists[ key ].fire; - deferred[ key + "With" ] = lists[ key ].fireWith; - } - - // Handle state - deferred.done( function() { - state = "resolved"; - }, failList.disable, progressList.lock ).fail( function() { - state = "rejected"; - }, doneList.disable, progressList.lock ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = sliceDeferred.call( arguments, 0 ), - i = 0, - length = args.length, - pValues = new Array( length ), - count = length, - pCount = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(), - promise = deferred.promise(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - deferred.resolveWith( deferred, args ); - } - }; - } - function progressFunc( i ) { - return function( value ) { - pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - deferred.notifyWith( promise, pValues ); - }; - } - if ( length > 1 ) { - for ( ; i < length; i++ ) { - if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return promise; - } -}); - - - - -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - marginDiv, - fragment, - tds, - events, - eventName, - i, - isSupported, - div = document.createElement( "div" ), - documentElement = document.documentElement; - - // Preliminary tests - div.setAttribute("className", "t"); - div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; - - all = div.getElementsByTagName( "*" ); - a = div.getElementsByTagName( "a" )[ 0 ]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement( "select" ); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName( "input" )[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent( "onclick" ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - - input.setAttribute("checked", "checked"); - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - div.innerHTML = ""; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( window.getComputedStyle ) { - marginDiv = document.createElement( "div" ); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.style.width = "2px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; - } - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for( i in { - submit: 1, - change: 1, - focusin: 1 - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - fragment.removeChild( div ); - - // Null elements to avoid leaks in IE - fragment = select = opt = marginDiv = div = input = null; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, outer, inner, table, td, offsetSupport, - conMarginTop, ptlm, vb, style, html, - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - conMarginTop = 1; - ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;"; - vb = "visibility:hidden;border:0;"; - style = "style='" + ptlm + "border:5px solid #000;padding:0;'"; - html = "<div " + style + "><div></div></div>" + - "<table " + style + " cellpadding='0' cellspacing='0'>" + - "<tr><td></td></tr></table>"; - - container = document.createElement("div"); - container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"; - tds = div.getElementsByTagName( "td" ); - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Figure out if the W3C box model works as expected - div.innerHTML = ""; - div.style.width = div.style.paddingLeft = "1px"; - jQuery.boxModel = support.boxModel = div.offsetWidth === 2; - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "<div style='width:4px;'></div>"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); - } - - div.style.cssText = ptlm + vb; - div.innerHTML = html; - - outer = div.firstChild; - inner = outer.firstChild; - td = outer.nextSibling.firstChild.firstChild; - - offsetSupport = { - doesNotAddBorder: ( inner.offsetTop !== 5 ), - doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) - }; - - inner.style.position = "fixed"; - inner.style.top = "20px"; - - // safari subtracts parent border width here which is 5px - offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); - inner.style.position = inner.style.top = ""; - - outer.style.overflow = "hidden"; - outer.style.position = "relative"; - - offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); - offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); - - body.removeChild( container ); - div = container = null; - - jQuery.extend( support, offsetSupport ); - }); - - return support; -})(); - - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var privateCache, thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, - isEvents = name === "events"; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = ++jQuery.uuid; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - privateCache = thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Users should not attempt to inspect the internal events object using jQuery.data, - // it is undocumented and subject to change. But does anyone listen? No. - if ( isEvents && !thisCache[ name ] ) { - return privateCache.events; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - // Reference to internal data cache key - internalKey = jQuery.expando, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ internalKey ] : internalKey; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split( " " ); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - // Ensure that `cache` is not a window object #10080 - if ( jQuery.support.deleteExpando || !cache.setInterval ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the cache and need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ internalKey ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - } else { - elem[ internalKey ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, attr, name, - data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - data = jQuery.data( this[0] ); - - if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { - attr = this[0].attributes; - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( this[0], name, data[ name ] ); - } - } - jQuery._data( this[0], "parsedAttrs", true ); - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var self = jQuery( this ), - args = [ parts[0], value ]; - - self.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - jQuery.isNumeric( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -function handleQueueMarkDefer( elem, type, src ) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery._data( elem, deferDataKey ); - if ( defer && - ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && - ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { - // Give room for hard-coded callbacks to fire first - // and eventually mark/queue something else on the element - setTimeout( function() { - if ( !jQuery._data( elem, queueDataKey ) && - !jQuery._data( elem, markDataKey ) ) { - jQuery.removeData( elem, deferDataKey, true ); - defer.fire(); - } - }, 0 ); - } -} - -jQuery.extend({ - - _mark: function( elem, type ) { - if ( elem ) { - type = ( type || "fx" ) + "mark"; - jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); - } - }, - - _unmark: function( force, elem, type ) { - if ( force !== true ) { - type = elem; - elem = force; - force = false; - } - if ( elem ) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); - if ( count ) { - jQuery._data( elem, key, count ); - } else { - jQuery.removeData( elem, key, true ); - handleQueueMarkDefer( elem, type, "mark" ); - } - } - }, - - queue: function( elem, type, data ) { - var q; - if ( elem ) { - type = ( type || "fx" ) + "queue"; - q = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !q || jQuery.isArray(data) ) { - q = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - q.push( data ); - } - } - return q || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - hooks = {}; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - jQuery._data( elem, type + ".run", hooks ); - fn.call( elem, function() { - jQuery.dequeue( elem, type ); - }, hooks ); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue " + type + ".run", true ); - handleQueueMarkDefer( elem, type, "queue" ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function() { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, object ) { - if ( typeof type !== "string" ) { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - } - while( i-- ) { - if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || - ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || - jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && - jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { - count++; - tmp.add( resolve ); - } - } - resolve(); - return defer.promise(); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - nodeHook, boolHook, fixSpecified; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.prop ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classNames, i, l, elem, className, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - classNames = ( value || "" ).split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - className = (" " + elem.className + " ").replace( rclass, " " ); - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[ c ] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var self = jQuery(this), val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, l, - i = 0; - - if ( value && elem.nodeType === 1 ) { - attrNames = value.toLowerCase().split( rspace ); - l = attrNames.length; - - for ( ; i < l; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - - // See #9699 for explanation of this approach (setting first, then removal) - jQuery.attr( elem, name, "" ); - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( rboolean.test( name ) && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) -jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? - ret.nodeValue : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.nodeValue = value + "" ); - } - }; - - // Apply the nodeHook to tabindex - jQuery.attrHooks.tabindex.set = nodeHook.set; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = "" + value ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); - - - - -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, - rhoverHack = /\bhover(\.\S+)?\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, - quickParse = function( selector ) { - var quick = rquickIs.exec( selector ); - if ( quick ) { - // 0 1 2 3 - // [ _, tag, id, class ] - quick[1] = ( quick[1] || "" ).toLowerCase(); - quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); - } - return quick; - }, - quickIs = function( elem, m ) { - var attrs = elem.attributes || {}; - return ( - (!m[1] || elem.nodeName.toLowerCase() === m[1]) && - (!m[2] || (attrs.id || {}).value === m[2]) && - (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) - ); - }, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, quick, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - quick: quickParse( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - t, tns, type, origType, namespaces, origCount, - j, events, special, handle, eventType, handleObj; - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, [ "events", "handle" ], true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var type = event.type || event, - namespaces = [], - cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - old = null; - for ( ; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old && old === elem.ownerDocument ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = [].slice.call( arguments, 0 ), - run_all = !event.exclusive && !event.namespace, - handlerQueue = [], - i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Determine handlers that should run if there are delegated events - // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { - - // Pregenerate a single jQuery object for reuse with .is() - jqcur = jQuery(this); - jqcur.context = this.ownerDocument || this; - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - selMatch = {}; - matches = []; - jqcur[0] = cur; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = ( - handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) - ); - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) - if ( event.metaKey === undefined ) { - event.metaKey = event.ctrlKey; - } - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady - }, - - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector, - ret; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !form._submit_attached ) { - jQuery.event.add( form, "submit._submit", function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - }); - form._submit_attached = true; - } - }); - // return undefined since we don't need an event listener - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - jQuery.event.simulate( "change", this, event, true ); - } - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - elem._change_attached = true; - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on.call( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - var handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( var type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); - - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - expando = "sizcache" + (Math.random() + '').replace('.', ''), - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rReturn = /\r\n/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context, seed ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set, seed ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set, i, len, match, type, left; - - if ( !expr ) { - return []; - } - - for ( i = 0, len = Expr.order.length; i < len; i++ ) { - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - type, found, item, filter, left, - i, pass, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - filter = Expr.filter[ type ]; - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - pass = not ^ found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Utility function for retreiving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -var getText = Sizzle.getText = function( elem ) { - var i, node, - nodeType = elem.nodeType, - ret = ""; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 ) { - // Use textContent || innerText for elements - if ( typeof elem.textContent === 'string' ) { - return elem.textContent; - } else if ( typeof elem.innerText === 'string' ) { - // Replace IE's carriage returns - return elem.innerText.replace( rReturn, '' ); - } else { - // Traverse it's children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - } else { - - // If no nodeType, this is expected to be an array - for ( i = 0; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - if ( node.nodeType !== 8 ) { - ret += getText( node ); - } - } - } - return ret; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var first, last, - doneName, parent, cache, - count, diff, - type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - first = match[2]; - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - doneName = match[0]; - parent = elem.parentNode; - - if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { - count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent[ expando ] = doneName; - } - - diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Sizzle.attr ? - Sizzle.attr( elem, name ) : - Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - !type && Sizzle.attr ? - result != null : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = "<a name='" + id + "'/>"; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = "<a href='#'></a>"; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "<p class='TEST'></p>"; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "<div class='test e'></div><div class='test'></div>"; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem[ expando ] === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem[ expando ] = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context, seed ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet, seed ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -Sizzle.selectors.attrMap = {}; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var self = this, - i, l; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - var ret = this.pushStack( "", "find", selector ), - length, n, r; - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - POS.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - // Array (deprecated as of jQuery 1.7) - if ( jQuery.isArray( selectors ) ) { - var level = 1; - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( i = 0; i < selectors.length; i++ ) { - - if ( jQuery( cur ).is( selectors[ i ] ) ) { - ret.push({ selector: selectors[ i ], elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - - return ret; - } - - // String - var pos = POS.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} - - - - -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /<tbody/i, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style)/i, - rnocache = /<(?:script|object|embed|option|style)/i, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"), - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/, - wrapMap = { - option: [ 1, "<select multiple='multiple'>", "</select>" ], - legend: [ 1, "<fieldset>", "</fieldset>" ], - thead: [ 1, "<table>", "</table>" ], - tr: [ 2, "<table><tbody>", "</tbody></table>" ], - td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], - area: [ 1, "<map>", "</map>" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize <link> and <script> tags normally -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "div<div>", "</div>" ]; -} - -jQuery.fn.extend({ - text: function( text ) { - if ( jQuery.isFunction(text) ) { - return this.each(function(i) { - var self = jQuery( this ); - - self.text( text.call(this, i, self.text()) ); - }); - } - - if ( typeof text !== "object" && text !== undefined ) { - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - } - - return jQuery.text( this ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( this[0] && this[0].parentNode ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } else if ( arguments.length ) { - var set = jQuery.clean( arguments ); - set.push.apply( set, this.toArray() ); - return this.pushStack( set, "before", arguments ); - } - }, - - after: function() { - if ( this[0] && this[0].parentNode ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } else if ( arguments.length ) { - var set = this.pushStack( this, "after", arguments ); - set.push.apply( set, jQuery.clean(arguments) ); - return set; - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - if ( value === undefined ) { - return this[0] && this[0].nodeType === 1 ? - this[0].innerHTML.replace(rinlinejQuery, "") : - null; - - // See if we can take a shortcut and just use innerHTML - } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && - !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { - - value = value.replace(rxhtmlTag, "<$1></$2>"); - - try { - for ( var i = 0, l = this.length; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - if ( this[i].nodeType === 1 ) { - jQuery.cleanData( this[i].getElementsByTagName("*") ); - this[i].innerHTML = value; - } - } - - // If using innerHTML throws an exception, use the fallback method - } catch(e) { - this.empty().append( value ); - } - - } else if ( jQuery.isFunction( value ) ) { - this.each(function(i){ - var self = jQuery( this ); - - self.html( value.call(this, i, self.html()) ); - }); - - } else { - this.empty().append( value ); - } - - return this; - }, - - replaceWith: function( value ) { - if ( this[0] && this[0].parentNode ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } else { - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - } - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - var results, first, fragment, parent, - value = args[0], - scripts = []; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback, true ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call(this, i, table ? self.html() : undefined); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - parent = value && value.parentNode; - - // If we're in a fragment, just use that instead of building a new one - if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { - results = { fragment: parent }; - - } else { - results = jQuery.buildFragment( args, this, scripts ); - } - - fragment = results.fragment; - - if ( fragment.childNodes.length === 1 ) { - first = fragment = fragment.firstChild; - } else { - first = fragment.firstChild; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) { - callback.call( - table ? - root(this[i], first) : - this[i], - // Make sure that we do not leak memory by inadvertently discarding - // the original fragment (which might have attached data) instead of - // using it; in addition, use the original fragment object for the last - // item instead of first because it can end up being emptied incorrectly - // in certain situations (Bug #8070). - // Fragments from the fragment cache must always be cloned and never used - // in place. - results.cacheable || ( l > 1 && i < lastIndex ) ? - jQuery.clone( fragment, true, true ) : - fragment - ); - } - } - - if ( scripts.length ) { - jQuery.each( scripts, evalScript ); - } - } - - return this; - } -}); - -function root( elem, cur ) { - return jQuery.nodeName(elem, "table") ? - (elem.getElementsByTagName("tbody")[0] || - elem.appendChild(elem.ownerDocument.createElement("tbody"))) : - elem; -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 fail to clone children inside object elements that use - // the proprietary classid attribute value (rather than the type - // attribute) to identify the type of content to display - if ( nodeName === "object" ) { - dest.outerHTML = src.outerHTML; - - } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - if ( src.checked ) { - dest.defaultChecked = dest.checked = src.checked; - } - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, nodes, scripts ) { - var fragment, cacheable, cacheresults, doc, - first = args[ 0 ]; - - // nodes may contain either an explicit document object, - // a jQuery collection or context object. - // If nodes[0] contains a valid object to assign to doc - if ( nodes && nodes[0] ) { - doc = nodes[0].ownerDocument || nodes[0]; - } - - // Ensure that an attr object doesn't incorrectly stand in as a document object - // Chrome and Firefox seem to allow this to occur and will throw exception - // Fixes #8950 - if ( !doc.createDocumentFragment ) { - doc = document; - } - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - cacheable = true; - - cacheresults = jQuery.fragments[ first ]; - if ( cacheresults && cacheresults !== 1 ) { - fragment = cacheresults; - } - } - - if ( !fragment ) { - fragment = doc.createDocumentFragment(); - jQuery.clean( args, doc, fragment, scripts ); - } - - if ( cacheable ) { - jQuery.fragments[ first ] = cacheresults ? fragment : 1; - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var ret = [], - insert = jQuery( selector ), - parent = this.length === 1 && this[0].parentNode; - - if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { - insert[ original ]( this[0] ); - return this; - - } else { - for ( var i = 0, l = insert.length; i < l; i++ ) { - var elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( elem.type === "checkbox" || elem.type === "radio" ) { - elem.defaultChecked = elem.checked; - } -} -// Finds all inputs and passes them to fixDefaultChecked -function findInputs( elem ) { - var nodeName = ( elem.nodeName || "" ).toLowerCase(); - if ( nodeName === "input" ) { - fixDefaultChecked( elem ); - // Skip scripts, get other children - } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } -} - -// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js -function shimCloneNode( elem ) { - var div = document.createElement( "div" ); - safeFragment.appendChild( div ); - - div.innerHTML = elem.outerHTML; - return div.firstChild; -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - // IE<=8 does not properly clone detached, unknown element nodes - clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ? - elem.cloneNode( true ) : - shimCloneNode( elem ); - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var checkScriptType; - - context = context || document; - - // !context.createElement fails in IE with an error but returns typeof 'object' - if ( typeof context.createElement === "undefined" ) { - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - } - - var ret = [], j; - - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1></$2>"); - - // Trim whitespace, otherwise indexOf won't work as expected - var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(), - wrap = wrapMap[ tag ] || wrapMap._default, - depth = wrap[0], - div = context.createElement("div"); - - // Append wrapper element to unknown element safe doc fragment - if ( context === document ) { - // Use the fragment we've already created for this document - safeFragment.appendChild( div ); - } else { - // Use a fragment created with the owner document - createSafeFragment( context ).appendChild( div ); - } - - // Go to html and back, then peel off extra wrappers - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted <tbody> from table fragments - if ( !jQuery.support.tbody ) { - - // String was a <table>, *may* have spurious <tbody> - var hasBody = rtbody.test(elem), - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare <thead> or <tfoot> - wrap[1] === "<table>" && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - } - } - - // Resets defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - var len; - if ( !jQuery.support.appendChecked ) { - if ( elem[0] && typeof (len = elem.length) === "number" ) { - for ( j = 0; j < len; j++ ) { - findInputs( elem[j] ); - } - } else { - findInputs( elem ); - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - ret = jQuery.merge( ret, elem ); - } - } - - if ( fragment ) { - checkScriptType = function( elem ) { - return !elem.type || rscriptType.test( elem.type ); - }; - for ( i = 0; ret[i]; i++ ) { - if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { - scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); - - } else { - if ( ret[i].nodeType === 1 ) { - var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType ); - - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - } - fragment.appendChild( ret[i] ); - } - } - } - - return ret; - }, - - cleanData: function( elems ) { - var data, id, - cache = jQuery.cache, - special = jQuery.event.special, - deleteExpando = jQuery.support.deleteExpando; - - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { - continue; - } - - id = elem[ jQuery.expando ]; - - if ( id ) { - data = cache[ id ]; - - if ( data && data.events ) { - for ( var type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - - // Null the DOM reference to avoid IE6/7/8 leak (#7054) - if ( data.handle ) { - data.handle.elem = null; - } - } - - if ( deleteExpando ) { - delete elem[ jQuery.expando ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( jQuery.expando ); - } - - delete cache[ id ]; - } - } - } -}); - -function evalScript( i, elem ) { - if ( elem.src ) { - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } -} - - - - -var ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - // fixed for IE9, see #8346 - rupper = /([A-Z]|^ms)/g, - rnumpx = /^-?\d+(?:px)?$/i, - rnum = /^-?\d/, - rrelNum = /^([\-+])=([\-+.\de]+)/, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssWidth = [ "Left", "Right" ], - cssHeight = [ "Top", "Bottom" ], - curCSS, - - getComputedStyle, - currentStyle; - -jQuery.fn.css = function( name, value ) { - // Setting 'undefined' is a no-op - if ( arguments.length === 2 && value === undefined ) { - return this; - } - - return jQuery.access( this, name, value, true, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }); -}; - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity", "opacity" ); - return ret === "" ? "1" : ret; - - } else { - return elem.style.opacity; - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, origName = jQuery.camelCase( name ), - style = elem.style, hooks = jQuery.cssHooks[ origName ]; - - name = jQuery.cssProps[ origName ] || origName; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra ) { - var ret, hooks; - - // Make sure that we're working with the right name - name = jQuery.camelCase( name ); - hooks = jQuery.cssHooks[ name ]; - name = jQuery.cssProps[ name ] || name; - - // cssFloat needs a special treatment - if ( name === "cssFloat" ) { - name = "float"; - } - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) { - return ret; - - // Otherwise, if a way to get the computed value exists, use that - } else if ( curCSS ) { - return curCSS( elem, name ); - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - } -}); - -// DEPRECATED, Use jQuery.css() instead -jQuery.curCSS = jQuery.css; - -jQuery.each(["height", "width"], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - var val; - - if ( computed ) { - if ( elem.offsetWidth !== 0 ) { - return getWH( elem, name, extra ); - } else { - jQuery.swap( elem, cssShow, function() { - val = getWH( elem, name, extra ); - }); - } - - return val; - } - }, - - set: function( elem, value ) { - if ( rnumpx.test( value ) ) { - // ignore negative width and height values #1599 - value = parseFloat( value ); - - if ( value >= 0 ) { - return value + "px"; - } - - } else { - return value; - } - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( parseFloat( RegExp.$1 ) / 100 ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -jQuery(function() { - // This hook cannot be added until DOM ready because the support test - // for it is not run until after DOM ready - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - var ret; - jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - ret = curCSS( elem, "margin-right", "marginRight" ); - } else { - ret = elem.style.marginRight; - } - }); - return ret; - } - }; - } -}); - -if ( document.defaultView && document.defaultView.getComputedStyle ) { - getComputedStyle = function( elem, name ) { - var ret, defaultView, computedStyle; - - name = name.replace( rupper, "-$1" ).toLowerCase(); - - if ( (defaultView = elem.ownerDocument.defaultView) && - (computedStyle = defaultView.getComputedStyle( elem, null )) ) { - ret = computedStyle.getPropertyValue( name ); - if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { - ret = jQuery.style( elem, name ); - } - } - - return ret; - }; -} - -if ( document.documentElement.currentStyle ) { - currentStyle = function( elem, name ) { - var left, rsLeft, uncomputed, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret === null && style && (uncomputed = style[ name ]) ) { - ret = uncomputed; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ( ret || 0 ); - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -curCSS = getComputedStyle || currentStyle; - -function getWH( elem, name, extra ) { - - // Start with offset property - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - which = name === "width" ? cssWidth : cssHeight, - i = 0, - len = which.length; - - if ( val > 0 ) { - if ( extra !== "border" ) { - for ( ; i < len; i++ ) { - if ( !extra ) { - val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; - } - if ( extra === "margin" ) { - val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; - } else { - val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; - } - } - } - - return val + "px"; - } - - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ] || 0; - } - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - - // Add padding, border, margin - if ( extra ) { - for ( ; i < len; i++ ) { - val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; - if ( extra !== "padding" ) { - val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; - } - if ( extra === "margin" ) { - val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; - } - } - } - - return val + "px"; -} - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - var width = elem.offsetWidth, - height = elem.offsetHeight; - - return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - - - - -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, - rselectTextarea = /^(?:select|textarea)/i, - rspacesAjax = /\s+/, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Document location - ajaxLocation, - - // Document location segments - ajaxLocParts, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - if ( jQuery.isFunction( func ) ) { - var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), - i = 0, - length = dataTypes.length, - dataType, - list, - placeBefore; - - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ), - selection; - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.extend({ - load: function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - - // Don't do a request if no elements are being requested - } else if ( !this.length ) { - return this; - } - - var off = url.indexOf( " " ); - if ( off >= 0 ) { - var selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // Default to a GET request - var type = "GET"; - - // If the second parameter was provided - if ( params ) { - // If it's a function - if ( jQuery.isFunction( params ) ) { - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( typeof params === "object" ) { - params = jQuery.param( params, jQuery.ajaxSettings.traditional ); - type = "POST"; - } - } - - var self = this; - - // Request the remote document - jQuery.ajax({ - url: url, - type: type, - dataType: "html", - data: params, - // Complete callback (responseText is used internally) - complete: function( jqXHR, status, responseText ) { - // Store the response as specified by the jqXHR object - responseText = jqXHR.responseText; - // If successful, inject the HTML into all the matched elements - if ( jqXHR.isResolved() ) { - // #4825: Get the actual response in case - // a dataFilter is present in ajaxSettings - jqXHR.done(function( r ) { - responseText = r; - }); - // See if a selector was specified - self.html( selector ? - // Create a dummy div to hold the results - jQuery("<div>") - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append(responseText.replace(rscript, "")) - - // Locate the specified elements - .find(selector) : - - // If not, just inject the full result - responseText ); - } - - if ( callback ) { - self.each( callback, [ responseText, status, jqXHR ] ); - } - } - }); - - return this; - }, - - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // ifModified key - ifModifiedKey, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // The jqXHR state - state = 0, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || "abort"; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - var isSuccess, - success, - error, - statusText = nativeStatusText, - response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined, - lastModified, - etag; - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) { - jQuery.lastModified[ ifModifiedKey ] = lastModified; - } - if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) { - jQuery.etag[ ifModifiedKey ] = etag; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - try { - success = ajaxConvert( s, response ); - statusText = "success"; - isSuccess = true; - } catch(e) { - // We have a parsererror - statusText = "parsererror"; - error = e; - } - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = "" + ( nativeStatusText || statusText ); - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.then( tmp, tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax ); - - // Determine if a cross-domain request is in order - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefiler, stop there - if ( state === 2 ) { - return false; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already - jqXHR.abort(); - return false; - - } - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Serialize an array of form elements or a set of - // key/values into a query string - param: function( a, traditional ) { - var s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : value; - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( var prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); - } -}); - -function buildParams( prefix, obj, traditional, add ) { - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && obj != null && typeof obj === "object" ) { - // Serialize object item. - for ( var name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} - -// This is still on the jQuery object... for now -// Want to move this to jQuery.ajax some day -jQuery.extend({ - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields, - ct, - type, - finalDataType, - firstDataType; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - var dataTypes = s.dataTypes, - converters = {}, - i, - key, - length = dataTypes.length, - tmp, - // Current and previous dataTypes - current = dataTypes[ 0 ], - prev, - // Conversion expression - conversion, - // Conversion function - conv, - // Conversion functions (transitive conversion) - conv1, - conv2; - - // For each dataType in the chain - for ( i = 1; i < length; i++ ) { - - // Create converters map - // with lowercased keys - if ( i === 1 ) { - for ( key in s.converters ) { - if ( typeof key === "string" ) { - converters[ key.toLowerCase() ] = s.converters[ key ]; - } - } - } - - // Get the dataTypes - prev = current; - current = dataTypes[ i ]; - - // If current is auto dataType, update it to prev - if ( current === "*" ) { - current = prev; - // If no auto and dataTypes are actually different - } else if ( prev !== "*" && prev !== current ) { - - // Get the converter - conversion = prev + " " + current; - conv = converters[ conversion ] || converters[ "* " + current ]; - - // If there is no direct converter, search transitively - if ( !conv ) { - conv2 = undefined; - for ( conv1 in converters ) { - tmp = conv1.split( " " ); - if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) { - conv2 = converters[ tmp[1] + " " + current ]; - if ( conv2 ) { - conv1 = converters[ conv1 ]; - if ( conv1 === true ) { - conv = conv2; - } else if ( conv2 === true ) { - conv = conv1; - } - break; - } - } - } - } - // If we found no converter, dispatch an error - if ( !( conv || conv2 ) ) { - jQuery.error( "No conversion from " + conversion.replace(" "," to ") ); - } - // If found converter is not an equivalence - if ( conv !== true ) { - // Convert with 1 or 2 converters accordingly - response = conv ? conv( response ) : conv2( conv1(response) ); - } - } - } - return response; -} - - - - -var jsc = jQuery.now(), - jsre = /(\=)\?(&|$)|\?\?/i; - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - return jQuery.expando + "_" + ( jsc++ ); - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var inspectData = s.contentType === "application/x-www-form-urlencoded" && - ( typeof s.data === "string" ); - - if ( s.dataTypes[ 0 ] === "jsonp" || - s.jsonp !== false && ( jsre.test( s.url ) || - inspectData && jsre.test( s.data ) ) ) { - - var responseContainer, - jsonpCallback = s.jsonpCallback = - jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback, - previous = window[ jsonpCallback ], - url = s.url, - data = s.data, - replace = "$1" + jsonpCallback + "$2"; - - if ( s.jsonp !== false ) { - url = url.replace( jsre, replace ); - if ( s.url === url ) { - if ( inspectData ) { - data = data.replace( jsre, replace ); - } - if ( s.data === data ) { - // Add callback manually - url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback; - } - } - } - - s.url = url; - s.data = data; - - // Install callback - window[ jsonpCallback ] = function( response ) { - responseContainer = [ response ]; - }; - - // Clean-up function - jqXHR.always(function() { - // Set callback back to previous value - window[ jsonpCallback ] = previous; - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( previous ) ) { - window[ jsonpCallback ]( responseContainer[ 0 ] ); - } - }); - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( jsonpCallback + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Delegate to script - return "script"; - } -}); - - - - -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); - - - - -var // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0, - xhrCallbacks; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var xhr = s.xhr(), - handle, - i; - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occured - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - responses.text = xhr.responseText; - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - // if we're in sync mode or it's in cache - // and has been retrieved directly (IE6 & IE7) - // we need to manually fire the callback - if ( !s.async || xhr.readyState === 4 ) { - callback(); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} - - - - -var elemdisplay = {}, - iframe, iframeDoc, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, - timerId, - fxAttrs = [ - // height animations - [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], - // width animations - [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], - // opacity animations - [ "opacity" ] - ], - fxNow; - -jQuery.fn.extend({ - show: function( speed, easing, callback ) { - var elem, display; - - if ( speed || speed === 0 ) { - return this.animate( genFx("show", 3), speed, easing, callback ); - - } else { - for ( var i = 0, j = this.length; i < j; i++ ) { - elem = this[ i ]; - - if ( elem.style ) { - display = elem.style.display; - - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { - display = elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( display === "" && jQuery.css(elem, "display") === "none" ) { - jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( i = 0; i < j; i++ ) { - elem = this[ i ]; - - if ( elem.style ) { - display = elem.style.display; - - if ( display === "" || display === "none" ) { - elem.style.display = jQuery._data( elem, "olddisplay" ) || ""; - } - } - } - - return this; - } - }, - - hide: function( speed, easing, callback ) { - if ( speed || speed === 0 ) { - return this.animate( genFx("hide", 3), speed, easing, callback); - - } else { - var elem, display, - i = 0, - j = this.length; - - for ( ; i < j; i++ ) { - elem = this[i]; - if ( elem.style ) { - display = jQuery.css( elem, "display" ); - - if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of the elements in a second loop - // to avoid the constant reflow - for ( i = 0; i < j; i++ ) { - if ( this[i].style ) { - this[i].style.display = "none"; - } - } - - return this; - } - }, - - // Save the old toggle function - _toggle: jQuery.fn.toggle, - - toggle: function( fn, fn2, callback ) { - var bool = typeof fn === "boolean"; - - if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { - this._toggle.apply( this, arguments ); - - } else if ( fn == null || bool ) { - this.each(function() { - var state = bool ? fn : jQuery(this).is(":hidden"); - jQuery(this)[ state ? "show" : "hide" ](); - }); - - } else { - this.animate(genFx("toggle", 3), fn, fn2, callback); - } - - return this; - }, - - fadeTo: function( speed, to, easing, callback ) { - return this.filter(":hidden").css("opacity", 0).show().end() - .animate({opacity: to}, speed, easing, callback); - }, - - animate: function( prop, speed, easing, callback ) { - var optall = jQuery.speed( speed, easing, callback ); - - if ( jQuery.isEmptyObject( prop ) ) { - return this.each( optall.complete, [ false ] ); - } - - // Do not change referenced properties as per-property easing will be lost - prop = jQuery.extend( {}, prop ); - - function doAnimation() { - // XXX 'this' does not always have a nodeName when running the - // test suite - - if ( optall.queue === false ) { - jQuery._mark( this ); - } - - var opt = jQuery.extend( {}, optall ), - isElement = this.nodeType === 1, - hidden = isElement && jQuery(this).is(":hidden"), - name, val, p, e, - parts, start, end, unit, - method; - - // will store per property easing and be used to determine when an animation is complete - opt.animatedProperties = {}; - - for ( p in prop ) { - - // property name normalization - name = jQuery.camelCase( p ); - if ( p !== name ) { - prop[ name ] = prop[ p ]; - delete prop[ p ]; - } - - val = prop[ name ]; - - // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default) - if ( jQuery.isArray( val ) ) { - opt.animatedProperties[ name ] = val[ 1 ]; - val = prop[ name ] = val[ 0 ]; - } else { - opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing'; - } - - if ( val === "hide" && hidden || val === "show" && !hidden ) { - return opt.complete.call( this ); - } - - if ( isElement && ( name === "height" || name === "width" ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( this, "display" ) === "inline" && - jQuery.css( this, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) { - this.style.display = "inline-block"; - - } else { - this.style.zoom = 1; - } - } - } - } - - if ( opt.overflow != null ) { - this.style.overflow = "hidden"; - } - - for ( p in prop ) { - e = new jQuery.fx( this, opt, p ); - val = prop[ p ]; - - if ( rfxtypes.test( val ) ) { - - // Tracks whether to show or hide based on private - // data attached to the element - method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 ); - if ( method ) { - jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" ); - e[ method ](); - } else { - e[ val ](); - } - - } else { - parts = rfxnum.exec( val ); - start = e.cur(); - - if ( parts ) { - end = parseFloat( parts[2] ); - unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" ) { - jQuery.style( this, p, (end || 1) + unit); - start = ( (end || 1) / e.cur() ) * start; - jQuery.style( this, p, start + unit); - } - - // If a +=/-= token was provided, we're doing a relative animation - if ( parts[1] ) { - end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start; - } - - e.custom( start, end, unit ); - - } else { - e.custom( start, val, "" ); - } - } - } - - // For JS strict compliance - return true; - } - - return optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - - stop: function( type, clearQueue, gotoEnd ) { - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var index, - hadTimers = false, - timers = jQuery.timers, - data = jQuery._data( this ); - - // clear marker counters if we know they won't be - if ( !gotoEnd ) { - jQuery._unmark( true, this ); - } - - function stopQueue( elem, data, index ) { - var hooks = data[ index ]; - jQuery.removeData( elem, index, true ); - hooks.stop( gotoEnd ); - } - - if ( type == null ) { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) { - stopQueue( this, data, index ); - } - } - } else if ( data[ index = type + ".run" ] && data[ index ].stop ){ - stopQueue( this, data, index ); - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - if ( gotoEnd ) { - - // force the next step to be the last - timers[ index ]( true ); - } else { - timers[ index ].saveState(); - } - hadTimers = true; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( !( gotoEnd && hadTimers ) ) { - jQuery.dequeue( this, type ); - } - }); - } - -}); - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout( clearFxNow, 0 ); - return ( fxNow = jQuery.now() ); -} - -function clearFxNow() { - fxNow = undefined; -} - -// Generate parameters to create a standard animation -function genFx( type, num ) { - var obj = {}; - - jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() { - obj[ this ] = type; - }); - - return obj; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx( "show", 1 ), - slideUp: genFx( "hide", 1 ), - slideToggle: genFx( "toggle", 1 ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.extend({ - speed: function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function( noUnmark ) { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } else if ( noUnmark !== false ) { - jQuery._unmark( this ); - } - }; - - return opt; - }, - - easing: { - linear: function( p, n, firstNum, diff ) { - return firstNum + diff * p; - }, - swing: function( p, n, firstNum, diff ) { - return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum; - } - }, - - timers: [], - - fx: function( elem, options, prop ) { - this.options = options; - this.elem = elem; - this.prop = prop; - - options.orig = options.orig || {}; - } - -}); - -jQuery.fx.prototype = { - // Simple function for setting a style value - update: function() { - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this ); - }, - - // Get the current size - cur: function() { - if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) { - return this.elem[ this.prop ]; - } - - var parsed, - r = jQuery.css( this.elem, this.prop ); - // Empty strings, null, undefined and "auto" are converted to 0, - // complex values such as "rotate(1rad)" are returned as is, - // simple values such as "10px" are parsed to Float. - return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed; - }, - - // Start an animation from one number to another - custom: function( from, to, unit ) { - var self = this, - fx = jQuery.fx; - - this.startTime = fxNow || createFxNow(); - this.end = to; - this.now = this.start = from; - this.pos = this.state = 0; - this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" ); - - function t( gotoEnd ) { - return self.step( gotoEnd ); - } - - t.queue = this.options.queue; - t.elem = this.elem; - t.saveState = function() { - if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) { - jQuery._data( self.elem, "fxshow" + self.prop, self.start ); - } - }; - - if ( t() && jQuery.timers.push(t) && !timerId ) { - timerId = setInterval( fx.tick, fx.interval ); - } - }, - - // Simple 'show' function - show: function() { - var dataShow = jQuery._data( this.elem, "fxshow" + this.prop ); - - // Remember where we started, so that we can go back to it later - this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop ); - this.options.show = true; - - // Begin the animation - // Make sure that we start at a small width/height to avoid any flash of content - if ( dataShow !== undefined ) { - // This show is picking up where a previous hide or show left off - this.custom( this.cur(), dataShow ); - } else { - this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() ); - } - - // Start by showing the element - jQuery( this.elem ).show(); - }, - - // Simple 'hide' function - hide: function() { - // Remember where we started, so that we can go back to it later - this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop ); - this.options.hide = true; - - // Begin the animation - this.custom( this.cur(), 0 ); - }, - - // Each step of an animation - step: function( gotoEnd ) { - var p, n, complete, - t = fxNow || createFxNow(), - done = true, - elem = this.elem, - options = this.options; - - if ( gotoEnd || t >= options.duration + this.startTime ) { - this.now = this.end; - this.pos = this.state = 1; - this.update(); - - options.animatedProperties[ this.prop ] = true; - - for ( p in options.animatedProperties ) { - if ( options.animatedProperties[ p ] !== true ) { - done = false; - } - } - - if ( done ) { - // Reset the overflow - if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) { - - jQuery.each( [ "", "X", "Y" ], function( index, value ) { - elem.style[ "overflow" + value ] = options.overflow[ index ]; - }); - } - - // Hide the element if the "hide" operation was done - if ( options.hide ) { - jQuery( elem ).hide(); - } - - // Reset the properties, if the item has been hidden or shown - if ( options.hide || options.show ) { - for ( p in options.animatedProperties ) { - jQuery.style( elem, p, options.orig[ p ] ); - jQuery.removeData( elem, "fxshow" + p, true ); - // Toggle data is no longer needed - jQuery.removeData( elem, "toggle" + p, true ); - } - } - - // Execute the complete function - // in the event that the complete function throws an exception - // we must ensure it won't be called twice. #5684 - - complete = options.complete; - if ( complete ) { - - options.complete = false; - complete.call( elem ); - } - } - - return false; - - } else { - // classical easing cannot be used with an Infinity duration - if ( options.duration == Infinity ) { - this.now = t; - } else { - n = t - this.startTime; - this.state = n / options.duration; - - // Perform the easing function, defaults to swing - this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration ); - this.now = this.start + ( (this.end - this.start) * this.pos ); - } - // Perform the next step of the animation - this.update(); - } - - return true; - } -}; - -jQuery.extend( jQuery.fx, { - tick: function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - }, - - interval: 13, - - stop: function() { - clearInterval( timerId ); - timerId = null; - }, - - speeds: { - slow: 600, - fast: 200, - // Default speed - _default: 400 - }, - - step: { - opacity: function( fx ) { - jQuery.style( fx.elem, "opacity", fx.now ); - }, - - _default: function( fx ) { - if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { - fx.elem.style[ fx.prop ] = fx.now + fx.unit; - } else { - fx.elem[ fx.prop ] = fx.now; - } - } - } -}); - -// Adds width/height step functions -// Do not set anything below 0 -jQuery.each([ "width", "height" ], function( i, prop ) { - jQuery.fx.step[ prop ] = function( fx ) { - jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit ); - }; -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} - -// Try to restore the default display value of an element -function defaultDisplay( nodeName ) { - - if ( !elemdisplay[ nodeName ] ) { - - var body = document.body, - elem = jQuery( "<" + nodeName + ">" ).appendTo( body ), - display = elem.css( "display" ); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // No iframe to use yet, so create it - if ( !iframe ) { - iframe = document.createElement( "iframe" ); - iframe.frameBorder = iframe.width = iframe.height = 0; - } - - body.appendChild( iframe ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" ); - iframeDoc.close(); - } - - elem = iframeDoc.createElement( nodeName ); - - iframeDoc.body.appendChild( elem ); - - display = jQuery.css( elem, "display" ); - body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - } - - return elemdisplay[ nodeName ]; -} - - - - -var rtable = /^t(?:able|d|h)$/i, - rroot = /^(?:body|html)$/i; - -if ( "getBoundingClientRect" in document.documentElement ) { - jQuery.fn.offset = function( options ) { - var elem = this[0], box; - - if ( options ) { - return this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - if ( !elem || !elem.ownerDocument ) { - return null; - } - - if ( elem === elem.ownerDocument.body ) { - return jQuery.offset.bodyOffset( elem ); - } - - try { - box = elem.getBoundingClientRect(); - } catch(e) {} - - var doc = elem.ownerDocument, - docElem = doc.documentElement; - - // Make sure we're not dealing with a disconnected DOM node - if ( !box || !jQuery.contains( docElem, elem ) ) { - return box ? { top: box.top, left: box.left } : { top: 0, left: 0 }; - } - - var body = doc.body, - win = getWindow(doc), - clientTop = docElem.clientTop || body.clientTop || 0, - clientLeft = docElem.clientLeft || body.clientLeft || 0, - scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, - scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, - top = box.top + scrollTop - clientTop, - left = box.left + scrollLeft - clientLeft; - - return { top: top, left: left }; - }; - -} else { - jQuery.fn.offset = function( options ) { - var elem = this[0]; - - if ( options ) { - return this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - if ( !elem || !elem.ownerDocument ) { - return null; - } - - if ( elem === elem.ownerDocument.body ) { - return jQuery.offset.bodyOffset( elem ); - } - - var computedStyle, - offsetParent = elem.offsetParent, - prevOffsetParent = elem, - doc = elem.ownerDocument, - docElem = doc.documentElement, - body = doc.body, - defaultView = doc.defaultView, - prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, - top = elem.offsetTop, - left = elem.offsetLeft; - - while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { - if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { - break; - } - - computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; - top -= elem.scrollTop; - left -= elem.scrollLeft; - - if ( elem === offsetParent ) { - top += elem.offsetTop; - left += elem.offsetLeft; - - if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) { - top += parseFloat( computedStyle.borderTopWidth ) || 0; - left += parseFloat( computedStyle.borderLeftWidth ) || 0; - } - - prevOffsetParent = offsetParent; - offsetParent = elem.offsetParent; - } - - if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { - top += parseFloat( computedStyle.borderTopWidth ) || 0; - left += parseFloat( computedStyle.borderLeftWidth ) || 0; - } - - prevComputedStyle = computedStyle; - } - - if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { - top += body.offsetTop; - left += body.offsetLeft; - } - - if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { - top += Math.max( docElem.scrollTop, body.scrollTop ); - left += Math.max( docElem.scrollLeft, body.scrollLeft ); - } - - return { top: top, left: left }; - }; -} - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return null; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( ["Left", "Top"], function( i, name ) { - var method = "scroll" + name; - - jQuery.fn[ method ] = function( val ) { - var elem, win; - - if ( val === undefined ) { - elem = this[ 0 ]; - - if ( !elem ) { - return null; - } - - win = getWindow( elem ); - - // Return the scroll offset - return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] : - jQuery.support.boxModel && win.document.documentElement[ method ] || - win.document.body[ method ] : - elem[ method ]; - } - - // Set the scroll offset - return this.each(function() { - win = getWindow( this ); - - if ( win ) { - win.scrollTo( - !i ? val : jQuery( win ).scrollLeft(), - i ? val : jQuery( win ).scrollTop() - ); - - } else { - this[ method ] = val; - } - }); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} - - - - -// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods -jQuery.each([ "Height", "Width" ], function( i, name ) { - - var type = name.toLowerCase(); - - // innerHeight and innerWidth - jQuery.fn[ "inner" + name ] = function() { - var elem = this[0]; - return elem ? - elem.style ? - parseFloat( jQuery.css( elem, type, "padding" ) ) : - this[ type ]() : - null; - }; - - // outerHeight and outerWidth - jQuery.fn[ "outer" + name ] = function( margin ) { - var elem = this[0]; - return elem ? - elem.style ? - parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) : - this[ type ]() : - null; - }; - - jQuery.fn[ type ] = function( size ) { - // Get window width or height - var elem = this[0]; - if ( !elem ) { - return size == null ? null : this; - } - - if ( jQuery.isFunction( size ) ) { - return this.each(function( i ) { - var self = jQuery( this ); - self[ type ]( size.call( this, i, self[ type ]() ) ); - }); - } - - if ( jQuery.isWindow( elem ) ) { - // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode - // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat - var docElemProp = elem.document.documentElement[ "client" + name ], - body = elem.document.body; - return elem.document.compatMode === "CSS1Compat" && docElemProp || - body && body[ "client" + name ] || docElemProp; - - // Get document width or height - } else if ( elem.nodeType === 9 ) { - // Either scroll[Width/Height] or offset[Width/Height], whichever is greater - return Math.max( - elem.documentElement["client" + name], - elem.body["scroll" + name], elem.documentElement["scroll" + name], - elem.body["offset" + name], elem.documentElement["offset" + name] - ); - - // Get or set width or height on the element - } else if ( size === undefined ) { - var orig = jQuery.css( elem, type ), - ret = parseFloat( orig ); - - return jQuery.isNumeric( ret ) ? ret : orig; - - // Set the width or height on the element (default to pixels if value is unitless) - } else { - return this.css( type, typeof size === "string" ? size : size + "px" ); - } - }; - -}); - - - - -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - - - -})( window ); diff --git a/pandora_console/include/javascript/jquery-1.8.2.js b/pandora_console/include/javascript/jquery-1.8.2.js deleted file mode 100644 index d4f3bb38cd..0000000000 --- a/pandora_console/include/javascript/jquery-1.8.2.js +++ /dev/null @@ -1,9440 +0,0 @@ -/*! - * jQuery JavaScript Library v1.8.2 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time) - */ -(function( window, undefined ) { -var - // A central reference to the root jQuery(document) - rootjQuery, - - // The deferred used on DOM ready - readyList, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, - navigator = window.navigator, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // Save a reference to some core methods - core_push = Array.prototype.push, - core_slice = Array.prototype.slice, - core_indexOf = Array.prototype.indexOf, - core_toString = Object.prototype.toString, - core_hasOwn = Object.prototype.hasOwnProperty, - core_trim = String.prototype.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source, - - // Used for detecting and trimming whitespace - core_rnotwhite = /\S/, - core_rspace = /\s+/, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) - rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = ( context && context.nodeType ? context.ownerDocument || context : document ); - - // scripts is true for back-compat - selector = jQuery.parseHTML( match[1], doc, true ); - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - this.attr.call( selector, context, true ); - } - - return jQuery.merge( this, selector ); - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.8.2", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - eq: function( i ) { - i = +i; - return i === -1 ? - this.slice( i ) : - this.slice( i, i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ), - "slice", core_slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ core_toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // scripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, scripts ) { - var parsed; - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - scripts = context; - context = 0; - } - context = context || document; - - // Single tag - if ( (parsed = rsingleTag.exec( data )) ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] ); - return jQuery.merge( [], - (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes ); - }, - - parseJSON: function( data ) { - if ( !data || typeof data !== "string") { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && core_rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var name, - i = 0, - length = obj.length, - isObj = length === undefined || jQuery.isFunction( obj ); - - if ( args ) { - if ( isObj ) { - for ( name in obj ) { - if ( callback.apply( obj[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( obj[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in obj ) { - if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var type, - ret = results || []; - - if ( arr != null ) { - // The window, strings (and functions) also have 'length' - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - type = jQuery.type( arr ); - - if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { - core_push.call( ret, arr ); - } else { - jQuery.merge( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, - ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, pass ) { - var exec, - bulk = key == null, - i = 0, - length = elems.length; - - // Sets many values - if ( key && typeof key === "object" ) { - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); - } - chainable = 1; - - // Sets one value - } else if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = pass === undefined && jQuery.isFunction( value ); - - if ( bulk ) { - // Bulk operations only iterate when executing function values - if ( exec ) { - exec = fn; - fn = function( elem, key, value ) { - return exec.call( jQuery( elem ), value ); - }; - - // Otherwise they run against the entire set - } else { - fn.call( elems, value ); - fn = null; - } - } - - if ( fn ) { - for (; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - } - - chainable = 1; - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready, 1 ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.split( core_rspace ), function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) { - list.push( arg ); - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ]( jQuery.isFunction( fn ) ? - function() { - var returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - } : - newDefer[ action ] - ); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] = list.fire - deferred[ tuple[0] ] = list.fire; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, - all, - a, - select, - opt, - input, - fragment, - eventName, - i, - isSupported, - clickFn, - div = document.createElement("div"); - - // Preliminary tests - div.setAttribute( "className", "t" ); - div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; - - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Can't get basic test support - if ( !all || !all.length ) { - return {}; - } - - // First batch of supports tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute("href") === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Tests for enctype support on a form(#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: ( document.compatMode === "CSS1Compat" ), - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", clickFn = function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent("onclick"); - div.detachEvent( "onclick", clickFn ); - } - - // Check if a radio maintains its value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - input.setAttribute( "checked", "checked" ); - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.lastChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - fragment.removeChild( input ); - fragment.appendChild( div ); - - // Technique from Juriy Zaytsev - // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for ( i in { - submit: true, - change: true, - focusin: true - }) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Run tests that need a body at doc ready - jQuery(function() { - var container, div, tds, marginDiv, - divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px"; - body.insertBefore( container, body.firstChild ); - - // Construct the test element - div = document.createElement("div"); - container.appendChild( div ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE <= 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // NOTE: To any future maintainer, we've window.getComputedStyle - // because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = document.createElement("div"); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = "block"; - div.style.overflow = "visible"; - div.innerHTML = "<div></div>"; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - container.style.zoom = 1; - } - - // Null elements to avoid leaks in IE - body.removeChild( container ); - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - fragment.removeChild( div ); - all = a = select = opt = input = fragment = div = null; - - return support; -})(); -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -jQuery.extend({ - cache: {}, - - deletedIds: [], - - // Remove at next major release (1.9/2.0) - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var parts, part, attr, name, l, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attr = elem.attributes; - for ( l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - parts = key.split( ".", 2 ); - parts[1] = parts[1] ? "." + parts[1] : ""; - part = parts[1] + "!"; - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - data = this.triggerHandler( "getData" + part, [ parts[0] ] ); - - // Try to fetch any internally stored data first - if ( data === undefined && elem ) { - data = jQuery.data( elem, key ); - data = dataAttr( elem, key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - } - - parts[1] = value; - this.each(function() { - var self = jQuery( this ); - - self.triggerHandler( "setData" + part, parts ); - jQuery.data( this, key, value ); - self.triggerHandler( "changeData" + part, parts ); - }); - }, null, value, arguments.length > 1, null, false ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery.removeData( elem, type + "queue", true ); - jQuery.removeData( elem, key, true ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, fixSpecified, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea|)$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var removes, className, elem, c, cl, i, l; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - if ( (value && typeof value === "string") || value === undefined ) { - removes = ( value || "" ).split( core_rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - if ( elem.nodeType === 1 && elem.className ) { - - className = (" " + elem.className + " ").replace( rclass, " " ); - - // loop over each item in the removal list - for ( c = 0, cl = removes.length; c < cl; c++ ) { - // Remove until there is nothing to remove, - while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) { - className = className.replace( " " + removes[ c ] + " " , " " ); - } - } - elem.className = value ? jQuery.trim( className ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( core_rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, i, max, option, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - i = one ? index : 0; - max = one ? index + 1 : options.length; - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9 - attrFn: {}, - - attr: function( elem, name, value, pass ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var propName, attrNames, name, isBool, - i = 0; - - if ( value && elem.nodeType === 1 ) { - - attrNames = value.split( core_rspace ); - - for ( ; i < attrNames.length; i++ ) { - name = attrNames[ i ]; - - if ( name ) { - propName = jQuery.propFix[ name ] || name; - isBool = rboolean.test( name ); - - // See #9699 for explanation of this approach (setting first, then removal) - // Do not do this for boolean attributes (see #10870) - if ( !isBool ) { - jQuery.attr( elem, name, "" ); - } - elem.removeAttribute( getSetAttribute ? name : propName ); - - // Set corresponding property to false for boolean attributes - if ( isBool && propName in elem ) { - elem[ propName ] = false; - } - } - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode, - property = jQuery.prop( elem, name ); - return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - fixSpecified = { - name: true, - id: true, - coords: true - }; - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return ( ret.value = value + "" ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - if ( value === "" ) { - value = "false"; - } - nodeHook.set( elem, value, name ); - } - }; -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:textarea|input|select)$/i, - rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/, - rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - hoverHack = function( events ) { - return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); - }; - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - add: function( elem, types, handler, data, selector ) { - - var elemData, eventHandle, events, - t, tns, type, namespaces, handleObj, - handleObjIn, handlers, special; - - // Don't attach events to noData or text/comment nodes (allow plain objects tho) - if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - events = elemData.events; - if ( !events ) { - elemData.events = events = {}; - } - eventHandle = elemData.handle; - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = jQuery.trim( hoverHack(types) ).split( " " ); - for ( t = 0; t < types.length; t++ ) { - - tns = rtypenamespace.exec( types[t] ) || []; - type = tns[1]; - namespaces = ( tns[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: tns[1], - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - handlers = events[ type ]; - if ( !handlers ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var t, tns, type, origType, namespaces, origCount, - j, events, special, eventType, handleObj, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = jQuery.trim( hoverHack( types || "" ) ).split(" "); - for ( t = 0; t < types.length; t++ ) { - tns = rtypenamespace.exec( types[t] ) || []; - type = origType = tns[1]; - namespaces = tns[2]; - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector? special.delegateType : special.bindType ) || type; - eventType = events[ type ] || []; - origCount = eventType.length; - namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - - // Remove matching events - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !namespaces || namespaces.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - eventType.splice( j--, 1 ); - - if ( handleObj.selector ) { - eventType.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( eventType.length === 0 && origCount !== eventType.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery.removeData( elem, "events", true ); - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Don't do events on text and comment nodes - if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { - return; - } - - // Event object or event type - var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType, - type = event.type || event, - namespaces = []; - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "!" ) >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf( "." ) >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.isTrigger = true; - event.exclusive = exclusive; - event.namespace = namespaces.join( "." ); - event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; - - // Handle a global trigger - if ( !elem ) { - - // TODO: Stop taunting the data cache; remove global events and always attach to document - cache = jQuery.cache; - for ( i in cache ) { - if ( cache[ i ].events && cache[ i ].events[ type ] ) { - jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); - } - } - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - eventPath = [[ elem, special.bindType || type ]]; - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; - for ( old = elem; cur; cur = cur.parentNode ) { - eventPath.push([ cur, bubbleType ]); - old = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( old === (elem.ownerDocument || document) ) { - eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); - } - } - - // Fire handlers on the event path - for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { - - cur = eventPath[i][0]; - event.type = eventPath[i][1]; - - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - // Note that this is a bare JS function and not a jQuery handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - // IE<9 dies on focus/blur to hidden element (#1486) - if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( old ) { - elem[ ontype ] = old; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event || window.event ); - - var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related, - handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), - delegateCount = handlers.delegateCount, - args = core_slice.call( arguments ), - run_all = !event.exclusive && !event.namespace, - special = jQuery.event.special[ event.type ] || {}, - handlerQueue = []; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers that should run if there are delegated events - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && !(event.button && event.type === "click") ) { - - for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - selMatch = {}; - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - sel = handleObj.selector; - - if ( selMatch[ sel ] === undefined ) { - selMatch[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( selMatch[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, matches: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( handlers.length > delegateCount ) { - handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); - } - - // Run delegates first; they may want to stop propagation beneath us - for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { - matched = handlerQueue[ i ]; - event.currentTarget = matched.elem; - - for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { - handleObj = matched.matches[ j ]; - - // Triggered event must either 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { - - event.data = handleObj.data; - event.handleObj = handleObj; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** - props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = jQuery.Event( originalEvent ); - - for ( i = copy.length; i; ) { - prop = copy[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Target should not be a text node (#504, Safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8) - event.metaKey = !!event.metaKey; - - return fixHook.filter? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - - focus: { - delegateType: "focusin" - }, - blur: { - delegateType: "focusout" - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -// Some plugins are using, but it's undocumented/deprecated and will be removed. -// The 1.7 special event interface should provide all the hooks needed now. -jQuery.event.handle = jQuery.event.dispatch; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 – - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj, - selector = handleObj.selector; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "_submit_attached" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "_submit_attached", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "_change_attached", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { // && selector != null - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - live: function( types, data, fn ) { - jQuery( this.context ).on( types, this.selector, data, fn ); - return this; - }, - die: function( types, fn ) { - jQuery( this.context ).off( types, this.selector || "**", fn ); - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var cachedruns, - assertGetIdNotName, - Expr, - getText, - isXML, - contains, - compile, - sortOrder, - hasDuplicate, - outermostContext, - - baseHasDuplicate = true, - strundefined = "undefined", - - expando = ( "sizcache" + Math.random() ).replace( ".", "" ), - - Token = String, - document = window.document, - docElem = document.documentElement, - dirruns = 0, - done = 0, - pop = [].pop, - push = [].push, - slice = [].slice, - // Use a stripped-down indexOf if a native one is unavailable - indexOf = [].indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - // Augment a function for special use by Sizzle - markFunction = function( fn, value ) { - fn[ expando ] = value == null || value; - return fn; - }, - - createCache = function() { - var cache = {}, - keys = []; - - return markFunction(function( key, value ) { - // Only keep the most recent entries - if ( keys.push( key ) > Expr.cacheLength ) { - delete cache[ keys.shift() ]; - } - - return (cache[ key ] = value); - }, cache ); - }, - - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - - // Regex - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors) - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments not in parens/brackets, - // then attribute selectors and non-pseudos (denoted by :), - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)", - - // For matchExpr.POS and matchExpr.needsContext - pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), - rpseudo = new RegExp( pseudos ), - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/, - - rnot = /^:not/, - rsibling = /[\x20\t\r\n\f]*[+~]/, - rendsWithNot = /:not\($/, - - rheader = /h\d/i, - rinputs = /input|select|textarea|button/i, - - rbackslash = /\\(?!\\)/g, - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "POS": new RegExp( pos, "i" ), - "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - // For use in libraries implementing .is() - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" ) - }, - - // Support - - // Used for testing something on an element - assert = function( fn ) { - var div = document.createElement("div"); - - try { - return fn( div ); - } catch (e) { - return false; - } finally { - // release memory in IE - div = null; - } - }, - - // Check if getElementsByTagName("*") returns only elements - assertTagNameNoComments = assert(function( div ) { - div.appendChild( document.createComment("") ); - return !div.getElementsByTagName("*").length; - }), - - // Check if getAttribute returns normalized href attributes - assertHrefNotNormalized = assert(function( div ) { - div.innerHTML = "<a href='#'></a>"; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }), - - // Check if attributes should be retrieved by attribute nodes - assertAttributes = assert(function( div ) { - div.innerHTML = "<select></select>"; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }), - - // Check if getElementsByClassName can be trusted - assertUsableClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; - if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { - return false; - } - - // Safari 3.2 caches class attributes and doesn't catch changes - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length === 2; - }), - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - assertUsableName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = document.getElementsByName && - // buggy browsers will return fewer than the correct 2 - document.getElementsByName( expando ).length === 2 + - // buggy browsers will return more than the correct 0 - document.getElementsByName( expando + 0 ).length; - assertGetIdNotName = !document.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }); - -// If slice is not available, provide a backup -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, - results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -function Sizzle( selector, context, results, seed ) { - results = results || []; - context = context || document; - var match, elem, xml, m, - nodeType = context.nodeType; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( nodeType !== 1 && nodeType !== 9 ) { - return []; - } - - xml = isXML( context ); - - if ( !xml && !seed ) { - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed, xml ); -} - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - return Sizzle( expr, null, null, [ elem ] ).length > 0; -}; - -// Returns a function to use in pseudos for input types -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -// Returns a function to use in pseudos for buttons -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -// Returns a function to use in pseudos for positionals -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( nodeType ) { - if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - } else { - - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } - return ret; -}; - -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Element contains another -contains = Sizzle.contains = docElem.contains ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) ); - } : - docElem.compareDocumentPosition ? - function( a, b ) { - return b && !!( a.compareDocumentPosition( b ) & 16 ); - } : - function( a, b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - return false; - }; - -Sizzle.attr = function( elem, name ) { - var val, - xml = isXML( elem ); - - if ( !xml ) { - name = name.toLowerCase(); - } - if ( (val = Expr.attrHandle[ name ]) ) { - return val( elem ); - } - if ( xml || assertAttributes ) { - return elem.getAttribute( name ); - } - val = elem.getAttributeNode( name ); - return val ? - typeof elem[ name ] === "boolean" ? - elem[ name ] ? name : null : - val.specified ? val.value : null : - null; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - // IE6/7 return a modified href - attrHandle: assertHrefNotNormalized ? - {} : - { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }, - - find: { - "ID": assertGetIdNotName ? - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - } : - function( id, context, xml ) { - if ( typeof context.getElementById !== strundefined && !xml ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }, - - "TAG": assertTagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - var elem, - tmp = [], - i = 0; - - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }, - - "NAME": assertUsableName && function( tag, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }, - - "CLASS": assertUsableClassName && function( className, context, xml ) { - if ( typeof context.getElementsByClassName !== strundefined && !xml ) { - return context.getElementsByClassName( className ); - } - } - }, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( rbackslash, "" ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 3 xn-component of xn+y argument ([+-]?\d*n|) - 4 sign of xn-component - 5 x of xn-component - 6 sign of y-component - 7 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1] === "nth" ) { - // nth-child requires argument - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) ); - match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" ); - - // other types prohibit arguments - } else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var unquoted, excess; - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - if ( match[3] ) { - match[2] = match[3]; - } else if ( (unquoted = match[4]) ) { - // Only check arguments that contain a pseudo - if ( rpseudo.test(unquoted) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - unquoted = unquoted.slice( 0, excess ); - match[0] = match[0].slice( 0, excess ); - } - match[2] = unquoted; - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - "ID": assertGetIdNotName ? - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - return elem.getAttribute("id") === id; - }; - } : - function( id ) { - id = id.replace( rbackslash, "" ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === id; - }; - }, - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - nodeName = nodeName.replace( rbackslash, "" ).toLowerCase(); - - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ expando ][ className ]; - if ( !pattern ) { - pattern = classCache( className, new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)") ); - } - return function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }; - }, - - "ATTR": function( name, operator, check ) { - return function( elem, context ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.substr( result.length - check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, argument, first, last ) { - - if ( type === "nth" ) { - return function( elem ) { - var node, diff, - parent = elem.parentNode; - - if ( first === 1 && last === 0 ) { - return true; - } - - if ( parent ) { - diff = 0; - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - diff++; - if ( elem === node ) { - break; - } - } - } - } - - // Incorporate the offset (or cast to NaN), then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - }; - } - - return function( elem ) { - var node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - /* falls through */ - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - var nodeType; - elem = elem.firstChild; - while ( elem ) { - if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) { - return false; - } - elem = elem.nextSibling; - } - return true; - }, - - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "text": function( elem ) { - var type, attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - (type = elem.type) === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type ); - }, - - // Input types - "radio": createInputPseudo("radio"), - "checkbox": createInputPseudo("checkbox"), - "file": createInputPseudo("file"), - "password": createInputPseudo("password"), - "image": createInputPseudo("image"), - - "submit": createButtonPseudo("submit"), - "reset": createButtonPseudo("reset"), - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "focus": function( elem ) { - var doc = elem.ownerDocument; - return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href); - }, - - "active": function( elem ) { - return elem === elem.ownerDocument.activeElement; - }, - - // Positional types - "first": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length, argument ) { - for ( var i = 0; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length, argument ) { - for ( var i = 1; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -function siblingCheck( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; -} - -sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - return ( !a.compareDocumentPosition || !b.compareDocumentPosition ? - a.compareDocumentPosition : - a.compareDocumentPosition(b) & 4 - ) ? -1 : 1; - } : - function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - -// Always assume the presence of duplicates if sort doesn't -// pass them to our comparison function (as in Google Chrome). -[0, 0].sort( sortOrder ); -baseHasDuplicate = !hasDuplicate; - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - i = 1; - - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - - return results; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, soFar, groups, preFilters, - cached = tokenCache[ expando ][ selector ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - soFar = soFar.slice( match[0].length ); - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - tokens.push( matched = new Token( match.shift() ) ); - soFar = soFar.slice( matched.length ); - - // Cast descendant combinators to space - matched.type = match[0].replace( rtrim, " " ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - // The last two arguments here are (context, xml) for backCompat - (match = preFilters[ type ]( match, document, true ))) ) { - - tokens.push( matched = new Token( match.shift() ) ); - soFar = soFar.slice( matched.length ); - matched.type = type; - matched.matches = match; - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && combinator.dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( checkNonElements || elem.nodeType === 1 ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( !xml ) { - var cache, - dirkey = dirruns + " " + doneName + " ", - cachedkey = dirkey + cachedruns; - while ( (elem = elem[ dir ]) ) { - if ( checkNonElements || elem.nodeType === 1 ) { - if ( (cache = elem[ expando ]) === cachedkey ) { - return elem.sizset; - } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) { - if ( elem.sizset ) { - return elem; - } - } else { - elem[ expando ] = cachedkey; - if ( matcher( elem, context, xml ) ) { - elem.sizset = true; - return elem; - } - elem.sizset = false; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( checkNonElements || elem.nodeType === 1 ) { - if ( matcher( elem, context, xml ) ) { - return elem; - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - // Positional selectors apply to seed elements, so it is invalid to follow them with relative ones - if ( seed && postFinder ) { - return; - } - - var i, elem, postFilterIn, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [], seed ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - postFilterIn = condense( matcherOut, postMap ); - postFilter( postFilterIn, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = postFilterIn.length; - while ( i-- ) { - if ( (elem = postFilterIn[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - // Keep seed and results synchronized - if ( seed ) { - // Ignore postFinder because it can't coexist with seed - i = preFilter && matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - seed[ preMap[i] ] = !(results[ preMap[i] ] = elem); - } - } - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; - } else { - // The concatenated values are (context, xml) for backCompat - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && tokens.join("") - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Nested matchers should use non-integer dirruns - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = superMatcher.el; - } - - // Add elements passing elementMatchers directly to results - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - for ( j = 0; (matcher = elementMatchers[j]); j++ ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++superMatcher.el; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - for ( j = 0; (matcher = setMatchers[j]); j++ ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - superMatcher.el = 0; - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ expando ][ selector ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results, seed ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results, seed ); - } - return results; -} - -function select( selector, context, results, seed, xml ) { - var i, tokens, token, type, find, - match = tokenize( selector ), - j = match.length; - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && !xml && - Expr.relative[ tokens[1].type ] ) { - - context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().length ); - } - - // Fetch a seed set for right-to-left matching - for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( rbackslash, "" ), - rsibling.test( tokens[0].type ) && context.parentNode || context, - xml - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && tokens.join(""); - if ( !selector ) { - push.apply( results, slice.call( seed, 0 ) ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - xml, - results, - rsibling.test( selector ) - ); - return results; -} - -if ( document.querySelectorAll ) { - (function() { - var disconnectedMatch, - oldSelect = select, - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - - // qSa(:focus) reports false when true (Chrome 21), - // A support test would require too much code (would include document ready) - rbuggyQSA = [":focus"], - - // matchesSelector(:focus) reports false when true (Chrome 21), - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - // A support test would require too much code (would include document ready) - // just skip matchesSelector for :active - rbuggyMatches = [ ":active", ":focus" ], - matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector; - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explictly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = "<select><option selected=''></option></select>"; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here (do not put tests after this one) - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE9 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "<p test=''></p>"; - if ( div.querySelectorAll("[test^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here (do not put tests after this one) - div.innerHTML = "<input type='hidden'/>"; - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push(":enabled", ":disabled"); - } - }); - - // rbuggyQSA always contains :focus, so no need for a length check - rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") ); - - select = function( selector, context, results, seed, xml ) { - // Only use querySelectorAll when not filtering, - // when this is not xml, - // and when no QSA bugs apply - if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - var groups, i, - old = true, - nid = expando, - newContext = context, - newSelector = context.nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + groups[i].join(""); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, slice.call( newContext.querySelectorAll( - newSelector - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - - return oldSelect( selector, context, results, seed, xml ); - }; - - if ( matches ) { - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - try { - matches.call( div, "[test!='']:sizzle" ); - rbuggyMatches.push( "!=", pseudos ); - } catch ( e ) {} - }); - - // rbuggyMatches always contains :active and :focus, so no need for a length check - rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") ); - - Sizzle.matchesSelector = function( elem, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyMatches always contains :active, so no need for an existence check - if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, null, null, [ elem ] ).length > 0; - }; - } - })(); -} - -// Deprecated -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Back-compat -function setFilters() {} -Expr.filters = setFilters.prototype = Expr.pseudos; -Expr.setFilters = new setFilters(); - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, l, length, n, r, ret, - self = this; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - ret = this.pushStack( "", "find", selector ); - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, core_slice.call( arguments ).join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /<tbody/i, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - rnocache = /<(?:script|object|embed|option|style)/i, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rcheckableType = /^(?:checkbox|radio)$/, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /\/(java|ecma)script/i, - rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g, - wrapMap = { - option: [ 1, "<select multiple='multiple'>", "</select>" ], - legend: [ 1, "<fieldset>", "</fieldset>" ], - thead: [ 1, "<table>", "</table>" ], - tr: [ 2, "<table><tbody>", "</tbody></table>" ], - td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], - area: [ 1, "<map>", "</map>" ], - _default: [ 0, "", "" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, -// unless wrapped in a div with non-breaking characters in front of it. -if ( !jQuery.support.htmlSerialize ) { - wrapMap._default = [ 1, "X<div>", "</div>" ]; -} - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( set, this ), "before", this.selector ); - } - }, - - after: function() { - if ( !isDisconnected( this[0] ) ) { - return this.domManip(arguments, false, function( elem ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - } - - if ( arguments.length ) { - var set = jQuery.clean( arguments ); - return this.pushStack( jQuery.merge( this, set ), "after", this.selector ); - } - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - jQuery.cleanData( [ elem ] ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName("*") ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1></$2>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( elem.getElementsByTagName( "*" ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - if ( !isDisconnected( this[0] ) ) { - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( jQuery.isFunction( value ) ) { - return this.each(function(i) { - var self = jQuery(this), old = self.html(); - self.replaceWith( value.call( this, i, old ) ); - }); - } - - if ( typeof value !== "string" ) { - value = jQuery( value ).detach(); - } - - return this.each(function() { - var next = this.nextSibling, - parent = this.parentNode; - - jQuery( this ).remove(); - - if ( next ) { - jQuery(next).before( value ); - } else { - jQuery(parent).append( value ); - } - }); - } - - return this.length ? - this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : - this; - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = [].concat.apply( [], args ); - - var results, first, fragment, iNoClone, - i = 0, - value = args[0], - scripts = [], - l = this.length; - - // We can't cloneNode fragments that contain checked, in WebKit - if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) { - return this.each(function() { - jQuery(this).domManip( args, table, callback ); - }); - } - - if ( jQuery.isFunction(value) ) { - return this.each(function(i) { - var self = jQuery(this); - args[0] = value.call( this, i, table ? self.html() : undefined ); - self.domManip( args, table, callback ); - }); - } - - if ( this[0] ) { - results = jQuery.buildFragment( args, this, scripts ); - fragment = results.fragment; - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - // Fragments from the fragment cache must always be cloned and never used in place. - for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) { - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - i === iNoClone ? - fragment : - jQuery.clone( fragment, true, true ) - ); - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - - if ( scripts.length ) { - jQuery.each( scripts, function( i, elem ) { - if ( elem.src ) { - if ( jQuery.ajax ) { - jQuery.ajax({ - url: elem.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.error("no ajax"); - } - } else { - jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - - if ( elem.parentNode ) { - elem.parentNode.removeChild( elem ); - } - }); - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function cloneFixAttributes( src, dest ) { - var nodeName; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - // clearAttributes removes the attributes, which we don't want, - // but also removes the attachEvent events, which we *do* want - if ( dest.clearAttributes ) { - dest.clearAttributes(); - } - - // mergeAttributes, in contrast, only merges back on the - // original attributes, not the events - if ( dest.mergeAttributes ) { - dest.mergeAttributes( src ); - } - - nodeName = dest.nodeName.toLowerCase(); - - if ( nodeName === "object" ) { - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - - // IE blanks contents when cloning scripts - } else if ( nodeName === "script" && dest.text !== src.text ) { - dest.text = src.text; - } - - // Event data gets referenced instead of copied if the expando - // gets copied too - dest.removeAttribute( jQuery.expando ); -} - -jQuery.buildFragment = function( args, context, scripts ) { - var fragment, cacheable, cachehit, - first = args[ 0 ]; - - // Set context from what may come in as undefined or a jQuery collection or a node - // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 & - // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception - context = context || document; - context = !context.nodeType && context[0] || context; - context = context.ownerDocument || context; - - // Only cache "small" (1/2 KB) HTML strings that are associated with the main document - // Cloning options loses the selected state, so don't cache them - // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment - // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache - // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 - if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document && - first.charAt(0) === "<" && !rnocache.test( first ) && - (jQuery.support.checkClone || !rchecked.test( first )) && - (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { - - // Mark cacheable and look for a hit - cacheable = true; - fragment = jQuery.fragments[ first ]; - cachehit = fragment !== undefined; - } - - if ( !fragment ) { - fragment = context.createDocumentFragment(); - jQuery.clean( args, context, fragment, scripts ); - - // Update the cache, but only store false - // unless this is a second parsing of the same content - if ( cacheable ) { - jQuery.fragments[ first ] = cachehit && fragment; - } - } - - return { fragment: fragment, cacheable: cacheable }; -}; - -jQuery.fragments = {}; - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - l = insert.length, - parent = this.length === 1 && this[0].parentNode; - - if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) { - insert[ original ]( this[0] ); - return this; - } else { - for ( ; i < l; i++ ) { - elems = ( i > 0 ? this.clone(true) : this ).get(); - jQuery( insert[i] )[ original ]( elems ); - ret = ret.concat( elems ); - } - - return this.pushStack( ret, name, insert.selector ); - } - }; -}); - -function getAll( elem ) { - if ( typeof elem.getElementsByTagName !== "undefined" ) { - return elem.getElementsByTagName( "*" ); - - } else if ( typeof elem.querySelectorAll !== "undefined" ) { - return elem.querySelectorAll( "*" ); - - } else { - return []; - } -} - -// Used in clean, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var srcElements, - destElements, - i, - clone; - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - // IE copies events bound via attachEvent when using cloneNode. - // Calling detachEvent on the clone will also remove the events - // from the original. In order to get around this, we use some - // proprietary methods to clear the events. Thanks to MooTools - // guys for this hotness. - - cloneFixAttributes( elem, clone ); - - // Using Sizzle here is crazy slow, so we use getElementsByTagName instead - srcElements = getAll( elem ); - destElements = getAll( clone ); - - // Weird iteration because IE will replace the length property - // with an element if you are cloning the body and one of the - // elements on the page has a name or id of "length" - for ( i = 0; srcElements[i]; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - cloneFixAttributes( srcElements[i], destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - cloneCopyEvent( elem, clone ); - - if ( deepDataAndEvents ) { - srcElements = getAll( elem ); - destElements = getAll( clone ); - - for ( i = 0; srcElements[i]; ++i ) { - cloneCopyEvent( srcElements[i], destElements[i] ); - } - } - } - - srcElements = destElements = null; - - // Return the cloned set - return clone; - }, - - clean: function( elems, context, fragment, scripts ) { - var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags, - safe = context === document && safeFragment, - ret = []; - - // Ensure that context is a document - if ( !context || typeof context.createDocumentFragment === "undefined" ) { - context = document; - } - - // Use the already-created safe fragment if context permits - for ( i = 0; (elem = elems[i]) != null; i++ ) { - if ( typeof elem === "number" ) { - elem += ""; - } - - if ( !elem ) { - continue; - } - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - if ( !rhtml.test( elem ) ) { - elem = context.createTextNode( elem ); - } else { - // Ensure a safe container in which to render the html - safe = safe || createSafeFragment( context ); - div = context.createElement("div"); - safe.appendChild( div ); - - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(rxhtmlTag, "<$1></$2>"); - - // Go to html and back, then peel off extra wrappers - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - depth = wrap[0]; - div.innerHTML = wrap[1] + elem + wrap[2]; - - // Move to the right depth - while ( depth-- ) { - div = div.lastChild; - } - - // Remove IE's autoinserted <tbody> from table fragments - if ( !jQuery.support.tbody ) { - - // String was a <table>, *may* have spurious <tbody> - hasBody = rtbody.test(elem); - tbody = tag === "table" && !hasBody ? - div.firstChild && div.firstChild.childNodes : - - // String was a bare <thead> or <tfoot> - wrap[1] === "<table>" && !hasBody ? - div.childNodes : - []; - - for ( j = tbody.length - 1; j >= 0 ; --j ) { - if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { - tbody[ j ].parentNode.removeChild( tbody[ j ] ); - } - } - } - - // IE completely kills leading whitespace when innerHTML is used - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); - } - - elem = div.childNodes; - - // Take out of fragment container (we need a fresh div each time) - div.parentNode.removeChild( div ); - } - } - - if ( elem.nodeType ) { - ret.push( elem ); - } else { - jQuery.merge( ret, elem ); - } - } - - // Fix #11356: Clear elements from safeFragment - if ( div ) { - elem = div = safe = null; - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - for ( i = 0; (elem = ret[i]) != null; i++ ) { - if ( jQuery.nodeName( elem, "input" ) ) { - fixDefaultChecked( elem ); - } else if ( typeof elem.getElementsByTagName !== "undefined" ) { - jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); - } - } - } - - // Append elements to a provided document fragment - if ( fragment ) { - // Special handling of each script element - handleScript = function( elem ) { - // Check if we consider it executable - if ( !elem.type || rscriptType.test( elem.type ) ) { - // Detach the script and store it in the scripts array (if provided) or the fragment - // Return truthy to indicate that it has been handled - return scripts ? - scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : - fragment.appendChild( elem ); - } - }; - - for ( i = 0; (elem = ret[i]) != null; i++ ) { - // Check if we're done after handling an executable script - if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { - // Append to fragment and handle embedded scripts - fragment.appendChild( elem ); - if ( typeof elem.getElementsByTagName !== "undefined" ) { - // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration - jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); - - // Splice the scripts into ret after their former ancestor and advance our index beyond them - ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); - i += jsTags.length; - } - } - } - } - - return ret; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( elem.removeAttribute ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - jQuery.deletedIds.push( id ); - } - } - } - } - } -}); -// Limit scope pollution from any deprecated API -(function() { - -var matched, browser; - -// Use of jQuery.browser is frowned upon. -// More details: http://api.jquery.com/jQuery.browser -// jQuery.uaMatch maintained for back-compat -jQuery.uaMatch = function( ua ) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || - /(webkit)[ \/]([\w.]+)/.exec( ua ) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || - /(msie) ([\w.]+)/.exec( ua ) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; -}; - -matched = jQuery.uaMatch( navigator.userAgent ); -browser = {}; - -if ( matched.browser ) { - browser[ matched.browser ] = true; - browser.version = matched.version; -} - -// Chrome is Webkit, but Webkit is also Safari. -if ( browser.chrome ) { - browser.webkit = true; -} else if ( browser.webkit ) { - browser.safari = true; -} - -jQuery.browser = browser; - -jQuery.sub = function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; -}; - -})(); -var curCSS, iframe, iframeDoc, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity=([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ), - elemdisplay = {}, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], - - eventsToggle = jQuery.fn.toggle; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, display, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - display = curCSS( elem, "display" ); - - if ( !values[ index ] && display !== "none" ) { - jQuery._data( elem, "olddisplay", display ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state, fn2 ) { - var bool = typeof state === "boolean"; - - if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) { - return eventsToggle.apply( this, arguments ); - } - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, numeric, extra ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( numeric || extra !== undefined ) { - num = parseFloat( val ); - return numeric || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: To any future maintainer, we've window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - curCSS = function( elem, name ) { - var ret, width, minWidth, maxWidth, - computed = window.getComputedStyle( elem, null ), - style = elem.style; - - if ( computed ) { - - ret = computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - curCSS = function( elem, name ) { - var left, rsLeft, - ret = elem.currentStyle && elem.currentStyle[ name ], - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - elem.runtimeStyle.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - elem.runtimeStyle.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - // we use jQuery.css instead of curCSS here - // because of the reliableMarginRight CSS hook! - val += jQuery.css( elem, extra + cssExpand[ i ], true ); - } - - // From this point on we use curCSS for maximum performance (relevant in animations) - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } else { - // at this point, extra isn't content, so add padding - val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0; - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - valueIsBorderBox = true, - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox - ) - ) + "px"; -} - - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - if ( elemdisplay[ nodeName ] ) { - return elemdisplay[ nodeName ]; - } - - var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ), - display = elem.css("display"); - elem.remove(); - - // If the simple way fails, - // get element's real default display by attaching it to a temp iframe - if ( display === "none" || display === "" ) { - // Use the already-created iframe if possible - iframe = document.body.appendChild( - iframe || jQuery.extend( document.createElement("iframe"), { - frameBorder: 0, - width: 0, - height: 0 - }) - ); - - // Create a cacheable copy of the iframe document on first call. - // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML - // document to it; WebKit & Firefox won't allow reusing the iframe document. - if ( !iframeDoc || !iframe.createElement ) { - iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; - iframeDoc.write("<!doctype html><html><body>"); - iframeDoc.close(); - } - - elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) ); - - display = curCSS( elem, "display" ); - document.body.removeChild( iframe ); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - // certain elements can have dimension info if we invisibly show them - // however, it must have a current display style that would benefit from this - if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) { - return jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }); - } else { - return getWidthOrHeight( elem, name, extra ); - } - } - }, - - set: function( elem, value, extra ) { - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box" - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there there is no filter style applied in a css rule, we are done - if ( currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, function() { - if ( computed ) { - return curCSS( elem, "marginRight" ); - } - }); - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - var ret = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ], - expanded = {}; - - for ( i = 0; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, - rselectTextarea = /^(?:select|textarea)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - return this.elements ? jQuery.makeArray( this.elements ) : this; - }) - .filter(function(){ - return this.name && !this.disabled && - ( this.checked || rselectTextarea.test( this.nodeName ) || - rinput.test( this.type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val, i ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // If array item is non-scalar (array or object), encode its - // numeric index to resolve deserialization ambiguity issues. - // Note that rack (as of 1.0.0) can't currently deserialize - // nested arrays properly, and attempting to do so may cause - // a server error. Possible fixes are to modify rack's - // deserialization algorithm or to provide an option or flag - // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var - // Document location - ajaxLocParts, - ajaxLocation, - - rhash = /#.*$/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rquery = /\?/, - rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, - rts = /([?&])_=[^&]*/, - rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = ["*/"] + ["*"]; - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, list, placeBefore, - dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ), - i = 0, - length = dataTypes.length; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - for ( ; i < length; i++ ) { - dataType = dataTypes[ i ]; - // We control if we're asked to add before - // any existing element - placeBefore = /^\+/.test( dataType ); - if ( placeBefore ) { - dataType = dataType.substr( 1 ) || "*"; - } - list = structure[ dataType ] = structure[ dataType ] || []; - // then we add to the structure accordingly - list[ placeBefore ? "unshift" : "push" ]( func ); - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, - dataType /* internal */, inspected /* internal */ ) { - - dataType = dataType || options.dataTypes[ 0 ]; - inspected = inspected || {}; - - inspected[ dataType ] = true; - - var selection, - list = structure[ dataType ], - i = 0, - length = list ? list.length : 0, - executeOnly = ( structure === prefilters ); - - for ( ; i < length && ( executeOnly || !selection ); i++ ) { - selection = list[ i ]( options, originalOptions, jqXHR ); - // If we got redirected to another dataType - // we try there if executing only and not done already - if ( typeof selection === "string" ) { - if ( !executeOnly || inspected[ selection ] ) { - selection = undefined; - } else { - options.dataTypes.unshift( selection ); - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, selection, inspected ); - } - } - } - // If we're only executing or nothing was selected - // we try the catchall dataType if not done already - if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { - selection = inspectPrefiltersOrTransports( - structure, options, originalOptions, jqXHR, "*", inspected ); - } - // unnecessary when only executing (prefilters) - // but it'll be ignored by the caller in that case - return selection; -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - // Don't do a request if no elements are being requested - if ( !this.length ) { - return this; - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( params && typeof params === "object" ) { - type = "POST"; - } - - // Request the remote document - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params, - complete: function( jqXHR, status ) { - if ( callback ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - } - } - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - // See if a selector was specified - self.html( selector ? - - // Create a dummy div to hold the results - jQuery("<div>") - - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append( responseText.replace( rscript, "" ) ) - - // Locate the specified elements - .find( selector ) : - - // If not, just inject the full result - responseText ); - - }); - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ - jQuery.fn[ o ] = function( f ){ - return this.on( o, f ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - type: method, - url: url, - data: data, - success: callback, - dataType: type - }); - }; -}); - -jQuery.extend({ - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - if ( settings ) { - // Building a settings object - ajaxExtend( target, jQuery.ajaxSettings ); - } else { - // Extending ajaxSettings - settings = target; - target = jQuery.ajaxSettings; - } - ajaxExtend( target, settings ); - return target; - }, - - ajaxSettings: { - url: ajaxLocation, - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - type: "GET", - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - processData: true, - async: true, - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - xml: "application/xml, text/xml", - html: "text/html", - text: "text/plain", - json: "application/json, text/javascript", - "*": allTypes - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // List of data converters - // 1) key format is "source_type destination_type" (a single space in-between) - // 2) the catchall symbol "*" can be used for source_type - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - context: true, - url: true - } - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var // ifModified key - ifModifiedKey, - // Response headers - responseHeadersString, - responseHeaders, - // transport - transport, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events - // It's the callbackContext if one was provided in the options - // and if it's a DOM node or a jQuery collection - globalEventContext = callbackContext !== s && - ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? - jQuery( callbackContext ) : jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - - readyState: 0, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( !state ) { - var lname = name.toLowerCase(); - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match === undefined ? null : match; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - statusText = statusText || strAbort; - if ( transport ) { - transport.abort( statusText ); - } - done( 0, statusText ); - return this; - } - }; - - // Callback for when everything is done - // It is defined here because jslint complains if it is declared - // at the end of the function (which would be more logical and readable) - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ ifModifiedKey ] = modified; - } - modified = jqXHR.getResponseHeader("Etag"); - if ( modified ) { - jQuery.etag[ ifModifiedKey ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - - statusText = "notmodified"; - isSuccess = true; - - // If we have data - } else { - - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( !statusText || status ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - // Attach deferreds - deferred.promise( jqXHR ); - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - jqXHR.complete = completeDeferred.add; - - // Status-dependent callbacks - jqXHR.statusCode = function( map ) { - if ( map ) { - var tmp; - if ( state < 2 ) { - for ( tmp in map ) { - statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; - } - } else { - tmp = map[ jqXHR.status ]; - jqXHR.always( tmp ); - } - } - return this; - }; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // We also use the url parameter if available - s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace ); - - // A cross-domain request is in order when we have a protocol:host:port mismatch - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ) || false; - s.crossDomain = parts && ( parts.join(":") + ( parts[ 3 ] ? "" : parts[ 1 ] === "http:" ? 80 : 443 ) ) !== - ( ajaxLocParts.join(":") + ( ajaxLocParts[ 3 ] ? "" : ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Get ifModifiedKey before adding the anti-cache parameter - ifModifiedKey = s.url; - - // Add anti-cache in url if needed - if ( s.cache === false ) { - - var ts = jQuery.now(), - // try replacing _= if it is there - ret = s.url.replace( rts, "$1_=" + ts ); - - // if nothing was replaced, add timestamp to the end - s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - ifModifiedKey = ifModifiedKey || s.url; - if ( jQuery.lastModified[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); - } - if ( jQuery.etag[ ifModifiedKey ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); - } - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout( function(){ - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch (e) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - return jqXHR; - }, - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {} - -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ], - converters = {}, - i = 0; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -var oldCallbacks = [], - rquestion = /\?/, - rjsonp = /(=)\?(?=&|$)|\?\?/, - nonce = jQuery.now(); - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - data = s.data, - url = s.url, - hasCallback = s.jsonp !== false, - replaceInUrl = hasCallback && rjsonp.test( url ), - replaceInData = hasCallback && !replaceInUrl && typeof data === "string" && - !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && - rjsonp.test( data ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - overwritten = window[ callbackName ]; - - // Insert callback into url or form data - if ( replaceInUrl ) { - s.url = url.replace( rjsonp, "$1" + callbackName ); - } else if ( replaceInData ) { - s.data = data.replace( rjsonp, "$1" + callbackName ); - } else if ( hasCallback ) { - s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /javascript|ecmascript/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement( "script" ); - - script.async = "async"; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( head && script.parentNode ) { - head.removeChild( script ); - } - - // Dereference the script - script = undefined; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709 and #4378). - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( 0, 1 ); - } - } - }; - } -}); -var xhrCallbacks, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject ? function() { - // Abort all pending requests - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ]( 0, 1 ); - } - } : false, - xhrId = 0; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -(function( xhr ) { - jQuery.extend( jQuery.support, { - ajax: !!xhr, - cors: !!xhr && ( "withCredentials" in xhr ) - }); -})( jQuery.ajaxSettings.xhr() ); - -// Create transport if the browser can provide an xhr -if ( jQuery.support.ajax ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( _ ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - status = xhr.status; - responseHeaders = xhr.getAllResponseHeaders(); - responses = {}; - xml = xhr.responseXML; - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - try { - responses.text = xhr.responseText; - } catch( _ ) { - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback, 0 ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback(0,1); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1, - maxIterations = 20; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // And breaking the loop if scale is unchanged or perfect, or if we've just had enough - } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }, 0 ); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - index = 0, - tweenerIndex = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - percent = 1 - ( remaining / animation.duration || 0 ), - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end, easing ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - anim: animation, - queue: animation.opts.queue, - elem: elem - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - var index, prop, value, length, dataShow, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery.removeData( elem, "fxshow", true ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing any value as a 4th parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, false, "" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" || - // special check for .toggle( handler, handler, ... ) - ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations resolve immediately - if ( empty ) { - anim.stop( true ); - } - }; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - includeWidth = includeWidth? 1 : 0; - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -var rroot = /^(?:body|html)$/i; - -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, - box = { top: 0, left: 0 }, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - if ( (body = doc.body) === elem ) { - return jQuery.offset.bodyOffset( elem ); - } - - docElem = doc.documentElement; - - // Make sure it's not a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return box; - } - - // If we don't have gBCR, just use 0,0 rather than error - // BlackBerry 5, iOS 3 (original iPhone) - if ( typeof elem.getBoundingClientRect !== "undefined" ) { - box = elem.getBoundingClientRect(); - } - win = getWindow( doc ); - clientTop = docElem.clientTop || body.clientTop || 0; - clientLeft = docElem.clientLeft || body.clientLeft || 0; - scrollTop = win.pageYOffset || docElem.scrollTop; - scrollLeft = win.pageXOffset || docElem.scrollLeft; - return { - top: box.top + scrollTop - clientTop, - left: box.left + scrollLeft - clientLeft - }; -}; - -jQuery.offset = { - - bodyOffset: function( body ) { - var top = body.offsetTop, - left = body.offsetLeft; - - if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { - top += parseFloat( jQuery.css(body, "marginTop") ) || 0; - left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; - } - - return { top: top, left: left }; - }, - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[0] ) { - return; - } - - var elem = this[0], - - // Get *real* offsetParent - offsetParent = this.offsetParent(), - - // Get correct offsets - offset = this.offset(), - parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); - - // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; - offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; - - // Add offsetParent borders - parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; - parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; - - // Subtract the two offsets - return { - top: offset.top - parentOffset.top, - left: offset.left - parentOffset.left - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.body; - while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.body; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, value, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable, null ); - }; - }); -}); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window ); diff --git a/pandora_console/include/javascript/jquery-1.9.0.js b/pandora_console/include/javascript/jquery-1.9.0.js deleted file mode 100755 index 67e31603d1..0000000000 --- a/pandora_console/include/javascript/jquery-1.9.0.js +++ /dev/null @@ -1,9555 +0,0 @@ -/*! - * jQuery JavaScript Library v1.9.0 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-1-14 - */ -(function( window, undefined ) { -"use strict"; -var - // A central reference to the root jQuery(document) - rootjQuery, - - // The deferred used on DOM ready - readyList, - - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - location = window.location, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.9.0", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler and self cleanup method - DOMContentLoaded = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - } else if ( document.readyState === "complete" ) { - // we're here because readyState === "complete" in oldIE - // which is good enough for us to call the dom ready! - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Control if a given callback is in the list - has: function( fn ) { - return jQuery.inArray( fn, list ) > -1; - }, - // Remove all callbacks from the list - empty: function() { - list = []; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( list && ( !fired || stack ) ) { - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function() { - - var support, all, a, select, opt, input, fragment, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; - - // Support tests won't run in some limited or non-browser environments - all = div.getElementsByTagName("*"); - a = div.getElementsByTagName("a")[ 0 ]; - if ( !all || !a || !all.length ) { - return {}; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - support = { - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName("tbody").length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName("link").length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: a.getAttribute("href") === "/a", - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.5/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - checkOn: !!input.value, - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Tests for enctype support on a form (#6743) - enctype: !!document.createElement("form").enctype, - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", - - // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode - boxModel: document.compatMode === "CSS1Compat", - - // Will be defined later - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true, - boxSizingReliable: true, - pixelPosition: false - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - support.boxSizing = ( div.offsetWidth === 4 ); - support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== "undefined" ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "<div></div>"; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - body.style.zoom = 1; - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})(); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // Avoids exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt /* For internal use only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, l, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - for ( i = 0, l = name.length; i < l; i++ ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data, false ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name, false ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - elem = this[0], - i = 0, - data = null; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( !name.indexOf( "data-" ) ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return jQuery.access( this, function( value ) { - - if ( value === undefined ) { - // Try to fetch any internally stored data first - return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - } - - this.each(function() { - jQuery.data( this, key, value ); - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - hooks.cur = fn; - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - // Toggle whole class name - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val, - self = jQuery(this); - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( notxml ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - // In IE9+, Flash objects don't have .getAttribute (#12945) - // Support: IE9+ - if ( typeof elem.getAttribute !== "undefined" ) { - ret = elem.getAttribute( name ); - } - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( rboolean.test( name ) ) { - // Set corresponding property to false for boolean attributes - // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 - if ( !getSetAttribute && ruseDefault.test( name ) ) { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } else { - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return ( elem[ name ] = value ); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - var - // Use .prop to determine if this attribute is understood as boolean - prop = jQuery.prop( elem, name ), - - // Fetch it accordingly - attr = typeof prop === "boolean" && elem.getAttribute( name ), - detail = typeof prop === "boolean" ? - - getSetInput && getSetAttribute ? - attr != null : - // oldIE fabricates an empty string for missing boolean attributes - // and conflates checked/selected into attroperties - ruseDefault.test( name ) ? - elem[ jQuery.camelCase( "default-" + name ) ] : - !!attr : - - // fetch an attribute node for properties not recognized as boolean - elem.getAttributeNode( name ); - - return detail && detail.value !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; - -// fix oldIE value attroperty -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return jQuery.nodeName( elem, "input" ) ? - - // Ignore the value *property* by using defaultValue - elem.defaultValue : - - ret && ret.specified ? ret.value : undefined; - }, - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? - ret.value : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - get: nodeHook.get, - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret == null ? undefined : ret; - } - }); - }); - - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }); -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - // Don't attach events to noData or text/comment nodes (but allow plain objects) - elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem ); - - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = event.type || event, - namespaces = event.namespace ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - event.isTrigger = true; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG <use> instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur != this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, - originalEvent = event, - fixHook = jQuery.event.fixHooks[ event.type ] || {}, - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - } - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== document.activeElement && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === document.activeElement && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === "undefined" ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, - - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; - - if ( rkeyEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; - } - - if ( rmouseEvent.test( name ) ) { - jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; - } -}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2012 jQuery Foundation and other contributors - * Released under the MIT license - * http://sizzlejs.com/ - */ -(function( window, undefined ) { - -var i, - cachedruns, - Expr, - getText, - isXML, - compile, - hasDuplicate, - outermostContext, - - // Local document vars - setDocument, - document, - docElem, - documentIsXML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - sortOrder, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - support = {}, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Array methods - arr = [], - pop = arr.pop, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - operators = "([*^$|!~]?=)", - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rsibling = /[\x20\t\r\n\f]*[+~]/, - - rnative = /\{\s*\[native code\]\s*\}/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, - funescape = function( _, escaped ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - return high !== high ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Use a stripped-down slice if we can't use a native one -try { - slice.call( docElem.childNodes, 0 )[0].nodeType; -} catch ( e ) { - slice = function( i ) { - var elem, - results = []; - for ( ; (elem = this[i]); i++ ) { - results.push( elem ); - } - return results; - }; -} - -/** - * For feature detection - * @param {Function} fn The function to test for native support - */ -function isNative( fn ) { - return rnative.test( fn + "" ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var cache, - keys = []; - - return (cache = function( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - }); -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return fn( div ); - } catch (e) { - return false; - } finally { - // release memory in IE - div = null; - } -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( !documentIsXML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { - push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); - return results; - } - } - - // QSA path - if ( support.qsa && !rbuggyQSA.test(selector) ) { - old = true; - nid = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, slice.call( newContext.querySelectorAll( - newSelector - ), 0 ) ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsXML = isXML( doc ); - - // Check if getElementsByTagName("*") returns only elements - support.tagNameNoComments = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if attributes should be retrieved by attribute nodes - support.attributes = assert(function( div ) { - div.innerHTML = "<select></select>"; - var type = typeof div.lastChild.getAttribute("multiple"); - // IE8 returns a string for some attributes even when not present - return type !== "boolean" && type !== "string"; - }); - - // Check if getElementsByClassName can be trusted - support.getByClassName = assert(function( div ) { - // Opera can't find a second classname (in 9.6) - div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; - if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { - return false; - } - - // Safari 3.2 caches class attributes and doesn't catch changes - div.lastChild.className = "e"; - return div.getElementsByClassName("e").length === 2; - }); - - // Check if getElementById returns elements by name - // Check if getElementsByName privileges form controls or returns elements by ID - support.getByName = assert(function( div ) { - // Inject content - div.id = expando + 0; - div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; - docElem.insertBefore( div, docElem.firstChild ); - - // Test - var pass = doc.getElementsByName && - // buggy browsers will return fewer than the correct 2 - doc.getElementsByName( expando ).length === 2 + - // buggy browsers will return more than the correct 0 - doc.getElementsByName( expando + 0 ).length; - support.getIdNotName = !doc.getElementById( expando ); - - // Cleanup - docElem.removeChild( div ); - - return pass; - }); - - // IE6/7 return modified attributes - Expr.attrHandle = assert(function( div ) { - div.innerHTML = "<a href='#'></a>"; - return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && - div.firstChild.getAttribute("href") === "#"; - }) ? - {} : - { - "href": function( elem ) { - return elem.getAttribute( "href", 2 ); - }, - "type": function( elem ) { - return elem.getAttribute("type"); - } - }; - - // ID find and filter - if ( support.getIdNotName ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && !documentIsXML ) { - var m = context.getElementById( id ); - - return m ? - m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? - [m] : - undefined : - []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.tagNameNoComments ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Name - Expr.find["NAME"] = support.getByName && function( tag, context ) { - if ( typeof context.getElementsByName !== strundefined ) { - return context.getElementsByName( name ); - } - }; - - // Class - Expr.find["CLASS"] = support.getByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { - return context.getElementsByClassName( className ); - } - }; - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21), - // no need to also add to buggyMatches since matches checks buggyQSA - // A support test would require too much code (would include document ready) - rbuggyQSA = [ ":focus" ]; - - if ( (support.qsa = isNative(doc.querySelectorAll)) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explictly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = "<select><option selected=''></option></select>"; - - // IE8 - Some boolean attributes are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Opera 10-12/IE8 - ^= $= *= and empty values - // Should not select anything - div.innerHTML = "<input type='hidden' i=''/>"; - if ( div.querySelectorAll("[i^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || - docElem.mozMatchesSelector || - docElem.webkitMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - var compare; - - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { - if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { - if ( a === doc || contains( preferredDoc, a ) ) { - return -1; - } - if ( b === doc || contains( preferredDoc, b ) ) { - return 1; - } - return 0; - } - return compare & 4 ? -1 : 1; - } - - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE ); - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - // Always assume the presence of duplicates if sort doesn't - // pass them to our comparison function (as in Google Chrome). - hasDuplicate = false; - [0, 0].sort( sortOrder ); - support.detectDuplicates = hasDuplicate; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - // rbuggyQSA always contains :focus, so no need for an existence check - if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - var val; - - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - if ( !documentIsXML ) { - name = name.toLowerCase(); - } - if ( (val = Expr.attrHandle[ name ]) ) { - return val( elem ); - } - if ( documentIsXML || support.attributes ) { - return elem.getAttribute( name ); - } - return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? - name : - val && val.specified ? val.value : null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -// Document sorting and removing duplicates -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - i = 1, - j = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( ; (elem = results[i]); i++ ) { - if ( elem === results[ i - 1 ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -function siblingCheck( a, b ) { - var cur = a && b && a.nextSibling; - - for ( ; cur; cur = cur.nextSibling ) { - if ( cur === b ) { - return -1; - } - } - - return a ? 1 : -1; -} - -// Returns a function to use in pseudos for input types -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -// Returns a function to use in pseudos for buttons -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -// Returns a function to use in pseudos for positionals -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[4] ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeName ) { - if ( nodeName === "*" ) { - return function() { return true; }; - } - - nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.substr( result.length - check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifider - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsXML ? - elem.getAttribute("xml:lang") || elem.getAttribute("lang") : - elem.lang) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push( { - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && combinator.dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Nested matchers should use non-integer dirruns - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - for ( j = 0; (matcher = elementMatchers[j]); j++ ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - // `i` starts as a string, so matchedCount would equal "00" if there are no elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - for ( j = 0; (matcher = setMatchers[j]); j++ ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && !documentIsXML && - Expr.relative[ tokens[1].type ] ) { - - context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; - if ( !context ) { - return results; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, slice.call( seed, 0 ) ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - documentIsXML, - results, - rsibling.test( selector ) - ); - return results; -} - -// Deprecated -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Easy API for creating new setFilters -function setFilters() {} -Expr.filters = setFilters.prototype = Expr.pseudos; -Expr.setFilters = new setFilters(); - -// Initialize with the default document -setDocument(); - -// Override sizzle attribute retrieval -Sizzle.attr = jQuery.attr; -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -var runtil = /Until$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - isSimple = /^.[^:#\[\.,]*$/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, ret, self; - - if ( typeof selector !== "string" ) { - self = this; - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < self.length; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - ret = []; - for ( i = 0; i < this.length; i++ ) { - jQuery.find( selector, this[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( jQuery.unique( ret ) ); - ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true) ); - }, - - is: function( selector ) { - return !!selector && ( - typeof selector === "string" ? - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - rneedsContext.test( selector ) ? - jQuery( selector, this.context ).index( this[0] ) >= 0 : - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - cur = this[i]; - - while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - } - cur = cur.parentNode; - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -jQuery.fn.andSelf = jQuery.fn.addBack; - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( this.length > 1 && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem ) { - return ( elem === qualifier ) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /<tbody/i, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - manipulation_rcheckableType = /^(?:checkbox|radio)$/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "<select multiple='multiple'>", "</select>" ], - legend: [ 1, "<fieldset>", "</fieldset>" ], - area: [ 1, "<map>", "</map>" ], - param: [ 1, "<object>", "</object>" ], - thead: [ 1, "<table>", "</table>" ], - tr: [ 2, "<table><tbody>", "</tbody></table>" ], - col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], - td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - }, - - append: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.insertBefore( elem, this.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, false, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1></$2>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function( value ) { - var isFunc = jQuery.isFunction( value ); - - // Make sure that the elements are removed from the DOM before they are inserted - // this can help fix replacing a parent with child elements - if ( !isFunc && typeof value !== "string" ) { - value = jQuery( value ).not( this ).detach(); - } - - return this.domManip( [ value ], true, function( elem ) { - var next = this.nextSibling, - parent = this.parentNode; - - if ( parent && this.nodeType === 1 || this.nodeType === 11 ) { - - jQuery( this ).remove(); - - if ( next ) { - next.parentNode.insertBefore( elem, next ); - } else { - parent.appendChild( elem ); - } - } - }); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, table, callback ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, table ? self.html() : undefined ); - } - self.domManip( args, table, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - table = table && jQuery.nodeName( first, "tr" ); - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( - table && jQuery.nodeName( this[i], "table" ) ? - findOrAppend( this[i], "tbody" ) : - this[i], - node, - i - ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery.ajax({ - url: node.src, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -function findOrAppend( elem, tag ) { - return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - var attr = elem.getAttributeNode("type"); - elem.type = ( attr && attr.specified ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, data, e; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, srcElements, node, i, clone, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var contains, elem, tag, tmp, wrap, tbody, j, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted <tbody> from table fragments - if ( !jQuery.support.tbody ) { - - // String was a <table>, *may* have spurious <tbody> - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare <thead> or <tfoot> - wrap[1] === "<table>" && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var data, id, elem, type, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== "undefined" ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - } -}); -var curCSS, getStyles, iframe, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var elem, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - values[ index ] = jQuery._data( elem, "olddisplay" ); - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && elem.style.display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else if ( !values[ index ] && !isHidden( elem ) ) { - jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) ); - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - var bool = typeof state === "boolean"; - - return this.each(function() { - if ( bool ? state : isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Exclude the following css properties to add px - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("<iframe frameborder='0' width='0' height='0'/>") - .css( "cssText", "display:block !important" ) - ).appendTo( doc.documentElement ); - - // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse - doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; - doc.write("<!doctype html><html><body>"); - doc.close(); - - display = actualDisplay( nodeName, doc ); - iframe.detach(); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - } - - return display; -} - -// Called ONLY from within css_defaultDisplay -function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - display = jQuery.css( elem[0], "display" ); - elem.remove(); - return display; -} - -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - // certain elements can have dimension info if we invisibly show them - // however, it must have a current display style that would benefit from this - return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? - jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }) : - getWidthOrHeight( elem, name, extra ); - } - }, - - set: function( elem, value, extra ) { - var styles = extra && getStyles( elem ); - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, - jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles - ) : 0 - ); - } - }; -}); - -if ( !jQuery.support.opacity ) { - jQuery.cssHooks.opacity = { - get: function( elem, computed ) { - // IE uses filters for opacity - return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? - ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : - computed ? "1" : ""; - }, - - set: function( elem, value ) { - var style = elem.style, - currentStyle = elem.currentStyle, - opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", - filter = currentStyle && currentStyle.filter || style.filter || ""; - - // IE has trouble with opacity if it does not have layout - // Force it by setting the zoom level - style.zoom = 1; - - // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 - // if value === "", then remove inline opacity #12685 - if ( ( value >= 1 || value === "" ) && - jQuery.trim( filter.replace( ralpha, "" ) ) === "" && - style.removeAttribute ) { - - // Setting style.filter to null, "" & " " still leave "filter:" in the cssText - // if "filter:" is present at all, clearType is disabled, we want to avoid this - // style.removeAttribute is IE Only, but so apparently is this code path... - style.removeAttribute( "filter" ); - - // if there is no filter style applied in a css rule or unset inline opacity, we are done - if ( value === "" || currentStyle && !currentStyle.filter ) { - return; - } - } - - // otherwise, set new filter values - style.filter = ralpha.test( filter ) ? - filter.replace( ralpha, opacity ) : - filter + " " + opacity; - } - }; -} - -// These hooks cannot be added until DOM ready because the support test -// for it is not run until after DOM ready -jQuery(function() { - if ( !jQuery.support.reliableMarginRight ) { - jQuery.cssHooks.marginRight = { - get: function( elem, computed ) { - if ( computed ) { - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // Work around by temporarily setting element display to inline-block - return jQuery.swap( elem, { "display": "inline-block" }, - curCSS, [ elem, "marginRight" ] ); - } - } - }; - } - - // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 - // getComputedStyle returns percent when specified for top/left/bottom/right - // rather than make the css module depend on the offset module, we just check for it here - if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { - jQuery.each( [ "top", "left" ], function( i, prop ) { - jQuery.cssHooks[ prop ] = { - get: function( elem, computed ) { - if ( computed ) { - computed = curCSS( elem, prop ); - // if curCSS returns percentage, fallback to offset - return rnumnonpx.test( computed ) ? - jQuery( elem ).position()[ prop ] + "px" : - computed; - } - } - }; - }); - } - -}); - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.hidden = function( elem ) { - return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); - }; - - jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); - }; -} - -// These hooks are used by animate to expand properties -jQuery.each({ - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( !rmargin.test( prefix ) ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -}); -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function(){ - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - }) - .filter(function(){ - var type = this.type; - // Use .is(":disabled") so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !manipulation_rcheckableType.test( type ) ); - }) - .map(function( i, elem ){ - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val ){ - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - -//Serialize an array of form elements or a set of -//key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // Item is non-scalar (array or object), encode its numeric index. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} -var - // Document location - ajaxLocParts, - ajaxLocation, - - ajax_nonce = jQuery.now(), - - ajax_rquery = /\?/, - rhash = /#.*$/, - rts = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, - - // Keep a copy of the old load method - _load = jQuery.fn.load, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat("*"); - -// #8138, IE may throw an exception when accessing -// a field from window.location if document.domain has been set -try { - ajaxLocation = location.href; -} catch( e ) { - // Use the href attribute of an A element - // since IE will modify it given document.location - ajaxLocation = document.createElement( "a" ); - ajaxLocation.href = ""; - ajaxLocation = ajaxLocation.href; -} - -// Segment location into parts -ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; - - if ( jQuery.isFunction( func ) ) { - // For each dataType in the dataTypeExpression - while ( (dataType = dataTypes[i++]) ) { - // Prepend if requested - if ( dataType[0] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); - - // Otherwise append - } else { - (structure[ dataType ] = structure[ dataType ] || []).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - }); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - - var selector, type, response, - self = this, - off = url.indexOf(" "); - - if ( off >= 0 ) { - selector = url.slice( off, url.length ); - url = url.slice( 0, off ); - } - - // If it's a function - if ( jQuery.isFunction( params ) ) { - - // We assume that it's the callback - callback = params; - params = undefined; - - // Otherwise, build a param string - } else if ( params && typeof params === "object" ) { - type = "POST"; - } - - // If we have elements to modify, make the request - if ( self.length > 0 ) { - jQuery.ajax({ - url: url, - - // if "type" variable is undefined, then "GET" method will be used - type: type, - dataType: "html", - data: params - }).done(function( responseText ) { - - // Save response for use in complete callback - response = arguments; - - self.html( selector ? - - // If a selector was specified, locate the right elements in a dummy div - // Exclude scripts to avoid IE 'Permission Denied' errors - jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : - - // Otherwise use the full result - responseText ); - - }).complete( callback && function( jqXHR, status ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - }); - } - - return this; -}; - -// Attach a bunch of functions for handling common AJAX events -jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ - jQuery.fn[ type ] = function( fn ){ - return this.on( type, fn ); - }; -}); - -jQuery.each( [ "get", "post" ], function( i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - // shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - return jQuery.ajax({ - url: url, - type: method, - dataType: type, - data: data, - success: callback - }); - }; -}); - -jQuery.extend({ - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: ajaxLocation, - type: "GET", - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /xml/, - html: /html/, - json: /json/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": window.String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": jQuery.parseJSON, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - // URL without anti-cache param - cacheURL, - // Response headers - responseHeadersString, - responseHeaders, - // timeout handle - timeoutTimer, - // Cross-domain detection vars - parts, - // To know if global events are to be dispatched - fireGlobals, - // Loop variable - i, - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - // Callbacks context - callbackContext = s.context || s, - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks("once memory"), - // Status-dependent callbacks - statusCode = s.statusCode || {}, - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - // The jqXHR state - state = 0, - // Default abort message - strAbort = "canceled", - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( state === 2 ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( (match = rheaders.exec( responseHeadersString )) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; - } - } - match = responseHeaders[ key.toLowerCase() ]; - } - return match == null ? null : match; - }, - - // Raw string - getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - var lname = name.toLowerCase(); - if ( !state ) { - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( !state ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( state < 2 ) { - for ( code in map ) { - // Lazy-add the new callback in a way that preserves old ones - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } else { - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ).complete = completeDeferred.add; - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; - - // Remove hash character (#7531: and string promotion) - // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; - - // A cross-domain request is in order when we have a protocol:host:port mismatch - if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) - ); - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - fireGlobals = s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger("ajaxStart"); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - cacheURL = s.url; - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // If data is available, append data to url - if ( s.data ) { - cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add anti-cache in url if needed - if ( s.cache === false ) { - s.url = rts.test( cacheURL ) ? - - // If there is already a '_' parameter, set its value - cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : - - // Otherwise add one to the end - cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; - } - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { - // Abort if not done already and return - return jqXHR.abort(); - } - - // aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout(function() { - jqXHR.abort("timeout"); - }, s.timeout ); - } - - try { - state = 1; - transport.send( requestHeaders, done ); - } catch ( e ) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { - throw e; - } - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Called once - if ( state === 2 ) { - return; - } - - // State is "done" now - state = 2; - - // Clear timeout if it exists - if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // If successful, handle type chaining - if ( status >= 200 && status < 300 || status === 304 ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader("Last-Modified"); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader("etag"); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // If not modified - if ( status === 304 ) { - isSuccess = true; - statusText = "notmodified"; - - // If we have data - } else { - isSuccess = ajaxConvert( s, response ); - statusText = isSuccess.state; - success = isSuccess.data; - error = isSuccess.error; - isSuccess = !error; - } - } else { - // We extract error from statusText - // then normalize statusText and status for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger("ajaxStop"); - } - } - } - - return jqXHR; - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - } -}); - -/* Handles responses to an ajax request: - * - sets all responseXXX fields accordingly - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes, - responseFields = s.responseFields; - - // Fill responseXXX fields - for ( type in responseFields ) { - if ( type in responses ) { - jqXHR[ responseFields[type] ] = responses[ type ]; - } - } - - // Remove auto dataType and get content-type in the process - while( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -// Chain conversions given the request and the original response -function ajaxConvert( s, response ) { - - var conv, conv2, current, tmp, - converters = {}, - i = 0, - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(), - prev = dataTypes[ 0 ]; - - // Apply the dataFilter if provided - if ( s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - // Convert to each sequential dataType, tolerating list modification - for ( ; (current = dataTypes[++i]); ) { - - // There's only work to do if current dataType is non-auto - if ( current !== "*" ) { - - // Convert response if prev dataType is non-auto and differs from current - if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split(" "); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.splice( i--, 0, current ); - } - - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s["throws"] ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; - } - } - } - } - - // Update prev for next iteration - prev = current; - } - } - - return { state: "success", data: response }; -} -// Install script dataType -jQuery.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /(?:java|ecma)script/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -}); - -// Handle cache's special case and global -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - s.global = false; - } -}); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function(s) { - - // This transport only deals with cross domain requests - if ( s.crossDomain ) { - - var script, - head = document.head || jQuery("head")[0] || document.documentElement; - - return { - - send: function( _, callback ) { - - script = document.createElement("script"); - - script.async = true; - - if ( s.scriptCharset ) { - script.charset = s.scriptCharset; - } - - script.src = s.url; - - // Attach handlers for all browsers - script.onload = script.onreadystatechange = function( _, isAbort ) { - - if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { - - // Handle memory leak in IE - script.onload = script.onreadystatechange = null; - - // Remove the script - if ( script.parentNode ) { - script.parentNode.removeChild( script ); - } - - // Dereference the script - script = null; - - // Callback if not abort - if ( !isAbort ) { - callback( 200, "success" ); - } - } - }; - - // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending - // Use native DOM manipulation to avoid our domManip AJAX trickery - head.insertBefore( script, head.firstChild ); - }, - - abort: function() { - if ( script ) { - script.onload( undefined, true ); - } - } - }; - } -}); -var oldCallbacks = [], - rjsonp = /(=)\?(?=&|$)|\?\?/; - -// Default jsonp settings -jQuery.ajaxSetup({ - jsonp: "callback", - jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); - this[ callback ] = true; - return callback; - } -}); - -// Detect, normalize options and install callbacks for jsonp requests -jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { - - var callbackName, overwritten, responseContainer, - jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? - "url" : - typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" - ); - - // Handle iff the expected data type is "jsonp" or we have a parameter to set - if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { - - // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? - s.jsonpCallback() : - s.jsonpCallback; - - // Insert callback into url or form data - if ( jsonProp ) { - s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); - } else if ( s.jsonp !== false ) { - s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; - } - - // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { - if ( !responseContainer ) { - jQuery.error( callbackName + " was not called" ); - } - return responseContainer[ 0 ]; - }; - - // force json dataType - s.dataTypes[ 0 ] = "json"; - - // Install callback - overwritten = window[ callbackName ]; - window[ callbackName ] = function() { - responseContainer = arguments; - }; - - // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; - - // Save back as free - if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around - s.jsonpCallback = originalSettings.jsonpCallback; - - // save the callback name for future use - oldCallbacks.push( callbackName ); - } - - // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { - overwritten( responseContainer[ 0 ] ); - } - - responseContainer = overwritten = undefined; - }); - - // Delegate to script - return "script"; - } -}); -var xhrCallbacks, xhrSupported, - xhrId = 0, - // #5280: Internet Explorer will keep connections alive if we don't abort on unload - xhrOnUnloadAbort = window.ActiveXObject && function() { - // Abort all pending requests - var key; - for ( key in xhrCallbacks ) { - xhrCallbacks[ key ]( undefined, true ); - } - }; - -// Functions to create xhrs -function createStandardXHR() { - try { - return new window.XMLHttpRequest(); - } catch( e ) {} -} - -function createActiveXHR() { - try { - return new window.ActiveXObject("Microsoft.XMLHTTP"); - } catch( e ) {} -} - -// Create the request object -// (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ - function() { - return !this.isLocal && createStandardXHR() || createActiveXHR(); - } : - // For all other browsers, use the standard XMLHttpRequest object - createStandardXHR; - -// Determine support properties -xhrSupported = jQuery.ajaxSettings.xhr(); -jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -xhrSupported = jQuery.support.ajax = !!xhrSupported; - -// Create transport if the browser can provide an xhr -if ( xhrSupported ) { - - jQuery.ajaxTransport(function( s ) { - // Cross domain only allowed if supported through XMLHttpRequest - if ( !s.crossDomain || jQuery.support.cors ) { - - var callback; - - return { - send: function( headers, complete ) { - - // Get a new xhr - var handle, i, - xhr = s.xhr(); - - // Open the socket - // Passing null username, generates a login popup on Opera (#2865) - if ( s.username ) { - xhr.open( s.type, s.url, s.async, s.username, s.password ); - } else { - xhr.open( s.type, s.url, s.async ); - } - - // Apply custom fields if provided - if ( s.xhrFields ) { - for ( i in s.xhrFields ) { - xhr[ i ] = s.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( s.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( s.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !s.crossDomain && !headers["X-Requested-With"] ) { - headers["X-Requested-With"] = "XMLHttpRequest"; - } - - // Need an extra try/catch for cross domain requests in Firefox 3 - try { - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - } catch( err ) {} - - // Do send the request - // This may raise an exception which is actually - // handled in jQuery.ajax (so no try/catch here) - xhr.send( ( s.hasContent && s.data ) || null ); - - // Listener - callback = function( _, isAbort ) { - - var status, - statusText, - responseHeaders, - responses, - xml; - - // Firefox throws exceptions when accessing properties - // of an xhr when a network error occurred - // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) - try { - - // Was never called and is aborted or complete - if ( callback && ( isAbort || xhr.readyState === 4 ) ) { - - // Only called once - callback = undefined; - - // Do not keep as active anymore - if ( handle ) { - xhr.onreadystatechange = jQuery.noop; - if ( xhrOnUnloadAbort ) { - delete xhrCallbacks[ handle ]; - } - } - - // If it's an abort - if ( isAbort ) { - // Abort it manually if needed - if ( xhr.readyState !== 4 ) { - xhr.abort(); - } - } else { - responses = {}; - status = xhr.status; - xml = xhr.responseXML; - responseHeaders = xhr.getAllResponseHeaders(); - - // Construct response list - if ( xml && xml.documentElement /* #4958 */ ) { - responses.xml = xml; - } - - // When requesting binary data, IE6-9 will throw an exception - // on any attempt to access responseText (#11426) - if ( typeof xhr.responseText === "string" ) { - responses.text = xhr.responseText; - } - - // Firefox throws an exception when accessing - // statusText for faulty cross-domain requests - try { - statusText = xhr.statusText; - } catch( e ) { - // We normalize with Webkit giving an empty statusText - statusText = ""; - } - - // Filter status for non standard behaviors - - // If the request is local and we have data: assume a success - // (success with no data won't get notified, that's the best we - // can do given current implementations) - if ( !status && s.isLocal && !s.crossDomain ) { - status = responses.text ? 200 : 404; - // IE - #1450: sometimes returns 1223 when it should be 204 - } else if ( status === 1223 ) { - status = 204; - } - } - } - } catch( firefoxAccessException ) { - if ( !isAbort ) { - complete( -1, firefoxAccessException ); - } - } - - // Call complete if needed - if ( responses ) { - complete( status, statusText, responses, responseHeaders ); - } - }; - - if ( !s.async ) { - // if we're in sync mode we fire the callback - callback(); - } else if ( xhr.readyState === 4 ) { - // (IE6 & IE7) if it's in cache and has been - // retrieved directly we need to fire the callback - setTimeout( callback ); - } else { - handle = ++xhrId; - if ( xhrOnUnloadAbort ) { - // Create the active xhrs callbacks list if needed - // and attach the unload handler - if ( !xhrCallbacks ) { - xhrCallbacks = {}; - jQuery( window ).unload( xhrOnUnloadAbort ); - } - // Add to list of active xhrs callbacks - xhrCallbacks[ handle ] = callback; - } - xhr.onreadystatechange = callback; - } - }, - - abort: function() { - if ( callback ) { - callback( undefined, true ); - } - } - }; - } - }); -} -var fxNow, timerId, - rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [function( prop, value ) { - var end, unit, - tween = this.createTween( prop, value ), - parts = rfxnum.exec( value ), - target = tween.cur(), - start = +target || 0, - scale = 1, - maxIterations = 20; - - if ( parts ) { - end = +parts[2]; - unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - - // We need to compute starting value - if ( unit !== "px" && start ) { - // Iteratively approximate from a nonzero starting point - // Prefer the current property, because this process will be trivial if it uses the same units - // Fallback to end or a simple constant - start = jQuery.css( tween.elem, prop, true ) || end || 1; - - do { - // If previous iteration zeroed out, double until we get *something* - // Use a string for doubling factor so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // And breaking the loop if scale is unchanged or perfect, or if we've just had enough - } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); - } - - tween.unit = unit; - tween.start = start; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; - } - return tween; - }] - }; - -// Animations created synchronously will run synchronously -function createFxNow() { - setTimeout(function() { - fxNow = undefined; - }); - return ( fxNow = jQuery.now() ); -} - -function createTweens( animation, props ) { - jQuery.each( props, function( prop, value ) { - var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( collection[ index ].call( animation, prop, value ) ) { - - // we're done with this property - return; - } - } - }); -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = animationPrefilters.length, - deferred = jQuery.Deferred().always( function() { - // don't match elem in the :animated selector - delete tick.elem; - }), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ]); - - if ( percent < 1 && length ) { - return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; - } - }, - animation = deferred.promise({ - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - // if we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length ; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // resolve when we played the last frame - // otherwise, reject - if ( gotoEnd ) { - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - }), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - return result; - } - } - - createTweens( animation, props ); - - if ( jQuery.isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - }) - ); - - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = jQuery.camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( jQuery.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // not quite $.extend, this wont overwrite keys already present. - // also - reusing 'index' from above because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.split(" "); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length ; index++ ) { - prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); - } - }, - - prefilter: function( callback, prepend ) { - if ( prepend ) { - animationPrefilters.unshift( callback ); - } else { - animationPrefilters.push( callback ); - } - } -}); - -function defaultPrefilter( elem, props, opts ) { - /*jshint validthis:true */ - var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, - anim = this, - style = elem.style, - orig = {}, - handled = [], - hidden = elem.nodeType && isHidden( elem ); - - // handle queue: false promises - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always(function() { - // doing this makes sure that the complete handler will be called - // before this completes - anim.always(function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - }); - }); - } - - // height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE does not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - if ( jQuery.css( elem, "display" ) === "inline" && - jQuery.css( elem, "float" ) === "none" ) { - - // inline-level elements accept inline-block; - // block-level elements need to be inline with layout - if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { - style.display = "inline-block"; - - } else { - style.zoom = 1; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - if ( !jQuery.support.shrinkWrapBlocks ) { - anim.done(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - } - - - // show/hide pass - for ( index in props ) { - value = props[ index ]; - if ( rfxtypes.exec( value ) ) { - delete props[ index ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - continue; - } - handled.push( index ); - } - } - - length = handled.length; - if ( length ) { - dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - - // store state if its toggle - enables .stop().toggle() to "reverse" - if ( toggle ) { - dataShow.hidden = !hidden; - } - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; - jQuery._removeData( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( index = 0 ; index < length ; index++ ) { - prop = handled[ index ]; - tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); - orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; - } - } - } - } -} - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || "swing"; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { - return tween.elem[ tween.prop ]; - } - - // passing a non empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails - // so, simple values such as "10px" are parsed to Float. - // complex values such as "rotate(1rad)" are returned as is. - result = jQuery.css( tween.elem, tween.prop, "auto" ); - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - // use step hook for back compat - use cssHook if its there - use .style if its - // available and use plain properties where available - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Remove in 2.0 - this supports IE8's panic based approach -// to setting things on disconnected nodes - -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -}); - -jQuery.fn.extend({ - fadeTo: function( speed, to, easing, callback ) { - - // show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() - - // animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - doAnimation.finish = function() { - anim.stop( true ); - }; - // Empty animations, or finishing resolves immediately - if ( empty || jQuery._data( this, "finish" ) ) { - anim.stop( true ); - } - }; - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue && type !== false ) { - this.queue( type || "fx", [] ); - } - - return this.each(function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = jQuery._data( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // start the next in the queue if the last step wasn't forced - // timers currently will call their complete callbacks, which will dequeue - // but only if they were gotoEnd - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - }); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each(function() { - var index, - data = jQuery._data( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // enable finishing flag on private data - data.finish = true; - - // empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.cur && hooks.cur.finish ) { - hooks.cur.finish.call( this ); - } - - // look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // turn off finishing flag - delete data.finish; - }); - } -}); - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - attrs = { height: type }, - i = 0; - - // if we include width, step value is 1 to do all cssExpand values, - // if we don't include width, step value is 2 to skip over Left and Right - includeWidth = includeWidth? 1 : 0; - for( ; i < 4 ; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -// Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -}); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing - }; - - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; - - // normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p*Math.PI ) / 2; - } -}; - -jQuery.timers = []; -jQuery.fx = Tween.prototype.init; -jQuery.fx.tick = function() { - var timer, - timers = jQuery.timers, - i = 0; - - fxNow = jQuery.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - // Checks the timer has not already been removed - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) ) { - jQuery.fx.start(); - } -}; - -jQuery.fx.interval = 13; - -jQuery.fx.start = function() { - if ( !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); - } -}; - -jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 -}; - -// Back Compat <1.8 extension point -jQuery.fx.step = {}; - -if ( jQuery.expr && jQuery.expr.filters ) { - jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { - return elem === fn.elem; - }).length; - }; -} -jQuery.fn.offset = function( options ) { - if ( arguments.length ) { - return options === undefined ? - this : - this.each(function( i ) { - jQuery.offset.setOffset( this, options, i ); - }); - } - - var docElem, win, - box = { top: 0, left: 0 }, - elem = this[ 0 ], - doc = elem && elem.ownerDocument; - - if ( !doc ) { - return; - } - - docElem = doc.documentElement; - - // Make sure it's not a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return box; - } - - // If we don't have gBCR, just use 0,0 rather than error - // BlackBerry 5, iOS 3 (original iPhone) - if ( typeof elem.getBoundingClientRect !== "undefined" ) { - box = elem.getBoundingClientRect(); - } - win = getWindow( doc ); - return { - top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), - left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) - }; -}; - -jQuery.offset = { - - setOffset: function( elem, options, i ) { - var position = jQuery.css( elem, "position" ); - - // set position first, in-case top/left are set even on static elem - if ( position === "static" ) { - elem.style.position = "relative"; - } - - var curElem = jQuery( elem ), - curOffset = curElem.offset(), - curCSSTop = jQuery.css( elem, "top" ), - curCSSLeft = jQuery.css( elem, "left" ), - calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, - props = {}, curPosition = {}, curTop, curLeft; - - // need to be able to calculate position if either top or left is auto and position is either absolute or fixed - if ( calculatePosition ) { - curPosition = curElem.position(); - curTop = curPosition.top; - curLeft = curPosition.left; - } else { - curTop = parseFloat( curCSSTop ) || 0; - curLeft = parseFloat( curCSSLeft ) || 0; - } - - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); - } - - if ( options.top != null ) { - props.top = ( options.top - curOffset.top ) + curTop; - } - if ( options.left != null ) { - props.left = ( options.left - curOffset.left ) + curLeft; - } - - if ( "using" in options ) { - options.using.call( elem, props ); - } else { - curElem.css( props ); - } - } -}; - - -jQuery.fn.extend({ - - position: function() { - if ( !this[ 0 ] ) { - return; - } - - var offsetParent, offset, - parentOffset = { top: 0, left: 0 }, - elem = this[ 0 ]; - - // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent - if ( jQuery.css( elem, "position" ) === "fixed" ) { - // we assume that getBoundingClientRect is available when computed position is fixed - offset = elem.getBoundingClientRect(); - } else { - // Get *real* offsetParent - offsetParent = this.offsetParent(); - - // Get correct offsets - offset = this.offset(); - if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { - parentOffset = offsetParent.offset(); - } - - // Add offsetParent borders - parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); - parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); - } - - // Subtract parent offsets and element margins - // note: when an element has margin: auto the offsetLeft and marginLeft - // are the same in Safari causing offset.left to incorrectly be 0 - return { - top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), - left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) - }; - }, - - offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || document.documentElement; - while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { - offsetParent = offsetParent.offsetParent; - } - return offsetParent || document.documentElement; - }); - } -}); - - -// Create scrollLeft and scrollTop methods -jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { - var top = /Y/.test( prop ); - - jQuery.fn[ method ] = function( val ) { - return jQuery.access( this, function( elem, method, val ) { - var win = getWindow( elem ); - - if ( val === undefined ) { - return win ? (prop in win) ? win[ prop ] : - win.document.documentElement[ method ] : - elem[ method ]; - } - - if ( win ) { - win.scrollTo( - !top ? val : jQuery( win ).scrollLeft(), - top ? val : jQuery( win ).scrollTop() - ); - - } else { - elem[ method ] = val; - } - }, method, val, arguments.length, null ); - }; -}); - -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? - elem : - elem.nodeType === 9 ? - elem.defaultView || elem.parentWindow : - false; -} -// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods -jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { - // margin is only for outerHeight, outerWidth - jQuery.fn[ funcName ] = function( margin, value ) { - var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), - extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); - - return jQuery.access( this, function( elem, type, value ) { - var doc; - - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; - } - - // Get document width or height - if ( elem.nodeType === 9 ) { - doc = elem.documentElement; - - // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest - // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. - return Math.max( - elem.body[ "scroll" + name ], doc[ "scroll" + name ], - elem.body[ "offset" + name ], doc[ "offset" + name ], - doc[ "client" + name ] - ); - } - - return value === undefined ? - // Get width or height on the element, requesting but not forcing parseFloat - jQuery.css( elem, type, extra ) : - - // Set width or height on the element - jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable, null ); - }; - }); -}); -// Limit scope pollution from any deprecated API -// (function() { - -// })(); -// Expose jQuery to the global object -window.jQuery = window.$ = jQuery; - -// Expose jQuery as an AMD module, but only for AMD loaders that -// understand the issues with loading multiple versions of jQuery -// in a page that all might call define(). The loader will indicate -// they have special allowances for multiple jQuery versions by -// specifying define.amd.jQuery = true. Register as a named module, -// since jQuery can be concatenated with other files that may use define, -// but not use a proper concatenation script that understands anonymous -// AMD modules. A named AMD is safest and most robust way to register. -// Lowercase jquery is used because AMD module names are derived from -// file names, and jQuery is normally delivered in a lowercase file name. -// Do this after creating the global so that if an AMD module wants to call -// noConflict to hide this version of jQuery, it will work. -if ( typeof define === "function" && define.amd && define.amd.jQuery ) { - define( "jquery", [], function () { return jQuery; } ); -} - -})( window ); diff --git a/pandora_console/include/javascript/jquery-3.3.1.min.js b/pandora_console/include/javascript/jquery-3.3.1.min.js new file mode 100644 index 0000000000..4d9b3a2587 --- /dev/null +++ b/pandora_console/include/javascript/jquery-3.3.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w}); diff --git a/pandora_console/include/javascript/jquery-ui.min.js b/pandora_console/include/javascript/jquery-ui.min.js new file mode 100644 index 0000000000..25398a1674 --- /dev/null +++ b/pandora_console/include/javascript/jquery-ui.min.js @@ -0,0 +1,13 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n) +}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n; +this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s)) +}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"'")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?" ":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())} +},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog +},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1 +},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter; +this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip}); \ No newline at end of file diff --git a/pandora_console/include/javascript/jquery.cluetip.js b/pandora_console/include/javascript/jquery.cluetip.js index 711ec0c014..1f8ecc8091 100644 --- a/pandora_console/include/javascript/jquery.cluetip.js +++ b/pandora_console/include/javascript/jquery.cluetip.js @@ -202,7 +202,7 @@ ajaxSettings.complete = function() { imgCount = $('#cluetip-inner img').length; if (imgCount) { - $('#cluetip-inner img').load(function() { + $('#cluetip-inner img').on('load', function() { imgCount--; if (imgCount<1) { $('#cluetip-waitimage').hide(); diff --git a/pandora_console/include/javascript/jquery.contextMenu.js b/pandora_console/include/javascript/jquery.contextMenu.js index f591d98312..0da2622768 100644 --- a/pandora_console/include/javascript/jquery.contextMenu.js +++ b/pandora_console/include/javascript/jquery.contextMenu.js @@ -1124,7 +1124,7 @@ var // currently active contextMenu trigger // reset and apply changes in the end because nested // elements' widths wouldn't be calculatable otherwise if (!nested) { - $menu.find('ul').andSelf().css({ + $menu.find('ul').addBack().css({ position: '', display: '', minWidth: '', diff --git a/pandora_console/include/javascript/jquery.pandora.js b/pandora_console/include/javascript/jquery.pandora.js index 55e1d0004f..bd0da308c4 100644 --- a/pandora_console/include/javascript/jquery.pandora.js +++ b/pandora_console/include/javascript/jquery.pandora.js @@ -26,7 +26,8 @@ $.fn.showMessage = function (msg) { return $(this).hide ().empty () - .text (msg) + // here, previously .text (msg) + .html (msg) .slideDown (); }; }) (jQuery); @@ -34,7 +35,9 @@ $(document).ready (function () { $("a#show_messages_dialog").click (function () { jQuery.post ("ajax.php", - {"page": "operation/messages/message_list"}, + { + "page": "operation/messages/message_list" + }, function (data, status) { $("#dialog_messages").hide () .empty () @@ -49,9 +52,8 @@ $(document).ready (function () { }, width: 700, height: 300 - }) - .show (); - }, + }).show (); + }, "html" ); @@ -59,46 +61,17 @@ $(document).ready (function () { }); $("a.show_systemalert_dialog").click (function () { + $('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" ); + $("#opacidad").css('opacity', 0.5); + jQuery.post ("ajax.php", - {"page": "include/ajax/config.ajax", - "token_name": 'visual_animation' - }, - function (data, status) { - if(data){ - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.001;z-index:1'></div>" ); - jQuery.post ("ajax.php", - {"page": "operation/system_alert"}, - function (data, status) { - - $("#alert_messages").css('width','auto'); - $("#alert_messages").css('height','auto'); - - $("#alert_messages").css('visibility','hidden'); - $("#alert_messages").empty ().append (data); - $("#alert_messages").css('display','block'); - - setTimeout( function() { - animation_modal('alert_messages'); - }, 50); - }, - "html" - ); - return false; - } - else{ - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" ); - jQuery.post ("ajax.php", - {"page": "operation/system_alert"}, - function (data, status) { - $("#alert_messages").hide () - .empty () - .append (data) - .show (); - }, - "html" - ); - return false; - } + { + "page": "operation/system_alert"}, + function (data, status) { + $("#alert_messages").show(); + $("#alert_messages").empty ().append (data); + $("#alert_messages").css('opacity', 1); + }, "html" ); @@ -106,140 +79,63 @@ $(document).ready (function () { $("a.modalpopup").click (function () { var elem = $(this).attr("id"); - - jQuery.post ("ajax.php", - {"page": "include/ajax/config.ajax", - "token_name": 'visual_animation' - }, - function (data, status) { - if(data){ - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.001;z-index:1'></div>" ); - jQuery.post ("ajax.php", - { - "page": "general/alert_enterprise", - "message": elem - }, - function (data, status) { - - $("#alert_messages").css('width','auto'); - $("#alert_messages").css('height','auto'); - - $("#alert_messages").css('visibility','hidden'); - $("#alert_messages").empty ().append (data); - $("#alert_messages").css('display','block'); - - setTimeout( function() { - animation_modal('alert_messages'); - }, 50); - }, - "html" - ); - return false; - } - else{ - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" ); - jQuery.post ("ajax.php", - { - "page": "general/alert_enterprise", - "message": elem - }, - function (data, status) { - $("#alert_messages").hide () - .empty () - .append (data) - .show (); - }, - "html" - ); - return false; - } - }, - "html" - ); -}); + $('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" ); + $("#opacidad").css('opacity', 0.5); -// Creacion de ventana modal y botones - - $(".publienterprise").click (function () { - - var elem = $(this).attr("id"); - - jQuery.post ("ajax.php", - {"page": "include/ajax/config.ajax", - "token_name": 'visual_animation' - }, - function (data, status) { - - if(data){ - - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.001;z-index:1'></div>" ); - jQuery.post ("ajax.php", - { - "page": "general/alert_enterprise", - "message": elem - }, - function (data, status) { - - $("#alert_messages").css('width','auto'); - $("#alert_messages").css('height','auto'); - - $("#alert_messages").css('visibility','hidden'); - $("#alert_messages").empty ().append (data); - $("#alert_messages").css('display','block'); - - setTimeout( function() { - animation_modal('alert_messages'); - }, 50); - }, - "html" - ); - - return false; - - } - else{ - - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" ); - jQuery.post ("ajax.php", { "page": "general/alert_enterprise", "message": elem }, function (data, status) { - $("#alert_messages").hide () - .empty () - .append (data) - .show (); + $("#alert_messages").show(); + $("#alert_messages").empty ().append (data); + $("#alert_messages").css('opacity', 1); }, "html" ); - return false; - } - }, - "html" - ); -}); - - - $(".publienterprisehide").click (function () { - $('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" ); + }); + + // Creacion de ventana modal y botones + $(".publienterprise").click (function () { + var elem = $(this).attr("id"); + $('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" ); + $("#opacidad").css('opacity', 0.5); + jQuery.post ("ajax.php", { "page": "general/alert_enterprise", - "message": $(this).attr("id") + "message": elem }, function (data, status) { - $("#alert_messages").hide () - .empty () - .append (data) - .show (); + $("#alert_messages").show(); + $("#alert_messages").empty ().append (data); + $("#alert_messages").css('opacity', 1); }, "html" ); + return false; + }); + + + $(".publienterprisehide").click (function () { + var elem = $(this).attr("id"); + $('body').append( "<div id='opacidad' style='position:fixed;background:black;z-index:1'></div>" ); + $("#opacidad").css('opacity', 0.5); - + jQuery.post ("ajax.php", + { + "page": "general/alert_enterprise", + "message": elem + }, + function (data, status) { + $("#alert_messages").show(); + $("#alert_messages").empty ().append (data); + $("#alert_messages").css('opacity', 1); + }, + "html" + ); return false; }); @@ -335,43 +231,36 @@ $(document).ready (function () { forced_title_callback(); - $(document).on("scroll", function(){ + $(document).on("scroll", function(){ if(document.documentElement.scrollTop != 0 || document.body.scrollTop != 0){ if($('#head').css('position') =='fixed'){ if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','80px'); - } - else{ - $('#menu').css('top','60px'); - } - } - else{ - if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','20px'); - } - else{ - $('#menu').css('top','80px'); - } - } - } - else{ + $('#menu').css('top','80px'); + } else { + $('#menu').css('top','60px'); + } + } else { + if($('#menu').css('position') =='fixed'){ + $('#menu').css('top','20px'); + } else { + $('#menu').css('top','80px'); + } + } + } else { if($('#head').css('position') =='fixed'){ if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','80px'); - } - else{ - $('#menu').css('top','60px'); - } - } - else{ - if($('#menu').css('position') =='fixed'){ - $('#menu').css('top','80px'); - } - else{ - $('#menu').css('top','80px'); - } + $('#menu').css('top','80px'); + } else { + $('#menu').css('top','60px'); } + } else { + if($('#menu').css('position') =='fixed'){ + $('#menu').css('top','80px'); + } else { + $('#menu').css('top','80px'); + } + } } // if((document.documentElement.scrollTop != 0 || document.body.scrollTop != 0) && $('#menu').css('position') =='fixed'){ @@ -395,13 +284,16 @@ $(document).ready (function () { // $('#menu').css('top','60px'); // } // } -}); + }); -$("#alert_messages").draggable(); -$("#alert_messages").css({'left':+parseInt(screen.width/2)-parseInt($("#alert_messages").css('width'))/2+'px'}); + $("#alert_messages").draggable(); + $("#alert_messages").css({'left':+parseInt(screen.width/2)-parseInt($("#alert_messages").css('width'))/2+'px'}); }); + + + function forced_title_callback() { // Forced title code $('body').on('mouseenter', '.forced_title', function() { @@ -483,22 +375,3 @@ function forced_title_callback() { }); } -function animation_modal(id){ - - var animation_width = $("#"+id).css('width'); - var animation_height = $("#"+id).css('height'); - var posanimation_left = parseInt($('#'+id).css('left')); - var preanimation_left = parseInt($('#'+id).css('left'))+parseInt($('#'+id).css('left'))/2; - $('#'+id).css({'width':'100px','height':'60px'}); - $("#alert_messages").css('visibility','visible'); - $('#'+id).css('left',+preanimation_left+'px'); - $('#'+id).css('opacity',0); - - $('#opacidad').animate({'opacity':0.8},2000); - - $("#"+id) - .animate({'width': animation_width,'left':posanimation_left+'px','opacity':1},1000) - .animate({'height': animation_height},1000); - -} - diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 2b323a55f1..1ca0759801 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -594,12 +594,51 @@ function post_process_select_init_unit(name,selected) { function post_process_select_events_unit(name,selected) { $('.' + name + '_toggler').click(function() { - $('#' + name + '_select option[value=none]').attr("selected",true); - $('#text-' + name + '_text').val(""); + var value = $('#text-' + name + '_text').val(); + + var count = $('#' + name + '_select option') + .filter(function(i, item) { + + if ($(item).val() == value) + return true; + else return false; + }) + .length; + + if (count != 1) { + $('#' + name + '_select') + .append($("<option>").val(value).text(value)); + + } + + $('#' + name + '_select option') + .filter(function(i, item) { + + if ($(item).val() == value) + return true; + else return false; + }) + .prop("selected", true); + toggleBoth(name); + $('#text-' + name + '_text').focus(); + }); + + // When select a default period, is setted in seconds + $('#' + name + '_select').change(function() { + var value = $('#' + name + '_select').val(); + + $('.' + name).val(value); + $('#text-' + name + '_text').val(value); + }); + + $('#text-' + name + '_text').keyup (function () { + var value = $('#text-' + name + '_text').val(); + $('.' + name).val(value); }); } + function post_process_select_events(name) { $('.' + name + '_toggler').click(function() { var value = $('#text-' + name + '_text').val(); diff --git a/pandora_console/include/javascript/pandora_modules.js b/pandora_console/include/javascript/pandora_modules.js index 459776c5b2..eb282f7f58 100644 --- a/pandora_console/include/javascript/pandora_modules.js +++ b/pandora_console/include/javascript/pandora_modules.js @@ -320,8 +320,23 @@ function configure_modules_form () { $("#text-ff_event_normal").attr ("value", (data["min_ff_event_normal"] == 0) ? 0 : data["min_ff_event_normal"]); $("#text-ff_event_warning").attr ("value", (data["min_ff_event_warning"] == 0) ? 0 : data["min_ff_event_warning"]); $("#text-ff_event_critical").attr ("value", (data["min_ff_event_critical"] == 0) ? 0 : data["min_ff_event_critical"]); - $("#text-post_process").attr("value", (data["post_process"] == 0) ? 0 : data["post_process"]); - $("#text-unit").attr("value", (data["unit"] == '') ? '' : data["unit"]); + + // Shows manual input if post_process field is setted + if (data["post_process"] != 0) { + $('#post_process_manual').show(); + $('#post_process_default').hide(); + } + + $("#text-post_process_text").attr("value", (data["post_process"] == 0) ? 0 : data["post_process"]); + + // Shows manual input if unit field is setted + if (data["unit"] != '') { + $('#unit_manual').show(); + $('#unit_default').hide(); + } + + $("#text-unit_text").attr("value", (data["unit"] == '') ? '' : data["unit"]); + $("#checkbox-critical_inverse").prop ("checked", data["critical_inverse"]); $("#checkbox-warning_inverse").prop ("checked", data["warning_inverse"]); $("#component_loading").hide (); @@ -651,7 +666,7 @@ function add_macro_field(macro, row_model_id) { $macro_field.attr('class', 'macro_field'); // Get the number of fields already printed - var fields = $('.macro_field').size(); + var fields = $('.macro_field').length; // If is the first, we insert it after model row if (fields == 0) { diff --git a/pandora_console/include/languages/en_GB.mo b/pandora_console/include/languages/en_GB.mo index 180c5a5b6e..f585765553 100644 Binary files a/pandora_console/include/languages/en_GB.mo and b/pandora_console/include/languages/en_GB.mo differ diff --git a/pandora_console/include/languages/en_GB.po b/pandora_console/include/languages/en_GB.po index 2b962c9e81..3eab48be5d 100644 --- a/pandora_console/include/languages/en_GB.po +++ b/pandora_console/include/languages/en_GB.po @@ -8,14 +8,15 @@ msgstr "" "Project-Id-Version: pandora-fms\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-14 10:58+0100\n" -"PO-Revision-Date: 2018-03-08 01:13+0000\n" -"Last-Translator: Andi Chandler <Unknown>\n" +"PO-Revision-Date: 2018-12-07 12:05+0000\n" +"Last-Translator: Vanessa <vanessa.gil@artica.es>\n" "Language-Team: English (United Kingdom) <en_GB@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2018-03-14 11:43+0000\n" -"X-Generator: Launchpad (build 18571)\n" +"X-Launchpad-Export-Date: 2018-12-07 12:16+0000\n" +"X-Generator: Launchpad (build 18831)\n" +"Language: en_GB\n" #: ../../extensions/agents_alerts.php:55 #: ../../extensions/agents_modules.php:55 @@ -26,7 +27,7 @@ msgstr "" #: ../../enterprise/operation/services/services.list.php:345 #: ../../enterprise/operation/services/services.service.php:144 msgid "Last update" -msgstr "Latest update" +msgstr "Last update" #: ../../extensions/agents_alerts.php:95 #: ../../extensions/agents_modules.php:138 ../../general/ui/agents_list.php:69 @@ -305,11 +306,11 @@ msgstr "Full screen mode" #: ../../operation/visual_console/render_view.php:167 #: ../../enterprise/dashboard/main_dashboard.php:165 msgid "Back to normal mode" -msgstr "Return to windowed mode" +msgstr "Back to normal mode" #: ../../extensions/agents_alerts.php:133 msgid "Agents/Alerts" -msgstr "Agents / Alerts" +msgstr "Agents/Alerts" #: ../../extensions/agents_alerts.php:143 #: ../../operation/agentes/networkmap.dinamic.php:103 @@ -541,7 +542,7 @@ msgstr "Default action" #: ../../enterprise/godmode/policies/policy_alerts.php:465 #: ../../enterprise/godmode/policies/policy_external_alerts.php:278 msgid "Number of alerts match from" -msgstr "Number of alerts match from" +msgstr "Number of matching alerts" #: ../../extensions/agents_alerts.php:215 #: ../../godmode/alerts/alert_list.builder.php:99 @@ -569,7 +570,7 @@ msgstr "to" #: ../../godmode/alerts/configure_alert_action.php:101 #: ../../enterprise/godmode/alerts/alert_events.php:517 msgid "Create Action" -msgstr "Create Action" +msgstr "Create action" #: ../../extensions/agents_alerts.php:228 #: ../../extensions/agents_alerts.php:496 @@ -629,7 +630,7 @@ msgstr "Select" #: ../../godmode/alerts/alert_list.builder.php:131 #: ../../godmode/alerts/configure_alert_template.php:502 msgid "Create Template" -msgstr "Create Template" +msgstr "Create template" #: ../../extensions/agents_alerts.php:249 #: ../../godmode/alerts/alert_list.builder.php:134 @@ -1136,7 +1137,7 @@ msgstr "Action" #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1528 #: ../../enterprise/operation/agentes/policy_view.php:197 msgid "Last fired" -msgstr "Last fired" +msgstr "Last triggered" #: ../../extensions/agents_alerts.php:434 ../../extensions/net_tools.php:243 #: ../../godmode/agentes/agent_incidents.php:86 @@ -1318,7 +1319,7 @@ msgstr "Default" #: ../../enterprise/meta/monitoring/group_view.php:155 #: ../../enterprise/operation/agentes/policy_view.php:265 msgid "Alert fired" -msgstr "Alert fired" +msgstr "Alert triggered" #: ../../extensions/agents_alerts.php:475 #: ../../godmode/alerts/alert_list.list.php:643 @@ -1329,7 +1330,7 @@ msgstr "Alert fired" #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1540 #: ../../enterprise/operation/agentes/policy_view.php:265 msgid "times" -msgstr "amount of times alert was fired" +msgstr "times" #: ../../extensions/agents_alerts.php:479 #: ../../godmode/alerts/alert_list.list.php:647 @@ -1357,11 +1358,11 @@ msgstr "Alert disabled" #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1548 #: ../../enterprise/operation/agentes/policy_view.php:273 msgid "Alert not fired" -msgstr "Alert not fired" +msgstr "Alert not triggered" #: ../../extensions/agents_alerts.php:499 msgid "Agents/Alerts view" -msgstr "Agent/Alert view" +msgstr "Agents/Alerts view" #: ../../extensions/agents_modules.php:141 #: ../../godmode/agentes/modificar_agente.php:190 @@ -1639,12 +1640,12 @@ msgstr "More modules" #: ../../enterprise/dashboard/widgets/service_map.php:74 #: ../../enterprise/operation/services/services.service_map.php:114 msgid "Legend" -msgstr "Graph Key" +msgstr "Legend" #: ../../extensions/agents_modules.php:573 #: ../../include/functions_reporting_html.php:1448 msgid "Orange cell when the module has fired alerts" -msgstr "Cell turns orange when there are alerts for that module" +msgstr "Cell turns orange when there are alerts triggered for that module" #: ../../extensions/agents_modules.php:574 #: ../../include/functions_reporting_html.php:1449 @@ -1668,7 +1669,7 @@ msgstr "Cell turns grey when the module is in 'unknown' status" #: ../../extensions/agents_modules.php:578 msgid "Cell turns blue when the module is in 'not initialize' status" -msgstr "Cell turns blue when the module is in 'not initialise' status" +msgstr "Cell turns blue when the module is in 'not initialize' status" #: ../../extensions/agents_modules.php:590 msgid "Agents/Modules view" @@ -1693,11 +1694,11 @@ msgstr "IP" #: ../../extensions/api_checker.php:104 msgid "Pandora Console URL" -msgstr "Pandora Console URL" +msgstr "Pandora FMS Console URL" #: ../../extensions/api_checker.php:109 msgid "API Pass" -msgstr "API Pass" +msgstr "API password" #: ../../extensions/api_checker.php:114 #: ../../extensions/users_connected.php:77 ../../general/login_page.php:165 @@ -1955,13 +1956,13 @@ msgstr "Tables not installed correctly on the DB test." #: ../../extensions/db_status.php:184 msgid "Successful the DB Pandora has all tables" -msgstr "Success! Pandora DB contains all tables" +msgstr "Success! Pandora FMS DB contains all tables" #: ../../extensions/db_status.php:185 #, php-format msgid "Pandora DB could not retrieve all tables. The missing tables are (%s)" msgstr "" -"Pandora DB could not retrieve all tables. The missing tables are (%s)" +"Pandora FMS DB could not retrieve all tables. The missing tables are (%s)" #: ../../extensions/db_status.php:195 ../../extensions/db_status.php:251 msgid "You can execute this SQL query for to fix." @@ -1982,7 +1983,7 @@ msgstr "Database interface" #: ../../extensions/dbmanager.php:149 msgid "Execute SQL" -msgstr "Run SQL query" +msgstr "Execute SQL query" #: ../../extensions/dbmanager.php:196 ../../godmode/menu.php:341 msgid "DB interface" @@ -1998,11 +1999,11 @@ msgstr "Upload extension" #: ../../extensions/extension_uploader.php:64 msgid "Success to upload extension" -msgstr "Successfully uploaded extension" +msgstr "Extension uploaded successfully" #: ../../extensions/extension_uploader.php:65 msgid "Fail to upload extension" -msgstr "Failed to upload extension" +msgstr "Error uploading the extension" #: ../../extensions/extension_uploader.php:73 msgid "Upload extension" @@ -2014,7 +2015,7 @@ msgstr "Upload the extension as a zip file." #: ../../extensions/extension_uploader.php:77 msgid "Upload enterprise extension" -msgstr "Upload enterprise extension" +msgstr "Upload Enterprise extension" #: ../../extensions/extension_uploader.php:85 #: ../../extensions/plugin_registration.php:43 @@ -2630,7 +2631,7 @@ msgstr "Size" #: ../../extensions/files_repo/files_repo_list.php:61 #: ../../include/functions_filemanager.php:581 msgid "Last modification" -msgstr "Previous modification" +msgstr "Last modification" #: ../../extensions/files_repo/files_repo_list.php:86 msgid "Copy to clipboard" @@ -2982,8 +2983,8 @@ msgstr "Attachment directory is not writable by HTTP Server" #, php-format msgid "Please check that the web server has write rights on the %s directory" msgstr "" -"Please check if the web server has writing permissions on the %s directory " -"or not." +"Please check whether the web server has writing permissions on the %s " +"directory or not." #: ../../extensions/files_repo/functions_files_repo.php:229 msgid "The file could not be copied" @@ -2999,7 +3000,7 @@ msgstr "There was an error updating the file." #: ../../extensions/files_repo.php:91 msgid "Extension not installed" -msgstr "Extension not installed." +msgstr "Extension not installed" #: ../../extensions/files_repo.php:104 ../../extensions/files_repo.php:187 #: ../../enterprise/extensions/ipam.php:213 @@ -3021,7 +3022,7 @@ msgstr "File repository manager" #: ../../extensions/files_repo.php:133 ../../include/functions.php:2214 #: ../../include/functions.php:2217 msgid "The file exceeds the maximum size" -msgstr "Maximum filesize exceeded" +msgstr "The file exceeds the maximum size." #: ../../extensions/files_repo.php:166 #: ../../godmode/agentes/planned_downtime.list.php:107 @@ -3139,17 +3140,17 @@ msgstr "Insert data" #: ../../extensions/insert_data.php:93 msgid "You haven't privileges for insert data in the agent." -msgstr "You don't have the necessary privileges to add data to the agent" +msgstr "You don't have the necessary privileges to add data to the agent." #: ../../extensions/insert_data.php:130 #, php-format msgid "Can't save agent (%s), module (%s) data xml." -msgstr "Can't save (%s) agent, module (%s) xml data" +msgstr "Cannot save agent (%s), module (%s) XML data" #: ../../extensions/insert_data.php:137 #, php-format msgid "Save agent (%s), module (%s) data xml." -msgstr "(%s) Agent saved, module (%s) xml data" +msgstr "(%s) agent saved, (%s) module XML data" #: ../../extensions/insert_data.php:146 #, php-format @@ -3159,10 +3160,10 @@ msgid "" "date;value<newline>date;value<newline>... The date in CSV is in " "format Y/m/d H:i:s." msgstr "" -"Please check if the directory \"%s\" is can be written on by the apache " -"user. <br /><br />The CSV file format is " -"date;value<newline>date;value<newline>... The date in CSV has a " -"Y/m/d H:i:s format." +"Please check if the directory '%s' can be written on by the Apache user. <br " +"/><br />The CSV file format is " +"date;value<newline>date;value<newline>... The date in CSV has " +"the following format: Y/m/d H:i:s" #: ../../extensions/insert_data.php:180 ../../extensions/insert_data.php:181 #: ../../include/ajax/module.php:785 @@ -3476,7 +3477,7 @@ msgstr "Insert Data" #: ../../extensions/module_groups.php:39 msgid "Number fired of alerts" -msgstr "Number of alerts fired" +msgstr "Number of alerts triggered" #: ../../extensions/module_groups.php:46 #: ../../godmode/massive/massive_add_alerts.php:174 @@ -3491,52 +3492,52 @@ msgstr "Alert template" #: ../../extensions/module_groups.php:168 msgid "Combined table of agent group and module group" -msgstr "Agent group and module group combined table" +msgstr "Combined table of agent group and module group" #: ../../extensions/module_groups.php:171 msgid "" "This table shows in columns the modules group and in rows agents group. The " "cell shows all modules" msgstr "" -"This table shows module groups in the columns, and agent groups in the rows. " -"Cells show all modules." +"This table shows module groups in columns, and agent groups in rows. Cells " +"show all modules." #: ../../extensions/module_groups.php:297 msgid "" "Orange cell when the module group and agent have at least one alarm fired." msgstr "" -"Cell is orange when the module and agent groups have at least one alarm " -"fired." +"Cell turns orange when the module and agent groups have at least one alarm " +"triggered." #: ../../extensions/module_groups.php:298 msgid "" "Red cell when the module group and agent have at least one module in " "critical status and the others in any status" msgstr "" -"Cell is red when the module and agent groups have at least one module in " -"critical status although others may be in any status." +"Cell turns red when the module and agent groups have at least one module in " +"critical status. The others may be in any status." #: ../../extensions/module_groups.php:299 msgid "" "Yellow cell when the module group and agent have at least one in warning " "status and the others in grey or green status" msgstr "" -"Cell is yellow when module and agent groups have at least one module in " -"warning status, although others may be in green or grey status." +"Cell turns yellow when module and agent groups have at least one module in " +"warning status. The others may be in green or grey status." #: ../../extensions/module_groups.php:300 msgid "" "Green cell when the module group and agent have all modules in OK status" msgstr "" -"Cell is green when the module and agent groups have all modules in normal " -"status." +"Cell turns green when all modules in the module and agent groups are in " +"normal status." #: ../../extensions/module_groups.php:301 msgid "" "Grey cell when the module group and agent have at least one in unknown " "status and the others in green status" msgstr "" -"Cell is grey when the module and agent groups have at least one module in " +"Cell turns grey when the module and agent groups have at least one module in " "unknown status and the rest in normal status." #: ../../extensions/module_groups.php:302 @@ -3544,8 +3545,8 @@ msgid "" "Blue cell when the module group and agent have all modules in not init " "status." msgstr "" -"Cell is blue if the module and agent groups all have modules in non-" -"initialised status." +"Cell turns blue if all modules in the module and agent groups are in non-" +"initialized status." #: ../../extensions/module_groups.php:307 msgid "There are no defined groups or module groups" @@ -3575,7 +3576,7 @@ msgstr "Traceroute" #: ../../extensions/net_tools.php:124 msgid "Ping host & Latency" -msgstr "Ping host and retrieve latency values" +msgstr "Ping host & Latency" #: ../../extensions/net_tools.php:125 msgid "SNMP Interface status" @@ -3669,7 +3670,7 @@ msgstr "Interface" #: ../../extensions/net_tools.php:273 ../../extensions/net_tools.php:348 msgid "Config Network Tools" -msgstr "Config Network Tools" +msgstr "Configure Network Tools" #: ../../extensions/net_tools.php:294 ../../extensions/net_tools.php:295 msgid "Set the paths." @@ -3681,7 +3682,7 @@ msgstr "Traceroute path" #: ../../extensions/net_tools.php:316 msgid "If it is empty, Pandora searchs the traceroute system." -msgstr "If empty, Pandora will search the traceroute system" +msgstr "If empty, Pandora FMS will search the traceroute system" #: ../../extensions/net_tools.php:319 msgid "Ping path" @@ -3689,7 +3690,7 @@ msgstr "Ping path" #: ../../extensions/net_tools.php:320 msgid "If it is empty, Pandora searchs the ping system." -msgstr "If empty, Pandora will search the ping system" +msgstr "If empty, Pandora FMS will search the ping system" #: ../../extensions/net_tools.php:323 msgid "Nmap path" @@ -3697,7 +3698,7 @@ msgstr "Nmap path" #: ../../extensions/net_tools.php:324 msgid "If it is empty, Pandora searchs the nmap system." -msgstr "If empty, Pandora will search the nmap system." +msgstr "If empty, Pandora FMS will search the Nmap system." #: ../../extensions/net_tools.php:327 msgid "Dig path" @@ -3705,7 +3706,7 @@ msgstr "Dig path" #: ../../extensions/net_tools.php:328 msgid "If it is empty, Pandora searchs the dig system." -msgstr "If empty, Pandora will search the dig system" +msgstr "If empty, Pandora FMS will search the dig system" #: ../../extensions/net_tools.php:331 msgid "Snmpget path" @@ -3713,7 +3714,7 @@ msgstr "Snmpget path" #: ../../extensions/net_tools.php:332 msgid "If it is empty, Pandora searchs the snmpget system." -msgstr "If empty, Pandora will search the snmpget system" +msgstr "If empty, Pandora FMS will search the snmpget system" #: ../../extensions/net_tools.php:337 #: ../../godmode/reporting/reporting_builder.list_items.php:308 @@ -3746,7 +3747,7 @@ msgstr "System logfile viewer" msgid "" "Use this tool to view your Pandora FMS logfiles directly on the console" msgstr "" -"Use this tool to view your Pandora FMS logfiles directly on the console" +"Use this tool to view your Pandora FMS logfiles directly on the console." #: ../../extensions/pandora_logs.php:74 msgid "" @@ -3763,7 +3764,7 @@ msgstr "System logfiles" #: ../../extensions/plugin_registration.php:26 #: ../../extensions/plugin_registration.php:33 msgid "Plugin registration" -msgstr "Plug-in registration" +msgstr "Plugin registration" #: ../../extensions/plugin_registration.php:30 msgid "Plugin Registration" @@ -3785,7 +3786,7 @@ msgstr "" "\t\t\t\t\t\tPlease refer to the official documentation on how to obtain and " "use Pandora FMS Server Plugins.\n" "\t\t\t\t\t\t<br><br>You can get more plugins from our <a " -"href='http://pandorafms.com/Library/Library/'>Public Resource Library</a> " +"href='http://pandorafms.com/Library/Library/'>Public Resource Library</a>. " #: ../../extensions/plugin_registration.php:84 msgid "Cannot load INI file" @@ -3797,19 +3798,19 @@ msgstr "Exec plugin not found. Aborting!" #: ../../extensions/plugin_registration.php:120 msgid "Plugin already registered. Aborting!" -msgstr "Plug-in already registered. Aborting!" +msgstr "Plugin already registered. Aborting!" #: ../../extensions/plugin_registration.php:291 msgid "Plug-in Remote Registered unsuccessfull" -msgstr "Remote plug-in registry unsuccessful" +msgstr "Remote plugin registry unsuccessful" #: ../../extensions/plugin_registration.php:293 msgid "Please check the syntax of file \"plugin_definition.ini\"" -msgstr "Please check syntax for \"plugin_definition.ini\" file" +msgstr "Please check syntax for 'plugin_definition.ini' file" #: ../../extensions/plugin_registration.php:417 msgid "Module plugin registered" -msgstr "Module plug-in registered" +msgstr "Module plugin registered" #: ../../extensions/plugin_registration.php:422 #: ../../godmode/agentes/module_manager_editor_plugin.php:50 @@ -3826,7 +3827,7 @@ msgstr "Registered successfully" #: ../../extensions/plugin_registration.php:432 msgid "Register plugin" -msgstr "Register Plugin" +msgstr "Register plugin" #: ../../extensions/realtime_graphs.php:29 #: ../../extensions/realtime_graphs.php:136 @@ -3835,27 +3836,27 @@ msgstr "Real-time graphs" #: ../../extensions/realtime_graphs.php:61 msgid "Pandora Server CPU" -msgstr "Pandora Server CPU" +msgstr "Pandora FMS Server CPU" #: ../../extensions/realtime_graphs.php:62 msgid "Pandora Server Pending packets" -msgstr "Pending packages from Pandora Server" +msgstr "Pending packages from Pandora FMS Server" #: ../../extensions/realtime_graphs.php:63 msgid "Pandora Server Disk IO Wait" -msgstr "Pandora Server Disk IO Wait" +msgstr "Pandora FMS Server Disk IO Wait" #: ../../extensions/realtime_graphs.php:64 msgid "Pandora Server Apache load" -msgstr "Pandora Server Apache load" +msgstr "Pandora FMS Server Apache load" #: ../../extensions/realtime_graphs.php:65 msgid "Pandora Server MySQL load" -msgstr "Pandora Server MySQL load" +msgstr "Pandora FMS Server MySQL load" #: ../../extensions/realtime_graphs.php:66 msgid "Pandora Server load" -msgstr "Pandora Server load" +msgstr "Pandora FMS Server load" #: ../../extensions/realtime_graphs.php:67 msgid "SNMP Interface throughput" @@ -4002,16 +4003,16 @@ msgstr "" #: ../../extensions/resource_registration.php:82 msgid "Error the report haven't name." -msgstr "Error. The report is unnamed" +msgstr "Error: the report is unnamed." #: ../../extensions/resource_registration.php:88 msgid "Error the report haven't group." -msgstr "Error. The report is not in any available group." +msgstr "Error: the report is not in any available group." #: ../../extensions/resource_registration.php:98 #, php-format msgid "Success create '%s' report." -msgstr "successfully created '%s' report" +msgstr "Report '%s' created successfully" #: ../../extensions/resource_registration.php:99 #, php-format @@ -4072,7 +4073,7 @@ msgstr "Success creating the '%s' visual map" #: ../../extensions/resource_registration.php:429 #, php-format msgid "Error create '%s' visual map." -msgstr "'Error creating the '%s' visual map" +msgstr "Error creating the '%s' visual map" #: ../../extensions/resource_registration.php:535 #, php-format @@ -4099,7 +4100,7 @@ msgstr "Error creating the '%s' agent item on the visual map" #: ../../extensions/resource_registration.php:792 #, php-format msgid "Success create '%s' component." -msgstr "Success creating '%s' component." +msgstr "Success creating '%s' component" #: ../../extensions/resource_registration.php:793 #, php-format @@ -4125,11 +4126,11 @@ msgid "" "<br><br>You can get more resurces in our <a href='%s'>Public Resource " "Library</a>" msgstr "" -"This extension makes registering resource templates easier. Here you can " -"upload a resource template in Pandora FMS 3.x format (.ptr files). Please " -"refer to our documentation for more information on how to obtain and use " -"Pandora FMS' resources. <br><br>You can get more resurces in our <a " -"href='%s'>Public Resource Library</a>" +"This extension makes registering resource templates easier. You can upload a " +"resource template in Pandora FMS 3.x format (.ptr files) here. Please refer " +"to our documentation for more information on how to obtain and use Pandora " +"FMS resources. <br><br>You can get more resources in our <a href='%s'>Public " +"Resource Library</a>." #: ../../extensions/resource_registration.php:872 #: ../../enterprise/include/functions_policies.php:4285 @@ -4152,7 +4153,7 @@ msgstr "Pandora FMS Diagnostic tool" #: ../../extras/pandora_diag.php:94 msgid "Pandora status info" -msgstr "Pandora status info" +msgstr "Pandora FMS status info" #: ../../extras/pandora_diag.php:123 msgid "PHP setup" @@ -4180,6 +4181,10 @@ msgid "" "maintenance daemon is running. It' very important to \n" "keep up-to-date database to get the best performance and results in Pandora" msgstr "" +"(*) Please check your Pandora FMS Server setup and be sure that the database " +"maintenance daemon is running. It is very important to \n" +"keep the database up to date in order to get the best performance and " +"results in Pandora FMS." #: ../../general/alert_enterprise.php:96 msgid "" @@ -4192,6 +4197,14 @@ msgid "" "target='_blanck' style='color: #82b92e; font-size: 10pt; text-decoration: " "underline;'>Download the official documentation</a>" msgstr "" +"This is the online help for Pandora FMS console. This help is – in best " +"cases – just a brief contextual help, and is not intended to teach you how " +"to use Pandora FMS. Official documentation of Pandora FMS is about 900 " +"pages, and you probably do not need to read it entirely, but sure, you " +"should download it and take a look.<br><br>\n" +"\t<a href='https://pandorafms.org/en/docs/monitoring-documentation/' " +"target='_blanck' style='color: #82b92e; font-size: 10pt; text-decoration: " +"underline;'>Download the official documentation</a>" #: ../../general/alert_enterprise.php:103 msgid "" @@ -4201,9 +4214,9 @@ msgid "" "logs of Pandora System Database" msgstr "" "Access to this page is restricted to authorized users only, please contact " -"system administrator if you need assistance. <br/> <br/>\n" +"the system administrator if you need assistance. <br/> <br/>\n" "\tPlease know that all attempts to access this page are recorded in security " -"logs of Pandora System Database" +"logs of Pandora FMS System Database." #: ../../general/alert_enterprise.php:114 msgid "" @@ -4213,9 +4226,9 @@ msgid "" "migrations tools for future versions) automatically." msgstr "" "The Update Manager client is included on Pandora FMS. It helps system " -"administrators update their Pandora FMS automatically, since the Update " -"Manager retrieves new modules, new plugins and new features (even full " -"migrations tools for future versions) automatically." +"administrators to update Pandora FMS automatically, since the Update Manager " +"retrieves new modules, new plugins and new features (even full migrations " +"tools for future versions) automatically." #: ../../general/alert_enterprise.php:117 msgid "" @@ -4242,7 +4255,7 @@ msgstr "" "The Enterprise version comes with a different update system, with fully " "tested, professionally-supported packages, and our support team is there to " "help you in case of problems or queries. Update Manager is another feature " -"present in the Enterprise version and not included in the OpenSource " +"included in the Enterprise version and not included in the OpenSource " "version. There are lots of advanced business-oriented features contained in " "Pandora FMS Enterprise Edition. For more information visit <a " "href=\"http://pandorafms.com\">pandorafms.com</a>" @@ -4256,10 +4269,10 @@ msgid "" "tools for future versions) automatically." msgstr "" "The new <a href=\"http://updatemanager.sourceforge.net\">Update Manager</a> " -"client is included on Pandora FMS. It helps system administrators update " +"client is included on Pandora FMS. It helps system administrators to update " "their Pandora FMS automatically, since the Update Manager retrieves new " -"modules, new plugins and new features (even full migrations tools for future " -"versions) automatically." +"modules, new plugins and new features automatically (even full migrations " +"tools for future versions)." #: ../../general/alert_enterprise.php:131 msgid "" @@ -4293,14 +4306,14 @@ msgid "" "systems, individually or through policies.\n" " <br><br><img style='width:105px' src='" msgstr "" -"The community version doesn't have the ability to define your own library of " +"In the community version, you won't be able to define your own library of " "local modules, or distribute it to remote agents. You need to make those " "changes individually on each agent, which is possible by using external " -"tools and time and effort. Nor can it distribute local plugins, or have " -"access to the library of enterprise plugins to monitor applications such as " -"VMWare, RHEV or Informix among others. The Enterprise version will have all " -"this, plus the ability to distribute and manage your own local modules on " -"your systems, individually or through policies.\n" +"tools and which requires time and effort. It cannot distribute local " +"plugins, or have access to the library of Enterprise plugins to monitor " +"applications such as VMWare, RHEV or Informix among others. The Enterprise " +"version includes all this, as well as the ability to distribute and manage " +"your own local modules on your systems, individually or through policies.\n" " <br><br><img style='width:105px' src='" #: ../../general/alert_enterprise.php:145 @@ -4315,9 +4328,9 @@ msgstr "" "Do you want to consolidate all your system monitoring? Do you have many " "systems, making it difficult to manage them in a comprehensive manner? Would " "you like to deploy monitoring, alerts and even local plugins with a single " -"click? Pandora FMS Enterprise Policies are exactly what you need; you'll " -"save time, effort and annoyances. More information <a " -"href='pandorafms.com'>pandorafms.com</a>" +"click? Pandora FMS Enterprise Policies are exactly what you need. You will " +"save time and effort, and avoid problems. More information at <a " +"href='pandorafms.com'>pandorafms.com</a>." #: ../../general/alert_enterprise.php:148 msgid "" @@ -4327,9 +4340,9 @@ msgid "" "working with events, event correlation will take you to a new level." msgstr "" "Pandora FMS Enterprise also features event correlation. Through correlation " -"you can generate realtime alerts and / or new events based on logical rules. " -"This allows you to automate troubleshooting. If you know the value of " -"working with events, event correlation will take you to a new level." +"you can generate real-time alerts and/or new events based on logical rules. " +"This allows you to automate troubleshooting. If you know how important it is " +"to work with events, event correlation will take you to a new level." #: ../../general/alert_enterprise.php:151 msgid "" @@ -4372,7 +4385,7 @@ msgid "" "Version for a professional supported system." msgstr "" "This system is heavily loaded. OpenSource version could get a lot more " -"agents but fine tuning requires knowledge and time. Checkout the Enterprise " +"agents but fine tuning requires knowledge and time. Check out the Enterprise " "Version for a professional supported system." #: ../../general/alert_enterprise.php:163 @@ -4383,8 +4396,8 @@ msgid "" "Enterprise Version for a professional supported system." msgstr "" "This system has too many modules per agent. OpenSource version could manage " -"thousands of modules, but is not recommended to have more than 40 modules " -"per agent. This configuration has B/A modules per agent. Checkout the " +"thousands of modules, but it is not recommended to have more than 40 modules " +"per agent. This configuration has B/A modules per agent. Check out the " "Enterprise Version for a professional supported system." #: ../../general/alert_enterprise.php:166 @@ -4397,17 +4410,18 @@ msgid "" msgstr "" "Too many remote modules have been detected on this system. OpenSource " "version could manage thousands of modules, but performance is limited on " -"high amounts of SNMP or ICMP requests. Checkout the Enterprise Version for a " -"professional supported system with improved capacity on network monitoring, " -"including distributed servers." +"high amounts of SNMP or ICMP requests. Check out the Enterprise Version for " +"a professionally supported system with improved capacity on network " +"monitoring, including distributed servers." #: ../../general/alert_enterprise.php:169 msgid "" "This system has too much events in the database. Checkout database purge " "options. Checkout the Enterprise Version for a professional supported system." msgstr "" -"This system has too many events in the database. Checkout database purge " -"options. Checkout the Enterprise Version for a professional supported system." +"This system has too many events in the database. Explore database purge " +"options. Check out the Enterprise Version for a professionally supported " +"system." #: ../../general/alert_enterprise.php:172 msgid "" @@ -4416,7 +4430,7 @@ msgid "" "correlation alerts to simplify the alerting system and have easier " "administration and increased performance." msgstr "" -"You have defined a high number of alerts, this may cause you performance " +"You have defined a high number of alerts, this may cause performance " "problems in the future. In the Enterprise version, you can use event " "correlation alerts to simplify the alerting system and have easier " "administration and increased performance." @@ -4466,12 +4480,13 @@ msgstr "" "or UNIX). File collections can be propagated\n" "\t\t along with policies in order to be used by a group of agents, using a " "'package' of scripts and modules.\n" -"\t\tFirst we learn how to use file collections in the agent's view, then, " -"how to conduct it manually, agent by agent, without using collections,\n" -"\t\t and how to do the same thing by using policies.Our first task is to " +"\t\tYou first need to learn how to use file collections in the agent view, " +"then, how to conduct it manually, agent by agent, without using " +"collections,\n" +"\t\t and how to do the same thing by using policies. Your first task is to " "arrange a compilation of files. In order to do this, please go to the agent " "\n" -"\t\t manager. Subsequently, we're going to see a 'sub option' called " +"\t\t manager. Subsequently, you will see a 'sub option' called " "'Collections'. Please click on it in order to create a new collection as we " "can see on \n" "\t\t the picture below. " @@ -4496,8 +4511,8 @@ msgid "" "\t\t You're able to create custom fields by klicking on 'Administration' -> " "'Manage monitoring' -> 'Manage custom fields'. " msgstr "" -"Custom fields are an easy way to customize an agent's information.\n" -"\t\t It's possible to create custom fields by clicking on 'Administration' -" +"Custom fields are an easy way to customize agent information.\n" +"\t\t It is possible to create custom fields by clicking on 'Administration' -" "> 'Manage monitoring' -> 'Manage custom fields'. " #: ../../general/firts_task/custom_graphs.php:23 @@ -4528,7 +4543,7 @@ msgstr "" "\t\t\t\tPandora FMS Graphs display data in real time. They are generated " "every time the operator requires any of them and display the updated " "status.\n" -"\t\t\t\tThere are two types of graphs: The agent's automated graphs and the " +"\t\t\t\tThere are two types of graphs: the agent automated graphs and the " "graphs the user customizes by using one or more modules to do so." #: ../../general/firts_task/fields_manager.php:25 @@ -4545,9 +4560,9 @@ msgid "" "\t\t\t\tYou're able to create custom fields by klicking on 'Administration' -" "> 'Manage monitoring' -> 'Manage custom fields'. " msgstr "" -"Custom fields are an easy way to customize an agent's information\n" -"\t\t\t\tA user is able to create custom fields by clicking on " -"'Administration' -> 'Manage monitoring' -> 'Manage custom fields'. " +"Custom fields are an easy way to customize agent information\n" +"\t\t\t\tA user can create custom fields by clicking on 'Administration' -> " +"'Manage monitoring' -> 'Manage custom fields'. " #: ../../general/firts_task/fields_manager.php:32 msgid "Create Fields " @@ -4555,7 +4570,7 @@ msgstr "Create Fields " #: ../../general/firts_task/incidents.php:25 msgid "There are no incidents defined yet." -msgstr "There are no incidents defined yet." +msgstr "There are no issues defined yet." #: ../../general/firts_task/incidents.php:32 #: ../../godmode/agentes/configurar_agente.php:441 @@ -4564,12 +4579,12 @@ msgstr "There are no incidents defined yet." #: ../../operation/incidents/incident_statistics.php:30 #: ../../operation/menu.php:391 msgid "Incidents" -msgstr "Incidents" +msgstr "Issues" #: ../../general/firts_task/incidents.php:35 #: ../../general/firts_task/incidents.php:44 msgid "Create Incidents" -msgstr "Create Incidents" +msgstr "Create issues" #: ../../general/firts_task/incidents.php:36 msgid "" @@ -4588,23 +4603,22 @@ msgid "" "\t\t" msgstr "" "Besides receiving and processing data to monitor systems or applications, \n" -"\t\t\tyou're also required to monitor possible incidents which might take " -"place on these subsystems within the system's monitoring process.\n" -"\t\t\tFor it, the Pandora FMS team has designed an incident manager from " -"which any user is able to open incidents, \n" -"\t\t\tthat explain what's happened on the network, and update them with " -"comments and files, at any time, in case there is a need to do so.\n" +"\t\t\tyou also need to monitor possible issues which might take place on " +"these subsystems within the system monitoring process.\n" +"\t\t\tTo do so, the Pandora FMS team has designed an issue manager from " +"which any user is able to open issues, \n" +"\t\t\tthat explain what has happened on the network, and update them with " +"comments and files, at any time, if necessary.\n" "\t\t\tThis system allows users to work as a team, along with different roles " -"and work-flow systems which allow an incident to be \n" +"and work-flow systems which allow an issue to be \n" "\t\t\tmoved from one group to another, and members from different groups and " -"different people could work on the same incident, sharing information and " -"files.\n" +"different people to work on the same issue, sharing information and files.\n" "\t\t" #: ../../general/firts_task/map_builder.php:26 #: ../../godmode/reporting/map_builder.php:336 msgid "There are no visual console defined yet." -msgstr "There are no visual consoles defined yet" +msgstr "There are no visual consoles defined yet." #: ../../general/firts_task/map_builder.php:32 #: ../../godmode/reporting/map_builder.php:43 @@ -4634,12 +4648,12 @@ msgid "" "'static image', 'percentage bar', 'module graph' and 'simple value'. " msgstr "" "Pandora FMS allows users to create visual maps on which each user is able to " -"create his or her own monitoring map.\n" +"create a personal monitoring map.\n" "\t\t\tThe new visual console editor is much more practical, although the " -"prior visual console editor had its advantages. \n" -"\t\t\tOn the new visual console, we've been successful in imitating the " -"sensation and touch of a drawing application like GIMP. \n" -"\t\t\tWe've also simplified the editor by dividing it into several subject-" +"previous visual console editor had its advantages. \n" +"\t\t\tOn the new visual console, we have successfully imitated the sensation " +"and touch of a drawing application like GIMP. \n" +"\t\t\tWe have also simplified the editor by dividing it into several subject-" "divided tabs named 'Data', 'Preview', 'Wizard', 'List of Elements' and " "'Editor'.\n" "\t\t\tThe items the Pandora FMS Visual Map was designed to handle are " @@ -4647,7 +4661,7 @@ msgstr "" #: ../../general/firts_task/network_map.php:23 msgid "There are no network map defined yet." -msgstr "There are no network maps defined yet" +msgstr "There are no network maps defined yet." #: ../../general/firts_task/network_map.php:30 msgid "Network Map" @@ -4667,7 +4681,7 @@ msgid "" "\t\t\t" msgstr "" "There is also an open-source version of the network map. \n" -"\t\t\t\t\t\t\t\tThis functionality allows graphically displaying the nodes " +"\t\t\t\t\t\t\t\tThis functionality allows a graphical display of the nodes " "and relations, agents, modules and groups available to the user. \n" "\t\t\t\t\t\t\t\tThere are three types of network maps:\n" "\t\t\t" @@ -4694,7 +4708,7 @@ msgstr "Policy Map (Only Enterprise version)" #: ../../general/firts_task/planned_downtime.php:21 msgid "There are no planned downtime defined yet." -msgstr "There are no planned downtime defined yet." +msgstr "There are no planned downtimes defined yet." #: ../../general/firts_task/planned_downtime.php:25 #: ../../godmode/agentes/planned_downtime.editor.php:43 @@ -4719,15 +4733,15 @@ msgid "" msgstr "" "Pandora FMS contains a scheduled downtime management system. \n" "\t\t\t\t\t\tThis system was designed to deactivate alerts during specific " -"intervals whenever there is down time by deactivating the agent.\n" -"\t\t\t\t\t\tIf an agent is deactivated, it doesn't gather information. " -"During down time, down-time intervals aren't taken into \n" -"\t\t\t\t\t\taccount for most metrics or report types, because agents don't " +"intervals whenever there is a downtime by deactivating the agent.\n" +"\t\t\t\t\t\tIf an agent is deactivated, it does not gather information. " +"During a downtime, down-time intervals are not taken into \n" +"\t\t\t\t\t\taccount for most metrics or report types, because agents do not " "contain any data within those intervals. " #: ../../general/firts_task/recon_view.php:21 msgid "There are no recon task defined yet." -msgstr "There are no recon task defined yet." +msgstr "There are no recon tasks defined yet." #: ../../general/firts_task/recon_view.php:25 #: ../../godmode/servers/manage_recontask_form.php:228 @@ -4757,13 +4771,12 @@ msgstr "" "The Recon Task definition for Pandora FMS is used to find new elements on " "the network. \n" "\t\tIf it detects any item, it will add that item into the monitoring " -"process, and if that item it is already being monitored, then it will \n" -"\t\tignore it or it will update its information.There are three types of " -"detection: Based on <strong id=\"fuerte\"> ICMP </strong>(pings), \n" +"process, and if that item is already being monitored, then it will \n" +"\t\tignore it or it will update its information. There are three types of " +"detection: based on <strong id=\"fuerte\"> ICMP </strong>(pings), \n" "\t\t<strong id=\"fuerte\">SNMP</strong> (detecting the topology of networks " -"and their interfaces), and other <strong id=\"fuerte\"> customized " -"</strong>\n" -"\t\ttype. You can define your own customized recon script." +"and their interfaces), and <strong id=\"fuerte\"> customized </strong>\n" +"\t\tdetection. You can define your own customized recon script." #: ../../general/firts_task/service_list.php:23 msgid "There are no services defined yet." @@ -4812,20 +4825,20 @@ msgid "" msgstr "" "A service is a way to group your IT resources based on their " "functionalities. \n" -"\t\t\t\t\t\tA service could be e.g. your official website, your CRM system, " -"your support application, or even your printers.\n" +"\t\t\t\t\t\tA service could be, for example, your official website, your CRM " +"system, your support application, or even your printers.\n" "\t\t\t\t\t\t Services are logical groups which can include hosts, routers, " "switches, firewalls, CRMs, ERPs, websites and numerous other services. \n" "\t\t\t\t\t\t By the following example, you're able to see more clearly what " "a service is:\n" -"\t\t\t\t\t\t\tA chip manufacturer sells computers by its website all around " -"the world. \n" -"\t\t\t\t\t\t\tHis company consists of three big departments: A management, " -"an on-line shop and support." +"\t\t\t\t\t\t\tA chip manufacturer sells computers through its website all " +"around the world. \n" +"\t\t\t\t\t\t\tHis company consists of three main departments: a management " +"department, an online shop and a support department." #: ../../general/firts_task/snmp_filters.php:21 msgid "There are no SNMP filter defined yet." -msgstr "There are no SNMP filter defined yet." +msgstr "There are no SNMP filters defined yet." #: ../../general/firts_task/snmp_filters.php:25 msgid "SNMP Filter" @@ -4849,14 +4862,14 @@ msgid "" "just the ones for the server are going to get ruled out automatically. " msgstr "" "Some systems receive a high number of traps. \n" -"\t\t\t\tWe're only interested in monitoring a tiny percentage of them. On " -"Pandora FMS versions 3.2 and above, \n" -"\t\t\t\tit's possible to filter the traps that the server retrieves in order " -"to avoid straining the application unnecessarily.\n" +"\t\t\t\tOur goal is only to monitor a small percentage of them. On Pandora " +"FMS versions 3.2 and above, \n" +"\t\t\t\tit is possible to filter the traps that the server retrieves in " +"order to avoid straining the application unnecessarily.\n" "\t\t\t\tIn order to define different filters, please go to 'Administration' -" "> 'Manage SNMP Console' and 'SNMP Filters'. \n" -"\t\t\t\tOne trap is going to run in conjunction with any of them - just the " -"ones for the server are going to get ruled out automatically. " +"\t\t\t\tOne trap runs in conjunction with any of them. Only traps for the " +"server will be ruled out automatically. " #: ../../general/firts_task/tags.php:21 msgid "There are no tags defined yet." @@ -4919,11 +4932,11 @@ msgid "" "\t\t\t\t\t\t\t\tThe user's access can be limited to modules with certain " "tags in this way. " msgstr "" -"On Pandora FMS version 5 and newer, access to modules can be configured by a " -"tagging system.\n" +"On Pandora FMS version 5 and newer, access to modules can be configured with " +"a tagging system.\n" "\t\t\t\t\t\t\t\tTags are configured on the system and are assigned to the " "chosen modules. \n" -"\t\t\t\t\t\t\t\tA user's access can therefore be restricted to modules with " +"\t\t\t\t\t\t\t\tUser access can therefore be restricted to modules with " "certain tags. " #: ../../general/firts_task/transactional_list.php:23 @@ -4952,32 +4965,34 @@ msgstr "" "others following a user-defined design. This means that it is possible to " "coordinate several executions to check a target at a given time.\n" "\n" -"Transaction graphs represent the different processes within our " -"infrastructure that we use to deliver our service." +"Transaction graphs represent the different processes within the " +"infrastructure used to deliver our service." #: ../../general/firts_task/cluster_builder.php:32 msgid "There are no clusters defined yet." -msgstr "" +msgstr "There are no clusters defined yet." #: ../../general/firts_task/cluster_builder.php:37 #: ../../enterprise/godmode/reporting/cluster_list.php:25 msgid "Clusters" -msgstr "" +msgstr "Clusters" #: ../../general/firts_task/cluster_builder.php:40 #: ../../general/firts_task/cluster_builder.php:53 msgid "Create Cluster" -msgstr "" +msgstr "Create Cluster" #: ../../general/firts_task/cluster_builder.php:43 msgid "" "A cluster is a group of devices that provide the same service in high " "availability." msgstr "" +"A cluster is a group of devices that provide the same service in high " +"availability." #: ../../general/firts_task/cluster_builder.php:45 msgid "Depending on how they provide that service, we can find two types:" -msgstr "" +msgstr "There are two types, depending on how they provide that service:" #: ../../general/firts_task/cluster_builder.php:47 msgid "" @@ -4986,6 +5001,10 @@ msgid "" "it) are working. They must be working because if one stops working, it will " "overload the others." msgstr "" +"<b>Clusters to balance the service load</b>: these are active - active " +"(A/A) mode clusters. It means that all the nodes (or machines that compose " +"it) are working. They must be working because if one stops working, it will " +"overload the others." #: ../../general/firts_task/cluster_builder.php:49 msgid "" @@ -4998,6 +5017,14 @@ msgid "" "passive node is \"online\", so that in the case of a service failure in the " "master, the active node collects this information." msgstr "" +"<b>Clusters to guarantee service</b>: these are active - passive (A/P) mode " +"clusters. It means that one of the nodes (or machines that make up the " +"cluster) will be executed (primary) and another will not (secondary). When " +"the primary goes down, the secondary must take over and give the service " +"instead. Even though many of the elements of this cluster are active-" +"passive, it will also have active elements in both of them indicating that " +"the passive node is 'online', so that in the case of a service failure in " +"the master, the active node collects this information." #: ../../general/footer.php:48 ../../enterprise/meta/general/footer.php:30 #, php-format @@ -5014,7 +5041,7 @@ msgstr "® Ártica ST" #: ../../general/header.php:75 msgid "Blank characters are used as AND conditions" -msgstr "Blank characters are used as AND conditions" +msgstr "Blank characters are used as AND conditions." #: ../../general/header.php:90 ../../general/header.php:92 msgid "Enter keywords to search" @@ -5068,7 +5095,7 @@ msgstr "Disable autorefresh" #: ../../general/header.php:266 msgid "Sobre actualización de revisión menor" -msgstr "" +msgstr "About minor revision update" #: ../../general/header.php:269 #: ../../godmode/update_manager/update_manager.offline.php:63 @@ -5142,9 +5169,9 @@ msgid "" "learn more about Pandora FMS. Monitoring could be overwhelm, but take your " "time to learn how to use the power of Pandora FMS!" msgstr "" -"If this is your first time using Pandora FMS, we suggest a few links that'll " -"help you learn more about the software. Monitoring can be overwhelming, but " -"take your time to learn how to harness the power of Pandora FMS!" +"If this is your first time using Pandora FMS, we suggest a few links that " +"will help you learn more about the software. Monitoring can be overwhelming, " +"but take your time to learn how to harness the power of Pandora FMS!" #: ../../general/login_help_dialog.php:51 #: ../../general/login_help_dialog.php:53 @@ -5154,7 +5181,7 @@ msgstr "Online help" #: ../../general/login_help_dialog.php:59 #: ../../general/login_help_dialog.php:61 msgid "Enterprise version" -msgstr "Enterprise Edition" +msgstr "Enterprise version" #: ../../general/login_help_dialog.php:67 #: ../../general/login_help_dialog.php:69 ../../general/login_page.php:113 @@ -5177,7 +5204,7 @@ msgstr "Documentation" #: ../../general/login_help_dialog.php:86 msgid "Click here to don't show again this message" -msgstr "Don't show this message again" +msgstr "Do not show this message again" #: ../../general/login_identification_wizard.php:141 msgid "The Pandora FMS community wizard" @@ -5197,10 +5224,11 @@ msgid "" "Manager options" msgstr "" "When you subscribe to the Pandora FMS Update Manager service, you accept " -"that we register your Pandora instance as an identifier on the database " -"owned by Artica TS. This data will solely be used to provide you with " +"that we register your Pandora FMS instance as an identifier on the database " +"owned by Ártica ST. This data will solely be used to provide you with " "information about Pandora FMS and will not be conceded to third parties. You " -"can unregister from said database at any time from the Update Manager options" +"can unregister from this database at any time from the Update Manager " +"options." #: ../../general/login_identification_wizard.php:151 msgid "" @@ -5210,11 +5238,11 @@ msgid "" "not be conceded to third parties. You'll be able to unregister from said " "database at any time from the newsletter subscription options" msgstr "" -"In the same fashion, when subscribed to the newsletter you accept that your " -"email will pass on to a database property of Artica TS. This data will " -"solely be used to provide you with information about Pandora FMS and will " -"not be conceded to third parties. You can unregister from said database at " -"any time from the newsletter subscription options" +"Similarly, when subscribing to the newsletter you accept that your email " +"will be forwarded to a database owned by Ártica ST. This data will solely be " +"used to provide you with information about Pandora FMS and will not be " +"conceded to third parties. You can unregister from this database at any time " +"from the newsletter subscription options." #: ../../general/login_identification_wizard.php:156 #: ../../godmode/alerts/configure_alert_template.php:817 @@ -5246,7 +5274,7 @@ msgstr "Subscribe to our newsletter" #: ../../enterprise/operation/reporting/custom_reporting.php:24 #: ../../enterprise/operation/reporting/custom_reporting.php:78 msgid "Email" -msgstr "E-mail" +msgstr "Email" #: ../../general/login_identification_wizard.php:171 msgid "Required" @@ -5646,10 +5674,10 @@ msgid "" "them from your database by executing:<br><pre>DELETE FROM tconfig WHERE " "token = \"auth\";</pre>" msgstr "" -"If you have modified the auth system, the origin of this problem could be " -"that Pandora cannot override the authorization variables from the config " -"database. Please remove them from your database by executing " -":<br><pre>DELETE FROM tconfig WHERE token = \"auth\";</pre>" +"If you have modified the authentication system, the problem could be that " +"Pandora FMS cannot override the authorization variables from the " +"configuration database. Remove them from your database by " +"executing:<br><pre>DELETE FROM tconfig WHERE token = \"auth\";</pre>" #: ../../general/login_page.php:411 ../../include/functions_ui.php:3735 msgid "Empty configuration table" @@ -5668,10 +5696,20 @@ msgid "" "\t\tpermissions and HTTP server cannot read it. Please read documentation to " "fix this problem.</i>" msgstr "" +"Cannot load configuration variables from database. Please check your " +"database setup in the\n" +"\t\t<b>include/config.php</b> file.<i><br><br>\n" +"\t\tYour database schema has probably been created but there are is no data " +"in it: there is either a problem with the database access credentials or " +"your schema is out of date.\n" +"\t\t<br><br>Pandora FMS Console cannot find <i>include/config.php</i> or " +"this file has invalid\n" +"\t\tpermissions and HTTP server cannot read it. Please read documentation to " +"fix this problem.</i>" #: ../../general/login_page.php:419 ../../include/functions_ui.php:3743 msgid "No configuration file found" -msgstr "No configuration file found." +msgstr "No configuration file found" #: ../../general/login_page.php:420 msgid "" @@ -5680,12 +5718,16 @@ msgid "" "\t\tpermissions and HTTP server cannot read it. Please read documentation to " "fix this problem." msgstr "" +"Pandora FMS Console cannot find <i>include/config.php</i> or this file has " +"invalid\n" +"\t\tpermissions and HTTP server cannot read it. Please read the " +"documentation to fix this problem." #: ../../general/login_page.php:431 ../../include/functions_ui.php:3755 #, php-format msgid "You may try to run the %s<b>installation wizard</b>%s to create one." msgstr "" -"You may try running the %s<b>installation wizard</b>%s to create one." +"You may try executing the %s<b>installation wizard</b>%s to create one." #: ../../general/login_page.php:434 ../../include/functions_ui.php:3758 msgid "Installer active" @@ -5698,6 +5740,10 @@ msgid "" "\t\tPlease delete the <i>./install.php</i> file before running Pandora FMS " "Console." msgstr "" +"For security reasons, normal operation is not possible until you delete the " +"installation file.\n" +"\t\tPlease delete the <i>./install.php</i> file before running Pandora FMS " +"Console." #: ../../general/login_page.php:439 ../../include/functions_ui.php:3763 msgid "Bad permission for include/config.php" @@ -5715,8 +5761,9 @@ msgid "" msgstr "" "For security reasons, <i>config.php</i> must have restrictive permissions, " "and \"other\" users\n" -"\t\tshould not read it or write to it. It should be written only for owner\n" -"\t\t(usually www-data or http daemon user), normal operation is not possible " +"\t\tshould not read it or write on it. It should be written only by the " +"owner\n" +"\t\t(usually www-data or http daemon user). Normal operation is not possible " "until you change\n" "\t\tpermissions for <i>include/config.php</i> file. Please do it, it is for " "your security." @@ -5751,7 +5798,7 @@ msgid "" "instance successfully" msgstr "" "Please fill out the following information in order to configure your Pandora " -"FMS instance successfully" +"FMS instance successfully." #: ../../general/login_required.php:86 #: ../../godmode/setup/setup_general.php:52 @@ -5852,12 +5899,12 @@ msgid "" "Must have the same time zone as the system or database to avoid mismatches " "of time." msgstr "" -"Pandora FMS must be set to the same timezone as your system or database as " -"to avoid incoherences." +"Pandora FMS must be set to the same timezone as your system or database in " +"order to avoid inconsistency." #: ../../general/login_required.php:116 msgid "E-mail for receiving alerts" -msgstr "E-mail for receiving alerts" +msgstr "Email for receiving alerts" #: ../../general/login_required.php:124 msgid "Register" @@ -5901,10 +5948,10 @@ msgid "" "malfunction." msgstr "" "Username or password are incorrect. Please check that your CAPS LOCK key is " -"disabled, username and password are case sensitive <br><br> All actions, " -"included failed login attempts are registered in Pandora FMS System logs and " -"can be reviewed by all users. Please report any incident or malfunction to " -"an admin" +"disabled, username and password are case sensitive <br><br>. All actions, " +"included failed login attempts are registered in the Pandora FMS log system " +"and can be reviewed by all users. Please report any issue or malfunction to " +"an admin." #: ../../general/logon_ok.php:114 ../../general/logon_ok.php:318 msgid "Pandora FMS Overview" @@ -5951,7 +5998,7 @@ msgstr "Comments" #: ../../general/logon_ok.php:229 ../../general/logon_ok.php:426 msgid "This is your last activity in Pandora FMS console" -msgstr "This is your last activity performed on the Pandora FMS console" +msgstr "This is the last activity you performed on the Pandora FMS console." #: ../../general/noaccess2.php:18 ../../general/noaccess2.php:21 #: ../../mobile/index.php:232 ../../mobile/operation/agent.php:87 @@ -5967,7 +6014,7 @@ msgstr "This is your last activity performed on the Pandora FMS console" #: ../../enterprise/meta/general/metaconsole_no_activated.php:13 #: ../../enterprise/meta/general/noaccess.php:24 msgid "You don't have access to this page" -msgstr "You don't have access to this page" +msgstr "You do not have access to this page." #: ../../general/noaccess2.php:26 msgid "Access to this page is restricted" @@ -5986,10 +6033,10 @@ msgid "" "\t\t\tPlease know that all attempts to access this page are recorded in " "security logs of Pandora System Database" msgstr "" -"Access to this page is restricted to authorised users only, please contact " -"system administrator if you need assistance. <br/> <br/>\n" +"Access to this page is restricted to authorized users only, please contact " +"the system administrator if you need assistance. <br/> <br/>\n" "\t\t\tPlease know that all attempts to access this page are recorded on the " -"security logs of Pandora System Database" +"security logs of Pandora FMS database system." #: ../../general/pandora_help.php:24 msgid "Pandora FMS help system" @@ -6004,8 +6051,8 @@ msgid "" "Pandora FMS help system has been called with a help reference that currently " "don't exist. There is no help content to show." msgstr "" -"Pandora FMS' help wizard has been asked for a reference that currently " -"doesn't exist. There is no help content available for this topic." +"The Pandora FMS help wizard has been asked for a reference that currently " +"does not exist. There is no help content available for this topic." #: ../../general/ui/agents_list.php:80 ../../general/ui/agents_list.php:91 #: ../../godmode/agentes/modificar_agente.php:194 @@ -6084,7 +6131,7 @@ msgstr "No agents found" #: ../../godmode/admin_access_logs.php:33 msgid "Pandora audit" -msgstr "Pandora audit" +msgstr "Pandora FMS audit" #: ../../godmode/admin_access_logs.php:33 msgid "Review Logs" @@ -6160,8 +6207,7 @@ msgstr "Export to CSV " #: ../../operation/agentes/gis_view.php:55 msgid "" "There is no default map. Please go to the setup for to set a default map." -msgstr "" -"There is no default map. Please go to the setup in order to select one." +msgstr "There is no default map. Please go to setup in order to select one." #: ../../godmode/agentes/agent_conf_gis.php:50 #: ../../operation/agentes/gis_view.php:86 @@ -6169,7 +6215,7 @@ msgid "" "There is no GIS data for this agent, so it's positioned in default position " "of map." msgstr "" -"There is no GIS data for this agent, so it'll be found in its default " +"There is no GIS data for this agent, so it will be found in its default " "position on the map." #: ../../godmode/agentes/agent_conf_gis.php:53 @@ -6177,7 +6223,7 @@ msgid "" "When you change the Agent position, the agent automatically activates the " "'Ignore new GIS data' option" msgstr "" -"When you change the agent's position, the agent will automatically activate " +"When you change the position of the agent, it will automatically activate " "the 'Ignore new GIS data' option." #: ../../godmode/agentes/agent_conf_gis.php:60 @@ -6204,7 +6250,7 @@ msgstr "Ignore new GIS data:" #: ../../godmode/agentes/agent_incidents.php:67 msgid "No incidents associated to this agent" -msgstr "No incidents associated to this agent" +msgstr "No issues associated to this agent" #: ../../godmode/agentes/agent_incidents.php:87 #: ../../godmode/servers/manage_recontask.php:296 @@ -6212,7 +6258,7 @@ msgstr "No incidents associated to this agent" #: ../../operation/incidents/incident.php:337 #: ../../operation/incidents/incident_detail.php:244 msgid "Incident" -msgstr "Incident" +msgstr "Issue" #: ../../godmode/agentes/agent_incidents.php:88 #: ../../godmode/alerts/alert_list.list.php:127 @@ -6312,7 +6358,7 @@ msgstr "Agent name must be the same as the one defined on the console" #: ../../godmode/agentes/agent_manager.php:159 msgid "QR Code Agent view" -msgstr "View agent's QR code" +msgstr "View agent QR code" #: ../../godmode/agentes/agent_manager.php:166 #: ../../operation/agentes/estado_agente.php:173 ../../operation/menu.php:55 @@ -6322,11 +6368,11 @@ msgstr "Agent detail" #: ../../godmode/agentes/agent_manager.php:190 #: ../../enterprise/godmode/policies/policy_agents.php:626 msgid "This agent can be remotely configured" -msgstr "This agent can be configured remotely" +msgstr "This agent can be configured remotely." #: ../../godmode/agentes/agent_manager.php:193 msgid "You can remotely edit this agent configuration" -msgstr "Agent settings can be remotely edited" +msgstr "Agent settings can be remotely edited." #: ../../godmode/agentes/agent_manager.php:200 msgid "Delete agent" @@ -6845,8 +6891,8 @@ msgid "" "This mode allow Pandora FMS to disable all modules \n" "\t\tof this agent while the selected module is on CRITICAL status" msgstr "" -"This mode allow Pandora FMS to disable all modules \n" -"\t\tof this agent while the selected module is on CRITICAL status" +"This mode allows Pandora FMS to disable all the modules \n" +"\t\tof this agent while the selected module is on CRITICAL status." #: ../../godmode/agentes/agent_manager.php:346 #: ../../godmode/massive/massive_edit_agents.php:411 @@ -6947,7 +6993,7 @@ msgid "" "Delete this conf file implies that for restore you must reactive remote " "config in the local agent." msgstr "" -"Deleting this conf file means you will have to reactivate remote " +"Deleting this configuration file means you will have to reactivate remote " "configuration on the local agent in order to restore it." #: ../../godmode/agentes/agent_manager.php:400 @@ -6957,7 +7003,7 @@ msgstr "Agent icon" #: ../../godmode/agentes/agent_manager.php:400 msgid "Agent icon for GIS Maps." -msgstr "Agent icon for GIS Maps." +msgstr "Agent icon for GIS Maps" #: ../../godmode/agentes/agent_manager.php:438 #: ../../include/functions_treeview.php:674 @@ -7007,7 +7053,7 @@ msgstr "Advanced options" #: ../../godmode/agentes/agent_manager.php:467 #: ../../godmode/massive/massive_edit_agents.php:502 msgid "This field allows url insertion using the BBCode's url tag" -msgstr "This field allows url insertion using the BBCode's url tag" +msgstr "This field allows URL insertion using the BBCode URL tag." #: ../../godmode/agentes/agent_manager.php:469 #: ../../godmode/massive/massive_edit_agents.php:504 @@ -7246,12 +7292,12 @@ msgstr "No modules" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:66 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:61 msgid "The SNMP remote plugin doesnt seem to be installed" -msgstr "The remote SNMP plugin doesn't appear to be installed" +msgstr "The remote SNMP plugin does not appear to be installed." #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:66 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:61 msgid "It is necessary to use some features" -msgstr "It's necessary in order to access certain features" +msgstr "It is necessary in order to access certain features" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:66 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:61 @@ -7265,49 +7311,49 @@ msgstr "" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:258 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:253 msgid "Remote system doesnt support host SNMP information" -msgstr "The remote system doesn't support the host's SNMP information" +msgstr "The remote system does not support the host SNMP information." #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:303 #: ../../godmode/agentes/agent_wizard.snmp_interfaces_explorer.php:183 msgid "No agent selected or the agent does not exist" -msgstr "No agent selected or the agent does not exist" +msgstr "No agent selected or the agent does not exist." #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:343 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:335 msgid "The number of bytes read from this device since boot" -msgstr "The number of bytes read from this device since boot" +msgstr "Number of bytes read from this device since startup" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:345 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:337 msgid "The number of bytes written to this device since boot" -msgstr "The number of bytes written to this device since boot" +msgstr "Number of bytes written to this device since startup" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:347 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:339 msgid "The number of read accesses from this device since boot" -msgstr "The number of read accesses from this device since boot" +msgstr "Number of read accesses from this device since startup" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:349 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:341 msgid "The number of write accesses from this device since boot" -msgstr "The number of write accesses from this device since boot" +msgstr "Number of write accesses from this device since startup" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:524 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:516 #, php-format msgid "Check if the process %s is running or not" -msgstr "Check if the process %s is running or not" +msgstr "Check if the process %s is running" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:595 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:587 msgid "Disk use information" -msgstr "Disk use information" +msgstr "Disk usage information" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:666 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:656 #, php-format msgid "%s modules created succesfully" -msgstr "%s modules created succesfully" +msgstr "%s modules created successfully" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:671 #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:676 @@ -7328,7 +7374,7 @@ msgstr "%s modules already exist" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:690 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:680 msgid "Modules created succesfully" -msgstr "Modules successfully created." +msgstr "Modules successfully created" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:708 #: ../../godmode/agentes/agent_wizard.snmp_interfaces_explorer.php:426 @@ -7397,7 +7443,7 @@ msgstr "SNMP version" #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:741 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_interfaces_explorer.php:459 msgid "Auth user" -msgstr "Authenticate user" +msgstr "User authentication" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:758 #: ../../godmode/agentes/agent_wizard.snmp_interfaces_explorer.php:475 @@ -7408,7 +7454,7 @@ msgstr "Authenticate user" #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:743 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_interfaces_explorer.php:461 msgid "Auth password" -msgstr "Authenticate password" +msgstr "Password authentication" #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:762 #: ../../godmode/agentes/agent_wizard.snmp_interfaces_explorer.php:479 @@ -7546,7 +7592,7 @@ msgstr "No data found" #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:773 msgid "" "If the device is a network device, try with the SNMP Interfaces wizard" -msgstr "If it's a network device, try with the SNMP interface wizard" +msgstr "If it is a network device, try with the SNMP interface wizard." #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:817 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:801 @@ -7590,7 +7636,7 @@ msgstr "Wizard mode" #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:826 #: ../../enterprise/godmode/policies/policy_agent_wizard.snmp_explorer.php:831 msgid "SNMP remote plugin is necessary for this feature" -msgstr "The remote SNMP plugin is necessary to run this feature" +msgstr "The remote SNMP plugin is necessary to execute this feature." #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:879 #: ../../godmode/agentes/agent_wizard.snmp_explorer.php:881 @@ -7901,7 +7947,7 @@ msgstr "No agent alias specified" #: ../../godmode/agentes/configurar_agente.php:291 msgid "Could not be created, because name already exists" -msgstr "Could not be created, because name already exists" +msgstr "Could not be created, because the name already exists." #: ../../godmode/agentes/configurar_agente.php:304 #: ../../godmode/agentes/modificar_agente.php:53 @@ -8040,12 +8086,12 @@ msgstr "Agent manager" #: ../../godmode/agentes/configurar_agente.php:637 #: ../../godmode/servers/modificar_server.php:155 msgid "Conf file deleted successfully" -msgstr "Conf file deleted successfully" +msgstr "Configuration file deleted successfully" #: ../../godmode/agentes/configurar_agente.php:638 #: ../../godmode/servers/modificar_server.php:156 msgid "Could not delete conf file" -msgstr "Could not delete conf file" +msgstr "Could not delete configuration file" #: ../../godmode/agentes/configurar_agente.php:648 #: ../../godmode/agentes/planned_downtime.editor.php:380 @@ -8082,7 +8128,7 @@ msgstr "Successfully created" #: ../../godmode/agentes/configurar_agente.php:678 #: ../../godmode/agentes/configurar_agente.php:683 msgid "No data to normalize" -msgstr "No data to normalise" +msgstr "No data to normalize" #: ../../godmode/agentes/configurar_agente.php:687 #, php-format @@ -8092,7 +8138,7 @@ msgstr "Deleted data above %f" #: ../../godmode/agentes/configurar_agente.php:688 #, php-format msgid "Error normalizing module %s" -msgstr "Error normalising module %s" +msgstr "Error normalizing module %s" #: ../../godmode/agentes/configurar_agente.php:836 msgid "There was a problem updating the agent" @@ -8134,30 +8180,27 @@ msgstr "Successfully updated" #: ../../godmode/agentes/configurar_agente.php:921 msgid "There was a problem loading the agent" -msgstr "There was a problem loading the agent" +msgstr "Error loading the agent" #: ../../godmode/agentes/configurar_agente.php:1380 msgid "" "There was a problem updating module. Another module already exists with the " "same name." msgstr "" -"There was an issue updating the module: there's another module with the same " -"name" +"Error updating the module: there is another module with the same name." #: ../../godmode/agentes/configurar_agente.php:1383 msgid "" "There was a problem updating module. Some required fields are missed: (name)" -msgstr "" -"There was an issue updating the module: some required fields are missing: " -"(name)" +msgstr "Error updating the module: some required fields are missing (name)" #: ../../godmode/agentes/configurar_agente.php:1386 msgid "There was a problem updating module. \"No change\"" -msgstr "A problem occurred when updating the module. \"No change\"" +msgstr "Error updating the module: \"no change\"" #: ../../godmode/agentes/configurar_agente.php:1391 msgid "There was a problem updating module. Processing error" -msgstr "A problem occurred when updating the module. Processing error" +msgstr "Error updating the module: processing error" #: ../../godmode/agentes/configurar_agente.php:1411 msgid "Module successfully updated" @@ -8167,20 +8210,16 @@ msgstr "Module successfully updated" msgid "" "There was a problem adding module. Another module already exists with the " "same name." -msgstr "" -"A problem occurred when adding the module. There's another module with the " -"same name." +msgstr "Error adding the module: there is another module with the same name" #: ../../godmode/agentes/configurar_agente.php:1545 msgid "" "There was a problem adding module. Some required fields are missed : (name)" -msgstr "" -"There was a problem adding the module: some required fields are missing: " -"(name)" +msgstr "Error adding the module: some required fields are missing (name)" #: ../../godmode/agentes/configurar_agente.php:1550 msgid "There was a problem adding module. Processing error" -msgstr "There was a problem adding the module. Processing error." +msgstr "Error adding the module: processing error" #: ../../godmode/agentes/configurar_agente.php:1568 #: ../../godmode/reporting/graph_builder.php:277 @@ -8189,11 +8228,11 @@ msgstr "Module added successfully" #: ../../godmode/agentes/configurar_agente.php:1687 msgid "There was a problem deleting the module" -msgstr "There was a problem deleting the module" +msgstr "Error deleting the module" #: ../../godmode/agentes/configurar_agente.php:1690 msgid "Module deleted succesfully" -msgstr "Module deleted succesfully" +msgstr "Module deleted successfully" #: ../../godmode/agentes/configurar_agente.php:1704 #: ../../enterprise/godmode/policies/policy_modules.php:1174 @@ -8264,17 +8303,17 @@ msgstr "Could not be disabled" #: ../../godmode/agentes/configurar_agente.php:1790 #: ../../include/functions_api.php:7721 msgid "Save by Pandora Console" -msgstr "Save from Pandora Console" +msgstr "Save from Pandora FMS Console" #: ../../godmode/agentes/configurar_agente.php:1805 #: ../../include/functions_api.php:7722 msgid "Update by Pandora Console" -msgstr "Update from Pandora Console" +msgstr "Update from Pandora FMS Console" #: ../../godmode/agentes/configurar_agente.php:1818 #: ../../include/functions_api.php:7723 msgid "Insert by Pandora Console" -msgstr "Insert from Pandora Console" +msgstr "Insert from Pandora FMS Console" #: ../../godmode/agentes/configurar_agente.php:1872 #: ../../godmode/agentes/configurar_agente.php:1882 @@ -8283,7 +8322,7 @@ msgstr "Invalid tab specified" #: ../../godmode/agentes/configure_field.php:38 msgid "Update agent custom field" -msgstr "Update agent's custom fields" +msgstr "Update agent custom fields" #: ../../godmode/agentes/configure_field.php:41 msgid "Create agent custom field" @@ -8291,15 +8330,15 @@ msgstr "Create agent custom field" #: ../../godmode/agentes/configure_field.php:53 msgid "Pass type" -msgstr "Pass type" +msgstr "Password type" #: ../../godmode/agentes/configure_field.php:53 msgid "" "The fields with pass type enabled will be displayed like html input type " "pass in html" msgstr "" -"The fields with pass type enabled will be displayed like HTML input type " -"pass in HTML" +"The fields with password type enabled will be displayed with asterisks in " +"HTML." #: ../../godmode/agentes/configure_field.php:56 #: ../../godmode/agentes/fields_manager.php:98 @@ -8314,19 +8353,19 @@ msgid "" "The fields with display on front enabled will be displayed into the agent " "details" msgstr "" -"The fields with up front display enabled will be shown on the agent's details" +"The fields with up front display enabled will be shown on the agent details." #: ../../godmode/agentes/fields_manager.php:31 msgid "Agents custom fields manager" -msgstr "Agent's custom field manager" +msgstr "Agent custom field manager" #: ../../godmode/agentes/fields_manager.php:45 msgid "The name must not be empty" -msgstr "Name cannot be left empty" +msgstr "The name field cannot be left empty" #: ../../godmode/agentes/fields_manager.php:48 msgid "The name must be unique" -msgstr "Name must be unique" +msgstr "The name must be unique" #: ../../godmode/agentes/fields_manager.php:54 msgid "Field successfully created" @@ -8338,11 +8377,11 @@ msgstr "Field successfully updated" #: ../../godmode/agentes/fields_manager.php:74 msgid "There was a problem modifying field" -msgstr "There was a problem modifying field" +msgstr "Error modifying the field" #: ../../godmode/agentes/fields_manager.php:84 msgid "There was a problem deleting field" -msgstr "There was an issue deleting the field" +msgstr "Error deleting the field" #: ../../godmode/agentes/fields_manager.php:86 msgid "Field successfully deleted" @@ -8361,11 +8400,11 @@ msgstr "Create field" #: ../../godmode/agentes/modificar_agente.php:63 msgid "Agents defined in Pandora" -msgstr "Agents defined in Pandora" +msgstr "Agents defined in Pandora FMS" #: ../../godmode/agentes/modificar_agente.php:96 msgid "Success deleted agent." -msgstr "Success deleting agent." +msgstr "Agent successfully deleted" #: ../../godmode/agentes/modificar_agente.php:96 msgid "Could not be deleted." @@ -8373,7 +8412,7 @@ msgstr "Agent could not be deleted" #: ../../godmode/agentes/modificar_agente.php:103 msgid "Maybe the files conf or md5 could not be deleted" -msgstr "It's possible the .conf or md5 files couldn't be deleted" +msgstr "It is possible that the .conf or md5 files could not be deleted." #: ../../godmode/agentes/modificar_agente.php:165 msgid "Show Agents" @@ -8397,7 +8436,7 @@ msgstr "Only enabled" #: ../../godmode/agentes/modificar_agente.php:176 msgid "Operative System" -msgstr "Operative System" +msgstr "Operating System" #: ../../godmode/agentes/modificar_agente.php:197 msgid "" @@ -8461,7 +8500,7 @@ msgstr "Create a new network server module" #: ../../godmode/agentes/module_manager.php:82 msgid "Create a new plugin server module" -msgstr "Create a new plug-in server module" +msgstr "Create a new plugin server module" #: ../../godmode/agentes/module_manager.php:84 msgid "Create a new WMI server module" @@ -8491,12 +8530,12 @@ msgstr "There was a problem deleting %s modules, none deleted." #: ../../godmode/agentes/module_manager.php:280 msgid "All Modules deleted succesfully" -msgstr "All Modules deleted succesfully" +msgstr "All Modules deleted successfully" #: ../../godmode/agentes/module_manager.php:284 #, php-format msgid "There was a problem only deleted %s modules of %s total." -msgstr "There was a problem only deleted %s modules of %s total." +msgstr "Error deleting modules: only %s modules of %s total were deleted" #: ../../godmode/agentes/module_manager.php:526 #: ../../godmode/reporting/map_builder.php:327 @@ -8592,7 +8631,7 @@ msgstr "Not linked" #: ../../godmode/agentes/module_manager.php:719 #: ../../enterprise/operation/agentes/policy_view.php:355 msgid "Non initialized module" -msgstr "Non initialised module" +msgstr "Non initialized module" #: ../../godmode/agentes/module_manager.php:736 #: ../../godmode/agentes/module_manager_editor_common.php:401 @@ -8653,17 +8692,17 @@ msgstr "Create network component (Disabled)" #: ../../enterprise/godmode/policies/policy_linking.php:32 #: ../../enterprise/godmode/policies/policy_modules.php:486 msgid "This policy is applying and cannot be modified" -msgstr "This policy is being applied and cannot be modified" +msgstr "This policy is being applied and cannot be modified." #: ../../godmode/agentes/module_manager_editor.php:400 #: ../../enterprise/include/functions_policies.php:3229 msgid "Module will be linked in the next application" -msgstr "Module will be linked upon next use" +msgstr "Module will be linked in the next application" #: ../../godmode/agentes/module_manager_editor.php:408 #: ../../enterprise/include/functions_policies.php:3234 msgid "Module will be unlinked in the next application" -msgstr "Module will be unlinked upon next use" +msgstr "Module will be unlinked in the next application" #: ../../godmode/agentes/module_manager_editor.php:496 #, php-format @@ -8679,8 +8718,8 @@ msgid "" "#2124706 for the solution)<br />\n" "\t\t\t\t3) found a new bug - please report a way to duplicate this error" msgstr "" -"Most likely you've recently upgraded from an earlier version of Pandora and " -"you either <br />\n" +"You have probably upgraded recently from an earlier version of Pandora FMS " +"and either <br />\n" "\t\t\t\t1) forgot to use the database converter<br />\n" "\t\t\t\t2) used a bad version of the database converter (see Bugreport " "#2124706 for the solution)<br />\n" @@ -8717,7 +8756,7 @@ msgstr "No module to predict" #: ../../godmode/agentes/module_manager_editor.php:578 msgid "No plug-in provided" -msgstr "No plug-in provided" +msgstr "No plugin provided" #: ../../godmode/agentes/module_manager_editor.php:579 msgid "No server provided" @@ -8728,8 +8767,8 @@ msgid "" "Error, The field name and name in module_name in data configuration are " "different." msgstr "" -"Error: field name and name in the module_name string under data " -"configuration are different." +"Error: field name and name in the module_name string in data configuration " +"are different." #: ../../godmode/agentes/module_manager_editor.php:644 msgid "The File APIs are not fully supported in this browser." @@ -8737,13 +8776,13 @@ msgstr "The File APIs are not fully supported in this browser." #: ../../godmode/agentes/module_manager_editor.php:645 msgid "Couldn`t find the fileinput element." -msgstr "Couldn`t find the fileinput element." +msgstr "Could not find the fileinput element" #: ../../godmode/agentes/module_manager_editor.php:646 msgid "" "This browser doesn`t seem to support the files property of file inputs." msgstr "" -"This browser doesn`t seem to support the files property of file inputs." +"This browser does not seem to support the files property of file inputs." #: ../../godmode/agentes/module_manager_editor.php:647 msgid "Please select a file before clicking Load" @@ -9031,8 +9070,8 @@ msgid "" "In case you use an Export server you can link this module and export data to " "one these." msgstr "" -"In case you're using an Export server you can link this module and export " -"data to one of these." +"If you are using an Export server you can link this module and export data " +"to one of these." #: ../../godmode/agentes/module_manager_editor_common.php:454 #: ../../godmode/massive/massive_edit_modules.php:613 @@ -9345,7 +9384,7 @@ msgstr "Privacy pass" #: ../../operation/agentes/status_monitor.php:385 #: ../../enterprise/operation/agentes/tag_view.php:185 msgid "Plugin server module" -msgstr "Plug-in server module" +msgstr "Plugin server module" #: ../../godmode/agentes/module_manager_editor_prediction.php:88 #: ../../operation/agentes/status_monitor.php:389 @@ -9450,13 +9489,13 @@ msgstr "Field number" #: ../../enterprise/include/functions_backup.php:496 #: ../../enterprise/include/functions_backup.php:497 msgid "List" -msgstr "list" +msgstr "List" #: ../../godmode/agentes/planned_downtime.editor.php:117 #: ../../godmode/agentes/planned_downtime.editor.php:202 #: ../../godmode/agentes/planned_downtime.editor.php:970 msgid "This elements cannot be modified while the downtime is being executed" -msgstr "These items cannot be modified while downtime is taking place" +msgstr "These items cannot be modified while downtime is taking place." #: ../../godmode/agentes/planned_downtime.editor.php:227 #: ../../include/functions_planned_downtimes.php:42 @@ -9465,7 +9504,7 @@ msgid "" "Not created. Error inserting data. Start time must be higher than the " "current time" msgstr "" -"Couldn't be created: error during data insertion. Start time must be higher " +"Could not be created: error during data insertion. Start time must be higher " "than the current time." #: ../../godmode/agentes/planned_downtime.editor.php:230 @@ -9480,18 +9519,18 @@ msgstr "" #: ../../include/functions_planned_downtimes.php:695 #: ../../include/functions_planned_downtimes.php:702 msgid "Not created. Error inserting data" -msgstr "Not created. Error inserting data" +msgstr "Not created: error inserting data" #: ../../godmode/agentes/planned_downtime.editor.php:230 #: ../../include/functions_planned_downtimes.php:45 #: ../../include/functions_planned_downtimes.php:683 msgid "The end date must be higher than the start date" -msgstr "The end date cannot be earlier than the start date" +msgstr "The end date cannot be earlier than the start date." #: ../../godmode/agentes/planned_downtime.editor.php:233 #: ../../include/functions_planned_downtimes.php:688 msgid "The end date must be higher than the current time" -msgstr "End date must be after current time" +msgstr "End date must be after current time." #: ../../godmode/agentes/planned_downtime.editor.php:238 #: ../../godmode/agentes/planned_downtime.editor.php:607 @@ -9499,31 +9538,31 @@ msgstr "End date must be after current time" #: ../../include/functions_planned_downtimes.php:50 #: ../../include/functions_planned_downtimes.php:696 msgid "The end time must be higher than the start time" -msgstr "End time must be after start time" +msgstr "End time must be after start time." #: ../../godmode/agentes/planned_downtime.editor.php:241 #: ../../godmode/agentes/planned_downtime.editor.php:596 #: ../../include/functions_planned_downtimes.php:53 #: ../../include/functions_planned_downtimes.php:703 msgid "The end day must be higher than the start day" -msgstr "The end date cannot be earlier than the start date" +msgstr "The end date cannot be earlier than the start date." #: ../../godmode/agentes/planned_downtime.editor.php:290 #: ../../include/functions_planned_downtimes.php:94 #: ../../include/functions_planned_downtimes.php:717 msgid "Each planned downtime must have a different name" -msgstr "Each planned downtime must have a different name" +msgstr "Each planned downtime must have a different name." #: ../../godmode/agentes/planned_downtime.editor.php:295 #: ../../godmode/agentes/planned_downtime.editor.php:322 #: ../../include/functions_planned_downtimes.php:100 #: ../../include/functions_planned_downtimes.php:722 msgid "Planned downtime must have a name" -msgstr "Planned downtime must have a name" +msgstr "Planned downtime must have a name." #: ../../godmode/agentes/planned_downtime.editor.php:333 msgid "Cannot be modified while the downtime is being executed" -msgstr "Cannot be modified while downtime is taking place" +msgstr "Cannot be modified while downtime is taking place." #: ../../godmode/agentes/planned_downtime.editor.php:374 #: ../../godmode/alerts/alert_actions.php:263 @@ -9559,11 +9598,11 @@ msgstr "Could not be updated" #: ../../godmode/agentes/planned_downtime.editor.php:500 msgid "Quiet: Modules will not generate events or fire alerts." -msgstr "Quiet: Modules will not generate events or fire alerts." +msgstr "Quiet: modules will not generate events or trigger alerts." #: ../../godmode/agentes/planned_downtime.editor.php:501 msgid "Disable Agents: Disables the selected agents." -msgstr "Disable Agents: Disables the selected agents." +msgstr "Disable Agents: disables the selected agents." #: ../../godmode/agentes/planned_downtime.editor.php:502 msgid "Disable Alerts: Disable alerts for the selected agents." @@ -9630,7 +9669,7 @@ msgstr "Date format for Pandora FMS is YY/MM/DD" #: ../../enterprise/operation/log/log_viewer.php:236 #: ../../enterprise/operation/log/log_viewer.php:244 msgid "Time format in Pandora is hours(24h):minutes:seconds" -msgstr "Watch format in Pandora FMS is hours (24h):minutes:seconds" +msgstr "Time format in Pandora FMS is hours(24h):minutes:seconds" #: ../../godmode/agentes/planned_downtime.editor.php:532 #: ../../include/functions_reporting_html.php:64 @@ -9714,19 +9753,19 @@ msgstr "Sun" #: ../../godmode/agentes/planned_downtime.editor.php:584 msgid "From day:" -msgstr "set start date" +msgstr "From day:" #: ../../godmode/agentes/planned_downtime.editor.php:590 msgid "To day:" -msgstr "Set end date" +msgstr "To day:" #: ../../godmode/agentes/planned_downtime.editor.php:601 msgid "From hour:" -msgstr "Set start time" +msgstr "From hour:" #: ../../godmode/agentes/planned_downtime.editor.php:609 msgid "To hour:" -msgstr "Set end time" +msgstr "To hour:" #: ../../godmode/agentes/planned_downtime.editor.php:724 msgid "Available agents" @@ -9794,7 +9833,7 @@ msgstr "Add Module:" #: ../../godmode/agentes/planned_downtime.editor.php:1100 msgid "Please select a module." -msgstr "Please select a module." +msgstr "Please select a module" #: ../../godmode/agentes/planned_downtime.editor.php:1233 msgid "" @@ -9815,7 +9854,7 @@ msgstr "An error occurred while migrating faulty planned downtimes" #: ../../godmode/agentes/planned_downtime.list.php:47 msgid "Please run the migration again or contact with the administrator" -msgstr "Please run the migration again or contact the administrator" +msgstr "Please execute the migration again or contact the administrator" #: ../../godmode/agentes/planned_downtime.list.php:79 msgid "An error occurred stopping the planned downtime" @@ -9823,7 +9862,7 @@ msgstr "An error occurred when attempting to stop planned downtime." #: ../../godmode/agentes/planned_downtime.list.php:101 msgid "This planned downtime is running" -msgstr "This planned downtime is running" +msgstr "This planned downtime is running." #: ../../godmode/agentes/planned_downtime.list.php:108 #: ../../godmode/events/event_filter.php:57 @@ -9844,7 +9883,7 @@ msgstr "This planned downtime is running" #: ../../enterprise/godmode/reporting/graph_template_list.php:110 #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:226 msgid "Not deleted. Error deleting data" -msgstr "Could not be deleted. Error deleting data." +msgstr "Error deleting data" #: ../../godmode/agentes/planned_downtime.list.php:143 #: ../../godmode/alerts/alert_list.list.php:532 @@ -10002,16 +10041,16 @@ msgid "" "WARNING: If you delete this planned downtime, it will not be taken into " "account in future SLA reports" msgstr "" -"WARNING: If you delete this planned downtime, it will not be taken into " -"account in future SLA reports" +"WARNING: if you delete this planned downtime, it will not be taken into " +"account in future SLA reports." #: ../../godmode/agentes/planned_downtime.list.php:541 msgid "WARNING: There are malformed planned downtimes" -msgstr "WARNING: there are faulty planned downtimes" +msgstr "WARNING: there are faulty planned downtimes." #: ../../godmode/agentes/planned_downtime.list.php:541 msgid "Do you want to migrate automatically the malformed items?" -msgstr "Do you want to automatically migrate the faulty items" +msgstr "Do you want to automatically migrate the faulty items?" #: ../../godmode/alerts/alert_actions.php:66 #: ../../godmode/alerts/alert_actions.php:92 @@ -10109,17 +10148,17 @@ msgstr "Advanced" #: ../../godmode/alerts/alert_commands.php:170 #: ../../godmode/alerts/alert_commands.php:179 msgid "Text/plain" -msgstr "" +msgstr "Text/plain" #: ../../godmode/alerts/alert_commands.php:170 #: ../../godmode/alerts/alert_commands.php:179 msgid "For sending emails only text plain" -msgstr "" +msgstr "For sending emails only text plain" #: ../../godmode/alerts/alert_commands.php:173 #: ../../godmode/alerts/alert_commands.php:182 msgid "Text/html" -msgstr "" +msgstr "Text/html" #: ../../godmode/alerts/alert_commands.php:267 msgid "Alert commands" @@ -10269,7 +10308,7 @@ msgstr "Enabled" #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1487 #: ../../enterprise/operation/agentes/policy_view.php:193 msgid "Standby" -msgstr "Stand by" +msgstr "Standby" #: ../../godmode/alerts/alert_list.list.php:140 #: ../../include/functions_ui.php:853 ../../mobile/operation/alerts.php:44 @@ -10342,8 +10381,8 @@ msgid "" "The default actions will be executed every time that the alert is fired and " "no other action is executed" msgstr "" -"Default actions will run every time an alert is fired and no other action is " -"executed." +"Default actions will run every time an alert is triggered and no other " +"action is executed." #: ../../godmode/alerts/alert_list.list.php:524 #: ../../godmode/alerts/alert_view.php:195 @@ -10390,7 +10429,7 @@ msgstr "Add action" #: ../../godmode/alerts/alert_list.list.php:719 msgid "View alert advanced details" -msgstr "View the alert's advanced details" +msgstr "View alert advanced details" #: ../../godmode/alerts/alert_list.list.php:730 msgid "No alerts defined" @@ -10463,7 +10502,7 @@ msgstr "Could not be added" #: ../../enterprise/godmode/alerts/alert_events_list.php:255 #: ../../enterprise/godmode/policies/policy_alerts.php:122 msgid "Successfully set standby" -msgstr "Succesfully set to standby mode" +msgstr "Successfully set to standby mode" #: ../../godmode/alerts/alert_list.php:264 #: ../../godmode/massive/massive_standby_alerts.php:96 @@ -10515,11 +10554,11 @@ msgstr "Skipped dates: " #: ../../godmode/alerts/alert_special_days.php:106 msgid "Success to upload iCalendar" -msgstr "Success to upload iCalendar" +msgstr "iCalendar successfully uploaded" #: ../../godmode/alerts/alert_special_days.php:106 msgid "Fail to upload iCalendar" -msgstr "Fail to upload iCalendar" +msgstr "Error uploading iCalendar" #: ../../godmode/alerts/alert_special_days.php:232 msgid "iCalendar(.ics) file" @@ -10655,7 +10694,7 @@ msgstr "Overwrite" #: ../../godmode/alerts/alert_special_days.php:255 msgid "Check this box, if you want to overwrite existing same days." -msgstr "Check this box, if you want to overwrite existing same days." +msgstr "Check this box, if you want to overwrite existing days." #: ../../godmode/alerts/alert_special_days.php:273 msgid "Display range: " @@ -10850,7 +10889,7 @@ msgstr "" msgid "" "The alert would fire when the value doesn't match <span id=\"value\"></span>" msgstr "" -"The alert is triggered when the value doesn't match <span " +"The alert is triggered when the value does not match <span " "id=\"value\"></span>" #: ../../godmode/alerts/alert_view.php:152 @@ -10883,8 +10922,8 @@ msgid "" "The alert would fire when the value is not between <span id=\"min\"></span> " "and <span id=\"max\"></span>" msgstr "" -"The alert is triggered when the value isn't between <span id=\"min\"></span> " -"and <span id=\"max\"></span>" +"The alert is triggered when the value is not between <span " +"id=\"min\"></span> and <span id=\"max\"></span>" #: ../../godmode/alerts/alert_view.php:170 #: ../../godmode/alerts/configure_alert_template.php:853 @@ -10901,29 +10940,29 @@ msgstr "" #: ../../godmode/alerts/alert_view.php:179 #: ../../godmode/alerts/configure_alert_template.php:857 msgid "The alert would fire when the module value changes" -msgstr "The alert is triggered when the module's value changes" +msgstr "The alert is triggered when the module value changes." #: ../../godmode/alerts/alert_view.php:182 #: ../../godmode/alerts/configure_alert_template.php:858 msgid "The alert would fire when the module value does not change" -msgstr "The alert is triggered when the module's value remains the same" +msgstr "The alert is triggered when the module value remains the same." #: ../../godmode/alerts/alert_view.php:186 #: ../../godmode/alerts/configure_alert_template.php:855 #: ../../include/functions_ui.php:1065 msgid "The alert would fire when the module is in warning status" -msgstr "The alert is triggered when the module is in warning status" +msgstr "The alert is triggered when the module is in warning status." #: ../../godmode/alerts/alert_view.php:189 #: ../../godmode/alerts/configure_alert_template.php:856 #: ../../include/functions_ui.php:1070 msgid "The alert would fire when the module is in critical status" -msgstr "The alert is triggered when the module is in critical status" +msgstr "The alert is triggered when the module is in critical status." #: ../../godmode/alerts/alert_view.php:192 #: ../../godmode/alerts/configure_alert_template.php:859 msgid "The alert would fire when the module is in unknown status" -msgstr "The alert is triggered when the module is in unknown status" +msgstr "The alert is triggered when the module is in unknown status." #: ../../godmode/alerts/alert_view.php:298 #: ../../godmode/alerts/configure_alert_template.php:539 @@ -11016,20 +11055,20 @@ msgstr "Max." #: ../../godmode/alerts/alert_view.php:325 msgid "Firing conditions" -msgstr "Firing conditions" +msgstr "Triggering conditions" #: ../../godmode/alerts/alert_view.php:348 #: ../../godmode/alerts/alert_view.php:370 msgid "Every time that the alert is fired" -msgstr "Every time that the alert is fired" +msgstr "Every time that the alert is triggered" #: ../../godmode/alerts/alert_view.php:414 msgid "" "Select the desired action and mode to see the Firing/Recovery fields for " "this action" msgstr "" -"Select the desired action and mode to view the Firing/Recovery fields for " -"this action" +"Select the desired action and mode to view the Triggering/Recovery fields " +"for this action" #: ../../godmode/alerts/alert_view.php:417 msgid "Select the action" @@ -11038,7 +11077,7 @@ msgstr "Choose an action" #: ../../godmode/alerts/alert_view.php:420 #: ../../godmode/alerts/configure_alert_action.php:148 msgid "Firing" -msgstr "Firing" +msgstr "Triggering" #: ../../godmode/alerts/alert_view.php:421 msgid "Recovering" @@ -11064,8 +11103,8 @@ msgstr "Triggering fields" msgid "" "Fields passed to the command executed by this action when the alert is fired" msgstr "" -"When the alert is triggered, action definining fields will be passed to the " -"command." +"When the alert is triggered, the action defining fields will be passed to " +"the command." #: ../../godmode/alerts/alert_view.php:442 #: ../../godmode/alerts/alert_view.php:531 @@ -11095,7 +11134,7 @@ msgstr "Executed upon triggering" #: ../../godmode/alerts/alert_view.php:449 #: ../../godmode/alerts/alert_view.php:532 msgid "Fields used on execution when the alert is fired" -msgstr "Fields used on execution when the alert is fired" +msgstr "Fields used on execution when the alert is triggered" #: ../../godmode/alerts/alert_view.php:508 #: ../../godmode/alerts/alert_view.php:595 @@ -11106,7 +11145,7 @@ msgstr "Command preview" #: ../../godmode/alerts/alert_view.php:516 msgid "The alert recovering is disabled on this template." -msgstr "Alert recovery is disabled for this template" +msgstr "Alert recovery is disabled for this template." #: ../../godmode/alerts/alert_view.php:529 msgid "Recovering fields" @@ -11142,7 +11181,7 @@ msgstr "Executed upon recovery" #: ../../godmode/alerts/alert_view.php:535 msgid "Fields used on execution when the alert is recovered" -msgstr "Fields used upon execution when the alert is recovered" +msgstr "Fields used during execution when the alert is recovered" #: ../../godmode/alerts/configure_alert_action.php:57 #: ../../godmode/alerts/configure_alert_action.php:66 @@ -11313,7 +11352,7 @@ msgid "" "being fired consecutively, even if it's within the time threshold" msgstr "" "Enable this option if you want the counter to be reset when the alert is not " -"being fired consecutively, even if it's within the time threshold" +"being triggered consecutively, even if it is within the time threshold." #: ../../godmode/alerts/configure_alert_template.php:563 #: ../../godmode/snmpconsole/snmp_alert.php:914 @@ -11327,7 +11366,7 @@ msgid "" "Unless they're left blank, the fields from the action will override those " "set on the template." msgstr "" -"Unless they're left blank, the fields from the action will override those " +"Unless they are left blank, the fields from the action will override those " "set on the template." #: ../../godmode/alerts/configure_alert_template.php:593 @@ -11398,14 +11437,14 @@ msgstr "Next" #: ../../godmode/alerts/configure_alert_template.php:848 #, php-format msgid "The alert would fire when the value doesn\\'t match %s" -msgstr "The alert is triggered when the value doesn't match %s" +msgstr "The alert is triggered when the value does not match %s" #: ../../godmode/alerts/configure_alert_template.php:852 msgid "" "The alert would fire when the value is not between <span id=\\'min\\" "'></span> and <span id=\\'max\\'></span>" msgstr "" -"The alert will activate when the value is not between <span id=\\'min\\" +"The alert will be triggered when the value is not between <span id=\\'min\\" "'></span> and <span id=\\'max\\'></span>" #: ../../godmode/alerts/configure_alert_template.php:860 @@ -11535,7 +11574,7 @@ msgstr "Total number of unknown agents" #: ../../godmode/db/db_main.php:170 msgid "Total non-init modules" -msgstr "Total amount of non-init modules" +msgstr "Total amount of non-initialized modules" #: ../../godmode/db/db_main.php:179 msgid "Last time on DB maintance" @@ -11559,8 +11598,8 @@ msgid "" "daemon is running. It's very important to keep up-to-date database to get " "the best performance and results in Pandora" msgstr "" -"Please make sure your Pandora Server settings are correct and that the " -"database maintenance daemon is running. It's very important to keep your " +"Please make sure your Pandora FMS Server settings are correct and that the " +"database maintenance daemon is running. It is very important to keep your " "database up to date in order to get the best performance and results from " "Pandora FMS." @@ -11569,7 +11608,7 @@ msgstr "" #: ../../include/functions_events.php:34 #: ../../enterprise/meta/include/functions_events_meta.php:55 msgid "Event id" -msgstr "Choose between the users who have validated an event." +msgstr "Event ID" #: ../../godmode/events/custom_events.php:71 #: ../../godmode/events/custom_events.php:153 @@ -11734,11 +11773,11 @@ msgstr "Show event fields" #: ../../godmode/events/custom_events.php:133 msgid "Load the fields from previous events" -msgstr "" +msgstr "Load the fields from previous events" #: ../../godmode/events/custom_events.php:133 msgid "Event fields will be loaded. Do you want to continue?" -msgstr "" +msgstr "Event fields will be loaded. Do you want to continue?" #: ../../godmode/events/custom_events.php:181 #: ../../enterprise/meta/event/custom_events.php:169 @@ -11765,13 +11804,13 @@ msgstr "Fields selected" #: ../../godmode/netflow/nf_edit_form.php:110 #: ../../enterprise/godmode/reporting/graph_template_editor.php:120 msgid "Not updated. Blank name" -msgstr "Couldn't update. Blank name." +msgstr "Could not update: blank name." #: ../../godmode/events/event_edit_filter.php:174 #: ../../godmode/modules/manage_nc_groups.php:99 #: ../../godmode/netflow/nf_edit_form.php:132 ../../godmode/setup/news.php:88 msgid "Not updated. Error updating data" -msgstr "Couldn't update. Error updating data." +msgstr "Could not update: error updating data" #: ../../godmode/events/event_edit_filter.php:203 msgid "Update Filter" @@ -11903,14 +11942,14 @@ msgstr "To (date)" #: ../../operation/events/events_list.php:586 #: ../../enterprise/include/functions_events.php:180 msgid "Events with following tags" -msgstr "Events with following tags" +msgstr "Events with the following tags" #: ../../godmode/events/event_edit_filter.php:365 #: ../../operation/events/events_list.php:578 #: ../../operation/events/events_list.php:592 #: ../../enterprise/include/functions_events.php:197 msgid "Events without following tags" -msgstr "Events without follow-up tags" +msgstr "Events without the following tags" #: ../../godmode/events/event_edit_filter.php:379 #: ../../operation/events/events_list.php:530 @@ -12004,7 +12043,7 @@ msgstr "Create response" #: ../../godmode/events/event_responses.php:63 msgid "Response added succesfully" -msgstr "Response added succesfully" +msgstr "Response added successfully" #: ../../godmode/events/event_responses.php:66 msgid "Response cannot be added" @@ -12155,7 +12194,7 @@ msgid "" "At least one map connection must be defined, it will be possible to change " "between the connections in the map" msgstr "" -"At least one map connection has to be defined. It's possible to change " +"At least one map connection has to be defined. It is possible to change " "between connections on the map." #: ../../godmode/gis_maps/configure_gis_map.php:366 @@ -12172,11 +12211,11 @@ msgstr "Default zoom level when opening the map" #: ../../godmode/gis_maps/configure_gis_map.php:372 msgid "Center Latitude" -msgstr "Centre Latitude" +msgstr "Center Latitude" #: ../../godmode/gis_maps/configure_gis_map.php:375 msgid "Center Longitude" -msgstr "Centre Longitude" +msgstr "Center Longitude" #: ../../godmode/gis_maps/configure_gis_map.php:378 msgid "Center Altitude" @@ -12247,11 +12286,11 @@ msgstr "Save Layer" #: ../../godmode/gis_maps/configure_gis_map.php:464 #: ../../godmode/gis_maps/configure_gis_map.php:471 msgid "Save map" -msgstr "Save map" +msgstr "Save Map" #: ../../godmode/gis_maps/configure_gis_map.php:467 msgid "Update map" -msgstr "Update map" +msgstr "Update Map" #: ../../godmode/gis_maps/configure_gis_map.php:668 #: ../../godmode/gis_maps/configure_gis_map.php:724 @@ -12274,7 +12313,7 @@ msgstr "just added previously." #: ../../godmode/groups/configure_modu_group.php:51 #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1256 msgid "There was a problem loading group" -msgstr "There was a problem loading group" +msgstr "Error loading the group" #: ../../godmode/groups/configure_group.php:92 msgid "Update group" @@ -12310,7 +12349,7 @@ msgstr "Icon" #: ../../godmode/groups/configure_group.php:144 msgid "You have not access to the parent." -msgstr "You don't have access to the parent" +msgstr "You do not have access to the parent." #: ../../godmode/groups/configure_group.php:166 msgid "Group Password" @@ -12349,10 +12388,10 @@ msgid "" "the metaconsole.\\n\\nIf you want to create a visible group, you must do it " "from the metaconsole and propagate to the node. " msgstr "" -"WARNING: you're trying to create a group on a node that is part of a " -"metaconsole. \\n\\nThis group and all of its content will not be visible on " -"the metaconsole. \\n\\nIf you wish to create a visible group, you will have " -"to do it from the metaconsole and propagate it on to the node. " +"WARNING: you are trying to create a group on a node that is part of a " +"Metaconsole. \\n\\nThis group and all of its content will not be visible on " +"the Metaconsole.\\n\\nIf you wish to create a visible group, you will have " +"to do it from the Metaconsole and propagate it to the node. " #: ../../godmode/groups/configure_modu_group.php:32 msgid "Module group management" @@ -12360,11 +12399,11 @@ msgstr "Module group management" #: ../../godmode/groups/group_list.php:190 msgid "Edit or delete groups can cause problems with synchronization" -msgstr "Editing or deleting groups can cause problems with synchronization" +msgstr "Editing or deleting groups can cause problems with synchronization." #: ../../godmode/groups/group_list.php:196 msgid "Groups defined in Pandora" -msgstr "Groups defined in Pandora" +msgstr "Groups defined in Pandora FMS" #: ../../godmode/groups/group_list.php:242 #: ../../godmode/groups/modu_group_list.php:75 @@ -12374,7 +12413,7 @@ msgstr "Group successfully created" #: ../../godmode/groups/group_list.php:245 #: ../../godmode/groups/modu_group_list.php:78 msgid "There was a problem creating group" -msgstr "There was a problem creating the group" +msgstr "Error creating the group" #: ../../godmode/groups/group_list.php:249 msgid "Each group must have a different name" @@ -12397,7 +12436,7 @@ msgstr "There was a problem modifying the group" #: ../../godmode/groups/group_list.php:326 #, php-format msgid "The group is not empty. It is use in %s." -msgstr "The group isn't empty. It's used in %s." +msgstr "The group is not empty. It is used in %s." #: ../../godmode/groups/group_list.php:330 #: ../../godmode/groups/modu_group_list.php:145 @@ -12407,7 +12446,7 @@ msgstr "Group successfully deleted" #: ../../godmode/groups/group_list.php:333 #: ../../godmode/groups/modu_group_list.php:143 msgid "There was a problem deleting group" -msgstr "There was a problem deleting group" +msgstr "Error deleting the group" #: ../../godmode/groups/group_list.php:427 msgid "There are no defined groups" @@ -12415,7 +12454,7 @@ msgstr "There are no groups defined" #: ../../godmode/groups/modu_group_list.php:55 msgid "Module groups defined in Pandora" -msgstr "Module groups defined in Pandora" +msgstr "Module groups defined in Pandora FMS" #: ../../godmode/groups/modu_group_list.php:82 #: ../../godmode/groups/modu_group_list.php:113 @@ -12497,7 +12536,7 @@ msgstr "When selecting agents" #: ../../godmode/massive/massive_delete_modules.php:527 #: ../../godmode/massive/massive_edit_modules.php:370 msgid "Show unknown and not init modules" -msgstr "Show unknown and not init modules" +msgstr "Show unknown and not initialized modules" #: ../../godmode/massive/massive_add_action_alerts.php:228 #: ../../godmode/massive/massive_add_alerts.php:213 @@ -12512,8 +12551,8 @@ msgid "" "Unsucessful sending the data, please contact with your administrator or make " "with less elements." msgstr "" -"Data sending unsuccessful, please contact your administrator or try again " -"with less items." +"Error sending data, please contact your administrator or try again with less " +"items." #: ../../godmode/massive/massive_add_alerts.php:78 #: ../../godmode/massive/massive_delete_alerts.php:78 @@ -12522,7 +12561,7 @@ msgstr "No alert selected" #: ../../godmode/massive/massive_add_profiles.php:72 msgid "Profiles added successfully" -msgstr "Successfully added profiles" +msgstr "Profiles successfully added" #: ../../godmode/massive/massive_add_profiles.php:73 msgid "Profiles cannot be added" @@ -12834,24 +12873,22 @@ msgstr "No destiny agent(s) to copy" #: ../../godmode/massive/massive_delete_action_alerts.php:56 msgid "Could not be deleted. No agents selected" -msgstr "Could not be deleted. No agents selected" +msgstr "Could not be deleted: no agents selected" #: ../../godmode/massive/massive_delete_action_alerts.php:81 msgid "Could not be deleted. No alerts selected" -msgstr "Could not be deleted. No alerts selected" +msgstr "Could not be deleted: no alerts selected" #: ../../godmode/massive/massive_delete_action_alerts.php:124 msgid "Could not be deleted. No action selected" -msgstr "Could not be deleted. No action selected" +msgstr "Could not be deleted: no action selected" #: ../../godmode/massive/massive_delete_agents.php:57 #, php-format msgid "" "There was an error deleting the agent, the operation has been cancelled " "Could not delete agent %s" -msgstr "" -"There was an error deleting the agent. The operation has been cancelled, " -"could not delete agent %s" +msgstr "Error deleting the agent %s: the operation has been cancelled" #: ../../godmode/massive/massive_delete_agents.php:63 #, php-format @@ -12871,8 +12908,7 @@ msgstr "No module selected" msgid "" "There was an error deleting the modules, the operation has been cancelled" msgstr "" -"There was an error deleting the selected modules. The operation has been " -"cancelled." +"Error deleting the selected modules: the operation has been cancelled." #: ../../godmode/massive/massive_delete_modules.php:412 #: ../../godmode/massive/massive_edit_modules.php:249 @@ -12934,7 +12970,7 @@ msgstr "Show all agents" #: ../../godmode/massive/massive_delete_profiles.php:61 msgid "Not deleted. You must select an existing user" -msgstr "Could not be deleted. An existing user must be chosen." +msgstr "Could not be deleted: an existing user must be chosen." #: ../../godmode/massive/massive_delete_profiles.php:87 msgid "Profiles deleted successfully" @@ -12966,7 +13002,7 @@ msgstr "Agents updated successfully" #: ../../godmode/massive/massive_edit_agents.php:239 msgid "Agents cannot be updated (maybe there was no field to update)" -msgstr "" +msgstr "Agents cannot be updated (maybe there was no field to update)" #: ../../godmode/massive/massive_edit_agents.php:349 #: ../../godmode/massive/massive_edit_agents.php:354 @@ -13029,7 +13065,7 @@ msgstr "Without status" #: ../../enterprise/operation/services/services.service_map.php:126 #: ../../enterprise/operation/services/services.table_services.php:139 msgid "Ok" -msgstr "Ok" +msgstr "OK" #: ../../godmode/massive/massive_edit_agents.php:462 #: ../../enterprise/dashboard/widgets/maps_status.php:77 @@ -13038,15 +13074,15 @@ msgstr "Bad" #: ../../godmode/massive/massive_edit_modules.php:115 msgid "Error updating the modules from a module type" -msgstr "" +msgstr "Error updating the modules from a module type" #: ../../godmode/massive/massive_edit_modules.php:137 msgid "Error updating the modules from an agent group" -msgstr "" +msgstr "Error updating the modules from an agent group" #: ../../godmode/massive/massive_edit_modules.php:157 msgid "Error updating the modules (maybe there was no field to update)" -msgstr "" +msgstr "Error updating the modules (maybe there was no field to update)" #: ../../godmode/massive/massive_edit_modules.php:340 msgid "Agent Status" @@ -13084,7 +13120,7 @@ msgstr "Policy linking status" #: ../../godmode/massive/massive_edit_modules.php:603 msgid "This field only has sense in modules adopted by a policy." -msgstr "This field only makes sense in modules adopted by a policy" +msgstr "This field is only relevant in modules adopted by a policy." #: ../../godmode/massive/massive_edit_modules.php:604 msgid "Linked" @@ -13186,11 +13222,11 @@ msgstr "Error" #: ../../godmode/massive/massive_edit_plugins.php:876 msgid "There are no modules using this plugin" -msgstr "There are no modules using this plugin" +msgstr "There are no modules using this plugin." #: ../../godmode/massive/massive_edit_plugins.php:959 msgid "There was a problem loading the module plugin macros data" -msgstr "There was a problem loading the data from the module plugin macros" +msgstr "Error loading the data from the module plugin macros" #: ../../godmode/massive/massive_enable_disable_alerts.php:154 msgid "Enabled alerts" @@ -13305,11 +13341,11 @@ msgid "" "parameters to a correct value: <br><i> max_execution_time = 0</i> and " "<i>max_input_time = -1</i>" msgstr "" -"In order to perform massive operations PHP needs to be have timeout " -"parameters set correctly. Please open the PHP configuration file (php.ini) " -"for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set the " -"timeout parameters to the correct value: <br><i> max_execution_time = 0</i> " -"and <i>max_input_time = -1</i>" +"In order to perform massive operations, PHP needs to have timeout parameters " +"set correctly. Please open the PHP configuration file (php.ini), for example " +"<i>sudo vi /etc/php5/apache2/php.ini;</i><br>, and set the timeout " +"parameters to the correct value: <br><i> max_execution_time = 0</i> and " +"<i>max_input_time = -1</i>" #: ../../godmode/massive/massive_operations.php:239 msgid "Please wait..." @@ -13321,7 +13357,7 @@ msgstr "Fields left blank will not be updated" #: ../../godmode/massive/massive_standby_alerts.php:154 msgid "Not standby alerts" -msgstr "Not standby alerts" +msgstr "Alerts without standby" #: ../../godmode/massive/massive_standby_alerts.php:165 #: ../../godmode/massive/massive_standby_alerts.php:169 @@ -13523,7 +13559,7 @@ msgstr "Edit OS" #: ../../godmode/menu.php:279 #: ../../enterprise/meta/general/main_header.php:288 msgid "License" -msgstr "Licence" +msgstr "License" #: ../../godmode/menu.php:289 msgid "Admin tools" @@ -13549,11 +13585,11 @@ msgstr "File manager" #: ../../godmode/menu.php:309 msgid "DB Schema Check" -msgstr "" +msgstr "DB Schema Check" #: ../../godmode/menu.php:312 msgid "DB Interface" -msgstr "" +msgstr "DB Interface" #: ../../godmode/menu.php:405 msgid "Extension manager view" @@ -13603,7 +13639,7 @@ msgstr "Component group management" #: ../../godmode/modules/manage_nc_groups.php:58 msgid "Could not be created. Blank name" -msgstr "Could not be created. Name left blank" +msgstr "Could not be created: name left blank" #: ../../godmode/modules/manage_nc_groups.php:154 #: ../../godmode/modules/manage_network_components.php:399 @@ -13619,7 +13655,7 @@ msgstr "Multi-deletion successful" #: ../../enterprise/godmode/modules/local_components.php:356 #: ../../enterprise/godmode/modules/manage_inventory_modules.php:137 msgid "Not deleted. Error deleting multiple data" -msgstr "Not deleted. Error deleting multiple data" +msgstr "Error deleting multiple data" #: ../../godmode/modules/manage_nc_groups.php:238 msgid "There are no defined component groups" @@ -13673,7 +13709,7 @@ msgstr "WMI module" #: ../../godmode/modules/manage_network_components.php:603 msgid "Plug-in module" -msgstr "Plug-in module" +msgstr "Plugin module" #: ../../godmode/modules/manage_network_components.php:634 msgid "There are no defined network components" @@ -13685,7 +13721,7 @@ msgstr "Create a new network component" #: ../../godmode/modules/manage_network_components.php:642 msgid "Create a new plugin component" -msgstr "Create a new plug-in component" +msgstr "Create a new plugin component" #: ../../godmode/modules/manage_network_components.php:643 msgid "Create a new WMI component" @@ -13749,7 +13785,7 @@ msgstr "Error deleting module from profile" #: ../../godmode/modules/manage_network_templates_form.php:70 msgid "Successfully added module to profile" -msgstr "Successfully added module to profile" +msgstr "Module added to profile successfully" #: ../../godmode/modules/manage_network_templates_form.php:71 msgid "Error adding module to profile" @@ -13864,7 +13900,7 @@ msgid "" "field blank, will show all ip. Example filter by " "ip:<br>25.46.157.214,160.253.135.249" msgstr "" -"Destination IP: a list of destined IPs separated by commas. Leaving this " +"Destination IP: a list of destination IPs separated by commas. Leaving this " "field blank will show all IPs. Example: filter by IP number: " "<br>25.46.157.214,160.253.135.249" @@ -13898,8 +13934,8 @@ msgid "" "22:<br>80,22" msgstr "" "Destination port: a list of possible destination ports, separated by commas. " -"If we leave this field blank, all ports will be shown. Example: filtering by " -"ports 80 and 22:<br>80,22" +"Leaving this field blank will show all ports. Example: filtering by ports 80 " +"and 22:<br>80,22" #: ../../godmode/netflow/nf_edit_form.php:219 #: ../../godmode/netflow/nf_edit_form.php:226 @@ -13914,8 +13950,8 @@ msgid "" "Source port. A comma separated list of source ports. If we leave the field " "blank, will show all ports. Example filter by ports 80 and 22:<br>80,22" msgstr "" -"Source Port: a list of possible source ports, separated by commas. If we " -"leave this field blank, all ports will be shown. Example: filter by ports 80 " +"Source Port: a list of possible source ports, separated by commas. If this " +"field is left blank, all ports will be shown. Example: filter by ports 80 " "and 22:<br>80,22" #: ../../godmode/netflow/nf_edit_form.php:225 @@ -14036,32 +14072,32 @@ msgstr "Create item" #: ../../enterprise/godmode/reporting/graph_template_list.php:70 #: ../../enterprise/godmode/reporting/graph_template_wizard.php:98 msgid "Graph container" -msgstr "" +msgstr "Graph container" #: ../../godmode/reporting/create_container.php:193 #: ../../godmode/reporting/graph_container.php:84 msgid "Create container" -msgstr "" +msgstr "Create container" #: ../../godmode/reporting/create_container.php:196 msgid "Container stored successfully" -msgstr "" +msgstr "Container stored successfully" #: ../../godmode/reporting/create_container.php:196 msgid "There was a problem storing container" -msgstr "" +msgstr "There was a problem storing the container" #: ../../godmode/reporting/create_container.php:200 msgid "Update the container" -msgstr "" +msgstr "Update the container" #: ../../godmode/reporting/create_container.php:200 msgid "Bad update the container" -msgstr "" +msgstr "Bad update the container" #: ../../godmode/reporting/create_container.php:259 msgid "Parent container" -msgstr "" +msgstr "Parent container" #: ../../godmode/reporting/create_container.php:262 #: ../../godmode/reporting/create_container.php:265 @@ -14119,7 +14155,7 @@ msgstr "1 day" #: ../../include/ajax/graph.ajax.php:135 ../../include/ajax/graph.ajax.php:136 #, php-format msgid "%s days" -msgstr "" +msgstr "%s days" #: ../../godmode/reporting/create_container.php:300 #: ../../include/ajax/graph.ajax.php:137 ../../include/ajax/module.php:143 @@ -14199,6 +14235,8 @@ msgid "" "This is the interval or period of time with which the graph data will be " "obtained. For example, a week means data from a week ago from now. " msgstr "" +"This is the interval or period of time with which the graph data will be " +"obtained. For example, a week means data from a week ago from now. " #: ../../godmode/reporting/create_container.php:353 #: ../../godmode/reporting/reporting_builder.item_editor.php:1053 @@ -14234,13 +14272,13 @@ msgstr "Type of graph" #: ../../operation/agentes/interface_traffic_graph_win.php:274 #: ../../operation/agentes/stat_win.php:428 msgid "Show full scale graph (TIP)" -msgstr "" +msgstr "Show full scale graph (TIP)" #: ../../godmode/reporting/create_container.php:391 #: ../../godmode/reporting/create_container.php:445 #: ../../godmode/reporting/create_container.php:532 msgid "Add item" -msgstr "" +msgstr "Add item" #: ../../godmode/reporting/create_container.php:423 #: ../../godmode/reporting/create_container.php:558 @@ -14273,15 +14311,15 @@ msgstr "Tag" #: ../../godmode/reporting/create_container.php:548 msgid "There are no defined item container" -msgstr "" +msgstr "There are no defined item containers" #: ../../godmode/reporting/create_container.php:557 msgid "Agent/Module" -msgstr "" +msgstr "Agent/Module" #: ../../godmode/reporting/create_container.php:560 msgid "M.Group" -msgstr "" +msgstr "M.Group" #: ../../godmode/reporting/graph_builder.graph_editor.php:206 #: ../../godmode/reporting/reporting_builder.item_editor.php:709 @@ -14332,15 +14370,15 @@ msgstr "Sort items" #: ../../godmode/reporting/graph_builder.graph_editor.php:283 msgid "Sort selected items" -msgstr "" +msgstr "Sort selected items" #: ../../godmode/reporting/graph_builder.graph_editor.php:285 msgid "before to" -msgstr "" +msgstr "before to" #: ../../godmode/reporting/graph_builder.graph_editor.php:285 msgid "after to" -msgstr "" +msgstr "after to" #: ../../godmode/reporting/graph_builder.graph_editor.php:306 #: ../../operation/events/events_list.php:296 @@ -14431,7 +14469,7 @@ msgstr "" #: ../../godmode/reporting/graph_builder.main.php:188 msgid "Add summatory series" -msgstr "" +msgstr "Add summation series" #: ../../godmode/reporting/graph_builder.main.php:189 msgid "" @@ -14440,14 +14478,18 @@ msgid "" "\tThis feature could be used instead of synthetic modules if you only want " "to see a graph." msgstr "" +"Adds synthetic series to the graph, using all module \n" +"\tvalues to calculate the summation and/or average in each time interval. \n" +"\tThis feature could be used instead of synthetic modules if you only want " +"to see a graph." #: ../../godmode/reporting/graph_builder.main.php:193 msgid "Add average series" -msgstr "" +msgstr "Add average series" #: ../../godmode/reporting/graph_builder.main.php:195 msgid "Modules and series" -msgstr "" +msgstr "Modules and series" #: ../../godmode/reporting/graph_builder.main.php:198 #: ../../godmode/setup/setup_visuals.php:554 @@ -14455,7 +14497,7 @@ msgstr "" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1707 #: ../../enterprise/meta/advanced/metasetup.visual.php:137 msgid "This option may cause performance issues" -msgstr "" +msgstr "This option may cause performance issues" #: ../../godmode/reporting/graph_builder.php:233 #: ../../godmode/reporting/graph_container.php:56 @@ -14503,11 +14545,11 @@ msgstr "Graph stored successfully" #: ../../godmode/reporting/graph_builder.php:274 msgid "There was a problem storing Graph" -msgstr "There was a problem storing Graph" +msgstr "There was a problem storing the graph" #: ../../godmode/reporting/graph_builder.php:277 msgid "There was a problem adding Module" -msgstr "There was a problem adding Module" +msgstr "There was a problem adding the module" #: ../../godmode/reporting/graph_builder.php:280 msgid "Update the graph" @@ -14515,7 +14557,7 @@ msgstr "Update the graph" #: ../../godmode/reporting/graph_builder.php:280 msgid "Bad update the graph" -msgstr "Bad update the graph" +msgstr "Error updating the graph" #: ../../godmode/reporting/graph_builder.php:283 msgid "Graph deleted successfully" @@ -14523,11 +14565,11 @@ msgstr "Graph deleted successfully" #: ../../godmode/reporting/graph_builder.php:283 msgid "There was a problem deleting Graph" -msgstr "There was a problem deleting the graph" +msgstr "Error deleting the graph" #: ../../godmode/reporting/graphs.php:70 msgid "Graphs containers" -msgstr "" +msgstr "Graphs containers" #: ../../godmode/reporting/graphs.php:78 #: ../../godmode/reporting/map_builder.php:43 @@ -14570,7 +14612,7 @@ msgstr "Graph name" #: ../../godmode/reporting/graphs.php:157 #: ../../include/functions_container.php:131 msgid "Number of Graphs" -msgstr "Number of Graphs" +msgstr "Number of graphs" #: ../../godmode/reporting/graphs.php:220 msgid "Create graph" @@ -14579,17 +14621,17 @@ msgstr "Create graph" #: ../../godmode/reporting/map_builder.php:39 #: ../../godmode/reporting/visual_console_favorite.php:37 msgid "Visual Favourite Console" -msgstr "" +msgstr "Favorite Visual Console" #: ../../godmode/reporting/map_builder.php:194 #: ../../godmode/reporting/map_builder.php:204 msgid "Not copied. Error copying data" -msgstr "Not copied. Error copying data" +msgstr "Error copying data" #: ../../godmode/reporting/map_builder.php:244 #: ../../godmode/reporting/visual_console_favorite.php:69 msgid "Group Recursion" -msgstr "" +msgstr "Group Recursion" #: ../../godmode/reporting/map_builder.php:258 msgid "Map name" @@ -14657,18 +14699,20 @@ msgid "" "This type of report brings a lot of data loading, it is recommended to use " "it for scheduled reports and not for real-time view." msgstr "" -"This type of report implies a lot of data loading, and is therefore " +"This type of report implies loading a lot of data. Therefore it is " "recommended for scheduled reports, not real-time view." #: ../../godmode/reporting/reporting_builder.item_editor.php:731 msgid "Log number" -msgstr "" +msgstr "Log number" #: ../../godmode/reporting/reporting_builder.item_editor.php:732 msgid "" "Warning: this parameter limits the contents of the logs and affects the " "performance." msgstr "" +"Warning: this parameter limits the contents of the logs and affects the " +"performance." #: ../../godmode/reporting/reporting_builder.item_editor.php:745 msgid "" @@ -14676,8 +14720,8 @@ msgid "" "information for this report type. For example, a week means data from a week " "ago from now. " msgstr "" -"This is the range, or time-period, over which the report renders the " -"information for this type of report. E.g. a week means data from a week ago. " +"This is the range, or time period, over which the report renders the " +"information for this type of report, e.g. a week means data from a week ago. " #: ../../godmode/reporting/reporting_builder.item_editor.php:759 #: ../../enterprise/godmode/reporting/reporting_builder.global.php:150 @@ -14697,8 +14741,8 @@ msgid "" "most recent information" msgstr "" "Warning: period 0 reports cannot be used to show information back in time. " -"Information contained in this kind of reports will be always reporting the " -"most recent information" +"Information contained in this kind of reports will always report the most " +"recent information." #: ../../godmode/reporting/reporting_builder.item_editor.php:774 #: ../../include/functions_netflow.php:1134 @@ -14777,7 +14821,7 @@ msgstr "SQL query" #: ../../godmode/reporting/reporting_builder.item_editor.php:1274 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1613 msgid "Max items" -msgstr "" +msgstr "Max items" #: ../../godmode/reporting/reporting_builder.item_editor.php:1290 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1475 @@ -14807,7 +14851,7 @@ msgstr "Field separator" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1641 #: ../../enterprise/godmode/reporting/reporting_builder.wizard.php:501 msgid "Separator for different fields in the serialized text chain" -msgstr "Separator for different fields in the serialised text string" +msgstr "Separator for different fields in the serialized text chain" #: ../../godmode/reporting/reporting_builder.item_editor.php:1312 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1645 @@ -14885,11 +14929,11 @@ msgstr "Time comparison (overlapped)" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1706 #: ../../enterprise/godmode/reporting/reporting_builder.wizard.php:374 msgid "Full resolution graph (TIP)" -msgstr "" +msgstr "Full resolution graph (TIP)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1375 msgid "This option may cause performance issues." -msgstr "" +msgstr "This option may cause performance issues." #: ../../godmode/reporting/reporting_builder.item_editor.php:1392 #: ../../enterprise/godmode/reporting/reporting_builder.global.php:293 @@ -14910,11 +14954,11 @@ msgstr "Greater or equal to (>=)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1399 msgid "Less or equal (<=)" -msgstr "Lesser or equal to (<=)" +msgstr "Less than or equal to (<=)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1400 msgid "Less (<)" -msgstr "Lesser than (<)" +msgstr "Less than (<)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1401 msgid "Greater (>)" @@ -14926,7 +14970,7 @@ msgstr "Equal to (=)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1403 msgid "Not equal (!=)" -msgstr "Unequal to (!=)" +msgstr "Not equal to (!=)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1404 #: ../../include/functions_db.php:1594 @@ -14981,13 +15025,13 @@ msgstr "Show graph" #: ../../godmode/reporting/reporting_builder.item_editor.php:1435 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1746 msgid "Show address instead module name." -msgstr "Show address instead of module name." +msgstr "Show address instead of module name" #: ../../godmode/reporting/reporting_builder.item_editor.php:1436 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1747 #: ../../enterprise/godmode/reporting/reporting_builder.wizard.php:281 msgid "Show the main address of agent." -msgstr "Show the agent's main address." +msgstr "Show the main address of the agent" #: ../../godmode/reporting/reporting_builder.item_editor.php:1448 #: ../../enterprise/godmode/reporting/reporting_builder.global.php:318 @@ -15002,7 +15046,7 @@ msgid "" "the end of the report and Checks." msgstr "" "Show a summary chart with max, min and average number of total modules at " -"the end of the report and Checks." +"the end of the report and Checks" #: ../../godmode/reporting/reporting_builder.item_editor.php:1458 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1768 @@ -15038,7 +15082,7 @@ msgstr "By user validation" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1830 #: ../../enterprise/godmode/reporting/reporting_builder.wizard.php:452 msgid "By criticity" -msgstr "By priority" +msgstr "By severity" #: ../../godmode/reporting/reporting_builder.item_editor.php:1525 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1836 @@ -15049,7 +15093,7 @@ msgstr "Validated vs unvalidated" #: ../../godmode/reporting/reporting_builder.item_editor.php:1534 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1872 msgid "Query History Database" -msgstr "" +msgstr "Query History Database" #: ../../godmode/reporting/reporting_builder.item_editor.php:1543 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1844 @@ -15060,19 +15104,19 @@ msgstr "Show in two columns" #: ../../godmode/reporting/reporting_builder.item_editor.php:1548 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1850 msgid "Height (dynamic graphs)" -msgstr "" +msgstr "Height (dynamic graphs)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1555 #: ../../enterprise/godmode/reporting/reporting_builder.global.php:230 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1655 msgid "Show in the same row" -msgstr "" +msgstr "Show in the same row" #: ../../godmode/reporting/reporting_builder.item_editor.php:1556 #: ../../enterprise/godmode/reporting/reporting_builder.global.php:231 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1656 msgid "Show one module per row with all its operations" -msgstr "" +msgstr "Show one module per row with all its operations" #: ../../godmode/reporting/reporting_builder.item_editor.php:1567 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1855 @@ -15090,17 +15134,17 @@ msgstr "Show in landscape" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1881 #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:215 msgid "Hide not init agents" -msgstr "Hide not init agents" +msgstr "Hide not initialized agents" #: ../../godmode/reporting/reporting_builder.item_editor.php:1613 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2017 msgid "Calculate for custom intervals" -msgstr "" +msgstr "Calculate for custom intervals" #: ../../godmode/reporting/reporting_builder.item_editor.php:1624 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2028 msgid "Time lapse intervals" -msgstr "" +msgstr "Time lapse intervals" #: ../../godmode/reporting/reporting_builder.item_editor.php:1625 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2029 @@ -15108,21 +15152,23 @@ msgid "" "Lapses of time in which the period is divided to make more precise " "calculations\n" msgstr "" +"Lapses of time in which the period is divided to make more precise " +"calculations\n" #: ../../godmode/reporting/reporting_builder.item_editor.php:1657 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2068 msgid "Table only" -msgstr "" +msgstr "Table only" #: ../../godmode/reporting/reporting_builder.item_editor.php:1660 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2071 msgid "Graph only" -msgstr "" +msgstr "Graph only" #: ../../godmode/reporting/reporting_builder.item_editor.php:1663 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2074 msgid "Graph and table" -msgstr "" +msgstr "Graph and table" #: ../../godmode/reporting/reporting_builder.item_editor.php:1714 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2134 @@ -15141,7 +15187,7 @@ msgstr "SLA Limit (%)" #: ../../godmode/reporting/reporting_builder.item_editor.php:1725 msgid "Please save the SLA for start to add items in this list." -msgstr "Please save the SLA for start to add items in this list." +msgstr "Please save the SLA before adding items to this list." #: ../../godmode/reporting/reporting_builder.item_editor.php:1897 msgid "rate" @@ -15174,16 +15220,16 @@ msgid "" "the summatory maybe get bad result." msgstr "" "Please be careful: when the module has different intervals during its life, " -"the sum may return mistaken results." +"the summation may return mistaken results." #: ../../godmode/reporting/reporting_builder.item_editor.php:1934 msgid "Please save the report to start adding items into the list." -msgstr "Please save the report to start adding items onto the list" +msgstr "Please save the report to start adding items to the list." #: ../../godmode/reporting/reporting_builder.item_editor.php:2274 #: ../../godmode/reporting/reporting_builder.item_editor.php:2294 msgid "Please select Agent" -msgstr "Please select Agent" +msgstr "Please select an agent" #: ../../godmode/reporting/reporting_builder.list_items.php:288 #: ../../godmode/reporting/visual_console_builder.elements.php:80 @@ -15215,7 +15261,7 @@ msgstr "Descendent" #: ../../godmode/reporting/reporting_builder.list_items.php:320 #: ../../include/functions_custom_graphs.php:233 msgid "No items." -msgstr "No items." +msgstr "No items" #: ../../godmode/reporting/reporting_builder.list_items.php:513 msgid "Sort selected items from position: " @@ -15223,11 +15269,11 @@ msgstr "Sort selected items from position: " #: ../../godmode/reporting/reporting_builder.list_items.php:515 msgid "Move before to" -msgstr "Move before to" +msgstr "Move before" #: ../../godmode/reporting/reporting_builder.list_items.php:515 msgid "Move after to" -msgstr "Move after to" +msgstr "Move after" #: ../../godmode/reporting/reporting_builder.list_items.php:537 #: ../../godmode/reporting/reporting_builder.list_items.php:542 @@ -15240,27 +15286,27 @@ msgstr "Delete selected items from position: " #: ../../godmode/reporting/reporting_builder.list_items.php:546 msgid "Delete above to" -msgstr "Delete above to" +msgstr "Delete everything above" #: ../../godmode/reporting/reporting_builder.list_items.php:546 msgid "Delete below to" -msgstr "Delete below to" +msgstr "Delete everything below" #: ../../godmode/reporting/reporting_builder.list_items.php:584 msgid "" "Are you sure to sort the items into the report?\\nThis action change the " "sorting of items into data base." msgstr "" -"Are you sure you wish to sort the items into the report?\\nThis action " -"changes how items are sorted into the database." +"Are you sure you want to sort the items into the report?\\nThis action " +"changes the way items are sorted into the database." #: ../../godmode/reporting/reporting_builder.list_items.php:635 msgid "Are you sure to delete the items into the report?\\n" -msgstr "Are you sure to delete the items into the report?" +msgstr "Are you sure you want to delete the items in the report?\\n" #: ../../godmode/reporting/reporting_builder.list_items.php:657 msgid "Please select any item to delete" -msgstr "Please select an item to delete it" +msgstr "Please select an item to delete it." #: ../../godmode/reporting/reporting_builder.main.php:85 msgid "Only the group can view the report" @@ -15276,15 +15322,15 @@ msgstr "Only the user and admin user can edit the report" #: ../../godmode/reporting/reporting_builder.main.php:89 msgid "Write Access" -msgstr "Writing Access" +msgstr "Write Access" #: ../../godmode/reporting/reporting_builder.main.php:90 msgid "" "For example, you want a report that the people of \"All\" groups can see but " "you want to edit only for you or your group." msgstr "" -"For example, you want a report that people from \"All\" groups can see, but " -"you want only yourself or your group to be able to edit." +"For example, you want a report to be visible to \"All\" groups, but you only " +"want your group or yourself to be able to edit it." #: ../../godmode/reporting/reporting_builder.main.php:110 msgid "Non interactive report" @@ -15296,7 +15342,7 @@ msgid "" "report as soon as its finished" msgstr "" "Your report has been scheduled and the system will send a PDF file of the " -"report as soon as it's finished." +"report as soon as it is finished." #: ../../godmode/reporting/reporting_builder.php:115 msgid "An error has ocurred" @@ -15306,7 +15352,7 @@ msgstr "An error has ocurred." #: ../../godmode/reporting/reporting_builder.php:1998 #: ../../godmode/reporting/reporting_builder.php:2050 msgid "Reports list" -msgstr "Reports list" +msgstr "List of reports" #: ../../godmode/reporting/reporting_builder.php:380 #: ../../godmode/reporting/reporting_builder.php:402 @@ -15361,7 +15407,7 @@ msgstr "Private" #: ../../godmode/reporting/reporting_builder.php:648 msgid "This report exceeds the item limit for realtime operations" -msgstr "This report exceeds the item limit for realtime operations" +msgstr "This report exceeds the item limit for real-time operations" #: ../../godmode/reporting/reporting_builder.php:653 #: ../../enterprise/godmode/reporting/reporting_builder.template.php:342 @@ -15380,7 +15426,7 @@ msgstr "Export to XML" #: ../../enterprise/operation/log/log_viewer.php:436 #: ../../enterprise/operation/log/log_viewer.php:444 msgid "No data found." -msgstr "No data found." +msgstr "No data found" #: ../../godmode/reporting/reporting_builder.php:779 msgid "Create report" @@ -15410,11 +15456,11 @@ msgstr "View report" #: ../../godmode/reporting/reporting_builder.php:2116 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1234 msgid "Successfull action" -msgstr "Succesful action" +msgstr "Successful action" #: ../../godmode/reporting/reporting_builder.php:2116 msgid "Unsuccessful action<br><br>" -msgstr "" +msgstr "Unsuccessful action<br><br>" #: ../../godmode/reporting/visual_console_builder.data.php:91 msgid "Create visual console" @@ -15433,7 +15479,7 @@ msgid "" "map name in main menu" msgstr "" "Use [ or ( as first character, for example '[*] Map name', to render this " -"map name in main menu" +"map name in main menu." #: ../../godmode/reporting/visual_console_builder.data.php:128 #: ../../enterprise/godmode/agentes/collections.data.php:358 @@ -15471,7 +15517,7 @@ msgstr "Get default image size" #: ../../godmode/reporting/visual_console_builder.data.php:186 msgid "Favourite visual console" -msgstr "" +msgstr "Favourite visual console" #: ../../godmode/reporting/visual_console_builder.editor.php:134 msgid "Min allowed size is 1024x768" @@ -15487,15 +15533,15 @@ msgstr "Action in progress" #: ../../godmode/reporting/visual_console_builder.editor.php:139 #: ../../enterprise/dashboard/main_dashboard.php:374 msgid "Loading in progress" -msgstr "Loading in progress" +msgstr "Loading" #: ../../godmode/reporting/visual_console_builder.editor.php:144 msgid "Saving in progress" -msgstr "Saving in progress" +msgstr "Saving" #: ../../godmode/reporting/visual_console_builder.editor.php:149 msgid "Deletion in progress" -msgstr "Deletion in progress" +msgstr "Deleting" #: ../../godmode/reporting/visual_console_builder.elements.php:78 #: ../../godmode/reporting/visual_console_builder.wizard.php:118 @@ -15547,7 +15593,7 @@ msgstr "Module Graph" #: ../../include/functions_visual_map_editor.php:57 #: ../../include/functions_visual_map_editor.php:869 msgid "Auto SLA Graph" -msgstr "" +msgstr "Auto SLA Graph" #: ../../godmode/reporting/visual_console_builder.elements.php:163 #: ../../include/functions_visual_map.php:3935 @@ -15590,23 +15636,23 @@ msgstr "Invalid image file" #: ../../godmode/reporting/visual_console_builder.php:167 #: ../../godmode/reporting/visual_console_builder.php:168 msgid "File already are exists." -msgstr "File already exists." +msgstr "File already exists" #: ../../godmode/reporting/visual_console_builder.php:174 #: ../../godmode/reporting/visual_console_builder.php:175 msgid "The file have not image extension." -msgstr "The file doesn't have an image extension" +msgstr "The file does not have an image extension." #: ../../godmode/reporting/visual_console_builder.php:186 #: ../../godmode/reporting/visual_console_builder.php:187 #: ../../godmode/reporting/visual_console_builder.php:194 #: ../../godmode/reporting/visual_console_builder.php:197 msgid "Problems with move file to target." -msgstr "Problems moving file to target location" +msgstr "Error moving file to target location" #: ../../godmode/reporting/visual_console_builder.php:222 msgid "Successfully update." -msgstr "Successfully updated" +msgstr "Updated successfully" #: ../../godmode/reporting/visual_console_builder.php:234 msgid "Could not be update." @@ -15614,30 +15660,30 @@ msgstr "Could not be updated" #: ../../godmode/reporting/visual_console_builder.php:248 msgid "Successfully created." -msgstr "Successfully created." +msgstr "Created successfully" #: ../../godmode/reporting/visual_console_builder.php:261 msgid "Could not be created." -msgstr "Could not be created." +msgstr "Could not be created" #: ../../godmode/reporting/visual_console_builder.php:302 msgid "Successfully multiple delete." -msgstr "Successfully multiple delete." +msgstr "Multiple items deleted successfully" #: ../../godmode/reporting/visual_console_builder.php:303 msgid "Unsuccessful multiple delete." -msgstr "" +msgstr "Error deleting multiple items" #: ../../godmode/reporting/visual_console_builder.php:386 msgid "Successfully delete." -msgstr "Successfully delete." +msgstr "Deleted successfully" #: ../../godmode/reporting/visual_console_builder.php:664 #: ../../operation/visual_console/pure_ajax.php:96 #: ../../operation/visual_console/render_view.php:96 #: ../../enterprise/meta/screens/screens.visualmap.php:136 msgid "Visual consoles list" -msgstr "Visual consoles list" +msgstr "List of visual consoles" #: ../../godmode/reporting/visual_console_builder.php:667 #: ../../operation/gis_maps/render_view.php:128 @@ -15652,7 +15698,7 @@ msgstr "Show link to public Visual Console" #: ../../operation/visual_console/render_view.php:116 #: ../../enterprise/meta/screens/screens.visualmap.php:117 msgid "List elements" -msgstr "List elements" +msgstr "List of elements" #: ../../godmode/reporting/visual_console_builder.php:678 #: ../../operation/visual_console/pure_ajax.php:118 @@ -15692,7 +15738,7 @@ msgstr "New visual console" #: ../../include/functions_visual_map_editor.php:55 #: ../../include/functions_visual_map_editor.php:865 msgid "Percentile Item" -msgstr "Percentile Item" +msgstr "Percentile item" #: ../../godmode/reporting/visual_console_builder.wizard.php:106 #: ../../include/functions_visual_map.php:3902 @@ -15785,11 +15831,11 @@ msgstr "Enable agent link" #: ../../godmode/reporting/visual_console_builder.wizard.php:322 msgid "Set Parent" -msgstr "Set Parent" +msgstr "Set parent" #: ../../godmode/reporting/visual_console_builder.wizard.php:324 msgid "Item created in the visualmap" -msgstr "Iteam created on the visual map" +msgstr "Item created on the visual map" #: ../../godmode/reporting/visual_console_builder.wizard.php:325 msgid "Use the agents relationship (from selected agents)" @@ -15801,12 +15847,13 @@ msgstr "Item on the map" #: ../../godmode/reporting/visual_console_builder.wizard.php:331 msgid "The parent relationships in Pandora will be drawn in the map." -msgstr "The parenting relationships in Pandora will be drawn on the map." +msgstr "" +"The parent-child relations in Pandora FMS will be represented on the map." #: ../../godmode/reporting/visual_console_builder.wizard.php:344 #: ../../godmode/reporting/visual_console_builder.wizard.php:349 msgid "Are you sure to add many elements\\nin visual map?" -msgstr "Are you sure you wish to add this many elements\\non the visual map?" +msgstr "Are you sure you want to add so many elements\\non the visual map?" #: ../../godmode/reporting/visual_console_builder.wizard.php:377 #: ../../mobile/operation/agent.php:338 ../../mobile/operation/agents.php:404 @@ -15840,7 +15887,7 @@ msgstr "Manage recon task" #: ../../godmode/servers/manage_recontask.php:55 msgid "Successfully deleted recon task" -msgstr "Successfully deleted recon task" +msgstr "Recon task deleted successfully" #: ../../godmode/servers/manage_recontask.php:58 msgid "Error deleting recon task" @@ -15864,13 +15911,13 @@ msgstr "Wrong format in the Subnet field" #: ../../godmode/servers/manage_recontask.php:235 msgid "Recon-task name already exists and incorrect format in Subnet field" msgstr "" -"The recon task's name already exists and the format is incorrect for the " +"The recon task name already exists and the format is incorrect for the " "Subnet field." #: ../../godmode/servers/manage_recontask.php:243 #: ../../godmode/servers/manage_recontask.php:252 msgid "Recon-task name already exists" -msgstr "The recon task's name already exists" +msgstr "The recon task name already exists." #: ../../godmode/servers/manage_recontask.php:266 msgid "Successfully created recon task" @@ -15912,15 +15959,15 @@ msgstr "Manual" #: ../../godmode/servers/manage_recontask.php:392 msgid "There are no recon task configured" -msgstr "There are no recon tasks set up" +msgstr "There are no recon tasks configured." #: ../../godmode/servers/manage_recontask_form.php:193 msgid "" "By default, in Windows, Pandora FMS only support Standard network sweep, not " "custom scripts" msgstr "" -"On Windows Pandora FMS only supports standard network sweeps by default, not " -"custom scripts." +"On Windows, Pandora FMS only supports standard network sweeps by default, " +"not custom scripts." #: ../../godmode/servers/manage_recontask_form.php:224 #: ../../operation/servers/recon_view.php:92 @@ -15932,8 +15979,8 @@ msgid "" "You must select a Recon Server for the Task, otherwise the Recon Task will " "never run" msgstr "" -"You must appoint a recon server for the task, otherwise the recon task won't " -"run." +"You must appoint a recon server for the task, otherwise the recon task will " +"not run." #: ../../godmode/servers/manage_recontask_form.php:238 msgid "Network sweep" @@ -15950,10 +15997,12 @@ msgid "" "You can specify several networks, separated by commas, for example: " "192.168.50.0/24,192.168.60.0/24" msgstr "" +"You can specify several networks, separated by commas, for example: " +"192.168.50.0/24,192.168.60.0/24" #: ../../godmode/servers/manage_recontask_form.php:260 msgid "Manual interval means that it will be executed only On-demand" -msgstr "Manual interval means that it's going to run only on demand." +msgstr "Manual interval means that it will run only on demand." #: ../../godmode/servers/manage_recontask_form.php:262 #: ../../include/functions_reporting_html.php:1605 @@ -15975,26 +16024,28 @@ msgid "" "format). If dont want to do a sweep using portscan, left it in blank" msgstr "" "Defined ports such as 80 or 80,443,512 or even 0-1024 (same format as Nmap " -"command line) are left blank if you don't want to perform a sweep using " +"command line) are left blank if you do not want to perform a sweep using " "portscan." #: ../../godmode/servers/manage_recontask_form.php:320 msgid "Choose if the discovery of a new system creates an incident or not." -msgstr "Choose if the discovery of a new system creates an incident or not." +msgstr "Choose if the discovery of a new system creates an issue or not." #: ../../godmode/servers/manage_recontask_form.php:323 msgid "SNMP enabled" -msgstr "" +msgstr "SNMP enabled" #: ../../godmode/servers/manage_recontask_form.php:327 msgid "SNMP Default community" -msgstr "SNMP Default community" +msgstr "Default SNMP community" #: ../../godmode/servers/manage_recontask_form.php:328 msgid "" "You can specify several values, separated by commas, for example: " "public,mysecret,1234" msgstr "" +"You can specify several values, separated by commas, for example: " +"public,mysecret,1234" #: ../../godmode/servers/manage_recontask_form.php:334 msgid "Explanation" @@ -16026,11 +16077,11 @@ msgstr "" #: ../../godmode/servers/manage_recontask_form.php:391 msgid "Vlan enabled" -msgstr "" +msgstr "Vlan enabled" #: ../../godmode/servers/modificar_server.php:35 msgid "Update Server" -msgstr "Update Server" +msgstr "Update server" #: ../../godmode/servers/modificar_server.php:41 #: ../../godmode/servers/plugin.php:300 ../../godmode/servers/plugin.php:759 @@ -16045,32 +16096,32 @@ msgstr "Satellite" #: ../../godmode/servers/modificar_server.php:62 msgid "Exec Server" -msgstr "" +msgstr "Execute server" #: ../../godmode/servers/modificar_server.php:64 msgid "Check Exec Server" -msgstr "" +msgstr "Check execution of server" #: ../../godmode/servers/modificar_server.php:80 msgid "Remote Configuration" -msgstr "Remote Configuration" +msgstr "Remote configuration" #: ../../godmode/servers/modificar_server.php:85 msgid "Pandora servers" -msgstr "Pandora servers" +msgstr "Pandora FMS servers" #: ../../godmode/servers/modificar_server.php:92 #: ../../godmode/servers/modificar_server.php:104 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1234 msgid "Unsuccessfull action" -msgstr "Unsuccesful action" +msgstr "Unsuccessful action" #: ../../godmode/servers/modificar_server.php:95 #: ../../godmode/servers/modificar_server.php:107 #: ../../enterprise/godmode/alerts/alert_events_list.php:328 #: ../../enterprise/godmode/alerts/alert_events_rules.php:357 msgid "Successfully action" -msgstr "Action successfully processed" +msgstr "Action processed successfully" #: ../../godmode/servers/modificar_server.php:117 #: ../../enterprise/meta/advanced/servers.php:39 @@ -16080,7 +16131,7 @@ msgstr "Server deleted successfully" #: ../../godmode/servers/modificar_server.php:120 #: ../../enterprise/meta/advanced/servers.php:42 msgid "There was a problem deleting the server" -msgstr "There was a problem deleting the server" +msgstr "Error deleting the server" #: ../../godmode/servers/modificar_server.php:132 msgid "Server updated successfully" @@ -16088,11 +16139,11 @@ msgstr "Server updated successfully" #: ../../godmode/servers/modificar_server.php:135 msgid "There was a problem updating the server" -msgstr "There was a problem updating the server" +msgstr "Error updating the server" #: ../../godmode/servers/plugin.php:53 msgid "Network Components" -msgstr "Network Components" +msgstr "Network components" #: ../../godmode/servers/plugin.php:151 #: ../../include/functions_filemanager.php:770 @@ -16115,15 +16166,15 @@ msgstr "Index of %s" #: ../../godmode/servers/plugin.php:266 msgid "Plugin creation" -msgstr "Plug-in creation" +msgstr "Plugin creation" #: ../../godmode/servers/plugin.php:269 msgid "Plugin update" -msgstr "Plug-in update" +msgstr "Plugin update" #: ../../godmode/servers/plugin.php:299 msgid "Plugin type" -msgstr "Plug-in type" +msgstr "Plugin type" #: ../../godmode/servers/plugin.php:301 ../../godmode/servers/plugin.php:761 msgid "Nagios" @@ -16138,23 +16189,22 @@ msgid "" "This value only will be applied if is minor than the server general " "configuration plugin timeout" msgstr "" -"This value will only be applied if it's less than the timeout for the " -"server's general configuration plugin." +"This value will only be applied if it is lower than the plugin timeout of " +"the general configuration of the server." #: ../../godmode/servers/plugin.php:306 msgid "" "If you set a 0 seconds timeout, the server plugin timeout will be used" msgstr "" -"If you set the timeout to 0 seconds, the server's plugin timeout will be " -"used." +"If you set the timeout to 0 seconds, the server plugin timeout will be used." #: ../../godmode/servers/plugin.php:362 msgid "Plugin command" -msgstr "Plug-in command" +msgstr "Plugin command" #: ../../godmode/servers/plugin.php:373 msgid "Plug-in parameters" -msgstr "Plug-in parameters" +msgstr "Plugin parameters" #: ../../godmode/servers/plugin.php:451 #: ../../godmode/servers/recon_script.php:161 @@ -16165,12 +16215,12 @@ msgstr "Default value" #: ../../godmode/servers/plugin.php:464 #: ../../godmode/servers/recon_script.php:174 msgid "Hide value" -msgstr "Hide Value" +msgstr "Hide value" #: ../../godmode/servers/plugin.php:464 #: ../../godmode/servers/recon_script.php:174 msgid "This field will show up as dots like a password" -msgstr "This field is only going to display dots like a password window." +msgstr "This field will be displayed with dots, just like a password." #: ../../godmode/servers/plugin.php:473 #: ../../godmode/servers/recon_script.php:183 @@ -16200,15 +16250,15 @@ msgstr "Macro parameters" #: ../../godmode/servers/plugin.php:564 msgid "Plugins registered in Pandora FMS" -msgstr "Plug-ins registered on Pandora FMS" +msgstr "Plugins registered on Pandora FMS" #: ../../godmode/servers/plugin.php:569 msgid "You need to create your own plugins with Windows compatibility" -msgstr "You'll need to create your own Windows-compatible plugins" +msgstr "You will need to create your own Windows-compatible plugins." #: ../../godmode/servers/plugin.php:629 msgid "Problem updating plugin" -msgstr "Problem updating plugin" +msgstr "Error updating plugin" #: ../../godmode/servers/plugin.php:632 msgid "Plugin updated successfully" @@ -16216,7 +16266,7 @@ msgstr "Plugin updated successfully" #: ../../godmode/servers/plugin.php:687 msgid "Problem creating plugin" -msgstr "Problem creating plugin" +msgstr "Error creating plugin" #: ../../godmode/servers/plugin.php:690 msgid "Plugin created successfully" @@ -16224,7 +16274,7 @@ msgstr "Plugin created successfully" #: ../../godmode/servers/plugin.php:700 msgid "Problem deleting plugin" -msgstr "Problem deleting plugin" +msgstr "Error deleting plugin" #: ../../godmode/servers/plugin.php:703 msgid "Plugin deleted successfully" @@ -16232,11 +16282,11 @@ msgstr "Plugin deleted successfully" #: ../../godmode/servers/plugin.php:782 msgid "All the modules that are using this plugin will be deleted" -msgstr "All modules that are using this plugin will be deleted" +msgstr "All the modules using this plugin will be deleted." #: ../../godmode/servers/plugin.php:789 msgid "There are no plugins in the system" -msgstr "There are no plugins on the system" +msgstr "There are no plugins on the system." #: ../../godmode/servers/plugin.php:801 #, php-format @@ -16245,7 +16295,7 @@ msgstr "List of modules and components created by \"%s\" " #: ../../godmode/servers/plugin.php:909 ../../godmode/servers/plugin.php:925 msgid "Some modules or components are using the plugin" -msgstr "Some modules or components are using the plugin" +msgstr "Some modules or components are using the plugin." #: ../../godmode/servers/plugin.php:910 msgid "" @@ -16253,7 +16303,7 @@ msgid "" "operations for plugins after this change" msgstr "" "Modules or components should be updated manually or by using the bulk " -"operation option for plugins after this change" +"operation option for plugins after this change." #: ../../godmode/servers/plugin.php:912 msgid "Are you sure you want to perform this action?" @@ -16277,7 +16327,7 @@ msgid "" "using the plugin" msgstr "" "The plugin macros cannot be updated because some modules or components are " -"using the plugin" +"using the plugin." #: ../../godmode/servers/recon_script.php:73 msgid "Recon script creation" @@ -16297,28 +16347,28 @@ msgstr "Recon scripts registered on Pandora FMS" #: ../../godmode/servers/recon_script.php:271 msgid "Problem updating" -msgstr "Problem updating" +msgstr "Error updating" #: ../../godmode/servers/recon_script.php:317 msgid "Problem creating" -msgstr "Problem creating" +msgstr "Error creating" #: ../../godmode/servers/recon_script.php:331 msgid "Problem deleting reconscript" -msgstr "Problem deleting reconscript" +msgstr "Error deleting recon script" #: ../../godmode/servers/recon_script.php:334 msgid "reconscript deleted successfully" -msgstr "Reconscript deleted successfully" +msgstr "Recon script deleted successfully" #: ../../godmode/servers/recon_script.php:378 msgid "There are no recon scripts in the system" -msgstr "There are no recon scripts in the system" +msgstr "There are no recon scripts in the system." #: ../../godmode/servers/servers.build_table.php:38 #: ../../enterprise/meta/advanced/servers.build_table.php:33 msgid "There are no servers configured into the database" -msgstr "There are no servers registered on the database" +msgstr "There are no servers registered on the database." #: ../../godmode/servers/servers.build_table.php:69 #: ../../enterprise/meta/advanced/servers.build_table.php:64 @@ -16338,12 +16388,12 @@ msgstr "T/Q" #: ../../godmode/servers/servers.build_table.php:70 #: ../../enterprise/meta/advanced/servers.build_table.php:65 msgid "Threads / Queued modules currently" -msgstr "Current threads/queued modules currently" +msgstr "Current threads/queued modules" #: ../../godmode/servers/servers.build_table.php:97 #: ../../enterprise/meta/advanced/servers.build_table.php:92 msgid "This is a master server" -msgstr "This is a master server" +msgstr "This is a master server." #: ../../godmode/servers/servers.build_table.php:110 #: ../../godmode/servers/servers.build_table.php:115 @@ -16354,11 +16404,11 @@ msgstr "of" #: ../../godmode/servers/servers.build_table.php:148 msgid "Manage recon tasks" -msgstr "" +msgstr "Manage recon tasks" #: ../../godmode/servers/servers.build_table.php:155 msgid "Reset module status and fired alert counts" -msgstr "Reset module status and fired alert counts" +msgstr "Reset module status and triggered alert counts" #: ../../godmode/servers/servers.build_table.php:161 msgid "Claim back SNMP modules" @@ -16382,7 +16432,7 @@ msgstr "Map connection name" #: ../../godmode/setup/gis.php:83 msgid "Do you wan delete this connection?" -msgstr "do you wish to delete this connection?" +msgstr "Do you want to delete this connection?" #: ../../godmode/setup/gis_step_2.php:39 msgid "Create new map connection" @@ -16394,7 +16444,7 @@ msgstr "Edit map connection" #: ../../godmode/setup/gis_step_2.php:150 msgid "Connection Name" -msgstr "Connection Name" +msgstr "Connection name" #: ../../godmode/setup/gis_step_2.php:150 msgid "Descriptive name for the connection" @@ -16422,7 +16472,7 @@ msgstr "Basic configuration" #: ../../godmode/setup/gis_step_2.php:168 msgid "Open Street Maps" -msgstr "Open Street Maps" +msgstr "OpenStreetMaps" #: ../../godmode/setup/gis_step_2.php:169 msgid "Google Maps" @@ -16430,7 +16480,7 @@ msgstr "Google Maps" #: ../../godmode/setup/gis_step_2.php:170 msgid "Static Image" -msgstr "Static Image" +msgstr "Static image" #: ../../godmode/setup/gis_step_2.php:172 msgid "Please select the connection type" @@ -16454,7 +16504,7 @@ msgstr "Google Hybrid" #: ../../godmode/setup/gis_step_2.php:218 msgid "Google Satelite" -msgstr "Google Satelite" +msgstr "Google Satellite" #: ../../godmode/setup/gis_step_2.php:222 msgid "Google Map Type" @@ -16470,7 +16520,7 @@ msgstr "Image URL" #: ../../godmode/setup/gis_step_2.php:239 msgid "Corners of the area of the image" -msgstr "Corners of the area of the image" +msgstr "Corners of the image area" #: ../../godmode/setup/gis_step_2.php:242 msgid "Left" @@ -16492,14 +16542,14 @@ msgstr "Top" #: ../../godmode/setup/gis_step_2.php:254 msgid "Image Size" -msgstr "Image Size" +msgstr "Image size" #: ../../godmode/setup/gis_step_2.php:279 msgid "" "Preview to select the center of the map and the default position of an agent " "without gis data" msgstr "" -"Previes to select the center of the map and the default position for an " +"Preview to select the center of the map and the default position for an " "agent without GIS data." #: ../../godmode/setup/gis_step_2.php:280 @@ -16524,7 +16574,7 @@ msgstr "Change on the map" #: ../../godmode/setup/gis_step_2.php:292 msgid "This selects what to change by clicking on the map" -msgstr "This selects what to change by clicking on the map" +msgstr "Select what changes when you click on the map" #: ../../godmode/setup/gis_step_2.php:296 #: ../../operation/agentes/gis_view.php:199 @@ -16544,7 +16594,7 @@ msgstr "Altitude" #: ../../godmode/setup/gis_step_2.php:353 #: ../../godmode/setup/gis_step_2.php:446 msgid "Center" -msgstr "Centre" +msgstr "Center" #: ../../godmode/setup/gis_step_2.php:413 msgid "Refresh preview map" @@ -16552,11 +16602,11 @@ msgstr "Refresh preview map" #: ../../godmode/setup/license.php:27 msgid "License management" -msgstr "Licence Management" +msgstr "License management" #: ../../godmode/setup/license.php:37 msgid "License updated" -msgstr "Licence updated" +msgstr "License updated" #: ../../godmode/setup/license.php:64 #: ../../enterprise/meta/advanced/license_meta.php:79 @@ -16595,22 +16645,22 @@ msgstr "modules" #: ../../godmode/setup/license.php:73 #: ../../enterprise/meta/advanced/license_meta.php:88 msgid "Current Platform Count" -msgstr "Current Platform Count" +msgstr "Current platform count" #: ../../godmode/setup/license.php:76 #: ../../enterprise/meta/advanced/license_meta.php:91 msgid "Current Platform Count (enabled: items)" -msgstr "Current Platform Count (enabled: items)" +msgstr "Current platform count (enabled: items)" #: ../../godmode/setup/license.php:79 #: ../../enterprise/meta/advanced/license_meta.php:94 msgid "Current Platform Count (disabled: items)" -msgstr "Current Platform Count (disabled: items)" +msgstr "Current platform count (disabled: items)" #: ../../godmode/setup/license.php:82 #: ../../enterprise/meta/advanced/license_meta.php:97 msgid "License Mode" -msgstr "Licence Mode" +msgstr "License Mode" #: ../../godmode/setup/license.php:85 #: ../../enterprise/meta/advanced/license_meta.php:100 @@ -16627,7 +16677,7 @@ msgstr "enabled" #: ../../enterprise/meta/advanced/license_meta.php:101 #: ../../enterprise/meta/advanced/license_meta.php:104 msgid "disabled" -msgstr "Disabled" +msgstr "disabled" #: ../../godmode/setup/license.php:91 #: ../../enterprise/meta/advanced/license_meta.php:106 @@ -16653,12 +16703,12 @@ msgstr "Validate" #: ../../enterprise/meta/advanced/license_meta.php:115 #: ../../enterprise/meta/advanced/license_meta.php:119 msgid "Request new license" -msgstr "Request new licence" +msgstr "Request new license" #: ../../godmode/setup/license.php:108 #: ../../enterprise/meta/advanced/license_meta.php:123 msgid "To get your <b>Pandora FMS Enterprise License</b>:" -msgstr "To get your <b>Pandora FMS Enterprise Licence</b>:" +msgstr "To get your <b>Pandora FMS Enterprise License</b>:" #: ../../godmode/setup/license.php:111 #: ../../enterprise/meta/advanced/license_meta.php:126 @@ -16674,7 +16724,7 @@ msgstr "Enter the <b>auth key</b> and the following <b>request key</b>:" #: ../../godmode/setup/license.php:120 #: ../../enterprise/meta/advanced/license_meta.php:135 msgid "Enter your name (or a company name) and a contact email address." -msgstr "Enter your name (or a company name) and a contact e-mail address." +msgstr "Enter your name (or a company name) and a contact email address." #: ../../godmode/setup/license.php:123 #: ../../enterprise/meta/advanced/license_meta.php:138 @@ -16688,7 +16738,7 @@ msgid "" "the generated license key and click on <b>Validate</b>." msgstr "" "Click <a href=\"javascript: close_code_license_dialog();\">here</a>, enter " -"the generated licence key and click on <b>Validate</b>." +"the generated license key and click on <b>Validate</b>." #: ../../godmode/setup/links.php:27 msgid "Link management" @@ -16696,19 +16746,19 @@ msgstr "Link management" #: ../../godmode/setup/links.php:39 msgid "There was a problem creating link" -msgstr "There was a problem creating the link" +msgstr "Error creating the link" #: ../../godmode/setup/links.php:56 msgid "There was a problem modifying link" -msgstr "There was a problem modifying the link" +msgstr "Error modifying the link" #: ../../godmode/setup/links.php:67 msgid "There was a problem deleting link" -msgstr "There was a problem deleting the link" +msgstr "Error deleting the link" #: ../../godmode/setup/links.php:86 ../../godmode/setup/news.php:130 msgid "Name error" -msgstr "Map not found" +msgstr "Name error" #: ../../godmode/setup/links.php:106 ../../godmode/setup/links.php:136 msgid "Link name" @@ -16721,11 +16771,11 @@ msgstr "Link" #: ../../godmode/setup/links.php:132 msgid "There isn't links" -msgstr "There aren't links" +msgstr "There are no links." #: ../../godmode/setup/news.php:28 msgid "Site news management" -msgstr "Site news management" +msgstr "Manage site news" #: ../../godmode/setup/news.php:161 ../../godmode/setup/news.php:220 #: ../../godmode/update_manager/update_manager.messages.php:136 @@ -16737,7 +16787,7 @@ msgstr "Subject" #: ../../godmode/setup/news.php:167 msgid "Modal screen" -msgstr "Modal Window" +msgstr "Modal window" #: ../../godmode/setup/news.php:170 msgid "Expire" @@ -16749,7 +16799,7 @@ msgstr "Expiration" #: ../../godmode/setup/news.php:215 msgid "There are no defined news" -msgstr "There are no news defined" +msgstr "There are no news defined." #: ../../godmode/setup/news.php:222 #: ../../operation/agentes/estado_generalagente.php:421 @@ -16779,15 +16829,15 @@ msgstr "Create OS" #: ../../godmode/setup/os.php:73 msgid "Fail creating OS" -msgstr "Failure creating OS" +msgstr "Error creating OS" #: ../../godmode/setup/os.php:80 msgid "Success creating OS" -msgstr "Success creating OS" +msgstr "OS created successfully" #: ../../godmode/setup/os.php:100 msgid "Success updatng OS" -msgstr "Success updating OS" +msgstr "OS updated successfully" #: ../../godmode/setup/os.php:100 msgid "Error updating OS" @@ -16795,11 +16845,11 @@ msgstr "Error updating OS" #: ../../godmode/setup/os.php:119 msgid "There are agents with this OS." -msgstr "This OS is being used" +msgstr "This OS is being used." #: ../../godmode/setup/os.php:124 msgid "Success deleting" -msgstr "Success deleting" +msgstr "Deleted successfully" #: ../../godmode/setup/os.php:124 msgid "Error deleting" @@ -16807,7 +16857,7 @@ msgstr "Error deleting" #: ../../godmode/setup/os.php:133 msgid "List OS" -msgstr "List OS" +msgstr "List of OS" #: ../../godmode/setup/os.php:137 msgid "Builder OS" @@ -16818,7 +16868,7 @@ msgstr "OS editor" #: ../../enterprise/meta/advanced/metasetup.performance.php:78 #: ../../enterprise/meta/include/functions_meta.php:1426 msgid "Max. days before delete events" -msgstr "Max. days before delete events" +msgstr "Max. days before events are deleted" #: ../../godmode/setup/performance.php:49 msgid "" @@ -16831,24 +16881,24 @@ msgstr "" #: ../../godmode/setup/performance.php:52 #: ../../include/functions_config.php:403 msgid "Max. days before delete traps" -msgstr "Max. days before trap cleanup" +msgstr "Max. days before traps are deleted" #: ../../godmode/setup/performance.php:55 #: ../../include/functions_config.php:407 #: ../../enterprise/meta/advanced/metasetup.performance.php:85 #: ../../enterprise/meta/include/functions_meta.php:1446 msgid "Max. days before delete audit events" -msgstr "Max. days before audited event cleanup" +msgstr "Max. days before audited events are deleted" #: ../../godmode/setup/performance.php:58 #: ../../include/functions_config.php:405 msgid "Max. days before delete string data" -msgstr "Max. days before delete string data" +msgstr "Max. days before string data is deleted" #: ../../godmode/setup/performance.php:61 #: ../../include/functions_config.php:409 msgid "Max. days before delete GIS data" -msgstr "Max. days before delete GIS data" +msgstr "Max. days before GIS data is deleted" #: ../../godmode/setup/performance.php:64 #: ../../include/functions_config.php:411 @@ -16861,21 +16911,21 @@ msgid "" "sense" msgstr "" "Configuring a more frequent purge interval than a data compacting interval " -"makes no sense." +"is illogical." #: ../../godmode/setup/performance.php:67 #: ../../include/functions_config.php:415 msgid "Max. days before compact data" -msgstr "Max. days before data compacting" +msgstr "Max. days before data is compacted" #: ../../godmode/setup/performance.php:70 #: ../../include/functions_config.php:413 msgid "Max. days before delete unknown modules" -msgstr "Max. days before deleting unknown modules." +msgstr "Max. days before unknown modules are deleted" #: ../../godmode/setup/performance.php:73 msgid "Max. days before delete autodisabled agents" -msgstr "Max. days before delete autodisabled agents" +msgstr "Max. days before autodisabled agents are deleted" #: ../../godmode/setup/performance.php:76 #: ../../include/functions_config.php:439 @@ -16884,7 +16934,9 @@ msgstr "Retention period of past special days" #: ../../godmode/setup/performance.php:76 msgid "This number is days to keep past special days. 0 means never remove." -msgstr "This number is days to keep past special days. 0 means never remove." +msgstr "" +"This number represents the number of days that past special days will be " +"stored. 0 means they will never be removed." #: ../../godmode/setup/performance.php:79 #: ../../include/functions_config.php:441 @@ -16898,24 +16950,24 @@ msgstr "Number of macro fields in alerts and templates between 1 and 15" #: ../../godmode/setup/performance.php:83 #: ../../include/functions_config.php:444 msgid "Max. days before delete inventory data" -msgstr "Max. days before delete inventory data" +msgstr "Max. days before inventory data is deleted" #: ../../godmode/setup/performance.php:96 msgid "Item limit for realtime reports" -msgstr "Item limit for realtime reports" +msgstr "Item limit for real-time reports" #: ../../godmode/setup/performance.php:96 msgid "" "Set a value too high cause a slowdown on console and a performance penalty " "in the system." msgstr "" -"Setting too high a value will cause a slowdown on console and a performance " -"penalty in the system." +"Setting excessively high values will cause a slowdown on the console and a " +"performance problem in the system." #: ../../godmode/setup/performance.php:100 #: ../../include/functions_config.php:421 msgid "Compact interpolation in hours (1 Fine-20 bad)" -msgstr "Compact interpolation in hours (1 Fine-20 bad)" +msgstr "Compact interpolation in hours (1 = fine / 20 = bad)" #: ../../godmode/setup/performance.php:100 msgid "Data will be compacted in intervals of the specified length." @@ -16974,7 +17026,7 @@ msgstr "Default hours for event view" #: ../../godmode/setup/performance.php:117 #: ../../include/functions_config.php:425 msgid "Use realtime statistics" -msgstr "Use realtime statistics" +msgstr "Use real-time statistics" #: ../../godmode/setup/performance.php:121 #: ../../include/functions_config.php:427 @@ -16986,7 +17038,7 @@ msgid "" "If realtime statistics are disabled, statistics interval resfresh will be " "set here." msgstr "" -"If realtime statistics are disabled, the refresh interval for statistics " +"If real-time statistics are disabled, the refresh interval for statistics " "will be set here." #: ../../godmode/setup/performance.php:124 @@ -17007,13 +17059,13 @@ msgid "" "notification space." msgstr "" "This number is the maximum number of files for the attachment directory. If " -"this number is reached, a warning message will appear in the header's " +"this number is reached, a warning message will appear in the header " "notification space." #: ../../godmode/setup/performance.php:131 #: ../../include/functions_config.php:433 msgid "Delete not init modules" -msgstr "Delete not init modules" +msgstr "Delete not initialized modules" #: ../../godmode/setup/performance.php:135 msgid "Big Operation Step to purge old data" @@ -17025,9 +17077,9 @@ msgid "" "means bigger blocks, which is faster but heavier on the database. Default is " "100." msgstr "" -"The number of blocks that a time interval is split into. A bigger value " -"means bigger blocks, which is faster but heavier on the database. Default is " -"100." +"The number of blocks that a time interval is split into. A higher value " +"means bigger blocks, which are faster but heavier on the database. Default " +"is 100." #: ../../godmode/setup/performance.php:138 #: ../../include/functions_config.php:437 @@ -17047,13 +17099,15 @@ msgstr "" #: ../../godmode/setup/performance.php:141 #: ../../include/functions_config.php:447 msgid "Graph container - Max. Items" -msgstr "" +msgstr "Graph container - Max. Items" #: ../../godmode/setup/performance.php:141 msgid "" "The number of graphs that are viewed in a container. Default is 10 " ".Increasing this number could lead to performance problems" msgstr "" +"The number of graphs that are viewed in a container. Default is 10. " +"Increasing this number could lead to performance problems." #: ../../godmode/setup/performance.php:146 msgid "Database maintenance options" @@ -17081,13 +17135,13 @@ msgid "" "remote (ldap etc...) authentication failed." msgstr "" "Please enable this option if you wish to fallback to a local authentication " -"protocol, should remote authentication (LDAP etc,) fails." +"protocol, if remote authentication (LDAP, etc.) fails." #: ../../godmode/setup/setup_auth.php:58 #: ../../include/functions_config.php:308 #: ../../enterprise/meta/include/functions_meta.php:622 msgid "Autocreate remote users" -msgstr "Autocreate remote users" +msgstr "Automatically create remote users" #: ../../godmode/setup/setup_auth.php:74 #: ../../include/functions_config.php:335 @@ -17132,13 +17186,13 @@ msgstr "Login attribute" #: ../../include/functions_config.php:347 #: ../../enterprise/meta/include/functions_meta.php:856 msgid "Admin LDAP login" -msgstr "" +msgstr "Admin LDAP login" #: ../../godmode/setup/setup_auth.php:118 #: ../../include/functions_config.php:349 #: ../../enterprise/meta/include/functions_meta.php:866 msgid "Admin LDAP password" -msgstr "" +msgstr "Admin LDAP password" #: ../../godmode/setup/setup_auth.php:139 #: ../../include/functions_config.php:389 @@ -17201,7 +17255,7 @@ msgstr "Without protocol and port" #: ../../godmode/setup/setup_ehorus.php:87 msgid "e.g., portal.ehorus.com" -msgstr "e.g., switch.eHorus.com" +msgstr "e.g. switch.eHorus.com" #: ../../godmode/setup/setup_ehorus.php:92 msgid "API Port" @@ -17209,7 +17263,7 @@ msgstr "API Port" #: ../../godmode/setup/setup_ehorus.php:94 msgid "e.g., 18080" -msgstr "e.g., 18080" +msgstr "e.g. 18080" #: ../../godmode/setup/setup_ehorus.php:99 msgid "Request timeout" @@ -17254,17 +17308,17 @@ msgstr "eHorus has its own agent identifiers" #: ../../godmode/setup/setup_ehorus.php:134 msgid "To store them, it will be necessary to use an agent custom field" -msgstr "To store them, it is necessary to use an agent custom field" +msgstr "To store them, it is necessary to use an agent custom field." #: ../../godmode/setup/setup_ehorus.php:135 msgid "" "Possibly the eHorus id will have to be filled in by hand for every agent" msgstr "" -"Possibly the eHorus id will have to be filled out manually for every agent" +"The eHorus ID will possibly have to be filled out manually for every agent." #: ../../godmode/setup/setup_ehorus.php:140 msgid "The custom field does not exists already" -msgstr "The custom field does not exist yet" +msgstr "The custom field does not exist yet." #: ../../godmode/setup/setup_ehorus.php:154 msgid "eHorus API" @@ -17289,18 +17343,18 @@ msgstr "Invalid password" #: ../../godmode/setup/setup_general.php:57 #: ../../include/functions_config.php:131 msgid "Remote config directory" -msgstr "Remote config directory" +msgstr "Remote configuration directory" #: ../../godmode/setup/setup_general.php:58 msgid "Directory where agent remote configuration is stored." -msgstr "Directory in which the agent's remote configuration is stored" +msgstr "Directory in which the remote configuration of the agent is stored." #: ../../godmode/setup/setup_general.php:62 #: ../../include/functions_config.php:133 #: ../../enterprise/meta/advanced/metasetup.setup.php:125 #: ../../enterprise/meta/include/functions_meta.php:347 msgid "Auto login (hash) password" -msgstr "Auto login (hash) password" +msgstr "Automatic login (hash) password" #: ../../godmode/setup/setup_general.php:65 #: ../../include/functions_config.php:136 @@ -17355,19 +17409,19 @@ msgstr "" #: ../../godmode/setup/setup_general.php:78 msgid "Use cert of SSL" -msgstr "Use cert of SSL" +msgstr "Use SSL certificate" #: ../../godmode/setup/setup_general.php:83 msgid "Path of SSL Cert." -msgstr "Path of SSL Cert." +msgstr "Path of SSL Certificate" #: ../../godmode/setup/setup_general.php:83 msgid "" "Path where you put your cert and name of this cert. Remember your cert only " "in .pem extension." msgstr "" -"Path where you put your cert and name of this cert. Remember your cert " -"should only be in .pem extension." +"Path where you insert your certificate and name of this certificate. " +"Remember that your certificate should only be in .pem extension." #: ../../godmode/setup/setup_general.php:86 #: ../../include/functions_config.php:146 @@ -17408,7 +17462,7 @@ msgstr "" #: ../../godmode/setup/setup_general.php:102 #: ../../include/functions_config.php:152 msgid "Enable GIS features in Pandora Console" -msgstr "Enable GIS features for the Pandora Console" +msgstr "Enable GIS features for the Pandora FMS Console" #: ../../godmode/setup/setup_general.php:106 #: ../../include/functions_config.php:162 @@ -17423,7 +17477,7 @@ msgstr "Change timezone" #: ../../godmode/setup/setup_general.php:146 #: ../../include/functions_config.php:169 msgid "Sound for Alert fired" -msgstr "Sound for Alert fired" +msgstr "Sound for triggered alerts" #: ../../godmode/setup/setup_general.php:148 #: ../../godmode/setup/setup_general.php:153 @@ -17439,7 +17493,7 @@ msgstr "Sound for Monitor critical" #: ../../godmode/setup/setup_general.php:156 #: ../../include/functions_config.php:173 msgid "Sound for Monitor warning" -msgstr "Sound for Monitor warning" +msgstr "Sound for monitor warning" #: ../../godmode/setup/setup_general.php:161 #: ../../include/functions_config.php:188 @@ -17454,28 +17508,29 @@ msgid "" "Set this value when your PandoraFMS across inverse proxy or for example with " "mod_proxy of Apache." msgstr "" -"Set this value when you need your Pandora to be accessible via a public URL " +"Set this value when you need Pandora FMS to be accessible via a public URL " "(for example using Apache mod_proxy settings)" #: ../../godmode/setup/setup_general.php:163 msgid "Without the index.php such as http://domain/pandora_url/" -msgstr "" +msgstr "Without the index.php such as http://domain/pandora_url/" #: ../../godmode/setup/setup_general.php:166 #: ../../include/functions_config.php:190 msgid "Referer security" -msgstr "Enforce URL security" +msgstr "Referer security" #: ../../godmode/setup/setup_general.php:167 msgid "" "When it is set as \"yes\" in some important sections check if the user have " "gone from url Pandora." -msgstr "If enabled, actively checks if the user comes from Pandora's URL" +msgstr "" +"If enabled, it actively checks if the user comes from a Pandora FMS URL." #: ../../godmode/setup/setup_general.php:174 #: ../../include/functions_config.php:192 msgid "Event storm protection" -msgstr "Event storm protection" +msgstr "Event Storm protection" #: ../../godmode/setup/setup_general.php:175 msgid "" @@ -17505,16 +17560,16 @@ msgstr "Server log directory" #: ../../godmode/setup/setup_general.php:188 msgid "Directory where the server logs are stored." -msgstr "The directory in which server logs are stored." +msgstr "The directory where server logs are stored." #: ../../godmode/setup/setup_general.php:192 #: ../../include/functions_config.php:198 msgid "Log size limit in system logs viewer extension" -msgstr "" +msgstr "Log size limit in system logs viewer extension" #: ../../godmode/setup/setup_general.php:192 msgid "Max size (in bytes) for the logs to be shown." -msgstr "" +msgstr "Max size (in bytes) for the logs to be shown." #: ../../godmode/setup/setup_general.php:197 msgid "Full mode" @@ -17539,35 +17594,36 @@ msgid "" "contextual helps and it is noise, 'on demand' it is equal to full but it is " "not noise and 'expert' the icons in the header and the context is not." msgstr "" -"These are settings for the 'helper' cartoon. When 'Full mode' is enabled the " -"icon in the header and help texts will all be active and will automatically " -"show. 'On demand' mode is the same as 'Full mode' but users will choose when " -"the helper activates. In 'Expert' mode, the icons in the header and help " -"texts are all disabled." +"Settings of the assistant. When 'Full mode' is enabled the icon in the " +"header and help texts will all be active and will automatically be " +"displayed. 'On demand' mode is the same as 'Full mode' but users will choose " +"when the helper is activated. In 'Expert' mode, the icons in the header and " +"help texts are all disabled." #: ../../godmode/setup/setup_general.php:208 #: ../../include/functions_config.php:202 msgid "Allow create planned downtimes in the past" -msgstr "Allows creating planned downtimes for past dates" +msgstr "Allows the creation of planned downtimes for past dates" #: ../../godmode/setup/setup_general.php:209 msgid "The planned downtimes created in the past will affect the SLA reports" -msgstr "" -"The planned downtimes created in the past will affect the SLA reports" +msgstr "Planned downtimes created in the past will affect the SLA reports." #: ../../godmode/setup/setup_general.php:213 msgid "Limit for bulk operations" -msgstr "" +msgstr "Limit for bulk operations" #: ../../godmode/setup/setup_general.php:214 msgid "" "Your PHP environment is set to 1000 max_input_vars. This parameter should " "have the same value or lower." msgstr "" +"Your PHP environment is set to 1000 max_input_vars. This parameter should " +"have the same value or lower." #: ../../godmode/setup/setup_general.php:218 msgid "Include agents manually disabled" -msgstr "Include agents manually disabled" +msgstr "Include manually disabled agents" #: ../../godmode/setup/setup_general.php:222 msgid "audit log directory" @@ -17579,7 +17635,7 @@ msgstr "Directory where audit log is stored." #: ../../godmode/setup/setup_general.php:226 msgid "Set alias as name by default in agent creation" -msgstr "" +msgstr "Set alias as name by default in agent creation" #: ../../godmode/setup/setup_general.php:233 msgid "General options" @@ -17636,9 +17692,9 @@ msgid "" "Maximum number of points that a netflow area chart will display. The higher " "the resolution the performance. Values between 50 and 100 are recommended." msgstr "" -"Maximum number of points that a netflow area chart will display. Higher " +"Maximum number of points that a Netflow area chart will display. Higher " "resolutions take more time to render. Values between 50 and 100 are " -"recommended" +"recommended." #: ../../godmode/setup/setup_netflow.php:61 #: ../../include/functions_config.php:731 @@ -17662,7 +17718,7 @@ msgstr "Max. Netflow lifespan" #: ../../godmode/setup/setup_netflow.php:65 msgid "Sets the maximum lifetime for netflow data in days." -msgstr "Sets the max. lifespan for netflow data, in days." +msgstr "Sets the max. lifespan for Netflow data in days." #: ../../godmode/setup/setup_netflow.php:68 #: ../../include/functions_config.php:735 @@ -17686,7 +17742,7 @@ msgstr "Default interval for Visual Console to refresh" #: ../../godmode/setup/setup_visuals.php:76 msgid "This interval will affect to Visual Console pages" -msgstr "This interval will affect Visual Console pages" +msgstr "This interval will affect the pages of the Visual Console" #: ../../godmode/setup/setup_visuals.php:80 msgid "Paginated module view" @@ -17704,14 +17760,14 @@ msgstr "Display data of proc modules in other format" #: ../../enterprise/meta/advanced/metasetup.visual.php:205 #: ../../enterprise/meta/include/functions_meta.php:1407 msgid "Display text proc modules have state is ok" -msgstr "Display text proc modules have state is ok" +msgstr "Display text when proc modules are in OK status" #: ../../godmode/setup/setup_visuals.php:99 #: ../../include/functions_config.php:599 #: ../../enterprise/meta/advanced/metasetup.visual.php:208 #: ../../enterprise/meta/include/functions_meta.php:1412 msgid "Display text when proc modules have state critical" -msgstr "Display text when proc modules" +msgstr "Display text when proc modules are in critical status" #: ../../godmode/setup/setup_visuals.php:104 msgid "Click to display lateral menus" @@ -17722,7 +17778,7 @@ msgid "" "When enabled, the lateral menus are shown when left clicking them, instead " "of hovering over them" msgstr "" -"When enabled, the lateral menus are shown when left-clicked, not by hovering " +"If enabled, the lateral menus are shown by left clicking, not by hovering " "over them." #: ../../godmode/setup/setup_visuals.php:117 @@ -17736,7 +17792,7 @@ msgstr "Space between items in Service maps" #: ../../godmode/setup/setup_visuals.php:122 msgid "It must be bigger than 80" -msgstr "" +msgstr "It must be higher than 80" #: ../../godmode/setup/setup_visuals.php:127 #: ../../include/functions_config.php:617 @@ -17797,29 +17853,29 @@ msgstr "Custom logo (login)" #: ../../godmode/setup/setup_visuals.php:226 #: ../../enterprise/meta/advanced/metasetup.visual.php:254 msgid "Custom Splash (login)" -msgstr "" +msgstr "Custom Splash (login)" #: ../../godmode/setup/setup_visuals.php:239 #: ../../enterprise/meta/advanced/metasetup.visual.php:261 msgid "Title 1 (login)" -msgstr "" +msgstr "Title 1 (login)" #: ../../godmode/setup/setup_visuals.php:246 #: ../../enterprise/meta/advanced/metasetup.visual.php:265 msgid "Title 2 (login)" -msgstr "" +msgstr "Title 2 (login)" #: ../../godmode/setup/setup_visuals.php:252 #: ../../enterprise/meta/advanced/metasetup.visual.php:268 #: ../../enterprise/meta/include/functions_meta.php:1295 msgid "Docs URL (login)" -msgstr "" +msgstr "Docs URL (login)" #: ../../godmode/setup/setup_visuals.php:258 #: ../../enterprise/meta/advanced/metasetup.visual.php:271 #: ../../enterprise/meta/include/functions_meta.php:1305 msgid "Support URL (login)" -msgstr "" +msgstr "Support URL (login)" #: ../../godmode/setup/setup_visuals.php:263 msgid "Disable logo in graphs" @@ -17838,13 +17894,13 @@ msgstr "Fixed menu" #: ../../godmode/setup/setup_visuals.php:294 #: ../../include/functions_config.php:567 msgid "Autohidden menu" -msgstr "Auto-hidden menu" +msgstr "Automatically hide menu" #: ../../godmode/setup/setup_visuals.php:298 #: ../../enterprise/meta/advanced/metasetup.visual.php:317 #: ../../enterprise/meta/include/functions_meta.php:1205 msgid "Visual effects and animation" -msgstr "" +msgstr "Visual effects and animation" #: ../../godmode/setup/setup_visuals.php:306 msgid "Style configuration" @@ -17870,11 +17926,11 @@ msgstr "Default icon in GIS" #: ../../godmode/setup/setup_visuals.php:334 msgid "Agent icon for GIS Maps. If set to \"none\", group icon will be used" -msgstr "Agent icon for GIS Maps. If set to \"none\", group icon will be used" +msgstr "Agent icon for GIS Maps. If set to 'none', group icon will be used." #: ../../godmode/setup/setup_visuals.php:336 msgid "Agent icon group" -msgstr "" +msgstr "Agent icon group" #: ../../godmode/setup/setup_visuals.php:343 msgid "GIS configuration" @@ -17898,8 +17954,8 @@ msgid "" "When the agent name have a lot of characters, in some places in Pandora " "Console it is necesary truncate to N characters." msgstr "" -"When the agent name has a lot of characters, it is needed to truncate it " -"into N characters in some sections in Pandora Console." +"When the agent name has a lot of characters, you need to truncate it into N " +"characters in some sections in the Pandora FMS Console." #: ../../godmode/setup/setup_visuals.php:390 #: ../../godmode/setup/setup_visuals.php:398 @@ -17921,8 +17977,8 @@ msgid "" "When the module name have a lot of characters, in some places in Pandora " "Console it is necesary truncate to N characters." msgstr "" -"When the module name has a lot of characters, it is necessary to truncate it " -"into N characters in some sections in Pandora Console." +"When the module name has a lot of characters, you need to truncate it into N " +"characters in some sections of the Pandora FMS Console." #: ../../godmode/setup/setup_visuals.php:404 #: ../../include/functions_config.php:555 @@ -17935,8 +17991,8 @@ msgid "" "When the description name have a lot of characters, in some places in " "Pandora Console it is necesary truncate to N characters." msgstr "" -"If the description name has a lot of characters, in some places in Pandora " -"Console it is necessary to truncate it to N characters." +"When the description name has a lot of characters, you need to truncate it " +"into N characters in some sections of the Pandora FMS Console." #: ../../godmode/setup/setup_visuals.php:408 #: ../../include/functions_config.php:559 @@ -17948,8 +18004,8 @@ msgid "" "When the item title name have a lot of characters, in some places in Pandora " "Console it is necesary truncate to N characters." msgstr "" -"When the item title name has a lot of characters, it is needed to truncate " -"it into N characters in some sections in Pandora Console." +"When the item name has a lot of characters, you need to truncate it into N " +"characters in some sections of the Pandora FMS Console." #: ../../godmode/setup/setup_visuals.php:414 msgid "Show unit along with value in reports" @@ -17957,7 +18013,8 @@ msgstr "Show unit along with value in reports" #: ../../godmode/setup/setup_visuals.php:415 msgid "This enabling this, max, min and avg values will be shown with units." -msgstr "When enabled, max, min and avg values are shown with units" +msgstr "" +"When enabled, maximum, minimum and average values are displayed with units." #: ../../godmode/setup/setup_visuals.php:423 msgid "Font and Text configuration" @@ -18021,7 +18078,7 @@ msgstr "Graph colour #10" #: ../../godmode/setup/setup_visuals.php:478 msgid "Graph resolution (1-low, 5-high)" -msgstr "Graph resolution (1-low, 5-high)" +msgstr "Graph resolution (1 = low / 5 = high)" #: ../../godmode/setup/setup_visuals.php:482 #: ../../include/functions_config.php:480 @@ -18032,23 +18089,27 @@ msgstr "Value to interface graphics" #: ../../godmode/setup/setup_visuals.php:491 msgid "Data precision in PandoraFMS" -msgstr "" +msgstr "Data precision in Pandora FMS" #: ../../godmode/setup/setup_visuals.php:492 msgid "" "Number of decimals shown. It must be a number between 0 and 5, except in " "graphs." msgstr "" +"Number of decimals shown. It must be a number between 0 and 5, except in " +"graphs." #: ../../godmode/setup/setup_visuals.php:498 msgid "Data precision in graphs" -msgstr "" +msgstr "Data precision in graphs" #: ../../godmode/setup/setup_visuals.php:499 msgid "" "Number of decimals shown. If the field is empty, it will show all the " "decimals" msgstr "" +"Number of decimals shown. If the field is empty, it will display all the " +"decimals." #: ../../godmode/setup/setup_visuals.php:503 #: ../../include/functions_config.php:587 @@ -18077,7 +18138,7 @@ msgstr "Interactive charts" #: ../../operation/users/user_edit.php:253 #: ../../enterprise/meta/advanced/metasetup.visual.php:128 msgid "Whether to use Javascript or static PNG graphs" -msgstr "Whether to use Javascript or static PNG graphs" +msgstr "Javascript or static PNG graphs" #: ../../godmode/setup/setup_visuals.php:522 #: ../../enterprise/meta/advanced/metasetup.visual.php:150 @@ -18103,12 +18164,12 @@ msgstr "Show percentile 95 in graphs" #: ../../godmode/setup/setup_visuals.php:553 msgid "Graph TIP view:" -msgstr "" +msgstr "Graph TIP view:" #: ../../godmode/setup/setup_visuals.php:559 #: ../../enterprise/meta/advanced/metasetup.visual.php:135 msgid "On Boolean graphs" -msgstr "" +msgstr "On Boolean graphs" #: ../../godmode/setup/setup_visuals.php:574 msgid "Charts configuration" @@ -18116,21 +18177,23 @@ msgstr "Chart settings" #: ../../godmode/setup/setup_visuals.php:591 msgid "Type of view of visual consoles" -msgstr "" +msgstr "Type of view of visual consoles" #: ../../godmode/setup/setup_visuals.php:592 msgid "Allows you to directly display the list of favorite visual consoles" -msgstr "" +msgstr "Allows you to directly display the list of favorite visual consoles" #: ../../godmode/setup/setup_visuals.php:596 msgid "Number of favorite visual consoles to show in the menu" -msgstr "" +msgstr "Number of favourite visual consoles to show in the menu" #: ../../godmode/setup/setup_visuals.php:597 msgid "" "If the number is 0 it will not show the pull-down menu and maximum 25 " "favorite consoles" msgstr "" +"If the number is 0 it will not show the drop-down menu and maximum 25 " +"favourite consoles" #: ../../godmode/setup/setup_visuals.php:603 #: ../../include/functions_config.php:546 @@ -18141,11 +18204,11 @@ msgstr "Default line width for the Visual Console" msgid "" "This interval will affect to the lines between elements on the Visual Console" msgstr "" -"This interval will affect to the lines between elements on the Visual Console" +"This interval will affect the lines between elements on the Visual Console" #: ../../godmode/setup/setup_visuals.php:609 msgid "Visual consoles configuration" -msgstr "" +msgstr "Visual consoles configuration" #: ../../godmode/setup/setup_visuals.php:625 #: ../../enterprise/meta/advanced/metasetup.visual.php:280 @@ -18172,8 +18235,8 @@ msgid "" "Custom report front page. It will be applied to all reports and templates by " "default." msgstr "" -"It's the custom report's front page. It'll be applied to all reports and " -"templates by default." +"Custom report front page. It will be applied to all reports and templates by " +"default." #: ../../godmode/setup/setup_visuals.php:659 #: ../../godmode/setup/setup_visuals.php:665 @@ -18229,6 +18292,9 @@ msgid "" "\"images/custom_logo\". You can upload more files (ONLY JPEG AND PNG) in " "upload tool in console." msgstr "" +"The directory of custom logos is in your www Pandora FMS Console in " +"\"images/custom_logo\". You can upload more files (ONLY JPEG AND PNG) in the " +"upload tool of the console." #: ../../godmode/setup/setup_visuals.php:686 #: ../../include/functions_config.php:705 @@ -18259,7 +18325,7 @@ msgstr "Footer" #: ../../godmode/setup/setup_visuals.php:706 msgid "Show QR Code icon in the header" -msgstr "Display the QR Code's icon on the header" +msgstr "Display the QR Code icon on the header" #: ../../godmode/setup/setup_visuals.php:717 #: ../../include/functions_config.php:579 @@ -18279,7 +18345,7 @@ msgstr "Networkmap max width" #: ../../enterprise/meta/advanced/metasetup.visual.php:185 #: ../../enterprise/meta/include/functions_meta.php:1235 msgid "Show only the group name" -msgstr "Show only the group's name" +msgstr "Show only the name of the group" #: ../../godmode/setup/setup_visuals.php:733 #: ../../include/functions_config.php:585 @@ -18371,7 +18437,7 @@ msgstr "Delete interval" #: ../../godmode/setup/setup_visuals.php:829 #: ../../include/functions_config.php:714 msgid "CSV divider" -msgstr "" +msgstr "CSV divider" #: ../../godmode/setup/setup_visuals.php:846 msgid "Other configuration" @@ -18387,7 +18453,7 @@ msgstr "Logo preview" #: ../../godmode/setup/setup_visuals.php:1159 #: ../../enterprise/meta/advanced/metasetup.visual.php:542 msgid "Splash Preview" -msgstr "" +msgstr "Splash Preview" #: ../../godmode/setup/setup_visuals.php:1200 #: ../../enterprise/meta/advanced/metasetup.visual.php:582 @@ -18412,27 +18478,27 @@ msgstr "OP" #: ../../godmode/setup/snmp_wizard.php:166 msgid "Unsucessful update the snmp translation" -msgstr "SNMP translation failed to update" +msgstr "Error updating SNMP translation" #: ../../godmode/setup/snmp_wizard.php:173 msgid "Unsucessful update the snmp translation." -msgstr "SNMP translation failed to update." +msgstr "Error updating SNMP translation" #: ../../godmode/setup/snmp_wizard.php:221 msgid "Unsucessful delete the snmp translation" -msgstr "SNMP translation failed to delete" +msgstr "Error deleting SNMP translation" #: ../../godmode/setup/snmp_wizard.php:228 msgid "Unsucessful delete the snmp translation." -msgstr "SNMP translation failed to delete." +msgstr "Error deleting SNMP translation" #: ../../godmode/setup/snmp_wizard.php:289 msgid "Unsucessful save the snmp translation" -msgstr "SNMP translation failed to save" +msgstr "Error saving SNMP translation" #: ../../godmode/setup/snmp_wizard.php:298 msgid "Unsucessful save the snmp translation." -msgstr "SNMP translation failed to save." +msgstr "Error saving SNMP translation" #: ../../godmode/snmpconsole/snmp_alert.php:28 #: ../../operation/snmpconsole/snmp_view.php:491 @@ -18501,35 +18567,35 @@ msgstr "Alert overview" #: ../../godmode/snmpconsole/snmp_alert.php:243 msgid "There was a problem creating the alert" -msgstr "There was a problem creating the alert" +msgstr "Error creating the alert" #: ../../godmode/snmpconsole/snmp_alert.php:314 msgid "There was a problem updating the alert" -msgstr "There was a problem updating the alert" +msgstr "Error updating the alert" #: ../../godmode/snmpconsole/snmp_alert.php:536 msgid "There was a problem duplicating the alert" -msgstr "There was a problem duplicating the alert" +msgstr "Error duplicating the alert" #: ../../godmode/snmpconsole/snmp_alert.php:540 msgid "Successfully Duplicate" -msgstr "Duplicate successful" +msgstr "Duplicated successfully" #: ../../godmode/snmpconsole/snmp_alert.php:556 msgid "There was a problem deleting the alert" -msgstr "There was a problem deleting the alert" +msgstr "Error deleting the alert" #: ../../godmode/snmpconsole/snmp_alert.php:585 #: ../../enterprise/godmode/massive/massive_delete_alerts_snmp.php:137 #, php-format msgid "Successfully deleted alerts (%s / %s)" -msgstr "Successfully deleted alerts (%s / %s)" +msgstr "Alerts deleted successfully (%s / %s)" #: ../../godmode/snmpconsole/snmp_alert.php:589 #: ../../enterprise/godmode/massive/massive_delete_alerts_snmp.php:141 #, php-format msgid "Unsuccessfully deleted alerts (%s / %s)" -msgstr "Unsuccessfully deleted alerts (%s / %s)" +msgstr "Error deleting the alerts (%s / %s)" #: ../../godmode/snmpconsole/snmp_alert.php:637 #: ../../godmode/snmpconsole/snmp_alert.php:1157 @@ -18604,8 +18670,8 @@ msgid "" "Search by these fields description, OID, Custom Value, SNMP Agent (IP), " "Single value, each Variable bindings/Datas." msgstr "" -"Search by these fields description, OID, Custom Value, SNMP Agent (IP), " -"Single value, each Variable bindings/Datas." +"Search by these description fields: OID, Custom Value, SNMP Agent (IP), " +"Single value, each Variable bindings/Data." #: ../../godmode/snmpconsole/snmp_alert.php:1019 msgid "Alert SNMP control filter" @@ -18624,7 +18690,7 @@ msgstr "Custom Value/Enterprise String" #: ../../include/functions_reporting_html.php:2995 #: ../../include/functions_reporting_html.php:3223 msgid "Times fired" -msgstr "Times fired" +msgstr "Times triggered" #: ../../godmode/snmpconsole/snmp_alert.php:1165 msgid "TF." @@ -18644,15 +18710,15 @@ msgstr "Filter overview" #: ../../godmode/snmpconsole/snmp_filters.php:77 msgid "There was a problem updating the filter" -msgstr "There was a problem updating the filter" +msgstr "Error updating the filter" #: ../../godmode/snmpconsole/snmp_filters.php:107 msgid "There was a problem creating the filter" -msgstr "There was a problem creating the filter" +msgstr "Error creating the filter" #: ../../godmode/snmpconsole/snmp_filters.php:125 msgid "There was a problem deleting the filter" -msgstr "There was a problem deleting the filter" +msgstr "Error deleting the filter" #: ../../godmode/snmpconsole/snmp_filters.php:169 #: ../../godmode/snmpconsole/snmp_filters.php:180 @@ -18665,11 +18731,11 @@ msgstr "" #: ../../godmode/snmpconsole/snmp_filters.php:172 msgid "Click to remove the filter" -msgstr "" +msgstr "Click to remove the filter" #: ../../godmode/snmpconsole/snmp_filters.php:195 msgid "Click to add new filter" -msgstr "" +msgstr "Click to add new filter" #: ../../godmode/snmpconsole/snmp_trap_generator.php:37 msgid "SNMP Trap generator" @@ -18681,7 +18747,7 @@ msgstr "Empty parameters" #: ../../godmode/snmpconsole/snmp_trap_generator.php:56 msgid "Successfully generated" -msgstr "Successfully generated" +msgstr "Generated successfully" #: ../../godmode/snmpconsole/snmp_trap_generator.php:57 #, php-format @@ -18715,7 +18781,7 @@ msgstr "Error updating tag" #: ../../godmode/tag/edit_tag.php:96 msgid "Successfully updated tag" -msgstr "Successfully updated tag" +msgstr "Tag updated successfully" #: ../../godmode/tag/edit_tag.php:122 msgid "Error creating tag" @@ -18723,15 +18789,15 @@ msgstr "Error creating tag" #: ../../godmode/tag/edit_tag.php:128 msgid "Successfully created tag" -msgstr "Successfully created tag" +msgstr "Tag created successfully" #: ../../godmode/tag/edit_tag.php:161 msgid "Update Tag" -msgstr "Update Tag" +msgstr "Update tag" #: ../../godmode/tag/edit_tag.php:164 msgid "Create Tag" -msgstr "Create Tag" +msgstr "Create tag" #: ../../godmode/tag/edit_tag.php:185 #: ../../include/functions_reporting.php:4365 @@ -18743,12 +18809,11 @@ msgstr "URL" #: ../../godmode/tag/edit_tag.php:187 msgid "Hyperlink to help information that has to exist previously." -msgstr "Hyperlink to help information that has to exist previously." +msgstr "Hyperlink to help information that has to exist previously" #: ../../godmode/tag/edit_tag.php:197 msgid "Associated Email direction to use later in alerts associated to Tags." -msgstr "" -"Associated E-mail direction to use later in alerts associated to Tags." +msgstr "Associated email address to use later in alerts associated to tags" #: ../../godmode/tag/edit_tag.php:205 ../../godmode/tag/tag.php:204 #: ../../godmode/users/user_list.php:403 @@ -18757,7 +18822,7 @@ msgstr "Phone" #: ../../godmode/tag/edit_tag.php:207 msgid "Associated phone number to use later in alerts associated to Tags." -msgstr "Phone number linked for use later in alerts related to tags." +msgstr "Linked phone number to use later in alerts related to tags" #: ../../godmode/tag/tag.php:80 msgid "Number of modules" @@ -18773,7 +18838,7 @@ msgstr "Error deleting tag" #: ../../godmode/tag/tag.php:125 msgid "Successfully deleted tag" -msgstr "Tag successfully deleted" +msgstr "Tag deleted successfully" #: ../../godmode/tag/tag.php:199 #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1651 @@ -18795,7 +18860,7 @@ msgstr "Tag details" #: ../../godmode/tag/tag.php:249 #, php-format msgid "Emails for the tag: %s" -msgstr "E-mails for the tag: %s" +msgstr "Emails for the tag: %s" #: ../../godmode/tag/tag.php:264 #, php-format @@ -18813,7 +18878,7 @@ msgstr "Create tag" #: ../../godmode/update_manager/update_manager.messages.php:96 #: ../../godmode/update_manager/update_manager.messages.php:170 msgid "Mark as not read" -msgstr "Mark as not read" +msgstr "Mark as unread" #: ../../godmode/update_manager/update_manager.messages.php:101 #: ../../godmode/update_manager/update_manager.messages.php:175 @@ -18822,7 +18887,7 @@ msgstr "Mark as read" #: ../../godmode/update_manager/update_manager.messages.php:186 msgid "There is not any update manager messages." -msgstr "There are not any update manager messages." +msgstr "There are no update manager messages" #: ../../godmode/update_manager/update_manager.offline.php:37 msgid "Drop the package here or" @@ -18842,7 +18907,7 @@ msgid "" "is recommended to do a backup before continue with the update." msgstr "" "Please keep in mind that this package is going to override your actual " -"Pandora FMS files and that it's recommended to conduct a backup before " +"Pandora FMS files and that it is recommended to make a backup before " "continuing the updating process." #: ../../godmode/update_manager/update_manager.offline.php:41 @@ -18855,23 +18920,23 @@ msgstr "Updating" #: ../../godmode/update_manager/update_manager.offline.php:43 msgid "Package updated successfully." -msgstr "Package updated successfully." +msgstr "Package updated successfully" #: ../../godmode/update_manager/update_manager.offline.php:44 msgid "If there are any database change, it will be applied." -msgstr "" +msgstr "If there are any database changes, they will be applied." #: ../../godmode/update_manager/update_manager.offline.php:45 #: ../../include/functions_update_manager.php:345 #: ../../enterprise/include/functions_update_manager.php:177 msgid "Minor release available" -msgstr "" +msgstr "Minor release available" #: ../../godmode/update_manager/update_manager.offline.php:46 #: ../../include/functions_update_manager.php:346 #: ../../enterprise/include/functions_update_manager.php:178 msgid "New package available" -msgstr "" +msgstr "New package available" #: ../../godmode/update_manager/update_manager.offline.php:47 #: ../../godmode/update_manager/update_manager.offline.php:49 @@ -18880,7 +18945,7 @@ msgstr "" #: ../../enterprise/include/functions_update_manager.php:179 #: ../../enterprise/include/functions_update_manager.php:181 msgid "Minor release rejected. Changes will not apply." -msgstr "" +msgstr "Minor release rejected. Changes will not be applied." #: ../../godmode/update_manager/update_manager.offline.php:48 #: ../../include/functions_update_manager.php:348 @@ -18889,24 +18954,26 @@ msgid "" "Minor release rejected. The database will not be updated and the package " "will apply." msgstr "" +"Minor release rejected. The database will not be updated and the package " +"will not be applied." #: ../../godmode/update_manager/update_manager.offline.php:50 #: ../../include/functions_update_manager.php:350 #: ../../enterprise/include/functions_update_manager.php:182 msgid "These package changes will not apply." -msgstr "" +msgstr "These package changes will not be applied." #: ../../godmode/update_manager/update_manager.offline.php:51 #: ../../include/functions_update_manager.php:351 #: ../../enterprise/include/functions_update_manager.php:183 msgid "Package rejected. These package changes will not apply." -msgstr "" +msgstr "Package rejected. These package changes will not be applied." #: ../../godmode/update_manager/update_manager.offline.php:52 #: ../../include/functions_update_manager.php:352 #: ../../enterprise/include/functions_update_manager.php:184 msgid "Database successfully updated" -msgstr "" +msgstr "Database successfully updated" #: ../../godmode/update_manager/update_manager.offline.php:53 #: ../../include/functions_update_manager.php:353 @@ -18918,13 +18985,13 @@ msgstr "Error in MR file" #: ../../include/functions_update_manager.php:354 #: ../../enterprise/include/functions_update_manager.php:186 msgid "Package updated successfully" -msgstr "" +msgstr "Package updated successfully" #: ../../godmode/update_manager/update_manager.offline.php:55 #: ../../include/functions_update_manager.php:355 #: ../../enterprise/include/functions_update_manager.php:187 msgid "Error in package updated" -msgstr "" +msgstr "Error in package updated" #: ../../godmode/update_manager/update_manager.offline.php:56 #: ../../include/functions_update_manager.php:356 @@ -18932,12 +18999,13 @@ msgstr "" msgid "" "Database MR version is inconsistent, do you want to apply the package?" msgstr "" +"Database MR version is inconsistent, do you want to apply the package?" #: ../../godmode/update_manager/update_manager.offline.php:57 #: ../../include/functions_update_manager.php:357 #: ../../enterprise/include/functions_update_manager.php:189 msgid "There are db changes" -msgstr "" +msgstr "There are changes in the DB" #: ../../godmode/update_manager/update_manager.offline.php:58 #: ../../include/functions_update_manager.php:358 @@ -18946,18 +19014,20 @@ msgid "" "There are new database changes available to apply. Do you want to start the " "DB update process?" msgstr "" +"There are new database changes available. Do you want to start the DB update " +"process?" #: ../../godmode/update_manager/update_manager.offline.php:59 #: ../../include/functions_update_manager.php:359 #: ../../enterprise/include/functions_update_manager.php:191 msgid "We recommend launching " -msgstr "" +msgstr "We recommend launching " #: ../../godmode/update_manager/update_manager.offline.php:60 #: ../../include/functions_update_manager.php:360 #: ../../enterprise/include/functions_update_manager.php:192 msgid "planned downtime" -msgstr "" +msgstr "planned downtime" #: ../../godmode/update_manager/update_manager.offline.php:63 #: ../../godmode/update_manager/update_manager.offline.php:66 @@ -18966,13 +19036,13 @@ msgstr "" #: ../../enterprise/include/functions_update_manager.php:195 #: ../../enterprise/include/functions_update_manager.php:198 msgid " to this process" -msgstr "" +msgstr " to this process" #: ../../godmode/update_manager/update_manager.offline.php:69 #: ../../include/functions_update_manager.php:369 #: ../../enterprise/include/functions_update_manager.php:201 msgid "There is a new update available" -msgstr "" +msgstr "There is a new update available" #: ../../godmode/update_manager/update_manager.offline.php:70 #: ../../include/functions_update_manager.php:370 @@ -18981,18 +19051,19 @@ msgid "" "There is a new update available to apply. Do you want to start the update " "process?" msgstr "" +"There is a new update available. Do you want to start the update process?" #: ../../godmode/update_manager/update_manager.offline.php:71 #: ../../include/functions_update_manager.php:371 #: ../../enterprise/include/functions_update_manager.php:203 msgid "Applying DB MR" -msgstr "" +msgstr "Applying DB MR" #: ../../godmode/update_manager/update_manager.offline.php:74 #: ../../include/functions_update_manager.php:374 #: ../../enterprise/include/functions_update_manager.php:206 msgid "Apply MR" -msgstr "" +msgstr "Apply MR" #: ../../godmode/update_manager/update_manager.offline.php:75 #: ../../include/functions_update_manager.php:375 @@ -19012,8 +19083,8 @@ msgid "" "Your PHP has set memory limit in %s. For avoid problems with big updates " "please set to 500M" msgstr "" -"Your PHP has set memory limit in %s. For avoid problems with big updates " -"please set to 500M" +"Your PHP has set memory limit in %s. To avoid problems with large updates " +"please set it to 500M." #: ../../godmode/update_manager/update_manager.online.php:55 #, php-format @@ -19021,8 +19092,8 @@ msgid "" "Your PHP has set post parameter max size limit in %s. For avoid problems " "with big updates please set to 100M" msgstr "" -"Your PHP has set post parameter max size limit in %s. For avoid problems " -"with big updates please set to 100M" +"Your PHP has set post parameter max size limit in %s. To avoid problems with " +"large updates please set it to 100M." #: ../../godmode/update_manager/update_manager.online.php:62 #, php-format @@ -19030,16 +19101,16 @@ msgid "" "Your PHP has set maximum allowed size for uploaded files limit in %s. For " "avoid problems with big updates please set to 100M" msgstr "" -"Your PHP has set maximum allowed size for uploaded files limit in %s. For " -"avoid problems with big updates please set to 100M" +"Your PHP has set maximum allowed size for uploaded files limit in %s. To " +"avoid problems with large updates please set it to 100M." #: ../../godmode/update_manager/update_manager.online.php:85 msgid "The latest version of package installed is:" -msgstr "" +msgstr "The latest version of package installed is:" #: ../../godmode/update_manager/update_manager.online.php:89 msgid "Checking for the newest package." -msgstr "Checking for the latest package." +msgstr "Checking for the latest package" #: ../../godmode/update_manager/update_manager.online.php:93 msgid "Downloading for the newest package." @@ -19078,19 +19149,19 @@ msgstr "Update manager » Messages" #: ../../enterprise/meta/advanced/metasetup.mail.php:63 #: ../../enterprise/meta/advanced/metasetup.update_manager_setup.php:58 msgid "Succesful Update the url config vars." -msgstr "URL configuration variables successfully updated." +msgstr "URL configuration variables successfully updated" #: ../../godmode/update_manager/update_manager.setup.php:59 #: ../../godmode/update_manager/update_manager.setup.php:88 #: ../../enterprise/meta/advanced/metasetup.mail.php:64 #: ../../enterprise/meta/advanced/metasetup.update_manager_setup.php:59 msgid "Unsuccesful Update the url config vars." -msgstr "Unsuccessful in updating the URL configuration variables." +msgstr "Error updating the URL configuration variables" #: ../../godmode/update_manager/update_manager.setup.php:100 #: ../../enterprise/meta/advanced/metasetup.update_manager_setup.php:70 msgid "URL update manager:" -msgstr "Update manager URL" +msgstr "Update manager URL:" #: ../../godmode/update_manager/update_manager.setup.php:102 #: ../../enterprise/meta/advanced/metasetup.update_manager_setup.php:72 @@ -19149,7 +19220,7 @@ msgid "" "this Pandora instance" msgstr "" "Every 8 days, a message is displayed to admin users to remind them to " -"register this Pandora instance" +"register this Pandora FMS instance." #: ../../godmode/users/configure_profile.php:41 #: ../../godmode/users/configure_profile.php:49 @@ -19167,7 +19238,7 @@ msgstr "User management" #: ../../godmode/users/configure_profile.php:49 #: ../../godmode/users/profile_list.php:53 msgid "Profiles defined in Pandora" -msgstr "Profiles defined on Pandora" +msgstr "Profiles defined on Pandora FMS" #: ../../godmode/users/configure_profile.php:113 msgid "Create profile" @@ -19183,11 +19254,11 @@ msgstr "Update profile" #: ../../godmode/users/configure_profile.php:229 msgid "Update Profile" -msgstr "Update Profile" +msgstr "Update profile" #: ../../godmode/users/configure_profile.php:231 msgid "Create Profile" -msgstr "Create Profile" +msgstr "Create profile" #: ../../godmode/users/configure_profile.php:249 msgid "View agents" @@ -19255,15 +19326,15 @@ msgstr "Manage visual console" #: ../../godmode/users/configure_profile.php:335 msgid "View incidents" -msgstr "View incidents" +msgstr "View issues" #: ../../godmode/users/configure_profile.php:339 msgid "Edit incidents" -msgstr "Edit incidents" +msgstr "Edit issues" #: ../../godmode/users/configure_profile.php:343 msgid "Manage incidents" -msgstr "Manage incidents" +msgstr "Manage issues" #: ../../godmode/users/configure_profile.php:350 msgid "Manage users" @@ -19275,7 +19346,7 @@ msgstr "Manage database" #: ../../godmode/users/configure_profile.php:364 msgid "Pandora management" -msgstr "Pandora management" +msgstr "Pandora FMS management" #: ../../godmode/users/configure_user.php:92 #: ../../operation/users/user_edit.php:62 @@ -19288,8 +19359,8 @@ msgid "" "The current authentication scheme doesn't support creating users from " "Pandora FMS" msgstr "" -"The current authentication scheme doesn't support creating users on Pandora " -"FMS" +"The current authentication scheme does not support the creation of users on " +"Pandora FMS." #: ../../godmode/users/configure_user.php:202 msgid "User ID cannot be empty" @@ -19308,8 +19379,8 @@ msgid "" "Strict ACL is not recommended for admin users because performance could be " "affected." msgstr "" -"A strict ACL isn't recommended for admin users because it could affect " -"overall performance" +"Strict ACL is not recommended for admin users because it could affect " +"overall performance." #: ../../godmode/users/configure_user.php:342 #: ../../godmode/users/configure_user.php:354 @@ -19319,7 +19390,7 @@ msgstr "" #: ../../operation/users/user_edit.php:156 #: ../../operation/users/user_edit.php:166 msgid "User info successfully updated" -msgstr "User info successfully updated" +msgstr "User information successfully updated" #: ../../godmode/users/configure_user.php:343 #: ../../godmode/users/configure_user.php:355 @@ -19327,17 +19398,17 @@ msgstr "User info successfully updated" #: ../../godmode/users/configure_user.php:411 #: ../../godmode/users/configure_user.php:439 msgid "Error updating user info (no change?)" -msgstr "Error updating user info (no change?)" +msgstr "Error updating user information (no change?)" #: ../../godmode/users/configure_user.php:361 msgid "Passwords does not match" -msgstr "Passwords don't match" +msgstr "Passwords do not match" #: ../../godmode/users/configure_user.php:429 msgid "" "Strict ACL is not recommended for this user. Performance could be affected." msgstr "" -"A strict ACL is not recommended for this user. Performance could be affected." +"Strict ACL is not recommended for this user. Performance could be affected." #: ../../godmode/users/configure_user.php:461 msgid "Profile added successfully" @@ -19349,11 +19420,11 @@ msgstr "Profile could not be added" #: ../../godmode/users/configure_user.php:488 msgid "Update User" -msgstr "Update User" +msgstr "Update user" #: ../../godmode/users/configure_user.php:491 msgid "Create User" -msgstr "Create User" +msgstr "Create user" #: ../../godmode/users/configure_user.php:504 #: ../../godmode/users/user_list.php:263 @@ -19383,7 +19454,7 @@ msgstr "Password confirmation" #: ../../godmode/users/configure_user.php:527 msgid "Global Profile" -msgstr "Global Profile" +msgstr "Global profile" #: ../../godmode/users/configure_user.php:531 #: ../../godmode/users/user_list.php:411 ../../operation/search_users.php:64 @@ -19402,7 +19473,7 @@ msgstr "" #: ../../godmode/users/configure_user.php:536 #: ../../operation/search_users.php:69 msgid "Standard User" -msgstr "Standard User" +msgstr "Standard user" #: ../../godmode/users/configure_user.php:537 msgid "" @@ -19410,15 +19481,15 @@ msgid "" "incidents belong to his groups, add notes in another incidents, create " "personal assignments or reviews and other tasks, on different profiles" msgstr "" -"This user has separated permissions to view data in his group agents, create " -"incidents belong to his groups, add notes in another incidents, create " -"personal assignments or reviews and other tasks, on different profiles" +"This user has separated permissions to view data in its group agents, create " +"issues belonging to its groups, add notes in other issues, create personal " +"assignments or reviews and other tasks, on different profiles." #: ../../godmode/users/configure_user.php:540 #: ../../godmode/users/user_list.php:404 #: ../../operation/users/user_edit.php:210 msgid "E-mail" -msgstr "E-mail" +msgstr "Email" #: ../../godmode/users/configure_user.php:544 #: ../../operation/users/user_edit.php:212 @@ -19427,7 +19498,7 @@ msgstr "Phone number" #: ../../godmode/users/configure_user.php:579 msgid "Use global conf" -msgstr "Use global conf" +msgstr "Use global configuration" #: ../../godmode/users/configure_user.php:583 #: ../../operation/users/user_edit.php:276 @@ -19471,7 +19542,7 @@ msgstr "Alert details" #: ../../godmode/users/configure_user.php:592 msgid "External link" -msgstr "" +msgstr "External link" #: ../../godmode/users/configure_user.php:595 #: ../../mobile/include/functions_web.php:21 @@ -19489,19 +19560,19 @@ msgstr "Metaconsole access" #: ../../godmode/users/configure_user.php:647 msgid "Not Login" -msgstr "Not Login" +msgstr "Login error" #: ../../godmode/users/configure_user.php:648 msgid "The user with not login set only can access to API." -msgstr "The user with not login set only can access to API." +msgstr "The user with no access authorization can only access the API." #: ../../godmode/users/configure_user.php:651 msgid "Session Time" -msgstr "Session Time" +msgstr "Session time" #: ../../godmode/users/configure_user.php:661 msgid "Default event filter" -msgstr "" +msgstr "Default event filter" #: ../../godmode/users/configure_user.php:668 msgid "Enable agents managment" @@ -19522,7 +19593,7 @@ msgstr "Enable node access" #: ../../godmode/users/configure_user.php:687 msgid "With this option enabled, the user will can access to nodes console" msgstr "" -"With this option enabled, the user will be able to access the node console" +"With this option enabled, the user will be able to access the node console." #: ../../godmode/users/configure_user.php:718 #: ../../godmode/users/configure_user.php:727 @@ -19534,17 +19605,16 @@ msgstr "Profiles/Groups assigned to this user" #: ../../godmode/users/profile_list.php:80 msgid "" "Unsucessful delete profile. Because the profile is used by some admin users." -msgstr "" -"Unsucessful delete profile. Because the profile is used by some admin users." +msgstr "Error deleting profile: it is being used by some admin users." #: ../../godmode/users/profile_list.php:88 #: ../../godmode/users/user_list.php:189 msgid "There was a problem deleting the profile" -msgstr "There was a problem deleting the profile" +msgstr "Error deleting the profile" #: ../../godmode/users/profile_list.php:226 msgid "There was a problem updating this profile" -msgstr "There was a problem updating this profile" +msgstr "Error updating this profile" #: ../../godmode/users/profile_list.php:230 msgid "Profile name cannot be empty" @@ -19553,25 +19623,25 @@ msgstr "Profile name cannot be empty" #: ../../godmode/users/profile_list.php:282 #: ../../godmode/users/profile_list.php:286 msgid "There was a problem creating this profile" -msgstr "There was a problem creating this profile" +msgstr "Error creating this profile" #: ../../godmode/users/profile_list.php:304 #: ../../enterprise/extensions/disabled/check_acls.php:44 #: ../../enterprise/extensions/disabled/check_acls.php:124 msgid "System incidents reading" -msgstr "Read system incidents" +msgstr "Read system issues" #: ../../godmode/users/profile_list.php:305 #: ../../enterprise/extensions/disabled/check_acls.php:45 #: ../../enterprise/extensions/disabled/check_acls.php:125 msgid "System incidents writing" -msgstr "Write system incidents" +msgstr "Write system issues" #: ../../godmode/users/profile_list.php:306 #: ../../enterprise/extensions/disabled/check_acls.php:46 #: ../../enterprise/extensions/disabled/check_acls.php:126 msgid "System incidents management" -msgstr "Manage system incidents" +msgstr "Manage system issues" #: ../../godmode/users/profile_list.php:307 #: ../../enterprise/extensions/disabled/check_acls.php:47 @@ -19682,26 +19752,26 @@ msgstr "There are no defined profiles" #: ../../godmode/users/user_list.php:121 msgid "Users defined in Pandora" -msgstr "Users defined on Pandora" +msgstr "Users defined on Pandora FMS" #: ../../godmode/users/user_list.php:143 #, php-format msgid "Deleted user %s" -msgstr "Deleted user %s" +msgstr "User %s deleted" #: ../../godmode/users/user_list.php:148 ../../godmode/users/user_list.php:181 msgid "There was a problem deleting the user" -msgstr "There was a problem deleting the user" +msgstr "Error deleting the user" #: ../../godmode/users/user_list.php:163 #, php-format msgid "Deleted user %s from metaconsole" -msgstr "Deleted user %s from the metaconsole" +msgstr "User %s deleted from the Metaconsole" #: ../../godmode/users/user_list.php:172 #, php-format msgid "Deleted user %s from %s" -msgstr "Deleted user %s from %s" +msgstr "User %s deleted from %s" #: ../../godmode/users/user_list.php:175 #, php-format @@ -19711,19 +19781,19 @@ msgstr "Successfully deleted from %s" #: ../../godmode/users/user_list.php:176 #, php-format msgid "There was a problem deleting the user from %s" -msgstr "There was a problem deleting the user from %s" +msgstr "Error deleting the user from %s" #: ../../godmode/users/user_list.php:204 msgid "There was a problem disabling user" -msgstr "There was a problem disabling the user" +msgstr "Error disabling the user" #: ../../godmode/users/user_list.php:209 msgid "There was a problem enabling user" -msgstr "There was a problem enabling the user" +msgstr "Error enabling the user" #: ../../godmode/users/user_list.php:229 ../../godmode/users/user_list.php:231 msgid "Search by username, fullname or email" -msgstr "Search by username, full name, or e-mail" +msgstr "Search by username, full name, or email" #: ../../godmode/users/user_list.php:247 msgid "Users control filter" @@ -19744,11 +19814,11 @@ msgstr "Profile / Group" #: ../../godmode/users/user_list.php:454 ../../operation/search_users.php:82 msgid "The user doesn't have any assigned profile/group" -msgstr "The user doesn't have any assigned profile/group" +msgstr "The user does not have any assigned profile/group" #: ../../godmode/users/user_list.php:467 msgid "Deleting User" -msgstr "Deleting User" +msgstr "Deleting user" #: ../../godmode/users/user_list.php:469 msgid "Delete from all consoles" @@ -19757,7 +19827,7 @@ msgstr "Delete from all consoles" #: ../../godmode/users/user_list.php:469 #, php-format msgid "Deleting User %s from all consoles" -msgstr "Deleting User %s from all consoles" +msgstr "Deleting user %s from all consoles" #: ../../godmode/users/user_list.php:485 msgid "Create user" @@ -19774,7 +19844,7 @@ msgstr "" msgid "" "You could enter the code manually or use the QR code to add it automatically" msgstr "" -"You can enter the code manually or scan the QR code to add it automatically" +"You can enter the code manually or scan the QR code to add it automatically." #: ../../include/ajax/double_auth.ajax.php:151 #: ../../include/ajax/double_auth.ajax.php:287 @@ -19789,7 +19859,7 @@ msgstr "QR" #: ../../include/ajax/double_auth.ajax.php:189 msgid "You are about to activate the double authentication" -msgstr "You're about to enable the double authentication mechanism" +msgstr "You are about to enable the double authentication mechanism." #: ../../include/ajax/double_auth.ajax.php:190 msgid "" @@ -19805,7 +19875,7 @@ msgstr "" msgid "" "You will need to install the app from the following link before continue" msgstr "" -"You will need to install the app from the following link before continuing" +"You will need to install the app from the following link before continuing." #: ../../include/ajax/double_auth.ajax.php:199 msgid "Download the app" @@ -19827,7 +19897,7 @@ msgstr "Have you installed the app yet?" #: ../../operation/users/user_edit.php:711 #: ../../operation/users/user_edit.php:776 msgid "There was an error loading the data" -msgstr "There was an error sending the data" +msgstr "Error sending the data" #: ../../include/ajax/double_auth.ajax.php:277 msgid "A private code has been generated" @@ -19837,7 +19907,7 @@ msgstr "A private code has been generated" msgid "" "Before continue, you should create a new entry into the authenticator app" msgstr "" -"Before continuing, you should create a new entry in the authentication app" +"Before continuing, you should create a new entry in the authentication app." #: ../../include/ajax/double_auth.ajax.php:292 msgid "Refresh code" @@ -19871,13 +19941,13 @@ msgstr "Invalid code" #: ../../include/ajax/double_auth.ajax.php:499 msgid "The code is valid, but it was an error saving the data" -msgstr "The code is valid, but there was an error saving the data" +msgstr "The code is valid, but there was an error saving the data." #: ../../include/ajax/events.php:203 #: ../../enterprise/extensions/ipam/ipam_ajax.php:269 #, php-format msgid "Executing command: %s" -msgstr "Executing command : %s" +msgstr "Executing command: %s" #: ../../include/ajax/events.php:210 #: ../../enterprise/extensions/ipam/ipam_ajax.php:276 @@ -19899,27 +19969,27 @@ msgstr "Custom data" #: ../../include/ajax/events.php:422 msgid "Error adding comment" -msgstr "Error on adding comment." +msgstr "Error adding comment" #: ../../include/ajax/events.php:423 msgid "Comment added successfully" -msgstr "Comment added successfully." +msgstr "Comment added successfully" #: ../../include/ajax/events.php:424 msgid "Error changing event status" -msgstr "Error on changing event status." +msgstr "Error changing event status" #: ../../include/ajax/events.php:425 msgid "Event status changed successfully" -msgstr "Event status changed successfully." +msgstr "Event status changed successfully" #: ../../include/ajax/events.php:426 msgid "Error changing event owner" -msgstr "Error: could not change event owner." +msgstr "Error changing event owner" #: ../../include/ajax/events.php:427 msgid "Event owner changed successfully" -msgstr "Event owner changed successfully." +msgstr "Event owner changed successfully" #: ../../include/ajax/events.php:495 #: ../../include/functions_reporting.php:7031 @@ -19968,11 +20038,11 @@ msgstr "Event in process" #: ../../include/ajax/events.php:562 msgid "Show all Events 24h" -msgstr "" +msgstr "Show all Events 24h" #: ../../include/ajax/graph.ajax.php:145 msgid "Time container lapse" -msgstr "" +msgstr "Time container lapse" #: ../../include/ajax/module.php:138 ../../include/functions.php:2615 msgid "30 minutes" @@ -20033,7 +20103,7 @@ msgstr "Timestamp to:" #: ../../include/ajax/module.php:188 msgid "Exact phrase" -msgstr "" +msgstr "Exact phrase" #: ../../include/ajax/module.php:768 #: ../../operation/agentes/alerts_status.php:455 @@ -20073,51 +20143,53 @@ msgstr "Force" #: ../../include/ajax/module.php:1155 msgid "Any monitors aren't with this filter." -msgstr "No monitors have this filter." +msgstr "No monitors have this filter" #: ../../include/ajax/module.php:1158 msgid "This agent doesn't have any active monitors." -msgstr "This agent doesn't have any active monitors." +msgstr "This agent does not have any active monitors." #: ../../include/ajax/rolling_release.ajax.php:56 msgid "The sql file contains a dangerous query" -msgstr "" +msgstr "The SQL file contains a dangerous query." #: ../../include/ajax/rolling_release.ajax.php:103 msgid "" "An error occurred while updating the database schema to the minor release " msgstr "" +"An error occurred while updating the database schema to the minor release " #: ../../include/ajax/rolling_release.ajax.php:117 #: ../../include/ajax/rolling_release.ajax.php:130 msgid "The directory " -msgstr "" +msgstr "The directory " #: ../../include/ajax/rolling_release.ajax.php:117 msgid " should have read permissions in order to update the database schema" msgstr "" +" should have read permissions in order to update the database schema." #: ../../include/ajax/rolling_release.ajax.php:130 msgid " does not exist" -msgstr "" +msgstr " does not exist" #: ../../include/ajax/update_manager.ajax.php:75 #: ../../enterprise/include/functions_update_manager.php:369 msgid "There was an error extracting the file '" -msgstr "There was an error extracting the file '" +msgstr "There was an error extracting the file" #: ../../include/ajax/update_manager.ajax.php:91 #: ../../enterprise/include/functions_update_manager.php:386 msgid "The package was not extracted." -msgstr "The package couldn't be extracted" +msgstr "The package could not be extracted" #: ../../include/ajax/update_manager.ajax.php:97 msgid "Invalid extension. The package must have the extension .oum." -msgstr "Invalid extension. The package is required to be in '.oum' format." +msgstr "Invalid extension. The package needs to be in '.oum' format." #: ../../include/ajax/update_manager.ajax.php:104 msgid "The file was not uploaded succesfully." -msgstr "The file wasn't uploaded successfully." +msgstr "Error uploading the file" #: ../../include/ajax/update_manager.ajax.php:181 #: ../../include/ajax/update_manager.ajax.php:185 @@ -20129,7 +20201,7 @@ msgstr "The file wasn't uploaded successfully." #: ../../enterprise/include/functions_update_manager.php:512 #: ../../enterprise/include/functions_update_manager.php:539 msgid "Some of your files might not be recovered." -msgstr "Some of your files may be unrecoverable." +msgstr "Some of your files may be impossible to recover." #: ../../include/ajax/update_manager.ajax.php:189 #: ../../include/ajax/update_manager.ajax.php:206 @@ -20138,13 +20210,13 @@ msgstr "Some of your files may be unrecoverable." #: ../../enterprise/include/functions_update_manager.php:517 #: ../../enterprise/include/functions_update_manager.php:533 msgid "Some of your old files might not be recovered." -msgstr "Some of your old files may be unrecoverable." +msgstr "Some of your old files may be impossible to recover." #: ../../include/ajax/update_manager.ajax.php:227 #: ../../include/functions_update_manager.php:173 #: ../../enterprise/include/functions_update_manager.php:554 msgid "An error ocurred while reading a file." -msgstr "An error ocurred while reading a file." +msgstr "An error ocurred while reading a file" #: ../../include/ajax/update_manager.ajax.php:234 #: ../../include/functions_update_manager.php:180 @@ -20154,17 +20226,17 @@ msgstr "The package does not exist." #: ../../include/ajax/update_manager.ajax.php:248 msgid "Package rejected." -msgstr "" +msgstr "Package rejected" #: ../../include/ajax/update_manager.ajax.php:422 #: ../../enterprise/include/functions_update_manager.php:322 msgid "Fail to update to the last package." -msgstr "Failed to update to the latest package." +msgstr "Error updating to the latest package" #: ../../include/ajax/update_manager.ajax.php:430 #: ../../enterprise/include/functions_update_manager.php:337 msgid "Starting to update to the last package." -msgstr "Starting to update to the latest package." +msgstr "Starting to update to the latest package" #: ../../include/ajax/update_manager.ajax.php:501 #: ../../enterprise/include/functions_update_manager.php:430 @@ -20173,49 +20245,50 @@ msgstr "progress" #: ../../include/ajax/update_manager.ajax.php:522 msgid "The package is extracted." -msgstr "" +msgstr "The package has been extracted." #: ../../include/ajax/update_manager.ajax.php:526 msgid "Error in package extraction." -msgstr "" +msgstr "Error in package extraction" #: ../../include/ajax/update_manager.ajax.php:544 #: ../../include/functions_update_manager.php:189 #: ../../enterprise/include/functions_update_manager.php:570 msgid "The package is installed." -msgstr "The package is installed." +msgstr "The package has been installed." #: ../../include/ajax/update_manager.ajax.php:548 msgid "An error ocurred in the installation process." -msgstr "" +msgstr "An error ocurred in the installation process." #: ../../include/auth/mysql.php:240 msgid "" "Problems with configuration permissions. Please contact with Administrator" msgstr "" -"Problems with configuration permissions. Please contact with Administrator" +"Problems with configuration permissions. Please contact with the " +"administrator." #: ../../include/auth/mysql.php:246 ../../include/auth/mysql.php:257 msgid "Your permissions have changed. Please, login again." -msgstr "Your permissions have changed. Please, login again." +msgstr "Your permissions have changed. Please, log in again." #: ../../include/auth/mysql.php:271 msgid "" "Ooops User not found in \n" "\t\t\t\tdatabase or incorrect password" msgstr "" -"Ooops User not found in \n" -"\t\t\t\tdatabase or incorrect password" +"Ooops! User not found in \n" +"\t\t\t\tdatabase or incorrect password." #: ../../include/auth/mysql.php:289 ../../include/auth/mysql.php:322 #: ../../include/auth/mysql.php:396 msgid "Fail the group synchronizing" -msgstr "Group synchronisation failure" +msgstr "Error synchronizing the group" #: ../../include/auth/mysql.php:295 ../../include/auth/mysql.php:328 #: ../../include/auth/mysql.php:402 msgid "Fail the tag synchronizing" -msgstr "Tag synchronisation failure" +msgstr "Error synchronizing tag" #: ../../include/auth/mysql.php:308 msgid "" @@ -20231,11 +20304,11 @@ msgstr "User not found in database or incorrect password" #: ../../include/auth/mysql.php:665 msgid "Could not changes password on remote pandora" -msgstr "Could not change password for remote pandora" +msgstr "Could not change password for remote Pandora FMS" #: ../../include/auth/mysql.php:702 msgid "Your installation of PHP does not support LDAP" -msgstr "Your PHP environment doesn't support LDAP" +msgstr "Your PHP environment does not support LDAP" #: ../../include/class/Tree.class.php:1506 #: ../../include/functions_modules.php:1956 @@ -20463,7 +20536,7 @@ msgstr "Alert recovered" #: ../../include/functions.php:1037 ../../include/functions_events.php:1173 #: ../../include/functions_events.php:1414 msgid "Alert ceased" -msgstr "Alert ceased" +msgstr "Alert stopped" #: ../../include/functions.php:1038 ../../include/functions_events.php:1417 msgid "Alert manual validation" @@ -20511,19 +20584,19 @@ msgstr "No file was uploaded" #: ../../include/functions.php:2226 msgid "Missing a temporary folder" -msgstr "Temporary folder missing." +msgstr "Temporary folder missing" #: ../../include/functions.php:2229 msgid "Failed to write file to disk" -msgstr "Failed to write file to disk." +msgstr "Error writing file to disk" #: ../../include/functions.php:2232 msgid "File upload stopped by extension" -msgstr "File upload stopped by extension." +msgstr "File upload stopped by an extension" #: ../../include/functions.php:2236 msgid "Unknown upload error" -msgstr "Unknown upload error." +msgstr "Unknown upload error" #: ../../include/functions.php:2321 msgid "No data found to export" @@ -20559,12 +20632,12 @@ msgstr "15 minutes" #: ../../include/functions_reporting.php:207 #: ../../include/functions_reporting.php:10943 msgid " agents" -msgstr "" +msgstr " agents" #: ../../include/functions_reporting.php:211 #: ../../include/functions_reporting.php:10984 msgid " modules" -msgstr "" +msgstr " modules" #: ../../include/functions_reporting.php:618 #: ../../include/functions_reports.php:540 @@ -20657,7 +20730,7 @@ msgstr "other" #: ../../include/functions_reporting.php:1373 msgid "Event Report Group" -msgstr "Event Report Group" +msgstr "Group event report" #: ../../include/functions_reporting.php:1417 #: ../../include/functions_reporting.php:1589 @@ -20678,12 +20751,12 @@ msgstr "Event Report Module" #: ../../include/functions_reporting.php:1616 #: ../../enterprise/include/functions_reporting_csv.php:302 msgid "Inventory Changes" -msgstr "Inventory Changes" +msgstr "Inventory changes" #: ../../include/functions_reporting.php:1658 #: ../../enterprise/extensions/ipam/ipam_action.php:198 msgid "No changes found." -msgstr "No changes found." +msgstr "No changes found" #: ../../include/functions_reporting.php:1745 msgid "Agent/Modules" @@ -20713,22 +20786,22 @@ msgstr "Modules larger than or equal to %s" #: ../../include/functions_reporting.php:1845 #, php-format msgid "Exception - Modules under or equal to %s" -msgstr "Exception - Modules lesser than or equal to %s" +msgstr "Exception - Modules less than or equal to %s" #: ../../include/functions_reporting.php:1847 #, php-format msgid "Modules under or equal to %s" -msgstr "Modules lesser than or equal to %s" +msgstr "Modules less than or equal to %s" #: ../../include/functions_reporting.php:1851 #, php-format msgid "Exception - Modules under %s" -msgstr "Exception - Modules lesser than %s" +msgstr "Exception - Modules less than %s" #: ../../include/functions_reporting.php:1853 #, php-format msgid "Modules under %s" -msgstr "Modules lesser than %s" +msgstr "Modules less than %s" #: ../../include/functions_reporting.php:1857 #, php-format @@ -20762,7 +20835,7 @@ msgstr "Not equal to %s" #: ../../include/functions_reporting.php:1875 msgid "Exception - Modules at normal status" -msgstr "Exception - Modules in normal status." +msgstr "Exception - Modules in normal status" #: ../../include/functions_reporting.php:1876 msgid "Modules at normal status" @@ -20774,45 +20847,45 @@ msgstr "Exception - Modules in critical or warning status" #: ../../include/functions_reporting.php:1881 msgid "Modules at critical or warning status" -msgstr "Modules in critical or warning status." +msgstr "Modules in critical or warning status" #: ../../include/functions_reporting.php:2070 msgid "There are no Modules under those conditions." -msgstr "There are no Modules under those conditions." +msgstr "There are no modules under those conditions" #: ../../include/functions_reporting.php:2073 #, php-format msgid "There are no Modules over or equal to %s." -msgstr "There are no Modules larger than or equal to %s" +msgstr "There are no modules larger than or equal to %s" #: ../../include/functions_reporting.php:2076 #, php-format msgid "There are no Modules less or equal to %s." -msgstr "There are no Modules lesser than or equal to %s" +msgstr "There are no modules less than or equal to %s" #: ../../include/functions_reporting.php:2079 #, php-format msgid "There are no Modules less %s." -msgstr "There are no Modules lesser than %s" +msgstr "There are no modules less than %s" #: ../../include/functions_reporting.php:2082 #, php-format msgid "There are no Modules over %s." -msgstr "There are no Modules larger than %s" +msgstr "There are no modules larger than %s" #: ../../include/functions_reporting.php:2085 #, php-format msgid "There are no Modules equal to %s" -msgstr "There are no Modules equal to %s" +msgstr "There are no modules equal to %s" #: ../../include/functions_reporting.php:2088 #, php-format msgid "There are no Modules not equal to %s" -msgstr "There are no Modules not equal to %s" +msgstr "There are no modules not equal to %s" #: ../../include/functions_reporting.php:2091 msgid "There are no Modules normal status" -msgstr "There are no Modules in normal status" +msgstr "There are no modules in normal status" #: ../../include/functions_reporting.php:2094 msgid "There are no Modules at critial or warning status" @@ -20829,7 +20902,7 @@ msgstr "Event Report Agent" #: ../../include/functions_reporting.php:2498 msgid "Database Serialized" -msgstr "Database Serialised" +msgstr "Database serialized" #: ../../include/functions_reporting.php:2629 #: ../../include/functions_reports.php:641 @@ -20853,7 +20926,7 @@ msgstr "bytes/s" #: ../../include/functions_reporting.php:2864 msgid "Alert Report Group" -msgstr "Alert Report Group" +msgstr "Group alert report" #: ../../include/functions_reporting.php:3010 msgid "Alert Report Agent" @@ -20873,7 +20946,7 @@ msgstr "SQL horizontal bar graph" #: ../../include/functions_reporting.php:3266 msgid "SQL Graph Pie" -msgstr "SQL Graph Pie" +msgstr "SQL Pie chart" #: ../../include/functions_reporting.php:3314 #: ../../enterprise/include/functions_reporting_csv.php:941 @@ -20888,7 +20961,7 @@ msgstr "Netflow Area" #: ../../include/functions_reporting.php:3394 msgid "Netflow Pie" -msgstr "Netflow Pie" +msgstr "Netflow Pie Chart" #: ../../include/functions_reporting.php:3397 msgid "Netflow Data" @@ -20935,7 +21008,7 @@ msgstr "AVG. Value" #: ../../enterprise/include/functions_reporting_csv.php:751 #: ../../enterprise/include/functions_reporting_csv.php:758 msgid "Summatory" -msgstr "Summatory" +msgstr "Summation" #: ../../include/functions_reporting.php:3831 #: ../../include/functions_reports.php:535 @@ -20979,7 +21052,7 @@ msgstr "Maximum" #: ../../include/functions_reporting.php:4126 #: ../../include/functions_reporting.php:4267 msgid "Lapse" -msgstr "" +msgstr "Lapse" #: ../../include/functions_reporting.php:4050 #: ../../include/functions_reporting.php:4129 @@ -21003,6 +21076,9 @@ msgid "" "Illegal query: Due security restrictions, there are some tokens or words you " "cannot use: *, delete, drop, alter, modify, password, pass, insert or update." msgstr "" +"Illegal query: due to security restrictions, there are some tokens or words " +"you cannot use: *, delete, drop, alter, modify, password, pass, insert or " +"update." #: ../../include/functions_reporting.php:5390 #: ../../include/functions_reporting.php:5633 @@ -21014,7 +21090,7 @@ msgstr "Availability" #: ../../include/functions_reporting.php:5501 msgid "No Address" -msgstr "No Address" +msgstr "No address" #: ../../include/functions_reporting.php:6020 #: ../../include/functions_reporting_html.php:2238 @@ -21025,17 +21101,19 @@ msgstr "No Address" #: ../../enterprise/include/functions_reporting_csv.php:879 #: ../../enterprise/include/functions_reporting_pdf.php:363 msgid "Increment" -msgstr "" +msgstr "Increment" #: ../../include/functions_reporting.php:6074 msgid "" "The monitor have no data in this range of dates or monitor type is not " "numeric" msgstr "" +"The monitor has no data in this range of dates or monitor type is not " +"numeric." #: ../../include/functions_reporting.php:6096 msgid "The monitor type is not numeric" -msgstr "" +msgstr "The monitor type is not numeric." #: ../../include/functions_reporting.php:6352 #: ../../enterprise/godmode/reporting/reporting_builder.global.php:195 @@ -21061,7 +21139,7 @@ msgstr "Server health" #: ../../include/functions_reporting.php:7656 #, php-format msgid "%d Downed servers" -msgstr "%d Downed servers" +msgstr "%d servers down" #: ../../include/functions_reporting.php:7664 #: ../../include/functions_reporting.php:7696 @@ -21071,7 +21149,7 @@ msgstr "Monitor health" #: ../../include/functions_reporting.php:7664 #, php-format msgid "%d Not Normal monitors" -msgstr "%d Abnormal monitors" +msgstr "%d not normal monitors" #: ../../include/functions_reporting.php:7666 #: ../../include/functions_reporting.php:7697 @@ -21086,12 +21164,12 @@ msgstr "Module sanity" #: ../../include/functions_reporting.php:7672 #, php-format msgid "%d Not inited monitors" -msgstr "%d unitialised monitors" +msgstr "%d not initialised monitors" #: ../../include/functions_reporting.php:7674 #: ../../include/functions_reporting.php:7700 msgid "of total modules inited" -msgstr "of total modules initiated" +msgstr "of total modules initialised" #: ../../include/functions_reporting.php:7680 #: ../../include/functions_reporting.php:7702 @@ -21104,17 +21182,17 @@ msgstr "Alert level" #: ../../include/functions_reporting.php:8713 #, php-format msgid "%d Fired alerts" -msgstr "%d Triggered alerts" +msgstr "%d triggered alerts" #: ../../include/functions_reporting.php:7682 #: ../../include/functions_reporting.php:7703 msgid "of defined alerts not fired" -msgstr "Of defined alerts not triggered" +msgstr "of defined alerts not triggered" #: ../../include/functions_reporting.php:7740 #: ../../enterprise/include/functions_reporting_csv.php:477 msgid "Defined alerts" -msgstr "Triggered alerts" +msgstr "Defined alerts" #: ../../include/functions_reporting.php:7753 #: ../../include/functions_reporting.php:7774 @@ -21152,7 +21230,7 @@ msgstr "Monitor in unknown status" #: ../../include/functions_reporting.php:7843 msgid "Monitor not init" -msgstr "Monitor not initialised" +msgstr "Monitor not initialized" #: ../../include/functions_reporting.php:7867 #: ../../include/functions_reporting.php:7878 @@ -21168,7 +21246,7 @@ msgstr "Monitor checks" #: ../../include/functions_reporting.php:7943 #: ../../include/functions_reporting_html.php:3589 msgid "Total agents and monitors" -msgstr "Total # of agents and monitors" +msgstr "Total agents and monitors" #: ../../include/functions_reporting.php:7966 msgid "Defined users" @@ -21176,7 +21254,7 @@ msgstr "Defined users" #: ../../include/functions_reporting.php:8604 msgid "Agent without data" -msgstr "Dataless agent" +msgstr "Agent without data" #: ../../include/functions_reporting.php:8643 #: ../../include/functions_agents.php:2229 @@ -21190,14 +21268,14 @@ msgstr "At least one module is in CRITICAL status." #: ../../include/functions_agents.php:2258 #: ../../include/functions_agents.php:2283 msgid "At least one module in WARNING status" -msgstr "At least one module is in WARNING status" +msgstr "At least one module is in WARNING status." #: ../../include/functions_reporting.php:8651 #: ../../include/functions_agents.php:2237 #: ../../include/functions_agents.php:2262 #: ../../include/functions_agents.php:2287 msgid "At least one module is in UKNOWN status" -msgstr "At least one module is in UNKNOWN status" +msgstr "At least one module is in UNKNOWN status." #: ../../include/functions_reporting.php:8655 #: ../../include/functions_agents.php:2241 @@ -21241,57 +21319,57 @@ msgstr "%d Modules in unknown status" #: ../../enterprise/operation/agentes/tag_view.php:909 #, php-format msgid "%d Modules in not init status" -msgstr "%d Modules in not init status" +msgstr "%d Modules in not initialized status" #: ../../include/functions_reporting.php:8700 #, php-format msgid "%d Normal modules" -msgstr "%d Normal modules" +msgstr "%d normal modules" #: ../../include/functions_reporting.php:8701 #, php-format msgid "%d Critical modules" -msgstr "%d Critical modules" +msgstr "%d critical modules" #: ../../include/functions_reporting.php:8702 #, php-format msgid "%d Warning modules" -msgstr "%d Warning modules" +msgstr "%d warning modules" #: ../../include/functions_reporting.php:8703 #, php-format msgid "%d Unknown modules" -msgstr "%d Modules in Unknown status" +msgstr "%d modules in unknown status" #: ../../include/functions_reporting.php:8707 #, php-format msgid "%d Total agents" -msgstr "%d Total agents" +msgstr "%d total agents" #: ../../include/functions_reporting.php:8708 #, php-format msgid "%d Normal agents" -msgstr "%d Agents in Normal status" +msgstr "%d agents in normal status" #: ../../include/functions_reporting.php:8709 #, php-format msgid "%d Critical agents" -msgstr "%d Agents in critical status" +msgstr "%d agents in critical status" #: ../../include/functions_reporting.php:8710 #, php-format msgid "%d Warning agents" -msgstr "%d Agents in warning status." +msgstr "%d agents in warning status" #: ../../include/functions_reporting.php:8711 #, php-format msgid "%d Unknown agents" -msgstr "%d Unknown agents" +msgstr "%d unknown agents" #: ../../include/functions_reporting.php:8712 #, php-format msgid "%d not init agents" -msgstr "%d not init agents" +msgstr "%d not initialized agents" #: ../../include/functions_reporting.php:10414 msgid "Total running modules" @@ -21377,14 +21455,14 @@ msgid "" "There was an error copying the agent configuration, the copy has been " "cancelled" msgstr "" -"There was an error copying the agent's configuration, the copy has been " +"There was an error copying the agent configuration, the copy has been " "cancelled." #: ../../include/functions_agents.php:2225 #: ../../include/functions_agents.php:2250 #: ../../include/functions_agents.php:2275 msgid "No Monitors" -msgstr "No Monitors" +msgstr "No monitors" #: ../../include/functions_alerts.php:401 #: ../../enterprise/include/functions_policies.php:456 @@ -21420,7 +21498,7 @@ msgstr "Unknown status" #: ../../include/functions_alerts.php:576 msgid "On Change" -msgstr "On Change" +msgstr "On change" #: ../../include/functions_alerts.php:970 #: ../../include/functions_network_components.php:507 @@ -21434,15 +21512,15 @@ msgstr "No actions defined" #: ../../include/functions_api.php:78 msgid "No set or get or help operation." -msgstr "No 'set' or 'get' or 'help' operation." +msgstr "No 'set' or 'get' or 'help' operation" #: ../../include/functions_api.php:82 msgid "This operation does not exist." -msgstr "This operation doesn't exist" +msgstr "This operation does not exist." #: ../../include/functions_api.php:86 msgid "Id does not exist in BD." -msgstr "Id does not exist in BD." +msgstr "ID does not exist in BD" #: ../../include/functions_api.php:977 ../../include/functions_api.php:1037 msgid "Does not exist agent with this name." @@ -21454,11 +21532,11 @@ msgstr "There are no modules with this name." #: ../../include/functions_api.php:1516 ../../include/functions_api.php:6477 msgid "Correct Delete" -msgstr "Correct Delete" +msgstr "Correctly deleted" #: ../../include/functions_api.php:2508 msgid "Error in creation network module. Agent name doesn't exist." -msgstr "Error in creation of network module. Agent name doesn't exist." +msgstr "Error creating the network module: agent name does not exist." #: ../../include/functions_api.php:2514 msgid "" @@ -21470,17 +21548,16 @@ msgstr "" #: ../../include/functions_api.php:2569 msgid "Error in creation network module." -msgstr "Error creating network module." +msgstr "Error creating network module" #: ../../include/functions_api.php:2602 msgid "Error updating network module. Module name cannot be left blank." msgstr "" -"Error when updating the network module. The module's name cannot be left " -"blank." +"Error updating the network module. The module name cannot be left blank." #: ../../include/functions_api.php:2610 msgid "Error updating network module. Id_module doesn't exist." -msgstr "Error updating the network module. 'Id_module' doesn't exist." +msgstr "Error updating the network module. 'Id_module' does not exist." #: ../../include/functions_api.php:2625 msgid "Error updating network module. Id_module exists in the new agent." @@ -21489,11 +21566,11 @@ msgstr "" #: ../../include/functions_api.php:2632 msgid "Error updating network module. Id_agent doesn't exist." -msgstr "Error updating network module. Id_agent doesn't exist." +msgstr "Error updating network module. Id_agent does not exist." #: ../../include/functions_api.php:2685 msgid "Network module updated." -msgstr "Network module updated." +msgstr "Network module updated" #: ../../include/functions_api.php:2714 msgid "Error in creation plugin module. Id_plugin cannot be left blank." @@ -21501,11 +21578,11 @@ msgstr "Error creating the plugin module. 'id_plugin' cannot be left blank." #: ../../include/functions_api.php:2721 msgid "Error in creation plugin module. Agent name doesn't exist." -msgstr "Error in creation of plugin module. Agent name doesn't exist." +msgstr "Error creating plugin module. Agent name does not exist." #: ../../include/functions_api.php:2781 msgid "Error in creation plugin module." -msgstr "Error creating the plugin module." +msgstr "Error creating the plugin module" #: ../../include/functions_api.php:2812 msgid "Error updating plugin module. Id_module cannot be left blank." @@ -21513,16 +21590,17 @@ msgstr "Error updating the plugin module. 'Id_module' cannot be left blank." #: ../../include/functions_api.php:2819 msgid "Error updating plugin module. Id_module doesn't exist." -msgstr "Error on updating plugin module. 'Id_module' doesn't exist." +msgstr "Error updating plugin module. 'Id_module' does not exist." #: ../../include/functions_api.php:2831 msgid "Error updating plugin module. Id_module exists in the new agent." msgstr "" -"Error on updating plugin module. 'Id_module' exists in the new agent." +"Error updating the plugin module. 'Id_module' already exists in the new " +"agent." #: ../../include/functions_api.php:2838 msgid "Error updating plugin module. Id_agent doesn't exist." -msgstr "Error updating plugin module. Id_agent doesn't exist." +msgstr "Error updating plugin module. Id_agent does not exist." #: ../../include/functions_api.php:2899 msgid "Plugin module updated." @@ -21530,15 +21608,15 @@ msgstr "Plugin module successfully updated" #: ../../include/functions_api.php:2928 msgid "Error in creation data module. Module_name cannot be left blank." -msgstr "Error creating the data module. 'Module_name' cannot be left blank." +msgstr "Error creating the module data. 'Module_name' cannot be left blank." #: ../../include/functions_api.php:2935 msgid "Error in creation data module. Agent name doesn't exist." -msgstr "Error in creation of data module. Agent name doesn't exist." +msgstr "Error creating module data. Agent name does not exist." #: ../../include/functions_api.php:2986 ../../include/functions_api.php:3052 msgid "Error in creation data module." -msgstr "Error creating the data module." +msgstr "Error creating module data" #: ../../include/functions_api.php:3020 msgid "Error in creation synthetic module. Module_name cannot be left blank." @@ -21546,7 +21624,7 @@ msgstr "Error creating synthetic module. 'Module_name' cannot be left blank." #: ../../include/functions_api.php:3027 msgid "Error in creation synthetic module. Agent name doesn't exist." -msgstr "Error in creation synthetic module. Agent name doesn't exist." +msgstr "Error creating synthetic module. Agent name does not exist." #: ../../include/functions_api.php:3164 msgid "Synthetic module created ID: " @@ -21554,23 +21632,23 @@ msgstr "Synthetic module ID created: " #: ../../include/functions_api.php:3195 msgid "Error updating data module. Id_module cannot be left blank." -msgstr "Error updating the data module. 'Id_module' cannot be left blank." +msgstr "Error updating module data. 'Id_module' cannot be left blank." #: ../../include/functions_api.php:3202 msgid "Error updating data module. Id_module doesn't exist." -msgstr "Error on updating the data module. 'Id_module' doesn't exist." +msgstr "Error updating module data. 'Id_module' does not exist." #: ../../include/functions_api.php:3214 msgid "Error updating data module. Id_module exists in the new agent." -msgstr "Error updating data module. 'Id_module' exists in the new agent." +msgstr "Error updating module data. 'Id_module' exists in the new agent." #: ../../include/functions_api.php:3221 msgid "Error updating data module. Id_agent doesn't exist." -msgstr "Error updating data module. Id_agent doesn't exist." +msgstr "Error updating module data. Id_agent does not exist." #: ../../include/functions_api.php:3269 msgid "Data module updated." -msgstr "Data module updated." +msgstr "Module data updated" #: ../../include/functions_api.php:3306 msgid "Error in creation SNMP module. Module_name cannot be left blank." @@ -21584,7 +21662,7 @@ msgstr "" #: ../../include/functions_api.php:3318 msgid "Error in creation SNMP module. Agent name doesn't exist." -msgstr "Error in creation of SNMP module. Agent name doesn't exist." +msgstr "Error in creation of SNMP module. Agent name does not exist." #: ../../include/functions_api.php:3333 ../../include/functions_api.php:3496 #: ../../include/functions_api.php:5956 @@ -21592,7 +21670,7 @@ msgid "" "Error in creation SNMP module. snmp3_priv_method doesn't exist. Set it to " "'AES' or 'DES'. " msgstr "" -"Error in creation of SNMP module. 'snmp3_priv_method' doesn't exist. Please " +"Error in creation of SNMP module. 'snmp3_priv_method' does not exist. Please " "set it to 'AES' or 'DES'. " #: ../../include/functions_api.php:3338 ../../include/functions_api.php:3505 @@ -21601,7 +21679,7 @@ msgid "" "Error in creation SNMP module. snmp3_sec_level doesn't exist. Set it to " "'authNoPriv' or 'authPriv' or 'noAuthNoPriv'. " msgstr "" -"Error in creation SNMP module. snmp3_sec_level doesn't exist. Set it to " +"Error in creation SNMP module. snmp3_sec_level does not exist. Set it to " "'authNoPriv' or 'authPriv' or 'noAuthNoPriv'. " #: ../../include/functions_api.php:3343 ../../include/functions_api.php:3511 @@ -21610,12 +21688,12 @@ msgid "" "Error in creation SNMP module. snmp3_auth_method doesn't exist. Set it to " "'MD5' or 'SHA'. " msgstr "" -"Error in creation SNMP module. snmp3_auth_method doesn't exist. Set it to " +"Error in creation SNMP module. snmp3_auth_method does not exist. Set it to " "'MD5' or 'SHA'. " #: ../../include/functions_api.php:3427 msgid "Error in creation SNMP module." -msgstr "Error creating the SNMP module." +msgstr "Error creating the SNMP module" #: ../../include/functions_api.php:3460 msgid "Error updating SNMP module. Id_module cannot be left blank." @@ -21623,7 +21701,7 @@ msgstr "Error updating the SNMP module. 'Id_module' cannot be left blank." #: ../../include/functions_api.php:3467 msgid "Error updating SNMP module. Id_module doesn't exist." -msgstr "Error on updating SNMP module. 'Id_module' doesn't exist." +msgstr "Error updating SNMP module. 'Id_module' does not exist." #: ../../include/functions_api.php:3479 msgid "Error updating SNMP module. Id_module exists in the new agent." @@ -21632,18 +21710,18 @@ msgstr "" #: ../../include/functions_api.php:3486 msgid "Error updating snmp module. Id_agent doesn't exist." -msgstr "Error updating snmp module. Id_agent doesn't exist." +msgstr "Error updating snmp module. Id_agent does not exist." #: ../../include/functions_api.php:3599 msgid "SNMP module updated." -msgstr "SNMP module updated." +msgstr "SNMP module updated" #: ../../include/functions_api.php:3627 msgid "" "Error creating network component. Network component name cannot be left " "blank." msgstr "" -"Error creating a network component. The Network component's name cannot be " +"Error creating a network component. The Network component name cannot be " "left blank." #: ../../include/functions_api.php:3632 @@ -21659,8 +21737,8 @@ msgid "" "Error creating network component. Network component group cannot be left " "blank." msgstr "" -"Error creating the network component. The network component's group cannot " -"be left blank." +"Error creating the network component. The network component group cannot be " +"left blank." #: ../../include/functions_api.php:3673 msgid "" @@ -21672,19 +21750,19 @@ msgstr "" msgid "" "Error creating plugin component. Plugin component name cannot be left blank." msgstr "" -"Error creating the plugin component. The plugin component's name cannot be " +"Error creating the plugin component. The plugin component name cannot be " "left blank." #: ../../include/functions_api.php:3717 msgid "Error creating plugin component. Incorrect value for Id plugin." msgstr "" -"Error creating the plugin component. Incorrect value for the plugin's ID." +"Error creating the plugin component. Incorrect value for the plugin ID." #: ../../include/functions_api.php:3722 msgid "" "Error creating plugin component. Plugin component group cannot be left blank." msgstr "" -"Error creating plugin component. The plugin component's group cannot be left " +"Error creating plugin component. The plugin component group cannot be left " "blank." #: ../../include/functions_api.php:3762 @@ -21697,7 +21775,7 @@ msgstr "" msgid "" "Error creating SNMP component. SNMP component name cannot be left blank." msgstr "" -"Error creating the SNMP component. The SNMP component's name cannot be left " +"Error creating the SNMP component. The SNMP component name cannot be left " "blank." #: ../../include/functions_api.php:3805 @@ -21711,7 +21789,7 @@ msgstr "" msgid "" "Error creating SNMP component. Snmp component group cannot be left blank." msgstr "" -"Error creating the SNMP component. The SNMP component's group cannot be left " +"Error creating the SNMP component. The SNMP component group cannot be left " "blank." #: ../../include/functions_api.php:3822 @@ -21719,23 +21797,23 @@ msgid "" "Error creating SNMP component. snmp3_priv_method doesn't exist. Set it to " "'AES' or 'DES'. " msgstr "" -"Error creating SNMP component. 'snmp3_priv_method' doesn't exist. Please set " -"it to 'AES' or 'DES'. " +"Error creating SNMP component. 'snmp3_priv_method' does not exist. Please " +"set it to 'AES' or 'DES'. " #: ../../include/functions_api.php:3831 msgid "" "Error creating SNMP component. snmp3_sec_level doesn't exist. Set it to " "'authNoPriv' or 'authPriv' or 'noAuthNoPriv'. " msgstr "" -"Error on creating SNMP component. 'snmp3_sec_level' doesn't exist. Please " -"set it to 'authNoPriv' or 'authPriv' or 'noAuthNoPriv'. " +"Error creating SNMP component. 'snmp3_sec_level' does not exist. Please set " +"it to 'authNoPriv' or 'authPriv' or 'noAuthNoPriv'. " #: ../../include/functions_api.php:3837 msgid "" "Error creating SNMP component. snmp3_auth_method doesn't exist. Set it to " "'MD5' or 'SHA'. " msgstr "" -"Error on creating SNMP component. 'snmp3_auth_method' doesn't exist. Please " +"Error on creating SNMP component. 'snmp3_auth_method' does not exist. Please " "set it to 'MD5' or 'SHA'. " #: ../../include/functions_api.php:3912 @@ -21747,19 +21825,19 @@ msgstr "" msgid "" "Error creating local component. Local component name cannot be left blank." msgstr "" -"Error creating a local component. The local component's name cannot be left " +"Error creating a local component. The local component name cannot be left " "blank." #: ../../include/functions_api.php:3955 msgid "" "Error creating local component. Local component group cannot be left blank." msgstr "" -"Error creating the local component. The local component's group cannot be " -"left blank." +"Error creating the local component. The local component group cannot be left " +"blank." #: ../../include/functions_api.php:3979 msgid "Error creating local component." -msgstr "Error creating local component." +msgstr "Error creating local component" #: ../../include/functions_api.php:3985 msgid "Error creating local component. This local component already exists." @@ -21777,16 +21855,16 @@ msgstr "" msgid "" "Error getting module value from all agents. Module name doesn't exist." msgstr "" -"Error on getting module value from all agents. Module name doesn't exist." +"Error getting module value from all agents. Module name does not exist." #: ../../include/functions_api.php:4071 msgid "Error creating alert template. Template name cannot be left blank." msgstr "" -"Error creating the alert template. The template's name cannot be left blank." +"Error creating the alert template. The template name cannot be left blank." #: ../../include/functions_api.php:4143 msgid "Error creating alert template." -msgstr "Error creating the alert template." +msgstr "Error creating the alert template" #: ../../include/functions_api.php:4174 msgid "Error updating alert template. Id_template cannot be left blank." @@ -21794,15 +21872,15 @@ msgstr "Error updating alert template. 'Id_template' cannot be left blank." #: ../../include/functions_api.php:4182 msgid "Error updating alert template. Id_template doesn't exist." -msgstr "Error on updating alert template. 'Id_template' doesn't exist." +msgstr "Error on updating alert template. 'Id_template' does not exist." #: ../../include/functions_api.php:4208 msgid "Error updating alert template." -msgstr "Error updating the alert template." +msgstr "Error updating the alert template" #: ../../include/functions_api.php:4213 msgid "Correct updating of alert template" -msgstr "Alert template sucessfully updated." +msgstr "Alert template successfully updated" #: ../../include/functions_api.php:4237 msgid "Error deleting alert template. Id_template cannot be left blank." @@ -21811,11 +21889,11 @@ msgstr "" #: ../../include/functions_api.php:4246 msgid "Error deleting alert template." -msgstr "Error deleting the alert template." +msgstr "Error deleting the alert template" #: ../../include/functions_api.php:4250 msgid "Correct deleting of alert template." -msgstr "The alert template was successfully deleted." +msgstr "Alert template successfully deleted" #: ../../include/functions_api.php:4287 msgid "Error getting all alert templates." @@ -21823,38 +21901,35 @@ msgstr "Error retrieving all alert templates" #: ../../include/functions_api.php:4319 msgid "Error getting alert template. Id_template doesn't exist." -msgstr "Error on getting alert template. 'Id_template' doesn't exist." +msgstr "Error retrieving alert template. 'Id_template' does not exist." #: ../../include/functions_api.php:4336 msgid "Error getting alert template." -msgstr "Error retrieving the alert template." +msgstr "Error retrieving the alert template" #: ../../include/functions_api.php:4375 msgid "Error getting module groups." -msgstr "Error retrieving module groups." +msgstr "Error retrieving module groups" #: ../../include/functions_api.php:4420 msgid "Error getting plugins." -msgstr "Error retrieving plugins." +msgstr "Error retrieving plugins" #: ../../include/functions_api.php:4443 msgid "Error creating module from network component. Agent doesn't exist." -msgstr "" -"Error on creating module from network component. Agent doesn't exist." +msgstr "Error creating module from network component. Agent does not exist." #: ../../include/functions_api.php:4450 msgid "" "Error creating module from network component. Network component doesn't " "exist." msgstr "" -"Error creating module from network component. Network component doesn't " +"Error creating module from network component. Network component does not " "exist." #: ../../include/functions_api.php:4468 msgid "Error creating module from network component. Error creating module." -msgstr "" -"Error creating the module from a network component. Error creating the " -"module." +msgstr "Error creating the module from a network component" #: ../../include/functions_api.php:4495 msgid "Error assigning module to template. Id_template cannot be left blank." @@ -21874,19 +21949,19 @@ msgstr "" #: ../../include/functions_api.php:4515 msgid "Error assigning module to template. Id_template doensn't exists." msgstr "" -"Error assigning the module to a template. 'Id_template' doesn't exist." +"Error assigning the module to a template. 'Id_template' does not exist." #: ../../include/functions_api.php:4525 msgid "Error assigning module to template. Id_agent doesn't exist." -msgstr "Error on assigning module to template. 'Id_agent' doesn't exist." +msgstr "Error assigning module to template. 'Id_agent' does not exist." #: ../../include/functions_api.php:4532 msgid "Error assigning module to template. Id_module doesn't exist." -msgstr "Error assigning module to template. 'Id_module' doesn't exist." +msgstr "Error assigning module to template. 'Id_module' does not exist." #: ../../include/functions_api.php:4540 msgid "Error assigning module to template." -msgstr "Error assigning the module to a template." +msgstr "Error assigning the module to a template" #: ../../include/functions_api.php:4566 msgid "" @@ -21897,36 +21972,35 @@ msgstr "" #: ../../include/functions_api.php:4573 msgid "Error deleting module template. Id_module_template doesn't exist." -msgstr "" -"Error on deleting module template. 'Id_module_template' doesn't exist." +msgstr "Error deleting module template. 'Id_module_template' does not exist." #: ../../include/functions_api.php:4581 ../../include/functions_api.php:4640 msgid "Error deleting module template." -msgstr "Error deleting the module template." +msgstr "Error deleting module template" #: ../../include/functions_api.php:4584 ../../include/functions_api.php:4643 msgid "Correct deleting of module template." -msgstr "Module template sucessfully deleted." +msgstr "Module template successfully deleted" #: ../../include/functions_api.php:4720 msgid "Error validate all alerts. Failed " -msgstr "Error on validating all alerts. Failed " +msgstr "Error validating all alerts " #: ../../include/functions_api.php:4723 msgid "Correct validating of all alerts." -msgstr "All alerts successfully validated." +msgstr "All alerts successfully validated" #: ../../include/functions_api.php:4750 msgid "Error validating all alert policies." -msgstr "Error when validating all alert policies." +msgstr "Error validating all policy alerts" #: ../../include/functions_api.php:4808 msgid "Error validate all policy alerts. Failed " -msgstr "Error validating all the policy alerts. Failed. " +msgstr "Error validating all policy alerts " #: ../../include/functions_api.php:4811 msgid "Correct validating of all policy alerts." -msgstr "All policy alerts successfully validated." +msgstr "All policy alerts successfully validated" #: ../../include/functions_api.php:4834 msgid "Error stopping downtime. Id_downtime cannot be left blank." @@ -21934,94 +22008,90 @@ msgstr "Error stopping the downtime. 'Id_downtime' cannot be left blank." #: ../../include/functions_api.php:4850 msgid "Downtime stopped." -msgstr "Downtime stopped." +msgstr "Downtime stopped" #: ../../include/functions_api.php:5165 msgid "and this modules are doesn't exists or not applicable a this agents: " -msgstr "& these modules don't exist or aren't applicable to these agents: " +msgstr "" +"and these modules do not exist or are not applicable to these agents: " #: ../../include/functions_api.php:5167 msgid "and this agents are generate problems: " -msgstr "& these agents generate issues: " +msgstr "and these agents generate issues: " #: ../../include/functions_api.php:5169 msgid "and this agents with ids are doesn't exists: " -msgstr "& these agents with ID's don't exist: " +msgstr "and these agents with IDs do not exist: " #: ../../include/functions_api.php:5196 msgid "Error adding agent to policy. Id_policy cannot be left blank." msgstr "" -"Error when adding the agent to the policy. 'Id_policy' cannot be left blank." +"Error adding the agent to the policy. 'Id_policy' cannot be left blank." #: ../../include/functions_api.php:5201 msgid "Error adding agent to policy. Id_agent cannot be left blank." msgstr "" -"Error when adding the agent to the policy. 'Id_agent' cannot be left blank." +"Error adding the agent to the policy. 'Id_agent' cannot be left blank." #: ../../include/functions_api.php:5209 msgid "Error adding agent to policy. Id_agent doesn't exist." -msgstr "Error on adding agent to policy. 'Id_agent' doesn't exist." +msgstr "Error adding agent to policy. 'Id_agent' does not exist." #: ../../include/functions_api.php:5217 msgid "Error adding agent to policy." -msgstr "Error when adding the agent to the policy." +msgstr "Error adding the agent to the policy" #: ../../include/functions_api.php:5225 msgid "Error adding agent to policy. The agent is already in the policy." msgstr "" -"Error when adding the agent to the policy. The agent is already in the " -"policy." +"Error adding the agent to the policy. The agent is already in the policy." #: ../../include/functions_api.php:5260 msgid "Error adding data module to policy. Id_policy cannot be left blank." msgstr "" -"Error when adding the data module to the policy. 'Id_policy' cannot be left " -"blank." +"Error adding module data to the policy. 'Id_policy' cannot be left blank." #: ../../include/functions_api.php:5265 msgid "Error adding data module to policy. Module_name cannot be left blank." msgstr "" -"Error when adding the data module to the policy. 'Module_name' cannot be " -"left blank." +"Error adding module data to the policy. 'Module_name' cannot be left blank." #: ../../include/functions_api.php:5273 msgid "Error adding data module to policy." -msgstr "Error when adding the data module to the policy." +msgstr "Error adding module data to the policy" #: ../../include/functions_api.php:5309 msgid "" "Error adding data module to policy. The module is already in the policy." msgstr "" -"Error when adding the data module to the policy. The module is already in " -"the policy." +"Error adding module data to the policy. The module is already in the policy." #: ../../include/functions_api.php:5349 msgid "Error updating data module in policy. Id_policy cannot be left blank." msgstr "" -"Error updating the data module in the policy. 'Id_policy' cannot be left " -"blank." +"Error updating module data in the policy. 'Id_policy' cannot be left blank." #: ../../include/functions_api.php:5354 msgid "" "Error updating data module in policy. Id_policy_module cannot be left blank." msgstr "" -"Error updating data module in policy. 'id_policy_module' cannot be left " +"Error updating module data in policy. 'id_policy_module' cannot be left " "blank." #: ../../include/functions_api.php:5362 msgid "Error updating data module in policy. Module doesn't exist." -msgstr "Error on updating data module in policy. Module doesn't exist." +msgstr "Error updating module data in policy. Module does not exist." #: ../../include/functions_api.php:5368 msgid "" "Error updating data module in policy. Module type is not network type." msgstr "" -"Error updating the data module in the policy. The module type doesn't match " -"the network type." +"Error updating module data in the policy. The module type does not match the " +"network type." #: ../../include/functions_api.php:5397 msgid "Data policy module updated." -msgstr "Data policy module updated." +msgstr "Data module policy updated" #: ../../include/functions_api.php:5426 msgid "" @@ -22047,7 +22117,7 @@ msgstr "" #: ../../include/functions_api.php:5448 msgid "Error adding network module to policy." -msgstr "Error adding the network module to the policy." +msgstr "Error adding the network module to the policy" #: ../../include/functions_api.php:5486 msgid "" @@ -22073,7 +22143,7 @@ msgstr "" #: ../../include/functions_api.php:5539 msgid "Error updating network module in policy. Module doesn't exist." -msgstr "Error on updating network module in policy. Module doesn't exist." +msgstr "Error updating network module in policy. Module does not exist." #: ../../include/functions_api.php:5545 msgid "" @@ -22084,7 +22154,7 @@ msgstr "" #: ../../include/functions_api.php:5571 msgid "Network policy module updated." -msgstr "Network policy module updated." +msgstr "Network policy module updated" #: ../../include/functions_api.php:5598 msgid "Error adding plugin module to policy. Id_policy cannot be left blank." @@ -22107,7 +22177,7 @@ msgstr "" #: ../../include/functions_api.php:5616 msgid "Error adding plugin module to policy." -msgstr "Error adding the plugin module to the policy." +msgstr "Error adding the plugin module to the policy" #: ../../include/functions_api.php:5659 msgid "" @@ -22133,7 +22203,7 @@ msgstr "" #: ../../include/functions_api.php:5713 msgid "Error updating plugin module in policy. Module doesn't exist." -msgstr "Error on updating plugin module in policy. Module doesn't exist." +msgstr "Error on updating plugin module in policy. Module does not exist." #: ../../include/functions_api.php:5719 msgid "" @@ -22144,7 +22214,7 @@ msgstr "" #: ../../include/functions_api.php:5751 msgid "Plugin policy module updated." -msgstr "Plugin policy module updated." +msgstr "Plugin policy module updated" #: ../../include/functions_api.php:5926 msgid "Error adding SNMP module to policy. Id_policy cannot be left blank." @@ -22159,7 +22229,7 @@ msgstr "" #: ../../include/functions_api.php:5939 msgid "Error adding SNMP module to policy." -msgstr "Error adding the SNMP module to the policy." +msgstr "Error adding the SNMP module to the policy" #: ../../include/functions_api.php:5944 msgid "" @@ -22191,27 +22261,26 @@ msgstr "" #: ../../include/functions_api.php:6090 msgid "Error updating SNMP module in policy. Module doesn't exist." -msgstr "Error on updating SNMP module in policy. Module doesn't exist." +msgstr "Error on updating SNMP module in policy. Module does not exist." #: ../../include/functions_api.php:6095 msgid "Error updating SNMP module in policy. Module type is not SNMP type." -msgstr "" -"Error on updating SNMP module in policy. Module type is not SNMP type." +msgstr "Error updating SNMP module in policy. Module type is not SNMP type." #: ../../include/functions_api.php:6105 msgid "" "Error updating SNMP module. snmp3_priv_method doesn't exist. Set it to 'AES' " "or 'DES'. " msgstr "" -"Error updating SNMP module. 'snmp3_priv_method' doesn't exist. Please set it " -"to 'AES' or 'DES'. " +"Error updating SNMP module. 'snmp3_priv_method' does not exist. Please set " +"it to 'AES' or 'DES'. " #: ../../include/functions_api.php:6115 msgid "" "Error updating SNMP module. snmp3_sec_level doesn't exist. Set it to " "'authNoPriv' or 'authPriv' or 'noAuthNoPriv'. " msgstr "" -"Error on updating SNMP module. 'snmp3_sec_level' doesn't exist. Please set " +"Error on updating SNMP module. 'snmp3_sec_level' does not exist. Please set " "it to 'authNoPriv' or 'authPriv' or 'noAuthNoPriv'. " #: ../../include/functions_api.php:6122 @@ -22219,8 +22288,8 @@ msgid "" "Error updating SNMP module. snmp3_auth_method doesn't exist. Set it to 'MD5' " "or 'SHA'. " msgstr "" -"Error on updating SNMP module. 'snmp3_auth_method' doesn't exist. Please set " -"it to 'MD5' or 'SHA'. " +"Error on updating SNMP module. 'snmp3_auth_method' does not exist. Please " +"set it to 'MD5' or 'SHA'. " #: ../../include/functions_api.php:6162 msgid "SNMP policy module updated." @@ -22237,11 +22306,11 @@ msgstr "Error applying policy" #: ../../include/functions_api.php:6210 msgid "Error applying policy. This policy is already pending to apply." msgstr "" -"Error applying the policy. This policy is already pending on being applied." +"Error applying the policy. The application of this policy is still pending." #: ../../include/functions_api.php:6268 msgid "Error applying all policies." -msgstr "Error applying all policies." +msgstr "Error applying all policies" #: ../../include/functions_api.php:6320 msgid "Error in group creation. Group_name cannot be left blank." @@ -22253,11 +22322,11 @@ msgstr "Error creating group. 'Icon_name' cannot be left blank." #: ../../include/functions_api.php:6339 ../../include/functions_api.php:6515 msgid "Error in group creation. Id_parent_group doesn't exist." -msgstr "Error on group creation. 'Id_parent_group' doesn't exist." +msgstr "Error on group creation. 'Id_parent_group' does not exist." #: ../../include/functions_api.php:6367 msgid "Error in group creation." -msgstr "Error creating group." +msgstr "Error creating group" #: ../../include/functions_api.php:6503 msgid "Error in netflow filter creation. Filter name cannot be left blank." @@ -22285,7 +22354,7 @@ msgstr "Error creating NetFlow filter." #: ../../include/functions_api.php:6733 msgid "Create user." -msgstr "Create user." +msgstr "Create user" #: ../../include/functions_api.php:6772 msgid "Error updating user. Id_user cannot be left blank." @@ -22293,15 +22362,15 @@ msgstr "User update error. 'Id_user' cannot be left blank." #: ../../include/functions_api.php:6780 msgid "Error updating user. Id_user doesn't exist." -msgstr "Error on updating user. 'Id_user' doesn't exist." +msgstr "Error updating user. 'Id_user' does not exist." #: ../../include/functions_api.php:6796 msgid "Error updating user. Password info incorrect." -msgstr "User update error. Password info is incorrect." +msgstr "Error updating user. Password information is incorrect." #: ../../include/functions_api.php:6804 msgid "Updated user." -msgstr "User updated." +msgstr "User updated" #: ../../include/functions_api.php:6835 msgid "Error enable/disable user. Id_user cannot be left blank." @@ -22314,11 +22383,11 @@ msgstr "" #: ../../include/functions_api.php:6848 msgid "Error enable/disable user. The user doesn't exist." -msgstr "Error enable/disable user. The user doesn't exist." +msgstr "Error enable/disable user. The user does not exist." #: ../../include/functions_api.php:6857 msgid "Error in user enabling/disabling." -msgstr "Error enabling/disabling user." +msgstr "Error enabling/disabling user" #: ../../include/functions_api.php:6862 msgid "Enabled user." @@ -22326,47 +22395,47 @@ msgstr "User enabled" #: ../../include/functions_api.php:6866 msgid "Disabled user." -msgstr "User disabled." +msgstr "User disabled" #: ../../include/functions_api.php:8330 msgid "Delete user." -msgstr "Delete user." +msgstr "Delete user" #: ../../include/functions_api.php:8359 msgid "Add user profile." -msgstr "Add user profile." +msgstr "Add user profile" #: ../../include/functions_api.php:8392 msgid "Delete user profile." -msgstr "Delete user profile." +msgstr "Delete user profile" #: ../../include/functions_api.php:8490 msgid "Correct module disable" -msgstr "Module successfully disabled." +msgstr "Module successfully disabled" #: ../../include/functions_api.php:8493 msgid "Error disabling module" -msgstr "Error on disabling module." +msgstr "Error disabling module" #: ../../include/functions_api.php:8519 msgid "Correct module enable" -msgstr "Module successfully enabled." +msgstr "Module successfully enabled" #: ../../include/functions_api.php:8522 msgid "Error enabling module" -msgstr "Error: could not enable module." +msgstr "Error enabling module" #: ../../include/functions_api.php:8554 ../../include/functions_api.php:8592 msgid "Error alert disable" -msgstr "" +msgstr "Error disabling alert" #: ../../include/functions_api.php:8624 ../../include/functions_api.php:8661 msgid "Error alert enable" -msgstr "" +msgstr "Error enabling alert" #: ../../include/functions_api.php:9217 msgid "Error adding event comment." -msgstr "Error adding an event comment." +msgstr "Error adding an event comment" #: ../../include/functions_api.php:9454 msgid "Error enable/disable agent. Id_agent cannot be left blank." @@ -22380,7 +22449,7 @@ msgstr "" #: ../../include/functions_api.php:9467 msgid "Error enable/disable agent. The agent doesn't exist." -msgstr "Error enable/disable agent. The agent doesn't exist." +msgstr "Error enable/disable agent. The agent does not exist." #: ../../include/functions_api.php:9478 msgid "Error in agent enabling/disabling." @@ -22388,11 +22457,11 @@ msgstr "Error enabling/disabling agent" #: ../../include/functions_api.php:9484 msgid "Enabled agent." -msgstr "Agent enabled." +msgstr "Agent enabled" #: ../../include/functions_api.php:9489 msgid "Disabled agent." -msgstr "Agent disabled." +msgstr "Agent disabled" #: ../../include/functions_api.php:9585 msgid "Error getting special_days." @@ -22408,35 +22477,35 @@ msgstr "Error creating the special day. Invalid date format." #: ../../include/functions_api.php:9637 msgid "Error in creation special day." -msgstr "Error when creating the special day." +msgstr "Error creating the special day" #: ../../include/functions_api.php:9677 msgid "Error in creation service. No name" -msgstr "" +msgstr "Error creating service. No name." #: ../../include/functions_api.php:9691 msgid "Error in creation service. No agent id" -msgstr "" +msgstr "Error creating service. No agent ID." #: ../../include/functions_api.php:9719 msgid "Error in creation service" -msgstr "" +msgstr "Error creating service" #: ../../include/functions_api.php:9744 msgid "Error in update service. No service id" -msgstr "" +msgstr "Error updating service. No service ID." #: ../../include/functions_api.php:9810 msgid "Error in update service" -msgstr "" +msgstr "Error updating service" #: ../../include/functions_api.php:9838 msgid "Error adding elements to service. No service id" -msgstr "" +msgstr "Error adding elements to service. No service ID." #: ../../include/functions_api.php:9891 msgid "Error adding elements to service" -msgstr "" +msgstr "Error adding elements to service" #: ../../include/functions_api.php:9921 msgid "Error updating special day. Id cannot be left blank." @@ -22444,7 +22513,7 @@ msgstr "Error updating the special day. The ID cannot be left blank." #: ../../include/functions_api.php:9928 msgid "Error updating special day. Id doesn't exist." -msgstr "Error on updating special day. ID doesn't exist." +msgstr "Error updating special day. ID does not exist." #: ../../include/functions_api.php:9933 msgid "Error updating special day. Invalid date format." @@ -22456,7 +22525,7 @@ msgstr "Error deleting the special day. The ID cannot be left blank." #: ../../include/functions_api.php:9974 msgid "Error deleting special day. Id doesn't exist." -msgstr "Error on deleting the special day. ID doesn't exist." +msgstr "Error deleting the special day. ID does not exist." #: ../../include/functions_api.php:9981 msgid "Error in deletion special day." @@ -22465,17 +22534,17 @@ msgstr "Error deleting the special day." #: ../../include/functions_api.php:10133 #: ../../enterprise/meta/advanced/license_meta.php:40 msgid "Metaconsole and all nodes license updated" -msgstr "" +msgstr "Metaconsole and all nodes license updated" #: ../../include/functions_api.php:10136 #: ../../enterprise/meta/advanced/license_meta.php:43 #, php-format msgid "Metaconsole license updated but %d of %d node synchronization failed" -msgstr "" +msgstr "Metaconsole license updated but %d of %d node synchronization failed" #: ../../include/functions_api.php:10140 msgid "This function is only for metaconsole" -msgstr "" +msgstr "This function is only for Metaconsole" #: ../../include/functions_tags.php:602 msgid "Click here to open a popup window with URL tag" @@ -22496,7 +22565,7 @@ msgstr "← Back" #: ../../include/functions_clippy.php:208 msgid "Do you want to exit the help tour?" -msgstr "Do you wish to stop the help tour?" +msgstr "Do you want to exit the help tour?" #: ../../include/functions_pandora_networkmap.php:107 #: ../../include/functions_pandora_networkmap.php:214 @@ -22516,7 +22585,7 @@ msgstr "Edit node %s" #: ../../include/functions_pandora_networkmap.php:999 msgid "Holding Area" -msgstr "Holding Area" +msgstr "Holding area" #: ../../include/functions_pandora_networkmap.php:1000 msgid "Show details and options" @@ -22541,7 +22610,7 @@ msgstr "Define as parent element" #: ../../include/functions_pandora_networkmap.php:1005 #: ../../include/functions_pandora_networkmap.php:1018 msgid "Abort the action of set relationship" -msgstr "Abort the action of set relationship" +msgstr "Abort the action of relationship configuration" #: ../../include/functions_pandora_networkmap.php:1007 #: ../../include/functions_pandora_networkmap.php:1793 @@ -22550,30 +22619,32 @@ msgstr "Add node" #: ../../include/functions_pandora_networkmap.php:1008 msgid "Set center" -msgstr "Set centre" +msgstr "Set center" #: ../../include/functions_pandora_networkmap.php:1010 msgid "Refresh Holding area" -msgstr "Refresh Holding Area" +msgstr "Refresh holding area" #: ../../include/functions_pandora_networkmap.php:1011 #: ../../include/functions_pandora_networkmap.php:1014 msgid "Proceed" -msgstr "" +msgstr "Proceed" #: ../../include/functions_pandora_networkmap.php:1012 msgid "" "Resetting the map will delete all customizations you have done, including " "manual relationships between elements, new items, etc." msgstr "" +"Resetting the map will delete all customization you have done, including " +"manual relationships between elements, new items, etc." #: ../../include/functions_pandora_networkmap.php:1016 msgid "Restart map" -msgstr "" +msgstr "Restart map" #: ../../include/functions_pandora_networkmap.php:1017 msgid "Abort the interface relationship" -msgstr "" +msgstr "Abort the interface relationship" #: ../../include/functions_pandora_networkmap.php:1201 #: ../../include/functions_maps.php:62 @@ -22586,7 +22657,7 @@ msgstr "Open Minimap" #: ../../include/functions_pandora_networkmap.php:1531 msgid "Hide Labels" -msgstr "Hide Labels" +msgstr "Hide labels" #: ../../include/functions_pandora_networkmap.php:1621 msgid "Edit node" @@ -22606,11 +22677,11 @@ msgstr "OS type" #: ../../enterprise/include/ajax/clustermap.php:50 #: ../../enterprise/include/ajax/clustermap.php:51 msgid "Node Details" -msgstr "Node Details" +msgstr "Node details" #: ../../include/functions_pandora_networkmap.php:1649 msgid "Ip" -msgstr "Ip" +msgstr "IP" #: ../../include/functions_pandora_networkmap.php:1650 msgid "MAC" @@ -22635,15 +22706,15 @@ msgstr "Square" #: ../../include/functions_pandora_networkmap.php:1671 msgid "Rhombus" -msgstr "Rhomb" +msgstr "Rhombus" #: ../../include/functions_pandora_networkmap.php:1681 msgid "name node" -msgstr "" +msgstr "Name node" #: ../../include/functions_pandora_networkmap.php:1683 msgid "Update node" -msgstr "" +msgstr "Update node" #: ../../include/functions_pandora_networkmap.php:1688 #: ../../include/functions_pandora_networkmap.php:1849 @@ -22667,22 +22738,22 @@ msgstr "Node Options" #: ../../include/functions_pandora_networkmap.php:1706 #: ../../include/functions_pandora_networkmap.php:1761 msgid "Node source" -msgstr "Node Source" +msgstr "Node source" #: ../../include/functions_pandora_networkmap.php:1707 #: ../../include/functions_pandora_networkmap.php:1762 msgid "Interface source" -msgstr "Interface Source" +msgstr "Interface source" #: ../../include/functions_pandora_networkmap.php:1708 #: ../../include/functions_pandora_networkmap.php:1763 msgid "Interface Target" -msgstr "Interface Target" +msgstr "Interface target" #: ../../include/functions_pandora_networkmap.php:1710 #: ../../include/functions_pandora_networkmap.php:1764 msgid "Node target" -msgstr "Node Target" +msgstr "Node target" #: ../../include/functions_pandora_networkmap.php:1711 msgid "E." @@ -22708,15 +22779,15 @@ msgstr "Add interface link" #: ../../include/functions_pandora_networkmap.php:1842 #: ../../include/functions_pandora_networkmap.php:1860 msgid "Add agent node" -msgstr "Add Agent Node" +msgstr "Add agent node" #: ../../include/functions_pandora_networkmap.php:1841 msgid "Add agent node (filter by group)" -msgstr "Add Agent Node (filter by group)" +msgstr "Add agent node (filter by group)" #: ../../include/functions_pandora_networkmap.php:1856 msgid "Add fictional node" -msgstr "Add Fictional Node" +msgstr "Add fictional node" #: ../../include/functions_pandora_networkmap.php:1859 msgid "Add fictional point" @@ -22725,7 +22796,7 @@ msgstr "Add fictional point" #: ../../include/functions_treeview.php:54 #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1347 msgid "There was a problem loading module" -msgstr "There was a problem loading the module." +msgstr "Error loading the module" #: ../../include/functions_treeview.php:285 #: ../../include/functions_treeview.php:292 @@ -22770,7 +22841,7 @@ msgstr "Go to module edition" #: ../../include/functions_treeview.php:368 msgid "There was a problem loading alerts" -msgstr "There was a problem loading the alerts" +msgstr "Error loading the alerts" #: ../../include/functions_treeview.php:452 msgid "Go to alerts edition" @@ -22782,7 +22853,7 @@ msgstr "Go to alerts edition" #: ../../operation/agentes/estado_generalagente.php:46 #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1057 msgid "There was a problem loading agent" -msgstr "There was a problem loading agent" +msgstr "Error loading agent" #: ../../include/functions_treeview.php:577 #: ../../operation/agentes/estado_generalagente.php:297 @@ -22817,7 +22888,7 @@ msgstr "Agent data" #: ../../operation/gis_maps/ajax.php:315 #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1117 msgid "Agent Version" -msgstr "Agent Version" +msgstr "Agent version" #: ../../include/functions_treeview.php:665 #: ../../operation/agentes/estado_generalagente.php:339 @@ -22866,11 +22937,11 @@ msgstr "Interface information" #: ../../include/functions_config.php:94 msgid "Failed updated: User did not login." -msgstr "Update failed : User did not login." +msgstr "Error updating: user did not sign in" #: ../../include/functions_config.php:102 msgid "Failed updated: User is not admin." -msgstr "Update failed: User isn't admin." +msgstr "Update failed: user is not an admin" #: ../../include/functions_config.php:140 msgid "SSL cert path" @@ -22882,27 +22953,27 @@ msgstr "Use cert." #: ../../include/functions_config.php:154 msgid "Enable Integria incidents in Pandora Console" -msgstr "Enable Integria incidents in Pandora Console" +msgstr "Enable Integria IMS issues in the Pandora FMS Console" #: ../../include/functions_config.php:156 msgid "Integria inventory" -msgstr "Integria inventory" +msgstr "Integria IMS inventory" #: ../../include/functions_config.php:158 msgid "Integria API password" -msgstr "Integria API password" +msgstr "Integria IMS API password" #: ../../include/functions_config.php:160 msgid "Integria URL" -msgstr "Integria IMS' URL" +msgstr "Integria IMS URL" #: ../../include/functions_config.php:184 msgid "License information" -msgstr "Licence information" +msgstr "License information" #: ../../include/functions_config.php:204 msgid "Limit parameters bulk" -msgstr "" +msgstr "Limit of bulk operations" #: ../../include/functions_config.php:206 msgid "Identification_reminder" @@ -22914,7 +22985,7 @@ msgstr "Include_agents" #: ../../include/functions_config.php:210 msgid "alias_as_name" -msgstr "" +msgstr "alias_as_name" #: ../../include/functions_config.php:212 msgid "Audit log directory" @@ -23008,42 +23079,42 @@ msgstr "Inventory change blacklist" #: ../../enterprise/godmode/setup/setup.php:244 #: ../../enterprise/meta/advanced/metasetup.mail.php:84 msgid "From dir" -msgstr "" +msgstr "From dir" #: ../../include/functions_config.php:260 #: ../../enterprise/godmode/setup/setup.php:247 #: ../../enterprise/meta/advanced/metasetup.mail.php:87 msgid "From name" -msgstr "" +msgstr "From name" #: ../../include/functions_config.php:262 #: ../../enterprise/godmode/setup/setup.php:250 #: ../../enterprise/meta/advanced/metasetup.mail.php:90 msgid "Server SMTP" -msgstr "" +msgstr "Server SMTP" #: ../../include/functions_config.php:264 #: ../../enterprise/godmode/setup/setup.php:253 #: ../../enterprise/meta/advanced/metasetup.mail.php:93 msgid "Port SMTP" -msgstr "" +msgstr "Port SMTP" #: ../../include/functions_config.php:266 #: ../../enterprise/godmode/setup/setup.php:256 msgid "Encryption" -msgstr "" +msgstr "Encryption" #: ../../include/functions_config.php:268 #: ../../enterprise/godmode/setup/setup.php:259 #: ../../enterprise/meta/advanced/metasetup.mail.php:96 msgid "Email user" -msgstr "" +msgstr "Email user" #: ../../include/functions_config.php:270 #: ../../enterprise/godmode/setup/setup.php:262 #: ../../enterprise/meta/advanced/metasetup.mail.php:99 msgid "Email password" -msgstr "" +msgstr "Email password" #: ../../include/functions_config.php:277 #: ../../enterprise/godmode/setup/setup.php:287 @@ -23092,7 +23163,7 @@ msgstr "Number of failed login attempts" #: ../../enterprise/meta/advanced/metasetup.password.php:89 #: ../../enterprise/meta/include/functions_meta.php:519 msgid "Password must have numbers" -msgstr "The password must include numbers" +msgstr "The password must include numbers." #: ../../include/functions_config.php:292 #: ../../enterprise/godmode/setup/setup.php:301 @@ -23127,7 +23198,7 @@ msgstr "Compare to previous password" #: ../../enterprise/meta/advanced/metasetup.setup.php:256 #: ../../enterprise/meta/include/functions_meta.php:459 msgid "Activate reset password" -msgstr "" +msgstr "Activate reset password" #: ../../include/functions_config.php:310 #: ../../enterprise/godmode/setup/setup_auth.php:51 @@ -23135,7 +23206,7 @@ msgstr "" #: ../../enterprise/godmode/setup/setup_auth.php:679 #: ../../enterprise/meta/include/functions_meta.php:632 msgid "Autocreate profile" -msgstr "Autocreate profile" +msgstr "Automatically create profile" #: ../../include/functions_config.php:312 #: ../../enterprise/godmode/setup/setup_auth.php:57 @@ -23143,7 +23214,7 @@ msgstr "Autocreate profile" #: ../../enterprise/godmode/setup/setup_auth.php:685 #: ../../enterprise/meta/include/functions_meta.php:642 msgid "Autocreate profile group" -msgstr "Autocreate profile group" +msgstr "Automatically create profile group" #: ../../include/functions_config.php:314 #: ../../enterprise/godmode/setup/setup_auth.php:64 @@ -23151,13 +23222,13 @@ msgstr "Autocreate profile group" #: ../../enterprise/godmode/setup/setup_auth.php:692 #: ../../enterprise/meta/include/functions_meta.php:652 msgid "Autocreate profile tags" -msgstr "Autocreate profile tags" +msgstr "Automatically create profile tags" #: ../../include/functions_config.php:316 #: ../../enterprise/godmode/setup/setup_auth.php:801 #: ../../enterprise/meta/include/functions_meta.php:662 msgid "Autocreate blacklist" -msgstr "Autocreate blacklist" +msgstr "Automatically create blacklist" #: ../../include/functions_config.php:319 #: ../../enterprise/godmode/setup/setup_auth.php:809 @@ -23175,13 +23246,13 @@ msgstr "Active directory port" #: ../../enterprise/godmode/setup/setup_auth.php:664 #: ../../enterprise/meta/include/functions_meta.php:724 msgid "Advanced Config AD" -msgstr "Advanced Config AD" +msgstr "Advanced Configuration AD" #: ../../include/functions_config.php:327 #: ../../enterprise/godmode/setup/setup_auth.php:101 #: ../../enterprise/meta/include/functions_meta.php:764 msgid "Advanced Config LDAP" -msgstr "" +msgstr "Advanced Configuration LDAP" #: ../../include/functions_config.php:329 #: ../../enterprise/godmode/setup/setup_auth.php:828 @@ -23199,25 +23270,25 @@ msgstr "Advanced Permisions AD" #: ../../enterprise/godmode/setup/setup_auth.php:127 #: ../../enterprise/meta/include/functions_meta.php:754 msgid "Advanced Permissions LDAP" -msgstr "" +msgstr "Advanced Permissions LDAP" #: ../../include/functions_config.php:353 #: ../../enterprise/godmode/setup/setup_auth.php:96 #: ../../enterprise/meta/include/functions_meta.php:891 msgid "Login user attribute" -msgstr "" +msgstr "Login user attribute" #: ../../include/functions_config.php:355 #: ../../enterprise/godmode/setup/setup_auth.php:89 #: ../../enterprise/meta/include/functions_meta.php:901 msgid "LDAP function" -msgstr "" +msgstr "LDAP function" #: ../../include/functions_config.php:359 #: ../../enterprise/godmode/setup/setup_auth.php:77 #: ../../enterprise/meta/include/functions_meta.php:877 msgid "Save Password" -msgstr "" +msgstr "Save password" #: ../../include/functions_config.php:366 #: ../../enterprise/godmode/setup/setup_auth.php:595 @@ -23250,7 +23321,7 @@ msgstr "Database name" #: ../../enterprise/godmode/setup/setup_auth.php:626 #: ../../enterprise/meta/include/functions_meta.php:1019 msgid "Integria host" -msgstr "Integria host" +msgstr "Integria IMS host" #: ../../include/functions_config.php:387 msgid "Saml path" @@ -23263,11 +23334,11 @@ msgstr "Session timeout" #: ../../include/functions_config.php:417 msgid "Max. days before autodisable deletion" -msgstr "Max. days before autodisable deletion" +msgstr "Max. days before autodisabled deletion" #: ../../include/functions_config.php:419 msgid "Item limit for realtime reports)" -msgstr "Item limit for realtime reports" +msgstr "Item limit for real-time reports" #: ../../include/functions_config.php:435 msgid "Big Operatiopn Step to purge old data" @@ -23303,59 +23374,59 @@ msgstr "Custom logo login" #: ../../include/functions_config.php:508 #: ../../enterprise/meta/include/functions_meta.php:1265 msgid "Custom splash login" -msgstr "" +msgstr "Custom splash login" #: ../../include/functions_config.php:510 #: ../../enterprise/meta/include/functions_meta.php:1275 msgid "Custom title1 login" -msgstr "" +msgstr "Custom title1 login" #: ../../include/functions_config.php:512 #: ../../enterprise/meta/include/functions_meta.php:1285 msgid "Custom title2 login" -msgstr "" +msgstr "Custom title2 login" #: ../../include/functions_config.php:517 #: ../../include/functions_config.php:535 msgid "Custom Docs url" -msgstr "" +msgstr "Custom Docs URL" #: ../../include/functions_config.php:519 #: ../../include/functions_config.php:537 msgid "Custom support url" -msgstr "" +msgstr "Custom support URL" #: ../../include/functions_config.php:522 msgid "Custom logo metaconsole" -msgstr "" +msgstr "Custom logo Metaconsole" #: ../../include/functions_config.php:524 msgid "Custom logo login metaconsole" -msgstr "" +msgstr "Custom login logo for Metaconsole" #: ../../include/functions_config.php:526 msgid "Custom splash login metaconsole" -msgstr "" +msgstr "Custom splash login for Metaconsole" #: ../../include/functions_config.php:528 msgid "Custom title1 login metaconsole" -msgstr "" +msgstr "Custom title1 login for Metaconsole" #: ../../include/functions_config.php:530 msgid "Custom title2 login metaconsole" -msgstr "" +msgstr "Custom title2 login for Metaconsole" #: ../../include/functions_config.php:532 msgid "Login background metaconsole" -msgstr "" +msgstr "Login background for Metaconsole" #: ../../include/functions_config.php:542 msgid "Default line favourite_view for the Visual Console" -msgstr "" +msgstr "Default line favourite_view for the Visual Console" #: ../../include/functions_config.php:544 msgid "Default line menu items for the Visual Console" -msgstr "" +msgstr "Default line menu items for the Visual Console" #: ../../include/functions_config.php:563 msgid "Show units in values report" @@ -23363,7 +23434,7 @@ msgstr "Show units in values report" #: ../../include/functions_config.php:569 msgid "visual_animation" -msgstr "" +msgstr "visual_animation" #: ../../include/functions_config.php:571 msgid "Fixed graph" @@ -23383,11 +23454,11 @@ msgstr "Default module chart type" #: ../../include/functions_config.php:591 msgid "Default type of interface charts." -msgstr "Default type of interface charts." +msgstr "Default type of interface charts" #: ../../include/functions_config.php:593 msgid "Default show only average or min and max" -msgstr "Default show only average or min and max" +msgstr "Only avg, min and max are displayed by default" #: ../../include/functions_config.php:598 #: ../../include/functions_config.php:1796 @@ -23409,7 +23480,7 @@ msgstr "Default show only average or min and max" #: ../../enterprise/include/functions_reporting_pdf.php:1746 #: ../../enterprise/include/functions_reporting_pdf.php:2149 msgid "Fail" -msgstr "Fail" +msgstr "Error" #: ../../include/functions_config.php:602 msgid "Display lateral menus with left click" @@ -23425,7 +23496,7 @@ msgstr "Default percentile" #: ../../include/functions_config.php:614 msgid "Default full scale (TIP)" -msgstr "" +msgstr "Default full scale (TIP)" #: ../../include/functions_config.php:635 msgid "Add the custom post process" @@ -23442,21 +23513,21 @@ msgstr "Custom report info" #: ../../include/functions_config.php:739 msgid "IP ElasticSearch server" -msgstr "" +msgstr "IP ElasticSearch server" #: ../../include/functions_config.php:741 msgid "Port ElasticSearch server" -msgstr "" +msgstr "Port ElasticSearch server" #: ../../include/functions_config.php:743 #: ../../enterprise/godmode/setup/setup_log_collector.php:50 msgid "Number of logs viewed" -msgstr "" +msgstr "Number of logs viewed" #: ../../include/functions_config.php:745 #: ../../enterprise/godmode/setup/setup_log_collector.php:52 msgid "Days to purge old information" -msgstr "" +msgstr "Days to purge old information" #: ../../include/functions_config.php:749 #: ../../enterprise/godmode/setup/setup_history.php:45 @@ -23513,7 +23584,7 @@ msgstr "eHorus request timeout" #: ../../include/functions_config.php:785 msgid "eHorus id custom field" -msgstr "eHorus id custom field" +msgstr "eHorus ID custom field" #: ../../include/functions_config.php:797 #, php-format @@ -23525,14 +23596,14 @@ msgstr "Updated failed. The following values could not be updated: %s" #: ../../enterprise/meta/include/process_reset_pass.php:108 #: ../../enterprise/meta/include/reset_pass.php:97 msgid "PANDORA FMS NEXT GENERATION" -msgstr "" +msgstr "PANDORA FMS NEXT GENERATION" #: ../../include/functions_config.php:1232 #: ../../enterprise/meta/general/login_page.php:178 #: ../../enterprise/meta/include/process_reset_pass.php:116 #: ../../enterprise/meta/include/reset_pass.php:105 msgid "METACONSOLE" -msgstr "" +msgstr "METACONSOLE" #: ../../include/functions_config.php:1954 msgid "" @@ -23564,15 +23635,15 @@ msgstr "Not subscribed to the newsletter" #: ../../include/functions_config.php:1974 msgid "Default password for \"Admin\" user has not been changed." -msgstr "The default password for the \"Admin\" user hasn't been changed." +msgstr "The default password for the \"Admin\" user has not been changed." #: ../../include/functions_config.php:1975 msgid "" "Please change the default password because is a common vulnerability " "reported." msgstr "" -"Please change the default password. It's a commonly reported security issue " -"to not do so." +"Please change the default password. It is a commonly reported security issue " +"not to do so." #: ../../include/functions_config.php:1981 msgid "You can not get updates until you renew the license." @@ -23592,19 +23663,19 @@ msgstr "" #: ../../include/functions_config.php:2000 msgid "Remote configuration directory is not readble for the console" -msgstr "Remote configuration directory is unreadable for the console." +msgstr "Remote configuration directory is unreadable for the console" #: ../../include/functions_config.php:2006 #: ../../include/functions_config.php:2013 msgid "Remote configuration directory is not writtable for the console" -msgstr "Remote configuration directory is not writtable by the console" +msgstr "Remote configuration directory is not writable by the console" #: ../../include/functions_config.php:2024 msgid "" "There are too much files in attachment directory. This is not fatal, but you " "should consider cleaning up your attachment directory manually" msgstr "" -"there are too many files in the attachment directory. This is not a fatal " +"There are too many files in the attachment directory. This is not a fatal " "issue, but you should consider cleaning your attachment directory manually." #: ../../include/functions_config.php:2024 @@ -23622,39 +23693,40 @@ msgid "" "how to execute this maintance process (pandora_db.pl) and enable it as soon " "as possible" msgstr "" -"Your database is not maintained correctly. It seems that more than 48hrs " -"have passed without proper maintenance. Please review Pandora FMS' documents " +"Your database is not maintained correctly. It seems that more than 48 hours " +"have passed without proper maintenance. Please review Pandora FMS documents " "on how to perform this maintenance process (pandora_db.pl) and enable it as " "soon as possible." #: ../../include/functions_config.php:2043 msgid "Database maintance problem" -msgstr "Database maintenance issue." +msgstr "Database maintenance issue" #: ../../include/functions_config.php:2049 msgid "" "Your defined font doesnt exist or is not defined. Please check font " "parameters in your config" msgstr "" -"Your defined font doesnt exist or is not defined. Please check font " -"parameters in your config" +"Your selected font does not exist or is not defined. Please check the font " +"parameters in your configuration." #: ../../include/functions_config.php:2050 msgid "Default font doesnt exist" -msgstr "The default font doesn't exist." +msgstr "The default font does not exist." #: ../../include/functions_config.php:2055 msgid "You need to restart server after altering this configuration setting." msgstr "" -"You'll need to restart the server after modifying this configuration setting." +"You will need to restart the server after modifying this configuration " +"setting." #: ../../include/functions_config.php:2056 msgid "" "Event storm protection is activated. No events will be generated during this " "mode." msgstr "" -"Event storm protection is activated. No events will be generated during this " -"mode." +"Event Storm protection is enabled. No events will be generated as long as " +"this mode is active." #: ../../include/functions_config.php:2063 msgid "" @@ -23664,7 +23736,7 @@ msgid "" msgstr "" "Your Pandora FMS has the \"develop_bypass\" mode enabled. This is a " "developer mode and should be disabled in a production system. This value is " -"written in the main index.php file" +"written into the main index.php file." #: ../../include/functions_config.php:2064 msgid "Developer mode is enabled" @@ -23686,7 +23758,7 @@ msgstr "" #: ../../include/functions_config.php:2080 msgid "New update of Pandora Console" -msgstr "New Pandora Console update" +msgstr "New Pandora FMS Console update" #: ../../include/functions_config.php:2094 msgid "" @@ -23694,8 +23766,8 @@ msgid "" "safe_mode = Off (Dont forget restart apache process after changes)" msgstr "" "In order to disable it, please go to your PHP configuration file (php.ini) " -"and set the 'safe_mode' option to 'Off'. Please don't forget to restart the " -"apache process after the changes are complete." +"and set the 'safe_mode' option to 'Off'. Please do not forget to restart the " +"Apache process after the changes are completed." #: ../../include/functions_config.php:2095 msgid "PHP safe mode is enabled. Some features may not properly work." @@ -23721,7 +23793,7 @@ msgid "" msgstr "" "Please, change this in your PHP configuration file (php.ini) or contact your " "administrator (remember to restart the Apache process after performing " -"changes)" +"changes)." #: ../../include/functions_config.php:2101 #: ../../include/functions_config.php:2107 @@ -23750,19 +23822,19 @@ msgid "" "administrator" msgstr "" "Please, change it in your PHP configuration file (php.ini) or contact the " -"administrator" +"administrator." #: ../../include/functions_config.php:2128 msgid "" "Variable disable_functions containts functions system() or exec(), in PHP " "configuration file (php.ini)" msgstr "" -"The variable disable_functions contains the system () or exec () functions " -"in the PHP configuration file (php.ini)" +"The variable disable_functions contains the system() or exec() functions in " +"the PHP configuration file (php.ini)." #: ../../include/functions_config.php:2129 msgid "Problems with disable functions in PHP.INI" -msgstr "Problems with disable functions in PHP.INI" +msgstr "Problems with disabling functions in PHP.INI" #: ../../include/functions_ui.php:230 msgid "Information" @@ -23786,12 +23858,12 @@ msgid "" "Is possible that this view uses part of information which your user has not " "access" msgstr "" -"It's possible that this view uses a part of the information to which your " -"user doesn't have access." +"It is possible that this view uses a part of the information to which your " +"user does not have access." #: ../../include/functions_ui.php:683 msgid "Software" -msgstr "" +msgstr "Software" #: ../../include/functions_ui.php:1055 msgid "The alert would fire when the value is over <span id=\"max\"></span>" @@ -23811,7 +23883,7 @@ msgstr "the Flexible Monitoring System" #: ../../include/functions_ui.php:1681 ../../include/functions_ui.php:1707 #, php-format msgid "Total items: %s" -msgstr "Total items : %s" +msgstr "Total items: %s" #: ../../include/functions_ui.php:2024 msgid "Unknown type" @@ -23896,7 +23968,7 @@ msgid "" msgstr "" "For security reasons, <i>config.php</i> must have restrictive permissions, " "and \"other\" users\n" -"\t\t\tshould not read it or write to it. It should be written only for " +"\t\t\tshould not read it or write to it. It should be written only by the " "owner\n" "\t\t\t(usually www-data or http daemon user), normal operation is not " "possible until you change\n" @@ -23906,7 +23978,7 @@ msgstr "" #: ../../include/functions_db.php:90 #, php-format msgid "Error connecting to database %s at %s." -msgstr "Error on connecting to database %s at %s." +msgstr "Error connecting to database %s at %s." #: ../../include/functions_db.php:1564 msgid "Database debug" @@ -23947,7 +24019,7 @@ msgstr "Could not obtain an internet connection" #: ../../include/functions_update_manager.php:460 #: ../../enterprise/include/functions_update_manager.php:144 msgid "Server not found." -msgstr "Server not found." +msgstr "Server not found" #: ../../include/functions_update_manager.php:382 msgid "Update to the last version" @@ -23965,11 +24037,11 @@ msgstr "Remote server error on newsletter request" #: ../../include/functions_update_manager.php:502 msgid "E-mail successfully subscribed to newsletter." -msgstr "E-mail successfully subscribed to newsletter." +msgstr "Email successfully subscribed to newsletter" #: ../../include/functions_update_manager.php:504 msgid "E-mail has already subscribed to newsletter." -msgstr "E-mail has already subscribed to newsletter." +msgstr "Email is already subscribed to the newsletter" #: ../../include/functions_update_manager.php:506 #: ../../include/functions_update_manager.php:546 @@ -23978,23 +24050,23 @@ msgstr "Update manager returns error code: " #: ../../include/functions_update_manager.php:541 msgid "Pandora successfully subscribed with UID: " -msgstr "Pandora successfully subscribed with UID: " +msgstr "Pandora FMS successfully subscribed with UID: " #: ../../include/functions_update_manager.php:543 msgid "Unsuccessful subscription." -msgstr "Unsuccessful subscription." +msgstr "Unsuccessful subscription" #: ../../include/functions_update_manager.php:670 msgid "Failed extracting the package to temp directory." -msgstr "Failed to extract the package to the temp directory." +msgstr "Error extracting the package to the temp directory" #: ../../include/functions_update_manager.php:709 msgid "Failed the copying of the files." -msgstr "Failed to copy the files." +msgstr "Error copying the files" #: ../../include/functions_update_manager.php:725 msgid "Package extracted successfully." -msgstr "Package extracted successfully." +msgstr "Package extracted successfully" #: ../../include/functions_events.php:880 #: ../../operation/agentes/tactical.php:188 @@ -24039,7 +24111,7 @@ msgstr "Event graph by agent" #: ../../include/functions_events.php:1135 msgid "Going to unknown" -msgstr "Going to unknown" +msgstr "Changing to unknown" #: ../../include/functions_events.php:1141 msgid "Alert manually validated" @@ -24047,19 +24119,19 @@ msgstr "Alert manually validated" #: ../../include/functions_events.php:1144 msgid "Going from critical to warning" -msgstr "Passing from critical to warning status" +msgstr "Changing from critical to warning status" #: ../../include/functions_events.php:1148 msgid "Going down to critical state" -msgstr "Going down to critical status" +msgstr "Changing down to critical status" #: ../../include/functions_events.php:1152 msgid "Going up to normal state" -msgstr "Going up to normal status" +msgstr "Changing up to normal status" #: ../../include/functions_events.php:1155 msgid "Going down from normal to warning" -msgstr "Falling from normal to warning status" +msgstr "Changing from normal to warning status" #: ../../include/functions_events.php:1161 #: ../../include/functions_graph.php:3630 @@ -24125,7 +24197,7 @@ msgstr "In process" #: ../../include/functions_events.php:1511 msgid "Not Validated" -msgstr "Not Validated" +msgstr "Not validated" #: ../../include/functions_events.php:1666 msgid "Change owner" @@ -24186,7 +24258,7 @@ msgstr "Go to data overview" #: ../../include/functions_events.php:2342 #, php-format msgid "Invalid custom data: %s" -msgstr "Invalid custom data : %s" +msgstr "Invalid custom data: %s" #: ../../include/functions_events.php:2443 #: ../../include/functions_events.php:3624 @@ -24220,7 +24292,7 @@ msgstr "There are no comments." #: ../../include/functions_events.php:2808 #: ../../include/functions_reporting_html.php:878 msgid "Pandora System" -msgstr "Pandora System" +msgstr "Pandora FMS System" #: ../../include/functions_events.php:3253 #: ../../include/functions_events.php:3258 @@ -24228,18 +24300,18 @@ msgstr "Pandora System" #: ../../operation/snmpconsole/snmp_view.php:768 #: ../../operation/snmpconsole/snmp_view.php:1030 msgid "Not validated" -msgstr "Unvalidated" +msgstr "Not validated" #: ../../include/functions_events.php:3629 #: ../../mobile/operation/events.php:108 #: ../../operation/events/events.build_table.php:155 msgid "Event Name" -msgstr "Event Name" +msgstr "Event name" #: ../../include/functions_events.php:3667 #: ../../operation/events/events.build_table.php:198 msgid "Agent Module" -msgstr "Agent Module" +msgstr "Agent module" #: ../../include/functions_events.php:3698 #: ../../operation/events/events.build_table.php:235 @@ -24286,6 +24358,8 @@ msgid "" "Could not draw pie with labels contained inside canvas. Resize widget to " "500px width minimum" msgstr "" +"Could not draw pie chart with labels contained inside canvas. Resize widget " +"to 500px width minimum." #: ../../include/functions_visual_map.php:1826 msgid "Last value: " @@ -24301,21 +24375,21 @@ msgstr "Modules successfully added to the layout." #: ../../include/functions_visual_map.php:3060 msgid "Agents successfully added to layout" -msgstr "Agents successfully added to the layout." +msgstr "Agents successfully added to the layout" #: ../../include/functions_visual_map.php:3435 msgid "Cannot load the visualmap" -msgstr "Cannot load the visual map." +msgstr "Cannot load the visual map" #: ../../include/functions_visual_map.php:3906 #: ../../include/functions_visual_map_editor.php:62 #: ../../include/functions_visual_map_editor.php:873 msgid "Clock" -msgstr "" +msgstr "Clock" #: ../../include/functions_visual_map.php:3910 msgid "Bars graph" -msgstr "" +msgstr "Bars graph" #: ../../include/functions_visual_map.php:3918 msgid "Percentile bar" @@ -24323,12 +24397,12 @@ msgstr "Percentile bar" #: ../../include/functions_visual_map.php:3922 msgid "Circular progress bar" -msgstr "" +msgstr "Circular progress bar" #: ../../include/functions_visual_map.php:3926 #: ../../include/functions_visual_map_editor.php:515 msgid "Circular progress bar (interior)" -msgstr "" +msgstr "Circular progress bar (interior)" #: ../../include/functions_visual_map.php:3930 msgid "Static graph" @@ -24340,7 +24414,7 @@ msgid "" "\t\t\t\t\ta text to replace '(_VALUE_)' and the value of the module will be " "printed at the end." msgstr "" -"To use 'label'field, you should write\n" +"In order to use the 'label' field, you should write\n" "\t\t\t\t\ta text to replace '(_VALUE_)' and the value of the module will be " "printed at the end." @@ -24355,40 +24429,41 @@ msgstr "Outline width" #: ../../include/functions_visual_map_editor.php:142 msgid "Fill color" -msgstr "Fill color" +msgstr "Fill colour" #: ../../include/functions_visual_map_editor.php:193 msgid "" "Scroll the mouse wheel over the label editor to change the background color" msgstr "" +"Scroll the mouse wheel over the label editor to change the background color" #: ../../include/functions_visual_map_editor.php:212 msgid "Clock animation" -msgstr "" +msgstr "Clock animation" #: ../../include/functions_visual_map_editor.php:214 msgid "Simple analogic" -msgstr "" +msgstr "Simple analogic" #: ../../include/functions_visual_map_editor.php:215 msgid "Simple digital" -msgstr "" +msgstr "Simple digital" #: ../../include/functions_visual_map_editor.php:221 msgid "Time format" -msgstr "" +msgstr "Time format" #: ../../include/functions_visual_map_editor.php:223 msgid "Only time" -msgstr "" +msgstr "Only time" #: ../../include/functions_visual_map_editor.php:224 msgid "Time and date" -msgstr "" +msgstr "Time and date" #: ../../include/functions_visual_map_editor.php:241 msgid "Time zone" -msgstr "" +msgstr "Time zone" #: ../../include/functions_visual_map_editor.php:263 msgid "Enable link" @@ -24408,39 +24483,39 @@ msgstr "Transparent" #: ../../include/functions_visual_map_editor.php:294 msgid "Grid color" -msgstr "" +msgstr "Grid colour" #: ../../include/functions_visual_map_editor.php:404 msgid "Data image" -msgstr "" +msgstr "Data image" #: ../../include/functions_visual_map_editor.php:411 msgid "Resume data color" -msgstr "" +msgstr "Resume data colour" #: ../../include/functions_visual_map_editor.php:419 msgid "24h" -msgstr "" +msgstr "24h" #: ../../include/functions_visual_map_editor.php:420 msgid "8h" -msgstr "" +msgstr "8h" #: ../../include/functions_visual_map_editor.php:421 msgid "2h" -msgstr "" +msgstr "2h" #: ../../include/functions_visual_map_editor.php:422 msgid "1h" -msgstr "" +msgstr "1h" #: ../../include/functions_visual_map_editor.php:426 msgid "Max. Time" -msgstr "" +msgstr "Max. Time" #: ../../include/functions_visual_map_editor.php:480 msgid "Original Size" -msgstr "Original Size" +msgstr "Original size" #: ../../include/functions_visual_map_editor.php:487 msgid "Aspect ratio" @@ -24452,15 +24527,15 @@ msgstr "Proportional width" #: ../../include/functions_visual_map_editor.php:494 msgid "Height proportional" -msgstr "Proportional Height" +msgstr "Proportional height" #: ../../include/functions_visual_map_editor.php:515 msgid "Circular porgress bar" -msgstr "" +msgstr "Circular porgress bar" #: ../../include/functions_visual_map_editor.php:552 msgid "Element color" -msgstr "" +msgstr "Element colour" #: ../../include/functions_visual_map_editor.php:561 msgid "Label color" @@ -24468,40 +24543,40 @@ msgstr "Label colour" #: ../../include/functions_visual_map_editor.php:582 msgid "Show statistics" -msgstr "" +msgstr "Show statistics" #: ../../include/functions_visual_map_editor.php:589 msgid "Always show on top" -msgstr "" +msgstr "Always show on top" #: ../../include/functions_visual_map_editor.php:605 msgid "Vertical" -msgstr "" +msgstr "Vertical" #: ../../include/functions_visual_map_editor.php:605 msgid "Horizontal" -msgstr "" +msgstr "Horizontal" #: ../../include/functions_visual_map_editor.php:673 msgid "For use the original image file size, set 0 width and 0 height." msgstr "" -"In order to use the original image's file size, set width and height to 0." +"In order to use the original image file size, set width and height to 0." #: ../../include/functions_visual_map_editor.php:711 msgid "Map linked weight" -msgstr "" +msgstr "Map link weight" #: ../../include/functions_visual_map_editor.php:722 msgid "By default" -msgstr "" +msgstr "By default" #: ../../include/functions_visual_map_editor.php:728 msgid "Lines haven't advanced options" -msgstr "Lines haven't advanced options" +msgstr "Lines do not have advanced options" #: ../../include/functions_visual_map_editor.php:737 msgid "Restrict access to group" -msgstr "" +msgstr "Restrict access to group" #: ../../include/functions_visual_map_editor.php:740 msgid "" @@ -24509,6 +24584,9 @@ msgid "" "users who have access to selected group. This is also used on calculating " "child visual consoles." msgstr "" +"If selected, it restricts visualization of this item in the visual console " +"to users who have access to the selected group. This is also used when " +"calculating child visual consoles." #: ../../include/functions_visual_map_editor.php:767 msgid "Click start point<br />of the line" @@ -24516,15 +24594,15 @@ msgstr "Click the starting point<br />of the line" #: ../../include/functions_visual_map_editor.php:772 msgid "Click end point<br />of the line" -msgstr "Click end point<br />of the line" +msgstr "Click the end point<br />of the line" #: ../../include/functions_visual_map_editor.php:867 msgid "Serialized pie graph" -msgstr "" +msgstr "Serialized pie graph" #: ../../include/functions_visual_map_editor.php:868 msgid "Bars Graph" -msgstr "" +msgstr "Bars graph" #: ../../include/functions_visual_map_editor.php:889 msgid "Show grid" @@ -24540,7 +24618,7 @@ msgstr "Copy item" #: ../../include/functions_visual_map_editor.php:920 msgid "No image or name defined." -msgstr "No image or name defined." +msgstr "No image or name defined" #: ../../include/functions_visual_map_editor.php:922 msgid "No label defined." @@ -24548,43 +24626,43 @@ msgstr "No label defined" #: ../../include/functions_visual_map_editor.php:924 msgid "No image defined." -msgstr "No image defined." +msgstr "No image defined" #: ../../include/functions_visual_map_editor.php:926 msgid "No process defined." -msgstr "No process defined." +msgstr "No process defined" #: ../../include/functions_visual_map_editor.php:928 msgid "No Max value defined." -msgstr "No Max value defined." +msgstr "No max value defined" #: ../../include/functions_visual_map_editor.php:930 msgid "No width defined." -msgstr "No width defined." +msgstr "No width defined" #: ../../include/functions_visual_map_editor.php:932 msgid "No height defined." -msgstr "" +msgstr "No height defined" #: ../../include/functions_visual_map_editor.php:934 msgid "No period defined." -msgstr "No period defined." +msgstr "No period defined" #: ../../include/functions_visual_map_editor.php:936 msgid "No agent defined." -msgstr "No agent defined." +msgstr "No agent defined" #: ../../include/functions_visual_map_editor.php:938 msgid "No module defined." -msgstr "No module defined." +msgstr "No module defined" #: ../../include/functions_visual_map_editor.php:941 msgid "Successfully save the changes." -msgstr "Changes successfully saved." +msgstr "Changes successfully saved" #: ../../include/functions_visual_map_editor.php:943 msgid "Could not be save" -msgstr "Could not be saved." +msgstr "Could not be saved" #: ../../include/functions_filemanager.php:172 #: ../../include/functions_filemanager.php:242 @@ -24601,7 +24679,7 @@ msgstr "Upload error" #: ../../include/functions_filemanager.php:261 #: ../../include/functions_filemanager.php:326 msgid "Upload correct" -msgstr "Upload correct" +msgstr "Uploaded successfully" #: ../../include/functions_filemanager.php:206 msgid "" @@ -24618,7 +24696,7 @@ msgstr "Error creating file" #: ../../include/functions_filemanager.php:267 #: ../../include/functions_filemanager.php:362 msgid "Error creating file with empty name" -msgstr "Error creating a file with no name." +msgstr "Error creating a file with no name" #: ../../include/functions_filemanager.php:312 msgid "Attach error" @@ -24628,7 +24706,7 @@ msgstr "Attachment error" #: ../../enterprise/godmode/agentes/collections.editor.php:142 #: ../../enterprise/godmode/agentes/collections.editor.php:305 msgid "Security error." -msgstr "Security error." +msgstr "Security error" #: ../../include/functions_filemanager.php:357 msgid "Directory created" @@ -24645,7 +24723,7 @@ msgstr "Deleted" #: ../../include/functions_filemanager.php:550 #, php-format msgid "Directory %s doesn't exist!" -msgstr "Directory %s doesn't exist!" +msgstr "Directory %s does not exist!" #: ../../include/functions_filemanager.php:565 msgid "Index of images" @@ -24657,7 +24735,8 @@ msgstr "Parent directory" #: ../../include/functions_filemanager.php:632 msgid "The zip upload in this dir, easy to upload multiple files." -msgstr "The zip uploads in this dir, easy to upload multiple files." +msgstr "" +"Upload file in zip format in this directory, useful to upload multiple files" #: ../../include/functions_filemanager.php:636 msgid "Decompress" @@ -24687,11 +24766,11 @@ msgstr "Text file" #: ../../include/functions_filemanager.php:727 msgid "This file could be executed by any user" -msgstr "" +msgstr "This file could be executed by any user." #: ../../include/functions_filemanager.php:728 msgid "Make sure it can't perform dangerous tasks" -msgstr "" +msgstr "Make sure it cannot perform dangerous tasks." #: ../../include/functions_filemanager.php:796 msgid "Create directory" @@ -24718,11 +24797,11 @@ msgstr "Agent hierarchy" #: ../../include/functions_graph.php:4617 #: ../../include/functions_reports.php:564 msgid "Avg. Value" -msgstr "Avg. Value" +msgstr "Avg. value" #: ../../include/functions_graph.php:807 msgid "Units. Value" -msgstr "Unit Value" +msgstr "Unit value" #: ../../include/functions_graph.php:890 #: ../../include/functions_graph.php:1917 @@ -24764,7 +24843,7 @@ msgstr " of module " #: ../../include/functions_graph.php:2282 #: ../../include/functions_graph.php:2284 msgid "summatory" -msgstr "" +msgstr "summation" #: ../../include/functions_graph.php:2222 #: ../../include/functions_graph.php:2225 @@ -24779,7 +24858,7 @@ msgstr "" #: ../../include/functions_graph.php:2322 #: ../../include/functions_graph.php:2324 msgid "average" -msgstr "" +msgstr "average" #: ../../include/functions_graph.php:2589 msgid "Not fired alerts" @@ -24816,7 +24895,7 @@ msgstr "Month" #: ../../include/functions_graph.php:3063 msgid "History db" -msgstr "History db" +msgstr "History DB" #: ../../include/functions_graph.php:3254 #: ../../include/functions_incidents.php:29 @@ -24851,12 +24930,12 @@ msgstr "Very serious" #: ../../include/functions_graph.php:3281 #: ../../include/functions_graph.php:3293 msgid "Open incident" -msgstr "Open incident" +msgstr "Open issue" #: ../../include/functions_graph.php:3282 #: ../../include/functions_graph.php:3295 msgid "Closed incident" -msgstr "Closed incident" +msgstr "Closed issue" #: ../../include/functions_graph.php:3283 #: ../../include/functions_graph.php:3297 @@ -24890,15 +24969,15 @@ msgstr "Security error. Please contact your administrator." #: ../../include/get_file.php:56 msgid "File is missing in disk storage. Please contact the administrator." msgstr "" -"The file is missing in the disk's storage. Please contact your administrator." +"The file is missing from the disk storage. Please contact your administrator." #: ../../include/functions_groups.php:63 msgid "Alert Actions" -msgstr "Alert Actions" +msgstr "Alert actions" #: ../../include/functions_groups.php:78 msgid "Alert Templates" -msgstr "Alert Templates" +msgstr "Alert templates" #: ../../include/functions_groups.php:106 #: ../../include/functions_groups.php:163 @@ -24971,19 +25050,19 @@ msgstr "Unknown agents" #: ../../operation/agentes/ver_agente.php:848 #: ../../enterprise/operation/agentes/ver_agente.php:152 msgid "Alerts fired" -msgstr "Alerts fired" +msgstr "Triggered alerts" #: ../../include/functions_groups.php:2143 msgid "Show branch children" -msgstr "Show branch son" +msgstr "Show branch children" #: ../../include/functions_groups.php:2172 msgid "" "You can not delete the last group in Pandora. A common installation must has " "almost one group." msgstr "" -"You cannot delete the last group in Pandora. A common installation must have " -"at least one group." +"You cannot delete the last group in Pandora FMS. A common installation must " +"have at least one group." #: ../../include/functions_html.php:835 msgid "weeks" @@ -25004,27 +25083,27 @@ msgstr "Type at least two characters to search the module." #: ../../include/functions_incidents.php:88 #: ../../include/functions_incidents.php:107 msgid "Active incidents" -msgstr "Active incidents" +msgstr "Active issues" #: ../../include/functions_incidents.php:89 #: ../../include/functions_incidents.php:110 msgid "Active incidents, with comments" -msgstr "Active incidents, with comments" +msgstr "Active issues, with comments" #: ../../include/functions_incidents.php:90 #: ../../include/functions_incidents.php:113 msgid "Rejected incidents" -msgstr "Rejected incidents" +msgstr "Rejected issues" #: ../../include/functions_incidents.php:91 #: ../../include/functions_incidents.php:116 msgid "Expired incidents" -msgstr "Expired incidents" +msgstr "Expired issues" #: ../../include/functions_incidents.php:92 #: ../../include/functions_incidents.php:119 msgid "Closed incidents" -msgstr "Closed incidents" +msgstr "Closed issues" #: ../../include/functions_maps.php:34 #: ../../include/functions_networkmap.php:1678 @@ -25073,7 +25152,7 @@ msgstr "Manage network map" #: ../../include/functions_menu.php:498 msgid "Builder visual console" -msgstr "Builder visual console" +msgstr "Visual console editor" #: ../../include/functions_menu.php:500 msgid "Administration events" @@ -25085,7 +25164,7 @@ msgstr "View reporting" #: ../../include/functions_menu.php:503 msgid "Graph viewer" -msgstr "" +msgstr "Graph viewer" #: ../../include/functions_menu.php:505 msgid "Manage custom graphs" @@ -25093,27 +25172,27 @@ msgstr "Manage custom graphs" #: ../../include/functions_menu.php:506 msgid "View graph containers" -msgstr "" +msgstr "View graph containers" #: ../../include/functions_menu.php:507 msgid "Manage graph containers" -msgstr "" +msgstr "Manage graph containers" #: ../../include/functions_menu.php:508 msgid "View graph templates" -msgstr "" +msgstr "View graph templates" #: ../../include/functions_menu.php:509 msgid "Manage graph templates" -msgstr "" +msgstr "Manage graph templates" #: ../../include/functions_menu.php:510 msgid "Graph template items" -msgstr "" +msgstr "Graph template items" #: ../../include/functions_menu.php:511 msgid "Graph template wizard" -msgstr "" +msgstr "Graph template wizard" #: ../../include/functions_menu.php:514 msgid "Copy dashboard" @@ -25125,7 +25204,7 @@ msgstr "Manage GIS Maps" #: ../../include/functions_menu.php:519 msgid "Incidents statistics" -msgstr "Incident statistics" +msgstr "Issue statistics" #: ../../include/functions_menu.php:520 msgid "Manage messages" @@ -25185,7 +25264,7 @@ msgstr "SNMP console" #: ../../include/functions_menu.php:540 msgid "Manage incident" -msgstr "Manage incidents" +msgstr "Manage issues" #: ../../include/functions_menu.php:592 msgid "Administration" @@ -25280,7 +25359,7 @@ msgstr "Data table" #: ../../include/functions_netflow.php:1035 msgid "Circular mesh" -msgstr "Circular Mesh" +msgstr "Circular mesh" #: ../../include/functions_netflow.php:1036 #: ../../include/functions_netflow.php:1390 @@ -25399,7 +25478,7 @@ msgstr "Source IP" #: ../../include/functions_netflow.php:1664 msgid "Src port" -msgstr "Source Port" +msgstr "Src port" #: ../../include/functions_planned_downtimes.php:560 msgid "Succesful stopped the Downtime" @@ -25407,25 +25486,25 @@ msgstr "Downtime has been stopped successfully" #: ../../include/functions_planned_downtimes.php:561 msgid "Unsuccesful stopped the Downtime" -msgstr "Downtime could not be stopped successfully" +msgstr "Downtime could not be stopped" #: ../../include/functions_planned_downtimes.php:660 #, php-format msgid "Enabled %s elements from the downtime" -msgstr "Enabled %s elements from the downtime" +msgstr "%s elements enabled from the downtime" #: ../../include/functions_planned_downtimes.php:785 msgid "This planned downtime are executed now. Can't delete in this moment." msgstr "" -"This planned downtime are executed now. It can't be deleted in this moment." +"This planned downtime is active now. It cannot be deleted at the moment." #: ../../include/functions_planned_downtimes.php:790 msgid "Deleted this planned downtime successfully." -msgstr "Deleted this planned downtime successfully." +msgstr "Planned downtime deleted successfully" #: ../../include/functions_planned_downtimes.php:792 msgid "Problems for deleted this planned downtime." -msgstr "Problems for deleted this planned downtime." +msgstr "Error deleting this planned downtime" #: ../../include/functions_networkmap.php:1675 #: ../../include/functions_networkmap.php:1761 @@ -25478,7 +25557,7 @@ msgstr "Starting OID" #: ../../include/functions_snmp_browser.php:585 msgid "Server to execute" -msgstr "" +msgstr "Server to execute" #: ../../include/functions_snmp_browser.php:588 msgid "Browse" @@ -25502,11 +25581,11 @@ msgstr "Last match" #: ../../include/functions_snmp_browser.php:636 msgid "Expand the tree (can be slow)" -msgstr "Expand the tree (can be slow)" +msgstr "Expand tree (this could take some time)" #: ../../include/functions_snmp_browser.php:638 msgid "Collapse the tree" -msgstr "Collapse the tree" +msgstr "Collapse tree" #: ../../include/functions_snmp_browser.php:657 msgid "SNMP v3 options" @@ -25588,13 +25667,13 @@ msgstr "Global Time" #: ../../enterprise/include/functions_reporting_csv.php:1421 #: ../../enterprise/include/functions_reporting_pdf.php:1357 msgid "Time Total" -msgstr "Time Total" +msgstr "Total time" #: ../../include/functions_reporting_html.php:430 #: ../../enterprise/include/functions_reporting_pdf.php:1358 #: ../../enterprise/include/functions_reporting_pdf.php:1931 msgid "Time Failed" -msgstr "Time Failed" +msgstr "Time in failed status" #: ../../include/functions_reporting_html.php:431 #: ../../include/functions_reporting_html.php:2328 @@ -25602,20 +25681,20 @@ msgstr "Time Failed" #: ../../enterprise/include/functions_reporting_pdf.php:1359 #: ../../enterprise/include/functions_reporting_pdf.php:1932 msgid "Time OK" -msgstr "Time OK" +msgstr "Time in OK status" #: ../../include/functions_reporting_html.php:432 #: ../../enterprise/include/functions_reporting_csv.php:1424 #: ../../enterprise/include/functions_reporting_pdf.php:1360 #: ../../enterprise/include/functions_reporting_pdf.php:1933 msgid "Time Unknown" -msgstr "Time Unknown" +msgstr "Time in unknown status" #: ../../include/functions_reporting_html.php:433 #: ../../enterprise/include/functions_reporting_csv.php:1425 #: ../../enterprise/include/functions_reporting_pdf.php:1361 msgid "Time Not Init" -msgstr "Time Not Init" +msgstr "Time in not initialized status" #: ../../include/functions_reporting_html.php:434 #: ../../enterprise/include/functions_reporting_pdf.php:1362 @@ -25625,19 +25704,19 @@ msgstr "Downtime" #: ../../include/functions_reporting_html.php:459 #: ../../enterprise/include/functions_reporting_pdf.php:1368 msgid "Checks Time" -msgstr "Checks Time" +msgstr "Checks time" #: ../../include/functions_reporting_html.php:460 #: ../../enterprise/include/functions_reporting_csv.php:1427 #: ../../enterprise/include/functions_reporting_pdf.php:1369 msgid "Checks Total" -msgstr "Checks Total" +msgstr "Total number of checks" #: ../../include/functions_reporting_html.php:461 #: ../../enterprise/include/functions_reporting_pdf.php:1370 #: ../../enterprise/include/functions_reporting_pdf.php:1951 msgid "Checks Failed" -msgstr "Checks Failed" +msgstr "Failed checks" #: ../../include/functions_reporting_html.php:462 #: ../../include/functions_reporting_html.php:2371 @@ -25645,14 +25724,14 @@ msgstr "Checks Failed" #: ../../enterprise/include/functions_reporting_pdf.php:1371 #: ../../enterprise/include/functions_reporting_pdf.php:1952 msgid "Checks OK" -msgstr "Checks OK" +msgstr "Checks in OK status" #: ../../include/functions_reporting_html.php:463 #: ../../enterprise/include/functions_reporting_csv.php:1430 #: ../../enterprise/include/functions_reporting_pdf.php:1372 #: ../../enterprise/include/functions_reporting_pdf.php:1953 msgid "Checks Unknown" -msgstr "Checks Unknown" +msgstr "Checks in unknown status" #: ../../include/functions_reporting_html.php:688 #: ../../include/functions_reporting_html.php:2607 @@ -25675,7 +25754,7 @@ msgstr "Unknown" #: ../../enterprise/include/functions_reporting_pdf.php:1589 #: ../../enterprise/include/functions_reporting_pdf.php:1728 msgid "Not Init" -msgstr "Uninitialised" +msgstr "Not initialised" #: ../../include/functions_reporting_html.php:698 #: ../../include/functions_reporting_html.php:2617 @@ -25701,7 +25780,7 @@ msgstr "Ignore time" #: ../../enterprise/include/functions_reporting_pdf.php:977 #: ../../enterprise/include/functions_reporting_pdf.php:1033 msgid "Min Value" -msgstr "Min Value" +msgstr "Minimum value" #: ../../include/functions_reporting_html.php:776 #: ../../include/functions_reporting_html.php:1533 @@ -25712,7 +25791,7 @@ msgstr "Min Value" #: ../../enterprise/include/functions_reporting_pdf.php:1034 #: ../../enterprise/include/functions_reporting_pdf.php:2074 msgid "Average Value" -msgstr "Average Value" +msgstr "Average value" #: ../../include/functions_reporting_html.php:777 #: ../../include/functions_reporting_html.php:1534 @@ -25723,7 +25802,7 @@ msgstr "Average Value" #: ../../enterprise/include/functions_reporting_pdf.php:1035 #: ../../enterprise/include/functions_reporting_pdf.php:2071 msgid "Max Value" -msgstr "Max Value" +msgstr "Maximum value" #: ../../include/functions_reporting_html.php:810 #: ../../include/functions_reporting_html.php:1028 @@ -25785,14 +25864,14 @@ msgstr "%s in %s : CRITICAL" #: ../../enterprise/include/functions_reporting_pdf.php:682 #, php-format msgid "%s in %s : WARNING" -msgstr "%s in %s : WARNING" +msgstr "%s in %s: WARNING" #: ../../include/functions_reporting_html.php:1409 #: ../../enterprise/dashboard/widgets/agent_module.php:371 #: ../../enterprise/include/functions_reporting_pdf.php:691 #, php-format msgid "%s in %s : UNKNOWN" -msgstr "%s in %s : UNKNOWN" +msgstr "%s in %s: UNKNOWN" #: ../../include/functions_reporting_html.php:1420 #: ../../enterprise/dashboard/widgets/agent_module.php:388 @@ -25860,7 +25939,7 @@ msgstr "Events by severity" #: ../../include/functions_reporting_html.php:1778 #: ../../operation/events/event_statistics.php:61 msgid "Amount events validated" -msgstr "Amount of events validated" +msgstr "Number of validated events" #: ../../include/functions_reporting_html.php:1908 #, php-format @@ -25887,34 +25966,34 @@ msgstr "Warning<br/>Critical" #: ../../enterprise/include/functions_reporting_csv.php:857 #: ../../enterprise/include/functions_reporting_pdf.php:361 msgid "From data" -msgstr "" +msgstr "From data" #: ../../include/functions_reporting_html.php:2237 #: ../../enterprise/include/functions_reporting_csv.php:857 #: ../../enterprise/include/functions_reporting_pdf.php:362 msgid "To data" -msgstr "" +msgstr "To data" #: ../../include/functions_reporting_html.php:2265 #: ../../enterprise/include/functions_reporting_csv.php:869 #: ../../enterprise/include/functions_reporting_csv.php:887 #: ../../enterprise/include/functions_reporting_pdf.php:374 msgid "Negative increase: " -msgstr "" +msgstr "Negative increase: " #: ../../include/functions_reporting_html.php:2268 #: ../../enterprise/include/functions_reporting_csv.php:872 #: ../../enterprise/include/functions_reporting_csv.php:890 #: ../../enterprise/include/functions_reporting_pdf.php:377 msgid "Positive increase: " -msgstr "" +msgstr "Positive increase: " #: ../../include/functions_reporting_html.php:2271 #: ../../enterprise/include/functions_reporting_csv.php:875 #: ../../enterprise/include/functions_reporting_csv.php:893 #: ../../enterprise/include/functions_reporting_pdf.php:380 msgid "Neutral increase: " -msgstr "" +msgstr "Neutral increase: " #: ../../include/functions_reporting_html.php:2326 msgid "Total time" @@ -25930,17 +26009,17 @@ msgstr "Time Uknown" #: ../../include/functions_reporting_html.php:2330 msgid "Time Not Init Module" -msgstr "Time Not Init Module" +msgstr "Time of not initialized module" #: ../../include/functions_reporting_html.php:2331 #: ../../enterprise/include/functions_reporting_csv.php:1426 msgid "Time Downtime" -msgstr "Time Downtime" +msgstr "Time of downtime" #: ../../include/functions_reporting_html.php:2332 #: ../../enterprise/include/functions_reporting_pdf.php:1936 msgid "% Ok" -msgstr "% Ok" +msgstr "% OK" #: ../../include/functions_reporting_html.php:2369 msgid "Total checks" @@ -25952,7 +26031,7 @@ msgstr "Checks failed" #: ../../include/functions_reporting_html.php:2372 msgid "Checks Uknown" -msgstr "Checks Unknown" +msgstr "Unknown checks" #: ../../include/functions_reporting_html.php:2518 #: ../../enterprise/include/functions_reporting_pdf.php:2070 @@ -25992,11 +26071,11 @@ msgstr "Non-triggered alerts" #: ../../include/functions_reporting_html.php:3053 msgid "Total alerts monitored" -msgstr "Total # of alerts monitored" +msgstr "Total number of monitored alerts" #: ../../include/functions_reporting_html.php:3104 msgid "Total monitors" -msgstr "Total # of monitors" +msgstr "Total number of monitors" #: ../../include/functions_reporting_html.php:3105 msgid "Monitors down on period" @@ -26020,7 +26099,7 @@ msgstr "Monitor" #: ../../include/functions_reporting_html.php:3196 #, php-format msgid "Agents in group: %s" -msgstr "Agents in group : %s" +msgstr "Agents in group: %s" #: ../../include/functions_reporting_html.php:3289 msgid "Last failure" @@ -26046,7 +26125,7 @@ msgstr "Agents in OK status" #: ../../include/functions_reporting_html.php:3545 #: ../../mobile/operation/groups.php:129 msgid "Agents not init" -msgstr "Uninitialised agents" +msgstr "Not initialised agents" #: ../../include/functions_reporting_html.php:3556 #: ../../include/functions_reporting_html.php:3565 @@ -26072,7 +26151,7 @@ msgstr "Critical events" #: ../../include/functions_reporting_html.php:3640 #: ../../include/functions_reporting_html.php:3657 msgid "Warning events" -msgstr "Events in Warning status" +msgstr "Events in warning status" #: ../../include/functions_reporting_html.php:3644 #: ../../include/functions_reporting_html.php:3661 @@ -26082,11 +26161,11 @@ msgstr "Events in OK status" #: ../../include/functions_reporting_html.php:3648 #: ../../include/functions_reporting_html.php:3665 msgid "Unknown events" -msgstr "Events in Unknown status" +msgstr "Events in unknown status" #: ../../include/functions_reporting_html.php:3688 msgid "Important Events by Criticity" -msgstr "Important Events by Criticity" +msgstr "Important events by severity" #: ../../include/functions_reporting_html.php:3714 msgid "Last activity in Pandora FMS console" @@ -26095,7 +26174,7 @@ msgstr "Latest activity in the Pandora FMS console" #: ../../include/functions_reporting_html.php:3790 #: ../../include/functions_reporting_html.php:3930 msgid "Events info (1hr.)" -msgstr "Event info. (1hr.)" +msgstr "Event info (1h)" #: ../../include/functions_reporting_html.php:4096 #: ../../enterprise/include/functions_reporting.php:4974 @@ -26113,17 +26192,17 @@ msgstr "Dates" #: ../../enterprise/include/functions_reporting.php:5073 #: ../../enterprise/include/functions_reporting_pdf.php:2543 msgid "This item is affected by a malformed planned downtime" -msgstr "This item is affected by a erroneous planned downtime" +msgstr "This item is affected by an erroneous planned downtime" #: ../../include/functions_reporting_html.php:4143 #: ../../enterprise/include/functions_reporting.php:5074 #: ../../enterprise/include/functions_reporting_pdf.php:2544 msgid "Go to the planned downtimes section to solve this" -msgstr "Go to the planned downtimes section to solve this" +msgstr "Go to the planned downtimes section to solve this." #: ../../include/functions_reports.php:511 msgid "SQL vertical bar graph" -msgstr "SQL Vertical bar graph" +msgstr "SQL vertical bar graph" #: ../../include/functions_reports.php:513 msgid "SQL pie graph" @@ -26135,7 +26214,7 @@ msgstr "SQL horizonal bar graph" #: ../../include/functions_reports.php:519 msgid "Automatic combined Graph" -msgstr "Automatic combined Graph" +msgstr "Automatically combined graph" #: ../../include/functions_reports.php:523 msgid "Availability graph" @@ -26143,7 +26222,7 @@ msgstr "Availability graph" #: ../../include/functions_reports.php:526 msgid "Module Histogram graph" -msgstr "Module Histogram graph" +msgstr "Module histogram graph" #: ../../include/functions_reports.php:528 #: ../../include/functions_reports.php:530 @@ -26173,12 +26252,12 @@ msgstr "Monthly SLA" #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:114 #: ../../enterprise/include/functions_reporting.php:2740 msgid "Weekly S.L.A." -msgstr "Weekly S.L.A." +msgstr "Weekly SLA" #: ../../include/functions_reports.php:547 #: ../../enterprise/include/functions_reporting.php:3522 msgid "Hourly S.L.A." -msgstr "Hourly S.L.A." +msgstr "Hourly SLA" #: ../../include/functions_reports.php:551 #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:119 @@ -26211,7 +26290,7 @@ msgstr "Serialise data" #: ../../include/functions_reports.php:576 msgid "Historical Data" -msgstr "Historical Data" +msgstr "Historical data" #: ../../include/functions_reports.php:581 #: ../../include/functions_reports.php:583 @@ -26232,7 +26311,7 @@ msgstr "Group report" #: ../../include/functions_reports.php:596 #: ../../enterprise/godmode/reporting/reporting_builder.global.php:45 msgid "Top n" -msgstr "Top n" +msgstr "Top N" #: ../../include/functions_reports.php:598 msgid "Network interfaces" @@ -26257,7 +26336,7 @@ msgstr "Alert report agent" #: ../../include/functions_reports.php:616 msgid "Alert report group" -msgstr "Alert report group" +msgstr "Group alert report" #: ../../include/functions_reports.php:622 msgid "Event report agent" @@ -26269,7 +26348,7 @@ msgstr "Event report module" #: ../../include/functions_reports.php:626 msgid "Event report group" -msgstr "Event report group" +msgstr "Group event report" #: ../../include/functions_reports.php:633 msgid "Inventory changes" @@ -26281,7 +26360,7 @@ msgstr "Netflow area chart" #: ../../include/functions_reports.php:645 msgid "Netflow pie chart" -msgstr "Netflow pie graph" +msgstr "Netflow pie chart" #: ../../include/functions_reports.php:647 msgid "Netflow data table" @@ -26315,11 +26394,11 @@ msgstr "Network server" #: ../../include/functions_servers.php:374 msgid "SNMP Trap server" -msgstr "SNMP Trap server" +msgstr "SNMP trap server" #: ../../include/functions_servers.php:384 msgid "Plugin server" -msgstr "Plug-in server" +msgstr "Plugin server" #: ../../include/functions_servers.php:389 msgid "Prediction server" @@ -26372,51 +26451,51 @@ msgstr "Sync server" #: ../../include/functions_servers.php:449 msgid "Wux server" -msgstr "" +msgstr "WUX server" #: ../../include/functions_servers.php:454 msgid "Syslog server" -msgstr "" +msgstr "Syslog server" #: ../../include/functions_snmp.php:67 msgid "Load Average (Last minute)" -msgstr "Load Average (Last minute)" +msgstr "Load average (last minute)" #: ../../include/functions_snmp.php:71 msgid "Load Average (Last 5 minutes)" -msgstr "Load Average (Last 5 minutes)" +msgstr "Load average (last 5 minutes)" #: ../../include/functions_snmp.php:75 msgid "Load Average (Last 15 minutes)" -msgstr "Load Average (Last 15 minutes)" +msgstr "Load average (last 15 minutes)" #: ../../include/functions_snmp.php:79 msgid "Total Swap Size configured for the host" -msgstr "Total Swap Size configured for the host" +msgstr "Total swap size configured for the host" #: ../../include/functions_snmp.php:83 msgid "Available Swap Space on the host" -msgstr "Available Swap Space on the host" +msgstr "Available swap space on the host" #: ../../include/functions_snmp.php:87 msgid "Total Real/Physical Memory Size on the host" -msgstr "Total Real/Physical Memory Size on the host" +msgstr "Total real/physical memory size on the host" #: ../../include/functions_snmp.php:91 msgid "Available Real/Physical Memory Space on the host" -msgstr "Available Real/Physical Memory Space on the host" +msgstr "Available real/physical memory space on the host" #: ../../include/functions_snmp.php:95 msgid "Total Available Memory on the host" -msgstr "Total Available Memory on the host" +msgstr "Total available memory on the host" #: ../../include/functions_snmp.php:99 msgid "Total Cached Memory" -msgstr "Total Cached Memory" +msgstr "Total cached memory" #: ../../include/functions_snmp.php:103 msgid "Total Buffered Memory" -msgstr "Total Buffered Memory" +msgstr "Total buffered memory" #: ../../include/functions_snmp.php:107 msgid "Amount of memory swapped in from disk (kB/s)" @@ -26436,7 +26515,7 @@ msgstr "Number of blocks received from a block device" #: ../../include/functions_snmp.php:123 msgid "Number of interrupts processed" -msgstr "Number of interrupts processed" +msgstr "Number of interruptions processed" #: ../../include/functions_snmp.php:127 msgid "Number of context switches" @@ -26460,26 +26539,26 @@ msgstr "system Up time" #: ../../include/functions_snmp.php:312 msgid "Pagination" -msgstr "" +msgstr "Pagination" #: ../../include/functions_snmp.php:333 ../../include/functions_snmp.php:339 msgid "Group by Enterprise String / IP" -msgstr "" +msgstr "Group by Enterprise String / IP" #: ../../include/functions_snmp.php:384 #: ../../enterprise/include/functions_events.php:212 msgid "Active filter" -msgstr "" +msgstr "Active filter" #: ../../include/functions_snmp.php:385 #: ../../enterprise/include/functions_events.php:213 msgid "Active filters" -msgstr "" +msgstr "Active filters" #: ../../include/graphs/export_data.php:71 #: ../../include/graphs/export_data.php:126 msgid "An error occured exporting the data" -msgstr "An error occured exporting the data" +msgstr "Error exporting the data" #: ../../include/graphs/export_data.php:76 #: ../../enterprise/godmode/reporting/visual_console_builder.wizard_services.php:106 @@ -26493,7 +26572,7 @@ msgstr "Cancel zoom" #: ../../include/graphs/functions_flot.php:259 msgid "Warning and Critical thresholds" -msgstr "Warning and Critical thresholds" +msgstr "Warning and critical thresholds" #: ../../include/graphs/functions_flot.php:262 msgid "Overview graph" @@ -26506,7 +26585,7 @@ msgstr "Actual" #: ../../include/help/clippy/agent_out_of_limits.php:39 msgid "Agent contact date passed it's ETA!." -msgstr "Agent contact date passed it's ETA!." +msgstr "Agent contact date passed its ETA!" #: ../../include/help/clippy/agent_out_of_limits.php:44 msgid "" @@ -26515,12 +26594,12 @@ msgid "" "server." msgstr "" "This occurs when your agent has stopped reporting, or the server has any " -"issues (overloaded or downed). You should also check the connectivity " -"between agent and server." +"issues (overloaded or down). You should also check the connectivity between " +"agent and server." #: ../../include/help/clippy/data_configuration_module.php:39 msgid "Data Configuration Module." -msgstr "Data Configuration Module." +msgstr "Data configuration module" #: ../../include/help/clippy/data_configuration_module.php:44 msgid "" @@ -26535,8 +26614,8 @@ msgstr "" "information and generate the data XML. Any data/configuration reported by " "the agent, different from data or description is discarded, and the " "configuration shown in the console prevails over any configuration coming " -"from the agent, this applies for example for crit/warn thresholds, interval, " -"module group, min/max value, tags, etc." +"from the agent. This applies for example to critical/warning thresholds, " +"interval, module group, min/max value, tags, etc." #: ../../include/help/clippy/data_configuration_module.php:50 msgid "" @@ -26544,7 +26623,7 @@ msgid "" "can see in the console, but after the first import, system will ignore any " "update coming from the XML/Agent." msgstr "" -"The information imported the FIRST time form the XML file will be the " +"The information imported the FIRST time from the XML file will be the " "information visible on the console. After the first import, the system will " "ignore any updates coming from the XML/agent." @@ -26552,46 +26631,47 @@ msgstr "" msgid "" "The configuration of email for the task email is in the enterprise setup:" msgstr "" +"The email configuration for the task email is in the Enterprise setup:" #: ../../include/help/clippy/extension_cron_send_email.php:40 msgid "Please check if the email configuration is correct." -msgstr "Please check if the e-mail configuration is correct." +msgstr "Please check if the email configuration is correct." #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:35 msgid "Now you must go to Modules. Don't worry I'll lead you." -msgstr "Now you must go to Modules. Don't worry, I'll lead you." +msgstr "Now you must go to Modules. Don't worry, I will lead you." #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:40 msgid "Click in this tab.." -msgstr "Click on this tab.." +msgstr "Click on this tab" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:56 msgid "Now you must create the module. Don't worry, i'll teach you." -msgstr "Now you must create the module. Don't worry, i'll teach you." +msgstr "Now you must create the module. Don't worry, I will teach you." #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:60 msgid "Choose the network server module." -msgstr "Choose the network server module." +msgstr "Choose the network server module" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:64 msgid "And click the button." -msgstr "And click the button." +msgstr "And click on the button" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:80 msgid "Now you must create the module. Don't worry, i'll teach you ." -msgstr "Now you must create the module. Don't worry, i'll teach you ." +msgstr "Now you must create the module. Don't worry, I will teach you" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:84 msgid "Now we are going to fill the form." -msgstr "Now, we'll proceed to fill out the form." +msgstr "Now, we will proceed to fill out the form." #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:88 msgid "Please choose Network Management." -msgstr "Please choose Network Management." +msgstr "Please select Network Management" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:92 msgid "Choose the component named \"Host alive\"." -msgstr "Choose the component named \"Host alive\"." +msgstr "Choose the component named 'Host alive'" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:96 msgid "You can change the name if you want." @@ -26599,11 +26679,11 @@ msgstr "You can change this name if you want." #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:100 msgid "Check if the IP showed is the IP of your machine." -msgstr "Check if the IP shown is the same as your device's IP" +msgstr "Check if the IP shown is the same as the IP of your device" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:104 msgid "And only to finish it is clicking this button." -msgstr "And only to finish it is clicking this button." +msgstr "To finish, simply click on this button" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:121 msgid "" @@ -26612,7 +26692,7 @@ msgid "" "the first time. In the next seconds, if there is no problem, the status " "color will turn into <b>red</b> or <b>green</b>." msgstr "" -"Congrats! Your module has been created. <br /> Its status color is " +"Congratulations! Your module has been created. <br /> Its status colour is " "<b>blue.</b><br /> which means that the module hasn't been executed for the " "first time. In a few seconds, if there is no problem, the status color will " "turn into <b>red</b> or <b>green</b>." @@ -26626,15 +26706,15 @@ msgstr "Done" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:137 msgid "Click on alerts tab and then fill the form to add an alert." msgstr "" -"Click on the 'alerts' tab and then fill out the form to add a new alert." +"Click on the 'alerts' tab and then fill out the form to add a new alert" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:152 msgid "Select the critical module." -msgstr "Select the critical module." +msgstr "Select the critical module" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:156 msgid "In template select \"Critical Condition\"." -msgstr "On the template select \"Critical Condition\"." +msgstr "On the template select 'Critical Condition'" #: ../../include/help/clippy/godmode_agentes_configurar_agente.php:160 msgid "Now, select the action created before." @@ -26649,12 +26729,12 @@ msgid "" "To test the alert you've just created go to the main view by clicking on the " "eye tab." msgstr "" -"To test the alert you've just created go to the main view by clicking on the " -"eye tab." +"To test the alert you have just created go to the main view by clicking on " +"the eye tab." #: ../../include/help/clippy/godmode_agentes_modificar_agente.php:35 msgid "I'm going to show you how to monitor a server." -msgstr "I'm going to show you how to monitor a server." +msgstr "I will show you how to monitor a server." #: ../../include/help/clippy/godmode_agentes_modificar_agente.php:39 msgid "Please, type an agent to save the modules for monitoring a server." @@ -26662,7 +26742,7 @@ msgstr "Please, type an agent to save the modules for monitoring a server." #: ../../include/help/clippy/godmode_agentes_modificar_agente.php:44 msgid "If you have typed the name correctly you will see the agent." -msgstr "If the name is entered correctly, the agent will be shown." +msgstr "If the name is entered correctly, the agent will be displayed." #: ../../include/help/clippy/godmode_agentes_modificar_agente.php:60 msgid "Now, please choose the agent you searched." @@ -26710,7 +26790,7 @@ msgstr "" #: ../../include/help/clippy/godmode_alerts_configure_alert_action.php:43 msgid "In the command field select \"email\"." -msgstr "In the 'Command' field, select \"email\"." +msgstr "In the 'Command' field, select'email'." #: ../../include/help/clippy/godmode_alerts_configure_alert_action.php:47 msgid "" @@ -26733,8 +26813,8 @@ msgid "" "In the \"Subject\" field you can use the macros _agent_ or _module_ for " "each name." msgstr "" -"In the 'Subject' field you can use the \"_agent_\" or \"_module_\" macros " -"for each name." +"In the 'Subject' field you can use the '_agent_' or '_module_' macros for " +"each name." #: ../../include/help/clippy/godmode_alerts_configure_alert_action.php:63 msgid "" @@ -26746,7 +26826,7 @@ msgstr "" #: ../../include/help/clippy/godmode_alerts_configure_alert_action.php:69 msgid "Click on Create button to create the action." -msgstr "Click on the 'Create' button to create the action" +msgstr "Click on the 'Create' button to create the action." #: ../../include/help/clippy/homepage.php:59 msgid "Hi, can I help you?" @@ -26758,21 +26838,21 @@ msgid "" "FMS. You can follow my steps to do basic tasks in Pandora FMS or you can " "close me and never see me again." msgstr "" -"Let me introduce my self: I am Pandorin, the annoying assistant of Pandora " +"Let me introduce myself: I am Pandorin, the annoying assistant of Pandora " "FMS. You can follow my steps to do basic tasks in Pandora FMS or you can " "close me and never see me again." #: ../../include/help/clippy/homepage.php:67 msgid "Close this wizard and don't open it again." -msgstr "Close this wizard and don't open it again." +msgstr "Close this wizard and never open it again." #: ../../include/help/clippy/homepage.php:81 msgid "Which task would you like to do first?" -msgstr "Which task would you like to tackle first?" +msgstr "Which task would you like to perform first?" #: ../../include/help/clippy/homepage.php:85 msgid "Ping to a Linux or Windows server with a Pandora FMS agent" -msgstr "Ping a Linux or Windows server using a Pandora FMS agent." +msgstr "Ping a Linux or Windows server using a Pandora FMS agent" #: ../../include/help/clippy/homepage.php:90 msgid "Create a alert by email in a critical module." @@ -26783,20 +26863,20 @@ msgid "" "The first thing you have to do is to setup the config email in the Pandora " "FMS Server." msgstr "" -"The first thing you have to do is to setup the e-mail config on the Pandora " -"FMS Server." +"The first thing you have to do is set up the email configuration on the " +"Pandora FMS server." #: ../../include/help/clippy/homepage.php:213 msgid "If you have it already configured you can go to the next step." -msgstr "If you've already configured it, you can go to the next step." +msgstr "If you have already configured it, you can proceed to the next step." #: ../../include/help/clippy/homepage.php:218 msgid "Now, pull down the Manage alerts menu and click on Actions. " -msgstr "Now, pull down the 'Manage Alerts' menu, and click on 'Actions'. " +msgstr "Now, expand the 'Manage Alerts' menu, and click on 'Actions'. " #: ../../include/help/clippy/interval_agent_min.php:39 msgid "Interval Agent." -msgstr "Interval Agent." +msgstr "Interval agent" #: ../../include/help/clippy/interval_agent_min.php:44 msgid "" @@ -26808,11 +26888,11 @@ msgid "" "requires a shorter response time." msgstr "" "Please note that having agents with a monitoring interval below 300 seconds " -"is not recommended. This will seriously impact the server's performance. " -"For example, having 200 agents with a one minute interval, is the same than " -"having 1000 agents with a 5 minute interval. The probability of getting " -"unknown modules is higher, and the impact on the server is higher because it " -"requires a shorter response time." +"is not recommended. This will seriously impact the performance of the " +"server. For example, having 200 agents with a one minute interval, is the " +"same as having 1000 agents with a 5 minute interval. The probability of " +"getting unknown modules is higher, and the impact on the server is higher " +"because it requires a shorter response time." #: ../../include/help/clippy/module_unknow.php:39 msgid "You have unknown modules in this agent." @@ -26825,13 +26905,13 @@ msgid "" "troubleshoot help page to help you determine why you have unknown modules." msgstr "" "Unknown modules are those which have received data normally at least on one " -"occasion, but that aren't receiving data right now. Please check our " -"troubleshooting page to help you determine why you have modules in unknown " -"status." +"occasion, but that are not receiving data right now. Please check our " +"troubleshooting page to help you determine why some of your modules are in " +"unknown status." #: ../../include/help/clippy/modules_not_init.php:39 msgid "You have non initialized modules" -msgstr "You have non initialised modules" +msgstr "You have non initialized modules" #: ../../include/help/clippy/modules_not_init.php:44 msgid "" @@ -26843,16 +26923,16 @@ msgid "" "view”, you can see/edit them in the module administration section, in the " "agent administrator." msgstr "" -"This happens when you have just created a module and it wasn't executed on " +"This happens when you have just created a module and it was not executed for " "the first time. Usually after a few seconds the status should change to " -"\"initialized\" and you'll be able to see it on the main view." +"'initialized' and you will be able to see it on the main view." #: ../../include/help/clippy/modules_not_learning_mode.php:40 msgid "" "Please note that you have your agent setup to do not add new modules coming " "from the data XML." msgstr "" -"Please note that if you have your agent set up you mustn't add new modules " +"Please note that if you have your agent set up you must not add new modules " "coming from the data XML." #: ../../include/help/clippy/modules_not_learning_mode.php:41 @@ -26862,17 +26942,17 @@ msgid "" "manually in the interface (with the exact name and type as coming in the XML " "file)." msgstr "" -"That means if you have a local plugin or add manually new modules to the " -"configuration file, you won't have it in your agent, unless you first create " -"manually in the interface (with the exact name and type as coming in the XML " -"file)." +"That means that if you have a local plugin or if you add new modules to the " +"configuration file manually, you will not have it in your agent, unless you " +"create it manually in the interface first (with the exact name and type as " +"coming in the XML file)." #: ../../include/help/clippy/modules_not_learning_mode.php:42 msgid "" "You should use the \"normal\" mode (non learn) only when you don't intend to " "add more modules to the agent." msgstr "" -"You should use \"normal\" mode (not 'learning' mode) only when you don't " +"You should use 'normal' mode (not 'learning' mode) only when you do not " "intend to add more modules to the agent." #: ../../include/help/clippy/operation_agentes_status_monitor.php:35 @@ -26880,8 +26960,8 @@ msgid "" "Now, you have to go to the monitors list and look for a \"critical\" module " "to apply the alert." msgstr "" -"Now, you must go to the monitor list and look for a \"critical\" module to " -"apply the alert to." +"Now, go to the monitor list and look for a 'critical' module to which you " +"can apply the alert." #: ../../include/help/clippy/operation_agentes_status_monitor.php:39 msgid "" @@ -26895,14 +26975,14 @@ msgstr "" #: ../../include/help/clippy/operation_agentes_status_monitor.php:44 msgid "Click on Show button to get the modules list filtered." -msgstr "Click on Show button to get the modules list filtered." +msgstr "Click on the button Show to obtain a filtered list of modules." #: ../../include/help/clippy/operation_agentes_status_monitor.php:60 msgid "" "Now, to edit the module, click on the wrench that appears in the type column." msgstr "" -"In order to edit the module, click on the wrench icon that can be seen in " -"the 'Type' column." +"In order to edit the module, click on the wrench icon displayed in the " +"'Type' column." #: ../../include/help/clippy/operation_agentes_ver_agente.php:36 msgid "" @@ -26910,15 +26990,15 @@ msgid "" "force the action execution and after a few minutes you will receive the " "alert in your email." msgstr "" -"The last step is to check the alert created. Click on the round icon to " +"The last step is to check the created alert. Click on the round icon to " "force the action execution and after a few minutes you will receive the " -"alert in your e-mail." +"alert in your email." #: ../../include/help/clippy/operation_agentes_ver_agente.php:37 msgid "" "And restart your pandora server to read again general configuration tokens." msgstr "" -"After, restart your Pandora Server to reread the general configuration " +"Then, restart your Pandora FMS Server to reread the general configuration " "tokens." #: ../../include/help/clippy/server_queued_modules.php:39 @@ -26936,7 +27016,7 @@ msgstr "" "server is overloaded and/or improperly configured. This could be something " "temporary, or a bottleneck. A possible solution is to increase the number of " "server threads, but you should consider getting support (or contact our " -"support for Enterprise Edition users)." +"support for Enterprise version users)." #: ../../include/help/clippy/servers_down.php:39 msgid "All servers down" @@ -26948,13 +27028,13 @@ msgid "" "command: \"sudo /etc/init.d/pandora_server restart\". It's possible need " "introduce root pass." msgstr "" -"You must boot up all servers. Go to the Linux terminal and run the following " -"command: \"sudo /etc/init.d/pandora_server restart\". You'll have to provide " -"root user credentials." +"You must boot up all servers. Go to the Linux terminal and execute the " +"following command: 'sudo /etc/init.d/pandora_server restart'. You will have " +"to provide root user credentials." #: ../../include/help/clippy/topology_group.php:39 msgid "Topology Group" -msgstr "Topology Group" +msgstr "Topology group" #: ../../include/help/clippy/topology_group.php:44 msgid "" @@ -26981,7 +27061,7 @@ msgstr "Generated at" #: ../../mobile/include/ui.class.php:87 ../../mobile/include/ui.class.php:168 msgid "Pandora FMS mobile" -msgstr "Pandora FMS : Mobile" +msgstr "Pandora FMS Mobile" #: ../../mobile/include/ui.class.php:185 ../../mobile/operation/home.php:161 msgid "Home" @@ -26989,27 +27069,27 @@ msgstr "Home" #: ../../mobile/include/ui.class.php:630 msgid "Not found header." -msgstr "Header not found." +msgstr "Header not found" #: ../../mobile/include/ui.class.php:633 msgid "Not found content." -msgstr "Content not found." +msgstr "Content not found" #: ../../mobile/include/ui.class.php:636 msgid "Not found footer." -msgstr "Footer not found." +msgstr "Footer not found" #: ../../mobile/include/ui.class.php:639 msgid "Incorrect form." -msgstr "Incorrect form." +msgstr "Incorrect form" #: ../../mobile/include/ui.class.php:642 msgid "Incorrect grid." -msgstr "Wrong grid." +msgstr "Wrong grid" #: ../../mobile/include/ui.class.php:645 msgid "Incorrect collapsible." -msgstr "Wrong collapsible." +msgstr "Wrong collapsible" #: ../../mobile/include/user.class.php:152 #: ../../mobile/include/user.class.php:170 @@ -27023,23 +27103,24 @@ msgstr "Secret code not found" #: ../../mobile/include/user.class.php:154 msgid "Please contact the administrator to reset your double authentication" -msgstr "Please contact the administrator to reset your double authentication" +msgstr "" +"Please contact the administrator to reset your double authentication." #: ../../mobile/include/user.class.php:178 msgid "There was an error checking the code" -msgstr "There was an error checking the code" +msgstr "Error checking the code" #: ../../mobile/include/user.class.php:211 msgid "Login Failed" -msgstr "Login Failed" +msgstr "Login failed" #: ../../mobile/include/user.class.php:212 msgid "User not found in database or incorrect password." -msgstr "User not found in database or wrong password." +msgstr "User not found in database or wrong password" #: ../../mobile/include/user.class.php:220 msgid "Login out" -msgstr "Logout" +msgstr "Log out" #: ../../mobile/include/user.class.php:244 msgid "user" @@ -27071,9 +27152,9 @@ msgid "" "Database" msgstr "" "Access to this page is restricted to authorized users only, please contact " -"your system administrator if you should need help. <br><br>. Please remember " -"that any attempts to access this page will be recorded on the Pandora FMS " -"System Database." +"your system administrator if you need help. <br><br> Please remember that " +"any attempts to access this page will be recorded on the Pandora FMS System " +"Database." #: ../../mobile/operation/agent.php:135 ../../mobile/operation/agents.php:183 #: ../../mobile/operation/alerts.php:158 ../../mobile/operation/events.php:568 @@ -27098,11 +27179,11 @@ msgstr "Back" #: ../../mobile/operation/agent.php:139 msgid "PandoraFMS: Agents" -msgstr "PandoraFMS : Agents" +msgstr "PandoraFMS: Agents" #: ../../mobile/operation/agent.php:145 msgid "No agent found" -msgstr "No agent found." +msgstr "No agents found" #: ../../mobile/operation/agent.php:231 msgid "Modules by status" @@ -27116,14 +27197,14 @@ msgstr "Last %s events" #: ../../mobile/operation/agents.php:187 #, php-format msgid "Filter Agents by %s" -msgstr "Filter Agents by %s" +msgstr "Filter agents by %s" #: ../../mobile/operation/agents.php:222 ../../mobile/operation/alerts.php:213 #: ../../mobile/operation/events.php:659 #: ../../mobile/operation/modules.php:261 #: ../../mobile/operation/networkmaps.php:150 msgid "Apply Filter" -msgstr "Apply Filter" +msgstr "Apply filter" #: ../../mobile/operation/agents.php:393 msgid "No agents" @@ -27142,20 +27223,20 @@ msgstr "(Default)" #: ../../mobile/operation/networkmaps.php:222 #, php-format msgid "Group: %s" -msgstr "Group : %s" +msgstr "Group: %s" #: ../../mobile/operation/agents.php:493 ../../mobile/operation/alerts.php:320 #: ../../mobile/operation/events.php:1112 #: ../../mobile/operation/modules.php:805 #, php-format msgid "Status: %s" -msgstr "Status : %s" +msgstr "Status: %s" #: ../../mobile/operation/agents.php:497 ../../mobile/operation/alerts.php:324 #: ../../mobile/operation/modules.php:809 #, php-format msgid "Free Search: %s" -msgstr "Free Search : %s" +msgstr "Free Search: %s" #: ../../mobile/operation/alerts.php:36 #: ../../operation/agentes/alerts_status.functions.php:72 @@ -27172,11 +27253,11 @@ msgstr "Not triggered" #: ../../mobile/operation/alerts.php:162 #, php-format msgid "Filter Alerts by %s" -msgstr "Filter Alerts by %s" +msgstr "Filter alerts by %s" #: ../../mobile/operation/alerts.php:272 msgid "Last Fired" -msgstr "Last Fired" +msgstr "Last triggered" #: ../../mobile/operation/alerts.php:282 msgid "No alerts" @@ -27185,20 +27266,20 @@ msgstr "No alerts" #: ../../mobile/operation/alerts.php:312 #, php-format msgid "Standby: %s" -msgstr "Standby : %s" +msgstr "Standby: %s" #: ../../mobile/operation/events.php:382 ../../mobile/operation/events.php:383 #: ../../mobile/operation/events.php:590 ../../mobile/operation/events.php:591 msgid "Preset Filters" -msgstr "Preset Filters" +msgstr "Preset filters" #: ../../mobile/operation/events.php:443 msgid "ERROR: Event detail" -msgstr "ERROR : Event details" +msgstr "ERROR: Event details" #: ../../mobile/operation/events.php:445 msgid "Error connecting to DB pandora." -msgstr "Error on connecting to Pandora DB." +msgstr "Error connecting to Pandora FMS DB" #: ../../mobile/operation/events.php:458 msgid "Event detail" @@ -27206,11 +27287,11 @@ msgstr "Event details" #: ../../mobile/operation/events.php:541 msgid "Sucessful validate" -msgstr "Validation successful." +msgstr "Validated successfully" #: ../../mobile/operation/events.php:543 msgid "Fail validate" -msgstr "Validation failed." +msgstr "Validation failed" #: ../../mobile/operation/events.php:575 #, php-format @@ -27220,12 +27301,12 @@ msgstr "Filter events by %s" #: ../../mobile/operation/events.php:1076 #, php-format msgid "Filter: %s" -msgstr "Filter : %s" +msgstr "Filter: %s" #: ../../mobile/operation/events.php:1089 #, php-format msgid "Severity: %s" -msgstr "Severity : %s" +msgstr "Severity: %s" #: ../../mobile/operation/events.php:1108 #: ../../mobile/operation/networkmaps.php:229 @@ -27236,12 +27317,12 @@ msgstr "Type: %s" #: ../../mobile/operation/events.php:1116 #, php-format msgid "Free search: %s" -msgstr "Free search : %s" +msgstr "Free search: %s" #: ../../mobile/operation/events.php:1120 #, php-format msgid "Hours: %s" -msgstr "Hours : %s" +msgstr "Hours: %s" #: ../../mobile/operation/groups.php:141 ../../operation/tree.php:314 #: ../../enterprise/dashboard/widgets/tree_view.php:226 @@ -27253,7 +27334,7 @@ msgstr "Unknown modules" #: ../../enterprise/dashboard/widgets/tree_view.php:231 #: ../../enterprise/include/functions_reporting_csv.php:476 msgid "Not init modules" -msgstr "Modules in uninitialised status" +msgstr "Modules in not initialised status" #: ../../mobile/operation/groups.php:149 ../../operation/tree.php:324 #: ../../enterprise/dashboard/widgets/tree_view.php:236 @@ -27302,7 +27383,7 @@ msgstr "Global search" #: ../../mobile/operation/module_graph.php:373 #, php-format msgid "PandoraFMS: %s" -msgstr "PandoraFMS : %s" +msgstr "PandoraFMS: %s" #: ../../mobile/operation/module_graph.php:387 #, php-format @@ -27311,11 +27392,11 @@ msgstr "Options for %s : %s" #: ../../mobile/operation/module_graph.php:394 msgid "Show Alerts" -msgstr "Show Alerts" +msgstr "Show alerts" #: ../../mobile/operation/module_graph.php:402 msgid "Show Events" -msgstr "Show Events" +msgstr "Show events" #: ../../mobile/operation/module_graph.php:410 #: ../../operation/agentes/stat_win.php:414 @@ -27329,7 +27410,7 @@ msgstr "Show unknown graph" #: ../../mobile/operation/module_graph.php:434 msgid "Avg Only" -msgstr "Avg Only" +msgstr "Avg only" #: ../../mobile/operation/module_graph.php:439 msgid "Time range (hours)" @@ -27354,7 +27435,7 @@ msgstr "Error retrieving the graph" #: ../../mobile/operation/modules.php:194 #, php-format msgid "Filter Modules by %s" -msgstr "Filter Modules by %s" +msgstr "Filter modules by %s" #: ../../mobile/operation/modules.php:543 msgid "Interval." @@ -27367,7 +27448,7 @@ msgstr "Last update" #: ../../mobile/operation/modules.php:801 #, php-format msgid "Module group: %s" -msgstr "Module group : %s" +msgstr "Module group: %s" #: ../../mobile/operation/modules.php:814 #, php-format @@ -27392,7 +27473,7 @@ msgstr "Map could not be generated" #: ../../mobile/operation/networkmaps.php:120 #, php-format msgid "Filter Networkmaps by %s" -msgstr "Filter Network maps by %s" +msgstr "Filter network maps by %s" #: ../../mobile/operation/tactical.php:193 msgid "Last activity" @@ -27496,26 +27577,26 @@ msgstr "" #: ../../operation/agentes/ehorus.php:30 msgid "Missing agent id" -msgstr "Missing agent id" +msgstr "Missing agent ID" #: ../../operation/agentes/ehorus.php:48 msgid "Missing ehorus agent id" -msgstr "Missing eHorus agent id" +msgstr "Missing eHorus agent ID" #: ../../operation/agentes/ehorus.php:89 #: ../../operation/agentes/ehorus.php:126 msgid "There was an error retrieving an authorization token" -msgstr "There was an error retrieving an authorization token" +msgstr "Error retrieving an authorization token" #: ../../operation/agentes/ehorus.php:102 #: ../../operation/agentes/ehorus.php:139 #: ../../operation/agentes/ehorus.php:175 msgid "There was an error processing the response" -msgstr "There was an error processing the response" +msgstr "Error processing the response" #: ../../operation/agentes/ehorus.php:162 msgid "There was an error retrieving the agent data" -msgstr "There was an error retrieving the agent data" +msgstr "Error retrieving the agent data" #: ../../operation/agentes/ehorus.php:180 msgid "Remote management of this agent with eHorus" @@ -27527,7 +27608,7 @@ msgstr "Launch" #: ../../operation/agentes/ehorus.php:188 msgid "The connection was lost and the authorization token was expired" -msgstr "The connection was lost and the authorization token was expired" +msgstr "The connection was lost and the authorization token has expired." #: ../../operation/agentes/ehorus.php:190 msgid "Reload the page to request a new authorization token" @@ -27543,24 +27624,24 @@ msgstr "An error message appeared when deleting the agent" #: ../../operation/agentes/estado_agente.php:226 msgid "Search in custom fields" -msgstr "" +msgstr "Search in custom fields" #: ../../operation/agentes/estado_agente.php:656 #: ../../enterprise/operation/agentes/tag_view.php:505 msgid "Remote config" -msgstr "Remote config" +msgstr "Remote configuration" #: ../../operation/agentes/estado_generalagente.php:42 msgid "The agent has not assigned server. Maybe agent does not run fine." msgstr "" -"The agent has not assigned a server. Maybe the agent does not run fine." +"The agent has no server assigned. Maybe the agent does not run correctly." #: ../../operation/agentes/estado_generalagente.php:148 msgid "" "Agent statuses are re-calculated by the server, they are not shown in real " "time." msgstr "" -"Agent statuses are recalculated by the server and aren't shown in real time." +"Agent statuses are recalculated by the server and are not shown in real time." #: ../../operation/agentes/estado_generalagente.php:225 msgid "Agent contact" @@ -27581,7 +27662,7 @@ msgstr "There is no GIS data." #: ../../operation/agentes/estado_generalagente.php:417 msgid "Active incident on this agent" -msgstr "Active incident on this agent" +msgstr "Active issue on this agent" #: ../../operation/agentes/estado_generalagente.php:426 #: ../../enterprise/dashboard/widget.php:63 @@ -27594,12 +27675,12 @@ msgstr "Title" #: ../../operation/agentes/estado_generalagente.php:568 msgid "Events info (24hr.)" -msgstr "Event info (24hrs.)" +msgstr "Event info (24h)" #: ../../operation/agentes/estado_generalagente.php:582 #: ../../operation/agentes/pandora_networkmap.view.php:389 msgid "Last contact: " -msgstr "Last contact : " +msgstr "Last contact: " #: ../../operation/agentes/estado_generalagente.php:650 msgid "Refresh data" @@ -27611,7 +27692,7 @@ msgstr "Force remote checks" #: ../../operation/agentes/estado_monitores.php:35 msgid "Tag's information" -msgstr "Tag's information" +msgstr "Tag information" #: ../../operation/agentes/estado_monitores.php:81 msgid "Relationship information" @@ -27647,7 +27728,7 @@ msgstr "Status:" #: ../../operation/agentes/estado_monitores.php:464 msgid "Not Normal" -msgstr "Abnormal" +msgstr "Not normal" #: ../../operation/agentes/estado_monitores.php:472 msgid "Free text for search (*):" @@ -27655,7 +27736,7 @@ msgstr "Free text for search (*):" #: ../../operation/agentes/estado_monitores.php:473 msgid "Search by module name, list matches." -msgstr "Search by module name, list matches." +msgstr "Search by module name, list matches" #: ../../operation/agentes/estado_monitores.php:488 msgid "Reset" @@ -27722,7 +27803,7 @@ msgstr "Positional data from the last" #: ../../operation/agentes/gis_view.php:156 msgid "This agent doesn't have any GIS data." -msgstr "This agent doesn't have any GIS data." +msgstr "This agent does not have any GIS data." #: ../../operation/agentes/gis_view.php:192 #, php-format @@ -27735,7 +27816,7 @@ msgstr "Distance" #: ../../operation/agentes/gis_view.php:205 msgid "# of Packages" -msgstr "# of packages" +msgstr "No. of packages" #: ../../operation/agentes/gis_view.php:206 #: ../../operation/gis_maps/ajax.php:222 @@ -27756,7 +27837,7 @@ msgstr "Modules network no proc" #: ../../operation/agentes/graphs.php:122 msgid "Modules boolean" -msgstr "" +msgstr "Modules boolean" #: ../../operation/agentes/graphs.php:166 #: ../../operation/agentes/interface_traffic_graph_win.php:262 @@ -27777,7 +27858,7 @@ msgstr "Show alerts" #: ../../operation/agentes/graphs.php:173 msgid "the combined graph does not show the alerts into this graph" -msgstr "the combined graph does not show the alerts into this graph" +msgstr "The combined graph does not show the alerts in this graph." #: ../../operation/agentes/graphs.php:175 msgid "Show as one combined graph" @@ -27789,17 +27870,17 @@ msgstr "Several graphs per module" #: ../../operation/agentes/graphs.php:176 msgid "One combined graph" -msgstr "" +msgstr "One combined graph" #: ../../operation/agentes/graphs.php:181 #: ../../operation/agentes/graphs.php:337 msgid "Area stack" -msgstr "" +msgstr "Area stack" #: ../../operation/agentes/graphs.php:181 #: ../../operation/agentes/graphs.php:345 msgid "Line stack" -msgstr "" +msgstr "Line stack" #: ../../operation/agentes/graphs.php:192 msgid "Save as custom graph" @@ -27824,7 +27905,7 @@ msgstr "Save custom graph" #: ../../operation/agentes/graphs.php:299 msgid "Custom graph create from the tab graphs in the agent." -msgstr "Custom graph create from the tab graphs in the agent." +msgstr "Custom graph created from the tab graphs in the agent." #: ../../operation/agentes/group_view.php:117 msgid "Summary of the status groups" @@ -27846,13 +27927,13 @@ msgstr "Out" #: ../../operation/agentes/interface_traffic_graph_win.php:224 #: ../../operation/agentes/stat_win.php:293 msgid "Pandora FMS Graph configuration menu" -msgstr "Pandora FMS' graph configuration menu" +msgstr "Pandora FMS graph configuration menu" #: ../../operation/agentes/interface_traffic_graph_win.php:226 #: ../../operation/agentes/stat_win.php:295 msgid "Please, make your changes and apply with the <i>Reload</i> button" msgstr "" -"Please establish your changes and apply the with the <i>Reload</i> button" +"Please establish your changes and apply them with the <i>Reload</i> button." #: ../../operation/agentes/interface_traffic_graph_win.php:243 #: ../../operation/agentes/stat_win.php:322 @@ -27896,7 +27977,7 @@ msgstr "List of networkmap" #: ../../operation/agentes/pandora_networkmap.view.php:746 #: ../../enterprise/godmode/agentes/pandora_networkmap_empty.editor.php:80 msgid "Not found networkmap." -msgstr "Network map not found." +msgstr "Network map not found" #: ../../operation/agentes/pandora_networkmap.editor.php:228 #: ../../enterprise/extensions/vmware/vmware_view.php:1424 @@ -27908,17 +27989,17 @@ msgstr "Node radius" #: ../../operation/agentes/pandora_networkmap.editor.php:235 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:94 msgid "Position X" -msgstr "" +msgstr "Position X" #: ../../operation/agentes/pandora_networkmap.editor.php:237 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:96 msgid "Position Y" -msgstr "" +msgstr "Position Y" #: ../../operation/agentes/pandora_networkmap.editor.php:240 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:99 msgid "Zoom scale" -msgstr "" +msgstr "Zoom scale" #: ../../operation/agentes/pandora_networkmap.editor.php:244 #: ../../enterprise/dashboard/widgets/network_map.php:57 @@ -27926,6 +28007,7 @@ msgstr "" msgid "" "Introduce zoom level. 1 = Highest resolution. Figures may include decimals" msgstr "" +"Introduce zoom level. 1 = Highest resolution. Figures may include decimals." #: ../../operation/agentes/pandora_networkmap.editor.php:250 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:107 @@ -27943,8 +28025,8 @@ msgid "" "It is setted any recon task, the nodes get from the recontask IP mask " "instead from the group." msgstr "" -"If any Recon Task is defined, the nodes obtain their IPs from the " -"recontask's IP mask instead from the group." +"If any Recon Task is defined, the nodes obtain their IPs from the recontask " +"IP mask instead from the group." #: ../../operation/agentes/pandora_networkmap.editor.php:258 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:137 @@ -27966,22 +28048,22 @@ msgstr "Don't show subgroups:" #: ../../operation/agentes/pandora_networkmap.editor.php:277 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:173 msgid "Method generation networkmap" -msgstr "Method generation of network map" +msgstr "Network map creation method" #: ../../operation/agentes/pandora_networkmap.editor.php:286 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:178 msgid "Node separation" -msgstr "" +msgstr "Node separation" #: ../../operation/agentes/pandora_networkmap.editor.php:287 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:179 msgid "Separation between nodes. By default 0.25" -msgstr "" +msgstr "Separation between nodes. By default 0.25" #: ../../operation/agentes/pandora_networkmap.editor.php:289 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:181 msgid "Rank separation" -msgstr "" +msgstr "Rank separation" #: ../../operation/agentes/pandora_networkmap.editor.php:290 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:182 @@ -27989,26 +28071,29 @@ msgid "" "Only flat and radial. Separation between arrows. By default 0.5 in flat and " "1.0 in radial" msgstr "" +"Only flat and radial. Separation between arrows. By default 0.5 in flat and " +"1.0 in radial." #: ../../operation/agentes/pandora_networkmap.editor.php:292 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:184 msgid "Min nodes dist" -msgstr "" +msgstr "Min nodes distance" #: ../../operation/agentes/pandora_networkmap.editor.php:293 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:185 msgid "Only circular. Minimum separation between all nodes. By default 1.0" -msgstr "" +msgstr "Only circular. Minimum separation between all nodes. By default 1.0" #: ../../operation/agentes/pandora_networkmap.editor.php:295 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:187 msgid "Default ideal node separation" -msgstr "" +msgstr "Ideal default node separation" #: ../../operation/agentes/pandora_networkmap.editor.php:296 #: ../../enterprise/operation/agentes/pandora_networkmap.view.php:188 msgid "Only fdp. Default ideal node separation in the layout. By default 0.3" msgstr "" +"Only fdp. Ideal default node separation in the layout. By default 0.3" #: ../../operation/agentes/pandora_networkmap.editor.php:305 #: ../../enterprise/godmode/agentes/pandora_networkmap_empty.editor.php:119 @@ -28023,7 +28108,7 @@ msgstr "Update network map" #: ../../operation/agentes/pandora_networkmap.php:112 #: ../../operation/agentes/pandora_networkmap.php:305 msgid "Succesfully created" -msgstr "Successfully created." +msgstr "Successfully created" #: ../../operation/agentes/pandora_networkmap.php:166 #: ../../operation/agentes/pandora_networkmap.php:401 @@ -28045,7 +28130,7 @@ msgstr "Successfully deleted" #: ../../operation/agentes/pandora_networkmap.php:635 msgid "Empty map" -msgstr "" +msgstr "Empty map" #: ../../operation/agentes/pandora_networkmap.php:638 msgid "Pending to generate" @@ -28054,11 +28139,11 @@ msgstr "Pending to generate" #: ../../operation/agentes/pandora_networkmap.php:660 #: ../../enterprise/operation/services/services.list.php:458 msgid "Config" -msgstr "Config" +msgstr "Configuration" #: ../../operation/agentes/pandora_networkmap.php:676 msgid "There are no maps defined." -msgstr "There are no maps defined." +msgstr "No maps defined" #: ../../operation/agentes/pandora_networkmap.php:683 msgid "Create networkmap" @@ -28066,11 +28151,11 @@ msgstr "Create networkmap" #: ../../operation/agentes/pandora_networkmap.php:691 msgid "Create empty networkmap" -msgstr "" +msgstr "Create empty networkmap" #: ../../operation/agentes/pandora_networkmap.view.php:127 msgid "Success be updated." -msgstr "Updating successful." +msgstr "Updated successfully" #: ../../operation/agentes/pandora_networkmap.view.php:130 #: ../../enterprise/extensions/ipam/ipam_action.php:190 @@ -28079,7 +28164,7 @@ msgstr "Could not be updated." #: ../../operation/agentes/pandora_networkmap.view.php:243 msgid "Name: " -msgstr "Name : " +msgstr "Name: " #: ../../operation/agentes/pandora_networkmap.view.php:274 #: ../../operation/agentes/status_monitor.php:1043 @@ -28098,16 +28183,16 @@ msgstr "(Unlinked) " #: ../../operation/agentes/pandora_networkmap.view.php:293 msgid "Policy: " -msgstr "Policy : " +msgstr "Policy: " #: ../../operation/agentes/pandora_networkmap.view.php:342 #: ../../enterprise/extensions/vmware/vmware_manager.php:202 msgid "Status: " -msgstr "Status : " +msgstr "Status: " #: ../../operation/agentes/pandora_networkmap.view.php:386 msgid "Data: " -msgstr "Data : " +msgstr "Data: " #: ../../operation/agentes/snapshot_view.php:76 msgid "Current data at" @@ -28119,15 +28204,15 @@ msgstr "There was a problem locating the graph source" #: ../../operation/agentes/stat_win.php:330 msgid "Avg. Only" -msgstr "Avg. Only" +msgstr "Avg. only" #: ../../operation/agentes/stat_win.php:381 msgid "" "Show events is disabled because this Pandora node is set the event " "replication." msgstr "" -"'Show events' is disabled because this Pandora node is set to event " -"replication." +"Display of events is disabled because this Pandora FMS node has the event " +"replication configured." #: ../../operation/agentes/stat_win.php:393 msgid "Show event graph" @@ -28166,7 +28251,7 @@ msgstr "Web server module" #: ../../operation/agentes/status_monitor.php:393 msgid "Wux server module" -msgstr "" +msgstr "WUX server module" #: ../../operation/agentes/status_monitor.php:398 #: ../../operation/agentes/status_monitor.php:970 @@ -28178,7 +28263,7 @@ msgstr "Server type" #: ../../operation/agentes/status_monitor.php:404 #: ../../enterprise/operation/agentes/tag_view.php:203 msgid "Show monitors..." -msgstr "Show monitors..." +msgstr "Show monitors" #: ../../operation/agentes/status_monitor.php:414 #: ../../enterprise/operation/agentes/tag_view.php:213 @@ -28188,15 +28273,15 @@ msgstr "Data type" #: ../../operation/agentes/status_monitor.php:538 msgid "Advanced Options" -msgstr "Advanced Options" +msgstr "Advanced options" #: ../../operation/agentes/status_monitor.php:960 msgid "Data Type" -msgstr "Data Type" +msgstr "Data type" #: ../../operation/agentes/status_monitor.php:1463 msgid "This group doesn't have any monitor" -msgstr "This group doesn't have any monitor" +msgstr "This group does not have any monitor" #: ../../operation/agentes/tactical.php:135 msgid "Report of State" @@ -28226,7 +28311,7 @@ msgstr "Address" #: ../../operation/agentes/ver_agente.php:938 msgid "Sons" -msgstr "Sons" +msgstr "Children" #: ../../operation/agentes/ver_agente.php:1022 #: ../../operation/search_agents.php:127 @@ -28236,7 +28321,7 @@ msgstr "Manage" #: ../../operation/agentes/ver_agente.php:1170 msgid "Log Viewer" -msgstr "Log Viewer" +msgstr "Log viewer" #: ../../operation/agentes/ver_agente.php:1190 msgid "Terminal" @@ -28298,25 +28383,25 @@ msgstr "Event" #: ../../operation/events/events.php:168 msgid "Alert fired in module " -msgstr "" +msgstr "Alert triggered in module " #: ../../operation/events/events.php:179 ../../operation/events/events.php:190 #: ../../operation/events/events.php:201 #: ../../enterprise/godmode/massive/massive_add_modules_policy.php:58 msgid "Module " -msgstr "" +msgstr "Module " #: ../../operation/events/events.php:179 msgid " is going to critical" -msgstr "" +msgstr " is changing to critical status" #: ../../operation/events/events.php:190 msgid " is going to warning" -msgstr "" +msgstr " is changing to warning status" #: ../../operation/events/events.php:201 msgid " is going to unknown" -msgstr "" +msgstr " is changing to unknown status" #: ../../operation/events/events.php:223 msgid "" @@ -28328,7 +28413,7 @@ msgstr "" #: ../../operation/events/events.php:365 msgid "History event list" -msgstr "History event list" +msgstr "List of event history" #: ../../operation/events/events.php:370 msgid "RSS Events" @@ -28352,11 +28437,11 @@ msgstr "History" #: ../../operation/events/events.php:465 ../../operation/menu.php:356 msgid "Sound Alerts" -msgstr "Sound Alerts" +msgstr "Sound alerts" #: ../../operation/events/events.php:498 msgid "Event viewer" -msgstr "" +msgstr "Event viewer" #: ../../operation/events/events.php:518 msgid "No events selected" @@ -28373,17 +28458,17 @@ msgstr "Could not be validated" #: ../../operation/events/events.php:549 msgid "Successfully set in process" -msgstr "Set in process successfully" +msgstr "Successfully set as 'in process'" #: ../../operation/events/events.php:550 msgid "Could not be set in process" -msgstr "Could not be set in process" +msgstr "Could not be set as 'in process'" #: ../../operation/events/events.php:605 #: ../../operation/visual_console/public_console.php:153 #: ../../operation/visual_console/render_view.php:241 msgid "Until refresh" -msgstr "Until refresh" +msgstr "Until refreshed" #: ../../operation/events/events.php:901 #: ../../enterprise/meta/advanced/metasetup.consoles.php:226 @@ -28424,7 +28509,7 @@ msgstr "New filter" #: ../../operation/events/events_list.php:294 msgid "Save in Group" -msgstr "Save in Group" +msgstr "Save in group" #: ../../operation/events/events_list.php:313 msgid "Overwrite filter" @@ -28441,7 +28526,7 @@ msgstr "Event control filter" #: ../../operation/events/events_list.php:720 msgid "Error creating filter." -msgstr "Error creating filter." +msgstr "Error creating filter" #: ../../operation/events/events_list.php:721 msgid "Error creating filter is duplicated." @@ -28449,19 +28534,19 @@ msgstr "Cannot create filter: duplicate filter" #: ../../operation/events/events_list.php:722 msgid "Filter created." -msgstr "Filter created." +msgstr "Filter created" #: ../../operation/events/events_list.php:724 msgid "Filter updated." -msgstr "Filter updated." +msgstr "Filter updated" #: ../../operation/events/events_list.php:725 msgid "Error updating filter." -msgstr "Error updating filter." +msgstr "Error updating filter" #: ../../operation/events/events_list.php:1105 msgid "Filter name cannot be left blank" -msgstr "The filter's name cannot be left blank" +msgstr "The name of the filter cannot be left blank." #: ../../operation/events/events_rss.php:32 msgid "Your IP is not into the IP list with API access." @@ -28469,7 +28554,7 @@ msgstr "Your IP is not on the list of IPs with API access." #: ../../operation/events/events_rss.php:46 msgid "The URL of your feed has bad hash." -msgstr "Your feed's URL has a bad hash" +msgstr "Your feed URL has a bad hash." #: ../../operation/events/events_rss.php:185 ../../operation/menu.php:101 msgid "SNMP" @@ -28477,7 +28562,7 @@ msgstr "SNMP" #: ../../operation/events/sound_events.php:51 ../../operation/menu.php:344 msgid "Sound Events" -msgstr "Sound Events" +msgstr "Sound events" #: ../../operation/events/sound_events.php:68 msgid "Sound console" @@ -28517,7 +28602,7 @@ msgstr "Do you wish to set this map as default?" #: ../../operation/gis_maps/gis_map.php:209 msgid "There was error on setup the default map." -msgstr "There was an error setting up the default map" +msgstr "Error setting up the default map" #: ../../operation/gis_maps/render_view.php:145 msgid "Refresh: " @@ -28536,11 +28621,11 @@ msgstr "Map" #: ../../operation/incidents/incident.php:33 msgid "Incident management" -msgstr "Incident management" +msgstr "Issue management" #: ../../operation/incidents/incident.php:72 msgid "Successfully reclaimed ownership" -msgstr "Successfully reclaimed ownership" +msgstr "Ownership reclaimed successfully" #: ../../operation/incidents/incident.php:73 msgid "Could not reclame ownership" @@ -28548,19 +28633,19 @@ msgstr "Could not reclame ownership" #: ../../operation/incidents/incident.php:143 msgid "Error creating incident" -msgstr "Error creating the incident" +msgstr "Error creating the issue" #: ../../operation/incidents/incident.php:146 msgid "Incident created" -msgstr "Incident created" +msgstr "Issue created" #: ../../operation/incidents/incident.php:233 msgid "Incidents:" -msgstr "Incidents:" +msgstr "Issues:" #: ../../operation/incidents/incident.php:234 msgid "All incidents" -msgstr "All incidents" +msgstr "All issues" #: ../../operation/incidents/incident.php:256 msgid "Priorities:" @@ -28597,11 +28682,11 @@ msgstr "Free text:" #: ../../operation/incidents/incident.php:291 msgid "Search by incident name or description, list matches." -msgstr "Search by incident name or description, list matches." +msgstr "Search by issue name or description, list matches." #: ../../operation/incidents/incident.php:399 msgid "Delete incidents" -msgstr "Delete incidents" +msgstr "Delete issues" #: ../../operation/incidents/incident.php:403 msgid "Become owner" @@ -28610,7 +28695,7 @@ msgstr "Become owner" #: ../../operation/incidents/incident.php:411 #: ../../operation/incidents/incident_detail.php:238 msgid "Create incident" -msgstr "Create incident" +msgstr "Create issue" #: ../../operation/incidents/incident_detail.php:120 #: ../../enterprise/meta/include/ajax/wizard.ajax.php:489 @@ -28620,7 +28705,7 @@ msgstr "No description available" #: ../../operation/incidents/incident_detail.php:160 msgid "File could not be saved due to database error" -msgstr "The file couldn't be saved due to a database error." +msgstr "The file could not be saved due to a database error." #: ../../operation/incidents/incident_detail.php:173 msgid "File uploaded" @@ -28632,7 +28717,7 @@ msgstr "The file could not be uploaded." #: ../../operation/incidents/incident_detail.php:233 msgid "Incident details" -msgstr "Incident details" +msgstr "Issue details" #: ../../operation/incidents/incident_detail.php:259 msgid "Opened at" @@ -28650,7 +28735,7 @@ msgstr "Creator" #: ../../operation/incidents/incident_detail.php:376 msgid "Update incident" -msgstr "Update incident" +msgstr "Update issue" #: ../../operation/incidents/incident_detail.php:382 msgid "Submit" @@ -28663,12 +28748,12 @@ msgstr "Add note" #: ../../operation/incidents/incident_detail.php:432 msgid "Notes attached to incident" -msgstr "Notes attached to the incident" +msgstr "Notes attached to the issue" #: ../../operation/incidents/incident_detail.php:453 #: ../../operation/incidents/incident_detail.php:505 msgid "Filename" -msgstr "Filename" +msgstr "File name" #: ../../operation/incidents/incident_detail.php:481 msgid "Attached files" @@ -28681,23 +28766,23 @@ msgstr "Add attachment" #: ../../operation/incidents/incident_statistics.php:33 msgid "Incidents by status" -msgstr "Incidents by status" +msgstr "Issues by status" #: ../../operation/incidents/incident_statistics.php:36 msgid "Incidents by priority" -msgstr "Incidents by priority" +msgstr "Issues by priority" #: ../../operation/incidents/incident_statistics.php:39 msgid "Incidents by group" -msgstr "Incidents by group" +msgstr "Issues by group" #: ../../operation/incidents/incident_statistics.php:42 msgid "Incidents by user" -msgstr "Incidents by user" +msgstr "Issues by user" #: ../../operation/incidents/incident_statistics.php:45 msgid "Incidents by source" -msgstr "Incidents by source" +msgstr "Issues by source" #: ../../operation/menu.php:32 ../../operation/menu.php:111 #: ../../enterprise/godmode/reporting/cluster_list.php:25 @@ -28740,7 +28825,7 @@ msgstr "Network map" #: ../../operation/menu.php:227 msgid "List of Gis maps" -msgstr "List of Gis maps" +msgstr "List of GIS maps" #: ../../operation/menu.php:261 msgid "Topology maps" @@ -28768,11 +28853,11 @@ msgstr "WebChat" #: ../../operation/menu.php:401 msgid "List of Incidents" -msgstr "List of Incidents" +msgstr "List of issues" #: ../../operation/menu.php:416 msgid "Messages List" -msgstr "Message list" +msgstr "List of messages" #: ../../operation/menu.php:417 msgid "New message" @@ -28808,7 +28893,7 @@ msgstr "Create message" #: ../../operation/messages/message_edit.php:60 msgid "This message does not exist in the system" -msgstr "This message doesn't exist on the system." +msgstr "This message does not exist on the system." #: ../../operation/messages/message_edit.php:79 #: ../../operation/messages/message_edit.php:160 @@ -28913,7 +28998,7 @@ msgstr "Message unread - click to read" #: ../../operation/messages/message_list.php:180 msgid "No Subject" -msgstr "No Subject" +msgstr "No subject" #: ../../operation/netflow/nf_live_view.php:108 #: ../../operation/netflow/nf_live_view.php:133 @@ -28928,7 +29013,7 @@ msgstr "nfdump binary (%s) not found!" #: ../../operation/netflow/nf_live_view.php:127 msgid "Make sure nfdump version 1.6.8 or newer is installed!" -msgstr "Make sure that nfdump version 1.6.8 or newer is installed !" +msgstr "Make sure that nfdump version 1.6.8 or newer is installed!" #: ../../operation/netflow/nf_live_view.php:149 msgid "Error creating filter" @@ -28956,11 +29041,12 @@ msgstr "Connection" #: ../../operation/netflow/nf_live_view.php:248 msgid "The interval will be divided in chunks the length of the resolution." -msgstr "The interval will be divided in chunks the length of the resolution." +msgstr "" +"The interval will be divided in chunks withthe length of the resolution." #: ../../operation/netflow/nf_live_view.php:283 msgid "IP address resolution" -msgstr "IP Address Resolution" +msgstr "IP address resolution" #: ../../operation/netflow/nf_live_view.php:335 msgid "Select a filter" @@ -28993,11 +29079,11 @@ msgstr "No filter selected" #: ../../operation/reporting/custom_reporting.php:32 #: ../../operation/reporting/graph_viewer.php:356 msgid "There are no defined reportings" -msgstr "There are no defined reportings" +msgstr "There are no defined reports" #: ../../operation/reporting/graph_viewer.php:196 msgid "No data." -msgstr "No data." +msgstr "No data" #: ../../operation/reporting/graph_viewer.php:228 #: ../../operation/reporting/graph_viewer.php:251 @@ -29007,12 +29093,12 @@ msgstr "Graph defined" #: ../../operation/reporting/graph_viewer.php:235 #: ../../enterprise/dashboard/widgets/custom_graph.php:45 msgid "Horizontal Bars" -msgstr "Horizontal Bars" +msgstr "Horizontal bars" #: ../../operation/reporting/graph_viewer.php:236 #: ../../enterprise/dashboard/widgets/custom_graph.php:46 msgid "Vertical Bars" -msgstr "Vertical Bars" +msgstr "Vertical bars" #: ../../operation/reporting/graph_viewer.php:252 msgid "Zoom x1" @@ -29037,7 +29123,7 @@ msgstr "Custom graph viewer" #: ../../operation/reporting/reporting_viewer.php:147 msgid "View Report" -msgstr "View Report" +msgstr "View report" #: ../../operation/reporting/reporting_viewer.php:186 msgid "Set initial date" @@ -29056,7 +29142,7 @@ msgstr "Zero results found" #: ../../operation/search_helps.php:22 msgid "Zero results found." -msgstr "Zero results found." +msgstr "Zero results found" #: ../../operation/search_helps.php:23 #, php-format @@ -29065,7 +29151,7 @@ msgid "" "href=\"%s\">Pandora's wiki</a>" msgstr "" "You can find more help on the <a style=\"text-decoration: underline;\" " -"href=\"%s\">Pandora wiki</a>" +"href=\"%s\">Pandora FMS wiki</a>" #: ../../operation/search_helps.php:37 msgid "Matches" @@ -29081,7 +29167,7 @@ msgstr "Agents found" #: ../../operation/search_main.php:80 #, php-format msgid "%s Found" -msgstr "%s Found" +msgstr "%s found" #: ../../operation/search_main.php:55 msgid "Modules found" @@ -29134,11 +29220,11 @@ msgstr "Profile" #: ../../operation/servers/recon_view.php:39 #: ../../operation/servers/recon_view.php:54 msgid "Recon View" -msgstr "Recon View" +msgstr "Recon view" #: ../../operation/servers/recon_view.php:33 msgid "Recon Server is disabled" -msgstr "" +msgstr "Recon server is disabled" #: ../../operation/servers/recon_view.php:107 #: ../../operation/servers/recon_view.php:161 @@ -29160,15 +29246,15 @@ msgstr "has no recon tasks assigned" #: ../../operation/snmpconsole/snmp_browser.php:52 msgid "Create network components" -msgstr "" +msgstr "Create network components" #: ../../operation/snmpconsole/snmp_browser.php:59 msgid "Error creating the following modules:" -msgstr "" +msgstr "Error creating the following modules:" #: ../../operation/snmpconsole/snmp_browser.php:69 msgid "Modules successfully created" -msgstr "" +msgstr "Modules successfully created" #: ../../operation/snmpconsole/snmp_browser.php:114 msgid "SNMP Browser" @@ -29216,23 +29302,23 @@ msgid "" "\t\tREMEMBER trap sources need to be searched by IP Address" msgstr "" "Search by any alphanumeric field in the trap.\n" -"\t\tREMEMBER trap sources need to be searched by IP Address" +"\t\tREMEMBER trap sources need to be searched by IP Address." #: ../../operation/snmpconsole/snmp_view.php:476 msgid "From (Date)" -msgstr "" +msgstr "From (Date)" #: ../../operation/snmpconsole/snmp_view.php:478 msgid "To (Date)" -msgstr "" +msgstr "To (Date)" #: ../../operation/snmpconsole/snmp_view.php:481 msgid "From (Time)" -msgstr "" +msgstr "From (Time)" #: ../../operation/snmpconsole/snmp_view.php:483 msgid "To (Time)" -msgstr "" +msgstr "To (Time)" #: ../../operation/snmpconsole/snmp_view.php:488 msgid "Search by trap type" @@ -29244,7 +29330,7 @@ msgstr "Group by Enterprise String/IP" #: ../../operation/snmpconsole/snmp_view.php:559 msgid "There are no SNMP traps in database that contains this filter" -msgstr "" +msgstr "There are no SNMP traps in database containing this filter." #: ../../operation/snmpconsole/snmp_view.php:593 #: ../../enterprise/include/functions_dashboard.php:649 @@ -29258,7 +29344,7 @@ msgstr "Refresh every" #: ../../operation/snmpconsole/snmp_view.php:635 msgid "SNMP Traps" -msgstr "" +msgstr "SNMP Traps" #: ../../operation/snmpconsole/snmp_view.php:723 msgid "Trap subtype" @@ -29330,7 +29416,7 @@ msgstr "policies" #: ../../operation/tree.php:144 msgid "Search group" -msgstr "" +msgstr "Search group" #: ../../operation/tree.php:150 msgid "Search agent" @@ -29338,7 +29424,7 @@ msgstr "Search agent" #: ../../operation/tree.php:153 msgid "Show full hirearchy" -msgstr "" +msgstr "Show full hierarchy" #: ../../operation/tree.php:156 msgid "Agent status" @@ -29355,7 +29441,7 @@ msgstr "Tree search" #: ../../operation/tree.php:286 #: ../../enterprise/dashboard/widgets/tree_view.php:198 msgid "Found items" -msgstr "" +msgstr "Found items" #: ../../operation/tree.php:294 #: ../../enterprise/dashboard/widgets/tree_view.php:206 @@ -29371,22 +29457,22 @@ msgstr "Critical agents" #: ../../operation/tree.php:308 #: ../../enterprise/dashboard/widgets/tree_view.php:220 msgid "Warning agents" -msgstr "Agents in 'Warning' status" +msgstr "Agents in 'warning' status" #: ../../operation/tree.php:313 #: ../../enterprise/dashboard/widgets/tree_view.php:225 msgid "Unknown agents" -msgstr "Agents in 'Unknown' status" +msgstr "Agents in 'unknown' status" #: ../../operation/tree.php:318 #: ../../enterprise/dashboard/widgets/tree_view.php:230 msgid "Not init agents" -msgstr "Uninitialised agents" +msgstr "Not initialized agents" #: ../../operation/tree.php:323 #: ../../enterprise/dashboard/widgets/tree_view.php:235 msgid "Normal agents" -msgstr "Agents in 'Normal' status" +msgstr "Agents in 'normal' status" #: ../../operation/users/user_edit.php:132 #: ../../operation/users/user_edit.php:139 @@ -29403,7 +29489,7 @@ msgstr "Error updating passwords: %s" msgid "" "Passwords didn't match or other problem encountered while updating passwords" msgstr "" -"The passwords didn't match or another problem occurred during password " +"The passwords did not match or another problem occurred during password " "update." #: ../../operation/users/user_edit.php:157 @@ -29413,25 +29499,25 @@ msgstr "Error updating user info" #: ../../operation/users/user_edit.php:177 msgid "Edit my User" -msgstr "Edit my User" +msgstr "Edit my user" #: ../../operation/users/user_edit.php:221 #: ../../enterprise/include/process_reset_pass.php:99 #: ../../enterprise/meta/include/process_reset_pass.php:76 msgid "New Password" -msgstr "New Password" +msgstr "New password" #: ../../operation/users/user_edit.php:231 msgid "" "You can not change your password from Pandora FMS under the current " "authentication scheme" msgstr "" -"You can not change your password from Pandora FMS under the current " -"authentication scheme" +"You cannot change your password from Pandora FMS under the current " +"authentication scheme." #: ../../operation/users/user_edit.php:240 msgid "If checkbox is clicked then block size global configuration is used" -msgstr "If checkbox is clicked then block size global configuration is used" +msgstr "If checkbox is clicked then block size global configuration is used." #: ../../operation/users/user_edit.php:342 msgid "Show information" @@ -29443,7 +29529,7 @@ msgstr "Event filter" #: ../../operation/users/user_edit.php:353 msgid "Newsletter Subscribed" -msgstr "Newsletter Subscribed" +msgstr "Subscribed to newsletter" #: ../../operation/users/user_edit.php:355 msgid "Already subscribed to Pandora FMS newsletter" @@ -29451,7 +29537,7 @@ msgstr "Already subscribed to Pandora FMS newsletter" #: ../../operation/users/user_edit.php:361 msgid "Newsletter Reminder" -msgstr "Newsletter Reminder" +msgstr "Newsletter reminder" #: ../../operation/users/user_edit.php:422 msgid "Autorefresh" @@ -29479,19 +29565,19 @@ msgstr "Pop selected pages out of autorefresh list" #: ../../operation/users/user_edit.php:451 msgid "Time autorefresh" -msgstr "" +msgstr "Time autorefresh" #: ../../operation/users/user_edit.php:480 msgid "" "You can not change your user info from Pandora FMS under the current " "authentication scheme" msgstr "" -"You can not change your user info from Pandora FMS under the current " -"authentication scheme" +"You cannot change your user info from Pandora FMS under the current " +"authentication scheme." #: ../../operation/users/user_edit.php:552 msgid "This user doesn't have any assigned profile/group." -msgstr "This user doesn't have any profile/group assigned" +msgstr "This user does not have any profile/group assigned." #: ../../operation/users/user_edit.php:721 msgid "Double autentication information" @@ -29512,12 +29598,12 @@ msgstr "Deactivate" #: ../../operation/users/user_edit.php:843 msgid "The double autentication was deactivated successfully" -msgstr "Double authentication was deactivated successfully" +msgstr "Double authentication deactivated successfully" #: ../../operation/users/user_edit.php:846 #: ../../operation/users/user_edit.php:850 msgid "There was an error deactivating the double autentication" -msgstr "There was an error deactivating the double autentication" +msgstr "Error deactivating the double authentication" #: ../../operation/users/webchat.php:71 msgid "Webchat" @@ -29525,23 +29611,23 @@ msgstr "Webchat" #: ../../operation/users/webchat.php:82 msgid "Users Online" -msgstr "Users Online" +msgstr "Users online" #: ../../operation/users/webchat.php:157 msgid "Connection established...get last 24h messages..." -msgstr "Connection established - retrieving messages from the past 24hs." +msgstr "Connection established - retrieving messages from the past 24h" #: ../../operation/users/webchat.php:168 msgid "Error in connection." -msgstr "Error in connection." +msgstr "Connection error" #: ../../operation/users/webchat.php:249 msgid "Error sendding message." -msgstr "Error sending message." +msgstr "Error sending message" #: ../../operation/users/webchat.php:277 msgid "Error login." -msgstr "Login error." +msgstr "Login error" #: ../../enterprise/dashboard/dashboards.php:34 #: ../../enterprise/mobile/operation/home.php:35 @@ -29550,7 +29636,7 @@ msgstr "Dashboards" #: ../../enterprise/dashboard/dashboards.php:61 msgid "Successfully duplicate" -msgstr "Successfully duplicate" +msgstr "Successfully duplicated" #: ../../enterprise/dashboard/dashboards.php:62 msgid "Could not be duplicate" @@ -29564,7 +29650,7 @@ msgstr "Cells" #: ../../enterprise/dashboard/dashboards.php:114 msgid "There are no dashboards defined." -msgstr "There are no dashboards defined." +msgstr "No dashboards defined" #: ../../enterprise/dashboard/dashboards.php:132 #, php-format @@ -29573,7 +29659,7 @@ msgstr "Private for (%s)" #: ../../enterprise/dashboard/dashboards.php:169 msgid "New dashboard" -msgstr "" +msgstr "New dashboard" #: ../../enterprise/dashboard/full_dashboard.php:51 #: ../../enterprise/dashboard/public_dashboard.php:67 @@ -29586,7 +29672,7 @@ msgstr "Show link to public dashboard" #: ../../enterprise/dashboard/main_dashboard.php:176 msgid "Back to dashboards list" -msgstr "" +msgstr "Back to dashboard list" #: ../../enterprise/dashboard/main_dashboard.php:182 msgid "Save the actual layout design" @@ -29599,13 +29685,15 @@ msgstr "Slides mode" #: ../../enterprise/dashboard/main_dashboard.php:326 msgid "Items slideshow" -msgstr "" +msgstr "Items slideshow" #: ../../enterprise/dashboard/main_dashboard.php:331 msgid "" "If enabled, all items of this dashboard will be shown individually into " "fullscreen mode" msgstr "" +"If enabled, all items of this dashboard will be shown individually into " +"fullscreen mode" #: ../../enterprise/dashboard/main_dashboard.php:361 msgid "Private dashboard" @@ -29613,11 +29701,11 @@ msgstr "Private dashboard" #: ../../enterprise/dashboard/main_dashboard.php:381 msgid "Error: there are cells not empty." -msgstr "Error: there are cells not empty." +msgstr "Error: cells cannot be empty" #: ../../enterprise/dashboard/main_dashboard.php:386 msgid "Error save conf dashboard" -msgstr "" +msgstr "Error saving dashboard configuration" #: ../../enterprise/dashboard/main_dashboard.php:468 msgid "Add widget" @@ -29632,12 +29720,12 @@ msgid "" "Error, you are trying to add a widget in a empty cell. Please save the " "layout before to add any widget in this cell." msgstr "" -"Error, you are trying to add a widget in a empty cell. Please save the " -"layout before to add any widget in this cell." +"Error, you are trying to add a widget in an empty cell. Please save the " +"layout before adding any widget in this cell." #: ../../enterprise/dashboard/main_dashboard.php:481 msgid "There are unsaved changes" -msgstr "There are unsaved changes" +msgstr "There are unsaved changes." #: ../../enterprise/dashboard/main_dashboard.php:539 #: ../../enterprise/include/functions_dashboard.php:995 @@ -29646,7 +29734,7 @@ msgstr "Slides" #: ../../enterprise/dashboard/widget.php:68 msgid "Empty for a transparent background color or CSS compatible value" -msgstr "Empty for a transparent background color or CSS compatible value" +msgstr "Empty for a transparent background colour or CSS compatible value" #: ../../enterprise/dashboard/widget.php:317 msgid "Configure widget" @@ -29658,31 +29746,31 @@ msgstr "Delete widget" #: ../../enterprise/dashboard/widget.php:379 msgid "Config widget" -msgstr "Config widget" +msgstr "Configure widget" #: ../../enterprise/dashboard/widget.php:389 #: ../../enterprise/dashboard/widgets/agent_module.php:404 msgid "Please configure this widget before usage" -msgstr "Please configure this widget before usage" +msgstr "Please configure this widget before using it" #: ../../enterprise/dashboard/widget.php:392 msgid "Widget cannot be loaded" -msgstr "Cannot load widget." +msgstr "Error loading widget" #: ../../enterprise/dashboard/widget.php:393 msgid "Please, configure the widget again to recover it" -msgstr "Please configure the widget again to recover it" +msgstr "Please configure the widget again to recover it." #: ../../enterprise/dashboard/widget.php:495 msgid "" "If propagate acl is activated, this group will include its child groups" msgstr "" -"If propagate acl is activated, this group will include its child groups" +"If propagate ACL is activated, this group will include its child groups." #: ../../enterprise/dashboard/widgets/agent_module.php:30 #: ../../enterprise/dashboard/widgets/agent_module.php:32 msgid "Show Agent/Module View" -msgstr "" +msgstr "Show Agent/Module View" #: ../../enterprise/dashboard/widgets/agent_module.php:427 #: ../../enterprise/dashboard/widgets/custom_graph.php:93 @@ -29704,15 +29792,15 @@ msgstr "" #: ../../enterprise/dashboard/widgets/sla_percent.php:96 #: ../../enterprise/dashboard/widgets/sla_percent.php:103 msgid "You don't have access" -msgstr "You don't have access" +msgstr "You don't have access." #: ../../enterprise/dashboard/widgets/alerts_fired.php:24 msgid "Alerts Fired" -msgstr "Alerts Fired" +msgstr "Triggered alerts" #: ../../enterprise/dashboard/widgets/alerts_fired.php:26 msgid "Alerts Fired report" -msgstr "Alerts Fired report" +msgstr "Triggered alerts report" #: ../../enterprise/dashboard/widgets/custom_graph.php:27 msgid "Show a defined custom graph" @@ -29725,7 +29813,7 @@ msgstr "Stacked" #: ../../enterprise/dashboard/widgets/events_list.php:28 msgid "Latest events list" -msgstr "Latest events list" +msgstr "List of latest events" #: ../../enterprise/dashboard/widgets/events_list.php:39 msgid "Limit" @@ -29748,14 +29836,14 @@ msgstr "Welcome" msgid "" "This is an example of a dashboard widget. A widget may contain elements" msgstr "" -"This is an example of a dashboard widget. A widget may contain elements" +"This is an example of a dashboard widget. A widget may contain elements." #: ../../enterprise/dashboard/widgets/example.php:41 msgid "" "To add more elements, click on \"<em>Add widgets</em>\" on the top of this " "page." msgstr "" -"To add more elements, click on \"<em>Add widgets</em>\" on the top of this " +"To add more elements, click on '<em>Add widgets</em>' on the top of this " "page." #: ../../enterprise/dashboard/widgets/example.php:42 @@ -29764,8 +29852,8 @@ msgid "" "To delete this message, click on the delete button on top right corner of " "this element." msgstr "" -"To delete this message, click on the delete button on top right corner of " -"this element." +"To delete this message, click on the delete button on the top right corner " +"of this element." #: ../../enterprise/dashboard/widgets/example.php:43 msgid "" @@ -29775,32 +29863,32 @@ msgstr "" #: ../../enterprise/dashboard/widgets/example.php:45 msgid "Thanks for using Pandora FMS" -msgstr "Thanks for using Pandora FMS." +msgstr "Thank you for using Pandora FMS." #: ../../enterprise/dashboard/widgets/graph_module_histogram.php:30 #: ../../enterprise/dashboard/widgets/graph_module_histogram.php:32 msgid "Graph Module Histogram" -msgstr "" +msgstr "Graph histogram of the module" #: ../../enterprise/dashboard/widgets/graph_module_histogram.php:64 #: ../../enterprise/dashboard/widgets/sla_percent.php:63 msgid "2 Hours" -msgstr "" +msgstr "2 hours" #: ../../enterprise/dashboard/widgets/graph_module_histogram.php:65 #: ../../enterprise/dashboard/widgets/sla_percent.php:64 msgid "12 Hours" -msgstr "" +msgstr "12 hours" #: ../../enterprise/dashboard/widgets/graph_module_histogram.php:66 #: ../../enterprise/dashboard/widgets/sla_percent.php:65 msgid "24 Hours" -msgstr "" +msgstr "24 hours" #: ../../enterprise/dashboard/widgets/graph_module_histogram.php:67 #: ../../enterprise/dashboard/widgets/sla_percent.php:66 msgid "48 Hours" -msgstr "" +msgstr "48 hours" #: ../../enterprise/dashboard/widgets/graph_module_histogram.php:72 #: ../../enterprise/dashboard/widgets/module_icon.php:89 @@ -29816,15 +29904,15 @@ msgstr "Show the URL content" #: ../../enterprise/dashboard/widgets/url.php:28 msgid "Only embebed urls can be shown, be sure that the url is embebed." -msgstr "" +msgstr "Only embedded URLs can be shown, make sure that the URL is embedded." #: ../../enterprise/dashboard/widgets/url.php:29 msgid "For example: " -msgstr "" +msgstr "For example: " #: ../../enterprise/dashboard/widgets/url.php:30 msgid " must be " -msgstr "" +msgstr " must be " #: ../../enterprise/dashboard/widgets/url.php:32 msgid "My URL" @@ -29835,7 +29923,7 @@ msgstr "My URL" #: ../../enterprise/dashboard/widgets/tactical.php:63 #: ../../enterprise/dashboard/widgets/tactical.php:71 msgid "Please, configure this widget before use" -msgstr "Please configure this widget before usage" +msgstr "Please configure this widget before using it." #: ../../enterprise/dashboard/widgets/groups_status.php:24 msgid "Groups status" @@ -29848,23 +29936,23 @@ msgstr "General and quick group status report" #: ../../enterprise/dashboard/widgets/groups_status.php:87 #: ../../enterprise/dashboard/widgets/groups_status.php:159 msgid "Total nº:" -msgstr "" +msgstr "Total nº:" #: ../../enterprise/dashboard/widgets/groups_status.php:217 msgid "Not agents in this group" -msgstr "" +msgstr "No agents in this group" #: ../../enterprise/dashboard/widgets/maps_made_by_user.php:28 msgid "Vsiual Console" -msgstr "" +msgstr "Visual Console" #: ../../enterprise/dashboard/widgets/maps_made_by_user.php:30 msgid "Show a Visual Console" -msgstr "" +msgstr "Show a Visual Console" #: ../../enterprise/dashboard/widgets/maps_made_by_user.php:33 msgid "WARNING: " -msgstr "" +msgstr "WARNING: " #: ../../enterprise/dashboard/widgets/maps_made_by_user.php:33 msgid "" @@ -29873,6 +29961,10 @@ msgid "" "you want to \"fit\" a visual console into a widget, create it with the real " "size you want to be fitter inside the widget." msgstr "" +"If your visual console is larger than the size of the widget, it will not " +"fit in the widget. Instead, both vertical and horizontal scroll bars will be " +"drawn. If you want to 'fit' a visual console into a widget, create it with " +"the real size in order to make it fit in the widget." #: ../../enterprise/dashboard/widgets/maps_made_by_user.php:36 msgid "Layout" @@ -29880,7 +29972,7 @@ msgstr "Layout" #: ../../enterprise/dashboard/widgets/maps_status.php:25 msgid "Maps status" -msgstr "Maps status" +msgstr "Map status" #: ../../enterprise/dashboard/widgets/maps_status.php:27 msgid "General and quick visual maps report" @@ -29924,15 +30016,15 @@ msgstr "Show a value of module in a table" #: ../../enterprise/dashboard/widgets/module_table_value.php:74 msgid "Separator of data" -msgstr "Separator of data" +msgstr "Data separator" #: ../../enterprise/dashboard/widgets/module_table_value.php:76 msgid "Carriage Return" -msgstr "Carriage Return" +msgstr "Carriage return" #: ../../enterprise/dashboard/widgets/module_table_value.php:77 msgid "Vertical Bar" -msgstr "Vertical Bar" +msgstr "Vertical bar" #: ../../enterprise/dashboard/widgets/module_table_value.php:78 msgid "Semicolon" @@ -29968,27 +30060,27 @@ msgstr "Show a list of global monitor health" #: ../../enterprise/dashboard/widgets/network_map.php:31 msgid "Show a map of the monitored network" -msgstr "Show a map of the monitored network." +msgstr "Show a map of the monitored network" #: ../../enterprise/dashboard/widgets/network_map.php:43 msgid "X offset" -msgstr "" +msgstr "X offset" #: ../../enterprise/dashboard/widgets/network_map.php:46 msgid "Introduce x-axis data. Right=positive Left=negative" -msgstr "" +msgstr "Introduce x-axis data. Right = positive / Left = negative" #: ../../enterprise/dashboard/widgets/network_map.php:48 msgid "Y offset" -msgstr "" +msgstr "Y offset" #: ../../enterprise/dashboard/widgets/network_map.php:51 msgid "Introduce Y-axis data. Top=positive Bottom=negative" -msgstr "" +msgstr "Introduce Y-axis data. Top = positive / Bottom = negative" #: ../../enterprise/dashboard/widgets/network_map.php:54 msgid "Zoom level" -msgstr "" +msgstr "Zoom level" #: ../../enterprise/dashboard/widgets/post.php:23 msgid "Panel with a message" @@ -29996,7 +30088,7 @@ msgstr "Panel with a message" #: ../../enterprise/dashboard/widgets/post.php:26 msgid "My Post" -msgstr "My Post" +msgstr "My post" #: ../../enterprise/dashboard/widgets/reports.php:29 msgid "Show a report made by user" @@ -30006,7 +30098,7 @@ msgstr "Show a report made by user" #: ../../enterprise/operation/services/services.service.php:92 #: ../../enterprise/operation/services/services.service_map.php:100 msgid "Service Map" -msgstr "Service Map" +msgstr "Service map" #: ../../enterprise/dashboard/widgets/service_map.php:24 msgid "Show a service map" @@ -30014,11 +30106,11 @@ msgstr "Show a service map" #: ../../enterprise/dashboard/widgets/service_map.php:57 msgid "The user doesn't have permission to read agents" -msgstr "The user doesn't have permission to read agents" +msgstr "The user does not have permission to read agents" #: ../../enterprise/dashboard/widgets/service_map.php:62 msgid "Missing id" -msgstr "Missing id" +msgstr "Missing ID" #: ../../enterprise/dashboard/widgets/single_graph.php:29 msgid "Single graph" @@ -30030,28 +30122,28 @@ msgstr "Show a graph of an agent module" #: ../../enterprise/dashboard/widgets/single_graph.php:66 msgid "Show full legend" -msgstr "" +msgstr "Show full legend" #: ../../enterprise/dashboard/widgets/single_graph.php:72 msgid "Graph colour (max)" -msgstr "" +msgstr "Graph colour (max)" #: ../../enterprise/dashboard/widgets/single_graph.php:73 msgid "Graph colour (avg)" -msgstr "" +msgstr "Graph colour (avg)" #: ../../enterprise/dashboard/widgets/single_graph.php:74 msgid "Graph colour (min)" -msgstr "" +msgstr "Graph colour (min)" #: ../../enterprise/dashboard/widgets/sla_percent.php:29 #: ../../enterprise/dashboard/widgets/sla_percent.php:31 msgid "Show SLA percent" -msgstr "" +msgstr "Show SLA percent" #: ../../enterprise/dashboard/widgets/top_n.php:34 msgid "Show a top n of agents modules." -msgstr "Show a top n of agents modules." +msgstr "Show top N of agents modules" #: ../../enterprise/dashboard/widgets/top_n.php:108 msgid "" @@ -30067,11 +30159,11 @@ msgstr "avg" #: ../../enterprise/dashboard/widgets/top_n.php:272 msgid "Selection module one by one" -msgstr "Selection module one by one" +msgstr "Selection modules one by one" #: ../../enterprise/dashboard/widgets/top_n.php:283 msgid "Selection several modules" -msgstr "Selection several modules" +msgstr "Select several modules" #: ../../enterprise/dashboard/widgets/top_n.php:311 msgid "Regex for to filter modules" @@ -30084,11 +30176,11 @@ msgstr "Filter modules" #: ../../enterprise/dashboard/widgets/top_n_events_by_group.php:26 msgid "Top N Events by agent." -msgstr "Top N Events by agent." +msgstr "Top N events by agent" #: ../../enterprise/dashboard/widgets/top_n_events_by_group.php:28 msgid "Top N events by agent." -msgstr "Top N events by agent." +msgstr "Top N events by agent" #: ../../enterprise/dashboard/widgets/top_n_events_by_group.php:31 #: ../../enterprise/dashboard/widgets/top_n_events_by_module.php:31 @@ -30098,7 +30190,7 @@ msgstr "Amount to show" #: ../../enterprise/dashboard/widgets/top_n_events_by_group.php:39 #: ../../enterprise/dashboard/widgets/top_n_events_by_module.php:39 msgid "Legend Position" -msgstr "Legend Position" +msgstr "Legend position" #: ../../enterprise/dashboard/widgets/top_n_events_by_group.php:43 #: ../../enterprise/dashboard/widgets/top_n_events_by_module.php:43 @@ -30108,26 +30200,26 @@ msgstr "No legend" #: ../../enterprise/dashboard/widgets/top_n_events_by_group.php:63 #: ../../enterprise/dashboard/widgets/top_n_events_by_module.php:64 msgid "Please select one or more groups." -msgstr "Please select one or more groups." +msgstr "Please select one or more groups" #: ../../enterprise/dashboard/widgets/top_n_events_by_group.php:124 #: ../../enterprise/dashboard/widgets/top_n_events_by_module.php:129 msgid "There is not data to show." -msgstr "There is not data to show." +msgstr "There is no data to show." #: ../../enterprise/dashboard/widgets/top_n_events_by_module.php:26 msgid "Top N Events by module." -msgstr "Top N Events by module." +msgstr "Top N events by module" #: ../../enterprise/dashboard/widgets/top_n_events_by_module.php:28 msgid "Top N events by module." -msgstr "Top N events by module." +msgstr "Top N events by module" #: ../../enterprise/dashboard/widgets/tree_view.php:24 #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1212 #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1416 msgid "Tree View" -msgstr "Tree View" +msgstr "Tree view" #: ../../enterprise/dashboard/widgets/tree_view.php:26 msgid "Show the tree view" @@ -30158,8 +30250,8 @@ msgid "" "The user doesn't have permission to read agents. Please contact with your " "pandora administrator." msgstr "" -"The user doesn't have permission to read agents. Please contact with your " -"pandora administrator." +"The user does not have permission to read agents. Please contact with your " +"Pandora FMS administrator." #: ../../enterprise/dashboard/widgets/tree_view.php:91 msgid "This widget only working in desktop version." @@ -30168,46 +30260,46 @@ msgstr "This widget will only work on desktop version." #: ../../enterprise/dashboard/widgets/ux_transaction.php:27 #: ../../enterprise/dashboard/widgets/ux_transaction.php:80 msgid "Ux transaction" -msgstr "" +msgstr "UX transaction" #: ../../enterprise/dashboard/widgets/ux_transaction.php:31 msgid "Show an agent ux transaction" -msgstr "" +msgstr "Show an agent UX transaction" #: ../../enterprise/dashboard/widgets/wux_transaction.php:27 #: ../../enterprise/dashboard/widgets/wux_transaction.php:80 #: ../../enterprise/dashboard/widgets/wux_transaction_stats.php:88 msgid "Wux transaction" -msgstr "" +msgstr "WUX transaction" #: ../../enterprise/dashboard/widgets/wux_transaction.php:31 msgid "Show agent wux transaction" -msgstr "" +msgstr "Show agent WUX transaction" #: ../../enterprise/dashboard/widgets/wux_transaction_stats.php:27 msgid "Wux transaction stats" -msgstr "" +msgstr "WUX transaction statistics" #: ../../enterprise/dashboard/widgets/wux_transaction_stats.php:31 msgid "Show agent wux transaction stats" -msgstr "" +msgstr "Show agent WUX transaction statistics" #: ../../enterprise/dashboard/widgets/wux_transaction_stats.php:43 #: ../../enterprise/operation/agentes/wux_console_view.php:396 msgid "View all stats" -msgstr "" +msgstr "View all statistics" #: ../../enterprise/extensions/backup/main.php:63 msgid "Pandora database backup utility" -msgstr "Pandora database backup utility" +msgstr "Pandora FMS database backup utility" #: ../../enterprise/extensions/backup/main.php:70 msgid "Filter backups" -msgstr "" +msgstr "Filter backups" #: ../../enterprise/extensions/backup/main.php:82 msgid "Path backups" -msgstr "" +msgstr "Path backups" #: ../../enterprise/extensions/backup/main.php:102 #: ../../enterprise/extensions/cron/main.php:361 @@ -30221,7 +30313,7 @@ msgstr "Lost" #: ../../enterprise/extensions/backup/main.php:198 msgid "Backups list" -msgstr "Backups list" +msgstr "List of backups" #: ../../enterprise/extensions/backup/main.php:203 msgid "Create backup" @@ -30229,7 +30321,7 @@ msgstr "Create backup" #: ../../enterprise/extensions/backup/main.php:217 msgid "Path to save backup" -msgstr "" +msgstr "Path to save backup" #: ../../enterprise/extensions/backup.php:63 msgid "Backup" @@ -30242,22 +30334,22 @@ msgstr "Backup" #: ../../enterprise/extensions/cron/functions.php:142 #: ../../enterprise/extensions/cron/functions.php:183 msgid "Report to build" -msgstr "Report to build" +msgstr "Report pending to be created" #: ../../enterprise/extensions/cron/functions.php:23 #: ../../enterprise/extensions/cron/functions.php:48 msgid "Send to emails (separated by comma)" -msgstr "Send to e-mail addresses (separated by a comma)" +msgstr "Send to email addresses (separated by a comma)" #: ../../enterprise/extensions/cron/functions.php:27 #: ../../enterprise/extensions/cron/functions.php:127 msgid "Template to build" -msgstr "" +msgstr "Template pending to be created" #: ../../enterprise/extensions/cron/functions.php:46 #: ../../enterprise/extensions/cron/main.php:318 msgid "Report per agent" -msgstr "" +msgstr "Report per agent" #: ../../enterprise/extensions/cron/functions.php:59 #: ../../enterprise/extensions/cron/functions.php:67 @@ -30270,20 +30362,20 @@ msgstr "Save to disk in path" #: ../../enterprise/extensions/cron/functions.php:60 #: ../../enterprise/extensions/cron/functions.php:85 msgid "The apache user should have read-write access on this folder. Ex: " -msgstr "" +msgstr "The Apache user should have read-write access on this folder. E.g. " #: ../../enterprise/extensions/cron/functions.php:113 #: ../../enterprise/extensions/cron/functions.php:128 msgid "Send to email" -msgstr "Send to e-mail" +msgstr "Send to email" #: ../../enterprise/extensions/cron/functions.php:114 msgid "Send custom report by email" -msgstr "Send custom report by e-mail" +msgstr "Send custom report by email" #: ../../enterprise/extensions/cron/functions.php:129 msgid "Send custom report (from template) by email" -msgstr "" +msgstr "Send custom report (from template) by email" #: ../../enterprise/extensions/cron/functions.php:144 #: ../../enterprise/extensions/cron/functions.php:185 @@ -30292,15 +30384,15 @@ msgstr "Save custom report to disk" #: ../../enterprise/extensions/cron/functions.php:157 msgid "Backup Pandora database" -msgstr "Backup Pandora database" +msgstr "Backup Pandora FMS database" #: ../../enterprise/extensions/cron/functions.php:170 msgid "Execute custom script" -msgstr "" +msgstr "Execute custom script" #: ../../enterprise/extensions/cron/functions.php:186 msgid "Save custom xml report to disk" -msgstr "" +msgstr "Save custom XML report to disk" #: ../../enterprise/extensions/cron/functions.php:201 msgid "Not scheduled" @@ -30314,32 +30406,32 @@ msgstr "Hourly" #: ../../enterprise/extensions/cron/functions.php:206 #: ../../enterprise/extensions/vmware/functions.php:29 msgid "Yearly" -msgstr "Annually" +msgstr "Yearly" #: ../../enterprise/extensions/cron/functions.php:489 #: ../../enterprise/extensions/cron/functions.php:595 msgid "Greetings" -msgstr "" +msgstr "Greetings" #: ../../enterprise/extensions/cron/functions.php:491 #: ../../enterprise/extensions/cron/functions.php:597 msgid "Attached to this email there's a PDF file of the" -msgstr "" +msgstr "Attached to this email there is a PDF file of the" #: ../../enterprise/extensions/cron/functions.php:491 #: ../../enterprise/extensions/cron/functions.php:597 msgid "report" -msgstr "" +msgstr "report" #: ../../enterprise/extensions/cron/functions.php:495 #: ../../enterprise/extensions/cron/functions.php:601 msgid "Thanks for your time." -msgstr "" +msgstr "Thank you for your time." #: ../../enterprise/extensions/cron/functions.php:497 #: ../../enterprise/extensions/cron/functions.php:603 msgid "Best regards, Pandora FMS" -msgstr "" +msgstr "Best regards, Pandora FMS" #: ../../enterprise/extensions/cron/functions.php:499 #: ../../enterprise/extensions/cron/functions.php:605 @@ -30347,6 +30439,8 @@ msgid "" "This is an automatically generated email from Pandora FMS, please do not " "reply." msgstr "" +"This is an automatically generated email from Pandora FMS, please do not " +"reply." #: ../../enterprise/extensions/cron/main.php:46 #: ../../enterprise/extensions/cron.php:118 @@ -30363,11 +30457,11 @@ msgstr "Add new job" #: ../../enterprise/extensions/cron/main.php:123 #: ../../enterprise/extensions/cron/main.php:183 msgid "Path doesn't exists or is not writable" -msgstr "Path doesn't exist or is not writable." +msgstr "Path does not exist or is not writable." #: ../../enterprise/extensions/cron/main.php:102 msgid "Only administrator users can create this type of functions" -msgstr "" +msgstr "Only administrator users can create this type of functions." #: ../../enterprise/extensions/cron/main.php:158 #: ../../enterprise/extensions/cron/main.php:176 @@ -30376,7 +30470,7 @@ msgstr "Edit job" #: ../../enterprise/extensions/cron/main.php:202 msgid "Cron extension has never run or it's not configured well" -msgstr "Cron extension has never run or it's not configured well." +msgstr "Cron extension has never run or is not well configured." #: ../../enterprise/extensions/cron/main.php:205 msgid "" @@ -30388,7 +30482,7 @@ msgstr "" #: ../../enterprise/extensions/cron/main.php:206 msgid "Please, add the following line to your crontab file" -msgstr "Please add the following line to your crontab file" +msgstr "Please add the following line to your crontab file." #: ../../enterprise/extensions/cron/main.php:211 msgid "Last execution" @@ -30417,11 +30511,11 @@ msgstr "Scheduled" #: ../../enterprise/extensions/cron/main.php:249 #: ../../enterprise/extensions/cron/main.php:475 msgid "Next execution" -msgstr "" +msgstr "Next execution" #: ../../enterprise/extensions/cron/main.php:250 msgid "Last run" -msgstr "Last run" +msgstr "Last execution" #: ../../enterprise/extensions/cron/main.php:263 #: ../../enterprise/extensions/cron/main.php:288 @@ -30430,27 +30524,27 @@ msgstr "Last run" #: ../../enterprise/extensions/cron/main.php:368 #: ../../enterprise/extensions/cron/main.php:393 msgid "Force run" -msgstr "Force run" +msgstr "Force execution" #: ../../enterprise/extensions/csv_import/main.php:39 msgid "No data or wrong separator in line " -msgstr "" +msgstr "No data or wrong separator in line " #: ../../enterprise/extensions/csv_import/main.php:42 msgid "Agent " -msgstr "" +msgstr "Agent " #: ../../enterprise/extensions/csv_import/main.php:42 msgid " duplicated" -msgstr "" +msgstr " duplicated" #: ../../enterprise/extensions/csv_import/main.php:45 msgid "Id group " -msgstr "" +msgstr "ID group " #: ../../enterprise/extensions/csv_import/main.php:45 msgid " in line " -msgstr "" +msgstr " in line " #: ../../enterprise/extensions/csv_import/main.php:52 #, php-format @@ -30517,7 +30611,7 @@ msgstr "ACL users for this agent" #: ../../enterprise/extensions/disabled/check_acls.php:100 msgid "There are no defined users" -msgstr "There are no defined users" +msgstr "There are no defined users." #: ../../enterprise/extensions/disabled/check_acls.php:188 msgid "ACL module tags for the modules in this agent" @@ -30551,19 +30645,19 @@ msgstr "Wrong format in Subnet field" #: ../../enterprise/extensions/ipam/ipam_action.php:83 #: ../../enterprise/extensions/ipam/ipam_action.php:120 msgid "The location is not filled, please add a location." -msgstr "The location is not filled, please add a location." +msgstr "The location has not been indicated, please add a location." #: ../../enterprise/extensions/ipam/ipam_action.php:194 msgid "Successfully updated." -msgstr "Successfully updated." +msgstr "Successfully updated" #: ../../enterprise/extensions/ipam/ipam_ajax.php:84 msgid "There is not an available IP." -msgstr "There is not an available IP." +msgstr "There are no available IP addresses." #: ../../enterprise/extensions/ipam/ipam_ajax.php:87 msgid "Next available IP Address is:" -msgstr "Next available IP Address is:" +msgstr "Next available IP address is:" #: ../../enterprise/extensions/ipam/ipam_ajax.php:110 msgid "Reserve this IP now" @@ -30587,7 +30681,7 @@ msgstr "Operating system" #: ../../enterprise/extensions/ipam/ipam_ajax.php:177 msgid "This agent has other IPs" -msgstr "This agent has other IPs" +msgstr "This agent has other IPs." #: ../../enterprise/extensions/ipam/ipam_ajax.php:186 msgid "Generate events" @@ -30728,7 +30822,7 @@ msgstr "Scan interval" #: ../../enterprise/extensions/ipam/ipam_editor.php:93 msgid "0 for manually scan" -msgstr "0 for manually scan" +msgstr "0 for manual scan" #: ../../enterprise/extensions/ipam/ipam_editor.php:98 msgid "Operator users" @@ -30750,19 +30844,19 @@ msgstr "Alive" #: ../../enterprise/extensions/ipam/ipam_excel.php:125 msgid "OS Name" -msgstr "" +msgstr "OS name" #: ../../enterprise/extensions/ipam/ipam_excel.php:128 msgid "Created at" -msgstr "" +msgstr "Created at" #: ../../enterprise/extensions/ipam/ipam_excel.php:129 msgid "Last updated" -msgstr "" +msgstr "Last update" #: ../../enterprise/extensions/ipam/ipam_excel.php:130 msgid "Last modified" -msgstr "" +msgstr "Last modification" #: ../../enterprise/extensions/ipam/ipam_list.php:133 msgid "No networks found" @@ -30819,7 +30913,7 @@ msgstr "Unmanaged" #: ../../enterprise/extensions/ipam/ipam_network.php:239 msgid "Not Reserved" -msgstr "Not Reserved" +msgstr "Not reserved" #: ../../enterprise/extensions/ipam/ipam_network.php:272 msgid "DESC" @@ -30860,7 +30954,7 @@ msgstr "Big" #: ../../enterprise/extensions/ipam/ipam_network.php:289 msgid "Tiny" -msgstr "Tiny" +msgstr "Small" #: ../../enterprise/extensions/ipam/ipam_network.php:290 msgid "Icons style" @@ -30940,129 +31034,129 @@ msgstr "IPAM" #: ../../enterprise/extensions/resource_exportation/functions.php:19 msgid "Export agents" -msgstr "" +msgstr "Export agents" #: ../../enterprise/extensions/resource_registration/functions.php:37 #, php-format msgid "Error create '%s' policy, the name exist and there aren't free name." msgstr "" -"Error create '%s' policy, the name exists and there aren't free names." +"Error creating '%s' policy, the name exists and there are no free names." #: ../../enterprise/extensions/resource_registration/functions.php:44 #, php-format msgid "" "Warning create '%s' policy, the name exist, the policy have a name %s." msgstr "" -"Warning on creating '%s' policy, the name exists and the policy has the name " -"%s." +"Warning when creating '%s' policy, the name exists and the policy has the " +"name %s." #: ../../enterprise/extensions/resource_registration/functions.php:51 msgid "Error the policy haven't name." -msgstr "Error. The policy doesn't have a name." +msgstr "Error. The policy does not have a name." #: ../../enterprise/extensions/resource_registration/functions.php:65 #, php-format msgid "Success create '%s' policy." -msgstr "Success in creating '%s' policy." +msgstr "'%s' policy successfully created" #: ../../enterprise/extensions/resource_registration/functions.php:66 #, php-format msgid "Error create '%s' policy." -msgstr "Error in creating '%s' policy." +msgstr "Error creating '%s' policy." #: ../../enterprise/extensions/resource_registration/functions.php:104 #, php-format msgid "Error add '%s' agent. The agent does not exist in pandora" -msgstr "" +msgstr "Error adding '%s' agent. The agent does not exist in Pandora FMS." #: ../../enterprise/extensions/resource_registration/functions.php:108 #, php-format msgid "Success add '%s' agent." -msgstr "Success in adding '%s' agent." +msgstr "'%s' agent added successfully." #: ../../enterprise/extensions/resource_registration/functions.php:109 #, php-format msgid "Error add '%s' agent." -msgstr "Error in adding '%s' agent." +msgstr "Error adding '%s' agent." #: ../../enterprise/extensions/resource_registration/functions.php:128 msgid "The collection does not exist in pandora" -msgstr "" +msgstr "The collection does not exist in Pandora FMS." #: ../../enterprise/extensions/resource_registration/functions.php:132 #, php-format msgid "Success add '%s' collection." -msgstr "Success in adding '%s' collection." +msgstr "'%s' collection added successfully" #: ../../enterprise/extensions/resource_registration/functions.php:133 #, php-format msgid "Error add '%s' collection." -msgstr "Error in adding '%s' collection." +msgstr "Error adding '%s' collection." #: ../../enterprise/extensions/resource_registration/functions.php:149 #, php-format msgid "Success add '%s' agent plugin." -msgstr "Success add '%s' agent plugin." +msgstr "'%s' agent plugin added successfully" #: ../../enterprise/extensions/resource_registration/functions.php:150 #, php-format msgid "Error add '%s' agent plugin." -msgstr "Error add '%s' agent plugin." +msgstr "Error adding '%s' agent plugin." #: ../../enterprise/extensions/resource_registration/functions.php:161 msgid "Error add the module, haven't type." -msgstr "Error on adding the module, it doesn't have a type." +msgstr "Error adding the module, it does not have a type." #: ../../enterprise/extensions/resource_registration/functions.php:269 #: ../../enterprise/extensions/resource_registration/functions.php:299 #: ../../enterprise/extensions/resource_registration/functions.php:356 #: ../../enterprise/extensions/resource_registration/functions.php:402 msgid "Error add the module, error in tag component." -msgstr "Error on adding the module, error in tag component." +msgstr "Error adding the module, error in tag component." #: ../../enterprise/extensions/resource_registration/functions.php:443 msgid "Error add the module plugin importation, plugin is not registered" -msgstr "Error add the module plugin importation, plugin is not registered" +msgstr "Error adding the module plugin importation, plugin is not registered" #: ../../enterprise/extensions/resource_registration/functions.php:454 #, php-format msgid "Success add '%s' module." -msgstr "Success in adding '%s' module." +msgstr "'%s' module added successfully" #: ../../enterprise/extensions/resource_registration/functions.php:455 #, php-format msgid "Error add '%s' module." -msgstr "Error on adding '%s' module." +msgstr "Error adding '%s' module" #: ../../enterprise/extensions/resource_registration/functions.php:465 #, php-format msgid "Error add the alert, the template '%s' don't exist." -msgstr "Error on adding the alert, the template '%s' doesn't exist." +msgstr "Error adding the alert, the template '%s' does not exist." #: ../../enterprise/extensions/resource_registration/functions.php:473 #, php-format msgid "Error add the alert, the module '%s' don't exist." -msgstr "Error on adding the alert, the module '%s' doesn't exist." +msgstr "Error adding the alert, the module '%s' does not exist." #: ../../enterprise/extensions/resource_registration/functions.php:486 #, php-format msgid "Success add '%s' alert." -msgstr "Success in adding '%s' alert." +msgstr "'%s' alert added successfully" #: ../../enterprise/extensions/resource_registration/functions.php:487 #, php-format msgid "Error add '%s' alert." -msgstr "Error on adding '%s' alert." +msgstr "Error adding '%s' alert" #: ../../enterprise/extensions/resource_registration/functions.php:503 #, php-format msgid "Error add the alert, the action '%s' don't exist." -msgstr "Error on adding the alert, the action '%s' doesn't exist." +msgstr "Error adding the alert, the action '%s' does not exist" #: ../../enterprise/extensions/resource_registration/functions.php:515 #, php-format msgid "Success add '%s' action." -msgstr "Success in adding '%s' action." +msgstr "'%s' action added successfully" #: ../../enterprise/extensions/translate_string.php:165 #: ../../enterprise/extensions/translate_string.php:323 @@ -31087,90 +31181,92 @@ msgstr "Customize translation" #: ../../enterprise/extensions/vmware/ajax.php:87 #: ../../enterprise/include/ajax/clustermap.php:42 msgid "No IP" -msgstr "" +msgstr "No IP" #: ../../enterprise/extensions/vmware/functions.php:52 msgid "This configuration has no file associated." -msgstr "" +msgstr "This configuration has no file associated." #: ../../enterprise/extensions/vmware/functions.php:61 msgid "" "Task scheduled with this configuration does not match with the ID stored. " "Please delete it " msgstr "" +"Task scheduled with this configuration does not match with the ID stored. " +"Please delete it " #: ../../enterprise/extensions/vmware/functions.php:115 msgid "Please reinstall Cron extension." -msgstr "" +msgstr "Please reinstall Cron extension." #: ../../enterprise/extensions/vmware/functions.php:132 msgid "Please check configuration definition." -msgstr "" +msgstr "Please check configuration definition." #: ../../enterprise/extensions/vmware/functions.php:241 msgid "The file does not exists" -msgstr "" +msgstr "The file does not exist." #: ../../enterprise/extensions/vmware/functions.php:245 msgid "The file is not readable by HTTP Server" -msgstr "" +msgstr "The file is not readable by HTTP Server" #: ../../enterprise/extensions/vmware/functions.php:246 #: ../../enterprise/extensions/vmware/functions.php:251 msgid "Please check that the web server has write rights on the file" -msgstr "" +msgstr "Please check that the web server has write access on the file." #: ../../enterprise/extensions/vmware/functions.php:250 msgid "The file is not writable by HTTP Server" -msgstr "" +msgstr "The file is not writable by HTTP Server" #: ../../enterprise/extensions/vmware/functions.php:268 msgid "The file does not exist." -msgstr "" +msgstr "The file does not exist." #: ../../enterprise/extensions/vmware/functions.php:271 msgid "The file is not executable." -msgstr "" +msgstr "The file is not executable." #: ../../enterprise/extensions/vmware/functions.php:396 msgid "Configuration file path" -msgstr "" +msgstr "Configuration file path" #: ../../enterprise/extensions/vmware/functions.php:401 msgid "V-Center IP" -msgstr "" +msgstr "V-Center IP" #: ../../enterprise/extensions/vmware/functions.php:406 msgid "Datacenter Name" -msgstr "" +msgstr "Datacenter Name" #: ../../enterprise/extensions/vmware/functions.php:411 msgid "Datacenter user" -msgstr "" +msgstr "Datacenter user" #: ../../enterprise/extensions/vmware/functions.php:434 msgid "Temporal directory" -msgstr "" +msgstr "Temporal directory" #: ../../enterprise/extensions/vmware/functions.php:439 msgid "Target log file" -msgstr "" +msgstr "Target log file" #: ../../enterprise/extensions/vmware/functions.php:444 msgid "Entities list file" -msgstr "" +msgstr "Entities list file" #: ../../enterprise/extensions/vmware/functions.php:449 msgid "Event pointer file" -msgstr "" +msgstr "Event pointer file" #: ../../enterprise/extensions/vmware/functions.php:478 msgid "API user" -msgstr "" +msgstr "API user" #: ../../enterprise/extensions/vmware/functions.php:483 msgid "API user's password" -msgstr "" +msgstr "API user password" #: ../../enterprise/extensions/vmware/functions.php:502 #: ../../enterprise/godmode/servers/manage_export.php:131 @@ -31180,149 +31276,151 @@ msgstr "Transfer mode" #: ../../enterprise/extensions/vmware/functions.php:508 msgid "Tentacle server IP" -msgstr "" +msgstr "Tentacle server IP" #: ../../enterprise/extensions/vmware/functions.php:513 msgid "Tentacle server port" -msgstr "" +msgstr "Tentacle server port" #: ../../enterprise/extensions/vmware/functions.php:518 msgid "Tentacle extra options" -msgstr "" +msgstr "Tentacle extra options" #: ../../enterprise/extensions/vmware/functions.php:523 msgid "Local folder" -msgstr "" +msgstr "Local folder" #: ../../enterprise/extensions/vmware/functions.php:528 msgid "Tentacle client path" -msgstr "" +msgstr "Tentacle client path" #: ../../enterprise/extensions/vmware/functions.php:546 msgid "Agents group" -msgstr "" +msgstr "Agents group" #: ../../enterprise/extensions/vmware/functions.php:551 msgid "Verbosity" -msgstr "" +msgstr "Verbosity" #: ../../enterprise/extensions/vmware/functions.php:556 msgid "Max. threads" -msgstr "" +msgstr "Max. threads" #: ../../enterprise/extensions/vmware/functions.php:561 msgid "Retry send" -msgstr "" +msgstr "Retry send" #: ../../enterprise/extensions/vmware/functions.php:566 msgid "Event mode" -msgstr "" +msgstr "Event mode" #: ../../enterprise/extensions/vmware/functions.php:576 msgid "Extra settings" -msgstr "" +msgstr "Extra settings" #: ../../enterprise/extensions/vmware/vmware_admin.php:37 msgid "WMware Plugin Settings" -msgstr "" +msgstr "WMware Plugin Settings" #: ../../enterprise/extensions/vmware/vmware_admin.php:91 msgid "" "Pandora FMS Cron extension is required to automate VMware plugin from this " "form." msgstr "" +"Pandora FMS Cron extension is required to automate VMware plugin from this " +"form." #: ../../enterprise/extensions/vmware/vmware_admin.php:152 msgid "Failed to update plugin path." -msgstr "" +msgstr "Error updating plugin path" #: ../../enterprise/extensions/vmware/vmware_admin.php:155 msgid "VMWare plugin path succesfully updated." -msgstr "" +msgstr "VMWare plugin path successfully updated" #: ../../enterprise/extensions/vmware/vmware_admin.php:170 #: ../../enterprise/extensions/vmware/vmware_admin.php:275 msgid "Configuration name is required." -msgstr "" +msgstr "Configuration name is required" #: ../../enterprise/extensions/vmware/vmware_admin.php:174 msgid "Configuration name already in use." -msgstr "" +msgstr "Configuration name already in use" #: ../../enterprise/extensions/vmware/vmware_admin.php:185 msgid "Failed while creating configuration file." -msgstr "" +msgstr "Error creating configuration file" #: ../../enterprise/extensions/vmware/vmware_admin.php:198 msgid "Failed while creating cron task." -msgstr "" +msgstr "Error creating cron task" #: ../../enterprise/extensions/vmware/vmware_admin.php:208 #: ../../enterprise/extensions/vmware/vmware_admin.php:253 #: ../../enterprise/extensions/vmware/vmware_admin.php:316 msgid "Failed while updating configuration references." -msgstr "" +msgstr "Error updating configuration references" #: ../../enterprise/extensions/vmware/vmware_admin.php:214 msgid " succesfully created." -msgstr "" +msgstr " successfully created." #: ../../enterprise/extensions/vmware/vmware_admin.php:226 msgid "Unknown configuration file." -msgstr "" +msgstr "Unknown configuration file" #: ../../enterprise/extensions/vmware/vmware_admin.php:234 msgid "Failed while deleting associated cron task." -msgstr "" +msgstr "Error deleting associated cron task" #: ../../enterprise/extensions/vmware/vmware_admin.php:242 msgid "Failed while deleting associated conf file." -msgstr "" +msgstr "Error deleting associated conf file" #: ../../enterprise/extensions/vmware/vmware_admin.php:260 msgid " succesfully deleted." -msgstr "" +msgstr " successfully deleted." #: ../../enterprise/extensions/vmware/vmware_admin.php:283 msgid "Failed while deleting previous cron task. Disable and re-enable it" -msgstr "" +msgstr "Error deleting previous cron task. Disable and re-enable it." #: ../../enterprise/extensions/vmware/vmware_admin.php:287 msgid "Failed while deleting associated conf file. Please remove " -msgstr "" +msgstr "Error deleting associated conf file. Please remove " #: ../../enterprise/extensions/vmware/vmware_admin.php:287 msgid " manually" -msgstr "" +msgstr " manually" #: ../../enterprise/extensions/vmware/vmware_admin.php:295 msgid "Failed while updating configuration file." -msgstr "" +msgstr "Error updating configuration file" #: ../../enterprise/extensions/vmware/vmware_admin.php:303 msgid "Failed while updating cron task." -msgstr "" +msgstr "Error updating cron task" #: ../../enterprise/extensions/vmware/vmware_admin.php:322 msgid " succesfully updated." -msgstr "" +msgstr " successfully updated." #: ../../enterprise/extensions/vmware/vmware_admin.php:352 msgid "Plugin Path" -msgstr "" +msgstr "Plugin path" #: ../../enterprise/extensions/vmware/vmware_admin.php:369 msgid "Configuration files" -msgstr "" +msgstr "Configuration files" #: ../../enterprise/extensions/vmware/vmware_admin.php:392 #: ../../enterprise/extensions/vmware/vmware_admin.php:426 msgid "Configuration name" -msgstr "" +msgstr "Configuration name" #: ../../enterprise/extensions/vmware/vmware_admin.php:432 msgid "File path" -msgstr "" +msgstr "File path" #: ../../enterprise/extensions/vmware/vmware_admin.php:439 msgid "Load" @@ -31330,209 +31428,210 @@ msgstr "Load" #: ../../enterprise/extensions/vmware/vmware_admin.php:444 msgid "Create new file" -msgstr "" +msgstr "Create new file" #: ../../enterprise/extensions/vmware/vmware_admin.php:446 msgid "Load vmware conf file" -msgstr "" +msgstr "Load vmware conf file" #: ../../enterprise/extensions/vmware/vmware_admin.php:456 msgid " is invalid" -msgstr "" +msgstr " is invalid" #: ../../enterprise/extensions/vmware/vmware_admin.php:500 msgid "Delete this configuration: " -msgstr "" +msgstr "Delete this configuration: " #: ../../enterprise/extensions/vmware/vmware_manager.php:160 msgid "Power Status: " -msgstr "" +msgstr "Power status: " #: ../../enterprise/extensions/vmware/vmware_manager.php:206 msgid "Change Status" -msgstr "" +msgstr "Change status" #: ../../enterprise/extensions/vmware/vmware_view.php:241 msgid "Top 5 VMs CPU Usage" -msgstr "" +msgstr "Top 5 VMs CPU Usage" #: ../../enterprise/extensions/vmware/vmware_view.php:250 msgid "Top 5 VMs Memory Usage" -msgstr "" +msgstr "Top 5 VMs Memory Usage" #: ../../enterprise/extensions/vmware/vmware_view.php:261 msgid "Top 5 VMs Provisioning Usage" -msgstr "" +msgstr "Top 5 VMs Provisioning Usage" #: ../../enterprise/extensions/vmware/vmware_view.php:270 msgid "Top 5 VMs Network Usage" -msgstr "" +msgstr "Top 5 VMs Network Usage" #: ../../enterprise/extensions/vmware/vmware_view.php:710 msgid "Host ESX" -msgstr "" +msgstr "Host ESX" #: ../../enterprise/extensions/vmware/vmware_view.php:967 msgid "CPU Usage" -msgstr "" +msgstr "CPU Usage" #: ../../enterprise/extensions/vmware/vmware_view.php:977 msgid "Memory Usage" -msgstr "" +msgstr "Memory Usage" #: ../../enterprise/extensions/vmware/vmware_view.php:987 msgid "Disk I/O Rate" -msgstr "" +msgstr "Disk I/O Rate" #: ../../enterprise/extensions/vmware/vmware_view.php:997 msgid "Network Usage" -msgstr "" +msgstr "Network Usage" #: ../../enterprise/extensions/vmware/vmware_view.php:1096 msgid "Settings updated " -msgstr "" +msgstr "Settings updated " #: ../../enterprise/extensions/vmware/vmware_view.php:1099 msgid "No changes in settings " -msgstr "" +msgstr "No changes in settings " #: ../../enterprise/extensions/vmware/vmware_view.php:1107 msgid "CPU usage graphs" -msgstr "" +msgstr "CPU usage graphs" #: ../../enterprise/extensions/vmware/vmware_view.php:1108 #: ../../enterprise/extensions/vmware/vmware_view.php:1114 #: ../../enterprise/extensions/vmware/vmware_view.php:1120 #: ../../enterprise/extensions/vmware/vmware_view.php:1126 msgid "Force minimum value" -msgstr "" +msgstr "Force minimum value" #: ../../enterprise/extensions/vmware/vmware_view.php:1110 #: ../../enterprise/extensions/vmware/vmware_view.php:1116 #: ../../enterprise/extensions/vmware/vmware_view.php:1122 #: ../../enterprise/extensions/vmware/vmware_view.php:1128 msgid "Force maximum value" -msgstr "" +msgstr "Force maximum value" #: ../../enterprise/extensions/vmware/vmware_view.php:1113 msgid "Memory usage graphs" -msgstr "" +msgstr "Memory usage graphs" #: ../../enterprise/extensions/vmware/vmware_view.php:1119 msgid "Provisioning Usage graphs" -msgstr "" +msgstr "Provisioning usage graphs" #: ../../enterprise/extensions/vmware/vmware_view.php:1125 msgid "Network usage graphs" -msgstr "" +msgstr "Network usage graphs" #: ../../enterprise/extensions/vmware/vmware_view.php:1137 msgid "Map items" -msgstr "" +msgstr "Map items" #: ../../enterprise/extensions/vmware/vmware_view.php:1138 msgid "Show datastores" -msgstr "" +msgstr "Show datastores" #: ../../enterprise/extensions/vmware/vmware_view.php:1140 msgid "Show ESXis" -msgstr "" +msgstr "Show ESXis" #: ../../enterprise/extensions/vmware/vmware_view.php:1142 msgid "Show VMs" -msgstr "" +msgstr "Show VMs" #: ../../enterprise/extensions/vmware/vmware_view.php:1144 msgid "Font size (px)" -msgstr "" +msgstr "Font size (px)" #: ../../enterprise/extensions/vmware/vmware_view.php:1146 msgid "Node radius (px)" -msgstr "" +msgstr "Node radius (px)" #: ../../enterprise/extensions/vmware/vmware_view.php:1152 msgid "Looking for plugin configuration? Is placed at " -msgstr "" +msgstr "Looking for the plugin configuration? It is located at " #: ../../enterprise/extensions/vmware/vmware_view.php:1152 #: ../../enterprise/extensions/vmware/vmware_view.php:1360 msgid "this link" -msgstr "" +msgstr "this link" #: ../../enterprise/extensions/vmware/vmware_view.php:1152 #: ../../enterprise/extensions/vmware/vmware_view.php:1360 msgid "administration page" -msgstr "" +msgstr "administration page" #: ../../enterprise/extensions/vmware/vmware_view.php:1159 msgid "Graph settings" -msgstr "" +msgstr "Graph settings" #: ../../enterprise/extensions/vmware/vmware_view.php:1164 msgid "Map settings" -msgstr "" +msgstr "Map settings" #: ../../enterprise/extensions/vmware/vmware_view.php:1218 msgid "ESX Detail" -msgstr "" +msgstr "ESX detail" #: ../../enterprise/extensions/vmware/vmware_view.php:1240 msgid "ESX details" -msgstr "" +msgstr "ESX details" #: ../../enterprise/extensions/vmware/vmware_view.php:1244 msgid "VMware view options" -msgstr "" +msgstr "VMware view options" #: ../../enterprise/extensions/vmware/vmware_view.php:1255 #: ../../enterprise/extensions/vmware/vmware_view.php:1518 msgid "VMware View" -msgstr "" +msgstr "VMware view" #: ../../enterprise/extensions/vmware/vmware_view.php:1338 msgid "" "Some ESX Hosts are not up to date, please check vmware plugin configuration." msgstr "" +"Some ESX Hosts are not up to date, please check vmware plugin configuration." #: ../../enterprise/extensions/vmware/vmware_view.php:1341 msgid "VMWare plugin is working." -msgstr "" +msgstr "VMWare plugin is working." #: ../../enterprise/extensions/vmware/vmware_view.php:1350 msgid "View VMWare map" -msgstr "" +msgstr "View VMWare map" #: ../../enterprise/extensions/vmware/vmware_view.php:1351 msgid "View VMWare dashboard" -msgstr "" +msgstr "View VMWare dashboard" #: ../../enterprise/extensions/vmware/vmware_view.php:1352 msgid "View ESX Host statistics from" -msgstr "" +msgstr "View ESX Host statistics from" #: ../../enterprise/extensions/vmware/vmware_view.php:1410 msgid "Show Datastores" -msgstr "" +msgstr "Show datastores" #: ../../enterprise/extensions/vmware/vmware_view.php:1413 msgid "Show ESX" -msgstr "" +msgstr "Show ESX" #: ../../enterprise/extensions/vmware/vmware_view.php:1416 msgid "Show VM" -msgstr "" +msgstr "Show VM" #: ../../enterprise/extensions/vmware/vmware_view.php:1434 msgid "View options" -msgstr "" +msgstr "View options" #: ../../enterprise/extensions/vmware.php:26 msgid "Failed to initialize VMware extension." -msgstr "" +msgstr "Error initializing VMware extension" #: ../../enterprise/extensions/vmware.php:65 msgid "VMware" -msgstr "" +msgstr "VMware" #: ../../enterprise/godmode/admin_access_logs.php:42 msgid "Show extended info" @@ -31543,10 +31642,12 @@ msgid "" "The security check cannot be performed. There are no data in " "tsession_extended to check the hash." msgstr "" +"The security check cannot be performed. There are no data in " +"tsession_extended to check the hash." #: ../../enterprise/godmode/admin_access_logs.php:71 msgid "Security check is ok." -msgstr "Security check is ok." +msgstr "Security check is OK" #: ../../enterprise/godmode/admin_access_logs.php:78 msgid "Security check is fail." @@ -31558,15 +31659,15 @@ msgstr "Extended info:" #: ../../enterprise/godmode/admin_access_logs.php:187 msgid "Changes:" -msgstr "" +msgstr "Changes:" #: ../../enterprise/godmode/agentes/agent_disk_conf_editor.php:107 msgid "Error: The conf file of agent is not readble." -msgstr "Error: The conf file of agent is not readble." +msgstr "Error: the conf file of agent is not readable." #: ../../enterprise/godmode/agentes/agent_disk_conf_editor.php:112 msgid "Error: The conf file of agent is not writable." -msgstr "Error: The conf file of agent is not writable." +msgstr "Error: the conf file of agent is not writable." #: ../../enterprise/godmode/agentes/agent_disk_conf_editor.php:150 #: ../../enterprise/godmode/policies/policy_modules.php:326 @@ -31579,38 +31680,38 @@ msgstr "No module was found" #: ../../enterprise/godmode/agentes/agent_disk_conf_editor.php:204 msgid "Delete remote conf agent files in Pandora" -msgstr "Delete remote conf agent files in Pandora" +msgstr "Delete remote conf agent files in Pandora FMS" #: ../../enterprise/godmode/agentes/collection_manager.php:37 #: ../../enterprise/operation/agentes/collection_view.php:47 msgid "This agent have not a remote configuration, please set it." -msgstr "This agent has no remote configuration, please set it." +msgstr "This agent has no remote configuration, please configure it." #: ../../enterprise/godmode/agentes/collection_manager.php:76 msgid "Succesful add the collection" -msgstr "Success in adding the collection." +msgstr "Collection added successfully" #: ../../enterprise/godmode/agentes/collection_manager.php:77 msgid "Unsuccesful add the collection" -msgstr "Adding the collection was unsuccessful." +msgstr "Error adding the collection" #: ../../enterprise/godmode/agentes/collection_manager.php:91 #: ../../enterprise/godmode/agentes/collections.php:128 #: ../../enterprise/godmode/agentes/collections.php:143 msgid "Successful create collection package." -msgstr "Successful in creating collection package." +msgstr "Collection package created successfully" #: ../../enterprise/godmode/agentes/collection_manager.php:92 #: ../../enterprise/godmode/agentes/collections.php:144 msgid "Can not create collection package." -msgstr "Cannot create collection package." +msgstr "Error creating collection package" #: ../../enterprise/godmode/agentes/collection_manager.php:106 #: ../../enterprise/godmode/agentes/collections.php:231 #: ../../enterprise/godmode/policies/policy_collections.php:122 #: ../../enterprise/godmode/policies/policy_collections.php:193 msgid "Short Name" -msgstr "Short Name" +msgstr "Short name" #: ../../enterprise/godmode/agentes/collection_manager.php:121 #: ../../enterprise/godmode/agentes/collection_manager.php:204 @@ -31626,7 +31727,7 @@ msgstr "Show files" #: ../../enterprise/godmode/agentes/collections.data.php:341 #: ../../enterprise/godmode/agentes/collections.data.php:342 msgid "Need to regenerate" -msgstr "Need to regenerate" +msgstr "Must regenerate" #: ../../enterprise/godmode/agentes/collection_manager.php:144 #: ../../enterprise/godmode/agentes/collection_manager.php:145 @@ -31649,11 +31750,11 @@ msgstr "Dir" #: ../../enterprise/godmode/agentes/collections.agents.php:38 msgid "Show Agent >" -msgstr "" +msgstr "Show Agent >" #: ../../enterprise/godmode/agentes/collections.agents.php:113 msgid "This collection has not been added to any agents" -msgstr "" +msgstr "This collection has not been added to any agents" #: ../../enterprise/godmode/agentes/collections.data.php:47 #: ../../enterprise/godmode/agentes/collections.data.php:125 @@ -31677,7 +31778,8 @@ msgstr "Manager configuration > Edit " msgid "" "Unable to create the collection. Another collection with the same short name." msgstr "" -"Unable to create the collection. Another collection with the same short name." +"Unable to create the collection. There is another collection with the same " +"short name." #: ../../enterprise/godmode/agentes/collections.data.php:150 #: ../../enterprise/godmode/agentes/collections.data.php:165 @@ -31696,12 +31798,12 @@ msgstr "Empty name" #: ../../enterprise/godmode/agentes/collections.data.php:187 #: ../../enterprise/godmode/agentes/collections.data.php:231 msgid "Unable to create the collection." -msgstr "Unable to create the collection." +msgstr "Unable to create the collection" #: ../../enterprise/godmode/agentes/collections.data.php:208 #: ../../enterprise/godmode/agentes/collections.data.php:295 msgid "Correct create collection" -msgstr "Correct create collection" +msgstr "Collection created successfully" #: ../../enterprise/godmode/agentes/collections.data.php:273 msgid "Unable to edit the collection, empty name." @@ -31709,11 +31811,11 @@ msgstr "Unable to edit the collection, empty name." #: ../../enterprise/godmode/agentes/collections.data.php:286 msgid "Unable to edit the collection." -msgstr "Unable to edit the collection." +msgstr "Unable to edit the collection" #: ../../enterprise/godmode/agentes/collections.data.php:308 msgid "Error: The collection directory does not exist." -msgstr "Error: The collection directory does not exist." +msgstr "Error: the collection directory does not exist." #: ../../enterprise/godmode/agentes/collections.data.php:325 msgid "Recreate file" @@ -31728,8 +31830,8 @@ msgid "" "The collection's short name is the name of dir in attachment dir and the " "package collection." msgstr "" -"The collection's short name is the name of dir in attachment dir and the " -"package collection." +"The short name of the collection is the name of dir in attachment dir and " +"the package collection." #: ../../enterprise/godmode/agentes/collections.data.php:375 msgid "Short name must contain only alphanumeric characters, - or _ ." @@ -31737,7 +31839,7 @@ msgstr "Short name must contain only alphanumeric characters, - or _ ." #: ../../enterprise/godmode/agentes/collections.data.php:375 msgid "Empty for default short name fc_X where X is the collection id." -msgstr "Empty for default short name fc_X where X is the collection id." +msgstr "Empty for default short name fc_X where X is the collection ID." #: ../../enterprise/godmode/agentes/collections.editor.php:62 msgid "Files in " @@ -31750,19 +31852,19 @@ msgstr "Back to file explorer" #: ../../enterprise/godmode/agentes/collections.editor.php:230 msgid "Correct update file." -msgstr "Correct update file." +msgstr "File updated correctly" #: ../../enterprise/godmode/agentes/collections.editor.php:231 msgid "Incorrect update file." -msgstr "Incorrect update file." +msgstr "Error updating file" #: ../../enterprise/godmode/agentes/collections.editor.php:370 msgid "Please, first save a new collection before to upload files." -msgstr "Please save a new collection first before uploading files." +msgstr "Please save a new collection before uploading files." #: ../../enterprise/godmode/agentes/collections.php:48 msgid "Success: recreate file" -msgstr "Success in recreating file" +msgstr "File recreated successfully" #: ../../enterprise/godmode/agentes/collections.php:51 msgid "Error: recreate file " @@ -31772,19 +31874,19 @@ msgstr "Error: recreate file " #: ../../enterprise/godmode/agentes/collections.php:86 #: ../../enterprise/godmode/agentes/collections.php:157 msgid "Collections Management" -msgstr "Collections Management" +msgstr "Collection management" #: ../../enterprise/godmode/agentes/collections.php:120 msgid "Manager collection" -msgstr "Manager collection" +msgstr "Collection manager" #: ../../enterprise/godmode/agentes/collections.php:164 msgid "Error: The main directory of collections does not exist." -msgstr "Error: The main directory of collections does not exist." +msgstr "Error: the main directory of collections does not exist." #: ../../enterprise/godmode/agentes/collections.php:254 msgid "Are you sure to delete?" -msgstr "Are you sure you want to delete ?" +msgstr "Are you sure you want to delete it?" #: ../../enterprise/godmode/agentes/collections.php:255 msgid "Delete collection" @@ -31792,7 +31894,7 @@ msgstr "Delete collection" #: ../../enterprise/godmode/agentes/collections.php:261 msgid "Are you sure to re-apply?" -msgstr "Are you sure to re-apply?" +msgstr "Are you sure you want to reapply?" #: ../../enterprise/godmode/agentes/collections.php:262 msgid "Re-Apply changes" @@ -31800,7 +31902,7 @@ msgstr "Reapply changes" #: ../../enterprise/godmode/agentes/collections.php:268 msgid "Are you sure to apply?" -msgstr "Do you want to apply?" +msgstr "Are you sure you want to apply?" #: ../../enterprise/godmode/agentes/collections.php:269 msgid "Apply changes" @@ -31819,7 +31921,7 @@ msgstr "Error adding inventory module" #: ../../enterprise/godmode/agentes/inventory_manager.php:69 #: ../../enterprise/godmode/modules/manage_inventory_modules.php:106 msgid "Successfully deleted inventory module" -msgstr "Successfully deleted inventory module" +msgstr "Inventory module deleted successfully" #: ../../enterprise/godmode/agentes/inventory_manager.php:72 #: ../../enterprise/godmode/modules/manage_inventory_modules.php:110 @@ -31828,7 +31930,7 @@ msgstr "Error deleting inventory module" #: ../../enterprise/godmode/agentes/inventory_manager.php:80 msgid "Successfully forced inventory module" -msgstr "Successfully forced inventory module" +msgstr "Inventory module forced successfully" #: ../../enterprise/godmode/agentes/inventory_manager.php:83 msgid "Error forcing inventory module" @@ -31838,7 +31940,7 @@ msgstr "Error forcing inventory module" #: ../../enterprise/godmode/modules/manage_inventory_modules.php:92 #: ../../enterprise/godmode/policies/policy_inventory_modules.php:141 msgid "Successfully updated inventory module" -msgstr "Successfully updated inventory module" +msgstr "Inventory module updated successfully" #: ../../enterprise/godmode/agentes/inventory_manager.php:111 #: ../../enterprise/godmode/modules/manage_inventory_modules.php:96 @@ -31869,7 +31971,7 @@ msgstr "Update all" #: ../../enterprise/godmode/agentes/manage_config_remote.php:43 msgid "Data Copy" -msgstr "Data Copy" +msgstr "Data copy" #: ../../enterprise/godmode/agentes/manage_config_remote.php:52 msgid "No selected agents to copy" @@ -31928,7 +32030,7 @@ msgstr "Create a new webserver module" #: ../../enterprise/godmode/agentes/module_manager.php:29 msgid "Create a new web analysis module" -msgstr "" +msgstr "Create a new web analysis module" #: ../../enterprise/godmode/agentes/module_manager_editor_data.php:49 #: ../../enterprise/godmode/agentes/module_manager_editor_data.php:50 @@ -32006,8 +32108,8 @@ msgid "" "Name is missed. Please add a line with \"module_name yourmodulename\" to " "data configuration" msgstr "" -"Name is missed. Please add a line with \"module_name yourmodulename\" to " -"data configuration" +"Name is misseding. Please add a line with 'module_name yourmodulename' to " +"the data configuration." #: ../../enterprise/godmode/agentes/module_manager_editor_data.php:173 #: ../../enterprise/godmode/modules/configure_local_component.php:331 @@ -32015,13 +32117,13 @@ msgid "" "Type is missed. Please add a line with \"module_type yourmoduletype\" to " "data configuration" msgstr "" -"Type is missed. Please add a line with \"module_type yourmoduletype\" to " -"data configuration" +"Type is missing. Please add a line with 'module_type yourmoduletype' to data " +"configuration." #: ../../enterprise/godmode/agentes/module_manager_editor_data.php:174 #: ../../enterprise/godmode/modules/configure_local_component.php:332 msgid "Type is wrong. Please set a correct type" -msgstr "Type is wrong. Please set a correct type" +msgstr "Type is wrong. Please set a correct type." #: ../../enterprise/godmode/agentes/module_manager_editor_data.php:176 #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:172 @@ -32038,7 +32140,7 @@ msgstr "Error in the syntax, please check the data configuration." #: ../../enterprise/godmode/agentes/module_manager_editor_data.php:178 #: ../../enterprise/godmode/modules/configure_local_component.php:336 msgid "Data configuration are built correctly" -msgstr "Data configuration are built correctly" +msgstr "Data configuration is built correctly." #: ../../enterprise/godmode/agentes/module_manager_editor_prediction.php:25 msgid "Synthetic arithmetic" @@ -32090,7 +32192,7 @@ msgstr "Move up selected modules" #: ../../enterprise/godmode/agentes/module_manager_editor_prediction.php:166 msgid "Select Service" -msgstr "Select Service" +msgstr "Select service" #: ../../enterprise/godmode/agentes/module_manager_editor_prediction.php:177 msgid "Netflow filter" @@ -32121,7 +32223,7 @@ msgstr "Requests" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:124 msgid "Agent browser id" -msgstr "Agent browser id" +msgstr "Agent browser ID" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:130 msgid "HTTP auth (login)" @@ -32129,7 +32231,7 @@ msgstr "HTTP auth (login)" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:133 msgid "HTTP auth (password)" -msgstr "" +msgstr "HTTP auth (password)" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:140 #: ../../enterprise/meta/include/functions_wizard_meta.php:950 @@ -32139,24 +32241,24 @@ msgstr "Proxy URL" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:147 msgid "Proxy auth (login)" -msgstr "" +msgstr "Proxy auth (login)" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:151 msgid "Proxy auth (pass)" -msgstr "" +msgstr "Proxy auth (pass)" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:158 msgid "Proxy auth (server)" -msgstr "" +msgstr "Proxy auth (server)" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:162 msgid "Proxy auth (realm)" -msgstr "" +msgstr "Proxy auth (realm)" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:168 #: ../../enterprise/meta/include/functions_wizard_meta.php:565 msgid "First line must be \"task_begin\"" -msgstr "First line must be \"task_begin\"" +msgstr "First line must be 'task_begin'" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:169 #: ../../enterprise/meta/include/functions_wizard_meta.php:566 @@ -32168,11 +32270,11 @@ msgstr "Webchecks configuration is empty" #: ../../enterprise/meta/include/functions_wizard_meta.php:567 #: ../../enterprise/meta/include/functions_wizard_meta.php:568 msgid "Last line must be \"task_end\"" -msgstr "Last line must be \"task_end\"" +msgstr "Last line must be 'task_end'" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:173 msgid "There isn't get or post" -msgstr "There isn't get or post" +msgstr "There is no get or post" #: ../../enterprise/godmode/agentes/module_manager_editor_web.php:174 #: ../../enterprise/meta/include/functions_wizard_meta.php:570 @@ -32181,83 +32283,85 @@ msgstr "Web checks are built correctly" #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:89 msgid "Run performance tests" -msgstr "" +msgstr "Run performance tests" #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:94 msgid "Target web site" -msgstr "" +msgstr "Target web site" #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:94 msgid "" "The url specified in this field is mandatory to retrieve performance stats." msgstr "" +"The URL specified in this field is mandatory to retrieve performance " +"statistics." #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:99 msgid "target web site (http://...)" -msgstr "" +msgstr "target web site (http://...)" #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:104 msgid "Execute tests from" -msgstr "" +msgstr "Execute tests from" #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:127 msgid "Paste your selenium test, exported as HTML, here" -msgstr "" +msgstr "Paste your selenium test, exported as HTML, here" #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:131 msgid "Add file" -msgstr "" +msgstr "Add file" #: ../../enterprise/godmode/agentes/module_manager_editor_webux.php:134 msgid "Upload your selenium test in html format" -msgstr "" +msgstr "Upload your selenium test in HTML format" #: ../../enterprise/godmode/agentes/plugins_manager.php:67 msgid "Plug-in updated succesfully" -msgstr "" +msgstr "Plugin updated successfully" #: ../../enterprise/godmode/agentes/plugins_manager.php:67 msgid "Plug-in cannot be updated" -msgstr "" +msgstr "Plugin cannot be updated" #: ../../enterprise/godmode/agentes/plugins_manager.php:74 msgid "Plug-in deleted succesfully" -msgstr "Plug-in deleted succesfully" +msgstr "Plugin deleted successfully" #: ../../enterprise/godmode/agentes/plugins_manager.php:74 msgid "Plug-in cannot be deleted" -msgstr "Plug-in cannot be deleted" +msgstr "Plugin cannot be deleted" #: ../../enterprise/godmode/agentes/plugins_manager.php:83 #: ../../enterprise/godmode/policies/policy_plugins.php:55 msgid "Plug-in added succesfully" -msgstr "Plug-in added succesfully" +msgstr "Plugin added successfully" #: ../../enterprise/godmode/agentes/plugins_manager.php:83 #: ../../enterprise/godmode/policies/policy_plugins.php:56 msgid "Plug-in cannot be added" -msgstr "Plug-in cannot be added" +msgstr "Plugin cannot be added" #: ../../enterprise/godmode/agentes/plugins_manager.php:98 msgid "Plug-in disabled succesfully" -msgstr "Plug-in disabled succesfully" +msgstr "Plugin disabled successfully" #: ../../enterprise/godmode/agentes/plugins_manager.php:98 msgid "Plug-in cannot be disabled" -msgstr "Plug-in cannot be disabled" +msgstr "Plugin cannot be disabled" #: ../../enterprise/godmode/agentes/plugins_manager.php:113 msgid "Plug-in enabled succesfully" -msgstr "Plug-in enabled succesfully" +msgstr "Plugin enabled successfully" #: ../../enterprise/godmode/agentes/plugins_manager.php:113 msgid "Plug-in cannot be enabled" -msgstr "Plug-in cannot be enabled" +msgstr "Plugin cannot be enabled" #: ../../enterprise/godmode/agentes/plugins_manager.php:124 #: ../../enterprise/godmode/policies/policy_plugins.php:66 msgid "New plug-in" -msgstr "New plug-in" +msgstr "New plugin" #: ../../enterprise/godmode/alerts/alert_events.php:45 #: ../../enterprise/godmode/alerts/alert_events_list.php:55 @@ -32271,7 +32375,7 @@ msgstr "List event alerts" #: ../../enterprise/godmode/alerts/alert_events_rules.php:75 #: ../../enterprise/godmode/alerts/configure_alert_rule.php:54 msgid "Builder event alert" -msgstr "Builder event alert" +msgstr "Event alert builder" #: ../../enterprise/godmode/alerts/alert_events.php:58 #: ../../enterprise/godmode/alerts/alert_events_rules.php:79 @@ -32285,7 +32389,7 @@ msgstr "Configure event alert" #: ../../enterprise/godmode/alerts/alert_events.php:347 msgid "Could not be created, please fill alert name" -msgstr "Could not be created, please fill alert name." +msgstr "Could not be created, please fill in the alert name." #: ../../enterprise/godmode/alerts/alert_events.php:463 msgid "Rule evaluation mode" @@ -32304,8 +32408,8 @@ msgid "" "Since the alert can have multiple actions. You can edit them from the alert " "list of events." msgstr "" -"Since the alert can have multiple actions. You can edit them from the alert " -"list of events." +"Since the alert can have multiple actions. You can edit them from the list " +"of event alerts." #: ../../enterprise/godmode/alerts/alert_events_list.php:67 #: ../../enterprise/godmode/alerts/alert_events_list.php:114 @@ -32355,7 +32459,7 @@ msgstr "View associated rules" #: ../../enterprise/godmode/alerts/alert_events_list.php:657 msgid "There are no defined events alerts" -msgstr "There are no defined events alerts" +msgstr "There are no defined event alerts." #: ../../enterprise/godmode/alerts/alert_events_rules.php:91 msgid "Event rules" @@ -32367,7 +32471,7 @@ msgstr "Error creating rule" #: ../../enterprise/godmode/alerts/alert_events_rules.php:208 msgid "Successfully created rule" -msgstr "Successfully created rule" +msgstr "Rule created successfully" #: ../../enterprise/godmode/alerts/alert_events_rules.php:255 msgid "Error updating rule" @@ -32375,7 +32479,7 @@ msgstr "Error updating rule" #: ../../enterprise/godmode/alerts/alert_events_rules.php:259 msgid "Successfully updating rule" -msgstr "Successfully updating rule" +msgstr "Rule updated successfully" #: ../../enterprise/godmode/alerts/alert_events_rules.php:269 msgid "Error updating rule operators" @@ -32383,7 +32487,7 @@ msgstr "Error updating rule operators" #: ../../enterprise/godmode/alerts/alert_events_rules.php:272 msgid "Successfully update rule operators" -msgstr "Updating rule operators successful." +msgstr "Rule operators updated successfully" #: ../../enterprise/godmode/alerts/alert_events_rules.php:408 msgid "(Agent)" @@ -32403,7 +32507,7 @@ msgstr "Update operators" #: ../../enterprise/godmode/alerts/alert_events_rules.php:506 msgid "There are no defined alert event rules" -msgstr "There are no defined alert event rules" +msgstr "There are no defined event alert rules" #: ../../enterprise/godmode/alerts/configure_alert_rule.php:69 msgid "Configure event rule" @@ -32427,44 +32531,44 @@ msgstr "Window" #: ../../enterprise/godmode/massive/massive_add_alerts_policy.php:66 msgid "Success: create the alerts." -msgstr "Creating of the alerts successful." +msgstr "Alerts created successfully" #: ../../enterprise/godmode/massive/massive_add_alerts_policy.php:66 msgid "Failed: create the alerts for this modules, please check." -msgstr "Failure in creating the alerts for these modules, please check." +msgstr "Error creating the alerts for these modules, please check." #: ../../enterprise/godmode/massive/massive_add_alerts_policy.php:116 #: ../../enterprise/godmode/massive/massive_delete_alerts_policy.php:115 msgid "Modules agents in policy" -msgstr "Module agents in policy" +msgstr "Agent modules in policy" #: ../../enterprise/godmode/massive/massive_add_modules_policy.php:51 msgid "Successfully copied " -msgstr "" +msgstr "Successfully copied " #: ../../enterprise/godmode/massive/massive_add_modules_policy.php:58 msgid " cannot be copied to " -msgstr "" +msgstr " cannot be copied to " #: ../../enterprise/godmode/massive/massive_add_modules_policy.php:58 msgid " policy" -msgstr "" +msgstr " policy" #: ../../enterprise/godmode/massive/massive_add_modules_policy.php:177 msgid "To policies" -msgstr "" +msgstr "To policies" #: ../../enterprise/godmode/massive/massive_add_modules_policy.php:330 msgid "No destiny policies to copy" -msgstr "" +msgstr "No destination policies to copy" #: ../../enterprise/godmode/massive/massive_delete_alerts_policy.php:67 msgid "Success: remove the alerts." -msgstr "Removal of the alerts successful." +msgstr "Alerts removed successfully" #: ../../enterprise/godmode/massive/massive_delete_alerts_policy.php:67 msgid "Failed: remove the alerts for this modules, please check." -msgstr "Failure in removing the alerts for these modules, please check." +msgstr "Error removing the alerts for these modules, please check." #: ../../enterprise/godmode/massive/massive_delete_alerts_snmp.php:166 #: ../../enterprise/godmode/massive/massive_modify_alerts_snmp.php:217 @@ -32490,7 +32594,7 @@ msgstr "Filter agent" #: ../../enterprise/godmode/massive/massive_edit_modules_satellite.php:215 msgid "Filter module" -msgstr "Filter Module" +msgstr "Filter module" #: ../../enterprise/godmode/massive/massive_edit_modules_satellite.php:334 msgid "Updated modules on database" @@ -32498,7 +32602,7 @@ msgstr "Updated modules in the database" #: ../../enterprise/godmode/massive/massive_edit_modules_satellite.php:336 msgid "Agent configuration files updated" -msgstr "Agent configuration files updated." +msgstr "Agent configuration files updated" #: ../../enterprise/godmode/massive/massive_edit_modules_satellite.php:354 #: ../../enterprise/godmode/policies/policy_queue.php:398 @@ -32510,12 +32614,12 @@ msgstr "Finished" #: ../../enterprise/godmode/massive/massive_edit_tags_policy.php:62 #: ../../enterprise/godmode/massive/massive_tags_edit_policy.php:62 msgid "Successful update the tags" -msgstr "Successful update the tags" +msgstr "Tags updated successfully" #: ../../enterprise/godmode/massive/massive_edit_tags_policy.php:63 #: ../../enterprise/godmode/massive/massive_tags_edit_policy.php:63 msgid "Unsuccessful update the tags" -msgstr "Unsuccessful update the tags" +msgstr "Error updating the tags" #: ../../enterprise/godmode/massive/massive_edit_tags_policy.php:102 msgid "Tags unused" @@ -32528,21 +32632,21 @@ msgstr "Tags used" #: ../../enterprise/godmode/massive/massive_modify_alerts_snmp.php:186 #, php-format msgid "Successfully updated alerts (%s / %s)" -msgstr "Successfully updated alerts (%s / %s)" +msgstr "Alerts (%s / %s) updated successfully" #: ../../enterprise/godmode/massive/massive_modify_alerts_snmp.php:190 #, php-format msgid "Unsuccessfully updated alerts (%s / %s)" -msgstr "Updating of alerts unsuccessful (%s / %s)." +msgstr "Error updating alerts (%s / %s)" #: ../../enterprise/godmode/massive/massive_modify_alerts_snmp.php:233 msgid "SNMP Alerts to be edit" -msgstr "SNMP Alerts to be edited" +msgstr "SNMP alerts to be edited" #: ../../enterprise/godmode/massive/massive_operations.php:27 #: ../../enterprise/godmode/menu.php:47 msgid "Satellite operations" -msgstr "Satellite Operations" +msgstr "Satellite operations" #: ../../enterprise/godmode/massive/massive_operations.php:47 #: ../../enterprise/godmode/menu.php:35 @@ -32556,51 +32660,51 @@ msgstr "Policies operations" #: ../../enterprise/godmode/massive/massive_operations.php:78 msgid "Bulk alerts policy add" -msgstr "Bulk alerts policy add" +msgstr "Add policy alerts in bulk" #: ../../enterprise/godmode/massive/massive_operations.php:79 msgid "Bulk alerts policy delete" -msgstr "Bulk alerts policy delete" +msgstr "Delete policy alerts in bulk" #: ../../enterprise/godmode/massive/massive_operations.php:80 msgid "Bulk tags module policy edit" -msgstr "Bulk tags module policy edit" +msgstr "Edit module tags in policies in bulk" #: ../../enterprise/godmode/massive/massive_operations.php:81 msgid "Bulk modules policy tags edit" -msgstr "Bulk modules policy tags edit" +msgstr "Edit module tags in policies in bulk" #: ../../enterprise/godmode/massive/massive_operations.php:82 msgid "Bulk modules policy add from agent" -msgstr "" +msgstr "Add module policies from the agent in bulk" #: ../../enterprise/godmode/massive/massive_operations.php:90 msgid "Bulk alert SNMP delete" -msgstr "Bulk alert SNMP delete" +msgstr "Delete SNMP alerts in bulk" #: ../../enterprise/godmode/massive/massive_operations.php:91 msgid "Bulk alert SNMP edit" -msgstr "Bulk alert SNMP edit" +msgstr "Edit SNMP alerts in bulk" #: ../../enterprise/godmode/massive/massive_operations.php:99 msgid "Bulk Satellite modules edit" -msgstr "Bulk Satellite modules edit" +msgstr "Edit Satellite modules in bulk" #: ../../enterprise/godmode/massive/massive_tags_edit_policy.php:100 msgid "Modules unused" -msgstr "Modules unused" +msgstr "Unused modules" #: ../../enterprise/godmode/massive/massive_tags_edit_policy.php:116 msgid "Modules used" -msgstr "Modules used" +msgstr "Used modules" #: ../../enterprise/godmode/menu.php:16 msgid "Manage Satellite Server" -msgstr "" +msgstr "Manage Satellite Server" #: ../../enterprise/godmode/menu.php:58 ../../enterprise/godmode/menu.php:152 msgid "Duplicate config" -msgstr "Duplicate config" +msgstr "Duplicate configuration" #: ../../enterprise/godmode/menu.php:66 #: ../../enterprise/godmode/modules/manage_inventory_modules.php:27 @@ -32637,7 +32741,7 @@ msgstr "Export targets" #: ../../enterprise/godmode/menu.php:145 msgid "Log Collector" -msgstr "Log Collector" +msgstr "Log collector" #: ../../enterprise/godmode/menu.php:159 msgid "Password policy" @@ -32645,11 +32749,11 @@ msgstr "Password policy" #: ../../enterprise/godmode/modules/configure_local_component.php:135 msgid "Update Local Component" -msgstr "Update Local Component" +msgstr "Update local component" #: ../../enterprise/godmode/modules/configure_local_component.php:138 msgid "Create Local Component" -msgstr "Create Local Component" +msgstr "Create local component" #: ../../enterprise/godmode/modules/configure_local_component.php:176 msgid "Throw unknown events" @@ -32669,11 +32773,11 @@ msgstr "Search by name, description or data, list matches." #: ../../enterprise/godmode/modules/manage_inventory_modules.php:67 msgid "Successfully created inventory module" -msgstr "Inventory module successfully created." +msgstr "Inventory module successfully created" #: ../../enterprise/godmode/modules/manage_inventory_modules.php:71 msgid "Error creating inventory module" -msgstr "Error in creating inventory module." +msgstr "Error creating inventory module" #: ../../enterprise/godmode/modules/manage_inventory_modules.php:157 #: ../../enterprise/godmode/modules/manage_inventory_modules_form.php:86 @@ -32686,11 +32790,11 @@ msgstr "No inventory modules defined" #: ../../enterprise/godmode/modules/manage_inventory_modules.php:217 msgid "Local module" -msgstr "Local Module" +msgstr "Local module" #: ../../enterprise/godmode/modules/manage_inventory_modules.php:220 msgid "Remote/Local" -msgstr "Remote / Local" +msgstr "Remote/Local" #: ../../enterprise/godmode/modules/manage_inventory_modules_form.php:88 msgid "Left blank for the LOCAL inventory modules" @@ -32698,7 +32802,7 @@ msgstr "Left blank for the LOCAL inventory modules" #: ../../enterprise/godmode/modules/manage_inventory_modules_form.php:90 msgid "Block Mode" -msgstr "Block Mode" +msgstr "Block mode" #: ../../enterprise/godmode/modules/manage_inventory_modules_form.php:94 msgid "separate fields with " @@ -32709,8 +32813,8 @@ msgid "" "Here is placed the script for the REMOTE inventory modules Local inventory " "modules don't use this field" msgstr "" -"Here is placed the script for the REMOTE inventory modules Local inventory " -"modules don't use this field" +"Here you will find the script for the REMOTE inventory modules. Local " +"inventory modules do not use this field." #: ../../enterprise/godmode/policies/configure_policy.php:43 msgid "Add policy" @@ -32722,15 +32826,15 @@ msgstr "Policy name already exists" #: ../../enterprise/godmode/policies/policies.php:170 msgid "Policies Management" -msgstr "Policies Management" +msgstr "Policies management" #: ../../enterprise/godmode/policies/policies.php:186 msgid "All policy agents added to delete queue" -msgstr "All policy agents added to delete queue." +msgstr "All policy agents added to delete queue" #: ../../enterprise/godmode/policies/policies.php:187 msgid "Policy agents cannot be added to the delete queue" -msgstr "Policy agents cannot be added to the delete queue." +msgstr "Policy agents cannot be added to the delete queue" #: ../../enterprise/godmode/policies/policies.php:237 msgid "a" @@ -32738,15 +32842,15 @@ msgstr "a" #: ../../enterprise/godmode/policies/policies.php:360 msgid "Policy updated" -msgstr "Policy updated." +msgstr "Policy updated" #: ../../enterprise/godmode/policies/policies.php:364 msgid "Pending update policy only database" -msgstr "Pending update policy only database" +msgstr "Pending update for the policy, only for database changes" #: ../../enterprise/godmode/policies/policies.php:368 msgid "Pending update policy" -msgstr "Pending update policy" +msgstr "Pending update of policy" #: ../../enterprise/godmode/policies/policies.php:381 #: ../../enterprise/godmode/policies/policy_linking.php:122 @@ -32756,7 +32860,7 @@ msgstr "Linking" #: ../../enterprise/godmode/policies/policies.php:393 msgid "Agent Wizard" -msgstr "" +msgstr "Agent Wizard" #: ../../enterprise/godmode/policies/policies.php:401 #: ../../enterprise/godmode/policies/policy_external_alerts.php:37 @@ -32780,7 +32884,7 @@ msgstr "Deleting all policy agents" #: ../../enterprise/godmode/policies/policies.php:458 msgid "All the policy agents will be deleted" -msgstr "All the policy agents will be deleted." +msgstr "All policy agents will be deleted." #: ../../enterprise/godmode/policies/policies.php:462 msgid "Delete all agents" @@ -32812,7 +32916,7 @@ msgid "" "Successfully added to delete pending agents. Will be deleted in the next " "policy application." msgstr "" -"Successfully added to agents pending for deletion. They will be deleted in " +"Successfully added to agents pending to be deleted. They will be deleted in " "the next policy application." #: ../../enterprise/godmode/policies/policy_agents.php:100 @@ -32824,7 +32928,7 @@ msgstr "" #: ../../enterprise/godmode/policies/policy_modules.php:1132 #: ../../enterprise/godmode/policies/policy_plugins.php:42 msgid "Successfully reverted deletion" -msgstr "Reverting deletion successful." +msgstr "Deletion reverted successfully" #: ../../enterprise/godmode/policies/policy_agents.php:101 #: ../../enterprise/godmode/policies/policy_agents.php:123 @@ -32835,43 +32939,45 @@ msgstr "Reverting deletion successful." #: ../../enterprise/godmode/policies/policy_modules.php:1133 #: ../../enterprise/godmode/policies/policy_plugins.php:43 msgid "Could not be reverted" -msgstr "Could not be reverted." +msgstr "Could not be reverted" #: ../../enterprise/godmode/policies/policy_agents.php:117 msgid "" "Successfully added to delete pending groups. Will be deleted in the next " "policy application." msgstr "" +"Successfully added to groups pending to be deleted. Will be deleted in the " +"next policy application." #: ../../enterprise/godmode/policies/policy_agents.php:159 #: ../../enterprise/godmode/policies/policy_agents.php:282 msgid "Successfully added to delete queue" -msgstr "Successfully added to delete queue." +msgstr "Successfully added to delete queue" #: ../../enterprise/godmode/policies/policy_agents.php:160 #: ../../enterprise/godmode/policies/policy_agents.php:283 msgid "Could not be added to delete queue" -msgstr "Could not be added to the delete queue." +msgstr "Could not be added to the delete queue" #: ../../enterprise/godmode/policies/policy_agents.php:195 msgid "Successfully deleted from delete pending agents" -msgstr "Successfully deleted from agents pending deletion." +msgstr "Successfully deleted from agents pending to be deleted" #: ../../enterprise/godmode/policies/policy_agents.php:196 msgid "Could not be deleted from delete pending agents" -msgstr "Could not be deleted from agents pending deletion" +msgstr "Could not be deleted from agents pending to be deleted" #: ../../enterprise/godmode/policies/policy_agents.php:353 msgid "Apply to" -msgstr "" +msgstr "Apply to" #: ../../enterprise/godmode/policies/policy_agents.php:420 msgid "Agents in Policy" -msgstr "Agents in Policy" +msgstr "Agents in policy" #: ../../enterprise/godmode/policies/policy_agents.php:437 msgid "Groups in Policy" -msgstr "" +msgstr "Groups in policy" #: ../../enterprise/godmode/policies/policy_agents.php:517 msgid "Add agents to policy" @@ -32915,7 +33021,7 @@ msgstr "Add to delete queue" #: ../../enterprise/godmode/policies/policy_agents.php:631 msgid "This agent can not be remotely configured" -msgstr "This agent can not be remotely configured." +msgstr "This agent cannot be remotely configured." #: ../../enterprise/godmode/policies/policy_agents.php:656 #: ../../enterprise/godmode/policies/policy_agents.php:893 @@ -32941,7 +33047,7 @@ msgstr "Policy applied" #: ../../enterprise/godmode/policies/policy_agents.php:702 #: ../../enterprise/godmode/policies/policy_agents.php:868 msgid "Need apply" -msgstr "Need apply" +msgstr "Must be applied" #: ../../enterprise/godmode/policies/policy_agents.php:710 #: ../../enterprise/godmode/policies/policy_agents.php:875 @@ -32955,19 +33061,19 @@ msgstr "Deleting from policy" #: ../../enterprise/godmode/policies/policy_agents.php:795 msgid "Add groups to policy" -msgstr "" +msgstr "Add groups to policy" #: ../../enterprise/godmode/policies/policy_agents.php:801 msgid "Delete groups from policy" -msgstr "" +msgstr "Delete groups from policy" #: ../../enterprise/godmode/policies/policy_agents.php:821 msgid "Total agents in policy group" -msgstr "" +msgstr "Total agents in policy group" #: ../../enterprise/godmode/policies/policy_agents.php:821 msgid "T." -msgstr "" +msgstr "T." #: ../../enterprise/godmode/policies/policy_alerts.php:148 #: ../../enterprise/godmode/policies/policy_external_alerts.php:73 @@ -32980,8 +33086,8 @@ msgid "" "Successfully added to delete pending alerts. Will be deleted in the next " "policy application." msgstr "" -"Successfully added to alerts pending deletion. It will be deleted in the " -"next policy application." +"Successfully added to alerts pending to be deleted. It will be deleted in " +"the next policy application." #: ../../enterprise/godmode/policies/policy_alerts.php:188 #: ../../enterprise/godmode/policies/policy_external_alerts.php:120 @@ -33002,8 +33108,8 @@ msgid "" "Successfully added to delete the collection. Will be deleted in the next " "policy application." msgstr "" -"Successfully added to deletion of the collection. It will be deleted in the " -"next policy application." +"Successfully added to the deletion of the collection. It will be deleted in " +"the next policy application." #: ../../enterprise/godmode/policies/policy_collections.php:161 #: ../../enterprise/godmode/policies/policy_collections.php:213 @@ -33023,7 +33129,7 @@ msgstr "Modules in policy agents" #: ../../enterprise/godmode/policies/policy_external_alerts.php:315 msgid "Alert Template" -msgstr "Alert Template" +msgstr "Alert template" #: ../../enterprise/godmode/policies/policy_inventory_modules.php:65 msgid "Module is not selected" @@ -33036,7 +33142,7 @@ msgid "" "Successfully added to delete pending modules. Will be deleted in the next " "policy application." msgstr "" -"Successfully added to modules pending for deletion. They will be deleted in " +"Successfully added to modules pending to be deleted. They will be deleted in " "the next policy application." #: ../../enterprise/godmode/policies/policy_inventory_modules.php:186 @@ -33053,11 +33159,11 @@ msgstr "Linking modules" #: ../../enterprise/godmode/policies/policy_linking.php:53 msgid "Error: Update linking modules to policy" -msgstr "Error : Update linking modules to policy" +msgstr "Error: updating modules linked to policy" #: ../../enterprise/godmode/policies/policy_linking.php:56 msgid "Success: Update linking modules to policy" -msgstr "Success : Update linking modules to policy" +msgstr "Success: updating modules linked to policy" #: ../../enterprise/godmode/policies/policy_linking.php:66 msgid "Free text for filter (*)" @@ -33080,7 +33186,7 @@ msgid "" "If you change this description, you must change into the text of Data " "configuration." msgstr "" -"If you change this description, you must change to the text of Data " +"If you change this description, you must change it in the text of data " "configuration." #: ../../enterprise/godmode/policies/policy_modules.php:320 @@ -33103,44 +33209,44 @@ msgstr "Module(s) could not be added. You must select a policy first." #: ../../enterprise/godmode/policies/policy_modules.php:476 #, php-format msgid "Successfully added module(s) (%s/%s) to policy %s" -msgstr "Successfully added module(s) (%s/%s) to policy %s" +msgstr "Module(s) (%s/%s) added successfully to policy %s" #: ../../enterprise/godmode/policies/policy_modules.php:478 #, php-format msgid "Could not be added module(s) (%s/%s) to policy %s" -msgstr "module(s) could not be added (%s/%s) to policy %s." +msgstr "Module(s) (%s/%s) could not be added to policy %s." #: ../../enterprise/godmode/policies/policy_modules.php:768 #: ../../enterprise/meta/include/functions_wizard_meta.php:1908 #: ../../enterprise/meta/include/functions_wizard_meta.php:2002 msgid "Successfully added module." -msgstr "Module successfully added." +msgstr "Module successfully added" #: ../../enterprise/godmode/policies/policy_modules.php:769 msgid "Could not be added module." -msgstr "Module could not be added." +msgstr "Module could not be added" #: ../../enterprise/godmode/policies/policy_modules.php:1083 msgid "" "The module type in Data configuration is empty, take from combo box of form." msgstr "" -"The module type in Data configuration is empty, take it from the combo box " -"of form." +"The module type in data configuration is empty, choose one from the combo " +"box of the form." #: ../../enterprise/godmode/policies/policy_modules.php:1086 msgid "" "The module name in Data configuration is empty, take from text field of form." msgstr "" -"The module name in Data configuration is empty, take it from the text field " +"The module name in data configuration is empty, take it from the text field " "of form." #: ../../enterprise/godmode/policies/policy_modules.php:1117 msgid "Could not be added to deleted all modules." -msgstr "Could not be added to deleted all modules." +msgstr "Could not be added to deletion of all modules" #: ../../enterprise/godmode/policies/policy_modules.php:1203 msgid "Successfully duplicate the module." -msgstr "Duplication of the module successful." +msgstr "Duplication of module successful" #: ../../enterprise/godmode/policies/policy_modules.php:1263 msgid "Local component" @@ -33152,11 +33258,11 @@ msgstr "There are no defined modules" #: ../../enterprise/godmode/policies/policy_modules.php:1347 msgid "Copy selected modules to policy: " -msgstr "Copy selected modules to policy : " +msgstr "Copy selected modules to policy: " #: ../../enterprise/godmode/policies/policy_modules.php:1525 msgid "Are you sure to copy modules into policy?\\n" -msgstr "Are you sure to copy modules into policy ? \\n" +msgstr "Are you sure you want to copy modules into policy ? \\n" #: ../../enterprise/godmode/policies/policy_modules.php:1545 msgid "Please select any module to copy" @@ -33167,12 +33273,12 @@ msgid "" "Successfully added to delete pending plugins. Will be deleted in the next " "policy application." msgstr "" -"Successfully added to plugins pending deletion. It will be deleted in the " -"next policy application." +"Successfully added to plugins pending to be deleted. It will be deleted in " +"the next policy application." #: ../../enterprise/godmode/policies/policy_plugins.php:34 msgid "Cannot be added to delete pending plugins." -msgstr "Cannot be added to plugins pending deletion." +msgstr "Cannot be added to plugins pending to be deleted" #: ../../enterprise/godmode/policies/policy_plugins.php:116 msgid "There are no defined plugins" @@ -33181,20 +33287,20 @@ msgstr "There are no defined plugins" #: ../../enterprise/godmode/policies/policy_queue.php:59 #: ../../enterprise/meta/advanced/policymanager.queue.php:60 msgid "Operation successfully deleted from the queue" -msgstr "Operation successfully deleted from the queue." +msgstr "Operation successfully deleted from the queue" #: ../../enterprise/godmode/policies/policy_queue.php:60 #: ../../enterprise/meta/advanced/policymanager.queue.php:61 msgid "Operation cannot be deleted from the queue" -msgstr "Operation cannot be deleted from the queue." +msgstr "Operation cannot be deleted from the queue" #: ../../enterprise/godmode/policies/policy_queue.php:101 msgid "Operations successfully deleted from the queue" -msgstr "Operations successfully deleted from the queue." +msgstr "Operations successfully deleted from the queue" #: ../../enterprise/godmode/policies/policy_queue.php:102 msgid "Operations cannot be deleted from the queue" -msgstr "Operations cannot be deleted from the queue." +msgstr "Operations cannot be deleted from the queue" #: ../../enterprise/godmode/policies/policy_queue.php:164 msgid "Update pending" @@ -33202,7 +33308,7 @@ msgstr "Update pending" #: ../../enterprise/godmode/policies/policy_queue.php:166 msgid "Update pending agents" -msgstr "Update pending agents" +msgstr "Agents pending to be updated" #: ../../enterprise/godmode/policies/policy_queue.php:184 msgid "Add to apply queue only for database" @@ -33210,7 +33316,7 @@ msgstr "Add to apply queue only for database" #: ../../enterprise/godmode/policies/policy_queue.php:190 msgid "Update pending groups" -msgstr "" +msgstr "Groups pending to be updated" #: ../../enterprise/godmode/policies/policy_queue.php:198 msgid "Link pending modules" @@ -33218,7 +33324,7 @@ msgstr "Link pending modules" #: ../../enterprise/godmode/policies/policy_queue.php:204 msgid "Will be linked in the next policy application" -msgstr "Will be linked in the next policy application" +msgstr "They will be linked in the next policy application." #: ../../enterprise/godmode/policies/policy_queue.php:207 msgid "Unlink pending modules" @@ -33226,7 +33332,7 @@ msgstr "Unlink pending modules" #: ../../enterprise/godmode/policies/policy_queue.php:213 msgid "Will be unlinked in the next policy application" -msgstr "Will be unlinked in the next policy application." +msgstr "They will be unlinked in the next policy application." #: ../../enterprise/godmode/policies/policy_queue.php:218 msgid "Delete pending" @@ -33249,7 +33355,7 @@ msgstr "Will be deleted in the next policy application" #: ../../enterprise/godmode/policies/policy_queue.php:229 msgid "Delete pending groups" -msgstr "" +msgstr "Delete pending groups" #: ../../enterprise/godmode/policies/policy_queue.php:237 msgid "Delete pending modules" @@ -33320,7 +33426,7 @@ msgstr "Empty queue" #: ../../enterprise/godmode/policies/policy_queue.php:496 msgid "This operation could take a long time" -msgstr "This operation could take a long time." +msgstr "This operation could take some time." #: ../../enterprise/godmode/policies/policy_queue.php:507 msgid "Apply all" @@ -33337,7 +33443,7 @@ msgstr "Graph template editor" #: ../../enterprise/godmode/reporting/graph_template_editor.php:136 msgid "Template updated successfully" -msgstr "Template updated successfully." +msgstr "Template updated successfully" #: ../../enterprise/godmode/reporting/graph_template_editor.php:137 msgid "Error updating template" @@ -33365,11 +33471,11 @@ msgstr "Exact match" #: ../../enterprise/godmode/reporting/graph_template_item_editor.php:165 msgid "Decrease Weight" -msgstr "Decrease Weight" +msgstr "Decrease weight" #: ../../enterprise/godmode/reporting/graph_template_item_editor.php:168 msgid "Increase Weight" -msgstr "Increase Weight" +msgstr "Increase weight" #: ../../enterprise/godmode/reporting/graph_template_list.php:73 msgid "Graph template management" @@ -33388,7 +33494,7 @@ msgstr "Create template" #: ../../enterprise/godmode/reporting/graph_template_wizard.php:64 #: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:151 msgid "Cleanup sucessfully" -msgstr "Cleanup sucessful." +msgstr "Cleanup successful" #: ../../enterprise/godmode/reporting/graph_template_wizard.php:67 #: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:154 @@ -33460,7 +33566,7 @@ msgid "" "Do you want to continue?" msgstr "" "This will delete all reports created in previous template applications. Do " -"you want to continue ?" +"you want to continue?" #: ../../enterprise/godmode/reporting/mysql_builder.php:28 #: ../../enterprise/godmode/reporting/mysql_builder.php:122 @@ -33473,7 +33579,7 @@ msgstr "Create custom SQL" #: ../../enterprise/godmode/reporting/mysql_builder.php:70 msgid ": Create new custom" -msgstr "Create new custom :" +msgstr "Create new custom search:" #: ../../enterprise/godmode/reporting/mysql_builder.php:90 msgid "Create new custom" @@ -33481,15 +33587,15 @@ msgstr "Create new custom" #: ../../enterprise/godmode/reporting/mysql_builder.php:125 msgid "Successfully operation" -msgstr "Operation successful." +msgstr "Successful operation" #: ../../enterprise/godmode/reporting/mysql_builder.php:125 msgid "Could not be operation" -msgstr "Cannot not be an operation." +msgstr "Operation could not be completed" #: ../../enterprise/godmode/reporting/reporting_builder.advanced.php:68 msgid "Advance Reporting" -msgstr "Advance Reporting" +msgstr "Advance reporting" #: ../../enterprise/godmode/reporting/reporting_builder.global.php:74 #: ../../enterprise/include/functions_reporting.php:39 @@ -33555,11 +33661,11 @@ msgstr "Export to JSON" #: ../../enterprise/godmode/reporting/reporting_builder.template.php:384 msgid "You haven't created templates yet." -msgstr "You haven't created templates yet." +msgstr "You have not created templates yet." #: ../../enterprise/godmode/reporting/reporting_builder.template.php:397 msgid "Generate a dynamic report\"" -msgstr "Generate a dynamic report\"" +msgstr "Generate a dynamic report" #: ../../enterprise/godmode/reporting/reporting_builder.template.php:475 msgid "Add agents" @@ -33577,11 +33683,11 @@ msgstr "Generate" #: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:760 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:1015 msgid "Please set agent distinct than " -msgstr "" +msgstr "Please set agent different than " #: ../../enterprise/godmode/reporting/reporting_builder.template_advanced.php:105 msgid "Advance Options" -msgstr "Advance Options" +msgstr "Advance options" #: ../../enterprise/godmode/reporting/reporting_builder.template_advanced.php:121 #: ../../enterprise/meta/advanced/metasetup.visual.php:294 @@ -33590,9 +33696,9 @@ msgid "" "\"images/custom_logo\". You can upload more files (ONLY JPEG) in upload tool " "in console." msgstr "" -"The directory for custom logos can be found on the Pandora Console under " -"\"images/custom_logo\". You can upload more files (ONLY IN JPEG) using the " -"console's upload tool." +"The directory for custom logos can be found on the Pandora FMS Console under " +"'images/custom_logo'. You can upload more files (ONLY IN JPEG) using the " +"console upload tool." #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1534 msgid "" @@ -33613,8 +33719,8 @@ msgid "" "usage in matchine 1." msgstr "" "Case insensitive regular expression or string for module name, e.g. if you " -"use this field with \"Module exact match\" enabled then this field has to be " -"filled out with the literal string of the module name, if not you can use a " +"use this field with 'Module exact match' enabled then this field has to be " +"filled out with the literal string of the module name. If not you can use a " "regular expression, e.g. *usage.* will match: cpu_usage, vram usage in " "machine 1." @@ -33628,15 +33734,15 @@ msgstr "Module exact match" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2343 #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2418 msgid "Check it if you want to match module name literally" -msgstr "Check if you want to literally match module name." +msgstr "Check if you want to match the module name literally" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1568 msgid "Hide items without data" -msgstr "" +msgstr "Hide items without data" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1568 msgid "Check it if you want not show items without data" -msgstr "" +msgstr "Check if you want to hide items without data" #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1608 msgid "Query SQL" @@ -33652,8 +33758,8 @@ msgid "" "If this option was checked, only adding in elements that type of modules " "support this option." msgstr "" -"If this option was checked, only adding in elements that type of modules " -"support this option." +"If this option is checked, only adding this type of modules supports this " +"option." #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:1893 msgid "Modules to match" @@ -33682,7 +33788,7 @@ msgid "" "agent, instead create a big graph with all modules from all agents." msgstr "" "If this is checked, the regexp or name of modules match only once to each " -"agent, instead of creating a big graph with all modules from all agents." +"agent, instead of creating a large graph with all modules from all agents." #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2145 msgid "Please save the SLA template for start to add items in this list." @@ -33711,11 +33817,11 @@ msgstr "Please save the template to start adding items to the list." #: ../../enterprise/godmode/reporting/reporting_builder.template_item.php:2671 msgid "Name and SLA limit should not be empty" -msgstr "" +msgstr "Name and SLA limit should not be empty" #: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:195 msgid "Sucessfully applied" -msgstr "Sucessfully applied." +msgstr "Successfully applied" #: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:195 msgid "reports" @@ -33727,7 +33833,7 @@ msgstr "Items" #: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:197 msgid "Could not be applied" -msgstr "Could not be applied." +msgstr "Could not be applied" #: ../../enterprise/godmode/reporting/reporting_builder.template_wizard.php:217 msgid "Create template report wizard" @@ -33780,11 +33886,11 @@ msgstr "SLA-Wizard" #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:115 msgid "hourly S.L.A." -msgstr "hourly S.L.A." +msgstr "hourly SLA" #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:116 msgid "Availability Graph S.L.A." -msgstr "Availability Graph S.L.A." +msgstr "Availability Graph SLA" #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:203 msgid "SLA min value" @@ -33812,15 +33918,15 @@ msgstr "SLA limit value" #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:325 msgid "SLA min value is needed" -msgstr "" +msgstr "SLA min value is needed" #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:329 msgid "SLA max value is needed" -msgstr "" +msgstr "SLA max value is needed" #: ../../enterprise/godmode/reporting/reporting_builder.wizard_sla.php:333 msgid "SLA Limit value is needed" -msgstr "" +msgstr "SLA limit value is needed" #: ../../enterprise/godmode/reporting/visual_console_builder.wizard_services.php:104 msgid "Available" @@ -33845,46 +33951,46 @@ msgstr "The services list is empty" #: ../../enterprise/godmode/reporting/cluster_view.php:29 #: ../../enterprise/godmode/reporting/cluster_builder.php:40 msgid "Clusters list" -msgstr "" +msgstr "Clusters list" #: ../../enterprise/godmode/reporting/cluster_view.php:34 msgid "Cluster editor" -msgstr "" +msgstr "Cluster editor" #: ../../enterprise/godmode/reporting/cluster_view.php:36 msgid "Cluster detail" -msgstr "" +msgstr "Cluster detail" #: ../../enterprise/godmode/reporting/cluster_view.php:102 msgid "Node running with" -msgstr "" +msgstr "Node running with" #: ../../enterprise/godmode/reporting/cluster_view.php:103 msgid "balanced modules" -msgstr "" +msgstr "balanced modules" #: ../../enterprise/godmode/reporting/cluster_view.php:118 msgid "Cluster status" -msgstr "" +msgstr "Cluster status" #: ../../enterprise/godmode/reporting/cluster_view.php:172 msgid "Reload cluster" -msgstr "" +msgstr "Reload cluster" #: ../../enterprise/godmode/reporting/cluster_view.php:292 #: ../../enterprise/godmode/reporting/cluster_name_agents.php:22 msgid "Balanced modules" -msgstr "" +msgstr "Balanced modules" #: ../../enterprise/godmode/reporting/cluster_view.php:369 #: ../../enterprise/godmode/reporting/cluster_name_agents.php:25 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:480 msgid "Common modules" -msgstr "" +msgstr "Common modules" #: ../../enterprise/godmode/reporting/cluster_builder.php:46 msgid "Cluster view" -msgstr "" +msgstr "Cluster view" #: ../../enterprise/godmode/reporting/cluster_builder.php:144 #: ../../enterprise/godmode/reporting/cluster_builder.php:191 @@ -33893,47 +33999,47 @@ msgstr "" #: ../../enterprise/godmode/reporting/cluster_builder.php:497 #: ../../enterprise/godmode/reporting/cluster_builder.php:543 msgid "Cluster" -msgstr "" +msgstr "Cluster" #: ../../enterprise/godmode/reporting/cluster_name_agents.php:199 msgid "No init" -msgstr "" +msgstr "No initialized" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:46 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:52 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:57 msgid "Cluster settings" -msgstr "" +msgstr "Cluster settings" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:76 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:82 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:87 msgid "Cluster agents" -msgstr "" +msgstr "Cluster agents" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:107 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:113 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:118 msgid "A/A modules" -msgstr "" +msgstr "A/A modules" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:140 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:146 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:151 msgid "A/A modules limits" -msgstr "" +msgstr "A/A modules limits" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:176 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:182 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:187 msgid "A/P modules" -msgstr "" +msgstr "A/P modules" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:208 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:214 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:219 msgid "Critical A/P modules" -msgstr "" +msgstr "Critical A/P modules" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:240 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:313 @@ -33941,145 +34047,147 @@ msgstr "" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:545 #: ../../enterprise/godmode/reporting/cluster_list.php:155 msgid "Cluster name" -msgstr "" +msgstr "Cluster name" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:240 msgid "" "An agent with the same name of the cluster will be created, as well a " "special service with the same name" msgstr "" +"An agent with the same name of the cluster will be created, as well a " +"special service with the same name" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:244 msgid "Should not be empty" -msgstr "" +msgstr "Should not be empty" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:253 msgid "Cluster type" -msgstr "" +msgstr "Cluster type" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:258 -msgid "Active - Active" -msgstr "" +msgid "Ative - Active" +msgstr "Active - Active" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:259 msgid "Active - Pasive" -msgstr "" +msgstr "Active - Passive" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:296 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:373 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:515 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:687 msgid "Update and view cluster" -msgstr "" +msgstr "Update and view cluster" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:318 msgid "Adding agents to the cluster" -msgstr "" +msgstr "Adding agents to the cluster" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:332 msgid "Agents in Cluster" -msgstr "" +msgstr "Agents in cluster" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:355 msgid "Add agents to cluster" -msgstr "" +msgstr "Add agents to cluster" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:357 msgid "Drop agents to cluster" -msgstr "" +msgstr "Drop agents to cluster" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:370 msgid "Update and next" -msgstr "" +msgstr "Update and next" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:397 msgid "Adding common modules" -msgstr "" +msgstr "Adding common modules" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:403 msgid "Common in agents" -msgstr "" +msgstr "Common modules in agents" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:411 msgid "Added common modules" -msgstr "" +msgstr "Common modules added" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:448 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:601 msgid "Add modules to cluster" -msgstr "" +msgstr "Add modules to cluster" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:450 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:603 msgid "Drop modules to cluster" -msgstr "" +msgstr "Drop modules to cluster" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:462 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:512 #: ../../enterprise/godmode/reporting/cluster_builder.main.php:615 msgid "Update and Next" -msgstr "" +msgstr "Update and next" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:481 msgid "Critical if equal or greater than" -msgstr "" +msgstr "Critical if equal or greater than" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:482 msgid "Warning if equal or greater than" -msgstr "" +msgstr "Warning if equal or greater than" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:550 msgid "Adding balanced modules" -msgstr "" +msgstr "Adding balanced modules" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:564 msgid "Added balanced modules" -msgstr "" +msgstr "Balanced modules added" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:647 msgid "Balanced modules settings" -msgstr "" +msgstr "Balanced modules settings" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:652 msgid "Balanced module" -msgstr "" +msgstr "Balanced module" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:653 msgid "is critical module" -msgstr "" +msgstr "is critical module" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:684 msgid "Update and Finish" -msgstr "" +msgstr "Update and finish" #: ../../enterprise/godmode/reporting/cluster_builder.main.php:1011 msgid "Select at least two agents " -msgstr "" +msgstr "Select at least two agents " #: ../../enterprise/godmode/reporting/cluster_list.php:270 msgid "Create cluster" -msgstr "" +msgstr "Create cluster" #: ../../enterprise/godmode/servers/credential_boxes_satellite.php:30 msgid "Credential Boxes List" -msgstr "" +msgstr "Credential box list" #: ../../enterprise/godmode/servers/credential_boxes_satellite.php:33 msgid "Credential Boxes" -msgstr "" +msgstr "Credential boxes" #: ../../enterprise/godmode/servers/credential_boxes_satellite.php:374 #: ../../enterprise/godmode/servers/list_satellite.php:69 msgid "No Data" -msgstr "" +msgstr "No data" #: ../../enterprise/godmode/servers/list_satellite.php:26 msgid "Satellite Server" -msgstr "" +msgstr "Satellite Server" #: ../../enterprise/godmode/servers/manage_credential_boxes.php:20 msgid "Add Credential Box" -msgstr "" +msgstr "Add credential box" #: ../../enterprise/godmode/servers/manage_export.php:61 msgid "Error updating export target" @@ -34102,7 +34210,7 @@ msgid "" "Can't be created export target: User and password must be filled with FTP " "mode" msgstr "" -"Can't be created export target: User and password must be filled with FTP " +"Export target cannot be created: user and password must be filled with FTP " "mode" #: ../../enterprise/godmode/servers/manage_export.php:121 @@ -34124,30 +34232,30 @@ msgstr "Extra options" #: ../../enterprise/godmode/servers/server_disk_conf_editor.php:130 msgid "Error: The conf file of server is not readble." -msgstr "Error: The conf file of server is not readble." +msgstr "Error: the configuration file of server is not readable." #: ../../enterprise/godmode/servers/server_disk_conf_editor.php:135 msgid "Error: The conf file of server is not writable." -msgstr "Error: The conf file of server is not writable." +msgstr "Error: the configuration file of server is not writable." #: ../../enterprise/godmode/servers/server_disk_conf_editor.php:160 msgid "Delete remote conf server files in Pandora" -msgstr "Delete remote conf server files in Pandora" +msgstr "Delete remote configuration server files in Pandora FMS" #: ../../enterprise/godmode/servers/server_disk_conf_editor.php:164 msgid "" "Delete this conf file implies that Pandora will send back local config to " "console" msgstr "" -"Delete this conf file implies that Pandora will send back local config to " -"console" +"Deleting this configuration file implies that Pandora FMS will send local " +"configuration back to console" #: ../../enterprise/godmode/services/services.elements.php:70 #: ../../enterprise/godmode/services/services.service.php:306 msgid "" "This values are by default because the service is auto calculate mode." msgstr "" -"This values are by default because the service is auto calculate mode." +"These are default values because the service is in auto calculate mode." #: ../../enterprise/godmode/services/services.elements.php:82 msgid "Invalid service" @@ -34159,35 +34267,35 @@ msgstr "Invalid service" #: ../../enterprise/operation/services/services.service_map.php:63 #: ../../enterprise/operation/services/services.table_services.php:39 msgid "Services list" -msgstr "" +msgstr "List of services" #: ../../enterprise/godmode/services/services.elements.php:102 #: ../../enterprise/godmode/services/services.service.php:221 #: ../../enterprise/operation/services/services.service.php:61 #: ../../enterprise/operation/services/services.service_map.php:69 msgid "Services table view" -msgstr "" +msgstr "Services table view" #: ../../enterprise/godmode/services/services.elements.php:109 #: ../../enterprise/godmode/services/services.service.php:226 #: ../../enterprise/operation/services/services.service.php:66 #: ../../enterprise/operation/services/services.service_map.php:75 msgid "Config Service" -msgstr "Config Service" +msgstr "Configuration service" #: ../../enterprise/godmode/services/services.elements.php:115 #: ../../enterprise/godmode/services/services.service.php:231 #: ../../enterprise/operation/services/services.service.php:71 #: ../../enterprise/operation/services/services.service_map.php:81 msgid "Config Elements" -msgstr "Config Elements" +msgstr "Configuration elements" #: ../../enterprise/godmode/services/services.elements.php:123 #: ../../enterprise/godmode/services/services.service.php:236 #: ../../enterprise/operation/services/services.service.php:79 #: ../../enterprise/operation/services/services.service_map.php:87 msgid "View Service" -msgstr "View Service" +msgstr "View service" #: ../../enterprise/godmode/services/services.elements.php:130 #: ../../enterprise/godmode/services/services.service.php:241 @@ -34203,15 +34311,15 @@ msgstr "Edit service elements" #: ../../enterprise/godmode/services/services.elements.php:156 msgid "Error empty module" -msgstr "Error empty module" +msgstr "Error, empty module" #: ../../enterprise/godmode/services/services.elements.php:165 msgid "Error empty agent" -msgstr "Error empty agent" +msgstr "Error, empty agent" #: ../../enterprise/godmode/services/services.elements.php:174 msgid "Error empty service" -msgstr "Error empty service" +msgstr "Error, empty service" #: ../../enterprise/godmode/services/services.elements.php:196 msgid "Service element created successfully" @@ -34263,19 +34371,19 @@ msgstr "Unknown weight" #: ../../enterprise/godmode/services/services.elements.php:401 msgid "Ok weight" -msgstr "Ok weight" +msgstr "OK weight" #: ../../enterprise/godmode/services/services.elements.php:408 msgid "" "Only the critical elements are relevant to calculate the service status" msgstr "" -"Only the critical elements are relevant to calculate the service status" +"Only critical elements are relevant when calculating the service status." #: ../../enterprise/godmode/services/services.service.php:54 #: ../../enterprise/operation/services/services.list.php:507 #: ../../enterprise/operation/services/services.table_services.php:375 msgid "Create Service" -msgstr "Create Service" +msgstr "Create service" #: ../../enterprise/godmode/services/services.service.php:65 #: ../../enterprise/godmode/services/services.service.php:112 @@ -34317,15 +34425,15 @@ msgstr "Not found" #: ../../enterprise/godmode/services/services.service.php:174 msgid "New Service" -msgstr "New Service" +msgstr "New service" #: ../../enterprise/godmode/services/services.service.php:269 msgid "No Services or concrete action" -msgstr "No Services or concrete action" +msgstr "No services or concrete action" #: ../../enterprise/godmode/services/services.service.php:280 msgid "General Data" -msgstr "General Data" +msgstr "General data" #: ../../enterprise/godmode/services/services.service.php:296 msgid "You should set the weights manually" @@ -34347,7 +34455,7 @@ msgid "" "service status" msgstr "" "Only the elements configured as 'critical element' are used to calculate the " -"service status" +"service status." #: ../../enterprise/godmode/services/services.service.php:322 msgid "Agent to store data" @@ -34355,19 +34463,19 @@ msgstr "Agent to store data" #: ../../enterprise/godmode/services/services.service.php:345 msgid "S.L.A. interval" -msgstr "S.L.A. interval" +msgstr "SLA interval" #: ../../enterprise/godmode/services/services.service.php:350 msgid "S.L.A. limit" -msgstr "S.L.A. limit" +msgstr "SLA limit" #: ../../enterprise/godmode/services/services.service.php:352 msgid "Please set limit between 0 to 100." -msgstr "Please set limit between 0 to 100." +msgstr "Please set limit between 0 and 100." #: ../../enterprise/godmode/services/services.service.php:358 msgid "Update service" -msgstr "" +msgstr "Update service" #: ../../enterprise/godmode/services/services.service.php:365 msgid "" @@ -34376,18 +34484,18 @@ msgid "" "\t\tYou can modify the default behaviour editing alerts in the agent who " "stores data and alert definitions about the service and the SLA status." msgstr "" -"Here are described the alert templates, which will use their default " -"actions.\n" -"\t\tYou can modify the default behaviour editing alerts in the agent who " +"Here you will find a description of the alert templates, which will use " +"their default actions.\n" +"\t\tYou can modify the default behaviour by editing alerts in the agent who " "stores data and alert definitions about the service and the SLA status." #: ../../enterprise/godmode/services/services.service.php:379 msgid "Warning Service alert" -msgstr "Warning Service alert" +msgstr "Warning service alert" #: ../../enterprise/godmode/services/services.service.php:390 msgid "Critical Service alert" -msgstr "Critical Service alert" +msgstr "Critical service alert" #: ../../enterprise/godmode/services/services.service.php:408 msgid "SLA critical service alert" @@ -34395,29 +34503,29 @@ msgstr "SLA critical service alert" #: ../../enterprise/godmode/services/services.service.php:422 msgid "Update alerts" -msgstr "" +msgstr "Update alerts" #: ../../enterprise/godmode/setup/edit_skin.php:42 #: ../../enterprise/godmode/setup/setup_skins.php:36 msgid "Skins configuration" -msgstr "Skins configuration" +msgstr "Skin configuration" #: ../../enterprise/godmode/setup/edit_skin.php:45 msgid "Successfully updated skin" -msgstr "Updating skin successful" +msgstr "Skin updated successfully" #: ../../enterprise/godmode/setup/edit_skin.php:48 #: ../../enterprise/godmode/setup/edit_skin.php:60 msgid "Error updating skin" -msgstr "Error in updating skin" +msgstr "Error updating skin" #: ../../enterprise/godmode/setup/edit_skin.php:171 msgid "Error creating skin" -msgstr "Error on creating skin." +msgstr "Error creating skin" #: ../../enterprise/godmode/setup/edit_skin.php:176 msgid "Successfully created skin" -msgstr "Creation of skin successful." +msgstr "Skin created successfully" #: ../../enterprise/godmode/setup/edit_skin.php:216 #: ../../enterprise/godmode/setup/setup_skins.php:118 @@ -34429,12 +34537,12 @@ msgid "" "Zip file with skin subdirectory. The name of the zip file only can have " "alphanumeric characters." msgstr "" -"Zip file with skin subdirectory. The name of the zip file only can have " +"Zip file with skin subdirectory. The name of the zip file can only have " "alphanumeric characters." #: ../../enterprise/godmode/setup/edit_skin.php:239 msgid "Group/s" -msgstr "Group/s" +msgstr "Group(s)" #: ../../enterprise/godmode/setup/setup.php:38 msgid "" @@ -34457,8 +34565,8 @@ msgid "" "Limit the number of events that are replicated metaconsole each specified " "range." msgstr "" -"Limit the number of events that are replicated metaconsole each specified " -"range." +"Limit the number of events that are replicated in the Metaconsole during " +"each specified range." #: ../../enterprise/godmode/setup/setup.php:78 msgid "Last replication at" @@ -34522,20 +34630,20 @@ msgstr "Into black list" #: ../../enterprise/godmode/setup/setup.php:186 msgid "Push selected modules into blacklist" -msgstr "Push selected modules into blacklist." +msgstr "Push selected modules into blacklist" #: ../../enterprise/godmode/setup/setup.php:190 msgid "Pop selected modules out of blacklist" -msgstr "Push selected modules out of blacklist." +msgstr "Push selected modules out of blacklist" #: ../../enterprise/godmode/setup/setup.php:216 msgid "Enterprise options" -msgstr "Enterprise Options" +msgstr "Enterprise options" #: ../../enterprise/godmode/setup/setup.php:236 #: ../../enterprise/meta/advanced/metasetup.mail.php:79 msgid "Mail configuration" -msgstr "" +msgstr "Mail configuration" #: ../../enterprise/godmode/setup/setup.php:293 #: ../../enterprise/meta/advanced/metasetup.password.php:85 @@ -34545,7 +34653,7 @@ msgstr " Characters" #: ../../enterprise/godmode/setup/setup.php:306 #: ../../enterprise/meta/advanced/metasetup.password.php:101 msgid "Set 0 if never expire." -msgstr "Set to '0' to never let it expire." +msgstr "Set it to '0' to prevent it from ever expiring" #: ../../enterprise/godmode/setup/setup.php:307 #: ../../enterprise/meta/advanced/metasetup.password.php:102 @@ -34585,7 +34693,7 @@ msgstr "Enterprise ACL setup" #: ../../enterprise/godmode/setup/setup_acl.php:309 msgid "This record already exists in the database" -msgstr "" +msgstr "This record already exists in the database" #: ../../enterprise/godmode/setup/setup_acl.php:356 #: ../../enterprise/godmode/setup/setup_acl.php:388 @@ -34634,7 +34742,7 @@ msgstr "Remote Pandora FMS" #: ../../enterprise/godmode/setup/setup_auth.php:33 msgid "Remote Integria" -msgstr "Remote Integria" +msgstr "Remote Integria IMS" #: ../../enterprise/godmode/setup/setup_auth.php:34 msgid "SAML" @@ -34644,25 +34752,28 @@ msgstr "SAML" msgid "" "by activating this option, the LDAP password will be stored in the database" msgstr "" +"by activating this option, the LDAP password will be stored in the database" #: ../../enterprise/godmode/setup/setup_auth.php:87 msgid "Local command" -msgstr "" +msgstr "Local command" #: ../../enterprise/godmode/setup/setup_auth.php:90 msgid "PHP function" -msgstr "" +msgstr "PHP function" #: ../../enterprise/godmode/setup/setup_auth.php:102 msgid "" "Enable this option to assign profiles, groups and tags to users from " "specific LDAP Attributes (updated at the next login)" msgstr "" +"Enable this option to assign profiles, groups and tags to users from " +"specific LDAP Attributes (updated during the next login)" #: ../../enterprise/godmode/setup/setup_auth.php:138 #: ../../enterprise/godmode/setup/setup_auth.php:182 msgid "LDAP Attributes" -msgstr "" +msgstr "LDAP attributes" #: ../../enterprise/godmode/setup/setup_auth.php:185 #: ../../enterprise/godmode/setup/setup_auth.php:780 @@ -34679,12 +34790,12 @@ msgstr "Add new permissions" #: ../../enterprise/meta/include/functions_meta.php:774 #: ../../enterprise/meta/include/functions_meta.php:784 msgid "Auto enable node access" -msgstr "" +msgstr "Auto enable node access" #: ../../enterprise/godmode/setup/setup_auth.php:236 #: ../../enterprise/godmode/setup/setup_auth.php:700 msgid "New users will be able to log in to the nodes." -msgstr "" +msgstr "New users will be able to log in to the nodes" #: ../../enterprise/godmode/setup/setup_auth.php:342 #: ../../enterprise/godmode/setup/setup_auth.php:443 @@ -34706,6 +34817,8 @@ msgid "" "Enable this option to assign profiles, groups and tags to users from " "specific AD groups (updated at the next login)" msgstr "" +"Enable this option to assign profiles, groups and tags to users from " +"specific AD groups (updated at the next login)" #: ../../enterprise/godmode/setup/setup_auth.php:737 #: ../../enterprise/godmode/setup/setup_auth.php:778 @@ -34721,22 +34834,22 @@ msgid "" "Event history is ONLY used for event reports, is not used in graphs or event " "viewer." msgstr "" -"Event history is ONLY used for event reports, is not used in graphs or event " -"viewer." +"Event history is ONLY used for event reports, it is not used in graphs or " +"event viewer." #: ../../enterprise/godmode/setup/setup_history.php:68 msgid "Number of days before data is transfered to history database." -msgstr "Number of days before the data is transfered to history database." +msgstr "Number of days before the data is transferred to history database." #: ../../enterprise/godmode/setup/setup_history.php:71 msgid "" "Data size of mechanism used to transfer data (similar to a data buffer.)" msgstr "" -"Data size of mechanism used to transfer the data (similar to a data buffer.)" +"Data size of mechanism used to transfer the data (similar to a data buffer)" #: ../../enterprise/godmode/setup/setup_history.php:74 msgid "Time interval between data transfer." -msgstr "Time interval between data transfer." +msgstr "Time interval between data transfer" #: ../../enterprise/godmode/setup/setup_history.php:77 msgid "Event days" @@ -34744,23 +34857,23 @@ msgstr "Event days" #: ../../enterprise/godmode/setup/setup_history.php:77 msgid "Number of days before events is transfered to history database." -msgstr "Number of days before events is transferred to history database." +msgstr "Number of days before events are transferred to history database" #: ../../enterprise/godmode/setup/setup_log_collector.php:44 msgid "ElasticSearch IP" -msgstr "" +msgstr "ElasticSearch IP" #: ../../enterprise/godmode/setup/setup_log_collector.php:45 msgid "IP of ElasticSearch server" -msgstr "" +msgstr "IP of ElasticSearch server" #: ../../enterprise/godmode/setup/setup_log_collector.php:47 msgid "ElasticSearch Port" -msgstr "" +msgstr "ElasticSearch Port" #: ../../enterprise/godmode/setup/setup_log_collector.php:48 msgid "Port of ElasticSearch server" -msgstr "" +msgstr "Port of ElasticSearch server" #: ../../enterprise/godmode/setup/setup_metaconsole.php:29 msgid "Metaconsole setup" @@ -34774,12 +34887,12 @@ msgstr "Metaconsole setup" #: ../../enterprise/meta/advanced/metasetup.setup.php:85 #: ../../enterprise/meta/advanced/metasetup.visual.php:56 msgid "Successfully update" -msgstr "Update successful." +msgstr "Update successful" #: ../../enterprise/godmode/setup/setup_metaconsole.php:77 #: ../../enterprise/meta/advanced/metasetup.consoles.php:139 msgid "Could not be update" -msgstr "Could not be updated." +msgstr "Could not be updated" #: ../../enterprise/godmode/setup/setup_metaconsole.php:168 #: ../../enterprise/meta/advanced/metasetup.consoles.php:301 @@ -34797,8 +34910,8 @@ msgid "" "Token previously configured on the destination Pandora console in order to " "use delegated authentification." msgstr "" -"Token previously configured on the destination Pandora console in order to " -"use delegated authentification." +"Token previously configured on the destination Pandora FMS console in order " +"to use delegated authentication." #: ../../enterprise/godmode/setup/setup_metaconsole.php:179 #: ../../enterprise/godmode/setup/setup_metaconsole.php:248 @@ -34832,7 +34945,7 @@ msgstr "DB Password" #: ../../enterprise/godmode/setup/setup_metaconsole.php:206 #: ../../enterprise/meta/advanced/metasetup.consoles.php:336 msgid "Console User" -msgstr "Console User" +msgstr "Console user" #: ../../enterprise/godmode/setup/setup_metaconsole.php:210 #: ../../enterprise/meta/advanced/metasetup.consoles.php:339 @@ -34868,7 +34981,7 @@ msgstr "Skin name" #: ../../enterprise/godmode/setup/setup_skins.php:143 msgid "There are no defined skins" -msgstr "There are no defined skins" +msgstr "There are no defined skins." #: ../../enterprise/godmode/setup/setup_skins.php:148 msgid "Create skin" @@ -34877,17 +34990,17 @@ msgstr "Create skin" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:174 #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:187 msgid "Successfully added trap custom values" -msgstr "Success in adding trap custom values." +msgstr "Trap custom values added successfully" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:177 #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:190 msgid "Error adding trap custom values" -msgstr "Error in adding trap custom values." +msgstr "Error adding trap custom values" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:194 #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:256 msgid "This custom OID is preexistent." -msgstr "" +msgstr "This custom OID already exists." #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:225 msgid "No change in data" @@ -34896,20 +35009,20 @@ msgstr "No change in data" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:228 #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:249 msgid "Successfully updated trap custom values" -msgstr "Updating trap custom values successful." +msgstr "Trap custom values updated successfully" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:231 #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:252 msgid "Error updating trap custom values" -msgstr "Error in updating trap custom values." +msgstr "Error updating trap custom values" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:268 msgid "Successfully deleted trap custom values" -msgstr "Deletion of trap custom values successful." +msgstr "Trap custom values deleted successfully" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:272 msgid "Error deleting trap custom values" -msgstr "Error in deleting trap custom values." +msgstr "Error deleting trap custom values" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:279 #, php-format @@ -34918,7 +35031,7 @@ msgstr "Uploaded %s/%s traps" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:283 msgid "Fail uploaded file" -msgstr "Failure in uploading file" +msgstr "Error uploading file" #: ../../enterprise/godmode/snmpconsole/snmp_trap_editor.php:287 msgid "" @@ -34945,19 +35058,19 @@ msgstr "Custom OID" #: ../../enterprise/include/ajax/dashboard.ajax.php:311 msgid "Only one service map widget is supported at this moment" -msgstr "Only one service map widget is supported at this moment" +msgstr "Only one service map widget is supported at this moment." #: ../../enterprise/include/ajax/metaconsole.ajax.php:251 msgid "Error accesing to API, auth error." -msgstr "Error accesing to API, auth error." +msgstr "Error accesing API, authentication error" #: ../../enterprise/include/ajax/metaconsole.ajax.php:255 msgid "Error accesing to API." -msgstr "Error accesing to API." +msgstr "Error accessing API" #: ../../enterprise/include/ajax/metaconsole.ajax.php:259 msgid "Error could not resolve the host." -msgstr "Error could not resolve the host." +msgstr "Error, could not resolve the host" #: ../../enterprise/include/ajax/metaconsole.ajax.php:270 msgid "Database credentials not found" @@ -34965,11 +35078,11 @@ msgstr "Database credentials not found" #: ../../enterprise/include/ajax/metaconsole.ajax.php:274 msgid "Error connecting to the specified host" -msgstr "Error on connecting to the specified host" +msgstr "Error connecting to the specified host" #: ../../enterprise/include/ajax/metaconsole.ajax.php:278 msgid "Connected to the host, but cannot found the specified database" -msgstr "Connected to host, but cannot find the specified database." +msgstr "Connected to host, but cannot find the specified database" #: ../../enterprise/include/ajax/metaconsole.ajax.php:289 #: ../../enterprise/include/ajax/metaconsole.ajax.php:313 @@ -34981,16 +35094,16 @@ msgid "" "\"Translate string\" extension is missed in the server. This extension is " "mandatory to be configured on metaconsole." msgstr "" -"\"Translate string\" extension is missing in the server. This extension is " -"mandatory to be configured on metaconsole." +"'Translate string' extension is missing in the server. This extension must " +"be configured on the Metaconsole." #: ../../enterprise/include/ajax/metaconsole.ajax.php:297 msgid "" "Server name doesnt match. Check the node server name and configure the same " "one on metasetup" msgstr "" -"Server name doesn't match. Check the node server name and configure the same " -"one on metasetup." +"Server name does not match. Check the node server name and configure the " +"same one on metasetup." #: ../../enterprise/include/ajax/metaconsole.ajax.php:308 msgid "Last event replication" @@ -35007,40 +35120,40 @@ msgstr "Agent cache failed" #: ../../enterprise/include/ajax/transactional.ajax.php:178 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:151 msgid "The phase does not have a defined script" -msgstr "" +msgstr "The phase does not have a defined script." #: ../../enterprise/include/ajax/transactional.ajax.php:217 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:201 msgid "Edit Data" -msgstr "" +msgstr "Edit data" #: ../../enterprise/include/ajax/url_route_analyzer.ajax.php:34 msgid "Global time: " -msgstr "" +msgstr "Global time: " #: ../../enterprise/include/ajax/clustermap.php:254 msgid "Common modules list" -msgstr "" +msgstr "Common modules list" #: ../../enterprise/include/ajax/clustermap.php:465 msgid "Balanced modules list" -msgstr "" +msgstr "Balanced modules list" #: ../../enterprise/include/process_reset_pass.php:106 #: ../../enterprise/meta/include/process_reset_pass.php:83 msgid "Repeat password" -msgstr "" +msgstr "Repeat password" #: ../../enterprise/include/process_reset_pass.php:109 #: ../../enterprise/meta/include/process_reset_pass.php:86 msgid "Change password" -msgstr "" +msgstr "Change password" #: ../../enterprise/include/process_reset_pass.php:112 #: ../../enterprise/meta/include/process_reset_pass.php:89 #: ../../enterprise/meta/index.php:500 ../../index.php:620 msgid "Passwords must be the same" -msgstr "" +msgstr "Passwords must be the same" #: ../../enterprise/include/process_reset_pass.php:120 #: ../../enterprise/include/reset_pass.php:110 @@ -35066,7 +35179,7 @@ msgstr "Restoring a backup" #: ../../enterprise/include/functions_backup.php:244 #: ../../enterprise/include/functions_backup.php:326 msgid "Restoring a Pandora database backup must be done manually" -msgstr "Restoring the Pandora database backup must be done manually." +msgstr "Restoration the Pandora FMS database backup must be done manually." #: ../../enterprise/include/functions_backup.php:245 #: ../../enterprise/include/functions_backup.php:327 @@ -35074,13 +35187,13 @@ msgid "" "It's a complex operation that needs human intervation to avoid system " "failures and data loosing" msgstr "" -"It's a complex operation that needs human intervation to avoid system " +"This is a complex operation that requires human intervention to avoid system " "failures and data loss." #: ../../enterprise/include/functions_backup.php:246 #: ../../enterprise/include/functions_backup.php:328 msgid "To restore the selected backup, please follow these steps" -msgstr "To restore the selected backup, please follow these steps" +msgstr "To restore the selected backup, please follow these steps." #: ../../enterprise/include/functions_backup.php:252 #: ../../enterprise/include/functions_backup.php:334 @@ -35102,7 +35215,7 @@ msgstr "Restore the backup" #: ../../enterprise/include/functions_backup.php:284 #: ../../enterprise/include/functions_backup.php:349 msgid "Modify console configuration to use this new database" -msgstr "Please modify console configuration to use this new database." +msgstr "Please modify the console configuration to use this new database." #: ../../enterprise/include/functions_backup.php:285 #: ../../enterprise/include/functions_backup.php:350 @@ -35141,7 +35254,7 @@ msgstr "Please restart the servers and login to the console again." #: ../../enterprise/include/functions_backup.php:341 msgid "Run import command using the following command" -msgstr "Please run the import command using the following command" +msgstr "Please execute the import command using the following command" #: ../../enterprise/include/functions_backup.php:345 msgid "Into your destination database." @@ -35150,7 +35263,7 @@ msgstr "Into your destination database." #: ../../enterprise/include/functions_collection.php:42 #, php-format msgid "Fail create the directory: %s" -msgstr "Failure in creating the directory: %s" +msgstr "Error creating the directory: %s" #: ../../enterprise/include/functions_collection.php:69 msgid "No files in collection" @@ -35158,12 +35271,12 @@ msgstr "No files in collection" #: ../../enterprise/include/functions_collection.php:77 msgid "File of collection is bigger than the limit (" -msgstr "File of collection is bigger than the limit (" +msgstr "Collection file is larger than the limit (" #: ../../enterprise/include/functions_dashboard.php:408 #, php-format msgid "Copy of %s" -msgstr "" +msgstr "Copy of %s" #: ../../enterprise/include/functions_dashboard.php:822 msgid "Change every" @@ -35188,6 +35301,9 @@ msgid "" "data history storage interval, data will be lost. It is recommended that the " "storage frequency is higher than the purge frequency." msgstr "" +"If the interval of days until event data purge is shorter than the event " +"data history storage interval, data will be lost. It is recommended to set " +"storage frequency higher than purge frequency." #: ../../enterprise/include/functions_enterprise.php:323 msgid "" @@ -35202,7 +35318,7 @@ msgid "" "than days to history DB" msgstr "" "If the number of days purged is lower than history days passed to the " -"history DB, data will be lost. It's recommended that days purged be longer " +"history DB, data will be lost. It is recommended to set purged days longer " "than days passed to history DB." #: ../../enterprise/include/functions_enterprise.php:333 @@ -35212,23 +35328,23 @@ msgstr "Problems with days purged and days that pass data to history DB" #: ../../enterprise/include/functions_visual_map.php:182 #: ../../enterprise/include/functions_visual_map.php:235 msgid "Crit:" -msgstr "Crit:" +msgstr "Critical:" #: ../../enterprise/include/functions_visual_map.php:184 #: ../../enterprise/include/functions_visual_map.php:237 msgid "Warn:" -msgstr "Warn:" +msgstr "Warning:" #: ../../enterprise/include/functions_visual_map.php:186 #: ../../enterprise/include/functions_visual_map.php:239 msgid "Ok:" -msgstr "Ok:" +msgstr "OK:" #: ../../enterprise/include/functions_visual_map.php:188 #: ../../enterprise/include/functions_visual_map.php:241 #: ../../enterprise/meta/include/functions_autoprovision.php:653 msgid "Value:" -msgstr "Value :" +msgstr "Value:" #: ../../enterprise/include/functions_visual_map.php:615 msgid "None of the services was added" @@ -35237,7 +35353,7 @@ msgstr "None of the services was added" #: ../../enterprise/include/functions_visual_map.php:618 #, php-format msgid "%d services couldn't be added" -msgstr "%d services couldn't be added" +msgstr "%d services could not be added" #: ../../enterprise/include/functions_visual_map.php:626 msgid "There was an error retrieving the visual map information" @@ -35255,7 +35371,7 @@ msgstr "Hours" #: ../../enterprise/include/functions_events.php:177 #: ../../enterprise/include/functions_events.php:194 msgid "More than 5 tags" -msgstr "" +msgstr "More than 5 tags" #: ../../enterprise/include/functions_groups.php:47 msgid "Metaconsole" @@ -35264,12 +35380,12 @@ msgstr "Metaconsole" #: ../../enterprise/include/functions_inventory.php:54 #: ../../enterprise/include/functions_inventory.php:639 msgid "No changes found" -msgstr "No changes found." +msgstr "No changes found" #: ../../enterprise/include/functions_inventory.php:64 #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:352 msgid "Agent alias" -msgstr "" +msgstr "Agent alias" #: ../../enterprise/include/functions_inventory.php:80 msgid "Get CSV file" @@ -35297,23 +35413,23 @@ msgstr "Lines" #: ../../enterprise/include/functions_login.php:21 msgid "You must change password:" -msgstr "" +msgstr "You must change the password:" #: ../../enterprise/include/functions_login.php:37 msgid "Password must be different from the 3 previous changes." -msgstr "" +msgstr "Password must be different from the 3 previous changes." #: ../../enterprise/include/functions_login.php:47 msgid "Old pass: " -msgstr "" +msgstr "Old password: " #: ../../enterprise/include/functions_login.php:50 msgid "New pass: " -msgstr "" +msgstr "New password: " #: ../../enterprise/include/functions_login.php:54 msgid "Confirm: " -msgstr "" +msgstr "Confirm: " #: ../../enterprise/include/functions_login.php:60 msgid "Change" @@ -35321,7 +35437,7 @@ msgstr "Change" #: ../../enterprise/include/functions_login.php:91 msgid "Login blocked" -msgstr "" +msgstr "Login blocked" #: ../../enterprise/include/functions_login.php:99 msgid "User has been blocked. Try again in " @@ -35333,15 +35449,15 @@ msgstr " minutes" #: ../../enterprise/include/functions_login.php:128 msgid "Login successfully" -msgstr "" +msgstr "Successfully logged in" #: ../../enterprise/include/functions_login.php:135 msgid "Successfully" -msgstr "" +msgstr "Successfully" #: ../../enterprise/include/functions_login.php:136 msgid "User pass successfully updated" -msgstr "User pass successfully updated" +msgstr "User password successfully updated" #: ../../enterprise/include/functions_login.php:237 msgid "Password must be different from the " @@ -35361,11 +35477,11 @@ msgstr "Password too short" #: ../../enterprise/include/functions_login.php:272 msgid "Password must contain numbers" -msgstr "Password has to contain numbers." +msgstr "Password has to contain numbers" #: ../../enterprise/include/functions_login.php:284 msgid "Password must contain symbols" -msgstr "Password has to contain symbols." +msgstr "Password has to contain symbols" #: ../../enterprise/include/functions_login.php:304 msgid "Invalid old password" @@ -35373,7 +35489,7 @@ msgstr "Invalid old password" #: ../../enterprise/include/functions_login.php:339 msgid "Password confirm does not match" -msgstr "Password confirm does not match" +msgstr "Passwords do not match" #: ../../enterprise/include/functions_login.php:347 msgid "Password empty" @@ -35418,11 +35534,11 @@ msgstr "Relink to policy" #: ../../enterprise/include/functions_policies.php:3229 msgid "Module pending to link" -msgstr "Module pending to link" +msgstr "Module pending to be linked" #: ../../enterprise/include/functions_policies.php:3234 msgid "Module pending to unlink" -msgstr "Module pending to unlink" +msgstr "Module pending to be unlinked" #: ../../enterprise/include/functions_policies.php:3960 msgid "Create a new policy map" @@ -35435,7 +35551,7 @@ msgid "" "more policies in our <a href='%s'>Public Resource Library</a>" msgstr "" "This extension registers Enterprise policies. <br> You can get more policies " -"in our <a href='%s'>Public Resource Library</a>" +"in our <a href='%s'>Public Resource Library</a>." #: ../../enterprise/include/functions_reporting.php:42 msgid "Advance options" @@ -35443,12 +35559,12 @@ msgstr "Advanced options" #: ../../enterprise/include/functions_reporting.php:60 msgid "Templates list" -msgstr "Templates list" +msgstr "List of templates" #: ../../enterprise/include/functions_reporting.php:66 #: ../../enterprise/meta/general/main_header.php:165 msgid "Templates wizard" -msgstr "Templates wizard" +msgstr "Templates Wizard" #: ../../enterprise/include/functions_reporting.php:86 msgid "Templates Wizard" @@ -35456,21 +35572,21 @@ msgstr "Templates Wizard" #: ../../enterprise/include/functions_reporting.php:1019 msgid "Availability item created from wizard." -msgstr "Availability item created from wizard." +msgstr "Availability item created from wizard" #: ../../enterprise/include/functions_reporting.php:1686 #: ../../enterprise/include/functions_reporting.php:2494 #: ../../enterprise/include/functions_reporting.php:3271 #: ../../enterprise/include/functions_reporting_pdf.php:1734 msgid "Planned Downtimes" -msgstr "Planned Downtimes" +msgstr "Planned downtimes" #: ../../enterprise/include/functions_reporting.php:1692 #: ../../enterprise/include/functions_reporting.php:2500 #: ../../enterprise/include/functions_reporting.php:3277 #: ../../enterprise/include/functions_reporting_pdf.php:1740 msgid "Ignore Time" -msgstr "Ignore Time" +msgstr "Ignore time" #: ../../enterprise/include/functions_reporting.php:1712 #: ../../enterprise/include/functions_reporting_pdf.php:1755 @@ -35524,11 +35640,11 @@ msgstr "SLA %" #: ../../enterprise/include/functions_reporting.php:3930 msgid "Module Histogram Graph" -msgstr "" +msgstr "Module histogram graph" #: ../../enterprise/include/functions_reporting.php:4456 msgid "There are no SLAs defined." -msgstr "There are no SLAs defined." +msgstr "There are no SLAs defined" #: ../../enterprise/include/functions_reporting.php:4570 #: ../../enterprise/include/functions_reporting.php:5189 @@ -35555,7 +35671,7 @@ msgstr "Graph agent(%s) - %s" #: ../../enterprise/include/functions_reporting.php:6598 msgid "There is not data for the selected conditions" -msgstr "" +msgstr "There is no data for the selected conditions" #: ../../enterprise/include/functions_reporting.php:6749 #: ../../enterprise/include/functions_reporting.php:6799 @@ -35568,7 +35684,7 @@ msgstr "Get PDF file" #: ../../enterprise/include/functions_reporting_csv.php:376 msgid "Serialized data " -msgstr "Serialised data " +msgstr "Serialized data " #: ../../enterprise/include/functions_reporting_csv.php:468 #: ../../enterprise/include/functions_reporting_csv.php:567 @@ -35586,11 +35702,11 @@ msgstr "Report type" #: ../../enterprise/include/functions_reporting_csv.php:470 msgid "Uknown agents" -msgstr "Uknown agents" +msgstr "Unknown agents" #: ../../enterprise/include/functions_reporting_csv.php:479 msgid "Last 8 hours events" -msgstr "Last 8 hours events" +msgstr "Events from the last 8 hours" #: ../../enterprise/include/functions_reporting_csv.php:715 msgid "Illegal query or any other error" @@ -36091,79 +36207,79 @@ msgstr "SO" #: ../../enterprise/include/functions_reporting_pdf.php:2438 msgid "There are no modules." -msgstr "There are no modules." +msgstr "There are no modules" #: ../../enterprise/include/functions_services.php:22 msgid "There is no information about" -msgstr "" +msgstr "There is no information about" #: ../../enterprise/include/functions_services.php:26 msgid "Service does not exist." -msgstr "Service does not exist." +msgstr "The service does not exist" #: ../../enterprise/include/functions_services.php:34 msgid ", module that stores the service" -msgstr "" +msgstr ", module that stores the service" #: ../../enterprise/include/functions_services.php:37 msgid "module that stores the service" -msgstr "" +msgstr "module that stores the service" #: ../../enterprise/include/functions_services.php:45 msgid ", module that stores SLA service" -msgstr "" +msgstr ", module that stores SLA service" #: ../../enterprise/include/functions_services.php:48 msgid "module that stores SLA service" -msgstr "" +msgstr "module that stores SLA service" #: ../../enterprise/include/functions_services.php:58 msgid ", agent that stores the service" -msgstr "" +msgstr ", agent that stores the service" #: ../../enterprise/include/functions_services.php:61 msgid "agent that stores the service" -msgstr "" +msgstr "agent that stores the service" #: ../../enterprise/include/functions_services.php:70 msgid ", agent that stores SLA service" -msgstr "" +msgstr ", agent that stores SLA service" #: ../../enterprise/include/functions_services.php:73 msgid "agent that stores SLA service" -msgstr "" +msgstr "agent that stores SLA service" #: ../../enterprise/include/functions_services.php:86 msgid ", alert critical SLA service" -msgstr "" +msgstr ", alert critical SLA service" #: ../../enterprise/include/functions_services.php:89 msgid "alert critical SLA service" -msgstr "" +msgstr "alert critical SLA service" #: ../../enterprise/include/functions_services.php:103 msgid ", alert warning service" -msgstr "" +msgstr "service in warning" #: ../../enterprise/include/functions_services.php:106 msgid "alert warning service" -msgstr "" +msgstr "service in warning" #: ../../enterprise/include/functions_services.php:120 msgid ", alert critical service" -msgstr "" +msgstr ", alert critical service" #: ../../enterprise/include/functions_services.php:123 msgid "alert critical service" -msgstr "" +msgstr "alert critical service" #: ../../enterprise/include/functions_services.php:137 msgid ", alert unknown service" -msgstr "" +msgstr ", alert unknown service" #: ../../enterprise/include/functions_services.php:140 msgid "alert unknown service" -msgstr "" +msgstr "alert unknown service" #: ../../enterprise/include/functions_services.php:379 #, php-format @@ -36176,7 +36292,7 @@ msgstr "Critical (Alert)" #: ../../enterprise/include/functions_services.php:1480 msgid "There are no service elements defined" -msgstr "There are no service elements defined." +msgstr "There are no service elements defined" #: ../../enterprise/include/functions_services.php:1506 msgid "Weight Critical" @@ -36184,7 +36300,7 @@ msgstr "Weight Critical" #: ../../enterprise/include/functions_services.php:1507 msgid "Weight Warning" -msgstr "Weight Warning" +msgstr "Warning weight" #: ../../enterprise/include/functions_services.php:1508 msgid "Weight Unknown" @@ -36192,13 +36308,13 @@ msgstr "Weight Unknown" #: ../../enterprise/include/functions_services.php:1509 msgid "Weight Ok" -msgstr "Weight Ok" +msgstr "Weight OK" #: ../../enterprise/include/functions_services.php:1535 #: ../../enterprise/include/functions_services.php:1550 #: ../../enterprise/include/functions_services.php:1585 msgid "Nonexistent. This element should be deleted" -msgstr "Nonexistent. This element should be deleted" +msgstr "Nonexistent. This element should be deleted." #: ../../enterprise/include/functions_services.php:1750 msgid "Delete service element" @@ -36215,72 +36331,72 @@ msgstr "Log collector" #: ../../enterprise/include/functions_setup.php:80 msgid "Auto provisioning into Metaconsole" -msgstr "" +msgstr "Auto provisioning into Metaconsole" #: ../../enterprise/include/functions_setup.php:90 msgid "URL Metaconsole Api" -msgstr "" +msgstr "URL Metaconsole API" #: ../../enterprise/include/functions_setup.php:95 msgid "Api pass" -msgstr "" +msgstr "API password" #: ../../enterprise/include/functions_setup.php:99 msgid "Meta user" -msgstr "" +msgstr "Meta user" #: ../../enterprise/include/functions_setup.php:103 msgid "Meta pass" -msgstr "" +msgstr "Meta password" #: ../../enterprise/include/functions_setup.php:107 msgid "Metaconsole APi Online" -msgstr "" +msgstr "Metaconsole API Online" #: ../../enterprise/include/functions_setup.php:109 #: ../../enterprise/include/functions_setup.php:139 msgid "Please click in the dot to re-check" -msgstr "" +msgstr "Please click on the dot to re-check" #: ../../enterprise/include/functions_setup.php:115 msgid "Pandora user" -msgstr "" +msgstr "Pandora FMS user" #: ../../enterprise/include/functions_setup.php:116 msgid "Normally the admin user" -msgstr "" +msgstr "Normally the admin user" #: ../../enterprise/include/functions_setup.php:120 msgid "Pandora pass" -msgstr "" +msgstr "Pandora FMS password" #: ../../enterprise/include/functions_setup.php:124 msgid "Public url console" -msgstr "" +msgstr "Public URL console" #: ../../enterprise/include/functions_setup.php:125 msgid "Without the index.php such as http://domain/pandora_url" -msgstr "" +msgstr "Without the index.php such as http://domain/pandora_url" #: ../../enterprise/include/functions_setup.php:131 msgid "Register your node in metaconsole" -msgstr "" +msgstr "Register your node in Metaconsole" #: ../../enterprise/include/functions_setup.php:133 msgid "Register the node" -msgstr "" +msgstr "Register the node" #: ../../enterprise/include/functions_setup.php:138 msgid "Status your node in metaconsole" -msgstr "" +msgstr "Status of your node in the Metaconsole" #: ../../enterprise/include/functions_transactional.php:496 msgid "Error in dependencies field" -msgstr "" +msgstr "Error in dependencies field" #: ../../enterprise/include/functions_transactional.php:505 msgid "Error in enables field" -msgstr "" +msgstr "Error when enabling the field" #: ../../enterprise/include/functions_update_manager.php:147 #: ../../enterprise/include/functions_update_manager.php:327 @@ -36303,7 +36419,7 @@ msgstr "Show details" #: ../../enterprise/include/functions_update_manager.php:214 msgid "Update to the next version" -msgstr "" +msgstr "Update to the next version" #: ../../enterprise/include/functions_ux_console.php:422 #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:404 @@ -36312,53 +36428,55 @@ msgstr "" #: ../../enterprise/operation/agentes/ux_console_view.php:338 #: ../../enterprise/operation/agentes/wux_console_view.php:348 msgid "Failed" -msgstr "" +msgstr "Failed" #: ../../enterprise/include/reset_pass.php:100 #: ../../enterprise/meta/include/reset_pass.php:76 msgid "User to reset password" -msgstr "" +msgstr "User password to be reset" #: ../../enterprise/include/reset_pass.php:103 #: ../../enterprise/meta/include/reset_pass.php:79 #: ../../enterprise/meta/index.php:581 ../../index.php:702 msgid "Reset password" -msgstr "" +msgstr "Reset password" #: ../../enterprise/include/reset_pass.php:164 #: ../../enterprise/include/reset_pass.php:167 #: ../../enterprise/meta/include/reset_pass.php:122 #: ../../enterprise/meta/include/reset_pass.php:125 msgid "Reset password failed" -msgstr "" +msgstr "Error resetting password" #: ../../enterprise/load_enterprise.php:336 #: ../../enterprise/load_enterprise.php:400 msgid "Invalid licence." -msgstr "Invalid licence." +msgstr "Invalid license" #: ../../enterprise/load_enterprise.php:337 msgid "Please contact your system administrator." -msgstr "" +msgstr "Please contact your system administrator" #: ../../enterprise/load_enterprise.php:401 msgid "Please contact Artica at info@artica.es for a valid licence." -msgstr "Please contact Artica at info@artica.es for a valid licence." +msgstr "Please contact Ártica ST at info@artica.es for a valid license." #: ../../enterprise/load_enterprise.php:403 msgid "Or disable Pandora FMS enterprise" -msgstr "Or disable Pandora FMS enterprise" +msgstr "Or disable Pandora FMS Enterprise" #: ../../enterprise/load_enterprise.php:497 #: ../../enterprise/load_enterprise.php:742 msgid "Request new licence" -msgstr "Request new licence" +msgstr "Request new license" #: ../../enterprise/load_enterprise.php:580 msgid "" "<strong style=\"font-size: 11pt\">Metaconsole unreached</strong> <br><br> " "This node has a metaconsole license and cannot contact with the metaconsole." msgstr "" +"<strong style=\"font-size: 11pt\">Metaconsole unreached</strong> <br><br> " +"This node has a Metaconsole license and cannot contact with the Metaconsole." #: ../../enterprise/load_enterprise.php:584 #, php-format @@ -36367,6 +36485,9 @@ msgid "" "This node has a metaconsole license and it allows %d agents and you have %d " "agents cached." msgstr "" +"<strong style=\"font-size: 11pt\">License expired</strong> <br><br> This " +"node has a Metaconsole license and it allows %d agents and you have %d " +"agents cached." #: ../../enterprise/load_enterprise.php:592 #, php-format @@ -36374,8 +36495,8 @@ msgid "" "<strong style=\"font-size: 11pt\">License out of limits</strong> <br><br> " "This license allows %d agents and you have %d agents configured." msgstr "" -"<strong style=\"font-size: 11pt\">Licence out of limits</strong> <br><br> " -"This licence allows %d agents and you have %d agents configured." +"<strong style=\"font-size: 11pt\">License expired</strong> <br><br> This " +"license allows %d agents and you have %d agents configured." #: ../../enterprise/load_enterprise.php:597 #, php-format @@ -36383,16 +36504,16 @@ msgid "" "<strong style=\"font-size: 11pt\">License out of limits</strong> <br><br> " "This license allows %d modules and you have %d modules configured." msgstr "" -"<strong style=\"font-size: 11pt\">License out of limits</strong> <br><br> " -"This license allows %d modules and you have %d modules configured." +"<strong style=\"font-size: 11pt\">License expired</strong> <br><br> This " +"license allows %d modules and you have %d modules configured." #: ../../enterprise/load_enterprise.php:604 msgid "" "<strong style=\"font-size: 11pt\">This license has expired.</strong> " "<br><br>You can not get updates until you renew the license." msgstr "" -"<strong style=\"font-size: 11pt\">This licence has expired.</strong> " -"<br><br>You cannot get any updates until you've renewed the licence." +"<strong style=\"font-size: 11pt\">This license has expired.</strong> " +"<br><br>You cannot get any updates until you have renewed the license." #: ../../enterprise/load_enterprise.php:615 msgid "" @@ -36400,13 +36521,13 @@ msgid "" "Enterprise directory in the console.<br><br>Or contact Artica at " "info@artica.es for a valid license:" msgstr "" -"To continue using Pandora FMS, please disable enterprise by renaming the " -"Enterprise directory in the console.<br><br>Or contact Artica at " -"info@artica.es for a valid licence :" +"To continue using Pandora FMS, please disable Enterprise by renaming the " +"Enterprise directory in the console.<br><br>Or contact Ártica ST at " +"info@artica.es for a valid license:" #: ../../enterprise/load_enterprise.php:619 msgid "Please contact Artica at info@artica.es to renew the license." -msgstr "Please contact Artica at info@artica.es to renew the licence." +msgstr "Please contact Ártica ST at info@artica.es to renew the license." #: ../../enterprise/load_enterprise.php:739 msgid "Renew" @@ -36427,11 +36548,11 @@ msgid "" "automatically filling the form below:" msgstr "" "You can activate it manually <a href=\"%s\" target=\"_blank\">here</a> or " -"automatically filling the form below:" +"automatically by filling in the form below:" #: ../../enterprise/load_enterprise.php:833 msgid "Auth Key:" -msgstr "Auth Key:" +msgstr "Authentication key:" #: ../../enterprise/load_enterprise.php:840 #: ../../enterprise/load_enterprise.php:856 @@ -36444,7 +36565,7 @@ msgstr "ERROR:" #: ../../enterprise/load_enterprise.php:849 msgid "When connecting to Artica server." -msgstr "When connecting to Artica server." +msgstr "When connecting to Ártica ST server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:88 #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:91 @@ -36455,94 +36576,94 @@ msgstr "When connecting to Artica server." #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:106 #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:109 msgid "Agent: " -msgstr "" +msgstr "Agent: " #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:88 msgid " already exists in target node" -msgstr "" +msgstr " already exists in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:91 msgid " group does not exist in target node" -msgstr "" +msgstr " group does not exist in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:94 msgid "" " policies definitions does not match with defined ones in target node" -msgstr "" +msgstr " policy definitions do not match with defined ones in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:97 msgid " plugins does not exist in target node" -msgstr "" +msgstr " plugins do not exist in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:100 msgid " collections does not exist in target node" -msgstr "" +msgstr " collections do not exist in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:103 msgid " inventory does not exist in target node" -msgstr "" +msgstr " inventory does not exist in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:106 msgid " alerts template does not exist in target node" -msgstr "" +msgstr " alert templates do not exist in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:109 msgid " alerts action does not exist in target node" -msgstr "" +msgstr " alert actions do not exist in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:112 msgid "Exists agent conf for agent: " -msgstr "" +msgstr "Agent configuration exists for agent: " #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:112 msgid " please remove configuration file from target node." -msgstr "" +msgstr " please remove configuration file from target node." #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:115 msgid "There are differences between MR versions" -msgstr "" +msgstr "There are differences between MR versions" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:118 msgid "Target server ip address is set" -msgstr "" +msgstr "Target server IP address is set" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:204 #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:207 #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:211 msgid "The agent: " -msgstr "" +msgstr "The agent: " #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:204 msgid " has been successfully added to the migration queue " -msgstr "" +msgstr " has been successfully added to the migration queue " #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:207 msgid " has not been added due to problems in the insertion" -msgstr "" +msgstr " has not been added due to problems in the insertion" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:211 msgid " has already been added to the migration queue" -msgstr "" +msgstr " has already been added to the migration queue" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:230 msgid "Problems delete queue" -msgstr "" +msgstr "Problems deleting queue" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:246 msgid "Move Agents" -msgstr "Move Agents" +msgstr "Move agents" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:262 msgid "Source Server" -msgstr "Source Server" +msgstr "Source server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:264 msgid "Destination Server" -msgstr "Destination Server" +msgstr "Destination server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:280 msgid "Agents to move" -msgstr "" +msgstr "Agents to be moved" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:292 msgid "Add agents to destination server" @@ -36550,57 +36671,59 @@ msgstr "Add agents to destination server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:300 msgid "Remove agents to doesn't move to destination server" -msgstr "Remove agents to doesn't move to destination server" +msgstr "Removing agents does not move them to the destination server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:311 msgid "Active DB only" -msgstr "" +msgstr "Active DB only" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:318 msgid "Agents do not exist in target server." -msgstr "" +msgstr "Agents do not exist in target server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:319 msgid "Check group is synchronized with target server." -msgstr "" +msgstr "Check group is synchronized with target server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:320 msgid "All policies needed are synchronized with target server." -msgstr "" +msgstr "All policies needed are synchronized with target server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:321 msgid "All remote plugins needed are synchronized with target server." -msgstr "" +msgstr "All remote plugins needed are synchronized with target server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:322 msgid "All collections needed are syncronized with target server." -msgstr "" +msgstr "All collections needed are synchronized with target server" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:323 msgid "" "All remote inventory definitions needed are syncronized with target server." msgstr "" +"All remote inventory definitions needed are synchronized with target server." #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:324 msgid "" "All alert templates definitions needed are syncronized with target server." msgstr "" +"All alert template definitions needed are synchronized with target server." #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:325 msgid "All alert actions needed are syncronized with target server." -msgstr "" +msgstr "All alert actions needed are synchronized with target server." #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:326 msgid "Agents conf does not exists in target server." -msgstr "" +msgstr "Agents configuration does not exists in target server." #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:327 msgid "Both Pandora servers must be in the same version" -msgstr "" +msgstr "Both Pandora FMS servers must be in the same version" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:328 msgid "Check target server ip address is set" -msgstr "" +msgstr "Check target server IP address is configured" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:338 msgid "Move" @@ -36608,43 +36731,43 @@ msgstr "Move" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:353 msgid "Source node" -msgstr "" +msgstr "Source node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:354 msgid "Target node" -msgstr "" +msgstr "Target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:358 msgid "Active db only" -msgstr "" +msgstr "Active DB only" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:388 msgid "Creating modules in target node" -msgstr "" +msgstr "Creating modules in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:391 msgid "Disabling agent in source node and enabling in target one" -msgstr "" +msgstr "Disabling agent in source node and enabling in target one" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:394 msgid "Transferring data" -msgstr "" +msgstr "Transferring data" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:398 msgid "Creating agent in target node" -msgstr "" +msgstr "Creating agent in target node" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:408 msgid "Completed" -msgstr "" +msgstr "Completed" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:412 msgid "Queued" -msgstr "" +msgstr "Queued" #: ../../enterprise/meta/advanced/agents_setup.move_agents.php:478 msgid "checking migration requirements" -msgstr "" +msgstr "checking migration requirements" #: ../../enterprise/meta/advanced/agents_setup.php:37 msgid "Propagation" @@ -36660,11 +36783,11 @@ msgstr "OS Management" #: ../../enterprise/meta/advanced/license_meta.php:72 msgid "Licence" -msgstr "Licence" +msgstr "License" #: ../../enterprise/meta/advanced/license_meta.php:113 msgid "Validate and sync" -msgstr "" +msgstr "Validate and synchronize" #: ../../enterprise/meta/advanced/metasetup.auth.php:47 #: ../../enterprise/meta/advanced/metasetup.password.php:47 @@ -36673,25 +36796,25 @@ msgstr "" #: ../../enterprise/meta/advanced/metasetup.visual.php:50 #, php-format msgid "Could not be update: Error in %s" -msgstr "Could not be updated : Error in %s" +msgstr "Could not be updated: error in %s" #: ../../enterprise/meta/advanced/metasetup.consoles.php:87 #: ../../enterprise/meta/advanced/metasetup.consoles.php:155 msgid "Could not be create, duplicated server name." -msgstr "Could not be create, duplicated server name." +msgstr "Could not be created, duplicated server name." #: ../../enterprise/meta/advanced/metasetup.consoles.php:128 #: ../../enterprise/meta/advanced/metasetup.consoles.php:206 msgid "Node synchronization process failed" -msgstr "" +msgstr "Node synchronisation process failed" #: ../../enterprise/meta/advanced/metasetup.consoles.php:227 msgid "Could not be delete" -msgstr "Could not be deleted." +msgstr "Could not be deleted" #: ../../enterprise/meta/advanced/metasetup.consoles.php:316 msgid "Full path to Pandora console (without index.php). Example " -msgstr "" +msgstr "Full path to Pandora FMS console (without index.php). E.g. " #: ../../enterprise/meta/advanced/metasetup.consoles.php:333 msgid "DB port" @@ -36715,7 +36838,7 @@ msgstr "Sync" #: ../../enterprise/meta/advanced/metasetup.consoles.php:472 msgid "There aren't server added to metaconsole" -msgstr "There are no servers added to metaconsole." +msgstr "There are no added servers to the Metaconsole." #: ../../enterprise/meta/advanced/metasetup.password.php:73 msgid "Passwords" @@ -36728,7 +36851,7 @@ msgstr "Active events history" #: ../../enterprise/meta/advanced/metasetup.performance.php:91 msgid "Migration block size" -msgstr "" +msgstr "Migration block size" #: ../../enterprise/meta/advanced/metasetup.php:55 msgid "Consoles Setup" @@ -36762,21 +36885,21 @@ msgstr "Strings translation" #: ../../enterprise/meta/advanced/metasetup.php:95 #: ../../enterprise/meta/advanced/metasetup.php:142 msgid "Mail" -msgstr "" +msgstr "Mail" #: ../../enterprise/meta/advanced/metasetup.php:100 msgid "Options Update Manager" -msgstr "" +msgstr "Update Manager Options" #: ../../enterprise/meta/advanced/metasetup.php:105 #: ../../enterprise/meta/advanced/metasetup.php:148 msgid "Offline Update Manager" -msgstr "Offline Update Manager" +msgstr "Update Manager Offline" #: ../../enterprise/meta/advanced/metasetup.php:110 #: ../../enterprise/meta/advanced/metasetup.php:151 msgid "Online Update Manager" -msgstr "" +msgstr "Update Manager Online" #: ../../enterprise/meta/advanced/metasetup.php:117 msgid "Consoles setup" @@ -36784,7 +36907,7 @@ msgstr "Consoles setup" #: ../../enterprise/meta/advanced/metasetup.php:145 msgid "Online Update Options" -msgstr "" +msgstr "Online Update Options" #: ../../enterprise/meta/advanced/metasetup.setup.php:197 msgid "Customize sections" @@ -36812,7 +36935,7 @@ msgstr "Visual" #: ../../enterprise/meta/advanced/metasetup.visual.php:108 msgid "Data precision for reports and visual consoles" -msgstr "" +msgstr "Data precision for reports and visual consoles" #: ../../enterprise/meta/advanced/metasetup.visual.php:108 msgid "Precision must be a integer number between 0 and 5" @@ -36820,7 +36943,7 @@ msgstr "Precision must be an integer number between 0 and 5" #: ../../enterprise/meta/advanced/metasetup.visual.php:137 msgid "Graph TIP view" -msgstr "" +msgstr "Graph TIP view" #: ../../enterprise/meta/advanced/metasetup.visual.php:158 #: ../../enterprise/meta/include/functions_meta.php:1225 @@ -36838,11 +36961,11 @@ msgstr "Only database" #: ../../enterprise/meta/advanced/policymanager.apply.php:188 msgid "Apply Policies" -msgstr "Apply Policies" +msgstr "Apply policies" #: ../../enterprise/meta/advanced/policymanager.php:37 msgid "Policy Manager" -msgstr "Policy Manager" +msgstr "Policy manager" #: ../../enterprise/meta/advanced/policymanager.php:66 msgid "Apply policies" @@ -36859,7 +36982,7 @@ msgstr "Policies apply" #: ../../enterprise/meta/advanced/policymanager.queue.php:352 msgid "Empty queue." -msgstr "Empty queue." +msgstr "Empty queue" #: ../../enterprise/meta/advanced/policymanager.sync.php:235 #: ../../enterprise/meta/advanced/synchronizing.alert.php:286 @@ -36877,7 +37000,7 @@ msgstr "Error connecting to %s" #: ../../enterprise/meta/advanced/policymanager.sync.php:244 #, php-format msgid "Error creating %s policies" -msgstr "Error in creating %s policies" +msgstr "Error creating %s policies" #: ../../enterprise/meta/advanced/policymanager.sync.php:247 #, php-format @@ -36887,17 +37010,17 @@ msgstr "Created %s policies" #: ../../enterprise/meta/advanced/policymanager.sync.php:252 #, php-format msgid "Error creating/updating %s/%s policy modules" -msgstr "Error in creating / updating %s/%s policy modules" +msgstr "Error creating/updating %s/%s policy modules" #: ../../enterprise/meta/advanced/policymanager.sync.php:255 #, php-format msgid "Created/Updated %s/%s policy modules" -msgstr "Created / updated %s/%s policy modules" +msgstr "Created/updated %s/%s policy modules" #: ../../enterprise/meta/advanced/policymanager.sync.php:260 #, php-format msgid "Error deleting %s policy modules" -msgstr "Error in deleting %s policy modules" +msgstr "Error deleting %s policy modules" #: ../../enterprise/meta/advanced/policymanager.sync.php:263 #, php-format @@ -36907,22 +37030,22 @@ msgstr "Deleted %s policy modules" #: ../../enterprise/meta/advanced/policymanager.sync.php:268 #, php-format msgid "Error creating %s policy alerts" -msgstr "Error in creating %s policy alerts" +msgstr "Error creating %s policy alerts" #: ../../enterprise/meta/advanced/policymanager.sync.php:271 #, php-format msgid "Created %s policy alerts" -msgstr "Created %s policy alerts" +msgstr "%s policy alerts successfully created" #: ../../enterprise/meta/advanced/policymanager.sync.php:276 #, php-format msgid "Error deleting %s policy alerts" -msgstr "Error in deleting %s policy alerts" +msgstr "Error deleting %s policy alerts" #: ../../enterprise/meta/advanced/policymanager.sync.php:279 #, php-format msgid "Deleted %s policy alerts" -msgstr "Deleted %s policy alerts" +msgstr "%s policy alerts deleted successfully" #: ../../enterprise/meta/advanced/policymanager.sync.php:292 #: ../../enterprise/meta/advanced/synchronizing.alert.php:333 @@ -36933,46 +37056,46 @@ msgstr "Deleted %s policy alerts" #: ../../enterprise/meta/advanced/synchronizing.tag.php:92 #: ../../enterprise/meta/advanced/synchronizing.user.php:529 msgid "This metaconsole" -msgstr "This meta-console" +msgstr "This Metaconsole" #: ../../enterprise/meta/advanced/synchronizing.alert.php:294 #, php-format msgid "Error creating/updating %s/%s comamnds" -msgstr "Error in creating / updating %s/%s commands." +msgstr "Error creating/updating %s/%s commands" #: ../../enterprise/meta/advanced/synchronizing.alert.php:297 #, php-format msgid "Created/Updated %s/%s commands" -msgstr "Created / updated %s/%s commands" +msgstr "Created/updated %s/%s commands" #: ../../enterprise/meta/advanced/synchronizing.alert.php:302 #, php-format msgid "Error creating/updating %s/%s actions" -msgstr "Error in creating / updating %s/%s actions." +msgstr "Error creating/updating %s/%s actions" #: ../../enterprise/meta/advanced/synchronizing.alert.php:305 #, php-format msgid "Created/Updated %s/%s actions" -msgstr "Created / updated %s/%s actions" +msgstr "Created/updated %s/%s actions" #: ../../enterprise/meta/advanced/synchronizing.alert.php:310 #, php-format msgid "Error creating/updating %s/%s templates" -msgstr "Error in creating / updating %s/%s templates" +msgstr "Error creating/updating %s/%s templates" #: ../../enterprise/meta/advanced/synchronizing.alert.php:313 #, php-format msgid "Created/Updated %s/%s templates" -msgstr "Created / updated %s/%s templates" +msgstr "Created/updated %s/%s templates" #: ../../enterprise/meta/advanced/synchronizing.alert.php:325 msgid "Synchronizing Alerts" -msgstr "Synchronising Alerts" +msgstr "Synchronizing alerts" #: ../../enterprise/meta/advanced/synchronizing.component.php:263 #, php-format msgid "Error creating %s components groups " -msgstr "Error in creating %s component groups " +msgstr "Error creating %s component groups " #: ../../enterprise/meta/advanced/synchronizing.component.php:266 #, php-format @@ -36987,12 +37110,12 @@ msgstr "Error creating/updating %s/%s local components " #: ../../enterprise/meta/advanced/synchronizing.component.php:274 #, php-format msgid "Created/Updated %s/%s local components" -msgstr "Created / updated %s/%s local components" +msgstr "Created/updated %s/%s local components" #: ../../enterprise/meta/advanced/synchronizing.component.php:279 #, php-format msgid "Error creating/updating %s/%s network components " -msgstr "Error in creating / updating %s/%s network components " +msgstr "Error creating/updating %s/%s network components " #: ../../enterprise/meta/advanced/synchronizing.component.php:282 #, php-format @@ -37001,7 +37124,7 @@ msgstr "Created/updated %s/%s network components" #: ../../enterprise/meta/advanced/synchronizing.component.php:303 msgid "Synchronizing Components" -msgstr "Synchronising Components" +msgstr "Synchronising components" #: ../../enterprise/meta/advanced/synchronizing.group.php:79 #: ../../enterprise/meta/advanced/synchronizing.group.php:80 @@ -37028,25 +37151,25 @@ msgstr "Open for more details in creation" #: ../../enterprise/meta/advanced/synchronizing.group.php:111 #: ../../enterprise/meta/advanced/synchronizing.group.php:112 msgid "Open for more details in update" -msgstr "Open for more details in update" +msgstr "Open for more details about the update" #: ../../enterprise/meta/advanced/synchronizing.group.php:115 #, php-format msgid "Error creating/updating %s/%s groups" -msgstr "Error in creating / updating %s/%s groups" +msgstr "Error in creating/updating %s/%s groups" #: ../../enterprise/meta/advanced/synchronizing.group.php:127 #, php-format msgid "Created %s / Updated %s groups (" -msgstr "" +msgstr "Created %s / Updated %s groups (" #: ../../enterprise/meta/advanced/synchronizing.group.php:134 msgid "None update or create group" -msgstr "None update or create group" +msgstr "No updated or created group" #: ../../enterprise/meta/advanced/synchronizing.group.php:145 msgid "Synchronizing Groups" -msgstr "Synchronising Groups" +msgstr "Synchronizing groups" #: ../../enterprise/meta/advanced/synchronizing.module_groups.php:53 #, php-format @@ -37060,7 +37183,7 @@ msgstr "Created/Updated %s/%s module groups" #: ../../enterprise/meta/advanced/synchronizing.module_groups.php:68 msgid "Synchronizing Module Groups" -msgstr "Synchronising Module Groups" +msgstr "Synchronizing module groups" #: ../../enterprise/meta/advanced/synchronizing.os.php:53 #, php-format @@ -37074,27 +37197,27 @@ msgstr "Created/Updated %s/%s OS" #: ../../enterprise/meta/advanced/synchronizing.os.php:68 msgid "Synchronizing OS" -msgstr "Synchronising OS" +msgstr "Synchronizing OS" #: ../../enterprise/meta/advanced/synchronizing.php:35 #: ../../enterprise/meta/general/main_header.php:238 msgid "Synchronizing" -msgstr "Synchronising" +msgstr "Synchronizing" #: ../../enterprise/meta/advanced/synchronizing.php:60 #: ../../enterprise/meta/advanced/synchronizing.php:91 msgid "Users synchronization" -msgstr "Users synchronisation" +msgstr "Users synchronization" #: ../../enterprise/meta/advanced/synchronizing.php:64 #: ../../enterprise/meta/advanced/synchronizing.php:94 msgid "Groups synchronization" -msgstr "Groups synchronisation" +msgstr "Groups synchronization" #: ../../enterprise/meta/advanced/synchronizing.php:68 #: ../../enterprise/meta/advanced/synchronizing.php:97 msgid "Alerts synchronization" -msgstr "Alerts synchronisation" +msgstr "Alerts synchronization" #: ../../enterprise/meta/advanced/synchronizing.php:72 #: ../../enterprise/meta/advanced/synchronizing.php:100 @@ -37104,7 +37227,7 @@ msgstr "Components synchronization" #: ../../enterprise/meta/advanced/synchronizing.php:76 #: ../../enterprise/meta/advanced/synchronizing.php:103 msgid "Tags synchronization" -msgstr "Tags synchronisation" +msgstr "Tags synchronization" #: ../../enterprise/meta/advanced/synchronizing.php:80 #: ../../enterprise/meta/advanced/synchronizing.php:106 @@ -37114,26 +37237,26 @@ msgstr "OS synchronization" #: ../../enterprise/meta/advanced/synchronizing.php:84 #: ../../enterprise/meta/advanced/synchronizing.php:109 msgid "Module Groups synchronization" -msgstr "Module Groups synchronization" +msgstr "Module groups synchronization" #: ../../enterprise/meta/advanced/synchronizing.tag.php:69 #, php-format msgid "Error creating/updating %s/%s tags" -msgstr "Error in creating / updating %s/%s tags" +msgstr "Error creating/updating %s/%s tags" #: ../../enterprise/meta/advanced/synchronizing.tag.php:72 #, php-format msgid "Created/Updated %s/%s tags" -msgstr "Created / updated %s/%s tags" +msgstr "Created/updated %s/%s tags" #: ../../enterprise/meta/advanced/synchronizing.tag.php:84 msgid "Synchronizing Tags" -msgstr "Synchronising Tags" +msgstr "Synchronizing tags" #: ../../enterprise/meta/advanced/synchronizing.user.php:274 #, php-format msgid "Error updating user %s" -msgstr "Error in updating user %s" +msgstr "Error updating user %s" #: ../../enterprise/meta/advanced/synchronizing.user.php:278 #, php-format @@ -37143,7 +37266,7 @@ msgstr "Updated user %s" #: ../../enterprise/meta/advanced/synchronizing.user.php:289 #, php-format msgid "Error creating user %s" -msgstr "Error in creating user %s" +msgstr "Error creating user %s" #: ../../enterprise/meta/advanced/synchronizing.user.php:293 #, php-format @@ -37156,6 +37279,8 @@ msgid "" "There are groups that not exist in node. The followings elements " "groups/profiles/user profiles were created/updated sucessfully (%d/%d/%d)" msgstr "" +"There are groups that do not exist in node. The following elements " +"groups/profiles/user profiles were created/updated successfully (%d/%d/%d)." #: ../../enterprise/meta/advanced/synchronizing.user.php:497 #, php-format @@ -37163,8 +37288,8 @@ msgid "" "Error creating/updating the followings elements groups/profiles/user " "profiles (%d/%d/%d)" msgstr "" -"Error creating/updating the following elements groups / profiles / user " -"profiles (%d/%d/%d)" +"Error creating/updating the following elements groups/profiles/user profiles " +"(%d/%d/%d)" #: ../../enterprise/meta/advanced/synchronizing.user.php:503 #, php-format @@ -37172,12 +37297,12 @@ msgid "" "The followings elements groups/profiles/user profiles were created/updated " "sucessfully (%d/%d/%d)" msgstr "" -"The following element groups / profiles / user profiles were created / " -"updated sucessfully (%d/%d/%d)" +"The following element groups/profiles/user profiles were created/updated " +"successfully (%d/%d/%d)." #: ../../enterprise/meta/advanced/synchronizing.user.php:521 msgid "Synchronizing Users" -msgstr "Synchronising Users" +msgstr "Synchronizing users" #: ../../enterprise/meta/advanced/synchronizing.user.php:553 msgid "Profile mode" @@ -37185,7 +37310,7 @@ msgstr "Profile mode" #: ../../enterprise/meta/advanced/synchronizing.user.php:553 msgid "Profile synchronization mode." -msgstr "Profile synchronisation mode" +msgstr "Profile synchronization mode" #: ../../enterprise/meta/advanced/synchronizing.user.php:554 msgid "New profile" @@ -37195,7 +37320,8 @@ msgstr "New profile" msgid "" "The selected user profile will be added to the selected users into the target" msgstr "" -"The selected user profile will be added to the selected users into the target" +"The selected user profile will be added to the selected users into the " +"target." #: ../../enterprise/meta/advanced/synchronizing.user.php:557 msgid "Copy profile" @@ -37205,61 +37331,61 @@ msgstr "Copy profile" msgid "" "The target user profiles will be replaced with the source user profiles" msgstr "" -"The target user profiles will be replaced with the source user profiles" +"The target user profiles will be replaced with the source user profiles." #: ../../enterprise/meta/advanced/synchronizing.user.php:561 #: ../../enterprise/meta/advanced/synchronizing.user.php:581 msgid "Create groups if not exist" -msgstr "" +msgstr "Create groups if they do not exist" #: ../../enterprise/meta/advanced/synchronizing.user.php:561 #: ../../enterprise/meta/advanced/synchronizing.user.php:581 msgid "Create groups assigned to user profile if not exist in node" -msgstr "" +msgstr "Create groups assigned to user profile if they do not exist in node" #: ../../enterprise/meta/advanced/agents_setup.autoprovision.php:65 #, php-format msgid "Provisioning custom data <b>%s</b> successfully deleted." -msgstr "" +msgstr "Provisioning custom data <b>%s</b> successfully deleted" #: ../../enterprise/meta/advanced/agents_setup.autoprovision.php:70 #, php-format msgid "Cannot delete custom data <b>%s</b>." -msgstr "" +msgstr "Cannot delete custom data <b>%s</b>" #: ../../enterprise/meta/advanced/agents_setup.autoprovision.php:80 msgid "There was an error when moving the custom provisioning data." -msgstr "" +msgstr "There was an error when moving the custom provisioning data." #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:68 msgid "Cannot create an unnamed rule." -msgstr "" +msgstr "Cannot create an unnamed rule" #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:76 #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:97 msgid "Error creating provisioning rule." -msgstr "" +msgstr "Error creating provisioning rule" #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:87 #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:106 msgid "Error updating provisioning rule." -msgstr "" +msgstr "Error updating provisioning rule" #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:111 msgid "Error deleting provisioning rule." -msgstr "" +msgstr "Error deleting provisioning rule" #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:119 msgid "There was an error rule when moving the provisioning." -msgstr "" +msgstr "There was an error rule when moving the provisioning." #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:184 msgid "Create rule" -msgstr "" +msgstr "Create rule" #: ../../enterprise/meta/advanced/agents_setup.autoprovision_rules.php:185 msgid "Edit rule" -msgstr "" +msgstr "Edit rule" #: ../../enterprise/meta/agentsearch.php:89 msgid "Search results for" @@ -37275,11 +37401,11 @@ msgstr "The user is not in either of the groups with an EW profile." #: ../../enterprise/meta/event/custom_events.php:129 msgid "Succesful updated" -msgstr "Update successful." +msgstr "Updated successfully" #: ../../enterprise/meta/event/custom_events.php:130 msgid "Unsucessful updated" -msgstr "Update unsuccessful." +msgstr "Error updating" #: ../../enterprise/meta/event/custom_events.php:154 msgid "Fields" @@ -37287,12 +37413,12 @@ msgstr "Fields" #: ../../enterprise/meta/general/login_page.php:61 msgid "Go to Pandora FMS Support" -msgstr "" +msgstr "Go to Pandora FMS Support" #: ../../enterprise/meta/general/login_page.php:64 #: ../../enterprise/meta/general/login_page.php:75 msgid "Go to " -msgstr "" +msgstr "Go to " #: ../../enterprise/meta/general/login_page.php:72 #: ../../enterprise/meta/include/process_reset_pass.php:46 @@ -37363,8 +37489,8 @@ msgid "" "Metaconsole needs previous activation from regular console, please contact " "system administrator if you need assistance. <br>" msgstr "" -"Metaconsole needs previous activation from regular console, please contact " -"system administrator if you need assistance. <br>" +"The Metaconsole needs previous activation from regular console, please " +"contact the system administrator if you need assistance. <br>" #: ../../enterprise/meta/general/noaccess.php:33 msgid "" @@ -37374,9 +37500,9 @@ msgid "" "in security logs of Pandora System Database" msgstr "" "Access to this page is restricted to authorized users only, please contact " -"system administrator if you need assistance. \n" +"the system administrator if you need assistance. \n" "\t\t\t\t\t<br>Please know that all attempts to access this page are recorded " -"in security logs of Pandora System Database" +"in security logs of Pandora FMS System Database." #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1202 msgid "Go to agent detail" @@ -37416,17 +37542,17 @@ msgstr "Delete alert" #: ../../enterprise/meta/include/ajax/tree_view.ajax.php:1636 msgid "There was a problem loading tag" -msgstr "There was a problem in loading the tag." +msgstr "There was a problem loading the tag." #: ../../enterprise/meta/include/functions_agents_meta.php:1204 #: ../../enterprise/meta/include/functions_agents_meta.php:1218 msgid "Agents movement" -msgstr "Agents movement" +msgstr "Agent movement" #: ../../enterprise/meta/include/functions_agents_meta.php:1209 #: ../../enterprise/meta/include/functions_agents_meta.php:1226 msgid "Provisioning management" -msgstr "" +msgstr "Provisioning management" #: ../../enterprise/meta/include/functions_agents_meta.php:1214 #: ../../enterprise/meta/include/functions_agents_meta.php:1222 @@ -37435,7 +37561,7 @@ msgstr "Group management" #: ../../enterprise/meta/include/functions_agents_meta.php:1230 msgid "Provisioning rules management" -msgstr "" +msgstr "Provisioning rules management" #: ../../enterprise/meta/include/functions_components_meta.php:60 #: ../../enterprise/meta/include/functions_components_meta.php:75 @@ -37489,11 +37615,11 @@ msgstr "Type of charts" #: ../../enterprise/meta/include/functions_meta.php:1315 msgid "Custom background login" -msgstr "" +msgstr "Custom background login" #: ../../enterprise/meta/include/functions_meta.php:1476 msgid "Default block size migration agents" -msgstr "" +msgstr "Default block size of agents migration" #: ../../enterprise/meta/include/functions_users_meta.php:184 msgid "User synchronization" @@ -37585,14 +37711,14 @@ msgstr "Deleted modules" #: ../../enterprise/meta/include/functions_wizard_meta.php:2438 #, php-format msgid "Error adding module %s" -msgstr "Error in adding module %s" +msgstr "Error adding module %s" #: ../../enterprise/meta/include/functions_wizard_meta.php:1876 #: ../../enterprise/meta/include/functions_wizard_meta.php:1973 msgid "" "There was an error creating the alerts, the operation has been cancelled" msgstr "" -"There was an error creating the alerts, the operation has been cancelled" +"There was an error creating the alerts, the operation has been cancelled." #: ../../enterprise/meta/include/functions_wizard_meta.php:2040 msgid "Agent successfully added" @@ -37602,7 +37728,7 @@ msgstr "Agent successfully added" #: ../../enterprise/meta/include/functions_wizard_meta.php:2138 #, php-format msgid "%s Modules created" -msgstr "%s Modules created" +msgstr "%s modules created" #: ../../enterprise/meta/include/functions_wizard_meta.php:2094 #, php-format @@ -37616,24 +37742,24 @@ msgstr "Agent successfully updated" #: ../../enterprise/meta/include/functions_wizard_meta.php:2144 #, php-format msgid "%s Modules deleted" -msgstr "%s Modules deleted" +msgstr "%s modules deleted" #: ../../enterprise/meta/include/functions_wizard_meta.php:2449 msgid "" "There was an error creating the alerts, the operation has been cancelled ." msgstr "" -"There was an error creating the alerts, the operation has been cancelled ." +"There was an error creating the alerts, the operation has been cancelled." #: ../../enterprise/meta/include/functions_wizard_meta.php:2480 msgid "Module successfully added." -msgstr "Module successfully added." +msgstr "Module successfully added" #: ../../enterprise/meta/include/functions_wizard_meta.php:2552 #: ../../enterprise/meta/include/functions_wizard_meta.php:2641 #: ../../enterprise/meta/include/functions_wizard_meta.php:2852 #, php-format msgid "Error updating module %s" -msgstr "Error in updating module %s" +msgstr "Error updating module %s" #: ../../enterprise/meta/include/functions_wizard_meta.php:2575 #: ../../enterprise/meta/include/functions_wizard_meta.php:2664 @@ -37641,13 +37767,13 @@ msgstr "Error in updating module %s" msgid "" "There was an error updating the alerts, the operation has been cancelled" msgstr "" -"There was an error in updating the alerts, the operation has been cancelled." +"There was an error updating the alerts, the operation has been cancelled." #: ../../enterprise/meta/include/functions_wizard_meta.php:2597 #: ../../enterprise/meta/include/functions_wizard_meta.php:2686 #: ../../enterprise/meta/include/functions_wizard_meta.php:2897 msgid "Successfully updated module." -msgstr "Module successfully updated." +msgstr "Module successfully updated" #: ../../enterprise/meta/include/functions_wizard_meta.php:3250 msgid "Manage agent modules" @@ -37660,55 +37786,59 @@ msgstr "Go to pandorafms.com" #: ../../enterprise/meta/include/functions_autoprovision.php:304 msgid "Round Robin" -msgstr "" +msgstr "Round Robin" #: ../../enterprise/meta/include/functions_autoprovision.php:309 msgid "Less loaded" -msgstr "" +msgstr "Less loaded" #: ../../enterprise/meta/include/functions_autoprovision.php:435 msgid "" "There is no custom entries defined. Click on \"Create custom entry\" to add " "the first." msgstr "" +"There is no custom entries defined. Click on 'Create custom entry' to add " +"the first entry." #: ../../enterprise/meta/include/functions_autoprovision.php:440 msgid "Create custom entry" -msgstr "" +msgstr "Create custom entry" #: ../../enterprise/meta/include/functions_autoprovision.php:465 msgid "Provisioning configuration" -msgstr "" +msgstr "Provisioning configuration" #: ../../enterprise/meta/include/functions_autoprovision.php:476 msgid "Configuration:" -msgstr "" +msgstr "Configuration:" #: ../../enterprise/meta/include/functions_autoprovision.php:511 msgid "" "There is no rules configured for this custom entry. Click on Add button to " "create the first." msgstr "" +"There are no rules configured for this custom entry. Click on the Add button " +"to create the first." #: ../../enterprise/meta/include/functions_autoprovision.php:540 msgid "Method" -msgstr "" +msgstr "Method" #: ../../enterprise/meta/include/functions_autoprovision.php:617 msgid "There was an error when editing the rule." -msgstr "" +msgstr "There was an error editing the rule." #: ../../enterprise/meta/include/functions_autoprovision.php:631 msgid "Operation:" -msgstr "" +msgstr "Operation:" #: ../../enterprise/meta/include/functions_autoprovision.php:642 msgid "Method:" -msgstr "" +msgstr "Method:" #: ../../enterprise/meta/index.php:228 ../../index.php:284 msgid "The code shouldn't be empty" -msgstr "The code shouldn't be empty" +msgstr "The code should not be empty" #: ../../enterprise/meta/index.php:240 ../../index.php:296 msgid "Expired login" @@ -37721,60 +37851,60 @@ msgstr "Login error" #: ../../enterprise/meta/index.php:489 ../../index.php:607 msgid "Password changed successfully" -msgstr "" +msgstr "Password changed successfully" #: ../../enterprise/meta/index.php:496 ../../index.php:614 msgid "Failed to change password" -msgstr "" +msgstr "Error changing the password" #: ../../enterprise/meta/index.php:516 ../../index.php:636 msgid "Too much time since password change request" -msgstr "" +msgstr "Too much time since password change request" #: ../../enterprise/meta/index.php:527 ../../index.php:647 msgid "This user has not requested a password change" -msgstr "" +msgstr "This user has not requested a password change" #: ../../enterprise/meta/index.php:545 ../../index.php:665 msgid "Id user cannot be empty" -msgstr "" +msgstr "ID user cannot be empty" #: ../../enterprise/meta/index.php:554 ../../index.php:674 msgid "Error in reset password request" -msgstr "" +msgstr "Error in reset password request" #: ../../enterprise/meta/index.php:563 ../../index.php:683 msgid "This user doesn't have a valid email address" -msgstr "" +msgstr "This user does not have a valid email address" #: ../../enterprise/meta/index.php:582 ../../index.php:703 msgid "This is an automatically sent message for user " -msgstr "" +msgstr "This is an automatically sent message for user " #: ../../enterprise/meta/index.php:585 ../../index.php:706 msgid "Please click the link below to reset your password" -msgstr "" +msgstr "Please click on the link below to reset your password" #: ../../enterprise/meta/index.php:587 ../../index.php:708 msgid "Reset your password" -msgstr "" +msgstr "Reset your password" #: ../../enterprise/meta/index.php:591 ../../index.php:712 msgid "Please do not reply to this email." -msgstr "" +msgstr "Please do not reply to this email." #: ../../enterprise/meta/index.php:597 ../../index.php:718 msgid "Error at sending the email" -msgstr "" +msgstr "Error sending the email" #: ../../enterprise/meta/index.php:725 ../../enterprise/meta/index.php:796 #: ../../index.php:1021 msgid "Sorry! I can't find the page!" -msgstr "Sorry! I can't find the page!" +msgstr "Sorry! I cannot find the page!" #: ../../enterprise/meta/monitoring/group_view.php:33 msgid "Group View" -msgstr "Group View" +msgstr "Group view" #: ../../enterprise/meta/monitoring/group_view.php:95 msgid "Summary by status" @@ -37782,41 +37912,41 @@ msgstr "Summary by status" #: ../../enterprise/meta/monitoring/group_view.php:103 msgid "% Agents Unknown" -msgstr "% Agents Unknown" +msgstr "% agents unknown" #: ../../enterprise/meta/monitoring/group_view.php:104 #: ../../enterprise/meta/monitoring/group_view.php:105 msgid "% Agents not init" -msgstr "% Agents not init" +msgstr "% agents not init" #: ../../enterprise/meta/monitoring/group_view.php:108 msgid "% Monitors Critical" -msgstr "% Monitors Critical" +msgstr "% monitors critical" #: ../../enterprise/meta/monitoring/group_view.php:109 msgid "% Monitors Warning" -msgstr "% Monitors Warning" +msgstr "% monitors warning" #: ../../enterprise/meta/monitoring/group_view.php:110 msgid "% Monitors OK" -msgstr "% Monitors OK" +msgstr "% monitors OK" #: ../../enterprise/meta/monitoring/group_view.php:111 msgid "% Monitors Unknown" -msgstr "% Monitors Unknown" +msgstr "% monitors unknown" #: ../../enterprise/meta/monitoring/group_view.php:112 msgid "% Monitors Not init" -msgstr "% Monitors Not init" +msgstr "% monitors not init" #: ../../enterprise/meta/monitoring/group_view.php:136 #: ../../enterprise/meta/monitoring/group_view.php:137 msgid "This data doesn't show in realtime" -msgstr "This data doesn't show in realtime" +msgstr "This data is not displayed in real-time" #: ../../enterprise/meta/monitoring/group_view.php:144 msgid "Group or Tag" -msgstr "Group or Tag" +msgstr "Group or tag" #: ../../enterprise/meta/monitoring/group_view.php:148 msgid "critical" @@ -37824,11 +37954,11 @@ msgstr "critical" #: ../../enterprise/meta/monitoring/tactical.php:37 msgid "Tactical View" -msgstr "Tactical View" +msgstr "Tactical view" #: ../../enterprise/meta/monitoring/tactical.php:291 msgid "Report of state" -msgstr "Report of state" +msgstr "Report of status" #: ../../enterprise/meta/monitoring/tactical.php:320 msgid "Report of events" @@ -37836,7 +37966,7 @@ msgstr "Report of events" #: ../../enterprise/meta/monitoring/tactical.php:325 msgid "Info of state in events" -msgstr "Info of state in events" +msgstr "Info of status in events" #: ../../enterprise/meta/monitoring/tactical.php:342 msgid "More events" @@ -37870,7 +38000,7 @@ msgstr "Create module" #: ../../enterprise/meta/monitoring/wizard/wizard.update_agent.php:49 #: ../../enterprise/meta/monitoring/wizard/wizard.update_module.php:92 msgid "Can't connect to Pandora FMS instance" -msgstr "Cannot connect to Pandora FMS instance." +msgstr "Cannot connect to the Pandora FMS instance" #: ../../enterprise/meta/monitoring/wizard/wizard.create_module.php:148 msgid "Web check" @@ -37887,7 +38017,7 @@ msgstr "Step by step wizard" #: ../../enterprise/meta/monitoring/wizard/wizard.create_module.php:251 #: ../../enterprise/meta/monitoring/wizard/wizard.create_module.php:255 msgid "Click Create to continue" -msgstr "Click Create to continue" +msgstr "Click on Create to continue" #: ../../enterprise/meta/monitoring/wizard/wizard.main.php:249 msgid "Select the agent to be edited or deleted" @@ -37903,7 +38033,7 @@ msgstr "Select the agent where the module will be created" #: ../../enterprise/meta/monitoring/wizard/wizard.main.php:353 msgid "Create Module" -msgstr "Create Module" +msgstr "Create module" #: ../../enterprise/meta/monitoring/wizard/wizard.main.php:411 msgid "Select the module to be edited or deleted" @@ -37911,7 +38041,7 @@ msgstr "Select the module to be edited or deleted" #: ../../enterprise/meta/monitoring/wizard/wizard.main.php:519 msgid "Select the module where the alert will be created" -msgstr "Select the module in which the alert will be created." +msgstr "Select the module in which the alert will be created" #: ../../enterprise/meta/monitoring/wizard/wizard.main.php:603 msgid "Select the alert to be edited or deleted" @@ -37927,7 +38057,7 @@ msgstr "Advanced configuration" #: ../../enterprise/meta/monitoring/wizard/wizard.module.network.php:231 #: ../../enterprise/meta/monitoring/wizard/wizard.module.web.php:196 msgid "Invalid characters founded in module name" -msgstr "Invalid characters found in module name." +msgstr "Invalid characters found in module name" #: ../../enterprise/meta/monitoring/wizard/wizard.module.web.php:189 msgid "Please, set a name" @@ -37967,7 +38097,7 @@ msgstr "Create visual map" #: ../../enterprise/mobile/operation/dashboard.php:59 msgid "Visual console are not shown due screen size limitations" -msgstr "" +msgstr "Visual console is not shown due to screen size limitations" #: ../../enterprise/mobile/operation/dashboard.php:87 msgid "Dashboards list" @@ -37975,7 +38105,7 @@ msgstr "Dashboards list" #: ../../enterprise/mobile/operation/dashboard.php:107 msgid "No Dashboards" -msgstr "No Dashboards" +msgstr "No dashboards" #: ../../enterprise/mobile/operation/dashboard.php:140 msgid "Dashboard name" @@ -37987,7 +38117,7 @@ msgstr "Getting module inventory data was unsuccessful." #: ../../enterprise/operation/agentes/agent_inventory.php:56 msgid "This agent has not modules inventory" -msgstr "This agent has not modules inventory" +msgstr "This agent does not have inventory modules." #: ../../enterprise/operation/agentes/agent_inventory.php:160 #: ../../enterprise/operation/agentes/agent_inventory.php:161 @@ -38004,108 +38134,108 @@ msgstr "No collection assigned to this agent" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:319 #: ../../enterprise/operation/agentes/manage_transmap_creation_phases_data.php:33 msgid "Transactions List" -msgstr "" +msgstr "List of transactions" #: ../../enterprise/operation/agentes/manage_transmap.php:50 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:89 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:326 msgid "Edit main data" -msgstr "" +msgstr "Edit main data" #: ../../enterprise/operation/agentes/manage_transmap.php:57 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:96 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:333 #: ../../enterprise/operation/agentes/manage_transmap_creation_phases_data.php:39 msgid "Edit Transaction" -msgstr "" +msgstr "Edit transaction" #: ../../enterprise/operation/agentes/manage_transmap.php:65 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:104 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:341 msgid "View Transaction" -msgstr "" +msgstr "View transaction" #: ../../enterprise/operation/agentes/manage_transmap.php:98 msgid "Return to windowed mode" -msgstr "" +msgstr "Return to windowed mode" #: ../../enterprise/operation/agentes/manage_transmap.php:102 msgid "Transactional Map - " -msgstr "" +msgstr "Transactional Map - " #: ../../enterprise/operation/agentes/manage_transmap.php:106 msgid "Transaction not found" -msgstr "" +msgstr "Transaction not found" #: ../../enterprise/operation/agentes/manage_transmap.php:110 msgid "Master lock file not found (No data to show)" -msgstr "" +msgstr "Master lock file not found (No data to show)" #: ../../enterprise/operation/agentes/manage_transmap.php:114 msgid "Transaction is stopped" -msgstr "" +msgstr "Transaction is stopped" #: ../../enterprise/operation/agentes/manage_transmap.php:118 msgid "Error, please check the transaction phases" -msgstr "" +msgstr "Error, please check the transaction phases" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:36 msgid "Please, reset the transaction" -msgstr "" +msgstr "Please, reset the transaction" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:71 msgid "Successfully data updated" -msgstr "" +msgstr "Data updated successfully" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:72 msgid "Could not be data updated" -msgstr "" +msgstr "Could not update data" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:107 msgid "Transactional Map - Create Phase - " -msgstr "" +msgstr "Transactional Map - Create Phase - " #: ../../enterprise/operation/agentes/manage_transmap_creation.php:117 msgid "Index" -msgstr "" +msgstr "Index" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:120 msgid "Dependencies" -msgstr "" +msgstr "Dependencies" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:121 msgid "Enables" -msgstr "" +msgstr "Enabled" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:181 msgid "Not valid dependencies field" -msgstr "" +msgstr "Dependencies field not valid" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:187 msgid "Not valid enables field" -msgstr "" +msgstr "Enabling field not valid" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:260 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:345 msgid "Transactional Map - Create Transaction" -msgstr "" +msgstr "Transactional Map - Create Transaction" #: ../../enterprise/operation/agentes/manage_transmap_creation.php:272 #: ../../enterprise/operation/agentes/manage_transmap_creation.php:361 msgid "Loop interval" -msgstr "" +msgstr "Loop interval" #: ../../enterprise/operation/agentes/manage_transmap_creation_phases_data.php:45 msgid "Go back to phases list" -msgstr "" +msgstr "Go back to phases list" #: ../../enterprise/operation/agentes/manage_transmap_creation_phases_data.php:49 msgid "Transactional Map - Phase - " -msgstr "" +msgstr "Transactional Map - Phase - " #: ../../enterprise/operation/agentes/manage_transmap_creation_phases_data.php:62 msgid "Launch script" -msgstr "" +msgstr "Launch script" #: ../../enterprise/operation/agentes/policy_view.php:37 msgid "This agent has no policy assigned" @@ -38113,7 +38243,7 @@ msgstr "This agent has no assigned policy." #: ../../enterprise/operation/agentes/policy_view.php:65 msgid "Policy outdate" -msgstr "Policy outdated" +msgstr "Policy expired" #: ../../enterprise/operation/agentes/policy_view.php:130 #: ../../enterprise/operation/agentes/policy_view.php:137 @@ -38126,7 +38256,7 @@ msgstr "Description" #: ../../enterprise/operation/agentes/policy_view.php:138 msgid "Show Collection" -msgstr "Show Collection" +msgstr "Show collection" #: ../../enterprise/operation/agentes/policy_view.php:192 #: ../../enterprise/operation/agentes/policy_view.php:201 @@ -38135,7 +38265,7 @@ msgstr "Toggle the alert table" #: ../../enterprise/operation/agentes/policy_view.php:202 msgid "Show Alert" -msgstr "Show Alert" +msgstr "Show alert" #: ../../enterprise/operation/agentes/policy_view.php:303 #: ../../enterprise/operation/agentes/policy_view.php:312 @@ -38148,11 +38278,11 @@ msgstr "Relationship" #: ../../enterprise/operation/agentes/policy_view.php:313 msgid "Show Modules" -msgstr "Show Modules" +msgstr "Show modules" #: ../../enterprise/operation/agentes/policy_view.php:333 msgid "(Un-adopted)" -msgstr "(Un-adopted)" +msgstr "(Not adopted)" #: ../../enterprise/operation/agentes/policy_view.php:337 msgid "(Adopted)" @@ -38160,7 +38290,7 @@ msgstr "(Adopted)" #: ../../enterprise/operation/agentes/policy_view.php:343 msgid "(Un-adopted) (Unlinked)" -msgstr "(Un-adopted) (Unlinked)" +msgstr "(Not adopted) (Unlinked)" #: ../../enterprise/operation/agentes/policy_view.php:347 msgid "(Adopted) (Unlinked)" @@ -38169,51 +38299,51 @@ msgstr "(Adopted) (Unlinked)" #: ../../enterprise/operation/agentes/tag_view.php:22 #: ../../enterprise/operation/menu.php:152 msgid "Tag view" -msgstr "" +msgstr "Tag view" #: ../../enterprise/operation/agentes/transactional_map.php:31 msgid "Transactions list" -msgstr "" +msgstr "List of transactions" #: ../../enterprise/operation/agentes/transactional_map.php:100 msgid "Name can't be empty" -msgstr "" +msgstr "Name cannot be empty" #: ../../enterprise/operation/agentes/transactional_map.php:148 msgid "Transaction name" -msgstr "" +msgstr "Transaction name" #: ../../enterprise/operation/agentes/transactional_map.php:151 msgid "Running status" -msgstr "" +msgstr "Running status" #: ../../enterprise/operation/agentes/transactional_map.php:153 msgid "Time spent" -msgstr "" +msgstr "Time spent" #: ../../enterprise/operation/agentes/transactional_map.php:183 msgid "Stopped" -msgstr "" +msgstr "Stopped" #: ../../enterprise/operation/agentes/transactional_map.php:189 msgid "Starting" -msgstr "" +msgstr "Starting" #: ../../enterprise/operation/agentes/transactional_map.php:192 msgid "Stopping" -msgstr "" +msgstr "Stopping" #: ../../enterprise/operation/agentes/transactional_map.php:314 msgid "Edit phases" -msgstr "" +msgstr "Edit phases" #: ../../enterprise/operation/agentes/transactional_map.php:323 msgid "Error in phases section" -msgstr "" +msgstr "Error in phases section" #: ../../enterprise/operation/agentes/transactional_map.php:342 msgid "Create Transaction" -msgstr "" +msgstr "Create transaction" #: ../../enterprise/operation/agentes/url_route_analyzer.php:38 msgid "No agent selected" @@ -38221,88 +38351,88 @@ msgstr "No agent selected" #: ../../enterprise/operation/agentes/url_route_analyzer.php:42 msgid "Route not found" -msgstr "" +msgstr "Route not found" #: ../../enterprise/operation/agentes/ux_console_view.php:59 msgid "No ux transaction selected." -msgstr "" +msgstr "No UX transaction selected" #: ../../enterprise/operation/agentes/ux_console_view.php:138 msgid "No ux transactions found." -msgstr "" +msgstr "No UX transactions found" #: ../../enterprise/operation/agentes/ux_console_view.php:148 #: ../../enterprise/operation/agentes/wux_console_view.php:178 msgid "Transaction" -msgstr "" +msgstr "Transaction" #: ../../enterprise/operation/agentes/ux_console_view.php:157 #: ../../enterprise/operation/agentes/wux_console_view.php:187 msgid "Show transaction" -msgstr "" +msgstr "Show transaction" #: ../../enterprise/operation/agentes/ux_console_view.php:183 #: ../../enterprise/operation/agentes/wux_console_view.php:313 msgid "Execution results for transaction " -msgstr "" +msgstr "Execution results for transaction " #: ../../enterprise/operation/agentes/ux_console_view.php:257 #: ../../enterprise/operation/agentes/wux_console_view.php:235 msgid "Global results" -msgstr "" +msgstr "Global results" #: ../../enterprise/operation/agentes/ux_console_view.php:318 #: ../../enterprise/operation/agentes/wux_console_view.php:418 msgid "Transaction history" -msgstr "" +msgstr "Transaction history" #: ../../enterprise/operation/agentes/ver_agente.php:225 msgid "URL Route Analyzer" -msgstr "" +msgstr "URL Route Analyzer" #: ../../enterprise/operation/agentes/ver_agente.php:242 msgid "UX Console" -msgstr "" +msgstr "UX Console" #: ../../enterprise/operation/agentes/ver_agente.php:259 msgid "WUX Console" -msgstr "" +msgstr "WUX Console" #: ../../enterprise/operation/agentes/wux_console_view.php:64 msgid "No wux transaction selected." -msgstr "" +msgstr "No WUX transaction selected" #: ../../enterprise/operation/agentes/wux_console_view.php:120 msgid "Phase modules not found" -msgstr "" +msgstr "Phase modules not found" #: ../../enterprise/operation/agentes/wux_console_view.php:160 msgid "Selected transaction has no stats" -msgstr "" +msgstr "Selected transaction has no statistics" #: ../../enterprise/operation/agentes/wux_console_view.php:168 msgid "No WUX transactions found." -msgstr "" +msgstr "No WUX transactions found" #: ../../enterprise/operation/agentes/wux_console_view.php:251 msgid "Failed: " -msgstr "" +msgstr "Failed: " #: ../../enterprise/operation/agentes/wux_console_view.php:286 msgid "Success: " -msgstr "" +msgstr "Success: " #: ../../enterprise/operation/agentes/wux_console_view.php:296 msgid "Total transaction time: " -msgstr "" +msgstr "Total transaction time: " #: ../../enterprise/operation/agentes/wux_console_view.php:455 msgid "Invalid transaction." -msgstr "" +msgstr "Invalid transaction" #: ../../enterprise/operation/inventory/inventory.php:231 msgid "Order by agent" -msgstr "" +msgstr "Order by agent" #: ../../enterprise/operation/inventory/inventory.php:272 msgid "Export this list to CSV" @@ -38315,19 +38445,19 @@ msgstr "Log viewer" #: ../../enterprise/operation/log/log_viewer.php:181 msgid "All words" -msgstr "" +msgstr "All words" #: ../../enterprise/operation/log/log_viewer.php:181 msgid "Any word" -msgstr "" +msgstr "Any word" #: ../../enterprise/operation/log/log_viewer.php:183 msgid "Search mode" -msgstr "" +msgstr "Search mode" #: ../../enterprise/operation/log/log_viewer.php:191 msgid "Full context" -msgstr "" +msgstr "Full context" #: ../../enterprise/operation/log/log_viewer.php:369 msgid "The start date cannot be greater than the end date" @@ -38336,70 +38466,70 @@ msgstr "The start date cannot be greater than the end date" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:36 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:74 msgid "List of networkmaps" -msgstr "" +msgstr "List of networkmaps" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:42 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:80 msgid "Edit networkmap" -msgstr "" +msgstr "Edit networkmap" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:48 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:86 msgid "Deleted list" -msgstr "" +msgstr "Deleted list" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:54 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:92 msgid "View networkmap" -msgstr "" +msgstr "View networkmap" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:61 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:66 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:95 msgid "List deleted items" -msgstr "" +msgstr "List of deleted items" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:108 msgid "Successfully restore the item" -msgstr "" +msgstr "Item restored successfully" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:109 msgid "Could not be restore the item" -msgstr "" +msgstr "Item could not be restored" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:130 msgid "Successfully restore the items" -msgstr "" +msgstr "Items restored successfully" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:132 msgid "Could not be restore the " -msgstr "" +msgstr "Could not restore the " #: ../../enterprise/operation/maps/networkmap_list_deleted.php:136 msgid "Not found networkmap" -msgstr "" +msgstr "No networkmap found" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:140 msgid "The items restored will be appear in the holding area." -msgstr "" +msgstr "The items restored will appear in the holding area." #: ../../enterprise/operation/maps/networkmap_list_deleted.php:160 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:227 #: ../../enterprise/operation/maps/networkmap_list_deleted.php:256 msgid "Restore" -msgstr "" +msgstr "Restore" #: ../../enterprise/operation/maps/networkmap_list_deleted.php:170 msgid "There are not nodes in the networkmap." -msgstr "" +msgstr "There are no nodes in the networkmap." #: ../../enterprise/operation/menu.php:30 msgid "Cluster View" -msgstr "" +msgstr "Cluster view" #: ../../enterprise/operation/menu.php:113 msgid "Transactional map" -msgstr "" +msgstr "Transactional map" #: ../../enterprise/operation/menu.php:127 msgid "Custom SQL" @@ -38408,13 +38538,12 @@ msgstr "Custom SQL" #: ../../enterprise/operation/reporting/custom_reporting.php:22 msgid "" "All the items are not available in CSV, only the previous versions ones." -msgstr "" -"All the items are not available in CSV, only the previous versions ones." +msgstr "All the items are not available in CSV, only the previous versions." #: ../../enterprise/operation/reporting/custom_reporting.php:62 #: ../../enterprise/operation/reporting/custom_reporting.php:85 msgid "Send by email" -msgstr "Send by e-mail" +msgstr "Send by email" #: ../../enterprise/operation/reporting/custom_reporting.php:70 msgid "ID Report" @@ -38422,12 +38551,12 @@ msgstr "Report ID" #: ../../enterprise/operation/reporting/custom_reporting.php:109 msgid "Send by email " -msgstr "Send by e-mail " +msgstr "Send by email " #: ../../enterprise/operation/services/services.list.php:44 #: ../../enterprise/operation/services/services.list.php:52 msgid "Service table view" -msgstr "" +msgstr "Service table view" #: ../../enterprise/operation/services/services.list.php:73 msgid "Service deleted successfully" @@ -38439,18 +38568,18 @@ msgstr "Error deleting service" #: ../../enterprise/operation/services/services.list.php:79 msgid "Service forced successfully" -msgstr "Forcing of the service successful." +msgstr "Service forced successfully" #: ../../enterprise/operation/services/services.list.php:80 msgid "Error service forced" -msgstr "Error in forcing the service." +msgstr "Error forcing the service" #: ../../enterprise/operation/services/services.list.php:288 #: ../../enterprise/operation/services/services.list.php:295 #: ../../enterprise/operation/services/services.table_services.php:256 #: ../../enterprise/operation/services/services.table_services.php:263 msgid "No services defined." -msgstr "No services defined." +msgstr "No services defined" #: ../../enterprise/operation/services/services.list.php:436 #: ../../enterprise/operation/services/services.service.php:206 @@ -38459,7 +38588,7 @@ msgstr "SLA graph" #: ../../enterprise/operation/services/services.service.php:102 msgid "No Services" -msgstr "No Services" +msgstr "No services" #: ../../enterprise/operation/services/services.service.php:216 msgid "List of elements" @@ -38471,7 +38600,7 @@ msgstr "User does not exist" #: ../../index.php:785 msgid "User only can use the API." -msgstr "Only user can use the API" +msgstr "The user can only use the API" #~ msgid "Welcome to Pandora FMS Web Console" #~ msgstr "Welcome to Pandora FMS Web Console" @@ -38551,9 +38680,6 @@ msgstr "Only user can use the API" #~ msgid "Assigned user" #~ msgstr "Assigned user" -#~ msgid "Resolution epilog" -#~ msgstr "Resolution epilog" - #~ msgid "Add a file" #~ msgstr "Add a file" @@ -38840,9 +38966,6 @@ msgstr "Only user can use the API" #~ msgid "File deleted" #~ msgstr "File deleted" -#~ msgid "You user doesn't have enough rights to delete this file" -#~ msgstr "You user doesn't have enough rights to delete this file" - #~ msgid "Incident deleted" #~ msgstr "Incident deleted" @@ -39328,12 +39451,6 @@ msgstr "Only user can use the API" #~ "This will activate a shortcut bar with alerts, events, messages... " #~ "information" -#~ msgid "" -#~ "There is a error in the message from your Integria or there is not " -#~ "connection." -#~ msgstr "" -#~ "There is a error in the message from your Integria or there is no connection." - #~ msgid "No options selected" #~ msgstr "No options selected" @@ -39387,9 +39504,6 @@ msgstr "Only user can use the API" #~ msgid "Closed tickets" #~ msgstr "Closed tickets" -#~ msgid "For to view the list modules paginated, set in setup visuals." -#~ msgstr "For to view the list modules paginated, set in setup visuals." - #~ msgid "Opened tickets" #~ msgstr "Opened tickets" @@ -39501,14 +39615,6 @@ msgstr "Only user can use the API" #~ msgid "Strict ACL" #~ msgstr "Strict ACL" -#, php-format -#~ msgid "" -#~ "Your PHP environment is setted with %d max_input_vars. Maybe you must not " -#~ "set this value with upper values." -#~ msgstr "" -#~ "Your PHP environment is setted with %d max_input_vars. Maybe you must not " -#~ "set this value with upper values." - #~ msgid "Display proc modules in binary format (OK/FAIL)." #~ msgstr "Display proc modules in binary format (OK/FAIL)." @@ -40107,6 +40213,9 @@ msgstr "Only user can use the API" #~ msgid "Show events graph" #~ msgstr "Show the events graph" +#~ msgid "Resolution epilog" +#~ msgstr "Resolution epilogue" + #~ msgid "File is too big" #~ msgstr "The file is too big." @@ -40126,6 +40235,16 @@ msgstr "Only user can use the API" #~ msgid "There was a problem uploading file" #~ msgstr "There was a problem uploading the file" +#~ msgid "You user doesn't have enough rights to delete this file" +#~ msgstr "" +#~ "Your user account doesn't have the necessary permissions to delete this file." + +#~ msgid "" +#~ "There is a error in the message from your Integria or there is not " +#~ "connection." +#~ msgstr "" +#~ "There is an error in your Integria's message, or there is no connection." + #~ msgid "There was a problem adding workunit" #~ msgstr "There was a problem adding the workunit" @@ -40217,3 +40336,50 @@ msgstr "Only user can use the API" #~ msgid "Create group if doesn’t exist in destination" #~ msgstr "Create group if it doesn't exist in destination" + +#~ msgid "Top 5 VMs Disk Usage" +#~ msgstr "Top 5 VMs Disk Usage" + +#~ msgid "VMware map" +#~ msgstr "VMware map" + +#~ msgid "Plugin execution" +#~ msgstr "Plugin execution" + +#~ msgid "Config parameters" +#~ msgstr "Config parameters" + +#~ msgid "Config Path" +#~ msgstr "Config Path" + +#~ msgid "There was an error updating the execution data of the plugin" +#~ msgstr "There was an error updating the execution data of the plugin" + +#~ msgid "There was an error activating the execution of the plugin" +#~ msgstr "There was an error activating the execution of the plugin" + +#~ msgid "" +#~ "To enable the plugin execution, this extension needs the Cron jobs extension " +#~ "installed.\n" +#~ "\tKeep in mind that the Cron jobs execution period will be the less real " +#~ "execution period, so if you want to run the plugin every\n" +#~ "\t5 minutes, for example, the Cron jobs script should be configured in the " +#~ "cron to run every 5 minutes or less" +#~ msgstr "" +#~ "To enable the plugin execution, this extension needs the Cron jobs extension " +#~ "installed.\n" +#~ "\tKeep in mind that the Cron jobs execution period will be the less real " +#~ "execution period, so if you want to run the plugin every\n" +#~ "\t5 minutes, for example, the Cron jobs script should be configured in the " +#~ "cron to run every 5 minutes or less" + +#, php-format +#~ msgid "" +#~ "Your PHP environment is setted with %d max_input_vars. Maybe you must not " +#~ "set this value with upper values." +#~ msgstr "" +#~ "Your PHP environment is set with %d max_input_vars. Maybe you must not set " +#~ "this value with upper values." + +#~ msgid "For to view the list modules paginated, set in setup visuals." +#~ msgstr "To view the list modules paginated, set in setup visuals." diff --git a/pandora_console/include/load_session.php b/pandora_console/include/load_session.php index bfd16cbcb6..b34c33b2bb 100644 --- a/pandora_console/include/load_session.php +++ b/pandora_console/include/load_session.php @@ -30,20 +30,20 @@ function pandora_session_read ($session_id) { if (!empty($session_data)) return $session_data; else - return false; + return ''; } function pandora_session_write ($session_id, $data) { $session_id = addslashes($session_id); - + $values = array(); $values['last_active'] = time(); - + if (!empty($data)) $values['data'] = addslashes($data); - + $session_exists = (bool) db_get_value('COUNT(id_session)', 'tsessions_php', 'id_session', $session_id); - + if (!$session_exists) { $values['id_session'] = $session_id; $retval_write = db_process_sql_insert('tsessions_php', $values); @@ -52,7 +52,7 @@ function pandora_session_write ($session_id, $data) { $retval_write = db_process_sql_update('tsessions_php', $values, array('id_session' => $session_id)); } - return $retval_write; + return $retval_write !== false; } function pandora_session_destroy ($session_id) { @@ -77,6 +77,8 @@ function pandora_session_gc ($max_lifetime = 300) { return $retval; } -$result_handler = session_set_save_handler ('pandora_session_open', 'pandora_session_close', 'pandora_session_read', 'pandora_session_write', 'pandora_session_destroy', 'pandora_session_gc'); - +// FIXME: SAML should work with pandora session handlers +if (db_get_value('value', 'tconfig', 'token', 'auth') != "saml") { + $result_handler = session_set_save_handler ('pandora_session_open', 'pandora_session_close', 'pandora_session_read', 'pandora_session_write', 'pandora_session_destroy', 'pandora_session_gc'); +} ?> diff --git a/pandora_console/include/styles/datatables.min.css b/pandora_console/include/styles/datatables.min.css new file mode 100644 index 0000000000..e46954d4c1 --- /dev/null +++ b/pandora_console/include/styles/datatables.min.css @@ -0,0 +1,23 @@ +/* + * This combined file was created by the DataTables downloader builder: + * https://datatables.net/download + * + * To rebuild or modify this file with the latest versions of the included + * software please visit: + * https://datatables.net/download/#ju-1.12.1/jq-3.3.1/dt-1.10.18 + * + * Included libraries: + * jQuery UI 1.12.1, jQuery 3 3.3.1, DataTables 1.10.18 + */ + +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{box-shadow:inset 1px 1px 1px #ccc;border-radius:.12em;border:none}.ui-checkboxradio-radio-label .ui-icon-background{width:16px;height:16px;border-radius:1em;overflow:visible;border:none}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;width:8px;height:8px;border-width:4px;border-style:solid}.ui-checkboxradio-disabled{pointer-events:none}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{width:2px;right:0}.ui-dialog .ui-resizable-s{height:2px;bottom:0}.ui-dialog .ui-resizable-w{width:2px;left:0}.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw,.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw{width:7px;height:7px}.ui-dialog .ui-resizable-se{right:0;bottom:0}.ui-dialog .ui-resizable-sw{left:0;bottom:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-text{display:block;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.ui-selectmenu-button.ui-button{text-align:left;white-space:nowrap;width:14em}.ui-selectmenu-icon.ui-icon{float:right;margin-top:0}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:.222em 0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:2em}.ui-spinner-button{width:1.6em;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top-style:none;border-bottom-style:none;border-right-style:none}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("jQueryUI-1.12.1/themes/base/images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("jQueryUI-1.12.1/themes/base/images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("jQueryUI-1.12.1/themes/base/images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("jQueryUI-1.12.1/themes/base/images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("jQueryUI-1.12.1/themes/base/images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("jQueryUI-1.12.1/themes/base/images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("jQueryUI-1.12.1/themes/base/images/ui-icons_777777_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666} + +table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>thead>tr>td>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody>table>tbody>tr>td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody>table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}}table.dataTable thead th div.DataTables_sort_wrapper{position:relative}table.dataTable thead th div.DataTables_sort_wrapper span{position:absolute;top:50%;margin-top:-8px;right:-18px}table.dataTable thead th.ui-state-default,table.dataTable tfoot th.ui-state-default{border-left-width:0}table.dataTable thead th.ui-state-default:first-child,table.dataTable tfoot th.ui-state-default:first-child{border-left-width:1px}.dataTables_wrapper .dataTables_paginate .fg-button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;border:1px solid transparent}.dataTables_wrapper .dataTables_paginate .fg-button:active{outline:none}.dataTables_wrapper .dataTables_paginate .fg-button:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.dataTables_wrapper .dataTables_paginate .fg-button:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.dataTables_wrapper .ui-widget-header{font-weight:normal}.dataTables_wrapper .ui-toolbar{padding:8px}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:none}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:inherit} + + diff --git a/pandora_console/include/styles/images/ui-icons_444444_256x240.png b/pandora_console/include/styles/images/ui-icons_444444_256x240.png new file mode 100644 index 0000000000..742c0acb7d Binary files /dev/null and b/pandora_console/include/styles/images/ui-icons_444444_256x240.png differ diff --git a/pandora_console/include/styles/images/ui-icons_555555_256x240.png b/pandora_console/include/styles/images/ui-icons_555555_256x240.png new file mode 100644 index 0000000000..739707eb6c Binary files /dev/null and b/pandora_console/include/styles/images/ui-icons_555555_256x240.png differ diff --git a/pandora_console/include/styles/images/ui-icons_777620_256x240.png b/pandora_console/include/styles/images/ui-icons_777620_256x240.png new file mode 100644 index 0000000000..9108efe621 Binary files /dev/null and b/pandora_console/include/styles/images/ui-icons_777620_256x240.png differ diff --git a/pandora_console/include/styles/images/ui-icons_777777_256x240.png b/pandora_console/include/styles/images/ui-icons_777777_256x240.png new file mode 100644 index 0000000000..e59371ebca Binary files /dev/null and b/pandora_console/include/styles/images/ui-icons_777777_256x240.png differ diff --git a/pandora_console/include/styles/images/ui-icons_cc0000_256x240.png b/pandora_console/include/styles/images/ui-icons_cc0000_256x240.png new file mode 100644 index 0000000000..198f485c2c Binary files /dev/null and b/pandora_console/include/styles/images/ui-icons_cc0000_256x240.png differ diff --git a/pandora_console/include/styles/images/ui-icons_ffffff_256x240.png b/pandora_console/include/styles/images/ui-icons_ffffff_256x240.png index 42f8f992c7..3d60a4367b 100644 Binary files a/pandora_console/include/styles/images/ui-icons_ffffff_256x240.png and b/pandora_console/include/styles/images/ui-icons_ffffff_256x240.png differ diff --git a/pandora_console/include/styles/install.css b/pandora_console/include/styles/install.css index 6c558fdcba..fe06c7a084 100644 --- a/pandora_console/include/styles/install.css +++ b/pandora_console/include/styles/install.css @@ -205,3 +205,67 @@ div.installation_step { color:white; } +:focus { + outline: 0; +} + +/* POPUP */ +.popup-lightbox{ + position: fixed; + z-index: 8888; + width: 100%; + height: 100%; + background-color: #000; + opacity: 0.6; + visibility: hidden; +} + +.popup{ + max-height: 450px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + -webkit-transform: translate(-50%, -50%); + background-color: #FFF; + z-index: 9999; + display: none; +} + +.popup-title{ + background-color: #82b92e; + padding: 10px 20px; + color: #FFF; + font-size:12pt; + text-align: center; + font-family:Sans, Arial, sans; +} + +.popup-inner{ + max-height: 350px; + background: #FFF; +/* overflow-y: scroll;*/ + padding: 25px 35px; + font-size: 11pt; +} + +.popup-button-green{ + background-color: #82B92E; + border: 1px solid transparent; + color: #FFF; +} + +.popup-button-green span{ + color: #FFF !important; +} + +.popup-button-green:hover{ + background-color: transparent !important; + border: 1px solid #82B92E; + color: #82B92E !important; +} + +.popup-button-green:hover span{ + color: #82B92E !important; +} +/* POPUP -END */ diff --git a/pandora_console/include/styles/jquery-ui-1.10.0.custom.css b/pandora_console/include/styles/jquery-ui-1.10.0.custom.css deleted file mode 100644 index b2af3fd6e1..0000000000 --- a/pandora_console/include/styles/jquery-ui-1.10.0.custom.css +++ /dev/null @@ -1,1273 +0,0 @@ -/*! jQuery UI - v1.10.0 - 2013-01-17 -* http://jqueryui.com -* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/ -* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { - display: none; -} -.ui-helper-hidden-accessible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} -.ui-helper-reset { - margin: 0; - padding: 0; - border: 0; - outline: 0; - line-height: 1.3; - text-decoration: none; - font-size: 100%; - list-style: none; -} -.ui-helper-clearfix:before, -.ui-helper-clearfix:after { - content: ""; - display: table; -} -.ui-helper-clearfix:after { - clear: both; -} -.ui-helper-clearfix { - min-height: 0; /* support: IE7 */ -} -.ui-helper-zfix { - width: 100%; - height: 100%; - top: 0; - left: 0; - position: absolute; - opacity: 0; - filter:Alpha(Opacity=0); -} - -.ui-front { - z-index: 10000; -} - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { - cursor: default !important; -} - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { - display: block; - text-indent: -99999px; - overflow: hidden; - background-repeat: no-repeat; -} - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -.ui-accordion .ui-accordion-header { - display: block; - cursor: pointer; - position: relative; - margin-top: 2px; - padding: .5em .5em .5em .7em; - min-height: 0; /* support: IE7 */ -} -.ui-accordion .ui-accordion-icons { - padding-left: 2.2em; -} -.ui-accordion .ui-accordion-noicons { - padding-left: .7em; -} -.ui-accordion .ui-accordion-icons .ui-accordion-icons { - padding-left: 2.2em; -} -.ui-accordion .ui-accordion-header .ui-accordion-header-icon { - position: absolute; - left: .5em; - top: 50%; - margin-top: -8px; -} -.ui-accordion .ui-accordion-content { - padding: 1em 2.2em; - border-top: 0; - overflow: auto; -} -.ui-autocomplete { - position: absolute; - top: 0; - left: 0; - cursor: default; -} -.ui-button { - display: inline-block; - position: relative; - padding: 0; - line-height: normal; - margin-right: .1em; - cursor: pointer; - vertical-align: middle; - text-align: center; - overflow: visible; /* removes extra width in IE */ -} -.ui-button, -.ui-button:link, -.ui-button:visited, -.ui-button:hover, -.ui-button:active { - text-decoration: none; -} -/* to make room for the icon, a width needs to be set here */ -.ui-button-icon-only { - width: 2.2em; -} -/* button elements seem to need a little more width */ -button.ui-button-icon-only { - width: 2.4em; -} -.ui-button-icons-only { - width: 3.4em; -} -button.ui-button-icons-only { - width: 3.7em; -} - -/* button text element */ -.ui-button .ui-button-text { - display: block; - line-height: normal; -} -.ui-button-text-only .ui-button-text { - padding: .4em 1em; - font-family: nunito; - font-size: 9pt; - color: #82B92E -} -.ui-button-icon-only .ui-button-text, -.ui-button-icons-only .ui-button-text { - padding: .4em; - text-indent: -9999999px; -} -.ui-button-text-icon-primary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: .4em 1em .4em 2.1em; -} -.ui-button-text-icon-secondary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: .4em 2.1em .4em 1em; -} -.ui-button-text-icons .ui-button-text { - padding-left: 2.1em; - padding-right: 2.1em; -} -/* no icon support for input elements, provide padding by default */ -input.ui-button { - padding: .4em 1em; -} - -/* button icon element(s) */ -.ui-button-icon-only .ui-icon, -.ui-button-text-icon-primary .ui-icon, -.ui-button-text-icon-secondary .ui-icon, -.ui-button-text-icons .ui-icon, -.ui-button-icons-only .ui-icon { - position: absolute; - top: 50%; - margin-top: -8px; -} -.ui-button-icon-only .ui-icon { - left: 50%; - margin-left: -8px; -} -.ui-button-text-icon-primary .ui-button-icon-primary, -.ui-button-text-icons .ui-button-icon-primary, -.ui-button-icons-only .ui-button-icon-primary { - left: .5em; -} -.ui-button-text-icon-secondary .ui-button-icon-secondary, -.ui-button-text-icons .ui-button-icon-secondary, -.ui-button-icons-only .ui-button-icon-secondary { - right: .5em; -} - -/* button sets */ -.ui-buttonset { - margin-right: 7px; -} -.ui-buttonset .ui-button { - margin-left: 0; - margin-right: -.3em; -} - -/* workarounds */ -/* reset extra padding in Firefox, see h5bp.com/l */ -input.ui-button::-moz-focus-inner, -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; -} -.ui-datepicker { - width: 17em; - padding: .2em .2em 0; - display: none; -} -.ui-datepicker .ui-datepicker-header { - position: relative; - padding: .2em 0; -} -.ui-datepicker .ui-datepicker-prev, -.ui-datepicker .ui-datepicker-next { - position: absolute; - top: 2px; - width: 1.8em; - height: 1.8em; -} -.ui-datepicker .ui-datepicker-prev-hover, -.ui-datepicker .ui-datepicker-next-hover { - top: 1px; -} -.ui-datepicker .ui-datepicker-prev { - left: 2px; -} -.ui-datepicker .ui-datepicker-next { - right: 2px; -} -.ui-datepicker .ui-datepicker-prev-hover { - left: 1px; -} -.ui-datepicker .ui-datepicker-next-hover { - right: 1px; -} -.ui-datepicker .ui-datepicker-prev span, -.ui-datepicker .ui-datepicker-next span { - display: block; - position: absolute; - left: 50%; - margin-left: -8px; - top: 50%; - margin-top: -8px; -} -.ui-datepicker .ui-datepicker-title { - margin: 0 2.3em; - line-height: 1.8em; - text-align: center; -} -.ui-datepicker .ui-datepicker-title select { - font-size: 1em; - margin: 1px 0; -} -.ui-datepicker .ui-datepicker-title *, .ui-datepicker th * { - color: white; -} -.ui-datepicker .ui-datepicker-title select, .ui-datepicker .ui-datepicker-title option { - color: #111 !important; -} -.ui-datepicker select.ui-datepicker-month-year { - width: 100%; -} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { - width: 49%; -} -.ui-datepicker table { - width: 100%; - font-size: .9em; - border-collapse: collapse; - margin: 0 0 .4em; -} -.ui-datepicker th { - padding: .7em .3em; - text-align: center; - font-weight: bold; - border: 0; -} -.ui-datepicker td { - border: 0; - padding: 1px; -} -.ui-datepicker td span, -.ui-datepicker td a { - display: block; - padding: .2em; - text-align: right; - text-decoration: none; -} -.ui-datepicker .ui-datepicker-buttonpane { - background-image: none; - margin: .7em 0 0 0; - padding: 0 .2em; - border-left: 0; - border-right: 0; - border-bottom: 0; -} -.ui-datepicker .ui-datepicker-buttonpane button { - float: right; - margin: .5em .2em .4em; - cursor: pointer; - padding: .2em .6em .3em .6em; - width: auto; - overflow: visible; -} -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { - float: left; -} - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { - width: auto; -} -.ui-datepicker-multi .ui-datepicker-group { - float: left; -} -.ui-datepicker-multi .ui-datepicker-group table { - width: 95%; - margin: 0 auto .4em; -} -.ui-datepicker-multi-2 .ui-datepicker-group { - width: 50%; -} -.ui-datepicker-multi-3 .ui-datepicker-group { - width: 33.3%; -} -.ui-datepicker-multi-4 .ui-datepicker-group { - width: 25%; -} -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { - border-left-width: 0; -} -.ui-datepicker-multi .ui-datepicker-buttonpane { - clear: left; -} -.ui-datepicker-row-break { - clear: both; - width: 100%; - font-size: 0; -} - -/* RTL support */ -.ui-datepicker-rtl { - direction: rtl; -} -.ui-datepicker-rtl .ui-datepicker-prev { - right: 2px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next { - left: 2px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-prev:hover { - right: 1px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next:hover { - left: 1px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane { - clear: right; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button { - float: left; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, -.ui-datepicker-rtl .ui-datepicker-group { - float: right; -} -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { - border-right-width: 0; - border-left-width: 1px; -} -.ui-dialog { - position: absolute; - top: 0; - left: 0; - outline: 0; -} -.ui-dialog .ui-dialog-titlebar { - display: inherit; - text-align: center; - padding: .4em 1em; - height: 30px; - position: relative; -} -.ui-dialog .ui-dialog-title { - font-family: Nunito, sans-serif; - margin: .1em 0; - white-space: nowrap; - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - font-size: 11pt; - position: relative; - top: 5px; -} -.ui-dialog .ui-dialog-titlebar-close { - position: absolute; - right: 1em; - width: 21px; - margin: 0px 0 0 0; - padding: 1px; - height: 20px; - bottom: 30%; -} -.ui-dialog .ui-dialog-content { - position: relative; - border: 0; - padding: .5em 1em; - background: none; - overflow: auto; -} -.ui-dialog .ui-dialog-buttonpane { - text-align: left; - border-width: 1px 0 0 0; - background-image: none; - margin-top: .5em; - padding: .3em 1em .5em .4em; -} -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { - float: right; -} -.ui-dialog .ui-dialog-buttonpane button { - margin: .5em 1em .5em 0 !important; - cursor: pointer !important; - background: white !important; - background-color: white !important; - border: 1px solid #82b92e !important; - height:30px !important; - width:90px !important; -} -.ui-dialog .ui-resizable-se { - width: 12px; - height: 12px; - right: -5px; - bottom: -5px; - background-position: 16px 16px; -} -.ui-draggable .ui-dialog-titlebar { - cursor: move; -} -.ui-menu { - list-style: none; - padding: 2px; - margin: 0; - display: block; - outline: none; -} -.ui-menu .ui-menu { - margin-top: -3px; - position: absolute; -} -.ui-menu .ui-menu-item { - margin: 0; - padding: 0; - width: 100%; -} -.ui-menu .ui-menu-divider { - margin: 5px -2px 5px -2px; - height: 0; - font-size: 0; - line-height: 0; - border-width: 1px 0 0 0; -} -.ui-menu .ui-menu-item a { - text-decoration: none; - display: block; - padding: 2px .4em; - line-height: 1.5; - min-height: 0; /* support: IE7 */ - font-weight: normal; -} -.ui-menu .ui-menu-item a.ui-state-focus, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} - -.ui-menu .ui-state-disabled { - font-weight: normal; - margin: .4em 0 .2em; - line-height: 1.5; -} -.ui-menu .ui-state-disabled a { - cursor: default; -} - -/* icon support */ -.ui-menu-icons { - position: relative; -} -.ui-menu-icons .ui-menu-item a { - position: relative; - padding-left: 2em; -} - -/* left-aligned */ -.ui-menu .ui-icon { - position: absolute; - top: .2em; - left: .2em; -} - -/* right-aligned */ -.ui-menu .ui-menu-icon { - position: static; - float: right; -} -.ui-progressbar { - height: 2em; - text-align: left; - overflow: hidden; -} -.ui-progressbar .ui-progressbar-value { - margin: -1px; - height: 100%; -} -.ui-progressbar .ui-progressbar-overlay { - background: url("images/animated-overlay.gif"); - height: 100%; - filter: alpha(opacity=25); - opacity: 0.25; -} -.ui-progressbar-indeterminate .ui-progressbar-value { - background-image: none; -} -.ui-resizable { - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - display: block; -} -.ui-resizable-disabled .ui-resizable-handle, -.ui-resizable-autohide .ui-resizable-handle { - display: none; -} -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0; -} -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0; -} -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; -} -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} -.ui-selectable-helper { - position: absolute; - z-index: 100; - border: 1px dotted black; -} -.ui-slider { - position: relative; - text-align: left; -} -.ui-slider .ui-slider-handle { - position: absolute; - z-index: 2; - width: 1.2em; - height: 1.2em; - cursor: default; -} -.ui-slider .ui-slider-range { - position: absolute; - z-index: 1; - font-size: .7em; - display: block; - border: 0; - background-position: 0 0; -} - -/* For IE8 - See #6727 */ -.ui-slider.ui-state-disabled .ui-slider-handle, -.ui-slider.ui-state-disabled .ui-slider-range { - filter: inherit; -} - -.ui-slider-horizontal { - height: .8em; -} -.ui-slider-horizontal .ui-slider-handle { - top: -.3em; - margin-left: -.6em; -} -.ui-slider-horizontal .ui-slider-range { - top: 0; - height: 100%; -} -.ui-slider-horizontal .ui-slider-range-min { - left: 0; -} -.ui-slider-horizontal .ui-slider-range-max { - right: 0; -} - -.ui-slider-vertical { - width: .8em; - height: 100px; -} -.ui-slider-vertical .ui-slider-handle { - left: -.3em; - margin-left: 0; - margin-bottom: -.6em; -} -.ui-slider-vertical .ui-slider-range { - left: 0; - width: 100%; -} -.ui-slider-vertical .ui-slider-range-min { - bottom: 0; -} -.ui-slider-vertical .ui-slider-range-max { - top: 0; -} -.ui-spinner { - position: relative; - display: inline-block; - overflow: hidden; - padding: 0; - vertical-align: middle; -} -.ui-spinner-input { - border: none; - background: none; - color: inherit; - padding: 0; - margin: .2em 0; - vertical-align: middle; - margin-left: .4em; - margin-right: 22px; -} -.ui-spinner-button { - width: 16px; - height: 50%; - font-size: .5em; - padding: 0; - margin: 0; - text-align: center; - position: absolute; - cursor: default; - display: block; - overflow: hidden; - right: 0; -} -/* more specificity required here to overide default borders */ -.ui-spinner a.ui-spinner-button { - border-top: none; - border-bottom: none; - border-right: none; -} -/* vertical centre icon */ -.ui-spinner .ui-icon { - position: absolute; - margin-top: -8px; - top: 50%; - left: 0; -} -.ui-spinner-up { - top: 0; -} -.ui-spinner-down { - bottom: 0; -} - -/* TR overrides */ -.ui-spinner .ui-icon-triangle-1-s { - /* need to fix icons sprite */ - background-position: -65px -16px; -} -.ui-tabs { - position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ - padding: .2em; -} -.ui-tabs .ui-tabs-nav { - margin: 0; - padding: .2em .2em 0; -} -.ui-tabs .ui-tabs-nav li { - list-style: none; - float: left; - position: relative; - top: 0; - margin: 1px .2em 0 0; - border-bottom: 0; - padding: 0; - white-space: nowrap; -} -.ui-tabs .ui-tabs-nav li a { - float: left; - padding: .5em 1em; - text-decoration: none; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active { - margin-bottom: -1px; - padding-bottom: 1px; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active a, -.ui-tabs .ui-tabs-nav li.ui-state-disabled a, -.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { - cursor: text; -} -.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { - cursor: pointer; -} -.ui-tabs .ui-tabs-panel { - display: block; - border-width: 0; - padding: 1em 1.4em; - background: none; -} -.ui-tooltip { - padding: 8px; - position: absolute; - z-index: 9999; - max-width: 300px; - -webkit-box-shadow: 0 0 5px #aaa; - box-shadow: 0 0 5px #aaa; -} -body .ui-tooltip { - border-width: 2px; -} - -/* Component containers -----------------------------------*/ -.ui-widget { - font-family: Verdana,Arial,sans-serif; - font-size: 1.1em; -} -.ui-widget .ui-widget { - font-size: 1em; -} -.ui-widget input, -.ui-widget select, -.ui-widget textarea, -.ui-widget button { - font-family: Verdana,Arial,sans-serif; - font-size: 1em; -} -.ui-widget-content { - border: 1px solid #aaaaaa; - background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; - color: #222222; -} -.ui-widget-content a { - color: #222222; -} -.ui-widget-header { - border: 1px solid #aaaaaa; - background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; - color: #222222; - font-weight: bold; -} -.ui-widget-header a { - color: #222222; -} - -/* Interaction states -----------------------------------*/ -.ui-state-default, -.ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default { - border: 1px solid #d3d3d3; - background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; - font-weight: normal; - color: #555555; - margin-top: 3px; -} -.ui-state-default a, -.ui-state-default a:link, -.ui-state-default a:visited { - color: #555555; - text-decoration: none; -} -.ui-state-hover, -.ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, -.ui-state-focus, -.ui-widget-content .ui-state-focus, -.ui-widget-header .ui-state-focus { - border: 1px solid #999999; - background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; - font-weight: normal; - color: #212121; -} -.ui-state-hover a, -.ui-state-hover a:hover, -.ui-state-hover a:link, -.ui-state-hover a:visited { - color: #212121; - text-decoration: none; -} -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active { - border: 1px solid #aaaaaa; - background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; - font-weight: normal; - color: #212121; -} -.ui-state-active a, -.ui-state-active a:link, -.ui-state-active a:visited { - color: #212121; - text-decoration: none; -} - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, -.ui-widget-content .ui-state-highlight, -.ui-widget-header .ui-state-highlight { - border: 1px solid #fcefa1; - background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; - color: #363636; -} -.ui-state-highlight a, -.ui-widget-content .ui-state-highlight a, -.ui-widget-header .ui-state-highlight a { - color: #363636; -} -.ui-state-error, -.ui-widget-content .ui-state-error, -.ui-widget-header .ui-state-error { - border: 1px solid #cd0a0a; - background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; - color: #cd0a0a; -} -.ui-state-error a, -.ui-widget-content .ui-state-error a, -.ui-widget-header .ui-state-error a { - color: #cd0a0a; -} -.ui-state-error-text, -.ui-widget-content .ui-state-error-text, -.ui-widget-header .ui-state-error-text { - color: #cd0a0a; -} -.ui-priority-primary, -.ui-widget-content .ui-priority-primary, -.ui-widget-header .ui-priority-primary { - font-weight: bold; -} -.ui-priority-secondary, -.ui-widget-content .ui-priority-secondary, -.ui-widget-header .ui-priority-secondary { - opacity: .7; - filter:Alpha(Opacity=70); - font-weight: normal; -} -.ui-state-disabled, -.ui-widget-content .ui-state-disabled, -.ui-widget-header .ui-state-disabled { - opacity: .35; - filter:Alpha(Opacity=35); - background-image: none; -} -.ui-state-disabled .ui-icon { - filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ -} - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { - width: 16px; - height: 16px; - background-position: 16px 16px; -} -.ui-icon, -.ui-widget-content .ui-icon { - background-image: url(images/ui-icons_222222_256x240.png); -} -.ui-widget-header .ui-icon { - background-image: url(images/ui-icons_222222_256x240.png); -} -.ui-state-default .ui-icon { - background-image: url(images/ui-icons_888888_256x240.png); -} -.ui-state-hover .ui-icon, -.ui-state-focus .ui-icon { - background-image: url(images/ui-icons_454545_256x240.png); -} -.ui-state-active .ui-icon { - background-image: url(images/ui-icons_454545_256x240.png); -} -.ui-state-highlight .ui-icon { - background-image: url(images/ui-icons_2e83ff_256x240.png); -} -.ui-state-error .ui-icon, -.ui-state-error-text .ui-icon { - background-image: url(images/ui-icons_cd0a0a_256x240.png); -} - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-on { background-position: -96px -144px; } -.ui-icon-radio-off { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, -.ui-corner-top, -.ui-corner-left, -.ui-corner-tl { - /*border-top-left-radius: 4px;*/ -} -.ui-corner-all, -.ui-corner-top, -.ui-corner-right, -.ui-corner-tr { - /*border-top-right-radius: 4px;*/ -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-left, -.ui-corner-bl { - /*border-bottom-left-radius: 4px;*/ -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-right, -.ui-corner-br { - /*border-bottom-right-radius: 4px;*/ -} - -/* Overlays */ -.ui-widget-overlay { - background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; - opacity: .3; - filter: Alpha(Opacity=30); -} -.ui-widget-shadow { - margin: -8px 0 0 -8px; - padding: 8px; - background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; - opacity: .3; - filter: Alpha(Opacity=30); - border-radius: 8px; -} - -/*CUSTOMS*/ -#ui-datepicker-div { - border-color: #B1B1B1; - background: #ffffff; -} - -.ui-widget-header { - background: #B1B1B1 !important; - color: #ffffff !important; -} - -.ui-datepicker-calendar th { - background-color: #3F3F3F; -} - -.ui-dialog .ui-widget-header { - background-color: #82b92e; -} - -.ui_tpicker_hour, -.ui_tpicker_minute, -.ui_tpicker_second, -.ui-slider-handle { - border: 1px solid #AAAAAA !important; -} - -.ui-timepicker-div dd { - margin: 0px 15px 0px 15px ; -} -.ui-timepicker-div .ui-datepicker-title { - color: white; -} - -.ui-datepicker-buttonpane button { - border-color: #B1B1B1 !important; -} - -.ui-datepicker-buttonpane .ui-datepicker-current { - margin-left: 0.2em !important; -} - -.ui-icon { -} - -/* - * Pandora Styles - */ - -.ui-dialog .ui-widget-content { - border: 0px; -} - -.ui-dialog { - box-shadow: 5px 5px 19px #4e4e4e; - border: 0px; -} - -.ui-dialog-titlebar { - border: 0px; -} - -.ui-dialog-titlebar .ui-icon-closethick, -.ui-dialog-titlebar .ui-state-default, -.ui-dialog-titlebar .ui-state-hover, -.ui-dialog-titlebar button { - background: transparent; - border: 0px; -} - -.ui-dialog-titlebar .ui-icon-closethick { - background-image: url("../../images/icono_cerrar.png"); - margin-top: -8px; -} - -.ui-dialog-title { - color: #ffffff; - font-size: 9pt; -} \ No newline at end of file diff --git a/pandora_console/include/styles/jquery-ui-1.8.17.custom.css b/pandora_console/include/styles/jquery-ui-1.8.17.custom.css deleted file mode 100644 index 9efa623bb4..0000000000 --- a/pandora_console/include/styles/jquery-ui-1.8.17.custom.css +++ /dev/null @@ -1,572 +0,0 @@ -/* - * jQuery UI CSS Framework 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } -.ui-helper-clearfix:after { clear: both; } -.ui-helper-clearfix { zoom: 1; } -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* - * jQuery UI CSS Framework 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, - .ui-widget-header .ui-state-hover, .ui-state-focus, - .ui-widget-content .ui-state-focus, - .ui-widget-header .ui-state-focus { - border: 1px solid #fbcb09; - /*background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x;*/ - background: #fdf5ce 50% 50% repeat-x; - font-weight: bold; color: #c77405; } -.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* - * jQuery UI Resizable 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* - * jQuery UI Selectable 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/* - * jQuery UI Accordion 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } -/* - * jQuery UI Autocomplete 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.17 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/* - * jQuery UI Button 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/* - * jQuery UI Dialog 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* - * jQuery UI Slider 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* - * jQuery UI Tabs 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/* - * jQuery UI Datepicker 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/* - * jQuery UI Progressbar 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; overflow: hidden; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/pandora_console/include/styles/jquery-ui-1.8.23.custom.css b/pandora_console/include/styles/jquery-ui-1.8.23.custom.css deleted file mode 100644 index 51fd2d4c69..0000000000 --- a/pandora_console/include/styles/jquery-ui-1.8.23.custom.css +++ /dev/null @@ -1,618 +0,0 @@ -/*! - * jQuery UI CSS Framework 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } -.ui-helper-clearfix:after { clear: both; } -.ui-helper-clearfix { zoom: 1; } -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/*! - * jQuery UI CSS Framework 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { - border: 1px solid #707070 !important; - background: #B1B1B1 !important; - color: #ffffff !important; - font-weight: bold !important; -} -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default { - border: 1px solid #cccccc !important; - background: #f6f6f6 !important; - font-weight: bold !important; - color: #333333 !important; -} -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, .ui-state-focus, -.ui-widget-content .ui-state-focus, .ui-widget-header -.ui-state-focus { - border: 1px solid #707070 !important; - background: #B1B1B1 !important; - font-weight: bold !important; - color: #ffffff !important; -} -.ui-state-hover a, .ui-state-hover a:hover { - color: #DFD; - text-decoration: none; -} -.ui-state-active, .ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active { - border: 1px solid #707070 !important; - background: #B1B1B1 !important; - font-weight: bold !important; - color: #707070 !important; -} -.ui-state-active a, .ui-state-active a:link, -.ui-state-active a:visited { - color: #DFD; - text-decoration: none; } -.ui-widget :active { - outline: none; -} - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*! - * jQuery UI Resizable 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*! - * jQuery UI Selectable 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/*! - * jQuery UI Accordion 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } -/*! - * jQuery UI Autocomplete 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.23 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/*! - * jQuery UI Button 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/*! - * jQuery UI Dialog 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/*! - * jQuery UI Slider 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/*! - * jQuery UI Tabs 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/*! - * jQuery UI Datepicker 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/*! - * jQuery UI Progressbar 1.8.23 - * - * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; overflow: hidden; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } - -/* - * Time picker new (added) - */ -.ui_tpicker_time { - text-align: center !important; - margin-left: 0 !important; -} - -.ui_tpicker_time_label, .ui_tpicker_time, -.ui_tpicker_hour_label, .ui_tpicker_minute_label, -.ui_tpicker_second_label{ - color: #333333 !important; -} - -.ui-datepicker { - background: #EEEEEE !important; - border: 1px solid #DDDDDD !important; -} - -.ui_tpicker_hour, .ui_tpicker_minute, .ui_tpicker_second { - margin: 0 10px; -} \ No newline at end of file diff --git a/pandora_console/include/styles/jquery-ui.min.css b/pandora_console/include/styles/jquery-ui.min.css new file mode 100644 index 0000000000..121f222ff1 --- /dev/null +++ b/pandora_console/include/styles/jquery-ui.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: core.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, draggable.css, resizable.css, progressbar.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-background{box-shadow:inset 1px 1px 1px #ccc;border-radius:.12em;border:none}.ui-checkboxradio-radio-label .ui-icon-background{width:16px;height:16px;border-radius:1em;overflow:visible;border:none}.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon{background-image:none;width:8px;height:8px;border-width:4px;border-style:solid}.ui-checkboxradio-disabled{pointer-events:none}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-n{height:2px;top:0}.ui-dialog .ui-resizable-e{width:2px;right:0}.ui-dialog .ui-resizable-s{height:2px;bottom:0}.ui-dialog .ui-resizable-w{width:2px;left:0}.ui-dialog .ui-resizable-se,.ui-dialog .ui-resizable-sw,.ui-dialog .ui-resizable-ne,.ui-dialog .ui-resizable-nw{width:7px;height:7px}.ui-dialog .ui-resizable-se{right:0;bottom:0}.ui-dialog .ui-resizable-sw{left:0;bottom:0}.ui-dialog .ui-resizable-ne{right:0;top:0}.ui-dialog .ui-resizable-nw{left:0;top:0}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-text{display:block;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.ui-selectmenu-button.ui-button{text-align:left;white-space:nowrap;width:14em}.ui-selectmenu-icon.ui-icon{float:right;margin-top:0}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:.222em 0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:2em}.ui-spinner-button{width:1.6em;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top-style:none;border-bottom-style:none;border-right-style:none}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #c5c5c5}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#2b2b2b;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#003eff;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-checked{border:1px solid #dad55e;background:#fffa90}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-65px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-65px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:1px -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{-webkit-box-shadow:0 0 5px #666;box-shadow:0 0 5px #666} \ No newline at end of file diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 0fc5b9c7c9..ea6e92a956 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -1,5 +1,4 @@ /* - Author: The Pandora FMS team Name: Default theme Description: The default Pandora FMS theme layout @@ -887,6 +886,12 @@ input.group_item_min { input.group_item_min[disabled] { background: #fefefe url(../../images/group_green.disabled.png) no-repeat center !important; } +input.color_cloud_min { + background: #fefefe url(../../images/color_cloud_item.png) no-repeat center !important; +} +input.color_cloud_min[disabled] { + background: #fefefe url(../../images/color_cloud_item.disabled.png) no-repeat center !important; +} div#cont { position: fixed; @@ -1385,7 +1390,7 @@ table.databox { border: 0px none #E2E2E2; } -.databox>thead>tr>th, .databox>tbody>tr>th { +.databox>thead>tr>th, .databox>tbody>tr>th, .databox>thead>tr>th a { padding: 9px 7px; font-weight: normal; color: #fff; @@ -3041,9 +3046,9 @@ table#policy_modules td * { #sumary{ color: #FFF; - margin: 15px; + margin: 2px; padding: 10px 30px; - font-size: 20px; + font-size: 15px; font-weight: bold; border-radius: 2px; } @@ -3638,6 +3643,9 @@ div.simple_value > a > span.text p max-width:750px; top: 20%; background:white; + opacity: 0; + transition: opacity 0.5s; + -webkit-transition: opacity 0.5s; } .modalheader{ text-align:center; @@ -3846,7 +3854,9 @@ color:#82b92e;font-family:Nunito;font-size:10pt;position:relative;top:6px; #opacidad{ - opacity:0.5; + opacity:0; + transition: opacity 3s; + -webkit-transition: opacity 3s; z-index:1; width:100%; height:100%; @@ -4803,4 +4813,247 @@ tr:last-child > td > a.down_arrow, tr:first-child > td > a.up_arrow { border-radius: 3px; float: left; margin-right: 5px; -} \ No newline at end of file +} + +/* Message list popup */ +div#dialog_messages table th { + text-align: left; +} + +div#dialog_messages table th:last-child { + text-align: right; +} + +/* --- JQUERY-UI --- */ +.ui-button-text-only .ui-button-text { + font-family: nunito; + font-size: 9pt; + color: #82B92E +} +.ui-datepicker .ui-datepicker-title *, .ui-datepicker th * { + color: white; +} +.ui-datepicker .ui-datepicker-title select, .ui-datepicker .ui-datepicker-title option { + color: #111 !important; +} +.ui-dialog .ui-dialog-titlebar { + display: inherit; + text-align: center; + padding: .4em 1em; + height: 30px; + position: relative; +} +.ui-dialog .ui-dialog-title { + font-family: Nunito, sans-serif; + margin: .1em 0 !important; + white-space: nowrap !important; + width: 100% !important; + overflow: hidden !important; + text-overflow: ellipsis !important; + font-size: 11pt; + position: relative; + top: 5px; + float: none !important; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute !important; + right: 1em !important; + width: 21px !important; + margin: 0px 0 0 0 !important; + padding: 1px !important; + height: 20px !important; + bottom: 30% !important; + top: 20% !important; +} +.ui-dialog .ui-dialog-content { + position: relative !important; + border: 0; + padding: .5em 1em !important; + background: none !important; + overflow: auto !important; + margin-bottom: 1em; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em 1em .5em 0 !important; + cursor: pointer !important; + background: white !important; + background-color: white !important; + border: 1px solid #82b92e !important; + height:30px !important; + width:90px !important; +} +.ui-widget-content { + background: #ffffff url(include/styles/images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; +} +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + margin-top: 3px; + border: 1px solid #d3d3d3 !important; + border-bottom:0 !important; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x !important; + font-weight: normal !important; + color: #555555 !important; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 0 !important; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 0 !important; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 0 !important; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 0 !important; +} +#ui-datepicker-div { + border-color: #B1B1B1; + background: #ffffff; +} +.ui-widget-header { + background: #B1B1B1 !important; + color: #ffffff !important; +} +.ui-datepicker-calendar th { + background-color: #3F3F3F; +} +.ui-dialog .ui-widget-header { + background-color: #82b92e; +} +.ui_tpicker_hour, +.ui_tpicker_minute, +.ui_tpicker_second, +.ui-slider-handle { + border: 1px solid #AAAAAA !important; +} +.ui-timepicker-div dd { + margin: 0px 15px 0px 15px ; +} +.ui-timepicker-div .ui-datepicker-title { + color: white; +} +.ui-datepicker-buttonpane button { + border-color: #B1B1B1 !important; +} +.ui-datepicker-buttonpane .ui-datepicker-current { + margin-left: 0.2em !important; +} +.ui-dialog .ui-widget-content { + border: 0px !important; +} +.ui-dialog { + box-shadow: 5px 5px 19px #4e4e4e; + border: 0px !important; + padding: 0 !important; +} +.ui-dialog-titlebar { + border: 0px !important; +} +.ui-dialog-titlebar .ui-icon-closethick, +.ui-dialog-titlebar .ui-state-default, +.ui-dialog-titlebar .ui-state-hover, +.ui-dialog-titlebar button { + background: transparent; + border: 0px; +} +.ui-dialog-titlebar .ui-icon-closethick { + background-image: url("../../images/icono_cerrar.png") !important; +} +.ui-dialog-title { + color: #ffffff; + font-size: 9pt; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button{ + font-family: Verdana,Arial,sans-serif !important; +} + +a.ui-button:active, .ui-button:active, +.ui-button.ui-state-active:hover, +.ui-state-focus .ui-widget-content, +.ui-state-focus .ui-widget-header, +.ui-state-focus .ui-button:hover, .ui-button:focus{ + background: transparent !important; + border: none !important; +} + +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover{ + border: 1px solid #999999 !important; + border-bottom: 0 !important; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x !important; +} + +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active{ + border: 1px solid #aaaaaa !important; + border-bottom: 0 !important; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x !important; + font-weight: normal !important; + color: #212121 !important; +} +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited{ + color: #212121 !important; +} + +ul.ui-front{ + z-index: 1000000 !important; + padding-right: 0px !important; +} + +ul.ui-front li{ + padding: 3px !important; +} + +ul.ui-front li:hover{ + background-color: #e1e3e1 !important; +} + +ul.ui-front li a.ui-menu-item-wrapper{ + background: transparent !important; + border: none !important; +} + +ul.ui-front li a.ui-menu-item-wrapper span{ + padding-left: 5px !important; +} + +ul.ui-front li a.ui-menu-item-wrapper:hover{ + text-decoration: none !important; +} + +input[type=submit].ui-button-dialog{ + margin: .5em 1em .5em 0 !important; + cursor: pointer !important; + background: white !important; + background-color: white !important; + color: #82b92e !important; + text-align: center !important; + border: 1px solid #82b92e !important; + height:30px !important; + width:90px !important; +} +/* --- END - JQUERY-UI --- */ diff --git a/pandora_console/include/swiftmailer/classes/Swift.php b/pandora_console/include/swiftmailer/classes/Swift.php deleted file mode 100644 index 1518b9491c..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * General utility class in Swift Mailer, not to be instantiated. - * - * @package Swift - * - * @author Chris Corbyn - */ -abstract class Swift -{ - - /** Swift Mailer Version number generated during dist release process */ - const VERSION = '4.0.5'; - - /** - * Internal autoloader for spl_autoload_register(). - * - * @param string $class - */ - public static function autoload($class) - { - //Don't interfere with other autoloaders - if (0 !== strpos($class, 'Swift')) - { - return false; - } - - $path = dirname(__FILE__).'/'.str_replace('_', '/', $class).'.php'; - - if (!file_exists($path)) - { - return false; - } - - require_once $path; - } - - /** - * Configure autoloading using Swift Mailer. - * - * This is designed to play nicely with other autoloaders. - */ - public static function registerAutoload() - { - spl_autoload_register(array('Swift', 'autoload')); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Attachment.php b/pandora_console/include/swiftmailer/classes/Swift/Attachment.php deleted file mode 100644 index d3779bfe92..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Attachment.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Attachment.php'; -//@require 'Swift/ByteStream/FileByteStream.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * Attachment class for attaching files to a {@link Swift_Mime_Message}. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Attachment extends Swift_Mime_Attachment -{ - - /** - * Create a new Attachment. - * Details may be optionally provided to the constructor. - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - */ - public function __construct($data = null, $filename = null, - $contentType = null) - { - call_user_func_array( - array($this, 'Swift_Mime_Attachment::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('mime.attachment') - ); - - $this->setBody($data); - $this->setFilename($filename); - if ($contentType) - { - $this->setContentType($contentType); - } - } - - /** - * Create a new Attachment. - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - * @return Swift_Mime_Attachment - */ - public static function newInstance($data = null, $filename = null, - $contentType = null) - { - return new self($data, $filename, $contentType); - } - - /** - * Create a new Attachment from a filesystem path. - * @param string $path - * @param string $contentType optional - * @return Swift_Mime_Attachment - */ - public static function fromPath($path, $contentType = null) - { - return self::newInstance()->setFile( - new Swift_ByteStream_FileByteStream($path), - $contentType - ); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php b/pandora_console/include/swiftmailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php deleted file mode 100644 index 71bc3f1b8d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php +++ /dev/null @@ -1,178 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/Filterable.php'; -//@require 'Swift/StreamFilter.php'; - -/** - * Provides the base functionality for an InputStream supporting filters. - * @package Swift - * @subpackage ByteStream - * @author Chris Corbyn - */ -abstract class Swift_ByteStream_AbstractFilterableInputStream - implements Swift_InputByteStream, Swift_Filterable -{ - - /** Write sequence */ - private $_sequence = 0; - - /** StreamFilters */ - private $_filters = array(); - - /** A buffer for writing */ - private $_writeBuffer = ''; - - /** Bound streams */ - private $_mirrors = array(); - - /** - * Commit the given bytes to the storage medium immediately. - * @param string $bytes - * @access protected - */ - abstract protected function _commit($bytes); - - /** - * Flush any buffers/content with immediate effect. - * @access protected - */ - abstract protected function _flush(); - - /** - * Add a StreamFilter to this InputByteStream. - * @param Swift_StreamFilter $filter - * @param string $key - */ - public function addFilter(Swift_StreamFilter $filter, $key) - { - $this->_filters[$key] = $filter; - } - - /** - * Remove an already present StreamFilter based on its $key. - * @param string $key - */ - public function removeFilter($key) - { - unset($this->_filters[$key]); - } - - /** - * Writes $bytes to the end of the stream. - * @param string $bytes - * @throws Swift_IoException - */ - public function write($bytes) - { - $this->_writeBuffer .= $bytes; - foreach ($this->_filters as $filter) - { - if ($filter->shouldBuffer($this->_writeBuffer)) - { - return; - } - } - $this->_doWrite($this->_writeBuffer); - return ++$this->_sequence; - } - - /** - * For any bytes that are currently buffered inside the stream, force them - * off the buffer. - * - * @throws Swift_IoException - */ - public function commit() - { - $this->_doWrite($this->_writeBuffer); - } - - /** - * Attach $is to this stream. - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - $this->_mirrors[] = $is; - } - - /** - * Remove an already bound stream. - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - foreach ($this->_mirrors as $k => $stream) - { - if ($is === $stream) - { - if ($this->_writeBuffer !== '') - { - $stream->write($this->_filter($this->_writeBuffer)); - } - unset($this->_mirrors[$k]); - } - } - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - * @throws Swift_IoException - */ - public function flushBuffers() - { - if ($this->_writeBuffer !== '') - { - $this->_doWrite($this->_writeBuffer); - } - $this->_flush(); - - foreach ($this->_mirrors as $stream) - { - $stream->flushBuffers(); - } - } - - // -- Private methods - - /** Run $bytes through all filters */ - private function _filter($bytes) - { - foreach ($this->_filters as $filter) - { - $bytes = $filter->filter($bytes); - } - return $bytes; - } - - /** Just write the bytes to the stream */ - private function _doWrite($bytes) - { - $this->_commit($this->_filter($bytes)); - - foreach ($this->_mirrors as $stream) - { - $stream->write($bytes); - } - - $this->_writeBuffer = ''; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/ByteStream/ArrayByteStream.php b/pandora_console/include/swiftmailer/classes/Swift/ByteStream/ArrayByteStream.php deleted file mode 100644 index f918889464..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/ByteStream/ArrayByteStream.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStream.php'; - -/** - * Allows reading and writing of bytes to and from an array. - * @package Swift - * @subpackage ByteStream - * @author Chris Corbyn - */ -class Swift_ByteStream_ArrayByteStream - implements Swift_InputByteStream, Swift_OutputByteStream -{ - - /** - * The internal stack of bytes. - * @var string[] - * @access private - */ - private $_array = array(); - - /** - * The size of the stack - * @var int - * @access private - */ - private $_arraySize = 0; - - /** - * The internal pointer offset. - * @var int - * @access private - */ - private $_offset = 0; - - /** Bound streams */ - private $_mirrors = array(); - - /** - * Create a new ArrayByteStream. - * If $stack is given the stream will be populated with the bytes it contains. - * @param mixed $stack of bytes in string or array form, optional - */ - public function __construct($stack = null) - { - if (is_array($stack)) - { - $this->_array = $stack; - $this->_arraySize = count($stack); - } - elseif (is_string($stack)) - { - $this->write($stack); - } - else - { - $this->_array = array(); - } - } - - /** - * Reads $length bytes from the stream into a string and moves the pointer - * through the stream by $length. If less bytes exist than are requested the - * remaining bytes are given instead. If no bytes are remaining at all, boolean - * false is returned. - * @param int $length - * @return string - */ - public function read($length) - { - if ($this->_offset == $this->_arraySize) - { - return false; - } - - // Don't use array slice - $end = $length + $this->_offset; - $end = $this->_arraySize<$end - ?$this->_arraySize - :$end; - $ret = ''; - for (; $this->_offset < $end; ++$this->_offset) - { - $ret .= $this->_array[$this->_offset]; - } - return $ret; - } - - /** - * Writes $bytes to the end of the stream. - * @param string $bytes - */ - public function write($bytes) - { - $to_add = str_split($bytes); - foreach ($to_add as $value) - { - $this->_array[] = $value; - } - $this->_arraySize = count($this->_array); - - foreach ($this->_mirrors as $stream) - { - $stream->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Attach $is to this stream. - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - $this->_mirrors[] = $is; - } - - /** - * Remove an already bound stream. - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - foreach ($this->_mirrors as $k => $stream) - { - if ($is === $stream) - { - unset($this->_mirrors[$k]); - } - } - } - - /** - * Move the internal read pointer to $byteOffset in the stream. - * @param int $byteOffset - * @return boolean - */ - public function setReadPointer($byteOffset) - { - if ($byteOffset > $this->_arraySize) - { - $byteOffset = $this->_arraySize; - } - elseif ($byteOffset < 0) - { - $byteOffset = 0; - } - - $this->_offset = $byteOffset; - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - */ - public function flushBuffers() - { - $this->_offset = 0; - $this->_array = array(); - $this->_arraySize = 0; - - foreach ($this->_mirrors as $stream) - { - $stream->flushBuffers(); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/ByteStream/FileByteStream.php b/pandora_console/include/swiftmailer/classes/Swift/ByteStream/FileByteStream.php deleted file mode 100644 index 14773c2f5f..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/ByteStream/FileByteStream.php +++ /dev/null @@ -1,177 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/ByteStream/AbstractFilterableInputStream.php'; -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/FileStream.php'; -//@require 'Swift/IoException.php'; - -/** - * Allows reading and writing of bytes to and from a file. - * @package Swift - * @subpackage ByteStream - * @author Chris Corbyn - */ -class Swift_ByteStream_FileByteStream - extends Swift_ByteStream_AbstractFilterableInputStream - implements Swift_FileStream -{ - - /** The internal pointer offset */ - private $_offset = 0; - - /** The path to the file */ - private $_path; - - /** The mode this file is opened in for writing */ - private $_mode; - - /** A lazy-loaded resource handle for reading the file */ - private $_reader; - - /** A lazy-loaded resource handle for writing the file */ - private $_writer; - - /** If magic_quotes_runtime is on, this will be true */ - private $_quotes = false; - - /** - * Create a new FileByteStream for $path. - * @param string $path - * @param string $writable if true - */ - public function __construct($path, $writable = false) - { - $this->_path = $path; - $this->_mode = $writable ? 'w+b' : 'rb'; - $this->_quotes = get_magic_quotes_runtime(); - } - - /** - * Get the complete path to the file. - * @return string - */ - public function getPath() - { - return $this->_path; - } - - /** - * Reads $length bytes from the stream into a string and moves the pointer - * through the stream by $length. If less bytes exist than are requested the - * remaining bytes are given instead. If no bytes are remaining at all, boolean - * false is returned. - * @param int $length - * @return string - * @throws Swift_IoException - */ - public function read($length) - { - $fp = $this->_getReadHandle(); - if (!feof($fp)) - { - if ($this->_quotes) - { - set_magic_quotes_runtime(0); - } - $bytes = fread($fp, $length); - if ($this->_quotes) - { - set_magic_quotes_runtime(1); - } - $this->_offset = ftell($fp); - return $bytes; - } - else - { - return false; - } - } - - /** - * Move the internal read pointer to $byteOffset in the stream. - * @param int $byteOffset - * @return boolean - */ - public function setReadPointer($byteOffset) - { - if (isset($this->_reader)) - { - fseek($this->_reader, $byteOffset, SEEK_SET); - } - $this->_offset = $byteOffset; - } - - // -- Private methods - - /** Just write the bytes to the file */ - protected function _commit($bytes) - { - fwrite($this->_getWriteHandle(), $bytes); - $this->_resetReadHandle(); - } - - /** Not used */ - protected function _flush() - { - } - - /** Get the resource for reading */ - private function _getReadHandle() - { - if (!isset($this->_reader)) - { - if (!$this->_reader = fopen($this->_path, 'rb')) - { - throw new Swift_IoException( - 'Unable to open file for reading [' . $this->_path . ']' - ); - } - fseek($this->_reader, $this->_offset, SEEK_SET); - } - return $this->_reader; - } - - /** Get the resource for writing */ - private function _getWriteHandle() - { - if (!isset($this->_writer)) - { - if (!$this->_writer = fopen($this->_path, $this->_mode)) - { - throw new Swift_IoException( - 'Unable to open file for writing [' . $this->_path . ']' - ); - } - } - return $this->_writer; - } - - /** Force a reload of the resource for writing */ - private function _resetWriteHandle() - { - if (isset($this->_writer)) - { - fclose($this->_writer); - $this->_writer = null; - } - } - - /** Force a reload of the resource for reading */ - private function _resetReadHandle() - { - if (isset($this->_reader)) - { - fclose($this->_reader); - $this->_reader = null; - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterReader.php deleted file mode 100644 index 53d39ece9c..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Analyzes characters for a specific character set. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - * @author Xavier De Cock <xdecock@gmail.com> - */ -interface Swift_CharacterReader -{ - const MAP_TYPE_INVALID = 0x01; - const MAP_TYPE_FIXED_LEN = 0x02; - const MAP_TYPE_POSITIONS = 0x03; - - /** - * Returns the complete charactermap - * - * @param string $string - * @param int $startOffset - * @param array $currentMap - * @param mixed $ignoredChars - * @return int - */ - public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars); - - /** - * Returns mapType - * @int mapType - */ - public function getMapType(); - - /** - * Returns an integer which specifies how many more bytes to read. - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * @param int[] $bytes - * @return int - */ - public function validateByteSequence($bytes, $size); - - /** - * Returns the number of bytes which should be read to start each character. - * For fixed width character sets this should be the number of - * octets-per-character. For multibyte character sets this will probably be 1. - * @return int - */ - public function getInitialByteSize(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/GenericFixedWidthReader.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/GenericFixedWidthReader.php deleted file mode 100644 index 26b13ff424..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/GenericFixedWidthReader.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/CharacterReader.php'; - -/** - * Provides fixed-width byte sizes for reading fixed-width character sets. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - * @author Xavier De Cock <xdecock@gmail.com> - */ -class Swift_CharacterReader_GenericFixedWidthReader - implements Swift_CharacterReader -{ - - /** - * The number of bytes in a single character. - * @var int - * @access private - */ - private $_width; - - /** - * Creates a new GenericFixedWidthReader using $width bytes per character. - * @param int $width - */ - public function __construct($width) - { - $this->_width = $width; - } - - /** - * Returns the complete charactermap - * - * @param string $string - * @param int $startOffset - * @param array $currentMap - * @param mixed $ignoredChars - * @return $int - */ - public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) - { - $strlen = strlen($string); - // % and / are CPU intensive, so, maybe find a better way - $ignored = $strlen%$this->_width; - $ignoredChars = substr($string, - $ignored); - $currentMap = $this->_width; - return ($strlen - $ignored)/$this->_width; - - } - - /** - * Returns mapType - * @int mapType - */ - public function getMapType() - { - return self::MAP_TYPE_FIXED_LEN; - } - - /** - * Returns an integer which specifies how many more bytes to read. - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * @param string $bytes - * @return int - */ - public function validateByteSequence($bytes, $size) - { - $needed = $this->_width - $size; - return ($needed > -1) - ? $needed - : -1 - ; - } - - /** - * Returns the number of bytes which should be read to start each character. - * @return int - */ - public function getInitialByteSize() - { - return $this->_width; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/UsAsciiReader.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/UsAsciiReader.php deleted file mode 100644 index 3e0228a372..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/UsAsciiReader.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/CharacterReader.php'; - -/** - * Analyzes US-ASCII characters. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - */ -class Swift_CharacterReader_UsAsciiReader - implements Swift_CharacterReader -{ - /** - * Returns the complete charactermap - * - * @param string $string - * @param int $startOffset - * @param string $ignoredChars - */ - public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) - { - $strlen=strlen($string); - $ignoredChars=''; - for( $i = 0; $i < $strlen; ++$i) - { - if ($string[$i]>"\x07F") - { // Invalid char - $currentMap[$i+$startOffset]=$string[$i]; - } - } - return $strlen; - } - - /** - * Returns mapType - * @int mapType - */ - public function getMapType() - { - return self::MAP_TYPE_INVALID; - } - - /** - * Returns an integer which specifies how many more bytes to read. - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * @param string $bytes - * @return int - */ - public function validateByteSequence($bytes, $size) - { - $byte = reset($bytes); - if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) - { - return 0; - } - else - { - return -1; - } - } - - /** - * Returns the number of bytes which should be read to start each character. - * @return int - */ - public function getInitialByteSize() - { - return 1; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/Utf8Reader.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/Utf8Reader.php deleted file mode 100644 index 0a1ebe742a..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterReader/Utf8Reader.php +++ /dev/null @@ -1,183 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/CharacterReader.php'; - -/** - * Analyzes UTF-8 characters. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - * @author Xavier De Cock <xdecock@gmail.com> - */ -class Swift_CharacterReader_Utf8Reader - implements Swift_CharacterReader -{ - - /** Pre-computed for optimization */ - private static $length_map=array( -//N=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x0N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x1N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x2N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x3N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x4N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x5N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x6N - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, //0x7N - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x8N - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0x9N - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xAN - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //0xBN - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xCN - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, //0xDN - 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, //0xEN - 4,4,4,4,4,4,4,4,5,5,5,5,6,6,0,0 //0xFN - ); - private static $s_length_map=array( - "\x00"=>1, "\x01"=>1, "\x02"=>1, "\x03"=>1, "\x04"=>1, "\x05"=>1, "\x06"=>1, "\x07"=>1, - "\x08"=>1, "\x09"=>1, "\x0a"=>1, "\x0b"=>1, "\x0c"=>1, "\x0d"=>1, "\x0e"=>1, "\x0f"=>1, - "\x10"=>1, "\x11"=>1, "\x12"=>1, "\x13"=>1, "\x14"=>1, "\x15"=>1, "\x16"=>1, "\x17"=>1, - "\x18"=>1, "\x19"=>1, "\x1a"=>1, "\x1b"=>1, "\x1c"=>1, "\x1d"=>1, "\x1e"=>1, "\x1f"=>1, - "\x20"=>1, "\x21"=>1, "\x22"=>1, "\x23"=>1, "\x24"=>1, "\x25"=>1, "\x26"=>1, "\x27"=>1, - "\x28"=>1, "\x29"=>1, "\x2a"=>1, "\x2b"=>1, "\x2c"=>1, "\x2d"=>1, "\x2e"=>1, "\x2f"=>1, - "\x30"=>1, "\x31"=>1, "\x32"=>1, "\x33"=>1, "\x34"=>1, "\x35"=>1, "\x36"=>1, "\x37"=>1, - "\x38"=>1, "\x39"=>1, "\x3a"=>1, "\x3b"=>1, "\x3c"=>1, "\x3d"=>1, "\x3e"=>1, "\x3f"=>1, - "\x40"=>1, "\x41"=>1, "\x42"=>1, "\x43"=>1, "\x44"=>1, "\x45"=>1, "\x46"=>1, "\x47"=>1, - "\x48"=>1, "\x49"=>1, "\x4a"=>1, "\x4b"=>1, "\x4c"=>1, "\x4d"=>1, "\x4e"=>1, "\x4f"=>1, - "\x50"=>1, "\x51"=>1, "\x52"=>1, "\x53"=>1, "\x54"=>1, "\x55"=>1, "\x56"=>1, "\x57"=>1, - "\x58"=>1, "\x59"=>1, "\x5a"=>1, "\x5b"=>1, "\x5c"=>1, "\x5d"=>1, "\x5e"=>1, "\x5f"=>1, - "\x60"=>1, "\x61"=>1, "\x62"=>1, "\x63"=>1, "\x64"=>1, "\x65"=>1, "\x66"=>1, "\x67"=>1, - "\x68"=>1, "\x69"=>1, "\x6a"=>1, "\x6b"=>1, "\x6c"=>1, "\x6d"=>1, "\x6e"=>1, "\x6f"=>1, - "\x70"=>1, "\x71"=>1, "\x72"=>1, "\x73"=>1, "\x74"=>1, "\x75"=>1, "\x76"=>1, "\x77"=>1, - "\x78"=>1, "\x79"=>1, "\x7a"=>1, "\x7b"=>1, "\x7c"=>1, "\x7d"=>1, "\x7e"=>1, "\x7f"=>1, - "\x80"=>0, "\x81"=>0, "\x82"=>0, "\x83"=>0, "\x84"=>0, "\x85"=>0, "\x86"=>0, "\x87"=>0, - "\x88"=>0, "\x89"=>0, "\x8a"=>0, "\x8b"=>0, "\x8c"=>0, "\x8d"=>0, "\x8e"=>0, "\x8f"=>0, - "\x90"=>0, "\x91"=>0, "\x92"=>0, "\x93"=>0, "\x94"=>0, "\x95"=>0, "\x96"=>0, "\x97"=>0, - "\x98"=>0, "\x99"=>0, "\x9a"=>0, "\x9b"=>0, "\x9c"=>0, "\x9d"=>0, "\x9e"=>0, "\x9f"=>0, - "\xa0"=>0, "\xa1"=>0, "\xa2"=>0, "\xa3"=>0, "\xa4"=>0, "\xa5"=>0, "\xa6"=>0, "\xa7"=>0, - "\xa8"=>0, "\xa9"=>0, "\xaa"=>0, "\xab"=>0, "\xac"=>0, "\xad"=>0, "\xae"=>0, "\xaf"=>0, - "\xb0"=>0, "\xb1"=>0, "\xb2"=>0, "\xb3"=>0, "\xb4"=>0, "\xb5"=>0, "\xb6"=>0, "\xb7"=>0, - "\xb8"=>0, "\xb9"=>0, "\xba"=>0, "\xbb"=>0, "\xbc"=>0, "\xbd"=>0, "\xbe"=>0, "\xbf"=>0, - "\xc0"=>2, "\xc1"=>2, "\xc2"=>2, "\xc3"=>2, "\xc4"=>2, "\xc5"=>2, "\xc6"=>2, "\xc7"=>2, - "\xc8"=>2, "\xc9"=>2, "\xca"=>2, "\xcb"=>2, "\xcc"=>2, "\xcd"=>2, "\xce"=>2, "\xcf"=>2, - "\xd0"=>2, "\xd1"=>2, "\xd2"=>2, "\xd3"=>2, "\xd4"=>2, "\xd5"=>2, "\xd6"=>2, "\xd7"=>2, - "\xd8"=>2, "\xd9"=>2, "\xda"=>2, "\xdb"=>2, "\xdc"=>2, "\xdd"=>2, "\xde"=>2, "\xdf"=>2, - "\xe0"=>3, "\xe1"=>3, "\xe2"=>3, "\xe3"=>3, "\xe4"=>3, "\xe5"=>3, "\xe6"=>3, "\xe7"=>3, - "\xe8"=>3, "\xe9"=>3, "\xea"=>3, "\xeb"=>3, "\xec"=>3, "\xed"=>3, "\xee"=>3, "\xef"=>3, - "\xf0"=>4, "\xf1"=>4, "\xf2"=>4, "\xf3"=>4, "\xf4"=>4, "\xf5"=>4, "\xf6"=>4, "\xf7"=>4, - "\xf8"=>5, "\xf9"=>5, "\xfa"=>5, "\xfb"=>5, "\xfc"=>6, "\xfd"=>6, "\xfe"=>0, "\xff"=>0, - ); - - /** - * Returns the complete charactermap - * - * @param string $string - * @param int $startOffset - * @param array $currentMap - * @param mixed $ignoredChars - */ - public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars) - { - if (!isset($currentMap['i']) || !isset($currentMap['p'])) - { - $currentMap['p'] = $currentMap['i'] = array(); - } - $strlen=strlen($string); - $charPos=count($currentMap['p']); - $foundChars=0; - $invalid=false; - for ($i=0; $i<$strlen; ++$i) - { - $char=$string[$i]; - $size=self::$s_length_map[$char]; - if ($size==0) - { - /* char is invalid, we must wait for a resync */ - $invalid=true; - continue; - } - else - { - if ($invalid==true) - { - /* We mark the chars as invalid and start a new char */ - $currentMap['p'][$charPos+$foundChars]=$startOffset+$i; - $currentMap['i'][$charPos+$foundChars]=true; - ++$foundChars; - $invalid=false; - } - if (($i+$size) > $strlen) { - $ignoredChars=substr($string, $i); - break; - } - for ($j=1; $j<$size; ++$j) - { - $char=$string[$i+$j]; - if ($char>"\x7F" && $char<"\xC0") - { - // Valid - continue parsing - } - else - { - /* char is invalid, we must wait for a resync */ - $invalid=true; - continue 2; - } - } - /* Ok we got a complete char here */ - $lastChar=$currentMap['p'][$charPos+$foundChars]=$startOffset+$i+$size; - $i+=$j-1; - ++$foundChars; - } - } - return $foundChars; - } - - /** - * Returns mapType - * @int mapType - */ - public function getMapType() - { - return self::MAP_TYPE_POSITIONS; - } - - /** - * Returns an integer which specifies how many more bytes to read. - * A positive integer indicates the number of more bytes to fetch before invoking - * this method again. - * A value of zero means this is already a valid character. - * A value of -1 means this cannot possibly be a valid character. - * @param string $bytes - * @return int - */ - public function validateByteSequence($bytes, $size) - { - if ($size<1){ - return -1; - } - $needed = self::$length_map[$bytes[0]] - $size; - return ($needed > -1) - ? $needed - : -1 - ; - } - - /** - * Returns the number of bytes which should be read to start each character. - * @return int - */ - public function getInitialByteSize() - { - return 1; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php deleted file mode 100644 index a6f9f9487b..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/CharacterReaderFactory.php'; - -/** - * Standard factory for creating CharacterReaders. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - */ -class Swift_CharacterReaderFactory_SimpleCharacterReaderFactory - implements Swift_CharacterReaderFactory -{ - - /** - * A map of charset patterns to their implementation classes. - * @var array - * @access private - */ - private $_map = array(); - - /** - * Factories which have already been loaded. - * @var Swift_CharacterReaderFactory[] - * @access private - */ - private $_loaded = array(); - - /** - * Creates a new CharacterReaderFactory. - */ - public function __construct() - { - $prefix = 'Swift_CharacterReader_'; - - $singleByte = array( - 'class' => $prefix . 'GenericFixedWidthReader', - 'constructor' => array(1) - ); - - $doubleByte = array( - 'class' => $prefix . 'GenericFixedWidthReader', - 'constructor' => array(2) - ); - - $fourBytes = array( - 'class' => $prefix . 'GenericFixedWidthReader', - 'constructor' => array(4) - ); - - //Utf-8 - $this->_map['utf-?8'] = array( - 'class' => $prefix . 'Utf8Reader', - 'constructor' => array() - ); - - //7-8 bit charsets - $this->_map['(us-)?ascii'] = $singleByte; - $this->_map['(iso|iec)-?8859-?[0-9]+'] = $singleByte; - $this->_map['windows-?125[0-9]'] = $singleByte; - $this->_map['cp-?[0-9]+'] = $singleByte; - $this->_map['ansi'] = $singleByte; - $this->_map['macintosh'] = $singleByte; - $this->_map['koi-?7'] = $singleByte; - $this->_map['koi-?8-?.+'] = $singleByte; - $this->_map['mik'] = $singleByte; - $this->_map['(cork|t1)'] = $singleByte; - $this->_map['v?iscii'] = $singleByte; - - //16 bits - $this->_map['(ucs-?2|utf-?16)'] = $doubleByte; - - //32 bits - $this->_map['(ucs-?4|utf-?32)'] = $fourBytes; - - //Fallback - $this->_map['.*'] = $singleByte; - } - - /** - * Returns a CharacterReader suitable for the charset applied. - * @param string $charset - * @return Swift_CharacterReader - */ - public function getReaderFor($charset) - { - $charset = trim(strtolower($charset)); - foreach ($this->_map as $pattern => $spec) - { - $re = '/^' . $pattern . '$/D'; - if (preg_match($re, $charset)) - { - if (!array_key_exists($pattern, $this->_loaded)) - { - $reflector = new ReflectionClass($spec['class']); - if ($reflector->getConstructor()) - { - $reader = $reflector->newInstanceArgs($spec['constructor']); - } - else - { - $reader = $reflector->newInstance(); - } - $this->_loaded[$pattern] = $reader; - } - return $this->_loaded[$pattern]; - } - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterStream.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterStream.php deleted file mode 100644 index bf91528228..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterStream.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -require_once dirname(__FILE__) . '/OutputByteStream.php'; -require_once dirname(__FILE__) . '/CharacterReaderFactory.php'; - - -/** - * An abstract means of reading and writing data in terms of characters as opposed - * to bytes. - * Classes implementing this interface may use a subsystem which requires less - * memory than working with large strings of data. - * @package Swift - * @subpackage CharacterStream - * @author Chris Corbyn - */ -interface Swift_CharacterStream -{ - - /** - * Set the character set used in this CharacterStream. - * @param string $charset - */ - public function setCharacterSet($charset); - - /** - * Set the CharacterReaderFactory for multi charset support. - * @param Swift_CharacterReaderFactory $factory - */ - public function setCharacterReaderFactory( - Swift_CharacterReaderFactory $factory); - - /** - * Overwrite this character stream using the byte sequence in the byte stream. - * @param Swift_OutputByteStream $os output stream to read from - */ - public function importByteStream(Swift_OutputByteStream $os); - - /** - * Import a string a bytes into this CharacterStream, overwriting any existing - * data in the stream. - * @param string $string - */ - public function importString($string); - - /** - * Read $length characters from the stream and move the internal pointer - * $length further into the stream. - * @param int $length - * @return string - */ - public function read($length); - - /** - * Read $length characters from the stream and return a 1-dimensional array - * containing there octet values. - * @param int $length - * @return int[] - */ - public function readBytes($length); - - /** - * Write $chars to the end of the stream. - * @param string $chars - */ - public function write($chars); - - /** - * Move the internal pointer to $charOffset in the stream. - * @param int $charOffset - */ - public function setPointer($charOffset); - - /** - * Empty the stream and reset the internal pointer. - */ - public function flushContents(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterStream/ArrayCharacterStream.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterStream/ArrayCharacterStream.php deleted file mode 100644 index 9612365a71..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterStream/ArrayCharacterStream.php +++ /dev/null @@ -1,319 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/CharacterStream.php'; -//@require 'Swift/OutputByteStream.php'; - - -/** - * A CharacterStream implementation which stores characters in an internal array. - * @package Swift - * @subpackage CharacterStream - * @author Chris Corbyn - */ -class Swift_CharacterStream_ArrayCharacterStream - implements Swift_CharacterStream -{ - - /** A map of byte values and their respective characters */ - private static $_charMap; - - /** A map of characters and their derivative byte values */ - private static $_byteMap; - - /** The char reader (lazy-loaded) for the current charset */ - private $_charReader; - - /** A factory for creatiing CharacterReader instances */ - private $_charReaderFactory; - - /** The character set this stream is using */ - private $_charset; - - /** Array of characters */ - private $_array = array(); - - /** Size of the array of character */ - private $_array_size = array(); - - /** The current character offset in the stream */ - private $_offset = 0; - - /** - * Create a new CharacterStream with the given $chars, if set. - * @param Swift_CharacterReaderFactory $factory for loading validators - * @param string $charset used in the stream - */ - public function __construct(Swift_CharacterReaderFactory $factory, - $charset) - { - self::_initializeMaps(); - $this->setCharacterReaderFactory($factory); - $this->setCharacterSet($charset); - } - - /** - * Set the character set used in this CharacterStream. - * @param string $charset - */ - public function setCharacterSet($charset) - { - $this->_charset = $charset; - $this->_charReader = null; - } - - /** - * Set the CharacterReaderFactory for multi charset support. - * @param Swift_CharacterReaderFactory $factory - */ - public function setCharacterReaderFactory( - Swift_CharacterReaderFactory $factory) - { - $this->_charReaderFactory = $factory; - } - - /** - * Overwrite this character stream using the byte sequence in the byte stream. - * @param Swift_OutputByteStream $os output stream to read from - */ - public function importByteStream(Swift_OutputByteStream $os) - { - if (!isset($this->_charReader)) - { - $this->_charReader = $this->_charReaderFactory - ->getReaderFor($this->_charset); - } - - $startLength = $this->_charReader->getInitialByteSize(); - while (false !== $bytes = $os->read($startLength)) - { - $c = array(); - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) - { - $c[] = self::$_byteMap[$bytes[$i]]; - } - $size = count($c); - $need = $this->_charReader - ->validateByteSequence($c, $size); - if ($need > 0 && - false !== $bytes = $os->read($need)) - { - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) - { - $c[] = self::$_byteMap[$bytes[$i]]; - } - } - $this->_array[] = $c; - ++$this->_array_size; - } - } - - /** - * Import a string a bytes into this CharacterStream, overwriting any existing - * data in the stream. - * @param string $string - */ - public function importString($string) - { - $this->flushContents(); - $this->write($string); - } - - /** - * Read $length characters from the stream and move the internal pointer - * $length further into the stream. - * @param int $length - * @return string - */ - public function read($length) - { - if ($this->_offset == $this->_array_size) - { - return false; - } - - // Don't use array slice - $arrays = array(); - $end = $length + $this->_offset; - for ($i = $this->_offset; $i < $end; ++$i) - { - if (!isset($this->_array[$i])) - { - break; - } - $arrays[] = $this->_array[$i]; - } - $this->_offset += $i - $this->_offset; // Limit function calls - $chars = false; - foreach ($arrays as $array) - { - $chars .= implode('', array_map('chr', $array)); - } - return $chars; - } - - /** - * Read $length characters from the stream and return a 1-dimensional array - * containing there octet values. - * @param int $length - * @return int[] - */ - public function readBytes($length) - { - if ($this->_offset == $this->_array_size) - { - return false; - } - $arrays = array(); - $end = $length + $this->_offset; - for ($i = $this->_offset; $i < $end; ++$i) - { - if (!isset($this->_array[$i])) - { - break; - } - $arrays[] = $this->_array[$i]; - } - $this->_offset += ($i - $this->_offset); // Limit function calls - return call_user_func_array('array_merge', $arrays); - } - - /** - * Write $chars to the end of the stream. - * @param string $chars - */ - public function write($chars) - { - if (!isset($this->_charReader)) - { - $this->_charReader = $this->_charReaderFactory->getReaderFor( - $this->_charset); - } - - $startLength = $this->_charReader->getInitialByteSize(); - - $fp = fopen('php://memory', 'w+b'); - fwrite($fp, $chars); - unset($chars); - fseek($fp, 0, SEEK_SET); - - $buffer = array(0); - $buf_pos = 1; - $buf_len = 1; - $has_datas = true; - do - { - $bytes = array(); - // Buffer Filing - if ($buf_len - $buf_pos < $startLength) - { - $buf = array_splice($buffer, $buf_pos); - $new = $this->_reloadBuffer($fp, 100); - if ($new) - { - $buffer = array_merge($buf, $new); - $buf_len = count($buffer); - $buf_pos = 0; - } - else - { - $has_datas = false; - } - } - if ($buf_len - $buf_pos > 0) - { - $size = 0; - for ($i = 0; $i < $startLength && isset($buffer[$buf_pos]); ++$i) - { - ++$size; - $bytes[] = $buffer[$buf_pos++]; - } - $need = $this->_charReader->validateByteSequence( - $bytes, $size); - if ($need > 0) - { - if ($buf_len - $buf_pos < $need) - { - $new = $this->_reloadBuffer($fp, $need); - - if ($new) - { - $buffer = array_merge($buffer, $new); - $buf_len = count($buffer); - } - } - for ($i = 0; $i < $need && isset($buffer[$buf_pos]); ++$i) - { - $bytes[] = $buffer[$buf_pos++]; - } - } - $this->_array[] = $bytes; - ++$this->_array_size; - } - } - while ($has_datas); - - fclose($fp); - } - - /** - * Move the internal pointer to $charOffset in the stream. - * @param int $charOffset - */ - public function setPointer($charOffset) - { - if ($charOffset > $this->_array_size) - { - $charOffset = $this->_array_size; - } - elseif ($charOffset < 0) - { - $charOffset = 0; - } - $this->_offset = $charOffset; - } - - /** - * Empty the stream and reset the internal pointer. - */ - public function flushContents() - { - $this->_offset = 0; - $this->_array = array(); - $this->_array_size = 0; - } - - private function _reloadBuffer($fp, $len) - { - if (!feof($fp) && ($bytes = fread($fp, $len)) !== false) - { - $buf = array(); - for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) - { - $buf[] = self::$_byteMap[$bytes[$i]]; - } - return $buf; - } - return false; - } - - private static function _initializeMaps() - { - if (!isset(self::$_charMap)) - { - self::$_charMap = array(); - for ($byte = 0; $byte < 256; ++$byte) - { - self::$_charMap[$byte] = chr($byte); - } - self::$_byteMap = array_flip(self::$_charMap); - } - } -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/CharacterStream/NgCharacterStream.php b/pandora_console/include/swiftmailer/classes/Swift/CharacterStream/NgCharacterStream.php deleted file mode 100644 index f090aa7d31..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/CharacterStream/NgCharacterStream.php +++ /dev/null @@ -1,300 +0,0 @@ -<?php - -/* - CharacterStream implementation using an array in Swift Mailer. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - - */ - -//@require 'Swift/CharacterStream.php'; -//@require 'Swift/OutputByteStream.php'; - - -/** - * A CharacterStream implementation which stores characters in an internal array. - * @package Swift - * @subpackage CharacterStream - * @author Xavier De Cock <xdecock@gmail.com> - */ - -Class Swift_CharacterStream_NgCharacterStream - implements Swift_CharacterStream -{ - - /** - * The char reader (lazy-loaded) for the current charset. - * @var Swift_CharacterReader - * @access private - */ - private $_charReader; - - /** - * A factory for creatiing CharacterReader instances. - * @var Swift_CharacterReaderFactory - * @access private - */ - private $_charReaderFactory; - - /** - * The character set this stream is using. - * @var string - * @access private - */ - private $_charset; - - /** - * The datas stored as is - * - * @var string - */ - private $_datas = ""; - - /** - * Number of bytes in the stream - * - * @var int - */ - private $_datasSize = 0; - - /** - * Map - * - * @var mixed - */ - private $_map; - - /** - * Map Type - * - * @var int - */ - private $_mapType = 0; - - /** - * Number of characters in the stream - * - * @var int - */ - private $_charCount = 0; - - /** - * Position in the stream - * - * @var unknown_type - */ - private $_currentPos = 0; - - /** - * The constructor - * - * @param Swift_CharacterReaderFactory $factory - * @param unknown_type $charset - */ - public function __construct(Swift_CharacterReaderFactory $factory, - $charset) - { - $this->setCharacterReaderFactory($factory); - $this->setCharacterSet($charset); - } - - /* -- Changing parameters of the stream -- */ - - /** - * Set the character set used in this CharacterStream. - * @param string $charset - */ - public function setCharacterSet($charset) - { - $this->_charset = $charset; - $this->_charReader = null; - $this->_mapType = 0; - } - - /** - * Set the CharacterReaderFactory for multi charset support. - * @param Swift_CharacterReaderFactory $factory - */ - public function setCharacterReaderFactory( - Swift_CharacterReaderFactory $factory) - { - $this->_charReaderFactory = $factory; - } - - /** - * @see Swift_CharacterStream::flushContents() - * - */ - public function flushContents() - { - $this->_datas = null; - $this->_map = null; - $this->_charCount = 0; - $this->_currentPos = 0; - $this->_datasSize = 0; - } - - /** - * @see Swift_CharacterStream::importByteStream() - * - * @param Swift_OutputByteStream $os - */ - public function importByteStream(Swift_OutputByteStream $os) - { - $this->flushContents(); - $blocks=512; - $os->setReadPointer(0); - while(false!==($read = $os->read($blocks))) - $this->write($read); - } - - /** - * @see Swift_CharacterStream::importString() - * - * @param string $string - */ - public function importString($string) - { - $this->flushContents(); - $this->write($string); - } - - /** - * @see Swift_CharacterStream::read() - * - * @param int $length - * @return string - */ - public function read($length) - { - if ($this->_currentPos>=$this->_charCount) - { - return false; - } - $ret=false; - $length = ($this->_currentPos+$length > $this->_charCount) - ? $this->_charCount - $this->_currentPos - : $length; - switch ($this->_mapType) - { - case Swift_CharacterReader::MAP_TYPE_FIXED_LEN: - $len = $length*$this->_map; - $ret = substr($this->_datas, - $this->_currentPos * $this->_map, - $len); - $this->_currentPos += $length; - break; - - case Swift_CharacterReader::MAP_TYPE_INVALID: - $end = $this->_currentPos + $length; - $end = $end > $this->_charCount - ?$this->_charCount - :$end; - $ret = ''; - for (; $this->_currentPos < $length; ++$this->_currentPos) - { - if (isset ($this->_map[$this->_currentPos])) - { - $ret .= '?'; - } - else - { - $ret .= $this->_datas[$this->_currentPos]; - } - } - break; - - case Swift_CharacterReader::MAP_TYPE_POSITIONS: - $end = $this->_currentPos + $length; - $end = $end > $this->_charCount - ?$this->_charCount - :$end; - $ret = ''; - $start = 0; - if ($this->_currentPos>0) - { - $start = $this->_map['p'][$this->_currentPos-1]; - } - $to = $start; - for (; $this->_currentPos < $end; ++$this->_currentPos) - { - if (isset($this->_map['i'][$this->_currentPos])) { - $ret .= substr($this->_datas, $start, $to - $start).'?'; - $start = $this->_map['p'][$this->_currentPos]; - } else { - $to = $this->_map['p'][$this->_currentPos]; - } - } - $ret .= substr($this->_datas, $start, $to - $start); - break; - } - return $ret; - } - - /** - * @see Swift_CharacterStream::readBytes() - * - * @param int $length - * @return int[] - */ - public function readBytes($length) - { - $read=$this->read($length); - if ($read!==false) - { - $ret = array_map('ord', str_split($read, 1)); - return $ret; - } - return false; - } - - /** - * @see Swift_CharacterStream::setPointer() - * - * @param int $charOffset - */ - public function setPointer($charOffset) - { - if ($this->_charCount<$charOffset){ - $charOffset=$this->_charCount; - } - $this->_currentPos = $charOffset; - } - - /** - * @see Swift_CharacterStream::write() - * - * @param string $chars - */ - public function write($chars) - { - if (!isset($this->_charReader)) - { - $this->_charReader = $this->_charReaderFactory->getReaderFor( - $this->_charset); - $this->_map = array(); - $this->_mapType = $this->_charReader->getMapType(); - } - $ignored=''; - $this->_datas .= $chars; - $this->_charCount += $this->_charReader->getCharPositions(substr($this->_datas, $this->_datasSize), $this->_datasSize, $this->_map, $ignored); - if ($ignored!==false) { - $this->_datasSize=strlen($this->_datas)-strlen($ignored); - } - else - { - $this->_datasSize=strlen($this->_datas); - } - } -} \ No newline at end of file diff --git a/pandora_console/include/swiftmailer/classes/Swift/DependencyContainer.php b/pandora_console/include/swiftmailer/classes/Swift/DependencyContainer.php deleted file mode 100644 index b6ba554e63..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/DependencyContainer.php +++ /dev/null @@ -1,349 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/DependencyException.php'; - -/** - * Dependency Injection container. - * @package Swift - * @author Chris Corbyn - */ -class Swift_DependencyContainer -{ - - /** Constant for literal value types */ - const TYPE_VALUE = 0x0001; - - /** Constant for new instance types */ - const TYPE_INSTANCE = 0x0010; - - /** Constant for shared instance types */ - const TYPE_SHARED = 0x0100; - - /** Constant for aliases */ - const TYPE_ALIAS = 0x1000; - - /** Singleton instance */ - private static $_instance = null; - - /** The data container */ - private $_store = array(); - - /** The current endpoint in the data container */ - private $_endPoint; - - /** - * Constructor should not be used. - * Use {@link getInstance()} instead. - */ - public function __construct() { } - - /** - * Returns a singleton of the DependencyContainer. - * @return Swift_DependencyContainer - */ - public static function getInstance() - { - if (!isset(self::$_instance)) - { - self::$_instance = new self(); - } - return self::$_instance; - } - - /** - * List the names of all items stored in the Container. - * @return array - */ - public function listItems() - { - return array_keys($this->_store); - } - - /** - * Test if an item is registered in this container with the given name. - * @param string $itemName - * @return boolean - * @see register() - */ - public function has($itemName) - { - return array_key_exists($itemName, $this->_store) - && isset($this->_store[$itemName]['lookupType']); - } - - /** - * Lookup the item with the given $itemName. - * @param string $itemName - * @return mixed - * @throws Swift_DependencyException If the dependency is not found - * @see register() - */ - public function lookup($itemName) - { - if (!$this->has($itemName)) - { - throw new Swift_DependencyException( - 'Cannot lookup dependency "' . $itemName . '" since it is not registered.' - ); - } - - switch ($this->_store[$itemName]['lookupType']) - { - case self::TYPE_ALIAS: - return $this->_createAlias($itemName); - case self::TYPE_VALUE: - return $this->_getValue($itemName); - case self::TYPE_INSTANCE: - return $this->_createNewInstance($itemName); - case self::TYPE_SHARED: - return $this->_createSharedInstance($itemName); - } - } - - /** - * Create an array of arguments passed to the constructor of $itemName. - * @param string $itemName - * @return array - */ - public function createDependenciesFor($itemName) - { - $args = array(); - if (isset($this->_store[$itemName]['args'])) - { - $args = $this->_resolveArgs($this->_store[$itemName]['args']); - } - return $args; - } - - /** - * Register a new dependency with $itemName. - * This method returns the current DependencyContainer instance because it - * requires the use of the fluid interface to set the specific details for the - * dependency. - * - * @param string $itemName - * @return Swift_DependencyContainer - * @see asNewInstanceOf(), asSharedInstanceOf(), asValue() - */ - public function register($itemName) - { - $this->_store[$itemName] = array(); - $this->_endPoint =& $this->_store[$itemName]; - return $this; - } - - /** - * Specify the previously registered item as a literal value. - * {@link register()} must be called before this will work. - * - * @param mixed $value - * @return Swift_DependencyContainer - */ - public function asValue($value) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_VALUE; - $endPoint['value'] = $value; - return $this; - } - - /** - * Specify the previously registered item as an alias of another item. - * @param string $lookup - * @return Swift_DependencyContainer - */ - public function asAliasOf($lookup) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_ALIAS; - $endPoint['ref'] = $lookup; - return $this; - } - - /** - * Specify the previously registered item as a new instance of $className. - * {@link register()} must be called before this will work. - * Any arguments can be set with {@link withDependencies()}, - * {@link addConstructorValue()} or {@link addConstructorLookup()}. - * - * @param string $className - * @return Swift_DependencyContainer - * @see withDependencies(), addConstructorValue(), addConstructorLookup() - */ - public function asNewInstanceOf($className) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_INSTANCE; - $endPoint['className'] = $className; - return $this; - } - - /** - * Specify the previously registered item as a shared instance of $className. - * {@link register()} must be called before this will work. - * @param string $className - * @return Swift_DependencyContainer - */ - public function asSharedInstanceOf($className) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['lookupType'] = self::TYPE_SHARED; - $endPoint['className'] = $className; - return $this; - } - - /** - * Specify a list of injected dependencies for the previously registered item. - * This method takes an array of lookup names. - * - * @param array $lookups - * @return Swift_DependencyContainer - * @see addConstructorValue(), addConstructorLookup() - */ - public function withDependencies(array $lookups) - { - $endPoint =& $this->_getEndPoint(); - $endPoint['args'] = array(); - foreach ($lookups as $lookup) - { - $this->addConstructorLookup($lookup); - } - return $this; - } - - /** - * Specify a literal (non looked up) value for the constructor of the - * previously registered item. - * - * @param mixed $value - * @return Swift_DependencyContainer - * @see withDependencies(), addConstructorLookup() - */ - public function addConstructorValue($value) - { - $endPoint =& $this->_getEndPoint(); - if (!isset($endPoint['args'])) - { - $endPoint['args'] = array(); - } - $endPoint['args'][] = array('type' => 'value', 'item' => $value); - return $this; - } - - /** - * Specify a dependency lookup for the constructor of the previously - * registered item. - * - * @param string $lookup - * @return Swift_DependencyContainer - * @see withDependencies(), addConstructorValue() - */ - public function addConstructorLookup($lookup) - { - $endPoint =& $this->_getEndPoint(); - if (!isset($this->_endPoint['args'])) - { - $endPoint['args'] = array(); - } - $endPoint['args'][] = array('type' => 'lookup', 'item' => $lookup); - return $this; - } - - // -- Private methods - - /** Get the literal value with $itemName */ - private function _getValue($itemName) - { - return $this->_store[$itemName]['value']; - } - - /** Resolve an alias to another item */ - private function _createAlias($itemName) - { - return $this->lookup($this->_store[$itemName]['ref']); - } - - /** Create a fresh instance of $itemName */ - private function _createNewInstance($itemName) - { - $reflector = new ReflectionClass($this->_store[$itemName]['className']); - if ($reflector->getConstructor()) - { - return $reflector->newInstanceArgs( - $this->createDependenciesFor($itemName) - ); - } - else - { - return $reflector->newInstance(); - } - } - - /** Create and register a shared instance of $itemName */ - private function _createSharedInstance($itemName) - { - if (!isset($this->_store[$itemName]['instance'])) - { - $this->_store[$itemName]['instance'] = $this->_createNewInstance($itemName); - } - return $this->_store[$itemName]['instance']; - } - - /** Get the current endpoint in the store */ - private function &_getEndPoint() - { - if (!isset($this->_endPoint)) - { - throw new BadMethodCallException( - 'Component must first be registered by calling register()' - ); - } - return $this->_endPoint; - } - - /** Get an argument list with dependencies resolved */ - private function _resolveArgs(array $args) - { - $resolved = array(); - foreach ($args as $argDefinition) - { - switch ($argDefinition['type']) - { - case 'lookup': - $resolved[] = $this->_lookupRecursive($argDefinition['item']); - break; - case 'value': - $resolved[] = $argDefinition['item']; - break; - } - } - return $resolved; - } - - /** Resolve a single dependency with an collections */ - private function _lookupRecursive($item) - { - if (is_array($item)) - { - $collection = array(); - foreach ($item as $k => $v) - { - $collection[$k] = $this->_lookupRecursive($v); - } - return $collection; - } - else - { - return $this->lookup($item); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/EmbeddedFile.php b/pandora_console/include/swiftmailer/classes/Swift/EmbeddedFile.php deleted file mode 100644 index 34d096c6cd..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/EmbeddedFile.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Attachment.php'; -//@require 'Swift/DependencyContainer.php'; -//@require 'Swift/ByteStream/FileByteStream.php'; - -/** - * An embedded file, in a multipart message. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_EmbeddedFile extends Swift_Mime_EmbeddedFile -{ - - /** - * Create a new EmbeddedFile. - * Details may be optionally provided to the constructor. - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - */ - public function __construct($data = null, $filename = null, - $contentType = null) - { - call_user_func_array( - array($this, 'Swift_Mime_EmbeddedFile::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('mime.embeddedfile') - ); - - $this->setBody($data); - $this->setFilename($filename); - if ($contentType) - { - $this->setContentType($contentType); - } - } - - /** - * Create a new EmbeddedFile. - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - * @return Swift_Mime_EmbeddedFile - */ - public static function newInstance($data = null, $filename = null, - $contentType = null) - { - return new self($data, $filename, $contentType); - } - - /** - * Create a new EmbeddedFile from a filesystem path. - * @param string $path - * @return Swift_Mime_EmbeddedFile - */ - public static function fromPath($path) - { - return self::newInstance()->setFile( - new Swift_ByteStream_FileByteStream($path) - ); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Encoder.php b/pandora_console/include/swiftmailer/classes/Swift/Encoder.php deleted file mode 100644 index 32aa96a004..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Encoder.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/CharsetObserver.php'; - -/** - * Interface for all Encoder schemes. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - */ -interface Swift_Encoder extends Swift_Mime_CharsetObserver -{ - - /** - * Encode a given string to produce an encoded string. - * @param string $string - * @param int $firstLineOffset if first line needs to be shorter - * @param int $maxLineLength - 0 indicates the default length for this encoding - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, - $maxLineLength = 0); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Encoder/Base64Encoder.php b/pandora_console/include/swiftmailer/classes/Swift/Encoder/Base64Encoder.php deleted file mode 100644 index 09c71baf42..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Encoder/Base64Encoder.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Encoder.php'; - -/** - * Handles Base 64 Encoding in Swift Mailer. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - */ -class Swift_Encoder_Base64Encoder implements Swift_Encoder -{ - - /** - * Takes an unencoded string and produces a Base64 encoded string from it. - * Base64 encoded strings have a maximum line length of 76 characters. - * If the first line needs to be shorter, indicate the difference with - * $firstLineOffset. - * @param string $string to encode - * @param int $firstLineOffset - * @param int $maxLineLength, optional, 0 indicates the default of 76 bytes - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, - $maxLineLength = 0) - { - if (0 >= $maxLineLength || 76 < $maxLineLength) - { - $maxLineLength = 76; - } - - $encodedString = base64_encode($string); - $firstLine = ''; - - if (0 != $firstLineOffset) - { - $firstLine = substr( - $encodedString, 0, $maxLineLength - $firstLineOffset - ) . "\r\n"; - $encodedString = substr( - $encodedString, $maxLineLength - $firstLineOffset - ); - } - - return $firstLine . trim(chunk_split($encodedString, $maxLineLength, "\r\n")); - } - - /** - * Does nothing. - */ - public function charsetChanged($charset) - { - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Encoder/QpEncoder.php b/pandora_console/include/swiftmailer/classes/Swift/Encoder/QpEncoder.php deleted file mode 100644 index 6914f6c4f7..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Encoder/QpEncoder.php +++ /dev/null @@ -1,263 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Encoder.php'; -//@require 'Swift/CharacterStream.php'; - -/** - * Handles Quoted Printable (QP) Encoding in Swift Mailer. - * Possibly the most accurate RFC 2045 QP implementation found in PHP. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - */ -class Swift_Encoder_QpEncoder implements Swift_Encoder -{ - - /** - * The CharacterStream used for reading characters (as opposed to bytes). - * @var Swift_CharacterStream - * @access protected - */ - protected $_charStream; - - /** - * A filter used if input should be canonicalized. - * @var Swift_StreamFilter - * @access protected - */ - protected $_filter; - - /** - * Pre-computed QP for HUGE optmization. - * @var string[] - * @access protected - */ - protected static $_qpMap = array( - 0 => '=00', 1 => '=01', 2 => '=02', 3 => '=03', 4 => '=04', - 5 => '=05', 6 => '=06', 7 => '=07', 8 => '=08', 9 => '=09', - 10 => '=0A', 11 => '=0B', 12 => '=0C', 13 => '=0D', 14 => '=0E', - 15 => '=0F', 16 => '=10', 17 => '=11', 18 => '=12', 19 => '=13', - 20 => '=14', 21 => '=15', 22 => '=16', 23 => '=17', 24 => '=18', - 25 => '=19', 26 => '=1A', 27 => '=1B', 28 => '=1C', 29 => '=1D', - 30 => '=1E', 31 => '=1F', 32 => '=20', 33 => '=21', 34 => '=22', - 35 => '=23', 36 => '=24', 37 => '=25', 38 => '=26', 39 => '=27', - 40 => '=28', 41 => '=29', 42 => '=2A', 43 => '=2B', 44 => '=2C', - 45 => '=2D', 46 => '=2E', 47 => '=2F', 48 => '=30', 49 => '=31', - 50 => '=32', 51 => '=33', 52 => '=34', 53 => '=35', 54 => '=36', - 55 => '=37', 56 => '=38', 57 => '=39', 58 => '=3A', 59 => '=3B', - 60 => '=3C', 61 => '=3D', 62 => '=3E', 63 => '=3F', 64 => '=40', - 65 => '=41', 66 => '=42', 67 => '=43', 68 => '=44', 69 => '=45', - 70 => '=46', 71 => '=47', 72 => '=48', 73 => '=49', 74 => '=4A', - 75 => '=4B', 76 => '=4C', 77 => '=4D', 78 => '=4E', 79 => '=4F', - 80 => '=50', 81 => '=51', 82 => '=52', 83 => '=53', 84 => '=54', - 85 => '=55', 86 => '=56', 87 => '=57', 88 => '=58', 89 => '=59', - 90 => '=5A', 91 => '=5B', 92 => '=5C', 93 => '=5D', 94 => '=5E', - 95 => '=5F', 96 => '=60', 97 => '=61', 98 => '=62', 99 => '=63', - 100 => '=64', 101 => '=65', 102 => '=66', 103 => '=67', 104 => '=68', - 105 => '=69', 106 => '=6A', 107 => '=6B', 108 => '=6C', 109 => '=6D', - 110 => '=6E', 111 => '=6F', 112 => '=70', 113 => '=71', 114 => '=72', - 115 => '=73', 116 => '=74', 117 => '=75', 118 => '=76', 119 => '=77', - 120 => '=78', 121 => '=79', 122 => '=7A', 123 => '=7B', 124 => '=7C', - 125 => '=7D', 126 => '=7E', 127 => '=7F', 128 => '=80', 129 => '=81', - 130 => '=82', 131 => '=83', 132 => '=84', 133 => '=85', 134 => '=86', - 135 => '=87', 136 => '=88', 137 => '=89', 138 => '=8A', 139 => '=8B', - 140 => '=8C', 141 => '=8D', 142 => '=8E', 143 => '=8F', 144 => '=90', - 145 => '=91', 146 => '=92', 147 => '=93', 148 => '=94', 149 => '=95', - 150 => '=96', 151 => '=97', 152 => '=98', 153 => '=99', 154 => '=9A', - 155 => '=9B', 156 => '=9C', 157 => '=9D', 158 => '=9E', 159 => '=9F', - 160 => '=A0', 161 => '=A1', 162 => '=A2', 163 => '=A3', 164 => '=A4', - 165 => '=A5', 166 => '=A6', 167 => '=A7', 168 => '=A8', 169 => '=A9', - 170 => '=AA', 171 => '=AB', 172 => '=AC', 173 => '=AD', 174 => '=AE', - 175 => '=AF', 176 => '=B0', 177 => '=B1', 178 => '=B2', 179 => '=B3', - 180 => '=B4', 181 => '=B5', 182 => '=B6', 183 => '=B7', 184 => '=B8', - 185 => '=B9', 186 => '=BA', 187 => '=BB', 188 => '=BC', 189 => '=BD', - 190 => '=BE', 191 => '=BF', 192 => '=C0', 193 => '=C1', 194 => '=C2', - 195 => '=C3', 196 => '=C4', 197 => '=C5', 198 => '=C6', 199 => '=C7', - 200 => '=C8', 201 => '=C9', 202 => '=CA', 203 => '=CB', 204 => '=CC', - 205 => '=CD', 206 => '=CE', 207 => '=CF', 208 => '=D0', 209 => '=D1', - 210 => '=D2', 211 => '=D3', 212 => '=D4', 213 => '=D5', 214 => '=D6', - 215 => '=D7', 216 => '=D8', 217 => '=D9', 218 => '=DA', 219 => '=DB', - 220 => '=DC', 221 => '=DD', 222 => '=DE', 223 => '=DF', 224 => '=E0', - 225 => '=E1', 226 => '=E2', 227 => '=E3', 228 => '=E4', 229 => '=E5', - 230 => '=E6', 231 => '=E7', 232 => '=E8', 233 => '=E9', 234 => '=EA', - 235 => '=EB', 236 => '=EC', 237 => '=ED', 238 => '=EE', 239 => '=EF', - 240 => '=F0', 241 => '=F1', 242 => '=F2', 243 => '=F3', 244 => '=F4', - 245 => '=F5', 246 => '=F6', 247 => '=F7', 248 => '=F8', 249 => '=F9', - 250 => '=FA', 251 => '=FB', 252 => '=FC', 253 => '=FD', 254 => '=FE', - 255 => '=FF' - ); - - /** - * A map of non-encoded ascii characters. - * @var string[] - * @access protected - */ - protected static $_safeMap = array(); - - /** - * Creates a new QpEncoder for the given CharacterStream. - * @param Swift_CharacterStream $charStream to use for reading characters - * @param Swift_StreamFilter $filter if input should be canonicalized - */ - public function __construct(Swift_CharacterStream $charStream, - Swift_StreamFilter $filter = null) - { - $this->_charStream = $charStream; - if (empty(self::$_safeMap)) - { - foreach (array_merge( - array(0x09, 0x20), range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) - { - self::$_safeMap[$byte] = chr($byte); - } - } - $this->_filter = $filter; - } - - /** - * Takes an unencoded string and produces a QP encoded string from it. - * QP encoded strings have a maximum line length of 76 characters. - * If the first line needs to be shorter, indicate the difference with - * $firstLineOffset. - * @param string $string to encode - * @param int $firstLineOffset, optional - * @param int $maxLineLength, optional, 0 indicates the default of 76 chars - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, - $maxLineLength = 0) - { - if ($maxLineLength > 76 || $maxLineLength <= 0) - { - $maxLineLength = 76; - } - - $thisLineLength = $maxLineLength - $firstLineOffset; - - $lines = array(); - $lNo = 0; - $lines[$lNo] = ''; - $currentLine =& $lines[$lNo++]; - $size=$lineLen=0; - - $this->_charStream->flushContents(); - $this->_charStream->importString($string); - - //Fetching more than 4 chars at one is slower, as is fetching fewer bytes - // Conveniently 4 chars is the UTF-8 safe number since UTF-8 has up to 6 - // bytes per char and (6 * 4 * 3 = 72 chars per line) * =NN is 3 bytes - while (false !== $bytes = $this->_nextSequence()) - { - //If we're filtering the input - if (isset($this->_filter)) - { - //If we can't filter because we need more bytes - while ($this->_filter->shouldBuffer($bytes)) - { - //Then collect bytes into the buffer - if (false === $moreBytes = $this->_nextSequence(1)) - { - break; - } - - foreach ($moreBytes as $b) - { - $bytes[] = $b; - } - } - //And filter them - $bytes = $this->_filter->filter($bytes); - } - - $enc = $this->_encodeByteSequence($bytes, $size); - if ($currentLine && $lineLen+$size >= $thisLineLength) - { - $lines[$lNo] = ''; - $currentLine =& $lines[$lNo++]; - $thisLineLength = $maxLineLength; - $lineLen=0; - } - $lineLen+=$size; - $currentLine .= $enc; - } - - return $this->_standardize(implode("=\r\n", $lines)); - } - - /** - * Updates the charset used. - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_charStream->setCharacterSet($charset); - } - - // -- Protected methods - - /** - * Encode the given byte array into a verbatim QP form. - * @param int[] $bytes - * @return string - * @access protected - */ - protected function _encodeByteSequence(array $bytes, &$size) - { - $ret = ''; - $size=0; - foreach ($bytes as $b) - { - if (isset(self::$_safeMap[$b])) - { - $ret .= self::$_safeMap[$b]; - ++$size; - } - else - { - $ret .= self::$_qpMap[$b]; - $size+=3; - } - } - return $ret; - } - - /** - * Get the next sequence of bytes to read from the char stream. - * @param int $size number of bytes to read - * @return int[] - * @access protected - */ - protected function _nextSequence($size = 4) - { - return $this->_charStream->readBytes($size); - } - - /** - * Make sure CRLF is correct and HT/SPACE are in valid places. - * @param string $string - * @return string - * @access protected - */ - protected function _standardize($string) - { - $string = str_replace(array("\t=0D=0A", " =0D=0A", "=0D=0A"), - array("=09\r\n", "=20\r\n", "\r\n"), $string - ); - switch ($end = ord(substr($string, -1))) - { - case 0x09: - case 0x20: - $string = substr_replace($string, self::$_qpMap[$end], -1); - } - return $string; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Encoder/Rfc2231Encoder.php b/pandora_console/include/swiftmailer/classes/Swift/Encoder/Rfc2231Encoder.php deleted file mode 100644 index febc6ba83d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Encoder/Rfc2231Encoder.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Encoder.php'; -//@require 'Swift/CharacterStream.php'; - -/** - * Handles RFC 2231 specified Encoding in Swift Mailer. - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - */ -class Swift_Encoder_Rfc2231Encoder implements Swift_Encoder -{ - - /** - * A character stream to use when reading a string as characters instead of bytes. - * @var Swift_CharacterStream - * @access private - */ - private $_charStream; - - /** - * Creates a new Rfc2231Encoder using the given character stream instance. - * @param Swift_CharacterStream - */ - public function __construct(Swift_CharacterStream $charStream) - { - $this->_charStream = $charStream; - } - - /** - * Takes an unencoded string and produces a string encoded according to - * RFC 2231 from it. - * @param string $string to encode - * @param int $firstLineOffset - * @param int $maxLineLength, optional, 0 indicates the default of 75 bytes - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, - $maxLineLength = 0) - { - $lines = array(); $lineCount = 0; - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - - if (0 >= $maxLineLength) - { - $maxLineLength = 75; - } - - $this->_charStream->flushContents(); - $this->_charStream->importString($string); - - $thisLineLength = $maxLineLength - $firstLineOffset; - - while (false !== $char = $this->_charStream->read(4)) - { - $encodedChar = rawurlencode($char); - if (0 != strlen($currentLine) - && strlen($currentLine . $encodedChar) > $thisLineLength) - { - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - $thisLineLength = $maxLineLength; - } - $currentLine .= $encodedChar; - } - - return implode("\r\n", $lines); - } - - /** - * Updates the charset used. - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_charStream->setCharacterSet($charset); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Encoding.php b/pandora_console/include/swiftmailer/classes/Swift/Encoding.php deleted file mode 100644 index 1849a8295b..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Encoding.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/DependencyContainer.php'; - -/** - * Provides quick access to each encoding type. - * - * @package Swift - * @subpackage Encoder - * @author Chris Corbyn - */ -class Swift_Encoding -{ - - /** - * Get the Encoder that provides 7-bit encoding. - * - * @return Swift_Mime_ContentEncoder - */ - public static function get7BitEncoding() - { - return self::_lookup('mime.7bitcontentencoder'); - } - - /** - * Get the Encoder that provides 8-bit encoding. - * - * @return Swift_Mime_ContentEncoder - */ - public static function get8BitEncoding() - { - return self::_lookup('mime.8bitcontentencoder'); - } - - /** - * Get the Encoder that provides Quoted-Printable (QP) encoding. - * - * @return Swift_Mime_ContentEncoder - */ - public static function getQpEncoding() - { - return self::_lookup('mime.qpcontentencoder'); - } - - /** - * Get the Encoder that provides Base64 encoding. - * - * @return Swift_Mime_ContentEncoder - */ - public static function getBase64Encoding() - { - return self::_lookup('mime.base64contentencoder'); - } - - // -- Private Static Methods - - private static function _lookup($key) - { - return Swift_DependencyContainer::getInstance()->lookup($key); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/CommandEvent.php b/pandora_console/include/swiftmailer/classes/Swift/Events/CommandEvent.php deleted file mode 100644 index 73eb5850f0..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/CommandEvent.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventObject.php'; -//@require 'Swift/Transport.php'; - -/** - * Generated when a command is sent over an SMTP connection. - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -class Swift_Events_CommandEvent extends Swift_Events_EventObject -{ - - /** - * The command sent to the server. - * @var string - */ - private $_command; - - /** - * An array of codes which a successful response will contain. - * @var int[] - */ - private $_successCodes = array(); - - /** - * Create a new CommandEvent for $source with $command. - * @param Swift_Transport $source - * @param string $command - * @param array $successCodes - */ - public function __construct(Swift_Transport $source, - $command, $successCodes = array()) - { - parent::__construct($source); - $this->_command = $command; - $this->_successCodes = $successCodes; - } - - /** - * Get the command which was sent to the server. - * @return string - */ - public function getCommand() - { - return $this->_command; - } - - /** - * Get the numeric response codes which indicate success for this command. - * @return int[] - */ - public function getSuccessCodes() - { - return $this->_successCodes; - } - -} \ No newline at end of file diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/Event.php b/pandora_console/include/swiftmailer/classes/Swift/Events/Event.php deleted file mode 100644 index c6726a75f2..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/Event.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * The minimum interface for an Event. - * - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -interface Swift_Events_Event -{ - - /** - * Get the source object of this event. - * @return object - */ - public function getSource(); - - /** - * Prevent this Event from bubbling any further up the stack. - * @param boolean $cancel, optional - */ - public function cancelBubble($cancel = true); - - /** - * Returns true if this Event will not bubble any further up the stack. - * @return boolean - */ - public function bubbleCancelled(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/EventDispatcher.php b/pandora_console/include/swiftmailer/classes/Swift/Events/EventDispatcher.php deleted file mode 100644 index aaf12117e5..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/EventDispatcher.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventListener.php'; -//@require 'Swift/Event.php'; - -/** - * Interface for the EventDispatcher which handles the event dispatching layer. - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -interface Swift_Events_EventDispatcher -{ - - /** - * Create a new SendEvent for $source and $message. - * @param Swift_Transport $source - * @param Swift_Mime_Message - * @return Swift_Events_SendEvent - */ - public function createSendEvent(Swift_Transport $source, - Swift_Mime_Message $message); - - /** - * Create a new CommandEvent for $source and $command. - * @param Swift_Transport $source - * @param string $command That will be executed - * @param array $successCodes That are needed - * @return Swift_Events_CommandEvent - */ - public function createCommandEvent(Swift_Transport $source, - $command, $successCodes = array()); - - /** - * Create a new ResponseEvent for $source and $response. - * @param Swift_Transport $source - * @param string $response - * @param boolean $valid If the response is valid - * @return Swift_Events_ResponseEvent - */ - public function createResponseEvent(Swift_Transport $source, - $response, $valid); - - /** - * Create a new TransportChangeEvent for $source. - * @param Swift_Transport $source - * @return Swift_Events_TransportChangeEvent - */ - public function createTransportChangeEvent(Swift_Transport $source); - - /** - * Create a new TransportExceptionEvent for $source. - * @param Swift_Transport $source - * @param Swift_TransportException $ex - * @return Swift_Events_TransportExceptionEvent - */ - public function createTransportExceptionEvent(Swift_Transport $source, - Swift_TransportException $ex); - - /** - * Bind an event listener to this dispatcher. - * @param Swift_Events_EventListener $listener - */ - public function bindEventListener(Swift_Events_EventListener $listener); - - /** - * Dispatch the given Event to all suitable listeners. - * @param Swift_Events_EventObject $evt - * @param string $target method - */ - public function dispatchEvent(Swift_Events_EventObject $evt, $target); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/EventObject.php b/pandora_console/include/swiftmailer/classes/Swift/Events/EventObject.php deleted file mode 100644 index 5d494fe898..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/EventObject.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/Event.php'; - -/** - * A base Event which all Event classes inherit from. - * - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -class Swift_Events_EventObject implements Swift_Events_Event -{ - - /** The source of this Event */ - private $_source; - - /** The state of this Event (should it bubble up the stack?) */ - private $_bubbleCancelled = false; - - /** - * Create a new EventObject originating at $source. - * @param object $source - */ - public function __construct($source) - { - $this->_source = $source; - } - - /** - * Get the source object of this event. - * @return object - */ - public function getSource() - { - return $this->_source; - } - - /** - * Prevent this Event from bubbling any further up the stack. - * @param boolean $cancel, optional - */ - public function cancelBubble($cancel = true) - { - $this->_bubbleCancelled = $cancel; - } - - /** - * Returns true if this Event will not bubble any further up the stack. - * @return boolean - */ - public function bubbleCancelled() - { - return $this->_bubbleCancelled; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/ResponseEvent.php b/pandora_console/include/swiftmailer/classes/Swift/Events/ResponseEvent.php deleted file mode 100644 index addf9e7a8a..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/ResponseEvent.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventObject.php'; - -/** - * Generated when a response is received on a SMTP connection. - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -class Swift_Events_ResponseEvent extends Swift_Events_EventObject -{ - - /** - * The overall result. - * @var boolean - */ - private $_valid; - - /** - * The response received from the server. - * @var string - */ - private $_response; - - /** - * Create a new ResponseEvent for $source and $response. - * @param Swift_Transport $source - * @param string $response - * @param boolean $valid - */ - public function __construct(Swift_Transport $source, $response, $valid = false) - { - parent::__construct($source); - $this->_response = $response; - $this->_valid = $valid; - } - - /** - * Get the response which was received from the server. - * @return string - */ - public function getResponse() - { - return $this->_response; - } - - /** - * Get the success status of this Event. - * @return boolean - */ - public function isValid() - { - return $this->_valid; - } - -} \ No newline at end of file diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/SendEvent.php b/pandora_console/include/swiftmailer/classes/Swift/Events/SendEvent.php deleted file mode 100644 index 49a8351355..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/SendEvent.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventObject.php'; - -/** - * Generated when a message is being sent. - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -class Swift_Events_SendEvent extends Swift_Events_EventObject -{ - - /** Sending has yet to occur */ - const RESULT_PENDING = 0x0001; - - /** Sending was successful */ - const RESULT_SUCCESS = 0x0010; - - /** Sending worked, but there were some failures */ - const RESULT_TENTATIVE = 0x0100; - - /** Sending failed */ - const RESULT_FAILED = 0x1000; - - /** - * The Message being sent. - * @var Swift_Mime_Message - */ - private $_message; - - /** - * The Transport used in sending. - * @var Swift_Transport - */ - private $_transport; - - /** - * Any recipients which failed after sending. - * @var string[] - */ - private $failedRecipients = array(); - - /** - * The overall result as a bitmask from the class constants. - * @var int - */ - private $result; - - /** - * Create a new SendEvent for $source and $message. - * @param Swift_Transport $source - * @param Swift_Mime_Message $message - */ - public function __construct(Swift_Transport $source, - Swift_Mime_Message $message) - { - parent::__construct($source); - $this->_message = $message; - $this->_result = self::RESULT_PENDING; - } - - /** - * Get the Transport used to send the Message. - * @return Swift_Transport - */ - public function getTransport() - { - return $this->getSource(); - } - - /** - * Get the Message being sent. - * @return Swift_Mime_Message - */ - public function getMessage() - { - return $this->_message; - } - - /** - * Set the array of addresses that failed in sending. - * @param array $recipients - */ - public function setFailedRecipients($recipients) - { - $this->_failedRecipients = $recipients; - } - - /** - * Get an recipient addresses which were not accepted for delivery. - * @return string[] - */ - public function getFailedRecipients() - { - return $this->_failedRecipients; - } - - /** - * Set the result of sending. - * @return int - */ - public function setResult($result) - { - $this->_result = $result; - } - - /** - * Get the result of this Event. - * The return value is a bitmask from - * {@link RESULT_PENDING, RESULT_SUCCESS, RESULT_TENTATIVE, RESULT_FAILED} - * @return int - */ - public function getResult() - { - return $this->_result; - } - -} \ No newline at end of file diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/SendListener.php b/pandora_console/include/swiftmailer/classes/Swift/Events/SendListener.php deleted file mode 100644 index a8f0cc33d4..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/SendListener.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventListener.php'; -//@require 'Swift/Events/SendEvent.php'; - -/** - * Listens for Messages being sent from within the Transport system. - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -interface Swift_Events_SendListener extends Swift_Events_EventListener -{ - - /** - * Invoked immediately before the Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt); - - /** - * Invoked immediately after the Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/SimpleEventDispatcher.php b/pandora_console/include/swiftmailer/classes/Swift/Events/SimpleEventDispatcher.php deleted file mode 100644 index 3e6c0beb3d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/SimpleEventDispatcher.php +++ /dev/null @@ -1,175 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventDispatcher.php'; -//@require 'Swift/Events/EventListener.php'; -//@require 'Swift/Events/EventObject.php'; -//@require 'Swift/Events/CommandEvent.php'; -//@require 'Swift/Events/ResponseEvent.php'; -//@require 'Swift/Events/SendEvent.php'; -//@require 'Swift/Events/TransportChangeEvent.php'; -//@require 'Swift/Events/TransportExceptionEvent.php'; - -/** - * The EventDispatcher which handles the event dispatching layer. - * - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -class Swift_Events_SimpleEventDispatcher implements Swift_Events_EventDispatcher -{ - - /** A map of event types to their associated listener types */ - private $_eventMap = array(); - - /** Event listeners bound to this dispatcher */ - private $_listeners = array(); - - /** Listeners queued to have an Event bubbled up the stack to them */ - private $_bubbleQueue = array(); - - /** - * Create a new EventDispatcher. - */ - public function __construct() - { - $this->_eventMap = array( - 'Swift_Events_CommandEvent' => 'Swift_Events_CommandListener', - 'Swift_Events_ResponseEvent' => 'Swift_Events_ResponseListener', - 'Swift_Events_SendEvent' => 'Swift_Events_SendListener', - 'Swift_Events_TransportChangeEvent' => 'Swift_Events_TransportChangeListener', - 'Swift_Events_TransportExceptionEvent' => 'Swift_Events_TransportExceptionListener' - ); - } - - /** - * Create a new SendEvent for $source and $message. - * - * @param Swift_Transport $source - * @param Swift_Mime_Message - * @return Swift_Events_SendEvent - */ - public function createSendEvent(Swift_Transport $source, - Swift_Mime_Message $message) - { - return new Swift_Events_SendEvent($source, $message); - } - - /** - * Create a new CommandEvent for $source and $command. - * - * @param Swift_Transport $source - * @param string $command That will be executed - * @param array $successCodes That are needed - * @return Swift_Events_CommandEvent - */ - public function createCommandEvent(Swift_Transport $source, - $command, $successCodes = array()) - { - return new Swift_Events_CommandEvent($source, $command, $successCodes); - } - - /** - * Create a new ResponseEvent for $source and $response. - * - * @param Swift_Transport $source - * @param string $response - * @param boolean $valid If the response is valid - * @return Swift_Events_ResponseEvent - */ - public function createResponseEvent(Swift_Transport $source, - $response, $valid) - { - return new Swift_Events_ResponseEvent($source, $response, $valid); - } - - /** - * Create a new TransportChangeEvent for $source. - * - * @param Swift_Transport $source - * @return Swift_Events_TransportChangeEvent - */ - public function createTransportChangeEvent(Swift_Transport $source) - { - return new Swift_Events_TransportChangeEvent($source); - } - - /** - * Create a new TransportExceptionEvent for $source. - * - * @param Swift_Transport $source - * @param Swift_TransportException $ex - * @return Swift_Events_TransportExceptionEvent - */ - public function createTransportExceptionEvent(Swift_Transport $source, - Swift_TransportException $ex) - { - return new Swift_Events_TransportExceptionEvent($source, $ex); - } - - /** - * Bind an event listener to this dispatcher. - * - * @param Swift_Events_EventListener $listener - */ - public function bindEventListener(Swift_Events_EventListener $listener) - { - foreach ($this->_listeners as $l) - { - //Already loaded - if ($l === $listener) - { - return; - } - } - $this->_listeners[] = $listener; - } - - /** - * Dispatch the given Event to all suitable listeners. - * - * @param Swift_Events_EventObject $evt - * @param string $target method - */ - public function dispatchEvent(Swift_Events_EventObject $evt, $target) - { - $this->_prepareBubbleQueue($evt); - $this->_bubble($evt, $target); - } - - // -- Private methods - - /** Queue listeners on a stack ready for $evt to be bubbled up it */ - private function _prepareBubbleQueue(Swift_Events_EventObject $evt) - { - $this->_bubbleQueue = array(); - $evtClass = get_class($evt); - foreach ($this->_listeners as $listener) - { - if (array_key_exists($evtClass, $this->_eventMap) - && ($listener instanceof $this->_eventMap[$evtClass])) - { - $this->_bubbleQueue[] = $listener; - } - } - } - - /** Bubble $evt up the stack calling $target() on each listener */ - private function _bubble(Swift_Events_EventObject $evt, $target) - { - if (!$evt->bubbleCancelled() && $listener = array_shift($this->_bubbleQueue)) - { - $listener->$target($evt); - $this->_bubble($evt, $target); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/TransportChangeListener.php b/pandora_console/include/swiftmailer/classes/Swift/Events/TransportChangeListener.php deleted file mode 100644 index ba729d010c..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/TransportChangeListener.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventListener.php'; -//@require 'Swift/Events/TransportChangeEvent.php'; - -/** - * Listens for changes within the Transport system. - * - * @package Swift - * @subpackage Events - * - * @author Chris Corbyn - */ -interface Swift_Events_TransportChangeListener extends Swift_Events_EventListener -{ - - /** - * Invoked just before a Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt); - - /** - * Invoked immediately after the Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function transportStarted(Swift_Events_TransportChangeEvent $evt); - - /** - * Invoked just before a Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt); - - /** - * Invoked immediately after the Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function transportStopped(Swift_Events_TransportChangeEvent $evt); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/TransportExceptionEvent.php b/pandora_console/include/swiftmailer/classes/Swift/Events/TransportExceptionEvent.php deleted file mode 100644 index a1bf7d2784..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/TransportExceptionEvent.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventObject.php'; -//@require 'Swift/TransportException.php'; - -/** - * Generated when a TransportException is thrown from the Transport system. - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -class Swift_Events_TransportExceptionEvent extends Swift_Events_EventObject -{ - - /** - * The Exception thrown. - * @var Swift_TransportException - */ - private $_exception; - - /** - * Create a new TransportExceptionEvent for $transport. - * @param Swift_Transport $transport - * @param Swift_TransportException $ex - */ - public function __construct(Swift_Transport $transport, - Swift_TransportException $ex) - { - parent::__construct($transport); - $this->_exception = $ex; - } - - /** - * Get the TransportException thrown. - * @return Swift_TransportException - */ - public function getException() - { - return $this->_exception; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Events/TransportExceptionListener.php b/pandora_console/include/swiftmailer/classes/Swift/Events/TransportExceptionListener.php deleted file mode 100644 index d6dce94f5c..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Events/TransportExceptionListener.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/EventListener.php'; -//@require 'Swift/Events/TransportExceptionEvent.php'; - -/** - * Listens for Exceptions thrown from within the Transport system. - * @package Swift - * @subpackage Events - * @author Chris Corbyn - */ -interface Swift_Events_TransportExceptionListener - extends Swift_Events_EventListener -{ - - /** - * Invoked as a TransportException is thrown in the Transport system. - * @param Swift_Events_TransportExceptionEvent $evt - */ - public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/FailoverTransport.php b/pandora_console/include/swiftmailer/classes/Swift/FailoverTransport.php deleted file mode 100644 index 6e6b7a8bd7..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/FailoverTransport.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/FailoverTransport.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * Contains a list of redundant Transports so when one fails, the next is used. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_FailoverTransport extends Swift_Transport_FailoverTransport -{ - - /** - * Creates a new FailoverTransport with $transports. - * @param array $transports - */ - public function __construct($transports = array()) - { - call_user_func_array( - array($this, 'Swift_Transport_FailoverTransport::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('transport.failover') - ); - - $this->setTransports($transports); - } - - /** - * Create a new FailoverTransport instance. - * @param string $transports - * @return Swift_FailoverTransport - */ - public static function newInstance($transports = array()) - { - return new self($transports); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Filterable.php b/pandora_console/include/swiftmailer/classes/Swift/Filterable.php deleted file mode 100644 index c0479671c5..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Filterable.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/StreamFilter.php'; - -/** - * Allows StreamFilters to operate on a stream. - * @package Swift - * @author Chris Corbyn - */ -interface Swift_Filterable -{ - - /** - * Add a new StreamFilter, referenced by $key. - * @param Swift_StreamFilter $filter - * @param string $key - */ - public function addFilter(Swift_StreamFilter $filter, $key); - - /** - * Remove an existing filter using $key. - * @param string $key - */ - public function removeFilter($key); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Image.php b/pandora_console/include/swiftmailer/classes/Swift/Image.php deleted file mode 100644 index c161d7a620..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Image.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Image.php'; -//@require 'Swift/ByteStream/FileByteStream.php'; - -/** - * An image, embedded in a multipart message. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Image extends Swift_EmbeddedFile -{ - - /** - * Create a new EmbeddedFile. - * Details may be optionally provided to the constructor. - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - */ - public function __construct($data = null, $filename = null, - $contentType = null) - { - parent::__construct($data, $filename, $contentType); - } - - /** - * Create a new Image. - * @param string|Swift_OutputByteStream $data - * @param string $filename - * @param string $contentType - * @return Swift_Mime_EmbeddedFile - */ - public static function newInstance($data = null, $filename = null, - $contentType = null) - { - return new self($data, $filename, $contentType); - } - - /** - * Create a new Image from a filesystem path. - * @param string $path - * @return Swift_Mime_EmbeddedFile - */ - public static function fromPath($path) - { - $image = self::newInstance()->setFile( - new Swift_ByteStream_FileByteStream($path) - ); - return $image; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/InputByteStream.php b/pandora_console/include/swiftmailer/classes/Swift/InputByteStream.php deleted file mode 100644 index e8f45f4a3f..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/InputByteStream.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * An abstract means of writing data. - * Classes implementing this interface may use a subsystem which requires less - * memory than working with large strings of data. - * @package Swift - * @subpackage ByteStream - * @author Chris Corbyn - */ -interface Swift_InputByteStream -{ - - /** - * Writes $bytes to the end of the stream. - * - * Writing may not happen immediately if the stream chooses to buffer. If - * you want to write these bytes with immediate effect, call {@link commit()} - * after calling write(). - * - * This method returns the sequence ID of the write (i.e. 1 for first, 2 for - * second, etc etc). - * - * @param string $bytes - * @return int - * @throws Swift_IoException - */ - public function write($bytes); - - /** - * For any bytes that are currently buffered inside the stream, force them - * off the buffer. - * - * @throws Swift_IoException - */ - public function commit(); - - /** - * Attach $is to this stream. - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is); - - /** - * Remove an already bound stream. - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is); - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - * @throws Swift_IoException - */ - public function flushBuffers(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/KeyCache.php b/pandora_console/include/swiftmailer/classes/Swift/KeyCache.php deleted file mode 100644 index b942663a52..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/KeyCache.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStream.php'; - -/** - * Provides a mechanism for storing data using two keys. - * @package Swift - * @subpackage KeyCache - * @author Chris Corbyn - */ -interface Swift_KeyCache -{ - - /** Mode for replacing existing cached data */ - const MODE_WRITE = 1; - - /** Mode for appending data to the end of existing cached data */ - const MODE_APPEND = 2; - - /** - * Set a string into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param string $string - * @param int $mode - * @see MODE_WRITE, MODE_APPEND - */ - public function setString($nsKey, $itemKey, $string, $mode); - - /** - * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param Swift_OutputByteStream $os - * @param int $mode - * @see MODE_WRITE, MODE_APPEND - */ - public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, - $mode); - - /** - * Provides a ByteStream which when written to, writes data to $itemKey. - * NOTE: The stream will always write in append mode. - * If the optional third parameter is passed all writes will go through $is. - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is, optional - * @return Swift_InputByteStream - */ - public function getInputByteStream($nsKey, $itemKey, - Swift_InputByteStream $is = null); - - /** - * Get data back out of the cache as a string. - * @param string $nsKey - * @param string $itemKey - * @return string - */ - public function getString($nsKey, $itemKey); - - /** - * Get data back out of the cache as a ByteStream. - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is to write the data to - */ - public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is); - - /** - * Check if the given $itemKey exists in the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @return boolean - */ - public function hasKey($nsKey, $itemKey); - - /** - * Clear data for $itemKey in the namespace $nsKey if it exists. - * @param string $nsKey - * @param string $itemKey - */ - public function clearKey($nsKey, $itemKey); - - /** - * Clear all data in the namespace $nsKey if it exists. - * @param string $nsKey - */ - public function clearAll($nsKey); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/ArrayKeyCache.php b/pandora_console/include/swiftmailer/classes/Swift/KeyCache/ArrayKeyCache.php deleted file mode 100644 index fe3b7c9921..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/ArrayKeyCache.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/KeyCache.php'; -//@require 'Swift/KeyCacheInputStream.php'; -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStrean.php'; -//@require 'Swift/SwiftException.php'; - -/** - * A basic KeyCache backed by an array. - * @package Swift - * @subpackage KeyCache - * @author Chris Corbyn - */ -class Swift_KeyCache_ArrayKeyCache implements Swift_KeyCache -{ - - /** - * Cache contents. - * @var array - * @access private - */ - private $_contents = array(); - - /** - * An InputStream for cloning. - * @var Swift_KeyCache_KeyCacheInputStream - * @access private - */ - private $_stream; - - /** - * Create a new ArrayKeyCache with the given $stream for cloning to make - * InputByteStreams. - * @param Swift_KeyCache_KeyCacheInputStream $stream - */ - public function __construct(Swift_KeyCache_KeyCacheInputStream $stream) - { - $this->_stream = $stream; - } - - /** - * Set a string into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param string $string - * @param int $mode - * @see MODE_WRITE, MODE_APPEND - */ - public function setString($nsKey, $itemKey, $string, $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) - { - case self::MODE_WRITE: - $this->_contents[$nsKey][$itemKey] = $string; - break; - case self::MODE_APPEND: - if (!$this->hasKey($nsKey, $itemKey)) - { - $this->_contents[$nsKey][$itemKey] = ''; - } - $this->_contents[$nsKey][$itemKey] .= $string; - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - } - } - - /** - * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param Swift_OutputByteStream $os - * @param int $mode - * @see MODE_WRITE, MODE_APPEND - */ - public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, - $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) - { - case self::MODE_WRITE: - $this->clearKey($nsKey, $itemKey); - case self::MODE_APPEND: - if (!$this->hasKey($nsKey, $itemKey)) - { - $this->_contents[$nsKey][$itemKey] = ''; - } - while (false !== $bytes = $os->read(8192)) - { - $this->_contents[$nsKey][$itemKey] .= $bytes; - } - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - } - } - - /** - * Provides a ByteStream which when written to, writes data to $itemKey. - * NOTE: The stream will always write in append mode. - * @param string $nsKey - * @param string $itemKey - * @return Swift_InputByteStream - */ - public function getInputByteStream($nsKey, $itemKey, - Swift_InputByteStream $writeThrough = null) - { - $is = clone $this->_stream; - $is->setKeyCache($this); - $is->setNsKey($nsKey); - $is->setItemKey($itemKey); - if (isset($writeThrough)) - { - $is->setWriteThroughStream($writeThrough); - } - return $is; - } - - /** - * Get data back out of the cache as a string. - * @param string $nsKey - * @param string $itemKey - * @return string - */ - public function getString($nsKey, $itemKey) - { - $this->_prepareCache($nsKey); - if ($this->hasKey($nsKey, $itemKey)) - { - return $this->_contents[$nsKey][$itemKey]; - } - } - - /** - * Get data back out of the cache as a ByteStream. - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is to write the data to - */ - public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) - { - $this->_prepareCache($nsKey); - $is->write($this->getString($nsKey, $itemKey)); - } - - /** - * Check if the given $itemKey exists in the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @return boolean - */ - public function hasKey($nsKey, $itemKey) - { - $this->_prepareCache($nsKey); - return array_key_exists($itemKey, $this->_contents[$nsKey]); - } - - /** - * Clear data for $itemKey in the namespace $nsKey if it exists. - * @param string $nsKey - * @param string $itemKey - */ - public function clearKey($nsKey, $itemKey) - { - unset($this->_contents[$nsKey][$itemKey]); - } - - /** - * Clear all data in the namespace $nsKey if it exists. - * @param string $nsKey - */ - public function clearAll($nsKey) - { - unset($this->_contents[$nsKey]); - } - - // -- Private methods - - /** - * Initialize the namespace of $nsKey if needed. - * @param string $nsKey - * @access private - */ - private function _prepareCache($nsKey) - { - if (!array_key_exists($nsKey, $this->_contents)) - { - $this->_contents[$nsKey] = array(); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php b/pandora_console/include/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php deleted file mode 100644 index 599fd6c7c8..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php +++ /dev/null @@ -1,316 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/KeyCache.php'; -//@require 'Swift/KeyCacheInputStream.php'; -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStrean.php'; -//@require 'Swift/SwiftException.php'; -//@require 'Swift/IoException.php'; - -/** - * A KeyCache which streams to and from disk. - * @package Swift - * @subpackage KeyCache - * @author Chris Corbyn - */ -class Swift_KeyCache_DiskKeyCache implements Swift_KeyCache -{ - - /** Signal to place pointer at start of file */ - const POSITION_START = 0; - - /** Signal to place pointer at end of file */ - const POSITION_END = 1; - - /** - * An InputStream for cloning. - * @var Swift_KeyCache_KeyCacheInputStream - * @access private - */ - private $_stream; - - /** - * A path to write to. - * @var string - * @access private - */ - private $_path; - - /** - * Stored keys. - * @var array - * @access private - */ - private $_keys = array(); - - /** - * Will be true if magic_quotes_runtime is turned on. - * @var boolean - * @access private - */ - private $_quotes = false; - - /** - * Create a new DiskKeyCache with the given $stream for cloning to make - * InputByteStreams, and the given $path to save to. - * @param Swift_KeyCache_KeyCacheInputStream $stream - * @param string $path to save to - */ - public function __construct(Swift_KeyCache_KeyCacheInputStream $stream, $path) - { - $this->_stream = $stream; - $this->_path = $path; - $this->_quotes = get_magic_quotes_runtime(); - } - - /** - * Set a string into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param string $string - * @param int $mode - * @throws Swift_IoException - * @see MODE_WRITE, MODE_APPEND - */ - public function setString($nsKey, $itemKey, $string, $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) - { - case self::MODE_WRITE: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - break; - case self::MODE_APPEND: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - break; - } - fwrite($fp, $string); - } - - /** - * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param Swift_OutputByteStream $os - * @param int $mode - * @see MODE_WRITE, MODE_APPEND - * @throws Swift_IoException - */ - public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, - $mode) - { - $this->_prepareCache($nsKey); - switch ($mode) - { - case self::MODE_WRITE: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - break; - case self::MODE_APPEND: - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); - break; - default: - throw new Swift_SwiftException( - 'Invalid mode [' . $mode . '] used to set nsKey='. - $nsKey . ', itemKey=' . $itemKey - ); - break; - } - while (false !== $bytes = $os->read(8192)) - { - fwrite($fp, $bytes); - } - } - - /** - * Provides a ByteStream which when written to, writes data to $itemKey. - * NOTE: The stream will always write in append mode. - * @param string $nsKey - * @param string $itemKey - * @return Swift_InputByteStream - */ - public function getInputByteStream($nsKey, $itemKey, - Swift_InputByteStream $writeThrough = null) - { - $is = clone $this->_stream; - $is->setKeyCache($this); - $is->setNsKey($nsKey); - $is->setItemKey($itemKey); - if (isset($writeThrough)) - { - $is->setWriteThroughStream($writeThrough); - } - return $is; - } - - /** - * Get data back out of the cache as a string. - * @param string $nsKey - * @param string $itemKey - * @return string - * @throws Swift_IoException - */ - public function getString($nsKey, $itemKey) - { - $this->_prepareCache($nsKey); - if ($this->hasKey($nsKey, $itemKey)) - { - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - if ($this->_quotes) - { - set_magic_quotes_runtime(0); - } - $str = ''; - while (!feof($fp) && false !== $bytes = fread($fp, 8192)) - { - $str .= $bytes; - } - if ($this->_quotes) - { - set_magic_quotes_runtime(1); - } - return $str; - } - } - - /** - * Get data back out of the cache as a ByteStream. - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is to write the data to - */ - public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) - { - if ($this->hasKey($nsKey, $itemKey)) - { - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START); - if ($this->_quotes) - { - set_magic_quotes_runtime(0); - } - while (!feof($fp) && false !== $bytes = fread($fp, 8192)) - { - $is->write($bytes); - } - if ($this->_quotes) - { - set_magic_quotes_runtime(1); - } - } - } - - /** - * Check if the given $itemKey exists in the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @return boolean - */ - public function hasKey($nsKey, $itemKey) - { - return is_file($this->_path . '/' . $nsKey . '/' . $itemKey); - } - - /** - * Clear data for $itemKey in the namespace $nsKey if it exists. - * @param string $nsKey - * @param string $itemKey - */ - public function clearKey($nsKey, $itemKey) - { - if ($this->hasKey($nsKey, $itemKey)) - { - $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END); - fclose($fp); - unlink($this->_path . '/' . $nsKey . '/' . $itemKey); - } - unset($this->_keys[$nsKey][$itemKey]); - } - - /** - * Clear all data in the namespace $nsKey if it exists. - * @param string $nsKey - */ - public function clearAll($nsKey) - { - if (array_key_exists($nsKey, $this->_keys)) - { - foreach ($this->_keys[$nsKey] as $itemKey=>$null) - { - $this->clearKey($nsKey, $itemKey); - } - rmdir($this->_path . '/' . $nsKey); - unset($this->_keys[$nsKey]); - } - } - - // -- Private methods - - /** - * Initialize the namespace of $nsKey if needed. - * @param string $nsKey - * @access private - */ - private function _prepareCache($nsKey) - { - $cacheDir = $this->_path . '/' . $nsKey; - if (!is_dir($cacheDir)) - { - if (!mkdir($cacheDir)) - { - throw new Swift_IoException('Failed to create cache directory ' . $cacheDir); - } - $this->_keys[$nsKey] = array(); - } - } - - /** - * Get a file handle on the cache item. - * @param string $nsKey - * @param string $itemKey - * @param int $position - * @return resource - * @access private - */ - private function _getHandle($nsKey, $itemKey, $position) - { - if (!isset($this->_keys[$nsKey]) || !array_key_exists($itemKey, $this->_keys[$nsKey])) - { - $fp = fopen($this->_path . '/' . $nsKey . '/' . $itemKey, 'w+b'); - $this->_keys[$nsKey][$itemKey] = $fp; - } - if (self::POSITION_START == $position) - { - fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_SET); - } - else - { - fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_END); - } - return $this->_keys[$nsKey][$itemKey]; - } - - /** - * Destructor. - */ - public function __destruct() - { - foreach ($this->_keys as $nsKey=>$null) - { - $this->clearAll($nsKey); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/KeyCacheInputStream.php b/pandora_console/include/swiftmailer/classes/Swift/KeyCache/KeyCacheInputStream.php deleted file mode 100644 index a1f4440c15..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/KeyCacheInputStream.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/KeyCache.php'; -//@require 'Swift/InputByteStream.php'; - -/** - * Writes data to a KeyCache using a stream. - * @package Swift - * @subpackage KeyCache - * @author Chris Corbyn - */ -interface Swift_KeyCache_KeyCacheInputStream extends Swift_InputByteStream -{ - - /** - * Set the KeyCache to wrap. - * @param Swift_KeyCache $keyCache - */ - public function setKeyCache(Swift_KeyCache $keyCache); - - /** - * Set the nsKey which will be written to. - * @param string $nsKey - */ - public function setNsKey($nsKey); - - /** - * Set the itemKey which will be written to. - * @param string $itemKey - */ - public function setItemKey($itemKey); - - /** - * Specify a stream to write through for each write(). - * @param Swift_InputByteStream $is - */ - public function setWriteThroughStream(Swift_InputByteStream $is); - - /** - * Any implementation should be cloneable, allowing the clone to access a - * separate $nsKey and $itemKey. - */ - public function __clone(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/NullKeyCache.php b/pandora_console/include/swiftmailer/classes/Swift/KeyCache/NullKeyCache.php deleted file mode 100644 index 2646522e71..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/NullKeyCache.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/KeyCache.php'; -//@require 'Swift/KeyCacheInputStream.php'; -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStrean.php'; - -/** - * A null KeyCache that does not cache at all. - * @package Swift - * @subpackage KeyCache - * @author Chris Corbyn - */ -class Swift_KeyCache_NullKeyCache implements Swift_KeyCache -{ - - /** - * Set a string into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param string $string - * @param int $mode - * @see MODE_WRITE, MODE_APPEND - */ - public function setString($nsKey, $itemKey, $string, $mode) - { - } - - /** - * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @param Swift_OutputByteStream $os - * @param int $mode - * @see MODE_WRITE, MODE_APPEND - */ - public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, - $mode) - { - } - - /** - * Provides a ByteStream which when written to, writes data to $itemKey. - * NOTE: The stream will always write in append mode. - * @param string $nsKey - * @param string $itemKey - * @return Swift_InputByteStream - */ - public function getInputByteStream($nsKey, $itemKey, - Swift_InputByteStream $writeThrough = null) - { - } - - /** - * Get data back out of the cache as a string. - * @param string $nsKey - * @param string $itemKey - * @return string - */ - public function getString($nsKey, $itemKey) - { - } - - /** - * Get data back out of the cache as a ByteStream. - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is to write the data to - */ - public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) - { - } - - /** - * Check if the given $itemKey exists in the namespace $nsKey. - * @param string $nsKey - * @param string $itemKey - * @return boolean - */ - public function hasKey($nsKey, $itemKey) - { - return false; - } - - /** - * Clear data for $itemKey in the namespace $nsKey if it exists. - * @param string $nsKey - * @param string $itemKey - */ - public function clearKey($nsKey, $itemKey) - { - } - - /** - * Clear all data in the namespace $nsKey if it exists. - * @param string $nsKey - */ - public function clearAll($nsKey) - { - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php b/pandora_console/include/swiftmailer/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php deleted file mode 100644 index 87cdced81f..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/KeyCache.php'; -//@require 'Swift/KeyCacheInputStream.php'; - -/** - * Writes data to a KeyCache using a stream. - * @package Swift - * @subpackage KeyCache - * @author Chris Corbyn - */ -class Swift_KeyCache_SimpleKeyCacheInputStream - implements Swift_KeyCache_KeyCacheInputStream -{ - - /** The KeyCache being written to */ - private $_keyCache; - - /** The nsKey of the KeyCache being written to */ - private $_nsKey; - - /** The itemKey of the KeyCache being written to */ - private $_itemKey; - - /** A stream to write through on each write() */ - private $_writeThrough = null; - - /** - * Set the KeyCache to wrap. - * @param Swift_KeyCache $keyCache - */ - public function setKeyCache(Swift_KeyCache $keyCache) - { - $this->_keyCache = $keyCache; - } - - /** - * Specify a stream to write through for each write(). - * @param Swift_InputByteStream $is - */ - public function setWriteThroughStream(Swift_InputByteStream $is) - { - $this->_writeThrough = $is; - } - - /** - * Writes $bytes to the end of the stream. - * @param string $bytes - * @param Swift_InputByteStream $is, optional - */ - public function write($bytes, Swift_InputByteStream $is = null) - { - $this->_keyCache->setString( - $this->_nsKey, $this->_itemKey, $bytes, Swift_KeyCache::MODE_APPEND - ); - if (isset($is)) - { - $is->write($bytes); - } - if (isset($this->_writeThrough)) - { - $this->_writeThrough->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Not used. - */ - public function bind(Swift_InputByteStream $is) - { - } - - /** - * Not used. - */ - public function unbind(Swift_InputByteStream $is) - { - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - */ - public function flushBuffers() - { - $this->_keyCache->clearKey($this->_nsKey, $this->_itemKey); - } - - /** - * Set the nsKey which will be written to. - * @param string $nsKey - */ - public function setNsKey($nsKey) - { - $this->_nsKey = $nsKey; - } - - /** - * Set the itemKey which will be written to. - * @param string $itemKey - */ - public function setItemKey($itemKey) - { - $this->_itemKey = $itemKey; - } - - /** - * Any implementation should be cloneable, allowing the clone to access a - * separate $nsKey and $itemKey. - */ - public function __clone() - { - $this->_writeThrough = null; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/LoadBalancedTransport.php b/pandora_console/include/swiftmailer/classes/Swift/LoadBalancedTransport.php deleted file mode 100644 index 14ae2928bc..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/LoadBalancedTransport.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/LoadBalancedTransport.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * Redudantly and rotationally uses several Transport implementations when sending. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_LoadBalancedTransport extends Swift_Transport_LoadBalancedTransport -{ - - /** - * Creates a new LoadBalancedTransport with $transports. - * @param array $transports - */ - public function __construct($transports = array()) - { - call_user_func_array( - array($this, 'Swift_Transport_LoadBalancedTransport::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('transport.loadbalanced') - ); - - $this->setTransports($transports); - } - - /** - * Create a new LoadBalancedTransport instance. - * @param string $transports - * @return Swift_LoadBalancedTransport - */ - public static function newInstance($transports = array()) - { - return new self($transports); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/MailTransport.php b/pandora_console/include/swiftmailer/classes/Swift/MailTransport.php deleted file mode 100644 index afe29c6ff1..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/MailTransport.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/MailTransport.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * Sends Messages using the mail() function. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_MailTransport extends Swift_Transport_MailTransport -{ - - /** - * Create a new MailTransport, optionally specifying $extraParams. - * @param string $extraParams - */ - public function __construct($extraParams = '-f%s') - { - call_user_func_array( - array($this, 'Swift_Transport_MailTransport::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('transport.mail') - ); - - $this->setExtraParams($extraParams); - } - - /** - * Create a new MailTransport instance. - * @param string $extraParams To be passed to mail() - * @return Swift_MailTransport - */ - public static function newInstance($extraParams = '-f%s') - { - return new self($extraParams); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mailer.php b/pandora_console/include/swiftmailer/classes/Swift/Mailer.php deleted file mode 100644 index c92feb41b3..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mailer.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport.php'; -//@require 'Swift/Mime/Message.php'; -//@require 'Swift/Mailer/RecipientIterator.php'; -//@require 'Swift/Events/EventListener.php'; - -/** - * Swift Mailer class. - * - * @package Swift - * @author Chris Corbyn - */ -class Swift_Mailer -{ - - /** The Transport used to send messages */ - private $_transport; - - /** - * Create a new Mailer using $transport for delivery. - * - * @param Swift_Transport $transport - */ - public function __construct(Swift_Transport $transport) - { - $this->_transport = $transport; - } - - /** - * Create a new Mailer instance. - * - * @param Swift_Transport $transport - * @return Swift_Mailer - */ - public static function newInstance(Swift_Transport $transport) - { - return new self($transport); - } - - /** - * Send the given Message like it would be sent in a mail client. - * - * All recipients (with the exception of Bcc) will be able to see the other - * recipients this message was sent to. - * - * If you need to send to each recipient without disclosing details about the - * other recipients see {@link batchSend()}. - * - * Recipient/sender data will be retreived from the Message object. - * - * The return value is the number of recipients who were accepted for - * delivery. - * - * @param Swift_Mime_Message $message - * @param array &$failedRecipients, optional - * @return int - * @see batchSend() - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $failedRecipients = (array) $failedRecipients; - - if (!$this->_transport->isStarted()) - { - $this->_transport->start(); - } - - return $this->_transport->send($message, $failedRecipients); - } - - /** - * Send the given Message to all recipients individually. - * - * This differs from {@link send()} in the way headers are presented to the - * recipient. The only recipient in the "To:" field will be the individual - * recipient it was sent to. - * - * If an iterator is provided, recipients will be read from the iterator - * one-by-one, otherwise recipient data will be retreived from the Message - * object. - * - * Sender information is always read from the Message object. - * - * The return value is the number of recipients who were accepted for - * delivery. - * - * @param Swift_Mime_Message $message - * @param array &$failedRecipients, optional - * @param Swift_Mailer_RecipientIterator $it, optional - * @return int - * @see send() - */ - public function batchSend(Swift_Mime_Message $message, - &$failedRecipients = null, - Swift_Mailer_RecipientIterator $it = null) - { - $failedRecipients = (array) $failedRecipients; - - $sent = 0; - $to = $message->getTo(); - $cc = $message->getCc(); - $bcc = $message->getBcc(); - - if (!empty($cc)) - { - $message->setCc(array()); - } - if (!empty($bcc)) - { - $message->setBcc(array()); - } - - //Use an iterator if set - if (isset($it)) - { - while ($it->hasNext()) - { - $message->setTo($it->nextRecipient()); - $sent += $this->send($message, $failedRecipients); - } - } - else - { - foreach ($to as $address => $name) - { - $message->setTo(array($address => $name)); - $sent += $this->send($message, $failedRecipients); - } - } - - $message->setTo($to); - - if (!empty($cc)) - { - $message->setCc($cc); - } - if (!empty($bcc)) - { - $message->setBcc($bcc); - } - - return $sent; - } - - /** - * Register a plugin using a known unique key (e.g. myPlugin). - * - * @param Swift_Events_EventListener $plugin - * @param string $key - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_transport->registerPlugin($plugin); - } - - /** - * The Transport used to send messages. - * @return Swift_Transport - */ - public function getTransport() - { - return $this->_transport; - } -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mailer/ArrayRecipientIterator.php b/pandora_console/include/swiftmailer/classes/Swift/Mailer/ArrayRecipientIterator.php deleted file mode 100644 index 65d60c1876..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mailer/ArrayRecipientIterator.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mailer/RecipientIterator.php'; - -/** - * Wraps a standard PHP array in an interator. - * @package Swift - * @subpackage Mailer - * @author Chris Corbyn - */ -class Swift_Mailer_ArrayRecipientIterator - implements Swift_Mailer_RecipientIterator -{ - - /** - * The list of recipients. - * @var array - * @access private - */ - private $_recipients = array(); - - /** - * Create a new ArrayRecipientIterator from $recipients. - * @param array $recipients - */ - public function __construct(array $recipients) - { - $this->_recipients = $recipients; - } - - /** - * Returns true only if there are more recipients to send to. - * @return boolean - */ - public function hasNext() - { - return !empty($this->_recipients); - } - - /** - * Returns an array where the keys are the addresses of recipients and the - * values are the names. - * e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL) - * @return array - */ - public function nextRecipient() - { - return array_splice($this->_recipients, 0, 1); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mailer/RecipientIterator.php b/pandora_console/include/swiftmailer/classes/Swift/Mailer/RecipientIterator.php deleted file mode 100644 index 2713841663..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mailer/RecipientIterator.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Provides an abstract way of specifying recipients for batch sending. - * @package Swift - * @subpackage Mailer - * @author Chris Corbyn - */ -interface Swift_Mailer_RecipientIterator -{ - - /** - * Returns true only if there are more recipients to send to. - * @return boolean - */ - public function hasNext(); - - /** - * Returns an array where the keys are the addresses of recipients and the - * values are the names. - * e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL) - * @return array - */ - public function nextRecipient(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Message.php b/pandora_console/include/swiftmailer/classes/Swift/Message.php deleted file mode 100644 index e8183ea54f..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Message.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/SimpleMessage.php'; -//@require 'Swift/MimePart.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * The Message class for building emails. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Message extends Swift_Mime_SimpleMessage -{ - - /** - * Create a new Message. - * Details may be optionally passed into the constructor. - * @param string $subject - * @param string $body - * @param string $contentType - * @param string $charset - */ - public function __construct($subject = null, $body = null, - $contentType = null, $charset = null) - { - call_user_func_array( - array($this, 'Swift_Mime_SimpleMessage::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('mime.message') - ); - - if (!isset($charset)) - { - $charset = Swift_DependencyContainer::getInstance() - ->lookup('properties.charset'); - } - $this->setSubject($subject); - $this->setBody($body); - $this->setCharset($charset); - if ($contentType) - { - $this->setContentType($contentType); - } - } - - /** - * Create a new Message. - * @param string $subject - * @param string $body - * @param string $contentType - * @param string $charset - * @return Swift_Mime_Message - */ - public static function newInstance($subject = null, $body = null, - $contentType = null, $charset = null) - { - return new self($subject, $body, $contentType, $charset); - } - - /** - * Add a MimePart to this Message. - * @param string|Swift_OutputByteStream $body - * @param string $contentType - * @param string $charset - */ - public function addPart($body, $contentType = null, $charset = null) - { - return $this->attach(Swift_MimePart::newInstance( - $body, $contentType, $charset - )); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Attachment.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Attachment.php deleted file mode 100644 index 25ef68b3a5..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Attachment.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/SimpleMimeEntity.php'; -//@require 'Swift/Mime/ContentEncoder.php'; -//@require 'Swift/Mime/HeaderSet.php'; -//@require 'Swift/FileStream.php'; -//@require 'Swift/KeyCache.php'; - -/** - * An attachment, in a multipart message. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_Attachment extends Swift_Mime_SimpleMimeEntity -{ - - /** Recognized MIME types */ - private $_mimeTypes = array(); - - /** - * Create a new Attachment with $headers, $encoder and $cache. - * @param Swift_Mime_HeaderSet $headers - * @param Swift_Mime_ContentEncoder $encoder - * @param Swift_KeyCache $cache - * @param array $mimeTypes optional - */ - public function __construct(Swift_Mime_HeaderSet $headers, - Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, - $mimeTypes = array()) - { - parent::__construct($headers, $encoder, $cache); - $this->setDisposition('attachment'); - $this->setContentType('application/octet-stream'); - $this->_mimeTypes = $mimeTypes; - } - - /** - * Get the nesting level used for this attachment. - * Always returns {@link LEVEL_MIXED}. - * @return int - */ - public function getNestingLevel() - { - return self::LEVEL_MIXED; - } - - /** - * Get the Content-Disposition of this attachment. - * By default attachments have a disposition of "attachment". - * @return string - */ - public function getDisposition() - { - return $this->_getHeaderFieldModel('Content-Disposition'); - } - - /** - * Set the Content-Disposition of this attachment. - * @param string $disposition - */ - public function setDisposition($disposition) - { - if (!$this->_setHeaderFieldModel('Content-Disposition', $disposition)) - { - $this->getHeaders()->addParameterizedHeader( - 'Content-Disposition', $disposition - ); - } - return $this; - } - - /** - * Get the filename of this attachment when downloaded. - * @return string - */ - public function getFilename() - { - return $this->_getHeaderParameter('Content-Disposition', 'filename'); - } - - /** - * Set the filename of this attachment. - * @param string $filename - */ - public function setFilename($filename) - { - $this->_setHeaderParameter('Content-Disposition', 'filename', $filename); - $this->_setHeaderParameter('Content-Type', 'name', $filename); - return $this; - } - - /** - * Get the file size of this attachment. - * @return int - */ - public function getSize() - { - return $this->_getHeaderParameter('Content-Disposition', 'size'); - } - - /** - * Set the file size of this attachment. - * @param int $size - */ - public function setSize($size) - { - $this->_setHeaderParameter('Content-Disposition', 'size', $size); - return $this; - } - - /** - * Set the file that this attachment is for. - * @param Swift_FileStream $file - * @param string $contentType optional - */ - public function setFile(Swift_FileStream $file, $contentType = null) - { - $this->setFilename(basename($file->getPath())); - $this->setBody($file, $contentType); - if (!isset($contentType)) - { - $extension = strtolower(substr( - $file->getPath(), strrpos($file->getPath(), '.') + 1 - )); - - if (array_key_exists($extension, $this->_mimeTypes)) - { - $this->setContentType($this->_mimeTypes[$extension]); - } - } - return $this; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder.php deleted file mode 100644 index e1c99c5908..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Encoder.php'; -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStream.php'; - -/** - * Interface for all Transfer Encoding schemes. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -interface Swift_Mime_ContentEncoder extends Swift_Encoder -{ - - /** - * Encode $in to $out. - * @param Swift_OutputByteStream $os to read from - * @param Swift_InputByteStream $is to write to - * @param int $firstLineOffset - * @param int $maxLineLength - 0 indicates the default length for this encoding - */ - public function encodeByteStream( - Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, - $maxLineLength = 0); - - /** - * Get the MIME name of this content encoding scheme. - * @return string - */ - public function getName(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php deleted file mode 100644 index e89938ef8b..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/ContentEncoder.php'; -//@require 'Swift/Encoder/Base64Encoder.php'; -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStream.php'; - -/** - * Handles Base 64 Transfer Encoding in Swift Mailer. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_ContentEncoder_Base64ContentEncoder - extends Swift_Encoder_Base64Encoder - implements Swift_Mime_ContentEncoder -{ - - /** - * Encode stream $in to stream $out. - * @param Swift_OutputByteStream $in - * @param Swift_InputByteStream $out - * @param int $firstLineOffset - * @param int $maxLineLength, optional, 0 indicates the default of 76 bytes - */ - public function encodeByteStream( - Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, - $maxLineLength = 0) - { - if (0 >= $maxLineLength || 76 < $maxLineLength) - { - $maxLineLength = 76; - } - - $remainder = 0; - - while (false !== $bytes = $os->read(8190)) - { - $encoded = base64_encode($bytes); - $encodedTransformed = ''; - $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; - - while ($thisMaxLineLength < strlen($encoded)) - { - $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) . "\r\n"; - $firstLineOffset = 0; - $encoded = substr($encoded, $thisMaxLineLength); - $thisMaxLineLength = $maxLineLength; - $remainder = 0; - } - - if (0 < $remainingLength = strlen($encoded)) - { - $remainder += $remainingLength; - $encodedTransformed .= $encoded; - $encoded = null; - } - - $is->write($encodedTransformed); - } - } - - /** - * Get the name of this encoding scheme. - * Returns the string 'base64'. - * @return string - */ - public function getName() - { - return 'base64'; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php deleted file mode 100644 index 4a725d8561..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php +++ /dev/null @@ -1,175 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/ContentEncoder.php'; -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStream.php'; - -/** - * Handles binary/7/8-bit Transfer Encoding in Swift Mailer. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_ContentEncoder_PlainContentEncoder - implements Swift_Mime_ContentEncoder -{ - - /** - * The name of this encoding scheme (probably 7bit or 8bit). - * @var string - * @access private - */ - private $_name; - - /** - * True if canonical transformations should be done. - * @var boolean - * @access private - */ - private $_canonical; - - /** - * Creates a new PlainContentEncoder with $name (probably 7bit or 8bit). - * @param string $name - * @param boolean $canonical If canonicalization transformation should be done. - */ - public function __construct($name, $canonical = false) - { - $this->_name = $name; - $this->_canonical = $canonical; - } - - /** - * Encode a given string to produce an encoded string. - * @param string $string - * @param int $firstLineOffset, ignored - * @param int $maxLineLength - 0 means no wrapping will occur - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, - $maxLineLength = 0) - { - if ($this->_canonical) - { - $string = $this->_canonicalize($string); - } - return $this->_safeWordWrap($string, $maxLineLength, "\r\n"); - } - - /** - * Encode stream $in to stream $out. - * @param Swift_OutputByteStream $in - * @param Swift_InputByteStream $out - * @param int $firstLineOffset, ignored - * @param int $maxLineLength, optional, 0 means no wrapping will occur - */ - public function encodeByteStream( - Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, - $maxLineLength = 0) - { - $leftOver = ''; - while (false !== $bytes = $os->read(8192)) - { - $toencode = $leftOver . $bytes; - if ($this->_canonical) - { - $toencode = $this->_canonicalize($toencode); - } - $wrapped = $this->_safeWordWrap($toencode, $maxLineLength, "\r\n"); - $lastLinePos = strrpos($wrapped, "\r\n"); - $leftOver = substr($wrapped, $lastLinePos); - $wrapped = substr($wrapped, 0, $lastLinePos); - - $is->write($wrapped); - } - if (strlen($leftOver)) - { - $is->write($leftOver); - } - } - - /** - * Get the name of this encoding scheme. - * @return string - */ - public function getName() - { - return $this->_name; - } - - /** - * Not used. - */ - public function charsetChanged($charset) - { - } - - // -- Private methods - - /** - * A safer (but weaker) wordwrap for unicode. - * @param string $string - * @param int $length - * @param string $le - * @return string - * @access private - */ - private function _safeWordwrap($string, $length = 75, $le = "\r\n") - { - if (0 >= $length) - { - return $string; - } - - $originalLines = explode($le, $string); - - $lines = array(); - $lineCount = 0; - - foreach ($originalLines as $originalLine) - { - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - - //$chunks = preg_split('/(?<=[\ \t,\.!\?\-&\+\/])/', $originalLine); - $chunks = preg_split('/(?<=\s)/', $originalLine); - - foreach ($chunks as $chunk) - { - if (0 != strlen($currentLine) - && strlen($currentLine . $chunk) > $length) - { - $lines[] = ''; - $currentLine =& $lines[$lineCount++]; - } - $currentLine .= $chunk; - } - } - - return implode("\r\n", $lines); - } - - /** - * Canonicalize string input (fix CRLF). - * @param string $string - * @return string - * @access private - */ - private function _canonicalize($string) - { - return str_replace( - array("\r\n", "\r", "\n"), - array("\n", "\n", "\r\n"), - $string - ); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php deleted file mode 100644 index 3beeb635ef..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/ContentEncoder.php'; -//@require 'Swift/Encoder/QpEncoder.php'; -//@require 'Swift/InputByteStrean.php'; -//@require 'Swift/OutputByteStream.php'; -//@require 'Swift/CharacterStream.php'; - -/** - * Handles Quoted Printable (QP) Transfer Encoding in Swift Mailer. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_ContentEncoder_QpContentEncoder extends Swift_Encoder_QpEncoder - implements Swift_Mime_ContentEncoder -{ - - /** - * Creates a new QpContentEncoder for the given CharacterStream. - * @param Swift_CharacterStream $charStream to use for reading characters - * @param Swift_StreamFilter $filter if canonicalization should occur - */ - public function __construct(Swift_CharacterStream $charStream, - Swift_StreamFilter $filter = null) - { - parent::__construct($charStream, $filter); - } - - /** - * Encode stream $in to stream $out. - * QP encoded strings have a maximum line length of 76 characters. - * If the first line needs to be shorter, indicate the difference with - * $firstLineOffset. - * @param Swift_OutputByteStream $os output stream - * @param Swift_InputByteStream $is input stream - * @param int $firstLineOffset - * @param int $maxLineLength - */ - public function encodeByteStream( - Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, - $maxLineLength = 0) - { - if ($maxLineLength > 76 || $maxLineLength <= 0) - { - $maxLineLength = 76; - } - - $thisLineLength = $maxLineLength - $firstLineOffset; - - $this->_charStream->flushContents(); - $this->_charStream->importByteStream($os); - - $currentLine = ''; - $prepend = ''; - $size=$lineLen=0; - - while (false !== $bytes = $this->_nextSequence()) - { - //If we're filtering the input - if (isset($this->_filter)) - { - //If we can't filter because we need more bytes - while ($this->_filter->shouldBuffer($bytes)) - { - //Then collect bytes into the buffer - if (false === $moreBytes = $this->_nextSequence(1)) - { - break; - } - - foreach ($moreBytes as $b) - { - $bytes[] = $b; - } - } - //And filter them - $bytes = $this->_filter->filter($bytes); - } - - $enc = $this->_encodeByteSequence($bytes, $size); - if ($currentLine && $lineLen+$size >= $thisLineLength) - { - $is->write($prepend . $this->_standardize($currentLine)); - $currentLine = ''; - $prepend = "=\r\n"; - $thisLineLength = $maxLineLength; - $lineLen=0; - } - $lineLen+=$size; - $currentLine .= $enc; - } - if (strlen($currentLine)) - { - $is->write($prepend . $this->_standardize($currentLine)); - } - } - - /** - * Get the name of this encoding scheme. - * Returns the string 'quoted-printable'. - * @return string - */ - public function getName() - { - return 'quoted-printable'; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/EmbeddedFile.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/EmbeddedFile.php deleted file mode 100644 index 983b78dacb..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/EmbeddedFile.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Attachment.php'; -//@require 'Swift/Mime/ContentEncoder.php'; -//@require 'Swift/KeyCache.php'; -//@require - -/** - * An embedded file, in a multipart message. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_EmbeddedFile extends Swift_Mime_Attachment -{ - - /** - * Creates a new Attachment with $headers and $encoder. - * @param Swift_Mime_HeaderSet $headers - * @param Swift_Mime_ContentEncoder $encoder - * @param Swift_KeyCache $cache - * @param array $mimeTypes optional - */ - public function __construct(Swift_Mime_HeaderSet $headers, - Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, - $mimeTypes = array()) - { - parent::__construct($headers, $encoder, $cache, $mimeTypes); - $this->setDisposition('inline'); - $this->setId($this->getId()); - } - - /** - * Get the nesting level of this EmbeddedFile. - * Returns {@link LEVEL_RELATED}. - * @return int - */ - public function getNestingLevel() - { - return self::LEVEL_RELATED; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Header.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Header.php deleted file mode 100644 index 38fc40cdef..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Header.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * A MIME Header. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -interface Swift_Mime_Header -{ - - /** Text headers */ - const TYPE_TEXT = 2; - - /** Parameterized headers (text + params) */ - const TYPE_PARAMETERIZED = 6; - - /** Mailbox and address headers */ - const TYPE_MAILBOX = 8; - - /** Date and time headers */ - const TYPE_DATE = 16; - - /** Identification headers */ - const TYPE_ID = 32; - - /** Address path headers */ - const TYPE_PATH = 64; - - /** - * Get the type of Header that this instance represents. - * @return int - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - */ - public function getFieldType(); - - /** - * Set the model for the field body. - * The actual types needed will vary depending upon the type of Header. - * @param mixed $model - */ - public function setFieldBodyModel($model); - - /** - * Set the charset used when rendering the Header. - * @param string $charset - */ - public function setCharset($charset); - - /** - * Get the model for the field body. - * The return type depends on the specifics of the Header. - * @return mixed - */ - public function getFieldBodyModel(); - - /** - * Get the name of this header (e.g. Subject). - * The name is an identifier and as such will be immutable. - * @return string - */ - public function getFieldName(); - - /** - * Get the field body, prepared for folding into a final header value. - * @return string - */ - public function getFieldBody(); - - /** - * Get this Header rendered as a compliant string. - * @return string - */ - public function toString(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php deleted file mode 100644 index feaba981ce..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -require_once dirname(__FILE__) . '/../HeaderEncoder.php'; -require_once dirname(__FILE__) . '/../../Encoder/Base64Encoder.php'; - - -/** - * Handles Base64 (B) Header Encoding in Swift Mailer. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_HeaderEncoder_Base64HeaderEncoder - extends Swift_Encoder_Base64Encoder - implements Swift_Mime_HeaderEncoder -{ - - /** - * Get the name of this encoding scheme. - * Returns the string 'B'. - * @return string - */ - public function getName() - { - return 'B'; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php deleted file mode 100644 index d727da0272..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -require_once dirname(__FILE__) . '/../HeaderEncoder.php'; -require_once dirname(__FILE__) . '/../../Encoder/QpEncoder.php'; -require_once dirname(__FILE__) . '/../../CharacterStream.php'; - -/** - * Handles Quoted Printable (Q) Header Encoding in Swift Mailer. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_HeaderEncoder_QpHeaderEncoder extends Swift_Encoder_QpEncoder - implements Swift_Mime_HeaderEncoder -{ - - private static $_headerSafeMap = array(); - - /** - * Creates a new QpHeaderEncoder for the given CharacterStream. - * @param Swift_CharacterStream $charStream to use for reading characters - */ - public function __construct(Swift_CharacterStream $charStream) - { - parent::__construct($charStream); - if (empty(self::$_headerSafeMap)) - { - foreach (array_merge( - range(0x61, 0x7A), range(0x41, 0x5A), - range(0x30, 0x39), array(0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F) - ) as $byte) - { - self::$_headerSafeMap[$byte] = chr($byte); - } - } - } - - /** - * Get the name of this encoding scheme. - * Returns the string 'Q'. - * @return string - */ - public function getName() - { - return 'Q'; - } - - /** - * Takes an unencoded string and produces a Q encoded string from it. - * @param string $string to encode - * @param int $firstLineOffset, optional - * @param int $maxLineLength, optional, 0 indicates the default of 76 chars - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, - $maxLineLength = 0) - { - return str_replace(array(' ', '=20', "=\r\n"), array('_', '_', "\r\n"), - parent::encodeString($string, $firstLineOffset, $maxLineLength) - ); - } - - // -- Overridden points of extension - - /** - * Encode the given byte array into a verbatim QP form. - * @param int[] $bytes - * @return string - * @access protected - */ - protected function _encodeByteSequence(array $bytes, &$size) - { - $ret = ''; - $size=0; - foreach ($bytes as $b) - { - if (isset(self::$_headerSafeMap[$b])) - { - $ret .= self::$_headerSafeMap[$b]; - ++$size; - } - else - { - $ret .= self::$_qpMap[$b]; - $size+=3; - } - } - return $ret; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderFactory.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderFactory.php deleted file mode 100644 index 83bb35ad6e..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderFactory.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/CharsetObserver.php'; - -/** - * Creates MIME headers. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -interface Swift_Mime_HeaderFactory extends Swift_Mime_CharsetObserver -{ - - /** - * Create a new Mailbox Header with a list of $addresses. - * @param string $name - * @param array|string $addresses - * @return Swift_Mime_Header - */ - public function createMailboxHeader($name, $addresses = null); - - /** - * Create a new Date header using $timestamp (UNIX time). - * @param string $name - * @param int $timestamp - * @return Swift_Mime_Header - */ - public function createDateHeader($name, $timestamp = null); - - /** - * Create a new basic text header with $name and $value. - * @param string $name - * @param string $value - * @return Swift_Mime_Header - */ - public function createTextHeader($name, $value = null); - - /** - * Create a new ParameterizedHeader with $name, $value and $params. - * @param string $name - * @param string $value - * @param array $params - * @return Swift_Mime_ParameterizedHeader - */ - public function createParameterizedHeader($name, $value = null, - $params = array()); - - /** - * Create a new ID header for Message-ID or Content-ID. - * @param string $name - * @param string|array $ids - * @return Swift_Mime_Header - */ - public function createIdHeader($name, $ids = null); - - /** - * Create a new Path header with an address (path) in it. - * @param string $name - * @param string $path - * @return Swift_Mime_Header - */ - public function createPathHeader($name, $path = null); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderSet.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderSet.php deleted file mode 100644 index 81e7a979b6..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/HeaderSet.php +++ /dev/null @@ -1,170 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/CharsetObserver.php'; - -/** - * A collection of MIME headers. - * - * @package Swift - * @subpackage Mime - * - * @author Chris Corbyn - */ -interface Swift_Mime_HeaderSet extends Swift_Mime_CharsetObserver -{ - - /** - * Add a new Mailbox Header with a list of $addresses. - * - * @param string $name - * @param array|string $addresses - */ - public function addMailboxHeader($name, $addresses = null); - - /** - * Add a new Date header using $timestamp (UNIX time). - * - * @param string $name - * @param int $timestamp - */ - public function addDateHeader($name, $timestamp = null); - - /** - * Add a new basic text header with $name and $value. - * - * @param string $name - * @param string $value - */ - public function addTextHeader($name, $value = null); - - /** - * Add a new ParameterizedHeader with $name, $value and $params. - * - * @param string $name - * @param string $value - * @param array $params - */ - public function addParameterizedHeader($name, $value = null, - $params = array()); - - /** - * Add a new ID header for Message-ID or Content-ID. - * - * @param string $name - * @param string|array $ids - */ - public function addIdHeader($name, $ids = null); - - /** - * Add a new Path header with an address (path) in it. - * - * @param string $name - * @param string $path - */ - public function addPathHeader($name, $path = null); - - /** - * Returns true if at least one header with the given $name exists. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param int $index - * - * @return boolean - */ - public function has($name, $index = 0); - - /** - * Set a header in the HeaderSet. - * - * The header may be a previously fetched header via {@link get()} or it may - * be one that has been created separately. - * - * If $index is specified, the header will be inserted into the set at this - * offset. - * - * @param Swift_Mime_Header $header - * @param int $index - */ - public function set(Swift_Mime_Header $header, $index = 0); - - /** - * Get the header with the given $name. - * If multiple headers match, the actual one may be specified by $index. - * Returns NULL if none present. - * - * @param string $name - * @param int $index - * - * @return Swift_Mime_Header - */ - public function get($name, $index = 0); - - /** - * Get all headers with the given $name. - * - * @param string $name - * - * @return array - */ - public function getAll($name = null); - - /** - * Remove the header with the given $name if it's set. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param int $index - */ - public function remove($name, $index = 0); - - /** - * Remove all headers with the given $name. - * - * @param string $name - */ - public function removeAll($name); - - /** - * Create a new instance of this HeaderSet. - * - * @return Swift_Mime_HeaderSet - */ - public function newInstance(); - - /** - * Define a list of Header names as an array in the correct order. - * - * These Headers will be output in the given order where present. - * - * @param array $sequence - */ - public function defineOrdering(array $sequence); - - /** - * Set a list of header names which must always be displayed when set. - * - * Usually headers without a field value won't be output unless set here. - * - * @param array $names - */ - public function setAlwaysDisplayed(array $names); - - /** - * Returns a string with a representation of all headers. - * - * @return string - */ - public function toString(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/AbstractHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/AbstractHeader.php deleted file mode 100644 index c3049c25ca..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/AbstractHeader.php +++ /dev/null @@ -1,596 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Header.php'; -//@require 'Swift/Mime/HeaderEncoder.php'; -//@require 'Swift/RfcComplianceException.php'; - -/** - * An abstract base MIME Header. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -abstract class Swift_Mime_Headers_AbstractHeader implements Swift_Mime_Header -{ - - /** - * Special characters used in the syntax which need to be escaped. - * @var string[] - * @access private - */ - private $_specials = array(); - - /** - * Tokens defined in RFC 2822 (and some related RFCs). - * @var string[] - * @access private - */ - private $_grammar = array(); - - /** - * The name of this Header. - * @var string - * @access private - */ - private $_name; - - /** - * The Encoder used to encode this Header. - * @var Swift_Encoder - * @access private - */ - private $_encoder; - - /** - * The maximum length of a line in the header. - * @var int - * @access private - */ - private $_lineLength = 78; - - /** - * The language used in this Header. - * @var string - */ - private $_lang; - - /** - * The character set of the text in this Header. - * @var string - * @access private - */ - private $_charset = 'utf-8'; - - /** - * The value of this Header, cached. - * @var string - * @access private - */ - private $_cachedValue = null; - - /** - * Set the character set used in this Header. - * @param string $charset - */ - public function setCharset($charset) - { - $this->clearCachedValueIf($charset != $this->_charset); - $this->_charset = $charset; - if (isset($this->_encoder)) - { - $this->_encoder->charsetChanged($charset); - } - } - - /** - * Get the character set used in this Header. - * @return string - */ - public function getCharset() - { - return $this->_charset; - } - - /** - * Set the language used in this Header. - * For example, for US English, 'en-us'. - * This can be unspecified. - * @param string $lang - */ - public function setLanguage($lang) - { - $this->clearCachedValueIf($this->_lang != $lang); - $this->_lang = $lang; - } - - /** - * Get the language used in this Header. - * @return string - */ - public function getLanguage() - { - return $this->_lang; - } - - /** - * Set the encoder used for encoding the header. - * @param Swift_Mime_HeaderEncoder $encoder - */ - public function setEncoder(Swift_Mime_HeaderEncoder $encoder) - { - $this->_encoder = $encoder; - $this->setCachedValue(null); - } - - /** - * Get the encoder used for encoding this Header. - * @return Swift_Mime_HeaderEncoder - */ - public function getEncoder() - { - return $this->_encoder; - } - - /** - * Get the name of this header (e.g. charset). - * @return string - */ - public function getFieldName() - { - return $this->_name; - } - - /** - * Set the maximum length of lines in the header (excluding EOL). - * @param int $lineLength - */ - public function setMaxLineLength($lineLength) - { - $this->clearCachedValueIf($this->_lineLength != $lineLength); - $this->_lineLength = $lineLength; - } - - /** - * Get the maximum permitted length of lines in this Header. - * @return int - */ - public function getMaxLineLength() - { - return $this->_lineLength; - } - - /** - * Get this Header rendered as a RFC 2822 compliant string. - * @return string - * @throws Swift_RfcComplianceException - */ - public function toString() - { - return $this->_tokensToString($this->toTokens()); - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - // -- Points of extension - - /** - * Set the name of this Header field. - * @param string $name - * @access protected - */ - protected function setFieldName($name) - { - $this->_name = $name; - } - - /** - * Initialize some RFC 2822 (and friends) ABNF grammar definitions. - * @access protected - */ - protected function initializeGrammar() - { - $this->_specials = array( - '(', ')', '<', '>', '[', ']', - ':', ';', '@', ',', '.', '"' - ); - - /*** Refer to RFC 2822 for ABNF grammar ***/ - - //All basic building blocks - $this->_grammar['NO-WS-CTL'] = '[\x01-\x08\x0B\x0C\x0E-\x19\x7F]'; - $this->_grammar['WSP'] = '[ \t]'; - $this->_grammar['CRLF'] = '(?:\r\n)'; - $this->_grammar['FWS'] = '(?:(?:' . $this->_grammar['WSP'] . '*' . - $this->_grammar['CRLF'] . ')?' . $this->_grammar['WSP'] . ')'; - $this->_grammar['text'] = '[\x00-\x08\x0B\x0C\x0E-\x7F]'; - $this->_grammar['quoted-pair'] = '(?:\\\\' . $this->_grammar['text'] . ')'; - $this->_grammar['ctext'] = '(?:' . $this->_grammar['NO-WS-CTL'] . - '|[\x21-\x27\x2A-\x5B\x5D-\x7E])'; - //Uses recursive PCRE (?1) -- could be a weak point?? - $this->_grammar['ccontent'] = '(?:' . $this->_grammar['ctext'] . '|' . - $this->_grammar['quoted-pair'] . '|(?1))'; - $this->_grammar['comment'] = '(\((?:' . $this->_grammar['FWS'] . '|' . - $this->_grammar['ccontent']. ')*' . $this->_grammar['FWS'] . '?\))'; - $this->_grammar['CFWS'] = '(?:(?:' . $this->_grammar['FWS'] . '?' . - $this->_grammar['comment'] . ')*(?:(?:' . $this->_grammar['FWS'] . '?' . - $this->_grammar['comment'] . ')|' . $this->_grammar['FWS'] . '))'; - $this->_grammar['qtext'] = '(?:' . $this->_grammar['NO-WS-CTL'] . - '|[\x21\x23-\x5B\x5D-\x7E])'; - $this->_grammar['qcontent'] = '(?:' . $this->_grammar['qtext'] . '|' . - $this->_grammar['quoted-pair'] . ')'; - $this->_grammar['quoted-string'] = '(?:' . $this->_grammar['CFWS'] . '?"' . - '(' . $this->_grammar['FWS'] . '?' . $this->_grammar['qcontent'] . ')*' . - $this->_grammar['FWS'] . '?"' . $this->_grammar['CFWS'] . '?)'; - $this->_grammar['atext'] = '[a-zA-Z0-9!#\$%&\'\*\+\-\/=\?\^_`\{\}\|~]'; - $this->_grammar['atom'] = '(?:' . $this->_grammar['CFWS'] . '?' . - $this->_grammar['atext'] . '+' . $this->_grammar['CFWS'] . '?)'; - $this->_grammar['dot-atom-text'] = '(?:' . $this->_grammar['atext'] . '+' . - '(\.' . $this->_grammar['atext'] . '+)*)'; - $this->_grammar['dot-atom'] = '(?:' . $this->_grammar['CFWS'] . '?' . - $this->_grammar['dot-atom-text'] . '+' . $this->_grammar['CFWS'] . '?)'; - $this->_grammar['word'] = '(?:' . $this->_grammar['atom'] . '|' . - $this->_grammar['quoted-string'] . ')'; - $this->_grammar['phrase'] = '(?:' . $this->_grammar['word'] . '+?)'; - $this->_grammar['no-fold-quote'] = '(?:"(?:' . $this->_grammar['qtext'] . - '|' . $this->_grammar['quoted-pair'] . ')*")'; - $this->_grammar['dtext'] = '(?:' . $this->_grammar['NO-WS-CTL'] . - '|[\x21-\x5A\x5E-\x7E])'; - $this->_grammar['no-fold-literal'] = '(?:\[(?:' . $this->_grammar['dtext'] . - '|' . $this->_grammar['quoted-pair'] . ')*\])'; - - //Message IDs - $this->_grammar['id-left'] = '(?:' . $this->_grammar['dot-atom-text'] . '|' . - $this->_grammar['no-fold-quote'] . ')'; - $this->_grammar['id-right'] = '(?:' . $this->_grammar['dot-atom-text'] . '|' . - $this->_grammar['no-fold-literal'] . ')'; - - //Addresses, mailboxes and paths - $this->_grammar['local-part'] = '(?:' . $this->_grammar['dot-atom'] . '|' . - $this->_grammar['quoted-string'] . ')'; - $this->_grammar['dcontent'] = '(?:' . $this->_grammar['dtext'] . '|' . - $this->_grammar['quoted-pair'] . ')'; - $this->_grammar['domain-literal'] = '(?:' . $this->_grammar['CFWS'] . '?\[(' . - $this->_grammar['FWS'] . '?' . $this->_grammar['dcontent'] . ')*?' . - $this->_grammar['FWS'] . '?\]' . $this->_grammar['CFWS'] . '?)'; - $this->_grammar['domain'] = '(?:' . $this->_grammar['dot-atom'] . '|' . - $this->_grammar['domain-literal'] . ')'; - $this->_grammar['addr-spec'] = '(?:' . $this->_grammar['local-part'] . '@' . - $this->_grammar['domain'] . ')'; - } - - /** - * Get the grammar defined for $name token. - * @param string $name execatly as written in the RFC - * @return string - */ - protected function getGrammar($name) - { - if (array_key_exists($name, $this->_grammar)) - { - return $this->_grammar[$name]; - } - else - { - throw new Swift_RfcComplianceException( - "No such grammar '" . $name . "' defined." - ); - } - } - - /** - * Escape special characters in a string (convert to quoted-pairs). - * @param string $token - * @param string[] $include additonal chars to escape - * @param string[] $exclude chars from escaping - * @return string - */ - protected function escapeSpecials($token, $include = array(), - $exclude = array()) - { - foreach ( - array_merge(array('\\'), array_diff($this->_specials, $exclude), $include) as $char) - { - $token = str_replace($char, '\\' . $char, $token); - } - return $token; - } - - /** - * Produces a compliant, formatted RFC 2822 'phrase' based on the string given. - * @param Swift_Mime_Header $header - * @param string $string as displayed - * @param string $charset of the text - * @param Swift_Mime_HeaderEncoder $encoder - * @param boolean $shorten the first line to make remove for header name - * @return string - */ - protected function createPhrase(Swift_Mime_Header $header, $string, $charset, - Swift_Mime_HeaderEncoder $encoder = null, $shorten = false) - { - //Treat token as exactly what was given - $phraseStr = $string; - //If it's not valid - if (!preg_match('/^' . $this->_grammar['phrase'] . '$/D', $phraseStr)) - { - // .. but it is just ascii text, try escaping some characters - // and make it a quoted-string - if (preg_match('/^' . $this->_grammar['text'] . '*$/D', $phraseStr)) - { - $phraseStr = $this->escapeSpecials( - $phraseStr, array('"'), $this->_specials - ); - $phraseStr = '"' . $phraseStr . '"'; - } - else // ... otherwise it needs encoding - { - //Determine space remaining on line if first line - if ($shorten) - { - $usedLength = strlen($header->getFieldName() . ': '); - } - else - { - $usedLength = 0; - } - $phraseStr = $this->encodeWords($header, $string, $usedLength); - } - } - - return $phraseStr; - } - - /** - * Encode needed word tokens within a string of input. - * @param string $input - * @param string $usedLength, optional - * @return string - */ - protected function encodeWords(Swift_Mime_Header $header, $input, - $usedLength = -1) - { - $value = ''; - - $tokens = $this->getEncodableWordTokens($input); - - foreach ($tokens as $token) - { - //See RFC 2822, Sect 2.2 (really 2.2 ??) - if ($this->tokenNeedsEncoding($token)) - { - //Don't encode starting WSP - $firstChar = substr($token, 0, 1); - switch($firstChar) - { - case ' ': - case "\t": - $value .= $firstChar; - $token = substr($token, 1); - } - - if (-1 == $usedLength) - { - $usedLength = strlen($header->getFieldName() . ': ') + strlen($value); - } - $value .= $this->getTokenAsEncodedWord($token, $usedLength); - - $header->setMaxLineLength(76); //Forefully override - } - else - { - $value .= $token; - } - } - - return $value; - } - - /** - * Test if a token needs to be encoded or not. - * @param string $token - * @return boolean - */ - protected function tokenNeedsEncoding($token) - { - return preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $token); - } - - /** - * Splits a string into tokens in blocks of words which can be encoded quickly. - * @param string $string - * @return string[] - */ - protected function getEncodableWordTokens($string) - { - $tokens = array(); - - $encodedToken = ''; - //Split at all whitespace boundaries - foreach (preg_split('~(?=[\t ])~', $string) as $token) - { - if ($this->tokenNeedsEncoding($token)) - { - $encodedToken .= $token; - } - else - { - if (strlen($encodedToken) > 0) - { - $tokens[] = $encodedToken; - $encodedToken = ''; - } - $tokens[] = $token; - } - } - if (strlen($encodedToken)) - { - $tokens[] = $encodedToken; - } - - return $tokens; - } - - /** - * Get a token as an encoded word for safe insertion into headers. - * @param string $token to encode - * @param int $firstLineOffset, optional - * @return string - */ - protected function getTokenAsEncodedWord($token, $firstLineOffset = 0) - { - //Adjust $firstLineOffset to account for space needed for syntax - $charsetDecl = $this->_charset; - if (isset($this->_lang)) - { - $charsetDecl .= '*' . $this->_lang; - } - $encodingWrapperLength = strlen( - '=?' . $charsetDecl . '?' . $this->_encoder->getName() . '??=' - ); - - if ($firstLineOffset >= 75) //Does this logic need to be here? - { - $firstLineOffset = 0; - } - - $encodedTextLines = explode("\r\n", - $this->_encoder->encodeString( - $token, $firstLineOffset, 75 - $encodingWrapperLength - ) - ); - - foreach ($encodedTextLines as $lineNum => $line) - { - $encodedTextLines[$lineNum] = '=?' . $charsetDecl . - '?' . $this->_encoder->getName() . - '?' . $line . '?='; - } - - return implode("\r\n ", $encodedTextLines); - } - - /** - * Generates tokens from the given string which include CRLF as individual tokens. - * @param string $token - * @return string[] - * @access protected - */ - protected function generateTokenLines($token) - { - return preg_split('~(\r\n)~', $token, -1, PREG_SPLIT_DELIM_CAPTURE); - } - - /** - * Set a value into the cache. - * @param string $value - * @access protected - */ - protected function setCachedValue($value) - { - $this->_cachedValue = $value; - } - - /** - * Get the value in the cache. - * @return string - * @access protected - */ - protected function getCachedValue() - { - return $this->_cachedValue; - } - - /** - * Clear the cached value if $condition is met. - * @param boolean $condition - * @access protected - */ - protected function clearCachedValueIf($condition) - { - if ($condition) - { - $this->setCachedValue(null); - } - } - - // -- Private methods - - /** - * Generate a list of all tokens in the final header. - * @param string $string input, optional - * @return string[] - * @access private - */ - protected function toTokens($string = null) - { - if (is_null($string)) - { - $string = $this->getFieldBody(); - } - - $tokens = array(); - - //Generate atoms; split at all invisible boundaries followed by WSP - foreach (preg_split('~(?=[ \t])~', $string) as $token) - { - $tokens = array_merge($tokens, $this->generateTokenLines($token)); - } - - return $tokens; - } - - /** - * Takes an array of tokens which appear in the header and turns them into - * an RFC 2822 compliant string, adding FWSP where needed. - * @param string[] $tokens - * @return string - * @access private - */ - private function _tokensToString(array $tokens) - { - $lineCount = 0; - $headerLines = array(); - $headerLines[] = $this->_name . ': '; - $currentLine =& $headerLines[$lineCount++]; - - //Build all tokens back into compliant header - foreach ($tokens as $i => $token) - { - //Line longer than specified maximum or token was just a new line - if (("\r\n" == $token) || - ($i > 0 && strlen($currentLine . $token) > $this->_lineLength) - && 0 < strlen($currentLine)) - { - $headerLines[] = ''; - $currentLine =& $headerLines[$lineCount++]; - } - - //Append token to the line - if ("\r\n" != $token) - { - $currentLine .= $token; - } - } - - //Implode with FWS (RFC 2822, 2.2.3) - return implode("\r\n", $headerLines) . "\r\n"; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/DateHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/DateHeader.php deleted file mode 100644 index 598c0c5a9a..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/DateHeader.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Headers/AbstractHeader.php'; - - -/** - * A Date MIME Header for Swift Mailer. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_Headers_DateHeader extends Swift_Mime_Headers_AbstractHeader -{ - - /** - * The UNIX timestamp value of this Header. - * @var int - * @access private - */ - private $_timestamp; - - /** - * Creates a new DateHeader with $name and $timestamp. - * Example: - * <code> - * <?php - * $header = new Swift_Mime_Headers_DateHeader('Date', time()); - * ?> - * </code> - * @param string $name of Header - */ - public function __construct($name) - { - $this->setFieldName($name); - } - - /** - * Get the type of Header that this instance represents. - * @return int - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - */ - public function getFieldType() - { - return self::TYPE_DATE; - } - - /** - * Set the model for the field body. - * This method takes a UNIX timestamp. - * @param int $model - */ - public function setFieldBodyModel($model) - { - $this->setTimestamp($model); - } - - /** - * Get the model for the field body. - * This method returns a UNIX timestamp. - * @return mixed - */ - public function getFieldBodyModel() - { - return $this->getTimestamp(); - } - - /** - * Get the UNIX timestamp of the Date in this Header. - * @return int - */ - public function getTimestamp() - { - return $this->_timestamp; - } - - /** - * Set the UNIX timestamp of the Date in this Header. - * @param int $timestamp - */ - public function setTimestamp($timestamp) - { - if (!is_null($timestamp)) - { - $timestamp = (int) $timestamp; - } - $this->clearCachedValueIf($this->_timestamp != $timestamp); - $this->_timestamp = $timestamp; - } - - /** - * Get the string value of the body in this Header. - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * @return string - * @see toString() - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) - { - if (isset($this->_timestamp)) - { - $this->setCachedValue(date('r', $this->_timestamp)); - } - } - return $this->getCachedValue(); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/IdentificationHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/IdentificationHeader.php deleted file mode 100644 index 55ff73730d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/IdentificationHeader.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Headers/AbstractHeader.php'; -//@require 'Swift/RfcComplianceException.php'; - -/** - * An ID MIME Header for something like Message-ID or Content-ID. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_Headers_IdentificationHeader - extends Swift_Mime_Headers_AbstractHeader -{ - - /** - * The IDs used in the value of this Header. - * This may hold multiple IDs or just a single ID. - * @var string[] - * @access private - */ - private $_ids = array(); - - /** - * Creates a new IdentificationHeader with the given $name and $id. - * @param string $name - */ - public function __construct($name) - { - $this->setFieldName($name); - $this->initializeGrammar(); - } - - /** - * Get the type of Header that this instance represents. - * @return int - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - */ - public function getFieldType() - { - return self::TYPE_ID; - } - - /** - * Set the model for the field body. - * This method takes a string ID, or an array of IDs - * @param mixed $model - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setId($model); - } - - /** - * Get the model for the field body. - * This method returns an array of IDs - * @return array - */ - public function getFieldBodyModel() - { - return $this->getIds(); - } - - /** - * Set the ID used in the value of this header. - * @param string $id - * @throws Swift_RfcComplianceException - */ - public function setId($id) - { - return $this->setIds(array($id)); - } - - /** - * Get the ID used in the value of this Header. - * If multiple IDs are set only the first is returned. - * @return string - */ - public function getId() - { - if (count($this->_ids) > 0) - { - return $this->_ids[0]; - } - } - - /** - * Set a collection of IDs to use in the value of this Header. - * @param string[] $ids - * @throws Swift_RfcComplianceException - */ - public function setIds(array $ids) - { - $actualIds = array(); - - foreach ($ids as $k => $id) - { - if (preg_match( - '/^' . $this->getGrammar('id-left') . '@' . - $this->getGrammar('id-right') . '$/D', - $id - )) - { - $actualIds[] = $id; - } - else - { - throw new Swift_RfcComplianceException( - 'Invalid ID given <' . $id . '>' - ); - } - } - - $this->clearCachedValueIf($this->_ids != $actualIds); - $this->_ids = $actualIds; - } - - /** - * Get the list of IDs used in this Header. - * @return string[] - */ - public function getIds() - { - return $this->_ids; - } - - /** - * Get the string value of the body in this Header. - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * @return string - * @see toString() - * @throws Swift_RfcComplianceException - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) - { - $angleAddrs = array(); - - foreach ($this->_ids as $id) - { - $angleAddrs[] = '<' . $id . '>'; - } - - $this->setCachedValue(implode(' ', $angleAddrs)); - } - return $this->getCachedValue(); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/MailboxHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/MailboxHeader.php deleted file mode 100644 index 77d3bba22d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/MailboxHeader.php +++ /dev/null @@ -1,316 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Headers/AbstractHeader.php'; -//@require 'Swift/Mime/HeaderEncoder.php'; - -/** - * A Mailbox Address MIME Header for something like From or Sender. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_Headers_MailboxHeader extends Swift_Mime_Headers_AbstractHeader -{ - - /** - * The mailboxes used in this Header. - * @var string[] - * @access private - */ - private $_mailboxes = array(); - - /** - * Creates a new MailboxHeader with $name. - * @param string $name of Header - * @param Swift_Mime_HeaderEncoder $encoder - */ - public function __construct($name, Swift_Mime_HeaderEncoder $encoder) - { - $this->setFieldName($name); - $this->setEncoder($encoder); - $this->initializeGrammar(); - } - - /** - * Get the type of Header that this instance represents. - * @return int - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - */ - public function getFieldType() - { - return self::TYPE_MAILBOX; - } - - /** - * Set the model for the field body. - * This method takes a string, or an array of addresses. - * @param mixed $model - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setNameAddresses($model); - } - - /** - * Get the model for the field body. - * This method returns an associative array like {@link getNameAddresses()} - * @return array - * @throws Swift_RfcComplianceException - */ - public function getFieldBodyModel() - { - return $this->getNameAddresses(); - } - - /** - * Set a list of mailboxes to be shown in this Header. - * The mailboxes can be a simple array of addresses, or an array of - * key=>value pairs where (email => personalName). - * Example: - * <code> - * <?php - * //Sets two mailboxes in the Header, one with a personal name - * $header->setNameAddresses(array( - * 'chris@swiftmailer.org' => 'Chris Corbyn', - * 'mark@swiftmailer.org' //No associated personal name - * )); - * ?> - * </code> - * @param string|string[] $mailboxes - * @throws Swift_RfcComplianceException - * @see __construct() - * @see setAddresses() - * @see setValue() - */ - public function setNameAddresses($mailboxes) - { - $this->_mailboxes = $this->normalizeMailboxes((array) $mailboxes); - $this->setCachedValue(null); //Clear any cached value - } - - /** - * Get the full mailbox list of this Header as an array of valid RFC 2822 strings. - * Example: - * <code> - * <?php - * $header = new Swift_Mime_Headers_MailboxHeader('From', - * array('chris@swiftmailer.org' => 'Chris Corbyn', - * 'mark@swiftmailer.org' => 'Mark Corbyn') - * ); - * print_r($header->getNameAddressStrings()); - * // array ( - * // 0 => Chris Corbyn <chris@swiftmailer.org>, - * // 1 => Mark Corbyn <mark@swiftmailer.org> - * // ) - * ?> - * </code> - * @return string[] - * @throws Swift_RfcComplianceException - * @see getNameAddresses() - * @see toString() - */ - public function getNameAddressStrings() - { - return $this->_createNameAddressStrings($this->getNameAddresses()); - } - - /** - * Get all mailboxes in this Header as key=>value pairs. - * The key is the address and the value is the name (or null if none set). - * Example: - * <code> - * <?php - * $header = new Swift_Mime_Headers_MailboxHeader('From', - * array('chris@swiftmailer.org' => 'Chris Corbyn', - * 'mark@swiftmailer.org' => 'Mark Corbyn') - * ); - * print_r($header->getNameAddresses()); - * // array ( - * // chris@swiftmailer.org => Chris Corbyn, - * // mark@swiftmailer.org => Mark Corbyn - * // ) - * ?> - * </code> - * @return string[] - * @see getAddresses() - * @see getNameAddressStrings() - */ - public function getNameAddresses() - { - return $this->_mailboxes; - } - - /** - * Makes this Header represent a list of plain email addresses with no names. - * Example: - * <code> - * <?php - * //Sets three email addresses as the Header data - * $header->setAddresses( - * array('one@domain.tld', 'two@domain.tld', 'three@domain.tld') - * ); - * ?> - * </code> - * @param string[] $addresses - * @throws Swift_RfcComplianceException - * @see setNameAddresses() - * @see setValue() - */ - public function setAddresses($addresses) - { - return $this->setNameAddresses(array_values((array) $addresses)); - } - - /** - * Get all email addresses in this Header. - * @return string[] - * @see getNameAddresses() - */ - public function getAddresses() - { - return array_keys($this->_mailboxes); - } - - /** - * Remove one or more addresses from this Header. - * @param string|string[] $addresses - */ - public function removeAddresses($addresses) - { - $this->setCachedValue(null); - foreach ((array) $addresses as $address) - { - unset($this->_mailboxes[$address]); - } - } - - /** - * Get the string value of the body in this Header. - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * @return string - * @throws Swift_RfcComplianceException - * @see toString() - */ - public function getFieldBody() - { - //Compute the string value of the header only if needed - if (is_null($this->getCachedValue())) - { - $this->setCachedValue($this->createMailboxListString($this->_mailboxes)); - } - return $this->getCachedValue(); - } - - // -- Points of extension - - /** - * Normalizes a user-input list of mailboxes into consistent key=>value pairs. - * @param string[] $mailboxes - * @return string[] - * @access protected - */ - protected function normalizeMailboxes(array $mailboxes) - { - $actualMailboxes = array(); - - foreach ($mailboxes as $key => $value) - { - if (is_string($key)) //key is email addr - { - $address = $key; - $name = $value; - } - else - { - $address = $value; - $name = null; - } - $this->_assertValidAddress($address); - $actualMailboxes[$address] = $name; - } - - return $actualMailboxes; - } - - /** - * Produces a compliant, formatted display-name based on the string given. - * @param string $displayName as displayed - * @param boolean $shorten the first line to make remove for header name - * @return string - * @access protected - */ - protected function createDisplayNameString($displayName, $shorten = false) - { - return $this->createPhrase($this, $displayName, - $this->getCharset(), $this->getEncoder(), $shorten - ); - } - - /** - * Creates a string form of all the mailboxes in the passed array. - * @param string[] $mailboxes - * @return string - * @throws Swift_RfcComplianceException - * @access protected - */ - protected function createMailboxListString(array $mailboxes) - { - return implode(', ', $this->_createNameAddressStrings($mailboxes)); - } - - // -- Private methods - - /** - * Return an array of strings conforming the the name-addr spec of RFC 2822. - * @param string[] $mailboxes - * @return string[] - * @access private - */ - private function _createNameAddressStrings(array $mailboxes) - { - $strings = array(); - - foreach ($mailboxes as $email => $name) - { - $mailboxStr = $email; - if (!is_null($name)) - { - $nameStr = $this->createDisplayNameString($name, empty($strings)); - $mailboxStr = $nameStr . ' <' . $mailboxStr . '>'; - } - $strings[] = $mailboxStr; - } - - return $strings; - } - - /** - * Throws an Exception if the address passed does not comply with RFC 2822. - * @param string $address - * @throws Exception If invalid. - * @access protected - */ - private function _assertValidAddress($address) - { - if (!preg_match('/^' . $this->getGrammar('addr-spec') . '$/D', - $address)) - { - throw new Swift_RfcComplianceException( - 'Address in mailbox given [' . $address . - '] does not comply with RFC 2822, 3.6.2.' - ); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/ParameterizedHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/ParameterizedHeader.php deleted file mode 100644 index 974b44e2b0..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/ParameterizedHeader.php +++ /dev/null @@ -1,274 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Headers/UnstructuredHeader.php'; -//@require 'Swift/Mime/HeaderEncoder.php'; -//@require 'Swift/Mime/ParameterizedHeader.php'; -//@require 'Swift/Encoder.php'; - -/** - * An abstract base MIME Header. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_Headers_ParameterizedHeader - extends Swift_Mime_Headers_UnstructuredHeader - implements Swift_Mime_ParameterizedHeader -{ - - /** - * The Encoder used to encode the parameters. - * @var Swift_Encoder - * @access private - */ - private $_paramEncoder; - - /** - * The parameters as an associative array. - * @var string[] - * @access private - */ - private $_params = array(); - - /** - * RFC 2231's definition of a token. - * @var string - * @access private - */ - private $_tokenRe; - - /** - * Creates a new ParameterizedHeader with $name. - * @param string $name - * @param Swift_Mime_HeaderEncoder $encoder - * @param Swift_Encoder $paramEncoder, optional - */ - public function __construct($name, Swift_Mime_HeaderEncoder $encoder, - Swift_Encoder $paramEncoder = null) - { - $this->setFieldName($name); - $this->setEncoder($encoder); - $this->_paramEncoder = $paramEncoder; - $this->initializeGrammar(); - $this->_tokenRe = '(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)'; - } - - /** - * Get the type of Header that this instance represents. - * @return int - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - */ - public function getFieldType() - { - return self::TYPE_PARAMETERIZED; - } - - /** - * Set the character set used in this Header. - * @param string $charset - */ - public function setCharset($charset) - { - parent::setCharset($charset); - if (isset($this->_paramEncoder)) - { - $this->_paramEncoder->charsetChanged($charset); - } - } - - /** - * Set the value of $parameter. - * @param string $parameter - * @param string $value - */ - public function setParameter($parameter, $value) - { - $this->setParameters(array_merge($this->getParameters(), array($parameter => $value))); - } - - /** - * Get the value of $parameter. - * @return string - */ - public function getParameter($parameter) - { - $params = $this->getParameters(); - return array_key_exists($parameter, $params) - ? $params[$parameter] - : null; - } - - /** - * Set an associative array of parameter names mapped to values. - * @param string[] - */ - public function setParameters(array $parameters) - { - $this->clearCachedValueIf($this->_params != $parameters); - $this->_params = $parameters; - } - - /** - * Returns an associative array of parameter names mapped to values. - * @return string[] - */ - public function getParameters() - { - return $this->_params; - } - - /** - * Get the value of this header prepared for rendering. - * @return string - */ - public function getFieldBody() //TODO: Check caching here - { - $body = parent::getFieldBody(); - foreach ($this->_params as $name => $value) - { - if (!is_null($value)) - { - //Add the parameter - $body .= '; ' . $this->_createParameter($name, $value); - } - } - return $body; - } - - // -- Protected methods - - /** - * Generate a list of all tokens in the final header. - * This doesn't need to be overridden in theory, but it is for implementation - * reasons to prevent potential breakage of attributes. - * @return string[] - * @access protected - */ - protected function toTokens($string = null) - { - $tokens = parent::toTokens(parent::getFieldBody()); - - //Try creating any parameters - foreach ($this->_params as $name => $value) - { - if (!is_null($value)) - { - //Add the semi-colon separator - $tokens[count($tokens)-1] .= ';'; - $tokens = array_merge($tokens, $this->generateTokenLines( - ' ' . $this->_createParameter($name, $value) - )); - } - } - - return $tokens; - } - - // -- Private methods - - /** - * Render a RFC 2047 compliant header parameter from the $name and $value. - * @param string $name - * @param string $value - * @return string - * @access private - */ - private function _createParameter($name, $value) - { - $origValue = $value; - - $encoded = false; - //Allow room for parameter name, indices, "=" and DQUOTEs - $maxValueLength = $this->getMaxLineLength() - strlen($name . '=*N"";') - 1; - $firstLineOffset = 0; - - //If it's not already a valid parameter value... - if (!preg_match('/^' . $this->_tokenRe . '$/D', $value)) - { - //TODO: text, or something else?? - //... and it's not ascii - if (!preg_match('/^' . $this->getGrammar('text') . '*$/D', $value)) - { - $encoded = true; - //Allow space for the indices, charset and language - $maxValueLength = $this->getMaxLineLength() - strlen($name . '*N*="";') - 1; - $firstLineOffset = strlen( - $this->getCharset() . "'" . $this->getLanguage() . "'" - ); - } - } - - //Encode if we need to - if ($encoded || strlen($value) > $maxValueLength) - { - if (isset($this->_paramEncoder)) - { - $value = $this->_paramEncoder->encodeString( - $origValue, $firstLineOffset, $maxValueLength - ); - } - else //We have to go against RFC 2183/2231 in some areas for interoperability - { - $value = $this->getTokenAsEncodedWord($origValue); - $encoded = false; - } - } - - $valueLines = isset($this->_paramEncoder) ? explode("\r\n", $value) : array($value); - - //Need to add indices - if (count($valueLines) > 1) - { - $paramLines = array(); - foreach ($valueLines as $i => $line) - { - $paramLines[] = $name . '*' . $i . - $this->_getEndOfParameterValue($line, $encoded, $i == 0); - } - return implode(";\r\n ", $paramLines); - } - else - { - return $name . $this->_getEndOfParameterValue( - $valueLines[0], $encoded, true - ); - } - } - - /** - * Returns the parameter value from the "=" and beyond. - * @param string $value to append - * @param boolean $encoded - * @param boolean $firstLine - * @return string - * @access private - */ - private function _getEndOfParameterValue($value, $encoded = false, $firstLine = false) - { - if (!preg_match('/^' . $this->_tokenRe . '$/D', $value)) - { - $value = '"' . $value . '"'; - } - $prepend = '='; - if ($encoded) - { - $prepend = '*='; - if ($firstLine) - { - $prepend = '*=' . $this->getCharset() . "'" . $this->getLanguage() . - "'"; - } - } - return $prepend . $value; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/PathHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/PathHeader.php deleted file mode 100644 index 0a8a100a8f..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/PathHeader.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Headers/AbstractHeader.php'; -//@require 'Swift/RfcComplianceException.php'; - -/** - * A Path Header in Swift Mailer, such a Return-Path. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_Headers_PathHeader extends Swift_Mime_Headers_AbstractHeader -{ - - /** - * The address in this Header (if specified). - * @var string - * @access private - */ - private $_address; - - /** - * Creates a new PathHeader with the given $name. - * @param string $name - */ - public function __construct($name) - { - $this->setFieldName($name); - $this->initializeGrammar(); - } - - /** - * Get the type of Header that this instance represents. - * @return int - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - */ - public function getFieldType() - { - return self::TYPE_PATH; - } - - /** - * Set the model for the field body. - * This method takes a string for an address. - * @param string $model - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setAddress($model); - } - - /** - * Get the model for the field body. - * This method returns a string email address. - * @return mixed - */ - public function getFieldBodyModel() - { - return $this->getAddress(); - } - - /** - * Set the Address which should appear in this Header. - * @param string $address - * @throws Swift_RfcComplianceException - */ - public function setAddress($address) - { - if (is_null($address)) - { - $this->_address = null; - } - elseif ('' == $address - || preg_match('/^' . $this->getGrammar('addr-spec') . '$/D', $address)) - { - $this->_address = $address; - } - else - { - throw new Swift_RfcComplianceException( - 'Address set in PathHeader does not comply with addr-spec of RFC 2822.' - ); - } - $this->setCachedValue(null); - } - - /** - * Get the address which is used in this Header (if any). - * Null is returned if no address is set. - * @return string - */ - public function getAddress() - { - return $this->_address; - } - - /** - * Get the string value of the body in this Header. - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * @return string - * @see toString() - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) - { - if (isset($this->_address)) - { - $this->setCachedValue('<' . $this->_address . '>'); - } - } - return $this->getCachedValue(); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/UnstructuredHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/UnstructuredHeader.php deleted file mode 100644 index fdcc21ed16..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Headers/UnstructuredHeader.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Headers/AbstractHeader.php'; -//@require 'Swift/Mime/HeaderEncoder.php'; - -/** - * A Simple MIME Header. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_Headers_UnstructuredHeader - extends Swift_Mime_Headers_AbstractHeader -{ - - /** - * The value of this Header. - * @var string - * @access private - */ - private $_value; - - /** - * Creates a new SimpleHeader with $name. - * @param string $name - * @param Swift_Mime_HeaderEncoder $encoder - */ - public function __construct($name, Swift_Mime_HeaderEncoder $encoder) - { - $this->setFieldName($name); - $this->setEncoder($encoder); - } - /** - * Get the type of Header that this instance represents. - * @return int - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - */ - public function getFieldType() - { - return self::TYPE_TEXT; - } - - /** - * Set the model for the field body. - * This method takes a string for the field value. - * @param string $model - */ - public function setFieldBodyModel($model) - { - $this->setValue($model); - } - - /** - * Get the model for the field body. - * This method returns a string. - * @return string - */ - public function getFieldBodyModel() - { - return $this->getValue(); - } - - /** - * Get the (unencoded) value of this header. - * @return string - */ - public function getValue() - { - return $this->_value; - } - - /** - * Set the (unencoded) value of this header. - * @param string $value - */ - public function setValue($value) - { - $this->clearCachedValueIf($this->_value != $value); - $this->_value = $value; - } - - /** - * Get the value of this header prepared for rendering. - * @return string - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) - { - $this->setCachedValue( - str_replace('\\', '\\\\', $this->encodeWords( - $this, $this->_value, -1, $this->getCharset(), $this->getEncoder() - )) - ); - } - return $this->getCachedValue(); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/Message.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/Message.php deleted file mode 100644 index 0496c08773..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/Message.php +++ /dev/null @@ -1,230 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/MimeEntity.php'; - -/** - * A Message (RFC 2822) object. - * - * @package Swift - * @subpackage Mime - * - * @author Chris Corbyn - */ -interface Swift_Mime_Message extends Swift_Mime_MimeEntity -{ - - /** - * Generates a valid Message-ID and switches to it. - * - * @return string - */ - public function generateId(); - - /** - * Set the subject of the message. - * - * @param string $subject - */ - public function setSubject($subject); - - /** - * Get the subject of the message. - * - * @return string - */ - public function getSubject(); - - /** - * Set the origination date of the message as a UNIX timestamp. - * - * @param int $date - */ - public function setDate($date); - - /** - * Get the origination date of the message as a UNIX timestamp. - * - * @return int - */ - public function getDate(); - - /** - * Set the return-path (bounce-detect) address. - * - * @param string $address - */ - public function setReturnPath($address); - - /** - * Get the return-path (bounce-detect) address. - * - * @return string - */ - public function getReturnPath(); - - /** - * Set the sender of this message. - * - * If multiple addresses are present in the From field, this SHOULD be set. - * - * According to RFC 2822 it is a requirement when there are multiple From - * addresses, but Swift itself does not require it directly. - * - * An associative array (with one element!) can be used to provide a display- - * name: i.e. array('email@address' => 'Real Name'). - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $address - * @param string $name optional - */ - public function setSender($address, $name = null); - - /** - * Get the sender address for this message. - * - * This has a higher significance than the From address. - * - * @return string - */ - public function getSender(); - - /** - * Set the From address of this message. - * - * It is permissible for multiple From addresses to be set using an array. - * - * If multiple From addresses are used, you SHOULD set the Sender address and - * according to RFC 2822, MUST set the sender address. - * - * An array can be used if display names are to be provided: i.e. - * array('email@address.com' => 'Real Name'). - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setFrom($addresses, $name = null); - - /** - * Get the From address(es) of this message. - * - * This method always returns an associative array where the keys are the - * addresses. - * - * @return string[] - */ - public function getFrom(); - - /** - * Set the Reply-To address(es). - * - * Any replies from the receiver will be sent to this address. - * - * It is permissible for multiple reply-to addresses to be set using an array. - * - * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setReplyTo($addresses, $name = null); - - /** - * Get the Reply-To addresses for this message. - * - * This method always returns an associative array where the keys provide the - * email addresses. - * - * @return string[] - */ - public function getReplyTo(); - - /** - * Set the To address(es). - * - * Recipients set in this field will receive a copy of this message. - * - * This method has the same synopsis as {@link setFrom()} and {@link setCc()}. - * - * If the second parameter is provided and the first is a string, then $name - * is associated with the address. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setTo($addresses, $name = null); - - /** - * Get the To addresses for this message. - * - * This method always returns an associative array, whereby the keys provide - * the actual email addresses. - * - * @return string[] - */ - public function getTo(); - - /** - * Set the Cc address(es). - * - * Recipients set in this field will receive a 'carbon-copy' of this message. - * - * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setCc($addresses, $name = null); - - /** - * Get the Cc addresses for this message. - * - * This method always returns an associative array, whereby the keys provide - * the actual email addresses. - * - * @return string[] - */ - public function getCc(); - - /** - * Set the Bcc address(es). - * - * Recipients set in this field will receive a 'blind-carbon-copy' of this - * message. - * - * In other words, they will get the message, but any other recipients of the - * message will have no such knowledge of their receipt of it. - * - * This method has the same synopsis as {@link setFrom()} and {@link setTo()}. - * - * @param mixed $addresses - * @param string $name optional - */ - public function setBcc($addresses, $name = null); - - /** - * Get the Bcc addresses for this message. - * - * This method always returns an associative array, whereby the keys provide - * the actual email addresses. - * - * @return string[] - */ - public function getBcc(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/MimeEntity.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/MimeEntity.php deleted file mode 100644 index 2b08009d99..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/MimeEntity.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/Mime/EncodingObserver.php'; -//@require 'Swift/Mime/CharsetObserver.php'; - -/** - * A MIME entity, such as an attachment. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -interface Swift_Mime_MimeEntity - extends Swift_Mime_CharsetObserver, Swift_Mime_EncodingObserver -{ - - /** Main message document; there can only be one of these */ - const LEVEL_TOP = 16; - - /** An entity which nests with the same precedence as an attachment */ - const LEVEL_MIXED = 256; - - /** An entity which nests with the same precedence as a mime part */ - const LEVEL_ALTERNATIVE = 4096; - - /** An entity which nests with the same precedence as embedded content */ - const LEVEL_RELATED = 65536; - - /** - * Get the level at which this entity shall be nested in final document. - * The lower the value, the more outermost the entity will be nested. - * @return int - * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE - */ - public function getNestingLevel(); - - /** - * Get the qualified content-type of this mime entity. - * @return string - */ - public function getContentType(); - - /** - * Returns a unique ID for this entity. - * For most entities this will likely be the Content-ID, though it has - * no explicit semantic meaning and can be considered an identifier for - * programming logic purposes. - * If a Content-ID header is present, this value SHOULD match the value of - * the header. - * @return string - */ - public function getId(); - - /** - * Get all children nested inside this entity. - * These are not just the immediate children, but all children. - * @return Swift_Mime_MimeEntity[] - */ - public function getChildren(); - - /** - * Set all children nested inside this entity. - * This includes grandchildren. - * @param Swift_Mime_MimeEntity[] $children - */ - public function setChildren(array $children); - - /** - * Get the collection of Headers in this Mime entity. - * @return Swift_Mime_Header[] - */ - public function getHeaders(); - - /** - * Get the body content of this entity as a string. - * Returns NULL if no body has been set. - * @return string - */ - public function getBody(); - - /** - * Set the body content of this entity as a string. - * @param string $body - * @param string $contentType optional - */ - public function setBody($body, $contentType = null); - - /** - * Get this entire entity in its string form. - * @return string - */ - public function toString(); - - /** - * Get this entire entity as a ByteStream. - * @param Swift_InputByteStream $is to write to - */ - public function toByteStream(Swift_InputByteStream $is); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/MimePart.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/MimePart.php deleted file mode 100644 index 78c6fe09f4..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/MimePart.php +++ /dev/null @@ -1,196 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/SimpleMimeEntity.php'; -//@require 'Swift/Mime/ContentEncoder.php'; -//@require 'Swift/Mime/HeaderSet.php'; -//@require 'Swift/KeyCache.php'; - -/** - * A MIME part, in a multipart message. - * - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_MimePart extends Swift_Mime_SimpleMimeEntity -{ - - /** The format parameter last specified by the user */ - protected $_userFormat; - - /** The charset last specified by the user */ - protected $_userCharset; - - /** The delsp parameter last specified by the user */ - protected $_userDelSp; - - /** The nesting level of this MimePart */ - private $_nestingLevel = self::LEVEL_ALTERNATIVE; - - /** - * Create a new MimePart with $headers, $encoder and $cache. - * - * @param Swift_Mime_HeaderSet $headers - * @param Swift_Mime_ContentEncoder $encoder - * @param Swift_KeyCache $cache - * @param string $charset - */ - public function __construct(Swift_Mime_HeaderSet $headers, - Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, $charset = null) - { - parent::__construct($headers, $encoder, $cache); - $this->setContentType('text/plain'); - if (!is_null($charset)) - { - $this->setCharset($charset); - } - } - - /** - * Set the body of this entity, either as a string, or as an instance of - * {@link Swift_OutputByteStream}. - * - * @param mixed $body - * @param string $contentType optional - * @param string $charset optional - */ - public function setBody($body, $contentType = null, $charset = null) - { - parent::setBody($body, $contentType); - if (isset($charset)) - { - $this->setCharset($charset); - } - return $this; - } - - /** - * Get the character set of this entity. - * - * @return string - */ - public function getCharset() - { - return $this->_getHeaderParameter('Content-Type', 'charset'); - } - - /** - * Set the character set of this entity. - * - * @param string $charset - */ - public function setCharset($charset) - { - $this->_setHeaderParameter('Content-Type', 'charset', $charset); - if ($charset !== $this->_userCharset) - { - $this->_clearCache(); - } - $this->_userCharset = $charset; - parent::charsetChanged($charset); - return $this; - } - - /** - * Get the format of this entity (i.e. flowed or fixed). - * - * @return string - */ - public function getFormat() - { - return $this->_getHeaderParameter('Content-Type', 'format'); - } - - /** - * Set the format of this entity (flowed or fixed). - * - * @param string $format - */ - public function setFormat($format) - { - $this->_setHeaderParameter('Content-Type', 'format', $format); - $this->_userFormat = $format; - return $this; - } - - /** - * Test if delsp is being used for this entity. - * - * @return boolean - */ - public function getDelSp() - { - return ($this->_getHeaderParameter('Content-Type', 'delsp') == 'yes') - ? true - : false; - } - - /** - * Turn delsp on or off for this entity. - * - * @param boolean $delsp - */ - public function setDelSp($delsp = true) - { - $this->_setHeaderParameter('Content-Type', 'delsp', $delsp ? 'yes' : null); - $this->_userDelSp = $delsp; - return $this; - } - - /** - * Get the nesting level of this entity. - * - * @return int - * @see LEVEL_TOP, LEVEL_ALTERNATIVE, LEVEL_MIXED, LEVEL_RELATED - */ - public function getNestingLevel() - { - return $this->_nestingLevel; - } - - /** - * Receive notification that the charset has changed on this document, or a - * parent document. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->setCharset($charset); - } - - // -- Protected methods - - /** Fix the content-type and encoding of this entity */ - protected function _fixHeaders() - { - parent::_fixHeaders(); - if (count($this->getChildren())) - { - $this->_setHeaderParameter('Content-Type', 'charset', null); - $this->_setHeaderParameter('Content-Type', 'format', null); - $this->_setHeaderParameter('Content-Type', 'delsp', null); - } - else - { - $this->setCharset($this->_userCharset); - $this->setFormat($this->_userFormat); - $this->setDelSp($this->_userDelSp); - } - } - - /** Set the nesting level of this entity */ - protected function _setNestingLevel($level) - { - $this->_nestingLevel = $level; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/ParameterizedHeader.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/ParameterizedHeader.php deleted file mode 100644 index da65ca98c5..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/ParameterizedHeader.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Header.php'; - -/** - * A MIME Header with parameters. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -interface Swift_Mime_ParameterizedHeader extends Swift_Mime_Header -{ - - /** - * Set the value of $parameter. - * @param string $parameter - * @param string $value - */ - public function setParameter($parameter, $value); - - /** - * Get the value of $parameter. - * @return string - */ - public function getParameter($parameter); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php deleted file mode 100644 index 6954ac5c0a..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleHeaderFactory.php +++ /dev/null @@ -1,187 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/HeaderFactory.php'; -//@require 'Swift/Mime/HeaderEncoder.php'; -//@require 'Swift/Encoder.php'; -//@require 'Swift/Mime/Headers/MailboxHeader.php'; -//@require 'Swift/Mime/Headers/DateHeader.php'; -//@require 'Swift/Mime/Headers/UnstructuredHeader.php'; -//@require 'Swift/Mime/Headers/ParameterizedHeader.php'; -//@require 'Swift/Mime/Headers/IdentificationHeader.php'; -//@require 'Swift/Mime/Headers/PathHeader.php'; - -/** - * Creates MIME headers. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_SimpleHeaderFactory implements Swift_Mime_HeaderFactory -{ - - /** The HeaderEncoder used by these headers */ - private $_encoder; - - /** The Encoder used by parameters */ - private $_paramEncoder; - - /** The charset of created Headers */ - private $_charset; - - /** - * Creates a new SimpleHeaderFactory using $encoder and $paramEncoder. - * @param Swift_Mime_HeaderEncoder $encoder - * @param Swift_Encoder $paramEncoder - * @param string $charset - */ - public function __construct(Swift_Mime_HeaderEncoder $encoder, - Swift_Encoder $paramEncoder, $charset = null) - { - $this->_encoder = $encoder; - $this->_paramEncoder = $paramEncoder; - $this->_charset = $charset; - } - - /** - * Create a new Mailbox Header with a list of $addresses. - * @param string $name - * @param array|string $addresses - * @return Swift_Mime_Header - */ - public function createMailboxHeader($name, $addresses = null) - { - $header = new Swift_Mime_Headers_MailboxHeader($name, $this->_encoder); - if (isset($addresses)) - { - $header->setFieldBodyModel($addresses); - } - $this->_setHeaderCharset($header); - return $header; - } - - /** - * Create a new Date header using $timestamp (UNIX time). - * @param string $name - * @param int $timestamp - * @return Swift_Mime_Header - */ - public function createDateHeader($name, $timestamp = null) - { - $header = new Swift_Mime_Headers_DateHeader($name); - if (isset($timestamp)) - { - $header->setFieldBodyModel($timestamp); - } - $this->_setHeaderCharset($header); - return $header; - } - - /** - * Create a new basic text header with $name and $value. - * @param string $name - * @param string $value - * @return Swift_Mime_Header - */ - public function createTextHeader($name, $value = null) - { - $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->_encoder); - if (isset($value)) - { - $header->setFieldBodyModel($value); - } - $this->_setHeaderCharset($header); - return $header; - } - - /** - * Create a new ParameterizedHeader with $name, $value and $params. - * @param string $name - * @param string $value - * @param array $params - * @return Swift_Mime_ParameterizedHeader - */ - public function createParameterizedHeader($name, $value = null, - $params = array()) - { - $header = new Swift_Mime_Headers_ParameterizedHeader($name, - $this->_encoder, (strtolower($name) == 'content-disposition') - ? $this->_paramEncoder - : null - ); - if (isset($value)) - { - $header->setFieldBodyModel($value); - } - foreach ($params as $k => $v) - { - $header->setParameter($k, $v); - } - $this->_setHeaderCharset($header); - return $header; - } - - /** - * Create a new ID header for Message-ID or Content-ID. - * @param string $name - * @param string|array $ids - * @return Swift_Mime_Header - */ - public function createIdHeader($name, $ids = null) - { - $header = new Swift_Mime_Headers_IdentificationHeader($name); - if (isset($ids)) - { - $header->setFieldBodyModel($ids); - } - $this->_setHeaderCharset($header); - return $header; - } - - /** - * Create a new Path header with an address (path) in it. - * @param string $name - * @param string $path - * @return Swift_Mime_Header - */ - public function createPathHeader($name, $path = null) - { - $header = new Swift_Mime_Headers_PathHeader($name); - if (isset($path)) - { - $header->setFieldBodyModel($path); - } - $this->_setHeaderCharset($header); - return $header; - } - - /** - * Notify this observer that the entity's charset has changed. - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_charset = $charset; - $this->_encoder->charsetChanged($charset); - $this->_paramEncoder->charsetChanged($charset); - } - - // -- Private methods - - /** Apply the charset to the Header */ - private function _setHeaderCharset(Swift_Mime_Header $header) - { - if (isset($this->_charset)) - { - $header->setCharset($this->_charset); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleHeaderSet.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleHeaderSet.php deleted file mode 100644 index eeb0221bb4..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleHeaderSet.php +++ /dev/null @@ -1,396 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/HeaderSet.php'; -//@require 'Swift/Mime/HeaderFactory.php'; - -/** - * A collection of MIME headers. - * - * @package Swift - * @subpackage Mime - * - * @author Chris Corbyn - */ -class Swift_Mime_SimpleHeaderSet implements Swift_Mime_HeaderSet -{ - - /** HeaderFactory */ - private $_factory; - - /** Collection of set Headers */ - private $_headers = array(); - - /** Field ordering details */ - private $_order = array(); - - /** List of fields which are required to be displayed */ - private $_required = array(); - - /** The charset used by Headers */ - private $_charset; - - /** - * Create a new SimpleHeaderSet with the given $factory. - * - * @param Swift_Mime_HeaderFactory $factory - * @param string $charset - */ - public function __construct(Swift_Mime_HeaderFactory $factory, - $charset = null) - { - $this->_factory = $factory; - if (isset($charset)) - { - $this->setCharset($charset); - } - } - - /** - * Set the charset used by these headers. - * - * @param string $charset - */ - public function setCharset($charset) - { - $this->_charset = $charset; - $this->_factory->charsetChanged($charset); - $this->_notifyHeadersOfCharset($charset); - } - - /** - * Add a new Mailbox Header with a list of $addresses. - * - * @param string $name - * @param array|string $addresses - */ - public function addMailboxHeader($name, $addresses = null) - { - $this->_storeHeader($name, - $this->_factory->createMailboxHeader($name, $addresses)); - } - - /** - * Add a new Date header using $timestamp (UNIX time). - * - * @param string $name - * @param int $timestamp - */ - public function addDateHeader($name, $timestamp = null) - { - $this->_storeHeader($name, - $this->_factory->createDateHeader($name, $timestamp)); - } - - /** - * Add a new basic text header with $name and $value. - * - * @param string $name - * @param string $value - */ - public function addTextHeader($name, $value = null) - { - $this->_storeHeader($name, - $this->_factory->createTextHeader($name, $value)); - } - - /** - * Add a new ParameterizedHeader with $name, $value and $params. - * - * @param string $name - * @param string $value - * @param array $params - */ - public function addParameterizedHeader($name, $value = null, - $params = array()) - { - $this->_storeHeader($name, - $this->_factory->createParameterizedHeader($name, $value, - $params)); - } - - /** - * Add a new ID header for Message-ID or Content-ID. - * - * @param string $name - * @param string|array $ids - */ - public function addIdHeader($name, $ids = null) - { - $this->_storeHeader($name, $this->_factory->createIdHeader($name, $ids)); - } - - /** - * Add a new Path header with an address (path) in it. - * - * @param string $name - * @param string $path - */ - public function addPathHeader($name, $path = null) - { - $this->_storeHeader($name, $this->_factory->createPathHeader($name, $path)); - } - - /** - * Returns true if at least one header with the given $name exists. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param int $index - * - * @return boolean - */ - public function has($name, $index = 0) - { - $lowerName = strtolower($name); - return array_key_exists($lowerName, $this->_headers) - && array_key_exists($index, $this->_headers[$lowerName]); - } - - /** - * Set a header in the HeaderSet. - * - * The header may be a previously fetched header via {@link get()} or it may - * be one that has been created separately. - * - * If $index is specified, the header will be inserted into the set at this - * offset. - * - * @param Swift_Mime_Header $header - * @param int $index - */ - public function set(Swift_Mime_Header $header, $index = 0) - { - $this->_storeHeader($header->getFieldName(), $header, $index); - } - - /** - * Get the header with the given $name. - * - * If multiple headers match, the actual one may be specified by $index. - * Returns NULL if none present. - * - * @param string $name - * @param int $index - * - * @return Swift_Mime_Header - */ - public function get($name, $index = 0) - { - if ($this->has($name, $index)) - { - $lowerName = strtolower($name); - return $this->_headers[$lowerName][$index]; - } - } - - /** - * Get all headers with the given $name. - * - * @param string $name - * - * @return array - */ - public function getAll($name = null) - { - if (!isset($name)) - { - $headers = array(); - foreach ($this->_headers as $collection) - { - $headers = array_merge($headers, $collection); - } - return $headers; - } - - $lowerName = strtolower($name); - if (!array_key_exists($lowerName, $this->_headers)) - { - return array(); - } - return $this->_headers[$lowerName]; - } - - /** - * Remove the header with the given $name if it's set. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param int $index - */ - public function remove($name, $index = 0) - { - $lowerName = strtolower($name); - unset($this->_headers[$lowerName][$index]); - } - - /** - * Remove all headers with the given $name. - * - * @param string $name - */ - public function removeAll($name) - { - $lowerName = strtolower($name); - unset($this->_headers[$lowerName]); - } - - /** - * Create a new instance of this HeaderSet. - * - * @return Swift_Mime_HeaderSet - */ - public function newInstance() - { - return new self($this->_factory); - } - - /** - * Define a list of Header names as an array in the correct order. - * - * These Headers will be output in the given order where present. - * - * @param array $sequence - */ - public function defineOrdering(array $sequence) - { - $this->_order = array_flip(array_map('strtolower', $sequence)); - } - - /** - * Set a list of header names which must always be displayed when set. - * - * Usually headers without a field value won't be output unless set here. - * - * @param array $names - */ - public function setAlwaysDisplayed(array $names) - { - $this->_required = array_flip(array_map('strtolower', $names)); - } - - /** - * Notify this observer that the entity's charset has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->setCharset($charset); - } - - /** - * Returns a string with a representation of all headers. - * - * @return string - */ - public function toString() - { - $string = ''; - $headers = $this->_headers; - if ($this->_canSort()) - { - uksort($headers, array($this, '_sortHeaders')); - } - foreach ($headers as $collection) - { - foreach ($collection as $header) - { - if ($this->_isDisplayed($header) || $header->getFieldBody() != '') - { - $string .= $header->toString(); - } - } - } - return $string; - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - // -- Private methods - - /** Save a Header to the internal collection */ - private function _storeHeader($name, Swift_Mime_Header $header, $offset = null) - { - if (!isset($this->_headers[strtolower($name)])) - { - $this->_headers[strtolower($name)] = array(); - } - if (!isset($offset)) - { - $this->_headers[strtolower($name)][] = $header; - } - else - { - $this->_headers[strtolower($name)][$offset] = $header; - } - } - - /** Test if the headers can be sorted */ - private function _canSort() - { - return count($this->_order) > 0; - } - - /** uksort() algorithm for Header ordering */ - private function _sortHeaders($a, $b) - { - $lowerA = strtolower($a); - $lowerB = strtolower($b); - $aPos = array_key_exists($lowerA, $this->_order) - ? $this->_order[$lowerA] - : -1; - $bPos = array_key_exists($lowerB, $this->_order) - ? $this->_order[$lowerB] - : -1; - - if ($aPos == -1) - { - return 1; - } - elseif ($bPos == -1) - { - return -1; - } - - return ($aPos < $bPos) ? -1 : 1; - } - - /** Test if the given Header is always displayed */ - private function _isDisplayed(Swift_Mime_Header $header) - { - return array_key_exists(strtolower($header->getFieldName()), $this->_required); - } - - /** Notify all Headers of the new charset */ - private function _notifyHeadersOfCharset($charset) - { - foreach ($this->_headers as $headerGroup) - { - foreach ($headerGroup as $header) - { - $header->setCharset($charset); - } - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleMessage.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleMessage.php deleted file mode 100644 index bbe1e8fc5d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleMessage.php +++ /dev/null @@ -1,609 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Message.php'; -//@require 'Swift/Mime/MimePart.php'; -//@require 'Swift/Mime/MimeEntity.php'; -//@require 'Swift/Mime/HeaderSet.php'; -//@require 'Swift/Mime/ContentEncoder.php'; - -/** - * The default email message class. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart - implements Swift_Mime_Message -{ - - /** - * Create a new SimpleMessage with $headers, $encoder and $cache. - * @param Swift_Mime_HeaderSet $headers - * @param Swift_Mime_ContentEncoder $encoder - * @param Swift_KeyCache $cache - * @param string $charset - */ - public function __construct(Swift_Mime_HeaderSet $headers, - Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, $charset = null) - { - parent::__construct($headers, $encoder, $cache, $charset); - $this->getHeaders()->defineOrdering(array( - 'Return-Path', - 'Sender', - 'Message-ID', - 'Date', - 'Subject', - 'From', - 'Reply-To', - 'To', - 'Cc', - 'Bcc', - 'MIME-Version', - 'Content-Type', - 'Content-Transfer-Encoding' - )); - $this->getHeaders()->setAlwaysDisplayed( - array('Date', 'Message-ID', 'From') - ); - $this->getHeaders()->addTextHeader('MIME-Version', '1.0'); - $this->setDate(time()); - $this->setId($this->getId()); - $this->getHeaders()->addMailboxHeader('From'); - } - - /** - * Always returns {@link LEVEL_TOP} for a message instance. - * @return int - */ - public function getNestingLevel() - { - return self::LEVEL_TOP; - } - - /** - * Set the subject of this message. - * @param string $subject - */ - public function setSubject($subject) - { - if (!$this->_setHeaderFieldModel('Subject', $subject)) - { - $this->getHeaders()->addTextHeader('Subject', $subject); - } - return $this; - } - - /** - * Get the subject of this message. - * @return string - */ - public function getSubject() - { - return $this->_getHeaderFieldModel('Subject'); - } - - /** - * Set the date at which this message was created. - * @param int $date - */ - public function setDate($date) - { - if (!$this->_setHeaderFieldModel('Date', $date)) - { - $this->getHeaders()->addDateHeader('Date', $date); - } - return $this; - } - - /** - * Get the date at which this message was created. - * @return int - */ - public function getDate() - { - return $this->_getHeaderFieldModel('Date'); - } - - /** - * Set the return-path (the bounce address) of this message. - * @param string $address - */ - public function setReturnPath($address) - { - if (!$this->_setHeaderFieldModel('Return-Path', $address)) - { - $this->getHeaders()->addPathHeader('Return-Path', $address); - } - return $this; - } - - /** - * Get the return-path (bounce address) of this message. - * @return string - */ - public function getReturnPath() - { - return $this->_getHeaderFieldModel('Return-Path'); - } - - /** - * Set the sender of this message. - * This does not override the From field, but it has a higher significance. - * @param string $sender - * @param string $name optional - */ - public function setSender($address, $name = null) - { - if (!is_array($address) && isset($name)) - { - $address = array($address => $name); - } - - if (!$this->_setHeaderFieldModel('Sender', (array) $address)) - { - $this->getHeaders()->addMailboxHeader('Sender', (array) $address); - } - return $this; - } - - /** - * Get the sender of this message. - * @return string - */ - public function getSender() - { - return $this->_getHeaderFieldModel('Sender'); - } - - /** - * Add a From: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - */ - public function addFrom($address, $name = null) - { - $current = $this->getFrom(); - $current[$address] = $name; - return $this->setFrom($current); - } - - /** - * Set the from address of this message. - * - * You may pass an array of addresses if this message is from multiple people. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param string $addresses - * @param string $name optional - */ - public function setFrom($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) - { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('From', (array) $addresses)) - { - $this->getHeaders()->addMailboxHeader('From', (array) $addresses); - } - return $this; - } - - /** - * Get the from address of this message. - * - * @return string - */ - public function getFrom() - { - return $this->_getHeaderFieldModel('From'); - } - - /** - * Add a Reply-To: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - */ - public function addReplyTo($address, $name = null) - { - $current = $this->getReplyTo(); - $current[$address] = $name; - return $this->setReplyTo($current); - } - - /** - * Set the reply-to address of this message. - * - * You may pass an array of addresses if replies will go to multiple people. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param string $addresses - * @param string $name optional - */ - public function setReplyTo($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) - { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('Reply-To', (array) $addresses)) - { - $this->getHeaders()->addMailboxHeader('Reply-To', (array) $addresses); - } - return $this; - } - - /** - * Get the reply-to address of this message. - * - * @return string - */ - public function getReplyTo() - { - return $this->_getHeaderFieldModel('Reply-To'); - } - - /** - * Add a To: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - */ - public function addTo($address, $name = null) - { - $current = $this->getTo(); - $current[$address] = $name; - return $this->setTo($current); - } - - /** - * Set the to addresses of this message. - * - * If multiple recipients will receive the message and array should be used. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param array $addresses - * @param string $name optional - */ - public function setTo($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) - { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('To', (array) $addresses)) - { - $this->getHeaders()->addMailboxHeader('To', (array) $addresses); - } - return $this; - } - - /** - * Get the To addresses of this message. - * - * @return array - */ - public function getTo() - { - return $this->_getHeaderFieldModel('To'); - } - - /** - * Add a Cc: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - */ - public function addCc($address, $name = null) - { - $current = $this->getCc(); - $current[$address] = $name; - return $this->setCc($current); - } - - /** - * Set the Cc addresses of this message. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param array $addresses - * @param string $name optional - */ - public function setCc($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) - { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('Cc', (array) $addresses)) - { - $this->getHeaders()->addMailboxHeader('Cc', (array) $addresses); - } - return $this; - } - - /** - * Get the Cc address of this message. - * - * @return array - */ - public function getCc() - { - return $this->_getHeaderFieldModel('Cc'); - } - - /** - * Add a Bcc: address to this message. - * - * If $name is passed this name will be associated with the address. - * - * @param string $address - * @param string $name optional - */ - public function addBcc($address, $name = null) - { - $current = $this->getBcc(); - $current[$address] = $name; - return $this->setBcc($current); - } - - /** - * Set the Bcc addresses of this message. - * - * If $name is passed and the first parameter is a string, this name will be - * associated with the address. - * - * @param array $addresses - * @param string $name optional - */ - public function setBcc($addresses, $name = null) - { - if (!is_array($addresses) && isset($name)) - { - $addresses = array($addresses => $name); - } - - if (!$this->_setHeaderFieldModel('Bcc', (array) $addresses)) - { - $this->getHeaders()->addMailboxHeader('Bcc', (array) $addresses); - } - return $this; - } - - /** - * Get the Bcc addresses of this message. - * - * @return array - */ - public function getBcc() - { - return $this->_getHeaderFieldModel('Bcc'); - } - - /** - * Set the priority of this message. - * The value is an integer where 1 is the highest priority and 5 is the lowest. - * @param int $priority - */ - public function setPriority($priority) - { - $priorityMap = array( - 1 => 'Highest', - 2 => 'High', - 3 => 'Normal', - 4 => 'Low', - 5 => 'Lowest' - ); - $pMapKeys = array_keys($priorityMap); - if ($priority > max($pMapKeys)) - { - $priority = max($pMapKeys); - } - elseif ($priority < min($pMapKeys)) - { - $priority = min($pMapKeys); - } - if (!$this->_setHeaderFieldModel('X-Priority', - sprintf('%d (%s)', $priority, $priorityMap[$priority]))) - { - $this->getHeaders()->addTextHeader('X-Priority', - sprintf('%d (%s)', $priority, $priorityMap[$priority])); - } - return $this; - } - - /** - * Get the priority of this message. - * The returned value is an integer where 1 is the highest priority and 5 - * is the lowest. - * @return int - */ - public function getPriority() - { - list($priority) = sscanf($this->_getHeaderFieldModel('X-Priority'), - '%[1-5]' - ); - return isset($priority) ? $priority : 3; - } - - /** - * Ask for a delivery receipt from the recipient to be sent to $addresses - * @param array $addresses - */ - public function setReadReceiptTo($addresses) - { - if (!$this->_setHeaderFieldModel('Disposition-Notification-To', $addresses)) - { - $this->getHeaders() - ->addMailboxHeader('Disposition-Notification-To', $addresses); - } - return $this; - } - - /** - * Get the addresses to which a read-receipt will be sent. - * @return string - */ - public function getReadReceiptTo() - { - return $this->_getHeaderFieldModel('Disposition-Notification-To'); - } - - /** - * Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart. - * @param Swift_Mime_MimeEntity $entity - */ - public function attach(Swift_Mime_MimeEntity $entity) - { - $this->setChildren(array_merge($this->getChildren(), array($entity))); - return $this; - } - - /** - * Remove an already attached entity. - * @param Swift_Mime_MimeEntity $entity - */ - public function detach(Swift_Mime_MimeEntity $entity) - { - $newChildren = array(); - foreach ($this->getChildren() as $child) - { - if ($entity !== $child) - { - $newChildren[] = $child; - } - } - $this->setChildren($newChildren); - return $this; - } - - /** - * Attach a {@link Swift_Mime_MimeEntity} and return it's CID source. - * This method should be used when embedding images or other data in a message. - * @param Swift_Mime_MimeEntity $entity - * @return string - */ - public function embed(Swift_Mime_MimeEntity $entity) - { - $this->attach($entity); - return 'cid:' . $entity->getId(); - } - - /** - * Get this message as a complete string. - * @return string - */ - public function toString() - { - if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') - { - $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); - $string = parent::toString(); - $this->setChildren($children); - } - else - { - $string = parent::toString(); - } - return $string; - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - /** - * Write this message to a {@link Swift_InputByteStream}. - * @param Swift_InputByteStream $is - */ - public function toByteStream(Swift_InputByteStream $is) - { - if (count($children = $this->getChildren()) > 0 && $this->getBody() != '') - { - $this->setChildren(array_merge(array($this->_becomeMimePart()), $children)); - parent::toByteStream($is); - $this->setChildren($children); - } - else - { - parent::toByteStream($is); - } - } - - // -- Protected methods - - /** @see Swift_Mime_SimpleMimeEntity::_getIdField() */ - protected function _getIdField() - { - return 'Message-ID'; - } - - // -- Private methods - - /** Turn the body of this message into a child of itself if needed */ - private function _becomeMimePart() - { - $part = new parent($this->getHeaders()->newInstance(), $this->getEncoder(), - $this->_getCache(), $this->_userCharset - ); - $part->setContentType($this->_userContentType); - $part->setBody($this->getBody()); - $part->setFormat($this->_userFormat); - $part->setDelSp($this->_userDelSp); - $part->_setNestingLevel($this->_getTopNestingLevel()); - return $part; - } - - /** Get the highest nesting level nested inside this message */ - private function _getTopNestingLevel() - { - $highestLevel = $this->getNestingLevel(); - foreach ($this->getChildren() as $child) - { - $childLevel = $child->getNestingLevel(); - if ($highestLevel < $childLevel) - { - $highestLevel = $childLevel; - } - } - return $highestLevel; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleMimeEntity.php b/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleMimeEntity.php deleted file mode 100644 index a392145cb9..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Mime/SimpleMimeEntity.php +++ /dev/null @@ -1,793 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/HeaderSet.php'; -//@require 'Swift/OutputByteStream.php'; -//@require 'Swift/Mime/ContentEncoder.php'; -//@require 'Swift/KeyCache.php'; - -/** - * A MIME entity, in a multipart message. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_Mime_SimpleMimeEntity implements Swift_Mime_MimeEntity -{ - - /** A collection of Headers for this mime entity */ - private $_headers; - - /** The body as a string, or a stream */ - private $_body; - - /** The encoder that encodes the body into a streamable format */ - private $_encoder; - - /** A mime bounary, if any is used */ - private $_boundary; - - /** Mime types to be used based on the nesting level */ - private $_compositeRanges = array( - 'multipart/mixed' => array(self::LEVEL_TOP, self::LEVEL_MIXED), - 'multipart/alternative' => array(self::LEVEL_MIXED, self::LEVEL_ALTERNATIVE), - 'multipart/related' => array(self::LEVEL_ALTERNATIVE, self::LEVEL_RELATED) - ); - - /** A set of filter rules to define what level an entity should be nested at */ - private $_compoundLevelFilters = array(); - - /** The nesting level of this entity */ - private $_nestingLevel = self::LEVEL_ALTERNATIVE; - - /** A KeyCache instance used during encoding and streaming */ - private $_cache; - - /** Direct descendants of this entity */ - private $_immediateChildren = array(); - - /** All descendants of this entity */ - private $_children = array(); - - /** The maximum line length of the body of this entity */ - private $_maxLineLength = 78; - - /** The order in which alternative mime types should appear */ - private $_alternativePartOrder = array( - 'text/plain' => 1, - 'text/html' => 2, - 'multipart/related' => 3 - ); - - /** The CID of this entity */ - private $_id; - - /** The key used for accessing the cache */ - private $_cacheKey; - - protected $_userContentType; - - /** - * Create a new SimpleMimeEntity with $headers, $encoder and $cache. - * @param Swift_Mime_HeaderSet $headers - * @param Swift_Mime_ContentEncoder $encoder - * @param Swift_KeyCache $cache - */ - public function __construct(Swift_Mime_HeaderSet $headers, - Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache) - { - $this->_cacheKey = uniqid(); - $this->_cache = $cache; - $this->_headers = $headers; - $this->setEncoder($encoder); - $this->_headers->defineOrdering( - array('Content-Type', 'Content-Transfer-Encoding') - ); - - // This array specifies that, when the entire MIME document contains - // $compoundLevel, then for each child within $level, if its Content-Type - // is $contentType then it should be treated as if it's level is - // $neededLevel instead. I tried to write that unambiguously! :-\ - // Data Structure: - // array ( - // $compoundLevel => array( - // $level => array( - // $contentType => $neededLevel - // ) - // ) - // ) - - $this->_compoundLevelFilters = array( - (self::LEVEL_ALTERNATIVE + self::LEVEL_RELATED) => array( - self::LEVEL_ALTERNATIVE => array( - 'text/plain' => self::LEVEL_ALTERNATIVE, - 'text/html' => self::LEVEL_RELATED - ) - ) - ); - $this->generateId(); - } - - /** - * Generate a new Content-ID or Message-ID for this MIME entity. - * @return string - */ - public function generateId() - { - $idLeft = time() . '.' . uniqid(); - $idRight = !empty($_SERVER['SERVER_NAME']) - ? $_SERVER['SERVER_NAME'] - : 'swift.generated'; - $this->_id = $idLeft . '@' . $idRight; - return $this->getId(); - } - - /** - * Get the {@link Swift_Mime_HeaderSet} for this entity. - * @return Swift_Mime_HeaderSet - */ - public function getHeaders() - { - return $this->_headers; - } - - /** - * Get the nesting level of this entity. - * @return int - * @see LEVEL_TOP, LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE - */ - public function getNestingLevel() - { - return $this->_nestingLevel; - } - - /** - * Get the Content-type of this entity. - * @return string - */ - public function getContentType() - { - return $this->_getHeaderFieldModel('Content-Type'); - } - - /** - * Set the Content-type of this entity. - * @param string $type - */ - public function setContentType($type) - { - $this->_setContentTypeInHeaders($type); - // Keep track of the value so that if the content-type changes automatically - // due to added child entities, it can be restored if they are later removed - $this->_userContentType = $type; - return $this; - } - - /** - * Get the CID of this entity. - * The CID will only be present in headers if a Content-ID header is present. - * @return string - */ - public function getId() - { - return $this->_headers->has($this->_getIdField()) - ? current((array) $this->_getHeaderFieldModel($this->_getIdField())) - : $this->_id; - } - - /** - * Set the CID of this entity. - * @param string $id - */ - public function setId($id) - { - if (!$this->_setHeaderFieldModel($this->_getIdField(), $id)) - { - $this->_headers->addIdHeader($this->_getIdField(), $id); - } - $this->_id = $id; - return $this; - } - - /** - * Get the description of this entity. - * This value comes from the Content-Description header if set. - * @return string - */ - public function getDescription() - { - return $this->_getHeaderFieldModel('Content-Description'); - } - - /** - * Set the description of this entity. - * This method sets a value in the Content-ID header. - * @param string $description - */ - public function setDescription($description) - { - if (!$this->_setHeaderFieldModel('Content-Description', $description)) - { - $this->_headers->addTextHeader('Content-Description', $description); - } - return $this; - } - - /** - * Get the maximum line length of the body of this entity. - * @return int - */ - public function getMaxLineLength() - { - return $this->_maxLineLength; - } - - /** - * Set the maximum line length of lines in this body. - * Though not enforced by the library, lines should not exceed 1000 chars. - * @param int $length - */ - public function setMaxLineLength($length) - { - $this->_maxLineLength = $length; - return $this; - } - - /** - * Get all children added to this entity. - * @return array of Swift_Mime_Entity - */ - public function getChildren() - { - return $this->_children; - } - - /** - * Set all children of this entity. - * @param array $children Swiift_Mime_Entity instances - * @param int $compoundLevel For internal use only - */ - public function setChildren(array $children, $compoundLevel = null) - { - //TODO: Try to refactor this logic - - $compoundLevel = isset($compoundLevel) - ? $compoundLevel - : $this->_getCompoundLevel($children) - ; - - $immediateChildren = array(); - $grandchildren = array(); - $newContentType = $this->_userContentType; - - foreach ($children as $child) - { - $level = $this->_getNeededChildLevel($child, $compoundLevel); - if (empty($immediateChildren)) //first iteration - { - $immediateChildren = array($child); - } - else - { - $nextLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); - if ($nextLevel == $level) - { - $immediateChildren[] = $child; - } - elseif ($level < $nextLevel) - { - //Re-assign immediateChildren to grandchilden - $grandchildren = array_merge($grandchildren, $immediateChildren); - //Set new children - $immediateChildren = array($child); - } - else - { - $grandchildren[] = $child; - } - } - } - - if (!empty($immediateChildren)) - { - $lowestLevel = $this->_getNeededChildLevel($immediateChildren[0], $compoundLevel); - - //Determine which composite media type is needed to accomodate the - // immediate children - foreach ($this->_compositeRanges as $mediaType => $range) - { - if ($lowestLevel > $range[0] - && $lowestLevel <= $range[1]) - { - $newContentType = $mediaType; - break; - } - } - - //Put any grandchildren in a subpart - if (!empty($grandchildren)) - { - $subentity = $this->_createChild(); - $subentity->_setNestingLevel($lowestLevel); - $subentity->setChildren($grandchildren, $compoundLevel); - array_unshift($immediateChildren, $subentity); - } - } - - $this->_immediateChildren = $immediateChildren; - $this->_children = $children; - $this->_setContentTypeInHeaders($newContentType); - $this->_fixHeaders(); - $this->_sortChildren(); - - return $this; - } - - /** - * Get the body of this entity as a string. - * @return string - */ - public function getBody() - { - return ($this->_body instanceof Swift_OutputByteStream) - ? $this->_readStream($this->_body) - : $this->_body; - } - - /** - * Set the body of this entity, either as a string, or as an instance of - * {@link Swift_OutputByteStream}. - * @param mixed $body - * @param string $contentType optional - */ - public function setBody($body, $contentType = null) - { - if ($body !== $this->_body) - { - $this->_clearCache(); - } - - $this->_body = $body; - if (isset($contentType)) - { - $this->setContentType($contentType); - } - return $this; - } - - /** - * Get the encoder used for the body of this entity. - * @return Swift_Mime_ContentEncoder - */ - public function getEncoder() - { - return $this->_encoder; - } - - /** - * Set the encoder used for the body of this entity. - * @param Swift_Mime_ContentEncoder $encoder - */ - public function setEncoder(Swift_Mime_ContentEncoder $encoder) - { - if ($encoder !== $this->_encoder) - { - $this->_clearCache(); - } - - $this->_encoder = $encoder; - $this->_setEncoding($encoder->getName()); - $this->_notifyEncoderChanged($encoder); - return $this; - } - - /** - * Get the boundary used to separate children in this entity. - * @return string - */ - public function getBoundary() - { - if (!isset($this->_boundary)) - { - $this->_boundary = '_=_swift_v4_' . time() . uniqid() . '_=_'; - } - return $this->_boundary; - } - - /** - * Set the boundary used to separate children in this entity. - * @param string $boundary - * @throws Swift_RfcComplianceException - */ - public function setBoundary($boundary) - { - $this->_assertValidBoundary($boundary); - $this->_boundary = $boundary; - return $this; - } - - /** - * Receive notification that the charset of this entity, or a parent entity - * has changed. - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->_notifyCharsetChanged($charset); - } - - /** - * Receive notification that the encoder of this entity or a parent entity - * has changed. - * @param Swift_Mime_ContentEncoder $encoder - */ - public function encoderChanged(Swift_Mime_ContentEncoder $encoder) - { - $this->_notifyEncoderChanged($encoder); - } - - /** - * Get this entire entity as a string. - * @return string - */ - public function toString() - { - $string = $this->_headers->toString(); - if (isset($this->_body) && empty($this->_immediateChildren)) - { - if ($this->_cache->hasKey($this->_cacheKey, 'body')) - { - $body = $this->_cache->getString($this->_cacheKey, 'body'); - } - else - { - $body = "\r\n" . $this->_encoder->encodeString($this->getBody(), 0, - $this->getMaxLineLength() - ); - $this->_cache->setString($this->_cacheKey, 'body', $body, - Swift_KeyCache::MODE_WRITE - ); - } - $string .= $body; - } - - if (!empty($this->_immediateChildren)) - { - foreach ($this->_immediateChildren as $child) - { - $string .= "\r\n\r\n--" . $this->getBoundary() . "\r\n"; - $string .= $child->toString(); - } - $string .= "\r\n\r\n--" . $this->getBoundary() . "--\r\n"; - } - - return $string; - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - /** - * Write this entire entity to a {@link Swift_InputByteStream}. - * @param Swift_InputByteStream - */ - public function toByteStream(Swift_InputByteStream $is) - { - $is->write($this->_headers->toString()); - $is->commit(); - - if (empty($this->_immediateChildren)) - { - if (isset($this->_body)) - { - if ($this->_cache->hasKey($this->_cacheKey, 'body')) - { - $this->_cache->exportToByteStream($this->_cacheKey, 'body', $is); - } - else - { - $cacheIs = $this->_cache->getInputByteStream($this->_cacheKey, 'body'); - if ($cacheIs) - { - $is->bind($cacheIs); - } - - $is->write("\r\n"); - - if ($this->_body instanceof Swift_OutputByteStream) - { - $this->_body->setReadPointer(0); - - $this->_encoder->encodeByteStream($this->_body, $is, 0, - $this->getMaxLineLength() - ); - } - else - { - $is->write($this->_encoder->encodeString( - $this->getBody(), 0, $this->getMaxLineLength() - )); - } - - if ($cacheIs) - { - $is->unbind($cacheIs); - } - } - } - } - - if (!empty($this->_immediateChildren)) - { - foreach ($this->_immediateChildren as $child) - { - $is->write("\r\n\r\n--" . $this->getBoundary() . "\r\n"); - $child->toByteStream($is); - } - $is->write("\r\n\r\n--" . $this->getBoundary() . "--\r\n"); - } - } - - // -- Protected methods - - /** - * Get the name of the header that provides the ID of this entity */ - protected function _getIdField() - { - return 'Content-ID'; - } - - /** - * Get the model data (usually an array or a string) for $field. - */ - protected function _getHeaderFieldModel($field) - { - if ($this->_headers->has($field)) - { - return $this->_headers->get($field)->getFieldBodyModel(); - } - } - - /** - * Set the model data for $field. - */ - protected function _setHeaderFieldModel($field, $model) - { - if ($this->_headers->has($field)) - { - $this->_headers->get($field)->setFieldBodyModel($model); - return true; - } - else - { - return false; - } - } - - /** - * Get the parameter value of $parameter on $field header. - */ - protected function _getHeaderParameter($field, $parameter) - { - if ($this->_headers->has($field)) - { - return $this->_headers->get($field)->getParameter($parameter); - } - } - - /** - * Set the parameter value of $parameter on $field header. - */ - protected function _setHeaderParameter($field, $parameter, $value) - { - if ($this->_headers->has($field)) - { - $this->_headers->get($field)->setParameter($parameter, $value); - return true; - } - else - { - return false; - } - } - - /** - * Re-evaluate what content type and encoding should be used on this entity. - */ - protected function _fixHeaders() - { - if (count($this->_immediateChildren)) - { - $this->_setHeaderParameter('Content-Type', 'boundary', - $this->getBoundary() - ); - $this->_headers->remove('Content-Transfer-Encoding'); - } - else - { - $this->_setHeaderParameter('Content-Type', 'boundary', null); - $this->_setEncoding($this->_encoder->getName()); - } - } - - /** - * Get the KeyCache used in this entity. - */ - protected function _getCache() - { - return $this->_cache; - } - - /** - * Empty the KeyCache for this entity. - */ - protected function _clearCache() - { - $this->_cache->clearKey($this->_cacheKey, 'body'); - } - - // -- Private methods - - private function _readStream(Swift_OutputByteStream $os) - { - $string = ''; - while (false !== $bytes = $os->read(8192)) - { - $string .= $bytes; - } - return $string; - } - - private function _setEncoding($encoding) - { - if (!$this->_setHeaderFieldModel('Content-Transfer-Encoding', $encoding)) - { - $this->_headers->addTextHeader('Content-Transfer-Encoding', $encoding); - } - } - - private function _assertValidBoundary($boundary) - { - if (!preg_match( - '/^[a-z0-9\'\(\)\+_\-,\.\/:=\?\ ]{0,69}[a-z0-9\'\(\)\+_\-,\.\/:=\?]$/Di', - $boundary)) - { - throw new Exception('Mime boundary set is not RFC 2046 compliant.'); - } - } - - private function _setContentTypeInHeaders($type) - { - if (!$this->_setHeaderFieldModel('Content-Type', $type)) - { - $this->_headers->addParameterizedHeader('Content-Type', $type); - } - } - - private function _setNestingLevel($level) - { - $this->_nestingLevel = $level; - } - - private function _getCompoundLevel($children) - { - $level = 0; - foreach ($children as $child) - { - $level |= $child->getNestingLevel(); - } - return $level; - } - - private function _getNeededChildLevel($child, $compoundLevel) - { - $filter = array(); - foreach ($this->_compoundLevelFilters as $bitmask => $rules) - { - if (($compoundLevel & $bitmask) === $bitmask) - { - $filter = $rules + $filter; - } - } - - $realLevel = $child->getNestingLevel(); - $lowercaseType = strtolower($child->getContentType()); - - if (isset($filter[$realLevel]) - && isset($filter[$realLevel][$lowercaseType])) - { - return $filter[$realLevel][$lowercaseType]; - } - else - { - return $realLevel; - } - } - - private function _createChild() - { - return new self($this->_headers->newInstance(), - $this->_encoder, $this->_cache); - } - - private function _notifyEncoderChanged(Swift_Mime_ContentEncoder $encoder) - { - foreach ($this->_immediateChildren as $child) - { - $child->encoderChanged($encoder); - } - } - - private function _notifyCharsetChanged($charset) - { - $this->_encoder->charsetChanged($charset); - $this->_headers->charsetChanged($charset); - foreach ($this->_immediateChildren as $child) - { - $child->charsetChanged($charset); - } - } - - private function _sortChildren() - { - $shouldSort = false; - foreach ($this->_immediateChildren as $child) - { - //NOTE: This include alternative parts moved into a related part - if ($child->getNestingLevel() == self::LEVEL_ALTERNATIVE) - { - $shouldSort = true; - break; - } - } - - //Sort in order of preference, if there is one - if ($shouldSort) - { - usort($this->_immediateChildren, array($this, '_childSortAlgorithm')); - } - } - - private function _childSortAlgorithm($a, $b) - { - $typePrefs = array(); - $types = array( - strtolower($a->getContentType()), - strtolower($b->getContentType()) - ); - foreach ($types as $type) - { - $typePrefs[] = (array_key_exists($type, $this->_alternativePartOrder)) - ? $this->_alternativePartOrder[$type] - : (max($this->_alternativePartOrder) + 1); - } - return ($typePrefs[0] >= $typePrefs[1]) ? 1 : -1; - } - - // -- Destructor - - /** - * Empties it's own contents from the cache. - */ - public function __destruct() - { - $this->_cache->clearAll($this->_cacheKey); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/MimePart.php b/pandora_console/include/swiftmailer/classes/Swift/MimePart.php deleted file mode 100644 index 60b6d56999..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/MimePart.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/MimePart.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * A MIME part, in a multipart message. - * @package Swift - * @subpackage Mime - * @author Chris Corbyn - */ -class Swift_MimePart extends Swift_Mime_MimePart -{ - - /** - * Create a new MimePart. - * Details may be optionally passed into the constructor. - * @param string $body - * @param string $contentType - * @param string $charset - */ - public function __construct($body = null, $contentType = null, - $charset = null) - { - call_user_func_array( - array($this, 'Swift_Mime_MimePart::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('mime.part') - ); - - if (!isset($charset)) - { - $charset = Swift_DependencyContainer::getInstance() - ->lookup('properties.charset'); - } - $this->setBody($body); - $this->setCharset($charset); - if ($contentType) - { - $this->setContentType($contentType); - } - } - - /** - * Create a new MimePart. - * @param string $body - * @param string $contentType - * @param string $charset - * @return Swift_Mime_MimePart - */ - public static function newInstance($body = null, $contentType = null, - $charset = null) - { - return new self($body, $contentType, $charset); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/OutputByteStream.php b/pandora_console/include/swiftmailer/classes/Swift/OutputByteStream.php deleted file mode 100644 index 951b83834d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/OutputByteStream.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * An abstract means of reading data. - * Classes implementing this interface may use a subsystem which requires less - * memory than working with large strings of data. - * @package Swift - * @subpackage ByteStream - * @author Chris Corbyn - */ -interface Swift_OutputByteStream -{ - - /** - * Reads $length bytes from the stream into a string and moves the pointer - * through the stream by $length. If less bytes exist than are requested the - * remaining bytes are given instead. If no bytes are remaining at all, boolean - * false is returned. - * @param int $length - * @return string - * @throws Swift_IoException - */ - public function read($length); - - /** - * Move the internal read pointer to $byteOffset in the stream. - * @param int $byteOffset - * @return boolean - * @throws Swift_IoException - */ - public function setReadPointer($byteOffset); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/AntiFloodPlugin.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/AntiFloodPlugin.php deleted file mode 100644 index 46a7f44813..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/AntiFloodPlugin.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/SendListener.php'; -//@require 'Swift/Events/SendEvent.php'; -//@require 'Swift/Plugins/Sleeper.php'; - -/** - * Reduces network flooding when sending large amounts of mail. - * @package Swift - * @subpackage Plugins - * @author Chris Corbyn - */ -class Swift_Plugins_AntiFloodPlugin - implements Swift_Events_SendListener, Swift_Plugins_Sleeper -{ - - /** - * The number of emails to send before restarting Transport. - * @var int - * @access private - */ - private $_threshold; - - /** - * The number of seconds to sleep for during a restart. - * @var int - * @access private - */ - private $_sleep; - - /** - * The internal counter. - * @var int - * @access private - */ - private $_counter = 0; - - /** - * The Sleeper instance for sleeping. - * @var Swift_Plugins_Sleeper - * @access private - */ - private $_sleeper; - - /** - * Create a new AntiFloodPlugin with $threshold and $sleep time. - * @param int $threshold - * @param int $sleep time - * @param Swift_Plugins_Sleeper $sleeper (not needed really) - */ - public function __construct($threshold = 99, $sleep = 0, - Swift_Plugins_Sleeper $sleeper = null) - { - $this->setThreshold($threshold); - $this->setSleepTime($sleep); - $this->_sleeper = $sleeper; - } - - /** - * Set the number of emails to send before restarting. - * @param int $threshold - */ - public function setThreshold($threshold) - { - $this->_threshold = $threshold; - } - - /** - * Get the number of emails to send before restarting. - * @return int - */ - public function getThreshold() - { - return $this->_threshold; - } - - /** - * Set the number of seconds to sleep for during a restart. - * @param int $sleep time - */ - public function setSleepTime($sleep) - { - $this->_sleep = $sleep; - } - - /** - * Get the number of seconds to sleep for during a restart. - * @return int - */ - public function getSleepTime() - { - return $this->_sleep; - } - - /** - * Invoked immediately before the Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - } - - /** - * Invoked immediately after the Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - ++$this->_counter; - if ($this->_counter >= $this->_threshold) - { - $transport = $evt->getTransport(); - $transport->stop(); - if ($this->_sleep) - { - $this->sleep($this->_sleep); - } - $transport->start(); - $this->_counter = 0; - } - } - - /** - * Sleep for $seconds. - * @param int $seconds - */ - public function sleep($seconds) - { - if (isset($this->_sleeper)) - { - $this->_sleeper->sleep($seconds); - } - else - { - sleep($seconds); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/BandwidthMonitorPlugin.php deleted file mode 100644 index 501cd809a5..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/BandwidthMonitorPlugin.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/SendListener.php'; -//@require 'Swift/Events/SendEvent.php'; -//@require 'Swift/Events/CommandListener.php'; -//@require 'Swift/Events/CommandEvent.php'; -//@require 'Swift/Events/ResponseListener.php'; -//@require 'Swift/Events/ResponseEvent.php'; -//@require 'Swift/InputByteStream.php'; - -/** - * Reduces network flooding when sending large amounts of mail. - * @package Swift - * @subpackage Plugins - * @author Chris Corbyn - */ -class Swift_Plugins_BandwidthMonitorPlugin - implements Swift_Events_SendListener, Swift_Events_CommandListener, - Swift_Events_ResponseListener, Swift_InputByteStream -{ - - /** - * The outgoing traffic counter. - * @var int - * @access private - */ - private $_out = 0; - - /** - * The incoming traffic counter. - * @var int - * @access private - */ - private $_in = 0; - - /** Bound byte streams */ - private $_mirrors = array(); - - /** - * Not used. - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - } - - /** - * Invoked immediately after the Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - $message->toByteStream($this); - } - - /** - * Invoked immediately following a command being sent. - * @param Swift_Events_ResponseEvent $evt - */ - public function commandSent(Swift_Events_CommandEvent $evt) - { - $command = $evt->getCommand(); - $this->_out += strlen($command); - } - - /** - * Invoked immediately following a response coming back. - * @param Swift_Events_ResponseEvent $evt - */ - public function responseReceived(Swift_Events_ResponseEvent $evt) - { - $response = $evt->getResponse(); - $this->_in += strlen($response); - } - - /** - * Called when a message is sent so that the outgoing counter can be increased. - * @param string $bytes - */ - public function write($bytes) - { - $this->_out += strlen($bytes); - foreach ($this->_mirrors as $stream) - { - $stream->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Attach $is to this stream. - * The stream acts as an observer, receiving all data that is written. - * All {@link write()} and {@link flushBuffers()} operations will be mirrored. - * - * @param Swift_InputByteStream $is - */ - public function bind(Swift_InputByteStream $is) - { - $this->_mirrors[] = $is; - } - - /** - * Remove an already bound stream. - * If $is is not bound, no errors will be raised. - * If the stream currently has any buffered data it will be written to $is - * before unbinding occurs. - * - * @param Swift_InputByteStream $is - */ - public function unbind(Swift_InputByteStream $is) - { - foreach ($this->_mirrors as $k => $stream) - { - if ($is === $stream) - { - unset($this->_mirrors[$k]); - } - } - } - - /** - * Not used. - */ - public function flushBuffers() - { - foreach ($this->_mirrors as $stream) - { - $stream->flushBuffers(); - } - } - - /** - * Get the total number of bytes sent to the server. - * @return int - */ - public function getBytesOut() - { - return $this->_out; - } - - /** - * Get the total number of bytes received from the server. - * @return int - */ - public function getBytesIn() - { - return $this->_in; - } - - /** - * Reset the internal counters to zero. - */ - public function reset() - { - $this->_out = 0; - $this->_in = 0; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Decorator/Replacements.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/Decorator/Replacements.php deleted file mode 100644 index 9735d0a04b..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Decorator/Replacements.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Allows customization of Messages on-the-fly. - * - * @package Swift - * @subpackage Plugins - * - * @author Chris Corbyn - */ -interface Swift_Plugins_Decorator_Replacements -{ - - /** - * Return the array of replacements for $address. - * - * This method is invoked once for every single recipient of a message. - * - * If no replacements can be found, an empty value (NULL) should be returned - * and no replacements will then be made on the message. - * - * @param string $address - * - * @return array - */ - public function getReplacementsFor($address); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/DecoratorPlugin.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/DecoratorPlugin.php deleted file mode 100644 index da1a3079ee..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/DecoratorPlugin.php +++ /dev/null @@ -1,201 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/SendListener.php'; -//@require 'Swift/Events/SendEvent.php'; -//@require 'Swift/Plugins/Decorator/Replacements.php'; - -/** - * Allows customization of Messages on-the-fly. - * - * @package Swift - * @subpackage Plugins - * - * @author Chris Corbyn - */ -class Swift_Plugins_DecoratorPlugin - implements Swift_Events_SendListener, Swift_Plugins_Decorator_Replacements -{ - - /** The replacement map */ - private $_replacements; - - /** The body as it was before replacements */ - private $_orginalBody; - - /** The original subject of the message, before replacements */ - private $_originalSubject; - - /** Bodies of children before they are replaced */ - private $_originalChildBodies = array(); - - /** The Message that was last replaced */ - private $_lastMessage; - - /** - * Create a new DecoratorPlugin with $replacements. - * - * The $replacements can either be an associative array, or an implementation - * of {@link Swift_Plugins_Decorator_Replacements}. - * - * When using an array, it should be of the form: - * <code> - * $replacements = array( - * "address1@domain.tld" => array("{a}" => "b", "{c}" => "d"), - * "address2@domain.tld" => array("{a}" => "x", "{c}" => "y") - * ) - * </code> - * - * When using an instance of {@link Swift_Plugins_Decorator_Replacements}, - * the object should return just the array of replacements for the address - * given to {@link Swift_Plugins_Decorator_Replacements::getReplacementsFor()}. - * - * @param mixed $replacements - */ - public function __construct($replacements) - { - if (!($replacements instanceof Swift_Plugins_Decorator_Replacements)) - { - $this->_replacements = (array) $replacements; - } - else - { - $this->_replacements = $replacements; - } - } - - /** - * Invoked immediately before the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - $this->_restoreMessage($message); - $to = array_keys($message->getTo()); - $address = array_shift($to); - if ($replacements = $this->getReplacementsFor($address)) - { - $body = $message->getBody(); - $search = array_keys($replacements); - $replace = array_values($replacements); - $bodyReplaced = str_replace( - $search, $replace, $body - ); - if ($body != $bodyReplaced) - { - $this->_originalBody = $body; - $message->setBody($bodyReplaced); - } - $subject = $message->getSubject(); - $subjectReplaced = str_replace( - $search, $replace, $subject - ); - if ($subject != $subjectReplaced) - { - $this->_originalSubject = $subject; - $message->setSubject($subjectReplaced); - } - $children = (array) $message->getChildren(); - foreach ($children as $child) - { - list($type, ) = sscanf($child->getContentType(), '%[^/]/%s'); - if ('text' == $type) - { - $body = $child->getBody(); - $bodyReplaced = str_replace( - $search, $replace, $body - ); - if ($body != $bodyReplaced) - { - $child->setBody($bodyReplaced); - $this->_originalChildBodies[$child->getId()] = $body; - } - } - } - $this->_lastMessage = $message; - } - } - - /** - * Find a map of replacements for the address. - * - * If this plugin was provided with a delegate instance of - * {@link Swift_Plugins_Decorator_Replacements} then the call will be - * delegated to it. Otherwise, it will attempt to find the replacements - * from the array provided in the constructor. - * - * If no replacements can be found, an empty value (NULL) is returned. - * - * @param string $address - * - * @return array - */ - public function getReplacementsFor($address) - { - if ($this->_replacements instanceof Swift_Plugins_Decorator_Replacements) - { - return $this->_replacements->getReplacementsFor($address); - } - else - { - return isset($this->_replacements[$address]) - ? $this->_replacements[$address] - : null - ; - } - } - - /** - * Invoked immediately after the Message is sent. - * - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $this->_restoreMessage($evt->getMessage()); - } - - // -- Private methods - - /** Restore a changed message back to its original state */ - private function _restoreMessage(Swift_Mime_Message $message) - { - if ($this->_lastMessage === $message) - { - if (isset($this->_originalBody)) - { - $message->setBody($this->_originalBody); - $this->_originalBody = null; - } - if (isset($this->_originalSubject)) - { - $message->setSubject($this->_originalSubject); - $this->_originalSubject = null; - } - if (!empty($this->_originalChildBodies)) - { - $children = (array) $message->getChildren(); - foreach ($children as $child) - { - $id = $child->getId(); - if (array_key_exists($id, $this->_originalChildBodies)) - { - $child->setBody($this->_originalChildBodies[$id]); - } - } - $this->_originalChildBodies = array(); - } - $this->_lastMessage = null; - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/LoggerPlugin.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/LoggerPlugin.php deleted file mode 100644 index d595f2645c..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/LoggerPlugin.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/CommandListener.php'; -//@require 'Swift/Events/CommandEvent.php'; -//@require 'Swift/Events/ResponseListener.php'; -//@require 'Swift/Events/ResponseEvent.php'; -//@require 'Swift/Events/TransportChangeListener.php'; -//@require 'Swift/Events/TransportChangeEvent.php'; -//@require 'Swift/Events/TransportExceptionEvent.php'; -//@require 'Swift/Events/TransportExceptionListener.php'; -//@require 'Swift/Events/TransportException.php'; -//@require 'Swift/Plugins/Logger.php'; - -/** - * Does real time logging of Transport level information. - * - * @package Swift - * @subpackage Plugins - * - * @author Chris Corbyn - */ -class Swift_Plugins_LoggerPlugin - implements Swift_Events_CommandListener, Swift_Events_ResponseListener, - Swift_Events_TransportChangeListener, Swift_Events_TransportExceptionListener, - Swift_Plugins_Logger -{ - - /** The logger which is delegated to */ - private $_logger; - - /** - * Create a new LoggerPlugin using $logger. - * - * @param Swift_Plugins_Logger $logger - */ - public function __construct(Swift_Plugins_Logger $logger) - { - $this->_logger = $logger; - } - - /** - * Add a log entry. - * - * @param string $entry - */ - public function add($entry) - { - $this->_logger->add($entry); - } - - /** - * Clear the log contents. - */ - public function clear() - { - $this->_logger->clear(); - } - - /** - * Get this log as a string. - * - * @return string - */ - public function dump() - { - return $this->_logger->dump(); - } - - /** - * Invoked immediately following a command being sent. - * - * @param Swift_Events_ResponseEvent $evt - */ - public function commandSent(Swift_Events_CommandEvent $evt) - { - $command = $evt->getCommand(); - $this->_logger->add(sprintf(">> %s", $command)); - } - - /** - * Invoked immediately following a response coming back. - * - * @param Swift_Events_ResponseEvent $evt - */ - public function responseReceived(Swift_Events_ResponseEvent $evt) - { - $response = $evt->getResponse(); - $this->_logger->add(sprintf("<< %s", $response)); - } - - /** - * Invoked just before a Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ Starting %s", $transportName)); - } - - /** - * Invoked immediately after the Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function transportStarted(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ %s started", $transportName)); - } - - /** - * Invoked just before a Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ Stopping %s", $transportName)); - } - - /** - * Invoked immediately after the Transport is stopped. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function transportStopped(Swift_Events_TransportChangeEvent $evt) - { - $transportName = get_class($evt->getSource()); - $this->_logger->add(sprintf("++ %s stopped", $transportName)); - } - - /** - * Invoked as a TransportException is thrown in the Transport system. - * - * @param Swift_Events_TransportExceptionEvent $evt - */ - public function exceptionThrown(Swift_Events_TransportExceptionEvent $evt) - { - $e = $evt->getException(); - $message = $e->getMessage(); - $this->_logger->add(sprintf("!! %s", $message)); - $message .= PHP_EOL; - $message .= 'Log data:' . PHP_EOL; - $message .= $this->_logger->dump(); - $evt->cancelBubble(); - throw new Swift_TransportException($message); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Loggers/ArrayLogger.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/Loggers/ArrayLogger.php deleted file mode 100644 index 930eca25fe..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Loggers/ArrayLogger.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Logs to an Array backend. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Plugins_Loggers_ArrayLogger implements Swift_Plugins_Logger -{ - - /** - * The log contents. - * @var array - * @access private - */ - private $_log = array(); - - /** - * Max size of the log. - * @var int - * @access private - */ - private $_size = 0; - - /** - * Create a new ArrayLogger with a maximum of $size entries. - * @var int $size - */ - public function __construct($size = 50) - { - $this->_size = $size; - } - - /** - * Add a log entry. - * @param string $entry - */ - public function add($entry) - { - $this->_log[] = $entry; - while (count($this->_log) > $this->_size) - { - array_shift($this->_log); - } - } - - /** - * Clear the log contents. - */ - public function clear() - { - $this->_log = array(); - } - - /** - * Get this log as a string. - * @return string - */ - public function dump() - { - return implode(PHP_EOL, $this->_log); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Loggers/EchoLogger.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/Loggers/EchoLogger.php deleted file mode 100644 index 83dd54b5fd..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Loggers/EchoLogger.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Prints all log messages in real time. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Plugins_Loggers_EchoLogger implements Swift_Plugins_Logger -{ - - /** Whether or not HTML should be output */ - private $_isHtml; - - /** - * Create a new EchoLogger. - * - * @param boolean $isHtml - */ - public function __construct($isHtml = true) - { - $this->_isHtml = $isHtml; - } - - /** - * Add a log entry. - * @param string $entry - */ - public function add($entry) - { - if ($this->_isHtml) - { - printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '<br />', PHP_EOL); - } - else - { - printf('%s%s', $entry, PHP_EOL); - } - } - - /** - * Not implemented. - */ - public function clear() - { - } - - /** - * Not implemented. - */ - public function dump() - { - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Pop/Pop3Connection.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/Pop/Pop3Connection.php deleted file mode 100644 index 1c96dcfafc..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Pop/Pop3Connection.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Pop3Connection interface for connecting and disconnecting to a POP3 host. - * - * @package Swift - * @subpackage Plugins - * - * @author Chris Corbyn - */ -interface Swift_Plugins_Pop_Pop3Connection -{ - - /** - * Connect to the POP3 host and throw an Exception if it fails. - * - * @throws Swift_Plugins_Pop_Pop3Exception - */ - public function connect(); - - /** - * Disconnect from the POP3 host and throw an Exception if it fails. - * - * @throws Swift_Plugins_Pop_Pop3Exception - */ - public function disconnect(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/PopBeforeSmtpPlugin.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/PopBeforeSmtpPlugin.php deleted file mode 100644 index fd1cf467f9..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/PopBeforeSmtpPlugin.php +++ /dev/null @@ -1,288 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/TransportChangeListener.php'; -//@require 'Swift/Events/TransportChangeEvent.php'; - -/** - * Makes sure a connection to a POP3 host has been established prior to connecting to SMTP. - * - * @package Swift - * @subpackage Plugins - * - * @author Chris Corbyn - */ -class Swift_Plugins_PopBeforeSmtpPlugin - implements Swift_Events_TransportChangeListener, Swift_Plugins_Pop_Pop3Connection -{ - - /** A delegate connection to use (mostly a test hook) */ - private $_connection; - - /** Hostname of the POP3 server */ - private $_host; - - /** Port number to connect on */ - private $_port; - - /** Encryption type to use (if any) */ - private $_crypto; - - /** Username to use (if any) */ - private $_username; - - /** Password to use (if any) */ - private $_password; - - /** Established connection via TCP socket */ - private $_socket; - - /** Connect timeout in seconds */ - private $_timeout = 10; - - /** SMTP Transport to bind to */ - private $_transport; - - /** - * Create a new PopBeforeSmtpPlugin for $host and $port. - * - * @param string $host - * @param int $port - * @param string $cypto as "tls" or "ssl" - */ - public function __construct($host, $port = 110, $crypto = null) - { - $this->_host = $host; - $this->_port = $port; - $this->_crypto = $crypto; - } - - /** - * Create a new PopBeforeSmtpPlugin for $host and $port. - * - * @param string $host - * @param int $port - * @param string $cypto as "tls" or "ssl" - * - * @return Swift_Plugins_PopBeforeSmtpPlugin - */ - public static function newInstance($host, $port = 110, $crypto = null) - { - return new self($host, $port, $crypto); - } - - /** - * Set a Pop3Connection to delegate to instead of connecting directly. - * - * @param Swift_Plugins_Pop_Pop3Connection $connection - */ - public function setConnection(Swift_Plugins_Pop_Pop3Connection $connection) - { - $this->_connection = $connection; - return $this; - } - - /** - * Bind this plugin to a specific SMTP transport instance. - * - * @param Swift_Transport - */ - public function bindSmtp(Swift_Transport $smtp) - { - $this->_transport = $smtp; - } - - /** - * Set the connection timeout in seconds (default 10). - * - * @param int $timeout - */ - public function setTimeout($timeout) - { - $this->_timeout = (int) $timeout; - return $this; - } - - /** - * Set the username to use when connecting (if needed). - * - * @param string $username - */ - public function setUsername($username) - { - $this->_username = $username; - return $this; - } - - /** - * Set the password to use when connecting (if needed). - * - * @param string $password - */ - public function setPassword($password) - { - $this->_password = $password; - return $this; - } - - /** - * Connect to the POP3 host and authenticate. - * - * @throws Swift_Plugins_Pop_Pop3Exception if connection fails - */ - public function connect() - { - if (isset($this->_connection)) - { - $this->_connection->connect(); - } - else - { - if (!isset($this->_socket)) - { - if (!$socket = fsockopen( - $this->_getHostString(), $this->_port, $errno, $errstr, $this->_timeout)) - { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to connect to POP3 host [%s]: %s', $this->_host, $errstr) - ); - } - $this->_socket = $socket; - - if (false === $greeting = fgets($this->_socket)) - { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to connect to POP3 host [%s]', trim($greeting)) - ); - } - - $this->_assertOk($greeting); - - if ($this->_username) - { - $this->_command(sprintf("USER %s\r\n", $this->_username)); - $this->_command(sprintf("PASS %s\r\n", $this->_password)); - } - } - } - } - - /** - * Disconnect from the POP3 host. - */ - public function disconnect() - { - if (isset($this->_connection)) - { - $this->_connection->disconnect(); - } - else - { - $this->_command("QUIT\r\n"); - if (!fclose($this->_socket)) - { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('POP3 host [%s] connection could not be stopped', $this->_host) - ); - } - $this->_socket = null; - } - } - - /** - * Invoked just before a Transport is started. - * - * @param Swift_Events_TransportChangeEvent $evt - */ - public function beforeTransportStarted(Swift_Events_TransportChangeEvent $evt) - { - if (isset($this->_transport)) - { - if ($this->_transport !== $evt->getTransport()) - { - return; - } - } - - $this->connect(); - $this->disconnect(); - } - - /** - * Not used. - */ - public function transportStarted(Swift_Events_TransportChangeEvent $evt) - { - } - - /** - * Not used. - */ - public function beforeTransportStopped(Swift_Events_TransportChangeEvent $evt) - { - } - - /** - * Not used. - */ - public function transportStopped(Swift_Events_TransportChangeEvent $evt) - { - } - - // -- Private Methods - - private function _command($command) - { - if (!fwrite($this->_socket, $command)) - { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to write command [%s] to POP3 host', trim($command)) - ); - } - - if (false === $response = fgets($this->_socket)) - { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('Failed to read from POP3 host after command [%s]', trim($command)) - ); - } - - $this->_assertOk($response); - - return $response; - } - - private function _assertOk($response) - { - if (substr($response, 0, 3) != '+OK') - { - throw new Swift_Plugins_Pop_Pop3Exception( - sprintf('POP3 command failed [%s]', trim($response)) - ); - } - } - - private function _getHostString() - { - $host = $this->_host; - switch (strtolower($this->_crypto)) - { - case 'ssl': - $host = 'ssl://' . $host; - break; - - case 'tls': - $host = 'tls://' . $host; - break; - } - return $host; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporter.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporter.php deleted file mode 100644 index 00d5765d7a..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporter.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Message.php'; - -/** - * The Reporter plugin sends pass/fail notification to a Reporter. - * @package Swift - * @subpackage Plugins - * @author Chris Corbyn - */ -interface Swift_Plugins_Reporter -{ - - /** The recipient was accepted for delivery */ - const RESULT_PASS = 0x01; - - /** The recipient could not be accepted */ - const RESULT_FAIL = 0x10; - - /** - * Notifies this ReportNotifier that $address failed or succeeded. - * @param Swift_Mime_Message $message - * @param string $address - * @param int $result from {@link RESULT_PASS, RESULT_FAIL} - */ - public function notify(Swift_Mime_Message $message, $address, $result); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/ReporterPlugin.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/ReporterPlugin.php deleted file mode 100644 index 1beac5b9f4..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/ReporterPlugin.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/SendListener.php'; -//@require 'Swift/Events/SendEvent.php'; -//@require 'Swift/Plugins/Reporter.php'; - -/** - * Does real time reporting of pass/fail for each recipient. - * @package Swift - * @subpackage Plugins - * @author Chris Corbyn - */ -class Swift_Plugins_ReporterPlugin - implements Swift_Events_SendListener -{ - - /** - * The reporter backend which takes notifications. - * @var Swift_Plugin_Reporter - * @access private - */ - private $_reporter; - - /** - * Create a new ReporterPlugin using $reporter. - * @param Swift_Plugins_Reporter $reporter - */ - public function __construct(Swift_Plugins_Reporter $reporter) - { - $this->_reporter = $reporter; - } - - /** - * Not used. - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - } - - /** - * Invoked immediately after the Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - $message = $evt->getMessage(); - $failures = array_flip($evt->getFailedRecipients()); - foreach ((array) $message->getTo() as $address => $null) - { - $this->_reporter->notify( - $message, $address, (array_key_exists($address, $failures) - ? Swift_Plugins_Reporter::RESULT_FAIL - : Swift_Plugins_Reporter::RESULT_PASS) - ); - } - foreach ((array) $message->getCc() as $address => $null) - { - $this->_reporter->notify( - $message, $address, (array_key_exists($address, $failures) - ? Swift_Plugins_Reporter::RESULT_FAIL - : Swift_Plugins_Reporter::RESULT_PASS) - ); - } - foreach ((array) $message->getBcc() as $address => $null) - { - $this->_reporter->notify( - $message, $address, (array_key_exists($address, $failures) - ? Swift_Plugins_Reporter::RESULT_FAIL - : Swift_Plugins_Reporter::RESULT_PASS) - ); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporters/HitReporter.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporters/HitReporter.php deleted file mode 100644 index 0022f5e65b..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporters/HitReporter.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Plugins/Reporter.php'; -//@require 'Swift/Mime/Message.php'; - -/** - * A reporter which "collects" failures for the Reporter plugin. - * @package Swift - * @subpackage Plugins - * @author Chris Corbyn - */ -class Swift_Plugins_Reporters_HitReporter implements Swift_Plugins_Reporter -{ - - /** - * The list of failures. - * @var array - * @access private - */ - private $_failures = array(); - private $_failures_cache = array(); - - /** - * Notifies this ReportNotifier that $address failed or succeeded. - * @param Swift_Mime_Message $message - * @param string $address - * @param int $result from {@link RESULT_PASS, RESULT_FAIL} - */ - public function notify(Swift_Mime_Message $message, $address, $result) - { - if (self::RESULT_FAIL == $result && !isset($this->_failures_cache[$address])) - { - $this->_failures[] = $address; - $this->_failures_cache[$address] = true; - } - } - - /** - * Get an array of addresses for which delivery failed. - * @return array - */ - public function getFailedRecipients() - { - return $this->_failures; - } - - /** - * Clear the buffer (empty the list). - */ - public function clear() - { - $this->_failures = $this->_failures_cache = array(); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporters/HtmlReporter.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporters/HtmlReporter.php deleted file mode 100644 index 73700780e5..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/Reporters/HtmlReporter.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Plugins/Reporter.php'; -//@require 'Swift/Mime/Message.php'; - -/** - * A HTML output reporter for the Reporter plugin. - * @package Swift - * @subpackage Plugins - * @author Chris Corbyn - */ -class Swift_Plugins_Reporters_HtmlReporter implements Swift_Plugins_Reporter -{ - - /** - * Notifies this ReportNotifier that $address failed or succeeded. - * @param Swift_Mime_Message $message - * @param string $address - * @param int $result from {@link RESULT_PASS, RESULT_FAIL} - */ - public function notify(Swift_Mime_Message $message, $address, $result) - { - if (self::RESULT_PASS == $result) - { - echo "<div style=\"color: #fff; background: #006600; padding: 2px; margin: 2px;\">" . PHP_EOL; - echo "PASS " . $address . PHP_EOL; - echo "</div>" . PHP_EOL; - flush(); - } - else - { - echo "<div style=\"color: #fff; background: #880000; padding: 2px; margin: 2px;\">" . PHP_EOL; - echo "FAIL " . $address . PHP_EOL; - echo "</div>" . PHP_EOL; - flush(); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Plugins/ThrottlerPlugin.php b/pandora_console/include/swiftmailer/classes/Swift/Plugins/ThrottlerPlugin.php deleted file mode 100644 index 43bb1f48c7..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Plugins/ThrottlerPlugin.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Events/SendEvent.php'; -//@require 'Swift/Plugins/BandwidthMonitorPlugin.php'; -//@require 'Swift/Plugins/Sleeper.php'; -//@require 'Swift/Plugins/Timer.php'; - -/** - * Throttles the rate at which emails are sent. - * @package Swift - * @subpackage Plugins - * @author Chris Corbyn - */ -class Swift_Plugins_ThrottlerPlugin - extends Swift_Plugins_BandwidthMonitorPlugin - implements Swift_Plugins_Sleeper, Swift_Plugins_Timer -{ - - /** Flag for throttling in bytes per minute */ - const BYTES_PER_MINUTE = 0x01; - - /** Flag for throttling in emails per minute */ - const MESSAGES_PER_MINUTE = 0x10; - - /** - * The Sleeper instance for sleeping. - * @var Swift_Plugins_Sleeper - * @access private - */ - private $_sleeper; - - /** - * The Timer instance which provides the timestamp. - * @var Swift_Plugins_Timer - * @access private - */ - private $_timer; - - /** - * The time at which the first email was sent. - * @var int - * @access private - */ - private $_start; - - /** - * The rate at which messages should be sent. - * @var int - * @access private - */ - private $_rate; - - /** - * The mode for throttling. - * This is {@link BYTES_PER_MINUTE} or {@link MESSAGES_PER_MINUTE} - * @var int - * @access private - */ - private $_mode; - - /** - * An internal counter of the number of messages sent. - * @var int - * @access private - */ - private $_messages = 0; - - /** - * Create a new ThrottlerPlugin. - * @param int $rate - * @param int $mode, defaults to {@link BYTES_PER_MINUTE} - * @param Swift_Plugins_Sleeper $sleeper (only needed in testing) - * @param Swift_Plugins_Timer $timer (only needed in testing) - */ - public function __construct($rate, $mode = self::BYTES_PER_MINUTE, - Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null) - { - $this->_rate = $rate; - $this->_mode = $mode; - $this->_sleeper = $sleeper; - $this->_timer = $timer; - } - - /** - * Invoked immediately before the Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function beforeSendPerformed(Swift_Events_SendEvent $evt) - { - $time = $this->getTimestamp(); - if (!isset($this->_start)) - { - $this->_start = $time; - } - $duration = $time - $this->_start; - - if (self::BYTES_PER_MINUTE == $this->_mode) - { - $sleep = $this->_throttleBytesPerMinute($duration); - } - else - { - $sleep = $this->_throttleMessagesPerMinute($duration); - } - - if ($sleep > 0) - { - $this->sleep($sleep); - } - } - - /** - * Invoked when a Message is sent. - * @param Swift_Events_SendEvent $evt - */ - public function sendPerformed(Swift_Events_SendEvent $evt) - { - parent::sendPerformed($evt); - ++$this->_messages; - } - - /** - * Sleep for $seconds. - * @param int $seconds - */ - public function sleep($seconds) - { - if (isset($this->_sleeper)) - { - $this->_sleeper->sleep($seconds); - } - else - { - sleep($seconds); - } - } - - /** - * Get the current UNIX timestamp - * @return int - */ - public function getTimestamp() - { - if (isset($this->_timer)) - { - return $this->_timer->getTimestamp(); - } - else - { - return time(); - } - } - - // -- Private methods - - /** - * Get a number of seconds to sleep for. - * @param int $timePassed - * @return int - * @access private - */ - private function _throttleBytesPerMinute($timePassed) - { - $expectedDuration = $this->getBytesOut() / ($this->_rate / 60); - return (int) ceil($expectedDuration - $timePassed); - } - - /** - * Get a number of seconds to sleep for. - * @param int $timePassed - * @return int - * @access private - */ - private function _throttleMessagesPerMinute($timePassed) - { - $expectedDuration = $this->_messages / ($this->_rate / 60); - return (int) ceil($expectedDuration - $timePassed); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Preferences.php b/pandora_console/include/swiftmailer/classes/Swift/Preferences.php deleted file mode 100644 index 20a2e5f18d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Preferences.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/DependencyContainer.php'; - -/** - * Changes some global preference settings in Swift Mailer. - * @package Swift - * @author Chris Corbyn - */ -class Swift_Preferences -{ - - /** Singleton instance */ - private static $_instance = null; - - /** Constructor not to be used */ - private function __construct() { } - - /** - * Get a new instance of Preferences. - * @return Swift_Preferences - */ - public static function getInstance() - { - if (!isset(self::$_instance)) - { - self::$_instance = new self(); - } - return self::$_instance; - } - - /** - * Set the default charset used. - * @param string - * @return Swift_Preferences - */ - public function setCharset($charset) - { - Swift_DependencyContainer::getInstance() - ->register('properties.charset')->asValue($charset); - return $this; - } - - /** - * Set the directory where temporary files can be saved. - * @param string $dir - * @return Swift_Preferences - */ - public function setTempDir($dir) - { - Swift_DependencyContainer::getInstance() - ->register('tempdir')->asValue($dir); - return $this; - } - - /** - * Set the type of cache to use (i.e. "disk" or "array"). - * @param string $type - * @return Swift_Preferences - */ - public function setCacheType($type) - { - Swift_DependencyContainer::getInstance() - ->register('cache')->asAliasOf(sprintf('cache.%s', $type)); - return $this; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/SendmailTransport.php b/pandora_console/include/swiftmailer/classes/Swift/SendmailTransport.php deleted file mode 100644 index 60a7000769..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/SendmailTransport.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/SendmailTransport.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_SendmailTransport extends Swift_Transport_SendmailTransport -{ - - /** - * Create a new SendmailTransport, optionally using $command for sending. - * @param string $command - */ - public function __construct($command = '/usr/sbin/sendmail -bs') - { - call_user_func_array( - array($this, 'Swift_Transport_SendmailTransport::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('transport.sendmail') - ); - - $this->setCommand($command); - } - - /** - * Create a new SendmailTransport instance. - * @param string $command - * @return Swift_SendmailTransport - */ - public static function newInstance($command = '/usr/sbin/sendmail -bs') - { - return new self($command); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/SmtpTransport.php b/pandora_console/include/swiftmailer/classes/Swift/SmtpTransport.php deleted file mode 100644 index 65180d5870..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/SmtpTransport.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/EsmtpTransport.php'; -//@require 'Swift/DependencyContainer.php'; - -/** - * Sends Messages over SMTP with ESMTP support. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_SmtpTransport extends Swift_Transport_EsmtpTransport -{ - - /** - * Create a new SmtpTransport, optionally with $host, $port and $security. - * @param string $host - * @param int $port - * @param int $security - */ - public function __construct($host = 'localhost', $port = 25, - $security = null) - { - call_user_func_array( - array($this, 'Swift_Transport_EsmtpTransport::__construct'), - Swift_DependencyContainer::getInstance() - ->createDependenciesFor('transport.smtp') - ); - - $this->setHost($host); - $this->setPort($port); - $this->setEncryption($security); - } - - /** - * Create a new SmtpTransport instance. - * @param string $host - * @param int $port - * @param int $security - * @return Swift_SmtpTransport - */ - public static function newInstance($host = 'localhost', $port = 25, - $security = null) - { - return new self($host, $port, $security); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/StreamFilter.php b/pandora_console/include/swiftmailer/classes/Swift/StreamFilter.php deleted file mode 100644 index 6c262ce3a3..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/StreamFilter.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Processes bytes as they pass through a stream and performs filtering. - * @package Swift - * @author Chris Corbyn - */ -interface Swift_StreamFilter -{ - - /** - * Based on the buffer given, this returns true if more buffering is needed. - * @param mixed $buffer - * @return boolean - */ - public function shouldBuffer($buffer); - - /** - * Filters $buffer and returns the changes. - * @param mixed $buffer - * @return mixed - */ - public function filter($buffer); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php b/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php deleted file mode 100644 index 2df52be1b9..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/StreamFilter.php'; - -/** - * Processes bytes as they pass through a buffer and replaces sequences in it. - * This stream filter deals with Byte arrays rather than simple strings. - * @package Swift - * @author Chris Corbyn - */ -class Swift_StreamFilters_ByteArrayReplacementFilter - implements Swift_StreamFilter -{ - - /** The needle(s) to search for */ - private $_search; - - /** The replacement(s) to make */ - private $_replace; - - /** The Index for searching */ - private $_index; - - /** The Search Tree */ - private $_tree = array(); - - /** Gives the size of the largest search */ - private $_treeMaxLen = 0; - - private $_repSize; - - /** - * Create a new ByteArrayReplacementFilter with $search and $replace. - * @param array $search - * @param array $replace - */ - public function __construct($search, $replace) - { - $this->_search = $search; - $this->_index = array(); - $this->_tree = array(); - $this->_replace = array(); - $this->_repSize = array(); - - $tree = null; - $i = null; - $last_size = $size = 0; - foreach ($search as $i => $search_element) - { - if ($tree !== null) - { - $tree[-1] = min (count($replace) - 1, $i - 1); - $tree[-2] = $last_size; - } - $tree = &$this->_tree; - if (is_array ($search_element)) - { - foreach ($search_element as $k => $char) - { - $this->_index[$char] = true; - if (!isset($tree[$char])) - { - $tree[$char] = array(); - } - $tree = &$tree[$char]; - } - $last_size = $k+1; - $size = max($size, $last_size); - } - else - { - $last_size = 1; - if (!isset($tree[$search_element])) - { - $tree[$search_element] = array(); - } - $tree = &$tree[$search_element]; - $size = max($last_size, $size); - $this->_index[$search_element] = true; - } - } - if ($i !== null) - { - $tree[-1] = min (count ($replace) - 1, $i); - $tree[-2] = $last_size; - $this->_treeMaxLen = $size; - } - foreach ($replace as $rep) - { - if (!is_array($rep)) - { - $rep = array ($rep); - } - $this->_replace[] = $rep; - } - for ($i = count($this->_replace) - 1; $i >= 0; --$i) - { - $this->_replace[$i] = $rep = $this->filter($this->_replace[$i], $i); - $this->_repSize[$i] = count($rep); - } - } - - /** - * Returns true if based on the buffer passed more bytes should be buffered. - * @param array $buffer - * @return boolean - */ - public function shouldBuffer($buffer) - { - $endOfBuffer = end($buffer); - return isset ($this->_index[$endOfBuffer]); - } - - /** - * Perform the actual replacements on $buffer and return the result. - * @param array $buffer - * @return array - */ - public function filter($buffer, $_minReplaces = -1) - { - if ($this->_treeMaxLen == 0) - { - return $buffer; - } - - $newBuffer = array(); - $buf_size = count($buffer); - for ($i = 0; $i < $buf_size; ++$i) - { - $search_pos = $this->_tree; - $last_found = PHP_INT_MAX; - // We try to find if the next byte is part of a search pattern - for ($j = 0; $j <= $this->_treeMaxLen; ++$j) - { - // We have a new byte for a search pattern - if (isset ($buffer [$p = $i + $j]) && isset($search_pos[$buffer[$p]])) - { - $search_pos = $search_pos[$buffer[$p]]; - // We have a complete pattern, save, in case we don't find a better match later - if (isset($search_pos[- 1]) && $search_pos[-1] < $last_found - && $search_pos[-1] > $_minReplaces) - { - $last_found = $search_pos[-1]; - $last_size = $search_pos[-2]; - } - } - // We got a complete pattern - elseif ($last_found !== PHP_INT_MAX) - { - // Adding replacement datas to output buffer - $rep_size = $this->_repSize[$last_found]; - for ($j = 0; $j < $rep_size; ++$j) - { - $newBuffer[] = $this->_replace[$last_found][$j]; - } - // We Move cursor forward - $i += $last_size - 1; - // Edge Case, last position in buffer - if ($i >= $buf_size) - { - $newBuffer[] = $buffer[$i]; - } - - // We start the next loop - continue 2; - } - else - { - // this byte is not in a pattern and we haven't found another pattern - break; - } - } - // Normal byte, move it to output buffer - $newBuffer[] = $buffer[$i]; - } - - return $newBuffer; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/StringReplacementFilter.php b/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/StringReplacementFilter.php deleted file mode 100644 index 9ab6c30858..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/StringReplacementFilter.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/StreamFilter.php'; - -/** - * Processes bytes as they pass through a buffer and replaces sequences in it. - * @package Swift - * @author Chris Corbyn - */ -class Swift_StreamFilters_StringReplacementFilter implements Swift_StreamFilter -{ - - /** The needle(s) to search for */ - private $_search; - - /** The replacement(s) to make */ - private $_replace; - - /** - * Create a new StringReplacementFilter with $search and $replace. - * @param string|array $search - * @param string|array $replace - */ - public function __construct($search, $replace) - { - $this->_search = $search; - $this->_replace = $replace; - } - - /** - * Returns true if based on the buffer passed more bytes should be buffered. - * @param string $buffer - * @return boolean - */ - public function shouldBuffer($buffer) - { - $endOfBuffer = substr($buffer, -1); - foreach ((array) $this->_search as $needle) - { - if (false !== strpos($needle, $endOfBuffer)) - { - return true; - } - } - return false; - } - - /** - * Perform the actual replacements on $buffer and return the result. - * @param string $buffer - * @return string - */ - public function filter($buffer) - { - return str_replace($this->_search, $this->_replace, $buffer); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/StringReplacementFilterFactory.php b/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/StringReplacementFilterFactory.php deleted file mode 100644 index fcd4b830c8..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/StreamFilters/StringReplacementFilterFactory.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/StreamFilters/StringReplacementFilter.php'; -//@require 'Swift/StreamFilterFactory.php'; - -/** - * Creates filters for replacing needles in a string buffer. - * @package Swift - * @author Chris Corbyn - */ -class Swift_StreamFilters_StringReplacementFilterFactory - implements Swift_ReplacementFilterFactory -{ - - /** Lazy-loaded filters */ - private $_filters = array(); - - /** - * Create a new StreamFilter to replace $search with $replace in a string. - * @param string $search - * @param string $replace - * @return Swift_StreamFilter - */ - public function createFilter($search, $replace) - { - if (!isset($this->_filters[$search][$replace])) - { - if (!isset($this->_filters[$search])) - { - $this->_filters[$search] = array(); - } - - if (!isset($this->_filters[$search][$replace])) - { - $this->_filters[$search][$replace] = array(); - } - - $this->_filters[$search][$replace] - = new Swift_StreamFilters_StringReplacementFilter($search, $replace); - } - - return $this->_filters[$search][$replace]; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport.php b/pandora_console/include/swiftmailer/classes/Swift/Transport.php deleted file mode 100644 index 9b54752fba..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Mime/Message.php'; -//@require 'Swift/Events/EventListener.php'; - -/** - * Sends Messages via an abstract Transport subsystem. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -interface Swift_Transport -{ - - /** - * Test if this Transport mechanism has started. - * - * @return boolean - */ - public function isStarted(); - - /** - * Start this Transport mechanism. - */ - public function start(); - - /** - * Stop this Transport mechanism. - */ - public function stop(); - - /** - * Send the given Message. - * - * Recipient/sender data will be retreived from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] &$failedRecipients to collect failures by-reference - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null); - - /** - * Register a plugin in the Transport. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php deleted file mode 100644 index 3329d34f77..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/AbstractSmtpTransport.php +++ /dev/null @@ -1,543 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport.php'; -//@require 'Swift/Transport/IoBuffer.php'; -//@require 'Swift/Transport/CommandSentException.php'; -//@require 'Swift/TransportException.php'; -//@require 'Swift/Mime/Message.php'; -//@require 'Swift/Events/EventDispatcher.php'; -//@require 'Swift/Events/EventListener.php'; - -/** - * Sends Messages over SMTP. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -abstract class Swift_Transport_AbstractSmtpTransport - implements Swift_Transport -{ - - /** Input-Output buffer for sending/receiving SMTP commands and responses */ - protected $_buffer; - - /** Connection status */ - protected $_started = false; - - /** The domain name to use in HELO command */ - protected $_domain = '[127.0.0.1]'; - - /** The event dispatching layer */ - protected $_eventDispatcher; - - /** Return an array of params for the Buffer */ - abstract protected function _getBufferParams(); - - /** - * Creates a new EsmtpTransport using the given I/O buffer. - * - * @param Swift_Transport_IoBuffer $buf - * @param Swift_Events_EventDispatcher $dispatcher - */ - public function __construct(Swift_Transport_IoBuffer $buf, - Swift_Events_EventDispatcher $dispatcher) - { - $this->_eventDispatcher = $dispatcher; - $this->_buffer = $buf; - $this->_lookupHostname(); - } - - /** - * Set the name of the local domain which Swift will identify itself as. - * This should be a fully-qualified domain name and should be truly the domain - * you're using. If your server doesn't have a domain name, use the IP in square - * brackets (i.e. [127.0.0.1]). - * - * @param string $domain - */ - public function setLocalDomain($domain) - { - $this->_domain = $domain; - return $this; - } - - /** - * Get the name of the domain Swift will identify as. - * - * @return string - */ - public function getLocalDomain() - { - return $this->_domain; - } - - /** - * Start the SMTP connection. - */ - public function start() - { - if (!$this->_started) - { - if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStarted'); - if ($evt->bubbleCancelled()) - { - return; - } - } - - try - { - $this->_buffer->initialize($this->_getBufferParams()); - } - catch (Swift_TransportException $e) - { - $this->_throwException($e); - } - $this->_readGreeting(); - $this->_doHeloCommand(); - - if ($evt) - { - $this->_eventDispatcher->dispatchEvent($evt, 'transportStarted'); - } - - $this->_started = true; - } - } - - /** - * Test if an SMTP connection has been established. - * - * @return boolean - */ - public function isStarted() - { - return $this->_started; - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retreived from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] &$failedRecipients to collect failures by-reference - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $sent = 0; - $failedRecipients = (array) $failedRecipients; - - if (!$reversePath = $this->_getReversePath($message)) - { - throw new Swift_TransportException( - 'Cannot send message without a sender address' - ); - } - - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) - { - return 0; - } - } - - $to = (array) $message->getTo(); - $cc = (array) $message->getCc(); - $bcc = (array) $message->getBcc(); - - $message->setBcc(array()); - - try - { - $sent += $this->_sendTo($message, $reversePath, $to, $failedRecipients); - $sent += $this->_sendCc($message, $reversePath, $cc, $failedRecipients); - $sent += $this->_sendBcc($message, $reversePath, $bcc, $failedRecipients); - } - catch (Exception $e) - { - $message->setBcc($bcc); - throw $e; - } - - $message->setBcc($bcc); - - if ($evt) - { - if ($sent == count($to) + count($cc) + count($bcc)) - { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - } - elseif ($sent > 0) - { - $evt->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE); - } - else - { - $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); - } - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - $message->generateId(); //Make sure a new Message ID is used - - return $sent; - } - - /** - * Stop the SMTP connection. - */ - public function stop() - { - if ($this->_started) - { - if ($evt = $this->_eventDispatcher->createTransportChangeEvent($this)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped'); - if ($evt->bubbleCancelled()) - { - return; - } - } - - try - { - $this->executeCommand("QUIT\r\n", array(221)); - } - catch (Swift_TransportException $e) {} - - try - { - $this->_buffer->terminate(); - - if ($evt) - { - $this->_eventDispatcher->dispatchEvent($evt, 'transportStopped'); - } - } - catch (Swift_TransportException $e) - { - $this->_throwException($e); - } - } - $this->_started = false; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_eventDispatcher->bindEventListener($plugin); - } - - /** - * Reset the current mail transaction. - */ - public function reset() - { - $this->executeCommand("RSET\r\n", array(250)); - } - - /** - * Get the IoBuffer where read/writes are occurring. - * - * @return Swift_Transport_IoBuffer - */ - public function getBuffer() - { - return $this->_buffer; - } - - /** - * Run a command against the buffer, expecting the given response codes. - * - * If no response codes are given, the response will not be validated. - * If codes are given, an exception will be thrown on an invalid response. - * - * @param string $command - * @param int[] $codes - * @param string[] &$failures - * @return string - */ - public function executeCommand($command, $codes = array(), &$failures = null) - { - $failures = (array) $failures; - $seq = $this->_buffer->write($command); - $response = $this->_getFullResponse($seq); - if ($evt = $this->_eventDispatcher->createCommandEvent($this, $command, $codes)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'commandSent'); - } - $this->_assertResponseCode($response, $codes); - return $response; - } - - // -- Protected methods - - /** Read the opening SMTP greeting */ - protected function _readGreeting() - { - $this->_assertResponseCode($this->_getFullResponse(0), array(220)); - } - - /** Send the HELO welcome */ - protected function _doHeloCommand() - { - $this->executeCommand( - sprintf("HELO %s\r\n", $this->_domain), array(250) - ); - } - - /** Send the MAIL FROM command */ - protected function _doMailFromCommand($address) - { - $this->executeCommand( - sprintf("MAIL FROM: <%s>\r\n", $address), array(250) - ); - } - - /** Send the RCPT TO command */ - protected function _doRcptToCommand($address) - { - $this->executeCommand( - sprintf("RCPT TO: <%s>\r\n", $address), array(250, 251, 252) - ); - } - - /** Send the DATA command */ - protected function _doDataCommand() - { - $this->executeCommand("DATA\r\n", array(354)); - } - - /** Stream the contents of the message over the buffer */ - protected function _streamMessage(Swift_Mime_Message $message) - { - $this->_buffer->setWriteTranslations(array("\r\n." => "\r\n..")); - try - { - $message->toByteStream($this->_buffer); - $this->_buffer->flushBuffers(); - } - catch (Swift_TransportException $e) - { - $this->_throwException($e); - } - $this->_buffer->setWriteTranslations(array()); - $this->executeCommand("\r\n.\r\n", array(250)); - } - - /** Determine the best-use reverse path for this message */ - protected function _getReversePath(Swift_Mime_Message $message) - { - $return = $message->getReturnPath(); - $sender = $message->getSender(); - $from = $message->getFrom(); - $path = null; - if (!empty($return)) - { - $path = $return; - } - elseif (!empty($sender)) - { - // Don't use array_keys - reset($sender); // Reset Pointer to first pos - $path = key($sender); // Get key - } - elseif (!empty($from)) - { - reset($from); // Reset Pointer to first pos - $path = key($from); // Get key - } - return $path; - } - - /** Throw a TransportException, first sending it to any listeners */ - protected function _throwException(Swift_TransportException $e) - { - if ($evt = $this->_eventDispatcher->createTransportExceptionEvent($this, $e)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'exceptionThrown'); - if (!$evt->bubbleCancelled()) - { - throw $e; - } - } - else - { - throw $e; - } - } - - /** Throws an Exception if a response code is incorrect */ - protected function _assertResponseCode($response, $wanted) - { - list($code, $separator, $text) = sscanf($response, '%3d%[ -]%s'); - $valid = (empty($wanted) || in_array($code, $wanted)); - - if ($evt = $this->_eventDispatcher->createResponseEvent($this, $response, - $valid)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'responseReceived'); - } - - if (!$valid) - { - $this->_throwException( - new Swift_TransportException( - 'Expected response code ' . implode('/', $wanted) . ' but got code ' . - '"' . $code . '", with message "' . $response . '"' - ) - ); - } - } - - /** Get an entire multi-line response using its sequence number */ - protected function _getFullResponse($seq) - { - $response = ''; - try - { - do - { - $line = $this->_buffer->readLine($seq); - $response .= $line; - } - while (null !== $line && false !== $line && ' ' != $line{3}); - } - catch (Swift_TransportException $e) - { - $this->_throwException($e); - } - return $response; - } - - // -- Private methods - - /** Send an email to the given recipients from the given reverse path */ - private function _doMailTransaction($message, $reversePath, - array $recipients, array &$failedRecipients) - { - $sent = 0; - $this->_doMailFromCommand($reversePath); - foreach ($recipients as $forwardPath) - { - try - { - $this->_doRcptToCommand($forwardPath); - $sent++; - } - catch (Swift_TransportException $e) - { - $failedRecipients[] = $forwardPath; - } - } - - if ($sent != 0) - { - $this->_doDataCommand(); - $this->_streamMessage($message); - } - else - { - $this->reset(); - } - - return $sent; - } - - /** Send a message to the given To: recipients */ - private function _sendTo(Swift_Mime_Message $message, $reversePath, - array $to, array &$failedRecipients) - { - if (empty($to)) - { - return 0; - } - return $this->_doMailTransaction($message, $reversePath, array_keys($to), - $failedRecipients); - } - - /** Send a message to the given Cc: recipients */ - private function _sendCc(Swift_Mime_Message $message, $reversePath, - array $cc, array &$failedRecipients) - { - if (empty($cc)) - { - return 0; - } - return $this->_doMailTransaction($message, $reversePath, array_keys($cc), - $failedRecipients); - } - - /** Send a message to all Bcc: recipients */ - private function _sendBcc(Swift_Mime_Message $message, $reversePath, - array $bcc, array &$failedRecipients) - { - $sent = 0; - foreach ($bcc as $forwardPath => $name) - { - $message->setBcc(array($forwardPath => $name)); - $sent += $this->_doMailTransaction( - $message, $reversePath, array($forwardPath), $failedRecipients - ); - } - return $sent; - } - - /** Try to determine the hostname of the server this is run on */ - private function _lookupHostname() - { - if (!empty($_SERVER['SERVER_NAME']) - && $this->_isFqdn($_SERVER['SERVER_NAME'])) - { - $this->_domain = $_SERVER['SERVER_NAME']; - } - elseif (!empty($_SERVER['SERVER_ADDR'])) - { - $this->_domain = sprintf('[%s]', $_SERVER['SERVER_ADDR']); - } - } - - /** Determine is the $hostname is a fully-qualified name */ - private function _isFqdn($hostname) - { - //We could do a really thorough check, but there's really no point - if (false !== $dotPos = strpos($hostname, '.')) - { - return ($dotPos > 0) && ($dotPos != strlen($hostname) - 1); - } - else - { - return false; - } - } - - /** - * Destructor. - */ - public function __destruct() - { - $this->stop(); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php deleted file mode 100644 index 4c7e0f2ecc..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/Esmtp/Authenticator.php'; -//@require 'Swift/Transport/SmtpAgent.php'; -//@require 'Swift/TransportException.php'; - -/** - * Handles CRAM-MD5 authentication. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_Esmtp_Auth_CramMd5Authenticator - implements Swift_Transport_Esmtp_Authenticator -{ - - /** - * Get the name of the AUTH mechanism this Authenticator handles. - * @return string - */ - public function getAuthKeyword() - { - return 'CRAM-MD5'; - } - - /** - * Try to authenticate the user with $username and $password. - * @param Swift_Transport_SmtpAgent $agent - * @param string $username - * @param string $password - * @return boolean - */ - public function authenticate(Swift_Transport_SmtpAgent $agent, - $username, $password) - { - try - { - $challenge = $agent->executeCommand("AUTH CRAM-MD5\r\n", array(334)); - $challenge = base64_decode(substr($challenge, 4)); - $message = base64_encode( - $username . ' ' . $this->_getResponse($password, $challenge) - ); - $agent->executeCommand(sprintf("%s\r\n", $message), array(235)); - return true; - } - catch (Swift_TransportException $e) - { - $agent->executeCommand("RSET\r\n", array(250)); - return false; - } - } - - /** - * Generate a CRAM-MD5 response from a server challenge. - * @param string $secret - * @param string $challenge - * @return string - */ - private function _getResponse($secret, $challenge) - { - if (strlen($secret) > 64) - { - $secret = pack('H32', md5($secret)); - } - - if (strlen($secret) < 64) - { - $secret = str_pad($secret, 64, chr(0)); - } - - $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); - $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); - - $inner = pack('H32', md5($k_ipad . $challenge)); - $digest = md5($k_opad . $inner); - - return $digest; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php deleted file mode 100644 index bd226174e9..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/Esmtp/Authenticator.php'; -//@require 'Swift/Transport/SmtpAgent.php'; -//@require 'Swift/TransportException.php'; - -/** - * Handles LOGIN authentication. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_Esmtp_Auth_LoginAuthenticator - implements Swift_Transport_Esmtp_Authenticator -{ - - /** - * Get the name of the AUTH mechanism this Authenticator handles. - * @return string - */ - public function getAuthKeyword() - { - return 'LOGIN'; - } - - /** - * Try to authenticate the user with $username and $password. - * @param Swift_Transport_SmtpAgent $agent - * @param string $username - * @param string $password - * @return boolean - */ - public function authenticate(Swift_Transport_SmtpAgent $agent, - $username, $password) - { - try - { - $agent->executeCommand("AUTH LOGIN\r\n", array(334)); - $agent->executeCommand(sprintf("%s\r\n", base64_encode($username)), array(334)); - $agent->executeCommand(sprintf("%s\r\n", base64_encode($password)), array(235)); - return true; - } - catch (Swift_TransportException $e) - { - $agent->executeCommand("RSET\r\n", array(250)); - return false; - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php deleted file mode 100644 index ddd80942fc..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/Esmtp/Authenticator.php'; -//@require 'Swift/Transport/SmtpAgent.php'; -//@require 'Swift/TransportException.php'; - -/** - * Handles PLAIN authentication. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_Esmtp_Auth_PlainAuthenticator - implements Swift_Transport_Esmtp_Authenticator -{ - - /** - * Get the name of the AUTH mechanism this Authenticator handles. - * @return string - */ - public function getAuthKeyword() - { - return 'PLAIN'; - } - - /** - * Try to authenticate the user with $username and $password. - * @param Swift_Transport_SmtpAgent $agent - * @param string $username - * @param string $password - * @return boolean - */ - public function authenticate(Swift_Transport_SmtpAgent $agent, - $username, $password) - { - try - { - $message = base64_encode($username . chr(0) . $username . chr(0) . $password); - $agent->executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); - return true; - } - catch (Swift_TransportException $e) - { - $agent->executeCommand("RSET\r\n", array(250)); - return false; - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/AuthHandler.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/AuthHandler.php deleted file mode 100644 index a223169b7a..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/AuthHandler.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/TransportException.php'; -//@require 'Swift/Transport/EsmtpHandler.php'; -//@require 'Swift/Transport/SmtpAgent.php'; - -/** - * An ESMTP handler for AUTH support. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_Esmtp_AuthHandler implements Swift_Transport_EsmtpHandler -{ - - /** - * Authenticators available to process the request. - * @var Swift_Transport_Esmtp_Authenticator[] - * @access private - */ - private $_authenticators = array(); - - /** - * The username for authentication. - * @var string - * @access private - */ - private $_username; - - /** - * The password for authentication. - * @var string - * @access private - */ - private $_password; - - /** - * The auth mode for authentication. - * @var string - * @access private - */ - private $_auth_mode; - - /** - * The ESMTP AUTH parameters available. - * @var string[] - * @access private - */ - private $_esmtpParams = array(); - - /** - * Create a new AuthHandler with $authenticators for support. - * @param Swift_Transport_Esmtp_Authenticator[] $authenticators - */ - public function __construct(array $authenticators) - { - $this->setAuthenticators($authenticators); - } - - /** - * Set the Authenticators which can process a login request. - * @param Swift_Transport_Esmtp_Authenticator[] $authenticators - */ - public function setAuthenticators(array $authenticators) - { - $this->_authenticators = $authenticators; - } - - /** - * Get the Authenticators which can process a login request. - * @return Swift_Transport_Esmtp_Authenticator[] - */ - public function getAuthenticators() - { - return $this->_authenticators; - } - - /** - * Set the username to authenticate with. - * @param string $username - */ - public function setUsername($username) - { - $this->_username = $username; - } - - /** - * Get the username to authenticate with. - * @return string - */ - public function getUsername() - { - return $this->_username; - } - - /** - * Set the password to authenticate with. - * @param string $password - */ - public function setPassword($password) - { - $this->_password = $password; - } - - /** - * Get the password to authenticate with. - * @return string - */ - public function getPassword() - { - return $this->_password; - } - - /** - * Set the auth mode to use to authenticate. - * @param string $mode - */ - public function setAuthMode($mode) - { - $this->_auth_mode = $mode; - } - - /** - * Get the auth mode to use to authenticate. - * @return string - */ - public function getAuthMode() - { - return $this->_auth_mode; - } - - /** - * Get the name of the ESMTP extension this handles. - * @return boolean - */ - public function getHandledKeyword() - { - return 'AUTH'; - } - - /** - * Set the parameters which the EHLO greeting indicated. - * @param string[] $parameters - */ - public function setKeywordParams(array $parameters) - { - $this->_esmtpParams = $parameters; - } - - /** - * Runs immediately after a EHLO has been issued. - * @param Swift_Transport_SmtpAgent $agent to read/write - */ - public function afterEhlo(Swift_Transport_SmtpAgent $agent) - { - if ($this->_username) - { - $count = 0; - foreach ($this->_getAuthenticatorsForAgent() as $authenticator) - { - if (in_array(strtolower($authenticator->getAuthKeyword()), - array_map('strtolower', $this->_esmtpParams))) - { - $count++; - if ($authenticator->authenticate($agent, $this->_username, $this->_password)) - { - return; - } - } - } - throw new Swift_TransportException( - 'Failed to authenticate on SMTP server with username "' . - $this->_username . '" using ' . $count . ' possible authenticators' - ); - } - } - - /** - * Not used. - */ - public function getMailParams() - { - return array(); - } - - /** - * Not used. - */ - public function getRcptParams() - { - return array(); - } - - /** - * Not used. - */ - public function onCommand(Swift_Transport_SmtpAgent $agent, - $command, $codes = array(), &$failedRecipients = null, &$stop = false) - { - } - - /** - * Returns +1, -1 or 0 according to the rules for usort(). - * This method is called to ensure extensions can be execute in an appropriate order. - * @param string $esmtpKeyword to compare with - * @return int - */ - public function getPriorityOver($esmtpKeyword) - { - return 0; - } - - /** - * Returns an array of method names which are exposed to the Esmtp class. - * @return string[] - */ - public function exposeMixinMethods() - { - return array('setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode'); - } - - /** - * Not used. - */ - public function resetState() - { - } - - // -- Protected methods - - /** - * Returns the authenticator list for the given agent. - * @param Swift_Transport_SmtpAgent $agent - * @return array - * @access protected - */ - protected function _getAuthenticatorsForAgent() - { - if (!$mode = strtolower($this->_auth_mode)) - { - return $this->_authenticators; - } - - foreach ($this->_authenticators as $authenticator) - { - if (strtolower($authenticator->getAuthKeyword()) == $mode) - { - return array($authenticator); - } - } - - throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); - } -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Authenticator.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Authenticator.php deleted file mode 100644 index bf166d324c..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/Esmtp/Authenticator.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/SmtpAgent.php'; - -/** - * An Authentication mechanism. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -interface Swift_Transport_Esmtp_Authenticator -{ - - /** - * Get the name of the AUTH mechanism this Authenticator handles. - * @return string - */ - public function getAuthKeyword(); - - /** - * Try to authenticate the user with $username and $password. - * @param Swift_Transport_SmtpAgent $agent - * @param string $username - * @param string $password - * @return boolean - */ - public function authenticate(Swift_Transport_SmtpAgent $agent, - $username, $password); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/EsmtpHandler.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/EsmtpHandler.php deleted file mode 100644 index e96f95f616..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/EsmtpHandler.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/EsmtpBufferWrapper.php'; - -/** - * An ESMTP handler. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -interface Swift_Transport_EsmtpHandler -{ - - /** - * Get the name of the ESMTP extension this handles. - * @return boolean - */ - public function getHandledKeyword(); - - /** - * Set the parameters which the EHLO greeting indicated. - * @param string[] $parameters - */ - public function setKeywordParams(array $parameters); - - /** - * Runs immediately after a EHLO has been issued. - * @param Swift_Transport_SmtpAgent $agent to read/write - */ - public function afterEhlo(Swift_Transport_SmtpAgent $agent); - - /** - * Get params which are appended to MAIL FROM:<>. - * @return string[] - */ - public function getMailParams(); - - /** - * Get params which are appended to RCPT TO:<>. - * @return string[] - */ - public function getRcptParams(); - - /** - * Runs when a command is due to be sent. - * @param Swift_Transport_SmtpAgent $agent to read/write - * @param string $command to send - * @param int[] $codes expected in response - * @param string[] &$failedRecipients - * @param boolean &$stop to be set true if the command is now sent - */ - public function onCommand(Swift_Transport_SmtpAgent $agent, - $command, $codes = array(), &$failedRecipients = null, &$stop = false); - - /** - * Returns +1, -1 or 0 according to the rules for usort(). - * This method is called to ensure extensions can be execute in an appropriate order. - * @param string $esmtpKeyword to compare with - * @return int - */ - public function getPriorityOver($esmtpKeyword); - - /** - * Returns an array of method names which are exposed to the Esmtp class. - * @return string[] - */ - public function exposeMixinMethods(); - - /** - * Tells this handler to clear any buffers and reset its state. - */ - public function resetState(); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/EsmtpTransport.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/EsmtpTransport.php deleted file mode 100644 index fc10ba870c..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/EsmtpTransport.php +++ /dev/null @@ -1,339 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/AbstractSmtpTransport.php'; -//@require 'Swift/Transport/EsmtpHandler.php'; -//@require 'Swift/Transport/IoBuffer.php'; -//@require 'Swift/Transport/SmtpAgent.php'; -//@require 'Swift/TransportException.php'; -//@require 'Swift/Mime/Message.php'; -//@require 'Swift/Events/EventDispatcher.php'; - -/** - * Sends Messages over SMTP with ESMTP support. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_EsmtpTransport - extends Swift_Transport_AbstractSmtpTransport - implements Swift_Transport_SmtpAgent -{ - - /** - * ESMTP extension handlers. - * @var Swift_Transport_EsmtpHandler[] - * @access private - */ - private $_handlers = array(); - - /** - * ESMTP capabilities. - * @var string[] - * @access private - */ - private $_capabilities = array(); - - /** - * Connection buffer parameters. - * @var array - * @access protected - */ - private $_params = array( - 'protocol' => 'tcp', - 'host' => 'localhost', - 'port' => 25, - 'timeout' => 30, - 'blocking' => 1, - 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET - ); - - /** - * Creates a new EsmtpTransport using the given I/O buffer. - * @param Swift_Transport_IoBuffer $buf - * @param Swift_Transport_EsmtpHandler[] $extensionHandlers - * @param Swift_Events_EventDispatcher $dispatcher - */ - public function __construct(Swift_Transport_IoBuffer $buf, - array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher) - { - parent::__construct($buf, $dispatcher); - $this->setExtensionHandlers($extensionHandlers); - } - - /** - * Set the host to connect to. - * @param string $host - */ - public function setHost($host) - { - $this->_params['host'] = $host; - return $this; - } - - /** - * Get the host to connect to. - * @return string - */ - public function getHost() - { - return $this->_params['host']; - } - - /** - * Set the port to connect to. - * @param int $port - */ - public function setPort($port) - { - $this->_params['port'] = (int) $port; - return $this; - } - - /** - * Get the port to connect to. - * @return int - */ - public function getPort() - { - return $this->_params['port']; - } - - /** - * Set the connection timeout. - * @param int $timeout seconds - */ - public function setTimeout($timeout) - { - $this->_params['timeout'] = (int) $timeout; - return $this; - } - - /** - * Get the connection timeout. - * @return int - */ - public function getTimeout() - { - return $this->_params['timeout']; - } - - /** - * Set the encryption type (tls or ssl) - * @param string $encryption - */ - public function setEncryption($enc) - { - $this->_params['protocol'] = $enc; - return $this; - } - - /** - * Get the encryption type. - * @return string - */ - public function getEncryption() - { - return $this->_params['protocol']; - } - - /** - * Set ESMTP extension handlers. - * @param Swift_Transport_EsmtpHandler[] $handlers - */ - public function setExtensionHandlers(array $handlers) - { - $assoc = array(); - foreach ($handlers as $handler) - { - $assoc[$handler->getHandledKeyword()] = $handler; - } - uasort($assoc, array($this, '_sortHandlers')); - $this->_handlers = $assoc; - $this->_setHandlerParams(); - return $this; - } - - /** - * Get ESMTP extension handlers. - * @return Swift_Transport_EsmtpHandler[] - */ - public function getExtensionHandlers() - { - return array_values($this->_handlers); - } - - /** - * Run a command against the buffer, expecting the given response codes. - * If no response codes are given, the response will not be validated. - * If codes are given, an exception will be thrown on an invalid response. - * @param string $command - * @param int[] $codes - * @param string[] &$failures - * @return string - */ - public function executeCommand($command, $codes = array(), &$failures = null) - { - $failures = (array) $failures; - $stopSignal = false; - $response = null; - foreach ($this->_getActiveHandlers() as $handler) - { - $response = $handler->onCommand( - $this, $command, $codes, $failures, $stopSignal - ); - if ($stopSignal) - { - return $response; - } - } - return parent::executeCommand($command, $codes, $failures); - } - - // -- Mixin invocation code - - /** Mixin handling method for ESMTP handlers */ - public function __call($method, $args) - { - foreach ($this->_handlers as $handler) - { - if (in_array(strtolower($method), - array_map('strtolower', (array) $handler->exposeMixinMethods()) - )) - { - $return = call_user_func_array(array($handler, $method), $args); - //Allow fluid method calls - if (is_null($return) && substr($method, 0, 3) == 'set') - { - return $this; - } - else - { - return $return; - } - } - } - trigger_error('Call to undefined method ' . $method, E_USER_ERROR); - } - - // -- Protected methods - - /** Get the params to initialize the buffer */ - protected function _getBufferParams() - { - return $this->_params; - } - - /** Overridden to perform EHLO instead */ - protected function _doHeloCommand() - { - try - { - $response = $this->executeCommand( - sprintf("EHLO %s\r\n", $this->_domain), array(250) - ); - $this->_capabilities = $this->_getCapabilities($response); - $this->_setHandlerParams(); - foreach ($this->_getActiveHandlers() as $handler) - { - $handler->afterEhlo($this); - } - } - catch (Swift_TransportException $e) - { - parent::_doHeloCommand(); - } - } - - /** Overridden to add Extension support */ - protected function _doMailFromCommand($address) - { - $handlers = $this->_getActiveHandlers(); - $params = array(); - foreach ($handlers as $handler) - { - $params = array_merge($params, (array) $handler->getMailParams()); - } - $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; - $this->executeCommand( - sprintf("MAIL FROM: <%s>%s\r\n", $address, $paramStr), array(250) - ); - } - - /** Overridden to add Extension support */ - protected function _doRcptToCommand($address) - { - $handlers = $this->_getActiveHandlers(); - $params = array(); - foreach ($handlers as $handler) - { - $params = array_merge($params, (array) $handler->getRcptParams()); - } - $paramStr = !empty($params) ? ' ' . implode(' ', $params) : ''; - $this->executeCommand( - sprintf("RCPT TO: <%s>%s\r\n", $address, $paramStr), array(250, 251, 252) - ); - } - - // -- Private methods - - /** Determine ESMTP capabilities by function group */ - private function _getCapabilities($ehloResponse) - { - $capabilities = array(); - $ehloResponse = trim($ehloResponse); - $lines = explode("\r\n", $ehloResponse); - array_shift($lines); - foreach ($lines as $line) - { - if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) - { - $keyword = strtoupper($matches[1]); - $paramStr = strtoupper(ltrim($matches[2], ' =')); - $params = !empty($paramStr) ? explode(' ', $paramStr) : array(); - $capabilities[$keyword] = $params; - } - } - return $capabilities; - } - - /** Set parameters which are used by each extension handler */ - private function _setHandlerParams() - { - foreach ($this->_handlers as $keyword => $handler) - { - if (array_key_exists($keyword, $this->_capabilities)) - { - $handler->setKeywordParams($this->_capabilities[$keyword]); - } - } - } - - /** Get ESMTP handlers which are currently ok to use */ - private function _getActiveHandlers() - { - $handlers = array(); - foreach ($this->_handlers as $keyword => $handler) - { - if (array_key_exists($keyword, $this->_capabilities)) - { - $handlers[] = $handler; - } - } - return $handlers; - } - - /** Custom sort for extension handler ordering */ - private function _sortHandlers($a, $b) - { - return $a->getPriorityOver($b->getHandledKeyword()); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/FailoverTransport.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/FailoverTransport.php deleted file mode 100644 index e62491c205..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/FailoverTransport.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/LoadBalancedTransport.php'; -//@require 'Swift/Mime/Message.php'; - -/** - * Contains a list of redundant Transports so when one fails, the next is used. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_FailoverTransport - extends Swift_Transport_LoadBalancedTransport -{ - - /** - * Registered transport curently used. - * @var Swift_Transport - * @access private - */ - private $_currentTransport; - - /** - * Creates a new FailoverTransport. - */ - public function __construct() - { - parent::__construct(); - } - - /** - * Send the given Message. - * Recipient/sender data will be retreived from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * @param Swift_Mime_Message $message - * @param string[] &$failedRecipients to collect failures by-reference - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $maxTransports = count($this->_transports); - $sent = 0; - - for ($i = 0; $i < $maxTransports - && $transport = $this->_getNextTransport(); ++$i) - { - try - { - if (!$transport->isStarted()) - { - $transport->start(); - } - - return $transport->send($message, $failedRecipients); - } - catch (Swift_TransportException $e) - { - $this->_killCurrentTransport(); - } - } - - if (count($this->_transports) == 0) - { - throw new Swift_TransportException( - 'All Transports in FailoverTransport failed, or no Transports available' - ); - } - - return $sent; - } - - // -- Protected methods - - protected function _getNextTransport() - { - if (!isset($this->_currentTransport)) - { - $this->_currentTransport = parent::_getNextTransport(); - } - return $this->_currentTransport; - } - - protected function _killCurrentTransport() - { - $this->_currentTransport = null; - parent::_killCurrentTransport(); - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/IoBuffer.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/IoBuffer.php deleted file mode 100644 index ac66ef03d5..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/IoBuffer.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/InputByteStream.php'; -//@require 'Swift/OutputByteStream.php'; - -/** - * Buffers input and output to a resource. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -interface Swift_Transport_IoBuffer - extends Swift_InputByteStream, Swift_OutputByteStream -{ - - /** A socket buffer over TCP */ - const TYPE_SOCKET = 0x0001; - - /** A process buffer with I/O support */ - const TYPE_PROCESS = 0x0010; - - /** - * Perform any initialization needed, using the given $params. - * Parameters will vary depending upon the type of IoBuffer used. - * @param array $params - */ - public function initialize(array $params); - - /** - * Set an individual param on the buffer (e.g. switching to SSL). - * @param string $param - * @param mixed $value - */ - public function setParam($param, $value); - - /** - * Perform any shutdown logic needed. - */ - public function terminate(); - - /** - * Set an array of string replacements which should be made on data written - * to the buffer. This could replace LF with CRLF for example. - * @param string[] $replacements - */ - public function setWriteTranslations(array $replacements); - - /** - * Get a line of output (including any CRLF). - * The $sequence number comes from any writes and may or may not be used - * depending upon the implementation. - * @param int $sequence of last write to scan from - * @return string - */ - public function readLine($sequence); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/LoadBalancedTransport.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/LoadBalancedTransport.php deleted file mode 100644 index 367981b1f0..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/LoadBalancedTransport.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport.php'; -//@require 'Swift/Mime/Message.php'; -//@require 'Swift/Events/EventListener.php'; - -/** - * Redudantly and rotationally uses several Transports when sending. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_LoadBalancedTransport implements Swift_Transport -{ - - /** Transports which are deemed useless */ - private $_deadTransports = array(); - - /** - * The Transports which are used in rotation. - * - * @var array Swift_Transport - * @access protected - */ - protected $_transports = array(); - - /** - * Creates a new LoadBalancedTransport. - */ - public function __construct() - { - } - - /** - * Set $transports to delegate to. - * - * @param array $transports Swift_Transport - */ - public function setTransports(array $transports) - { - $this->_transports = $transports; - $this->_deadTransports = array(); - } - - /** - * Get $transports to delegate to. - * - * @return array Swift_Transport - */ - public function getTransports(array $transports) - { - return array_merge($this->_transports, $this->_deadTransports); - } - - /** - * Test if this Transport mechanism has started. - * - * @return boolean - */ - public function isStarted() - { - return count($this->_transports) > 0; - } - - /** - * Start this Transport mechanism. - */ - public function start() - { - $this->_transports = array_merge($this->_transports, $this->_deadTransports); - } - - /** - * Stop this Transport mechanism. - */ - public function stop() - { - foreach ($this->_transports as $transport) - { - $transport->stop(); - } - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retreived from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] &$failedRecipients to collect failures by-reference - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $maxTransports = count($this->_transports); - $sent = 0; - - for ($i = 0; $i < $maxTransports - && $transport = $this->_getNextTransport(); ++$i) - { - try - { - if (!$transport->isStarted()) - { - $transport->start(); - } - if ($sent = $transport->send($message, $failedRecipients)) - { - break; - } - } - catch (Swift_TransportException $e) - { - $this->_killCurrentTransport(); - } - } - - if (count($this->_transports) == 0) - { - throw new Swift_TransportException( - 'All Transports in LoadBalancedTransport failed, or no Transports available' - ); - } - - return $sent; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - foreach ($this->_transports as $transport) - { - $transport->registerPlugin($plugin); - } - } - - // -- Protected methods - - /** - * Rotates the transport list around and returns the first instance. - * - * @return Swift_Transport - * @access protected - */ - protected function _getNextTransport() - { - if ($next = array_shift($this->_transports)) - { - $this->_transports[] = $next; - } - return $next; - } - - /** - * Tag the currently used (top of stack) transport as dead/useless. - * - * @access protected - */ - protected function _killCurrentTransport() - { - if ($transport = array_pop($this->_transports)) - { - try - { - $transport->stop(); - } - catch (Exception $e) - { - } - $this->_deadTransports[] = $transport; - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/MailInvoker.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/MailInvoker.php deleted file mode 100644 index dda882fd1f..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/MailInvoker.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * This interface intercepts calls to the mail() function. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -interface Swift_Transport_MailInvoker -{ - - /** - * Send mail via the mail() function. - * - * This method takes the same arguments as PHP mail(). - * - * @param string $to - * @param string $subject - * @param string $body - * @param string $headers - * @param string $extraParams - * - * @return boolean - */ - public function mail($to, $subject, $body, $headers = null, $extraParams = null); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/MailTransport.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/MailTransport.php deleted file mode 100644 index eca59e1695..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/MailTransport.php +++ /dev/null @@ -1,242 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport.php'; -//@require 'Swift/Transport/MailInvoker.php'; -//@require 'Swift/Mime/Message.php'; -//@require 'Swift/Events/EventListener.php'; - -/** - * Sends Messages using the mail() function. - * - * It is advised that users do not use this transport if at all possible - * since a number of plugin features cannot be used in conjunction with this - * transport due to the internal interface in PHP itself. - * - * The level of error reporting with this transport is incredibly weak, again - * due to limitations of PHP's internal mail() function. You'll get an - * all-or-nothing result from sending. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_MailTransport implements Swift_Transport -{ - - /** Addtional parameters to pass to mail() */ - private $_extraParams = '-f%s'; - - /** The event dispatcher from the plugin API */ - private $_eventDispatcher; - - /** An invoker that calls the mail() function */ - private $_invoker; - - /** - * Create a new MailTransport with the $log. - * @param Swift_Transport_Log $log - */ - public function __construct(Swift_Transport_MailInvoker $invoker, - Swift_Events_EventDispatcher $eventDispatcher) - { - $this->_invoker = $invoker; - $this->_eventDispatcher = $eventDispatcher; - } - - /** - * Not used. - */ - public function isStarted() - { - return false; - } - - /** - * Not used. - */ - public function start() - { - } - - /** - * Not used. - */ - public function stop() - { - } - - /** - * Set the additional parameters used on the mail() function. - * - * This string is formatted for sprintf() where %s is the sender address. - * - * @param string $params - */ - public function setExtraParams($params) - { - $this->_extraParams = $params; - return $this; - } - - /** - * Get the additional parameters used on the mail() function. - * - * This string is formatted for sprintf() where %s is the sender address. - * - * @return string - */ - public function getExtraParams() - { - return $this->_extraParams; - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retreived from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] &$failedRecipients to collect failures by-reference - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $failedRecipients = (array) $failedRecipients; - - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) - { - return 0; - } - } - - $count = ( - count((array) $message->getTo()) - + count((array) $message->getCc()) - + count((array) $message->getBcc()) - ); - - $toHeader = $message->getHeaders()->get('To'); - $subjectHeader = $message->getHeaders()->get('Subject'); - - $to = $toHeader->getFieldBody(); - $subject = $subjectHeader->getFieldBody(); - - $reversePath = $this->_getReversePath($message); - - //Remove headers that would otherwise be duplicated - $message->getHeaders()->remove('To'); - $message->getHeaders()->remove('Subject'); - - $messageStr = $message->toString(); - - $message->getHeaders()->set($toHeader); - $message->getHeaders()->set($subjectHeader); - - //Separate headers from body - if (false !== $endHeaders = strpos($messageStr, "\r\n\r\n")) - { - $headers = substr($messageStr, 0, $endHeaders) . "\r\n"; //Keep last EOL - $body = substr($messageStr, $endHeaders + 4); - } - else - { - $headers = $messageStr . "\r\n"; - $body = ''; - } - - unset($messageStr); - - if ("\r\n" != PHP_EOL) //Non-windows (not using SMTP) - { - $headers = str_replace("\r\n", PHP_EOL, $headers); - $body = str_replace("\r\n", PHP_EOL, $body); - } - else //Windows, using SMTP - { - $headers = str_replace("\r\n.", "\r\n..", $headers); - $body = str_replace("\r\n.", "\r\n..", $body); - } - - if ($this->_invoker->mail($to, $subject, $body, $headers, - sprintf($this->_extraParams, $reversePath))) - { - if ($evt) - { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - } - else - { - $failedRecipients = array_merge( - $failedRecipients, - array_keys((array) $message->getTo()), - array_keys((array) $message->getCc()), - array_keys((array) $message->getBcc()) - ); - - if ($evt) - { - $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - $message->generateId(); - - $count = 0; - } - - return $count; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->_eventDispatcher->bindEventListener($plugin); - } - - // -- Private methods - - /** Determine the best-use reverse path for this message */ - private function _getReversePath(Swift_Mime_Message $message) - { - $return = $message->getReturnPath(); - $sender = $message->getSender(); - $from = $message->getFrom(); - $path = null; - if (!empty($return)) - { - $path = $return; - } - elseif (!empty($sender)) - { - $keys = array_keys($sender); - $path = array_shift($keys); - } - elseif (!empty($from)) - { - $keys = array_keys($from); - $path = array_shift($keys); - } - return $path; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/SendmailTransport.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/SendmailTransport.php deleted file mode 100644 index aae8bde4ec..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/SendmailTransport.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/Transport/EsmtpTransport.php'; -//@require 'Swift/Transport/IoBuffer.php'; -//@require 'Swift/Transport/Log.php'; -//@require 'Swift/Events/EventDispatcher.php'; - -/** - * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary. - * - * Supported modes are -bs and -t, with any additional flags desired. - * It is advised to use -bs mode since error reporting with -t mode is not - * possible. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_SendmailTransport - extends Swift_Transport_AbstractSmtpTransport -{ - - /** - * Connection buffer parameters. - * @var array - * @access protected - */ - private $_params = array( - 'timeout' => 30, - 'blocking' => 1, - 'command' => '/usr/sbin/sendmail -bs', - 'type' => Swift_Transport_IoBuffer::TYPE_PROCESS - ); - - /** - * Create a new SendmailTransport with $buf for I/O. - * @param Swift_Transport_IoBuffer $buf - * @param Swift_Events_EventDispatcher $dispatcher - */ - public function __construct(Swift_Transport_IoBuffer $buf, - Swift_Events_EventDispatcher $dispatcher) - { - parent::__construct($buf, $dispatcher); - } - - /** - * Start the standalone SMTP session if running in -bs mode. - */ - public function start() - { - if (false !== strpos($this->getCommand(), ' -bs')) - { - parent::start(); - } - } - - /** - * Set the command to invoke. - * If using -t mode you are strongly advised to include -oi or -i in the - * flags. For example: /usr/sbin/sendmail -oi -t - * Swift will append a -f<sender> flag if one is not present. - * The recommended mode is "-bs" since it is interactive and failure notifications - * are hence possible. - * @param string $command - */ - public function setCommand($command) - { - $this->_params['command'] = $command; - return $this; - } - - /** - * Get the sendmail command which will be invoked. - * @return string - */ - public function getCommand() - { - return $this->_params['command']; - } - - /** - * Send the given Message. - * Recipient/sender data will be retreived from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * NOTE: If using 'sendmail -t' you will not be aware of any failures until - * they bounce (i.e. send() will always return 100% success). - * @param Swift_Mime_Message $message - * @param string[] &$failedRecipients to collect failures by-reference - * @return int - */ - public function send(Swift_Mime_Message $message, &$failedRecipients = null) - { - $failedRecipients = (array) $failedRecipients; - $command = $this->getCommand(); - $buffer = $this->getBuffer(); - - if (false !== strpos($command, ' -t')) - { - if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) - { - $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) - { - return 0; - } - } - - if (false === strpos($command, ' -f')) - { - $command .= ' -f' . $this->_getReversePath($message); - } - - $buffer->initialize(array_merge($this->_params, array('command' => $command))); - - if (false === strpos($command, ' -i') && false === strpos($command, ' -oi')) - { - $buffer->setWriteTranslations(array("\r\n" => "\n", "\n." => "\n..")); - } - else - { - $buffer->setWriteTranslations(array("\r\n"=>"\n")); - } - - $count = count((array) $message->getTo()) - + count((array) $message->getCc()) - + count((array) $message->getBcc()) - ; - $message->toByteStream($buffer); - $buffer->flushBuffers(); - $buffer->setWriteTranslations(array()); - $buffer->terminate(); - - if ($evt) - { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - $evt->setFailedRecipients($failedRecipients); - $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - $message->generateId(); - } - elseif (false !== strpos($command, ' -bs')) - { - $count = parent::send($message, $failedRecipients); - } - else - { - $this->_throwException(new Swift_TransportException( - 'Unsupported sendmail command flags [' . $command . ']. ' . - 'Must be one of "-bs" or "-t" but can include additional flags.' - )); - } - - return $count; - } - - // -- Protected methods - - /** Get the params to initialize the buffer */ - protected function _getBufferParams() - { - return $this->_params; - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/SimpleMailInvoker.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/SimpleMailInvoker.php deleted file mode 100644 index 271ba84831..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/SimpleMailInvoker.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/* - Invokes the mail() function in Swift Mailer. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - - */ - -//@require 'Swift/Transport/MailInvoker.php'; - -/** - * This is the implementation class for {@link Swift_Transport_MailInvoker}. - * - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_SimpleMailInvoker implements Swift_Transport_MailInvoker -{ - - /** - * Send mail via the mail() function. - * - * This method takes the same arguments as PHP mail(). - * - * @param string $to - * @param string $subject - * @param string $body - * @param string $headers - * @param string $extraParams - * - * @return boolean - */ - public function mail($to, $subject, $body, $headers = null, $extraParams = null) - { - if (!ini_get('safe_mode')) - { - return mail($to, $subject, $body, $headers, $extraParams); - } - else - { - return mail($to, $subject, $body, $headers); - } - } - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/SmtpAgent.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/SmtpAgent.php deleted file mode 100644 index ee9b8ed51d..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/SmtpAgent.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Wraps an IoBuffer to send/receive SMTP commands/responses. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -interface Swift_Transport_SmtpAgent -{ - - /** - * Get the IoBuffer where read/writes are occurring. - * @return Swift_Transport_IoBuffer - */ - public function getBuffer(); - - /** - * Run a command against the buffer, expecting the given response codes. - * If no response codes are given, the response will not be validated. - * If codes are given, an exception will be thrown on an invalid response. - * @param string $command - * @param int[] $codes - * @param string[] &$failures - */ - public function executeCommand($command, $codes = array(), &$failures = null); - -} diff --git a/pandora_console/include/swiftmailer/classes/Swift/Transport/StreamBuffer.php b/pandora_console/include/swiftmailer/classes/Swift/Transport/StreamBuffer.php deleted file mode 100644 index 01ae8a593f..0000000000 --- a/pandora_console/include/swiftmailer/classes/Swift/Transport/StreamBuffer.php +++ /dev/null @@ -1,276 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -//@require 'Swift/ByteStream/AbstractFilterableInputStream.php'; -//@require 'Swift/ReplacementFilterFactory.php'; -//@require 'Swift/Transport/IoBuffer.php'; -//@require 'Swift/TransportException.php'; - -/** - * A generic IoBuffer implementation supporting remote sockets and local processes. - * @package Swift - * @subpackage Transport - * @author Chris Corbyn - */ -class Swift_Transport_StreamBuffer - extends Swift_ByteStream_AbstractFilterableInputStream - implements Swift_Transport_IoBuffer -{ - - /** A primary socket */ - private $_stream; - - /** The input stream */ - private $_in; - - /** The output stream */ - private $_out; - - /** Buffer initialization parameters */ - private $_params = array(); - - /** The ReplacementFilterFactory */ - private $_replacementFactory; - - /** Translations performed on data being streamed into the buffer */ - private $_translations = array(); - - /** - * Create a new StreamBuffer using $replacementFactory for transformations. - * @param Swift_ReplacementFilterFactory $replacementFactory - */ - public function __construct( - Swift_ReplacementFilterFactory $replacementFactory) - { - $this->_replacementFactory = $replacementFactory; - } - - /** - * Perform any initialization needed, using the given $params. - * Parameters will vary depending upon the type of IoBuffer used. - * @param array $params - */ - public function initialize(array $params) - { - $this->_params = $params; - switch ($params['type']) - { - case self::TYPE_PROCESS: - $this->_establishProcessConnection(); - break; - case self::TYPE_SOCKET: - default: - $this->_establishSocketConnection(); - break; - } - } - - /** - * Set an individual param on the buffer (e.g. switching to SSL). - * @param string $param - * @param mixed $value - */ - public function setParam($param, $value) - { - if (isset($this->_stream)) - { - switch ($param) - { - case 'protocol': - if (!array_key_exists('protocol', $this->_params) - || $value != $this->_params['protocol']) - { - if ('tls' == $value) - { - stream_socket_enable_crypto( - $this->_stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT - ); - } - } - break; - } - } - $this->_params[$param] = $value; - } - - /** - * Perform any shutdown logic needed. - */ - public function terminate() - { - if (isset($this->_stream)) - { - switch ($this->_params['type']) - { - case self::TYPE_PROCESS: - fclose($this->_in); - fclose($this->_out); - proc_close($this->_stream); - break; - case self::TYPE_SOCKET: - default: - fclose($this->_stream); - break; - } - } - $this->_stream = null; - $this->_out = null; - $this->_in = null; - } - - /** - * Set an array of string replacements which should be made on data written - * to the buffer. This could replace LF with CRLF for example. - * @param string[] $replacements - */ - public function setWriteTranslations(array $replacements) - { - foreach ($this->_translations as $search => $replace) - { - if (!isset($replacements[$search])) - { - $this->removeFilter($search); - unset($this->_translations[$search]); - } - } - - foreach ($replacements as $search => $replace) - { - if (!isset($this->_translations[$search])) - { - $this->addFilter( - $this->_replacementFactory->createFilter($search, $replace), $search - ); - $this->_translations[$search] = true; - } - } - } - - /** - * Get a line of output (including any CRLF). - * The $sequence number comes from any writes and may or may not be used - * depending upon the implementation. - * @param int $sequence of last write to scan from - * @return string - */ - public function readLine($sequence) - { - if (isset($this->_out) && !feof($this->_out)) - { - $line = fgets($this->_out); - return $line; - } - } - - /** - * Reads $length bytes from the stream into a string and moves the pointer - * through the stream by $length. If less bytes exist than are requested the - * remaining bytes are given instead. If no bytes are remaining at all, boolean - * false is returned. - * @param int $length - * @return string - */ - public function read($length) - { - if (isset($this->_out) && !feof($this->_out)) - { - $ret = fread($this->_out, $length); - return $ret; - } - } - - /** Not implemented */ - public function setReadPointer($byteOffset) - { - } - - // -- Protected methods - - /** Flush the stream contents */ - protected function _flush() - { - if (isset($this->_in)) - { - fflush($this->_in); - } - } - - /** Write this bytes to the stream */ - protected function _commit($bytes) - { - if (isset($this->_in) - && fwrite($this->_in, $bytes)) - { - return ++$this->_sequence; - } - } - - // -- Private methods - - /** - * Establishes a connection to a remote server. - * @access private - */ - private function _establishSocketConnection() - { - $host = $this->_params['host']; - if (!empty($this->_params['protocol'])) - { - $host = $this->_params['protocol'] . '://' . $host; - } - $timeout = 15; - if (!empty($this->_params['timeout'])) - { - $timeout = $this->_params['timeout']; - } - if (!$this->_stream = fsockopen($host, $this->_params['port'], $errno, $errstr, $timeout)) - { - throw new Swift_TransportException( - 'Connection could not be established with host ' . $this->_params['host'] . - ' [' . $errstr . ' #' . $errno . ']' - ); - } - if (!empty($this->_params['blocking'])) - { - stream_set_blocking($this->_stream, 1); - } - else - { - stream_set_blocking($this->_stream, 0); - } - $this->_in =& $this->_stream; - $this->_out =& $this->_stream; - } - - /** - * Opens a process for input/output. - * @access private - */ - private function _establishProcessConnection() - { - $command = $this->_params['command']; - $descriptorSpec = array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ); - $this->_stream = proc_open($command, $descriptorSpec, $pipes); - stream_set_blocking($pipes[2], 0); - if ($err = stream_get_contents($pipes[2])) - { - throw new Swift_TransportException( - 'Process could not be started [' . $err . ']' - ); - } - $this->_in =& $pipes[0]; - $this->_out =& $pipes[1]; - } - -} diff --git a/pandora_console/include/swiftmailer/dependency_maps/cache_deps.php b/pandora_console/include/swiftmailer/dependency_maps/cache_deps.php deleted file mode 100644 index 6058206465..0000000000 --- a/pandora_console/include/swiftmailer/dependency_maps/cache_deps.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -Swift_DependencyContainer::getInstance() - - -> register('cache') - -> asAliasOf('cache.array') - - -> register('tempdir') - -> asValue('/tmp') - - -> register('cache.null') - -> asSharedInstanceOf('Swift_KeyCache_NullKeyCache') - - -> register('cache.array') - -> asSharedInstanceOf('Swift_KeyCache_ArrayKeyCache') - -> withDependencies(array('cache.inputstream')) - - -> register('cache.disk') - -> asSharedInstanceOf('Swift_KeyCache_DiskKeyCache') - -> withDependencies(array('cache.inputstream', 'tempdir')) - - -> register('cache.inputstream') - -> asNewInstanceOf('Swift_KeyCache_SimpleKeyCacheInputStream') - - ; diff --git a/pandora_console/include/swiftmailer/dependency_maps/mime_deps.php b/pandora_console/include/swiftmailer/dependency_maps/mime_deps.php deleted file mode 100644 index e03927a3cf..0000000000 --- a/pandora_console/include/swiftmailer/dependency_maps/mime_deps.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php - -require_once dirname(__FILE__) . '/../mime_types.php'; - -Swift_DependencyContainer::getInstance() - - -> register('properties.charset') - -> asValue('utf-8') - - -> register('mime.message') - -> asNewInstanceOf('Swift_Mime_SimpleMessage') - -> withDependencies(array( - 'mime.headerset', - 'mime.qpcontentencoder', - 'cache', - 'properties.charset' - )) - - -> register('mime.part') - -> asNewInstanceOf('Swift_Mime_MimePart') - -> withDependencies(array( - 'mime.headerset', - 'mime.qpcontentencoder', - 'cache', - 'properties.charset' - )) - - -> register('mime.attachment') - -> asNewInstanceOf('Swift_Mime_Attachment') - -> withDependencies(array( - 'mime.headerset', - 'mime.base64contentencoder', - 'cache' - )) - -> addConstructorValue($swift_mime_types) - - -> register('mime.embeddedfile') - -> asNewInstanceOf('Swift_Mime_EmbeddedFile') - -> withDependencies(array( - 'mime.headerset', - 'mime.base64contentencoder', - 'cache' - )) - -> addConstructorValue($swift_mime_types) - - -> register('mime.headerfactory') - -> asNewInstanceOf('Swift_Mime_SimpleHeaderFactory') - -> withDependencies(array( - 'mime.qpheaderencoder', - 'mime.rfc2231encoder', - 'properties.charset' - )) - - -> register('mime.headerset') - -> asNewInstanceOf('Swift_Mime_SimpleHeaderSet') - -> withDependencies(array('mime.headerfactory', 'properties.charset')) - - -> register('mime.qpheaderencoder') - -> asNewInstanceOf('Swift_Mime_HeaderEncoder_QpHeaderEncoder') - -> withDependencies(array('mime.charstream')) - - -> register('mime.charstream') - -> asNewInstanceOf('Swift_CharacterStream_NgCharacterStream') - -> withDependencies(array('mime.characterreaderfactory', 'properties.charset')) - - -> register('mime.bytecanonicalizer') - -> asSharedInstanceOf('Swift_StreamFilters_ByteArrayReplacementFilter') - -> addConstructorValue(array(array(0x0D, 0x0A), array(0x0D), array(0x0A))) - -> addConstructorValue(array(array(0x0A), array(0x0A), array(0x0D, 0x0A))) - - -> register('mime.characterreaderfactory') - -> asSharedInstanceOf('Swift_CharacterReaderFactory_SimpleCharacterReaderFactory') - - -> register('mime.qpcontentencoder') - -> asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') - -> withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) - - -> register('mime.7bitcontentencoder') - -> asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') - -> addConstructorValue('7bit') - -> addConstructorValue(true) - - -> register('mime.8bitcontentencoder') - -> asNewInstanceOf('Swift_Mime_ContentEncoder_PlainContentEncoder') - -> addConstructorValue('8bit') - -> addConstructorValue(true) - - -> register('mime.base64contentencoder') - -> asSharedInstanceOf('Swift_Mime_ContentEncoder_Base64ContentEncoder') - - -> register('mime.rfc2231encoder') - -> asNewInstanceOf('Swift_Encoder_Rfc2231Encoder') - -> withDependencies(array('mime.charstream')) - - ; - -unset($swift_mime_types); diff --git a/pandora_console/include/swiftmailer/dependency_maps/transport_deps.php b/pandora_console/include/swiftmailer/dependency_maps/transport_deps.php deleted file mode 100644 index 32881d67e2..0000000000 --- a/pandora_console/include/swiftmailer/dependency_maps/transport_deps.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -Swift_DependencyContainer::getInstance() - - -> register('transport.smtp') - -> asNewInstanceOf('Swift_Transport_EsmtpTransport') - -> withDependencies(array( - 'transport.buffer', - array('transport.authhandler'), - 'transport.eventdispatcher' - )) - - -> register('transport.sendmail') - -> asNewInstanceOf('Swift_Transport_SendmailTransport') - -> withDependencies(array( - 'transport.buffer', - 'transport.eventdispatcher' - )) - - -> register('transport.mail') - -> asNewInstanceOf('Swift_Transport_MailTransport') - -> withDependencies(array('transport.mailinvoker', 'transport.eventdispatcher')) - - -> register('transport.loadbalanced') - -> asNewInstanceOf('Swift_Transport_LoadBalancedTransport') - - -> register('transport.failover') - -> asNewInstanceOf('Swift_Transport_FailoverTransport') - - -> register('transport.mailinvoker') - -> asSharedInstanceOf('Swift_Transport_SimpleMailInvoker') - - -> register('transport.buffer') - -> asNewInstanceOf('Swift_Transport_StreamBuffer') - -> withDependencies(array('transport.replacementfactory')) - - -> register('transport.authhandler') - -> asNewInstanceOf('Swift_Transport_Esmtp_AuthHandler') - -> withDependencies(array( - array( - 'transport.crammd5auth', - 'transport.loginauth', - 'transport.plainauth' - ) - )) - - -> register('transport.crammd5auth') - -> asNewInstanceOf('Swift_Transport_Esmtp_Auth_CramMd5Authenticator') - - -> register('transport.loginauth') - -> asNewInstanceOf('Swift_Transport_Esmtp_Auth_LoginAuthenticator') - - -> register('transport.plainauth') - -> asNewInstanceOf('Swift_Transport_Esmtp_Auth_PlainAuthenticator') - - -> register('transport.eventdispatcher') - -> asNewInstanceOf('Swift_Events_SimpleEventDispatcher') - - -> register('transport.replacementfactory') - -> asSharedInstanceOf('Swift_StreamFilters_StringReplacementFilterFactory') - - ; diff --git a/pandora_console/include/swiftmailer/mime_types.php b/pandora_console/include/swiftmailer/mime_types.php deleted file mode 100644 index 65c9aa0779..0000000000 --- a/pandora_console/include/swiftmailer/mime_types.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * List of MIME type automatically detected in Swift Mailer. - */ - -//You may add or take away what you like (lowercase required) - -$swift_mime_types = array( - 'aif' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'avi' => 'video/avi', - 'bmp' => 'image/bmp', - 'bz2' => 'application/x-bz2', - 'csv' => 'text/csv', - 'dmg' => 'application/x-apple-diskimage', - 'doc' => 'application/msword', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'eml' => 'message/rfc822', - 'aps' => 'application/postscript', - 'exe' => 'application/x-ms-dos-executable', - 'flv' => 'video/x-flv', - 'gif' => 'image/gif', - 'gz' => 'application/x-gzip', - 'hqx' => 'application/stuffit', - 'htm' => 'text/html', - 'html' => 'text/html', - 'jar' => 'application/x-java-archive', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'm3u' => 'audio/x-mpegurl', - 'm4a' => 'audio/mp4', - 'mdb' => 'application/x-msaccess', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mov' => 'video/quicktime', - 'mp3' => 'audio/mpeg', - 'mp4' => 'video/mp4', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'odg' => 'vnd.oasis.opendocument.graphics', - 'odp' => 'vnd.oasis.opendocument.presentation', - 'odt' => 'vnd.oasis.opendocument.text', - 'ods' => 'vnd.oasis.opendocument.spreadsheet', - 'ogg' => 'audio/ogg', - 'pdf' => 'application/pdf', - 'png' => 'image/png', - 'ppt' => 'application/vnd.ms-powerpoint', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'ps' => 'application/postscript', - 'rar' => 'application/x-rar-compressed', - 'rtf' => 'application/rtf', - 'tar' => 'application/x-tar', - 'sit' => 'application/x-stuffit', - 'svg' => 'image/svg+xml', - 'tif' => 'image/tiff', - 'tiff' => 'image/tiff', - 'ttf' => 'application/x-font-truetype', - 'txt' => 'text/plain', - 'vcf' => 'text/x-vcard', - 'wav' => 'audio/wav', - 'wma' => 'audio/x-ms-wma', - 'wmv' => 'audio/x-ms-wmv', - 'xls' => 'application/excel', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'xml' => 'application/xml', - 'zip' => 'application/zip' -); diff --git a/pandora_console/include/swiftmailer/swift_init.php b/pandora_console/include/swiftmailer/swift_init.php deleted file mode 100644 index fe624a9d22..0000000000 --- a/pandora_console/include/swiftmailer/swift_init.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Dependency injection initialization for Swift Mailer. - */ - -//Load in dependency maps -require_once dirname(__FILE__) . '/dependency_maps/cache_deps.php'; -require_once dirname(__FILE__) . '/dependency_maps/mime_deps.php'; -require_once dirname(__FILE__) . '/dependency_maps/transport_deps.php'; - -//Load in global library preferences -require_once dirname(__FILE__) . '/preferences.php'; diff --git a/pandora_console/include/swiftmailer/swift_required.php b/pandora_console/include/swiftmailer/swift_required.php deleted file mode 100644 index ad1a4ad5ab..0000000000 --- a/pandora_console/include/swiftmailer/swift_required.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/* - * This file is part of SwiftMailer. - * (c) 2004-2009 Chris Corbyn - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Autoloader and dependency injection initialization for Swift Mailer. - */ - -//Load Swift utility class -require_once dirname(__FILE__) . '/classes/Swift.php'; - -//Start the autoloader -Swift::registerAutoload(); - -//Load the init script to set up dependency injection -require_once dirname(__FILE__) . '/swift_init.php'; diff --git a/pandora_console/include/web2image.js b/pandora_console/include/web2image.js index 6c2edeb47c..e8ecd5fcf3 100644 --- a/pandora_console/include/web2image.js +++ b/pandora_console/include/web2image.js @@ -4,8 +4,6 @@ if (system.args.length < 3 || system.args.length > 11) { phantom.exit(1); } -var webPage = require('webpage'); -var page = webPage.create(); var url = system.args[1]; var type_graph_pdf = system.args[2]; var url_params = system.args[3]; @@ -39,26 +37,35 @@ else{ "&session_id=" + session_id; } +var page = require('webpage').create(); + page.viewportSize = { width: viewport_width, height: viewport_height }; + page.zoomFactor = 1; -page.open(url, 'POST', post_data, function start(status) { +page.onConsoleMessage = function(msg){ + console.log(msg); +}; -}); +page.onError = function(msg){ + console.log(msg); + page.close(); +} -page.onLoadFinished = function (status) { - if(!base_64){ - page.render(output_filename, {format: 'png'}); - } - else{ +page.onCallback = function (st) { + if (!base_64) { + page.render(output_filename, { format: 'png' }); + } else { var base64 = page.renderBase64('png'); - //XXXX + // do not remove this console.output console.log(base64); } phantom.exit(); -} +}; +page.open(url, 'POST', post_data, function (status) { +}); diff --git a/pandora_console/index.php b/pandora_console/index.php index f83ebc175a..10a471d295 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -105,10 +105,9 @@ if ((! file_exists ("include/config.php")) || (! is_readable ("include/config.ph exit; } -// Real start -if(session_id() == '') { - session_start (); -} +////////////////////////////////////// +//// PLEASE DO NOT CHANGE ORDER ////// +////////////////////////////////////// require_once ("include/config.php"); require_once ("include/functions_config.php"); @@ -121,11 +120,13 @@ if (isset($config["error"])) { // If metaconsole activated, redirect to it if ($config['metaconsole'] == 1 && $config['enterprise_installed'] == 1) { header ("Location: " . $config['homeurl'] . "enterprise/meta"); + exit; //Always exit after sending location headers } if (file_exists (ENTERPRISE_DIR . "/include/functions_login.php")) { include_once (ENTERPRISE_DIR . "/include/functions_login.php"); } +//////////////////////////////////////// if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) { $query = ''; @@ -359,7 +360,7 @@ if (! isset ($config['id_user'])) { if ($blocked) { require_once ('general/login_page.php'); - db_pandora_audit("Password expired", "Password expired: ".io_safe_output($nick), io_safe_output($nick)); + db_pandora_audit("Password expired", "Password expired: ".$nick, $nick); while (@ob_end_flush ()); exit ("</html>"); } @@ -382,7 +383,7 @@ if (! isset ($config['id_user'])) { require_once ('general/login_page.php'); db_pandora_audit("Password expired", - "Password expired: " . io_safe_output($nick), $nick); + "Password expired: " . $nick, $nick); while (@ob_end_flush ()); exit ("</html>"); } @@ -452,6 +453,7 @@ if (! isset ($config['id_user'])) { $id_dashboard_select = db_get_value('id', 'tdashboard', 'name', $home_url); $_GET['id_dashboard_select'] = $id_dashboard_select; + $_GET['d_from_main_page'] = 1; break; case 'Visual console': $_GET["sec"] = "network"; @@ -539,20 +541,20 @@ if (! isset ($config['id_user'])) { if ((!is_user_admin($nick) || $config['enable_pass_policy_admin']) && file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { $blocked = login_check_blocked($nick); } - $nick_usable = io_safe_output($nick); + if (!$blocked) { if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) { login_check_failed($nick); //Checks failed attempts } $login_failed = true; require_once ('general/login_page.php'); - db_pandora_audit("Logon Failed", "Invalid login: ".$nick_usable, $nick_usable); + db_pandora_audit("Logon Failed", "Invalid login: ".$nick, $nick); while (@ob_end_flush ()); exit ("</html>"); } else { require_once ('general/login_page.php'); - db_pandora_audit("Logon Failed", "Invalid login: ".$nick_usable, $nick_usable); + db_pandora_audit("Logon Failed", "Invalid login: ".$nick, $nick); while (@ob_end_flush ()); exit ("</html>"); } @@ -561,11 +563,13 @@ if (! isset ($config['id_user'])) { $query_params_redirect = $_GET; // Visual console do not want sec2 if($home_page == 'Visual console') unset($query_params_redirect["sec2"]); - $redirect_url = '?1=1'; + $redirect_url = '?logged=1'; foreach ($query_params_redirect as $key => $value) { + if ($key == "login") continue; $redirect_url .= '&'.safe_url_extraclean($key).'='.safe_url_extraclean($value); } header("Location: ".$config['homeurl']."index.php".$redirect_url); + exit; //Always exit after sending location headers } // Hash login process elseif (isset ($_GET["loginhash"])) { @@ -741,8 +745,7 @@ if (! isset ($config['id_user'])) { } } else { - - if ( ($_GET["loginhash_data"]) && ($_GET["loginhash_data"])) { + if (isset($_GET["loginhash_data"])) { $loginhash_data = get_parameter("loginhash_data", ""); $loginhash_user = str_rot13(get_parameter("loginhash_user", "")); @@ -809,9 +812,12 @@ if (isset ($_GET["bye"])) { include ("general/logoff.php"); $iduser = $_SESSION["id_usuario"]; db_logoff ($iduser, $_SERVER['REMOTE_ADDR']); - // Unregister Session (compatible with 5.2 and 6.x, old code was deprecated - unset($_SESSION['id_usuario']); - unset($iduser); + + $_SESSION = array(); + session_destroy(); + header_remove("Set-Cookie"); + setcookie(session_name(), $_COOKIE[session_name()], time() - 4800, "/"); + if ($config['auth'] == 'saml') { require_once($config['saml_path'] . 'simplesamlphp/lib/_autoload.php'); $as = new SimpleSAML_Auth_Simple('PandoraFMS'); @@ -940,7 +946,12 @@ if (get_parameter ('login', 0) !== 0) { include_once("general/login_help_dialog.php"); } - + + $php_version = phpversion(); + $php_version_array = explode('.', $php_version); + if($php_version_array[0] < 7){ + include_once("general/php7_message.php"); + } } // Header @@ -1058,9 +1069,8 @@ else { $_GET['sec2'] = 'general/logon_ok'; break; case 'Dashboard': - $dashboard_from_main_page = 1; $id_dashboard = db_get_value('id', 'tdashboard', 'name', $home_url); - $str = 'sec=reporting&sec2='.ENTERPRISE_DIR.'/dashboard/main_dashboard&id='.$id_dashboard; + $str = 'sec=reporting&sec2='.ENTERPRISE_DIR.'/dashboard/main_dashboard&id='.$id_dashboard.'&d_from_main_page=1'; parse_str($str, $res); foreach ($res as $key => $param) { $_GET[$key] = $param; diff --git a/pandora_console/install.php b/pandora_console/install.php old mode 100755 new mode 100644 index de58f942b6..bb7ce75b46 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -33,6 +33,9 @@ <script type="text/javascript"> options_text = new Array('An existing Database','A new Database'); options_values = new Array('db_exist','db_new'); + + var userHasConfirmed = false; + function ChangeDBDrop(causer) { if (causer.value != 'db_exist') { window.document.step2_form.drop.checked = 0; @@ -66,12 +69,54 @@ document.getElementById('tr_dbgrant').style["display"] = "none"; } } + function popupShow(){ + document.getElementsByTagName('body')[0].style["margin"] = "0"; + document.getElementById('install_container').style["padding-top"] = "45px"; + document.getElementById('install_container').style["margin-top"] = "0"; + document.getElementById('add-lightbox').style["visibility"] = "visible"; + document.getElementById('open_popup').style["display"] = "block"; + document.getElementById('open_popup').style["visibility"] = "visible"; + } + function popupClose(){ + document.getElementById('add-lightbox').style["visibility"] = "hidden"; + document.getElementById('open_popup').style["display"] = "none"; + document.getElementById('open_popup').style["visibility"] = "hidden"; + } + function handleConfirmClick (event) { + userHasConfirmed = true; + var step3_form = document.getElementsByName('step2_form')[0]; + step3_form.submit(); + } + function handleStep3FormSubmit (event) { + var dbOverride = document.getElementById("drop").checked; + if (dbOverride && !userHasConfirmed) { + event.preventDefault(); + popupShow(); + return false; + } + } </script> <body> + <div id='add-lightbox' onclick='popupClose();' class='popup-lightbox'></div> + <div id='open_popup' class='popup' style='visibility:hidden;display: block;'> + <div class='popup-title'> + <span id='title_popup'>Warning</span> + <a href='#' onclick='popupClose();'><img src='./images/icono_cerrar.png' alt='close' title='Close' style='float:right;'/></a> + </div> + <div class='popup-inner' style='padding: 20px 40px;'> + <?php + echo "<p><strong>Attention</strong>, you are going to <strong>overwrite the data</strong> of your current installation.</p><p>This means that if you do not have a backup <strong>you will irremissibly LOSE ALL THE STORED DATA</strong>, the configuration and everything relevant to your installation.</p><p><strong>Are you sure of what you are going to do?</strong></p>"; + echo "<div style='text-align:right;';>"; + echo "<button type='button' class='btn_install_next' onclick='javascript:handleConfirmClick();'><span class='btn_install_next_text'>Yes, I'm sure I want to delete everything</span></button>"; + echo "<button type='button' class='btn_install_next popup-button-green' onclick='javascript:popupClose();'><span class='btn_install_next_text'>Cancel</span></button>"; + echo "</div>"; + ?> + </div> + </div> <div style='height: 10px'> <?php -$version = '7.0NG.728'; -$build = '181025'; +$version = '7.0NG.730'; +$build = '190111'; $banner = "v$version Build $build"; error_reporting(0); @@ -343,7 +388,7 @@ function adjust_paths_for_freebsd($engine, $connection = false) { function install_step1() { global $banner; - + echo " <div id='install_container'> <div id='wizard'> @@ -608,7 +653,7 @@ function install_step3() { echo " <td valign=top>Drop Database if exists<br> - <input class='login' type='checkbox' name='drop' value=1> + <input class='login' type='checkbox' name='drop' id='drop' value=1> </td>"; echo "<td>Full path to HTTP publication directory<br> @@ -618,14 +663,7 @@ function install_step3() { value='".dirname (__FILE__)."'> <tr>"; - if ($_SERVER['SERVER_ADDR'] == 'localhost' || $_SERVER['SERVER_ADDR'] == '127.0.0.1') { - echo "<td valign=top> - Drop Database if exists<br> - <input class='login' type='checkbox' name='drop' value=1> - "; - } else { - echo "<td>"; - } + echo "<td>"; echo "<td>URL path to Pandora FMS Console<br> <span style='font-size: 9px'>For example '/pandora_console'</span> </br> @@ -637,8 +675,14 @@ function install_step3() { if (!$error) { echo "<div style='text-align:right; width:100%;'>"; echo "<a id='step4' href='install.php?step=4'> - <button class='btn_install_next' type='submit'><span class='btn_install_next_text'>Next</span></button></a>"; + <button class='btn_install_next' type='submit' id='step4button'><span class='btn_install_next_text'>Next</span></button></a>"; echo "</div>"; + ?> + <script type="text/javascript"> + var step3_form = document.getElementsByName('step2_form')[0]; + step3_form.addEventListener("submit", handleStep3FormSubmit); + </script> + <?php } echo "</div>"; diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index 67cd549c76..6bb416c74a 100755 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -1369,4 +1369,8 @@ DIV.nodata_container { } .legend_graph td.legendLabel { font-size: 12px !important; -} \ No newline at end of file +} + +.ui-popup-hidden { + display: none; +} diff --git a/pandora_console/mobile/include/system.class.php b/pandora_console/mobile/include/system.class.php index a1c0c7e672..cb365f95f1 100644 --- a/pandora_console/mobile/include/system.class.php +++ b/pandora_console/mobile/include/system.class.php @@ -12,10 +12,6 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -if (!isset($config)) { - require_once('../include/config.php'); -} - //Singleton class System { private static $instance; @@ -27,9 +23,7 @@ class System { $this->loadConfig(); $session_id = session_id(); DB::getInstance($this->getConfig('db_engine', 'mysql')); - if (empty($session_id)) { - session_start(); - } + if (session_status() === PHP_SESSION_NONE) session_start(); $this->session = $_SESSION; session_write_close(); @@ -75,7 +69,7 @@ class System { } public function setSessionBase($name, $value) { - session_start(); + if (session_status() === PHP_SESSION_NONE) session_start(); $_SESSION[$name] = $value; session_write_close(); } @@ -83,7 +77,7 @@ class System { public function setSession($name, $value) { $this->session[$name] = $value; - session_start(); + if (session_status() === PHP_SESSION_NONE) session_start(); $_SESSION = $this->session; session_write_close(); } @@ -98,7 +92,7 @@ class System { } public function sessionDestroy() { - session_start(); + if (session_status() === PHP_SESSION_NONE) session_start(); session_destroy(); } diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index 41278f2ad5..d3793beff0 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -34,10 +34,9 @@ class User { self::$instance = $user; } else { - self::$instance = new self; + self::$instance = new self(); } } - return self::$instance; } diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index 2a8f8ed396..8b0a4f28a2 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -25,6 +25,14 @@ require_once("include/system.class.php"); require_once("include/db.class.php"); require_once("include/user.class.php"); +/* Info: + * The classes above doesn't start any session before it's properly + * configured into the file below, but it's important the classes + * exist at the time the session is started for things like + * serializing objects stored into the session. + */ +require_once '../include/config.php'; + require_once('operation/home.php'); require_once('operation/tactical.php'); require_once('operation/groups.php'); @@ -77,11 +85,6 @@ $system = System::getInstance(); require_once($system->getConfig('homedir').'/include/constants.php'); $user = User::getInstance(); - -if (!is_object($user) && gettype($user) == 'object') { - $user = unserialize (serialize ($user)); -} - $user->saveLogin(); $default_page = 'home'; diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php index 1d1d50d810..954c8bd130 100644 --- a/pandora_console/mobile/operation/agent.php +++ b/pandora_console/mobile/operation/agent.php @@ -224,8 +224,8 @@ class Agent { ob_start(); // Fixed width non interactive charts - $status_chart_width = $config["flash_charts"] == false ? 100 : 160; - $graph_width = $config["flash_charts"] == false ? 200 : 160; + $status_chart_width = 160; + $graph_width = 160; $html = '<div class="agent_graphs">'; $html .= "<b>" . __('Modules by status') . "</b>"; diff --git a/pandora_console/mobile/operation/alerts.php b/pandora_console/mobile/operation/alerts.php index 8a9e67f47e..cf9c89272f 100644 --- a/pandora_console/mobile/operation/alerts.php +++ b/pandora_console/mobile/operation/alerts.php @@ -250,7 +250,7 @@ class Alerts { if ($alert["times_fired"] > 0) { $status = STATUS_ALERT_FIRED; - $title = __('Alert fired').' '.$alert["times_fired"].' '.__('times'); + $title = __('Alert fired').' '.$alert["internal_counter"].' '.__('time(s)'); } elseif ($alert["disabled"] > 0) { $status = STATUS_ALERT_DISABLED; diff --git a/pandora_console/mobile/operation/module_graph.php b/pandora_console/mobile/operation/module_graph.php index 07037426b4..ccbe4428ff 100644 --- a/pandora_console/mobile/operation/module_graph.php +++ b/pandora_console/mobile/operation/module_graph.php @@ -198,13 +198,11 @@ class ModuleGraph { private function javascript_code() { ob_start(); - + global $config; - if ($config['flash_charts']) { - //Include the javascript for the js charts library - echo include_javascript_dependencies_flot_graph(true); - ui_require_javascript_file('pandora', 'include/javascript/',true); - } + + echo include_javascript_dependencies_flot_graph(true); + ui_require_javascript_file('pandora', 'include/javascript/',true); ?> <script type="text/javascript"> diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 753baf56bb..47b1a97318 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -432,7 +432,7 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { if (!is_metaconsole()) { $table->size[8] = '4%'; if (check_acl ($config["id_user"], $id_group, "LW") || check_acl ($config["id_user"], $id_group, "LM")) { - $table->head[9] = __('Validate'); + $table->head[9] = __('Validate'). html_print_checkbox('all_validate', 0, false, true, false); $table->align[9] = 'center'; $table->size[9] = '5%'; } @@ -620,6 +620,28 @@ ui_require_jquery_file('cluetip'); }).click (function () { return false; }); + + + $('[id^=checkbox-validate]').change(function(){ + if($(this).parent().parent().hasClass('checkselected')){ + $(this).parent().parent().removeClass('checkselected'); + } + else{ + $(this).parent().parent().addClass('checkselected'); + } + }); + + $('[id^=checkbox-all_validate]').change(function(){ + if ($("#checkbox-all_validate").prop("checked")) { + $('[id^=checkbox-validate]').parent().parent().addClass('checkselected'); + $('[name^=validate]').prop("checked", true); + } + else{ + $('[id^=checkbox-validate]').parent().parent().removeClass('checkselected'); + $('[name^=validate]').prop("checked", false); + } + }); + }); $('table.alert-status-filter #ag_group').change (function () { @@ -643,4 +665,4 @@ ui_require_jquery_file('cluetip'); } }).change(); -</script> +</script> \ No newline at end of file diff --git a/pandora_console/operation/agentes/ehorus.php b/pandora_console/operation/agentes/ehorus.php index ddb1ca7db2..66a6a778cd 100644 --- a/pandora_console/operation/agentes/ehorus.php +++ b/pandora_console/operation/agentes/ehorus.php @@ -53,7 +53,7 @@ if (empty($ehorus_agent_id)) { $hostname = $config['ehorus_hostname']; $port = $config['ehorus_port']; $user = $config['ehorus_user']; -$password = io_output_password($config['ehorus_pass']); +$password = io_safe_output(io_output_password($config['ehorus_pass'])); $curl_timeout = $config['ehorus_req_timeout']; $base_url = 'https://' . $hostname . ':' . $port; @@ -315,4 +315,4 @@ $client_url = $config['homeurl'] . 'operation/agentes/ehorus_client.php?' . $que $('input#run-ehorus-client').click(handleButtonClick); }); -</script> \ No newline at end of file +</script> diff --git a/pandora_console/operation/agentes/ehorus_client.php b/pandora_console/operation/agentes/ehorus_client.php index ebff0f78c6..ca0a10f194 100644 --- a/pandora_console/operation/agentes/ehorus_client.php +++ b/pandora_console/operation/agentes/ehorus_client.php @@ -13,12 +13,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. - -if (! isset($_SESSION['id_usuario'])) { - session_start(); -} - -// Global & session management +// Don't start a session before this import. +// The session is configured and started inside the config process. require_once('../../include/config.php'); require_once($config['homedir'] . '/include/functions.php'); diff --git a/pandora_console/operation/agentes/estado_agente.php b/pandora_console/operation/agentes/estado_agente.php index 20d3f18a47..d37cc9396c 100644 --- a/pandora_console/operation/agentes/estado_agente.php +++ b/pandora_console/operation/agentes/estado_agente.php @@ -623,7 +623,7 @@ foreach ($agents as $agent) { $data[0] = '<div class="left_' . $agent["id_agente"] . '">'; $data[0] .= '<span>'; - $data[0] .= '<a href="index.php?sec=view&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'"> <span style="font-size: 7pt;font-weight:bold" title ="' . $agent["nombre"]. '">'.$agent["alias"].'</span></a>'; + $data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'"> <span style="font-size: 7pt;font-weight:bold" title ="' . $agent["nombre"]. '">'.$agent["alias"].'</span></a>'; $data[0] .= '</span>'; if ($agent['quiet']) { @@ -642,7 +642,7 @@ foreach ($agents as $agent) { $data[0] .= '<a href="index.php?sec=reporting&sec2=enterprise/godmode/reporting/cluster_view&id='.$cluster['id'].'">'.__('View').'</a>'; } else{ - $data[0] .= '<a href="index.php?sec=view&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'">'.__('View').'</a>'; + $data[0] .= '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'">'.__('View').'</a>'; } if (check_acl ($config['id_user'], $agent["id_grupo"], "AW")) { diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 64b2a2f212..751f4f481c 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -137,8 +137,8 @@ $data = array(); //$table_agent->rowspan[count($table_agent->data)][0] = 6; // Fixed width non interactive charts -$status_chart_width = $config["flash_charts"] == false ? 100 : 150; -$graph_width = $config["flash_charts"] == false ? 200 : 150; +$status_chart_width = 150; +$graph_width = 150; $data[0] = '<div style="margin: 0 auto 6px auto; width: 150px;">'; $data[0] .= '<div id="status_pie" style="margin: auto; width: ' . $status_chart_width . 'px;">'; @@ -645,7 +645,7 @@ $data[0][0] .= __('Events (24h)') . '</th></tr>' . '<tr><td style="text-align:center;padding-left:20px;padding-right:20px;"><br />' . - graph_graphic_agentevents ($id_agente, 450, 40, SECONDS_1DAY, '', true, true) . + graph_graphic_agentevents ($id_agente, 100, 45, SECONDS_1DAY, '', true, true) . '<br /></td></tr>' . '</table>'; diff --git a/pandora_console/operation/agentes/export_csv.php b/pandora_console/operation/agentes/export_csv.php index 473f40aef7..16745def93 100644 --- a/pandora_console/operation/agentes/export_csv.php +++ b/pandora_console/operation/agentes/export_csv.php @@ -13,8 +13,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -session_start (); - +// Don't start a session before this import. +// The session is configured and started inside the config process. require_once ("../../include/config.php"); require_once ("../../include/functions.php"); require_once ("../../include/functions_db.php"); diff --git a/pandora_console/operation/agentes/exportdata.csv.php b/pandora_console/operation/agentes/exportdata.csv.php index df692040e9..39a72e5cdb 100644 --- a/pandora_console/operation/agentes/exportdata.csv.php +++ b/pandora_console/operation/agentes/exportdata.csv.php @@ -13,8 +13,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -session_start (); - +// Don't start a session before this import. +// The session is configured and started inside the config process. require_once ("../../include/config.php"); require_once ("../../include/functions_agents.php"); require_once ("../../include/functions_reporting.php"); diff --git a/pandora_console/operation/agentes/exportdata.excel.php b/pandora_console/operation/agentes/exportdata.excel.php index f289dc1405..b7ac7796d9 100644 --- a/pandora_console/operation/agentes/exportdata.excel.php +++ b/pandora_console/operation/agentes/exportdata.excel.php @@ -13,8 +13,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -session_start (); - +// Don't start a session before this import. +// The session is configured and started inside the config process. require_once ("../../include/config.php"); require_once ("../../include/functions_agents.php"); require_once ("../../include/functions_reporting.php"); diff --git a/pandora_console/operation/agentes/graphs.php b/pandora_console/operation/agentes/graphs.php index 4c9a546798..49c2f27cb4 100644 --- a/pandora_console/operation/agentes/graphs.php +++ b/pandora_console/operation/agentes/graphs.php @@ -18,6 +18,7 @@ global $config; require_once ("include/functions_agents.php"); require_once ("include/functions_custom_graphs.php"); +ui_require_javascript_file ('calendar'); if (! check_acl ($config['id_user'], $id_grupo, "AR") && ! check_acl ($config['id_user'], 0, "AW")) { db_pandora_audit("ACL Violation", @@ -242,7 +243,7 @@ echo '</div>'; //Dialog to save the custom graph echo "<div id='dialog_save_custom_graph' style='display: none;'>"; -$table = null; +$table = new stdClass(); $table->width = '100%'; $table->style[0] = 'font-weight: bolder; text-align: right;'; $table->data[0][0] = __('Name custom graph'); diff --git a/pandora_console/operation/agentes/group_view.php b/pandora_console/operation/agentes/group_view.php index d80870f334..640de2010c 100644 --- a/pandora_console/operation/agentes/group_view.php +++ b/pandora_console/operation/agentes/group_view.php @@ -77,6 +77,8 @@ $monitor_not_init = 0; $agents_unknown = 0; $agents_critical = 0; $agents_notinit = 0; +$agents_ok = 0; +$agents_warning = 0; $all_alerts_fired = 0; //Groups and tags @@ -98,6 +100,8 @@ if ($result_groups[0]["_id_"] == 0) { $agents_unknown = $result_groups[0]["_agents_unknown_"]; $agents_notinit = $result_groups[0]["_agents_not_init_"]; $agents_critical = $result_groups[0]["_agents_critical_"]; + $agents_warning = $result_groups[0]["_agents_warning_"]; + $agents_ok = $result_groups[0]["_agents_ok_"]; $all_alerts_fired = $result_groups[0]["_monitors_alerts_fired_"]; } @@ -114,6 +118,8 @@ $total_monitor_not_init =0; $total_agent_unknown = 0; $total_agent_critical = 0; $total_not_init = 0; +$total_agent_warning = 0; +$total_agent_ok = 0; if ($total > 0) { //Modules @@ -127,6 +133,8 @@ if ($total_agentes > 0) { //Agents $total_agent_unknown = format_numeric (($agents_unknown*100)/$total_agentes,2); $total_agent_critical = format_numeric (($agents_critical*100)/$total_agentes,2); + $total_agent_warning = format_numeric (($agents_warning*100)/$total_agentes,2); + $total_agent_ok = format_numeric (($agents_ok*100)/$total_agentes,2); $total_not_init = format_numeric (($agents_notinit*100)/$total_agentes,2); } @@ -135,14 +143,16 @@ echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="data echo "<th colspan=2 style='text-align: center;'>" . __("Summary of the status groups") . "</th>"; echo "</tr>"; echo "<tr>"; - echo "<th width=30% style='text-align:center'>" . __("Agents") . "</th>"; - echo "<th width=70% style='text-align:center'>" . __("Modules") . "</th>"; + echo "<th width=50% style='text-align:center'>" . __("Agents") . "</th>"; + echo "<th width=50% style='text-align:center'>" . __("Modules") . "</th>"; echo "</tr>"; echo "<tr height=70px'>"; echo "<td align='center'>"; + echo "<span id='sumary' style='background-color:#FC4444;'>". $total_agent_critical ."%</span>"; + echo "<span id='sumary' style='background-color:#FAD403;'>". $total_agent_warning ."%</span>"; + echo "<span id='sumary' style='background-color:#80BA27;'>". $total_agent_ok ."%</span>"; echo "<span id='sumary' style='background-color:#B2B2B2;'>". $total_agent_unknown ."%</span>"; echo "<span id='sumary' style='background-color:#5bb6e5;'>". $total_not_init ."%</span>"; - echo "<span id='sumary' style='background-color:#FC4444;'>". $total_agent_critical ."%</span>"; echo "</td>"; echo "<td align='center'>"; echo "<span id='sumary' style='background-color:#FC4444;'>". $total_critical ."%</span>"; @@ -167,7 +177,7 @@ if (!empty($result_groups)) { echo '<table cellpadding="0" cellspacing="0" style="margin-top:10px;" class="databox data" border="0" width="100%">'; echo "<tr>"; echo "<th colspan=2 ></th>"; - echo "<th colspan=4 class='difference' style='text-align:center'>" . __("Agents") . "</th>"; + echo "<th colspan=6 class='difference' style='text-align:center'>" . __("Agents") . "</th>"; echo "<th colspan=6 style='text-align:center'>" . __("Modules") . "</th>"; echo "</tr>"; @@ -177,9 +187,11 @@ if (!empty($result_groups)) { echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Total") . "</th>"; echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Unknown") . "</th>"; echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Not init") . "</th>"; + echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Normal") . "</th>"; + echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Warning") . "</th>"; echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Critical") . "</th>"; echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Unknown") . "</th>"; - echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Not Init") . "</th>"; + echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Not init") . "</th>"; echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Normal") . "</th>"; echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Warning") . "</th>"; echo "<th width='10%' style='min-width: 60px;text-align:center;'>" . __("Critical") . "</th>"; @@ -324,6 +336,42 @@ if (!empty($result_groups)) { } echo "</td>"; + // Agents Normal + echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + if (isset($data['_is_tag_'])) { + $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_']. "&status=" . AGENT_STATUS_NORMAL ."'>"; + } else { + $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_']."&status=" . AGENT_STATUS_NORMAL ."'>"; + } + if (($data["_id_"] == 0) && ($agents_ok != 0)) { + echo $link . $agents_ok . "</a>"; + } + + if ($data["_agents_ok_"] > 0 && ($data["_id_"] != 0)) { + echo $link . $data["_agents_ok_"] . "</a>"; + } + echo "</td>"; + + // Agents warning + echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; + if (isset($data['_is_tag_'])) { + $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + href='index.php?sec=monitoring&sec2=operation/tree&tag_id=".$data['_id_']. "&status=" . AGENT_STATUS_WARNING ."'>"; + } else { + $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' + href='index.php?sec=view&sec2=operation/agentes/estado_agente&group_id=".$data['_id_']."&status=" . AGENT_STATUS_WARNING ."'>"; + } + if (($data["_id_"] == 0) && ($agents_warning != 0)) { + echo $link . $agents_warning . "</a>"; + } + + if ($data["_agents_warning_"] > 0 && ($data["_id_"] != 0)) { + echo $link . $data["_agents_warning_"] . "</a>"; + } + echo "</td>"; + // Agents critical echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; if (isset($data['_is_tag_'])) { @@ -346,10 +394,10 @@ if (!empty($result_groups)) { echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; if (!isset($data['_is_tag_'])) { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_UNKNOWN . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_UNKNOWN . "'>"; } else { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_UNKNOWN . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_UNKNOWN . "'>"; } if (($data["_id_"] == 0) && ($monitor_unknown != 0)) { echo $link . $monitor_unknown . "</a>"; @@ -363,10 +411,10 @@ if (!empty($result_groups)) { echo "<td class='group_view_data group_view_data_unk $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; if (!isset($data['_is_tag_'])) { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NOT_INIT . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NOT_INIT . "'>"; } else { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NOT_INIT . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NOT_INIT . "'>"; } if (($data["_id_"] == 0) && ($monitor_not_init != 0)) { echo $link . $monitor_not_init . "</a>"; @@ -380,10 +428,10 @@ if (!empty($result_groups)) { echo "<td class='group_view_data group_view_data_ok $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; if (!isset($data['_is_tag_'])) { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NORMAL . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NORMAL . "'>"; } else { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NORMAL . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_NORMAL . "'>"; } if (($data["_id_"] == 0) && ($monitor_ok != 0)) { echo $link . $monitor_ok . "</a>"; @@ -397,10 +445,10 @@ if (!empty($result_groups)) { echo "<td class='group_view_data group_view_data_warn $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; if (!isset($data['_is_tag_'])) { $link = "<a class='group_view_data group_view_data_warn $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_WARNING . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_WARNING . "'>"; } else { $link = "<a class='group_view_data group_view_data_warn $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_WARNING . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_WARNING . "'>"; } if (($data["_id_"] == 0) && ($monitor_warning != 0)) { echo $link . $monitor_warning . "</a>"; @@ -414,10 +462,10 @@ if (!empty($result_groups)) { echo "<td class='group_view_data group_view_data_crit $color_class' style='font-weight: bold; font-size: 18px; text-align: center;'>"; if (!isset($data['_is_tag_'])) { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&ag_group=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD . "'>"; } else { $link = "<a class='group_view_data $color_class' style='font-weight: bold; font-size: 18px; text-align: center;' - href='index.php?sec=estado&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD . "'>"; + href='index.php?sec=view&sec2=operation/agentes/status_monitor&tag_filter=".$data['_id_']."&status=" . AGENT_MODULE_STATUS_CRITICAL_BAD . "'>"; } if (($data["_id_"] == 0) && ($monitor_critical != 0)) { echo $link . $monitor_critical . "</a>"; diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 94251a380a..7346e90805 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -13,13 +13,8 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. - -if (! isset($_SESSION['id_usuario'])) { - session_start(); - session_write_close(); -} - -// Global & session management +// Don't start a session before this import. +// The session is configured and started inside the config process. require_once ('../../include/config.php'); require_once ($config['homedir'] . '/include/auth/mysql.php'); require_once ($config['homedir'] . '/include/functions.php'); @@ -30,7 +25,7 @@ require_once ($config['homedir'] . '/include/functions_custom_graphs.php'); require_once ($config['homedir'] . '/include/functions_modules.php'); require_once ($config['homedir'] . '/include/functions_agents.php'); require_once ($config['homedir'] . '/include/functions_tags.php'); -enterprise_include_once('include/functions_agents.php'); +enterprise_include_once ('include/functions_agents.php'); check_login(); @@ -83,17 +78,14 @@ $interface_traffic_modules = array( <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo __('%s Interface Graph', get_product_name()) . ' (' .agents_get_alias($agent_id) . ' - ' . $interface_name; ?>) - + - + - +