commit ee47c30aca48daade64e997f07c6e1343395ebd2 Author: mynah Date: Fri Jul 13 19:06:08 2018 -0500 bye bye github diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a442db9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.log +*.swp +cgisess_* +Conf.pm diff --git a/dojo.conf b/dojo.conf new file mode 100644 index 0000000..43c14e7 --- /dev/null +++ b/dojo.conf @@ -0,0 +1,5 @@ +{ + perldoc => 1, + secrets => ['b8a9e54090ccb580b6203e53a9f9199af38ce538'], + path => 'public', +} diff --git a/lib/Dojo.pm b/lib/Dojo.pm new file mode 100644 index 0000000..145d936 --- /dev/null +++ b/lib/Dojo.pm @@ -0,0 +1,46 @@ +package Dojo; +use Mojo::Base 'Mojolicious'; +use Dojo::Conf; +use Dojo::Model::Vuelo; +use Dojo::Model::Users; +use Dojo::Model::Data; + +# This method will run once at server start +sub startup { + my $self = shift; + my $config = $self->plugin('Config'); #Config hash dojo.conf + $self->plugin('PODRenderer') if $config->{perldoc}; #doc + $self->secrets(['Mojojojo jojo']); #cookies + + $self->helper(dbv => sub { state $dbv = Dojo::Model::Vuelo->new }); + $self->helper(dbg => sub { state $dbg = Dojo::Model::Users->new }); + $self->helper(ddtt => sub { state $ddtt = Dojo::Model::Data->new }); + $self->defaults({%Dojo::Conf::def}); + + my $r = $self->routes; #router + + $r->any('/home')->to('home#home'); + $r->any('/cal')->to('home#cal'); + $r->any('/event/:id'=> [id => qr/\d+/])->to('home#event'); + #$r->any('/radio')->to('home#radio'); + $r->any('/pod')->to('home#podcast'); + $r->any('/store')->to('home#store'); + $r->any('/tv')->to('home#tv'); + $r->any('/contact')->to('home#contact'); + $r->any('/contact2')->to('home#contact2'); + $r->any('/pang')->to('home#pang'); + $r->any('/tst')->to('home#tst'); + + $r->any('/json/:dreq')->to('data#simple'); + $r->any('/json/candy/:command')->to('data#candy'); + + $r->any('/login')->to('users#login'); + $r->any('/logout')->to('users#logout'); + + my $logged_in = $r->under('/')->to('users#is_logged'); + $logged_in->get('/radio')->to('home#radio'); + + +} + +1; diff --git a/lib/Dojo/Conf.pm.example b/lib/Dojo/Conf.pm.example new file mode 100644 index 0000000..702f330 --- /dev/null +++ b/lib/Dojo/Conf.pm.example @@ -0,0 +1,48 @@ +package Dojo::Conf; +use strict; +use warnings; +#Paths +use constant { + MOD => "public", #location of modules + SERVER_NAME => "localhost:3000", + CHAT_SRV => "chat.vuelodegrulla.com", +}; + +# database access +use constant { + VUELODB => "dbname", + VUELODB_H => "localhost", + VUELODB_UW => "writtername", + VUELODB_UWP => "writterpass", + VUELODB_UR => "readername", + VUELODB_URP => "readerpass", +}; + +our $radio ={ #hash to configure icecast radio + server_name => SERVER_NAME, + radio_server =>"https://myradio.com", + channel => "/test", + listen_url =>"http://radio:8000/test", +}; + +our $chat={ #hash to configure chat (candy prodody) server + chat_addr => "https://".CHAT_SRV, + chat_srv => CHAT_SRV, + chat_channel => 'Users@radio.'.CHAT_SRV, +}; +our %rtmp={ #hash ro configure rtpm video server + rtmp_server =>"rtmp://myserver.com/steam", + rtmp_channel =>"channel", +}; + +our %def=( #some other global configuration + modules => MOD, + # layout => "default" +); + + +1; + +__END__ + + diff --git a/lib/Dojo/Controller/Data.pm b/lib/Dojo/Controller/Data.pm new file mode 100644 index 0000000..ed896d4 --- /dev/null +++ b/lib/Dojo/Controller/Data.pm @@ -0,0 +1,63 @@ +package Dojo::Controller::Data; +use Mojo::Base 'Mojolicious::Controller'; +use Dojo::Support qw{ dmph merge_hash load_module }; +use Dojo::Conf; +use Net::Telnet; + + my $server_name = $Dojo::Conf::chat->{chat_srv}; + our $t; #telnet server object +sub simple{ + my $c=shift; + my $n=$c->param("dreq")//""; + my $json = {status => "304"}; + $json = \%Dojo::Conf::radio if $n =~m/^radio$/ ; + $json = candy() if $n =~m/^candy$/ ; + $c->render(json=>$json); +} + +sub candy{ + my $c=shift; + my $r="-1"; + if (connectT()) { + if ($c->param("command") =~/^isOn$/){ $r = isOn(); } + elsif( $c->session("pmid") == 4 ){ + $r = turnOn() if ($c->param("command") =~/^on$/); + $r = turnOff() if ($c->param("command") =~/^off$/); + }} + else {$r="connection error";}; + $c->render(json => {a=>$r}); +} + + sub turnOff{ + return 1 unless (isOn()); + grep(/Result: true/,sendT("host:deactivate('$server_name')"))?1:0; + } + sub turnOn{ + return 1 unless (!isOn()); + grep(/Result: true/,sendT("host:activate('$server_name')"))?1:0; + } + + sub isOn{ grep(/\s$server_name/,sendT("host:list()"))? 1:0; } + + sub sendT{ + commandT(shift); + my @r = $t->getlines(All=>0); + disconnectT(); + return @r + } + sub connectT{ + $t = new Net::Telnet ( Port=>5582, Timeout=>1, Errmode=>'return' ); + # $t = new Net::Telnet ( Port=>5582, Timeout=>1, Errmode=>'die' ); + return 1 if $t->open(); + return 0; + } + sub commandT{ + $t->getlines(All=>0);#empty buffer + $t->print(shift); #run istruction + } + sub disconnectT{ $t->close();} + +1 +__END__ + + diff --git a/lib/Dojo/Controller/Example.pm b/lib/Dojo/Controller/Example.pm new file mode 100644 index 0000000..ccf02fe --- /dev/null +++ b/lib/Dojo/Controller/Example.pm @@ -0,0 +1,12 @@ +package Dojo::Controller::Example; +use Mojo::Base 'Mojolicious::Controller'; + +# This action will render a template +sub welcome { + my $self = shift; + + # Render template "example/welcome.html.ep" with message + $self->render(msg => 'Welcome to the Mojolicious real-time web framework!'); +} + +1; diff --git a/lib/Dojo/Controller/Home.pm b/lib/Dojo/Controller/Home.pm new file mode 100644 index 0000000..f083b5b --- /dev/null +++ b/lib/Dojo/Controller/Home.pm @@ -0,0 +1,99 @@ +package Dojo::Controller::Home; +use Mojo::Base 'Mojolicious::Controller'; +use Dojo::Support qw{ dmph merge_hash load_module }; +use Dojo::Conf; + +sub tst{ + my $c=shift; + my ($v,$w)= load_module($c); + # $c->stash($v); + $c->stash(d =>$v); + +} + +sub home { + my $c = shift; + $c->stash((load_module($c))[0]); + $c->stash( map{ $_->{nombre} => $_->{contenido}} @{$c->dbv->mod}); +} + +sub pang { + my $c = shift; + my ($v,$w)=load_module($c); + $c->stash($v); + $c->stash( $c->dbv->pang($w) ); +} + +sub cal { + my $c = shift; + $c->stash((load_module($c))[0]); + my ($data,$block)=$c->dbv->cal; + my %hdata; + map{ push @{ $hdata{$_->{bid}} },$_; }(@$data); + $c->stash( r=>\%hdata, b=>$block); +} + +sub event{ + my $c = shift; + $c->stash((load_module($c))[0]); + $c->stash(%{($c->dbv->event($c->param("id")))->[0]}); +} +sub contact{ + my $c = shift; + if ($c->param("mup")){ + $c->flash(mname => $c->param("mname")); + $c->redirect_to('contact2'); + }else{ + my $dir= "/$c->{stash}{controller}/$c->{stash}{action}"; + $c->stash( css=>["$dir/cssContact1.css"], js=>[]); + $c->stash( layout=>"default"); + } +} + +sub contact2{ + my $c = shift; + $c->redirect_to("home") unless $c->flash('mname'); + my $dir= "/$c->{stash}{controller}/contact"; + $c->stash( css=>["$dir/cssContact2.css"], js=>[]); + $c->stash( layout=>"default"); + $c->stash( mname=>$c->flash('mname')); +} + +sub store{ + my $c = shift; + $c->stash((load_module($c))[0]); + $c->stash( r=>$c->dbv->store); +} + +sub tv{ + my $c = shift; + $c->stash( merge_hash( + (load_module($c))[0], + (load_module($c,"home/tv/trans"))[0] + )); + my ($series,$table)=$c->dbv->tv; + $c->stash( series=>$series, table=>$table); +} + +sub podcast{ + my $c = shift; + $c->stash((load_module($c))[0]); + + my ($txt,$h)=$c->dbv->podcast; + $c->stash( t=>$txt, pod=>$h,); +} + +sub radio{ + my $c=shift; + $c->stash((load_module($c))[0]); + $c->stash(%{($c->dbv->radio)->[0]}); + $c->stash($Dojo::Conf::radio); + $c->stash(nick=>$c->session("nick")); +} + + + #$c->render(text =>"$c->{match}->position"); + #$c->render(text=>"$c->{stash}{controller}"); + #$c->render(text=>"$c->{match}{stack}->[0]{controller}"); + #$c->render(text=>"$h->{css}[0]"); +1; diff --git a/lib/Dojo/Controller/Users.pm b/lib/Dojo/Controller/Users.pm new file mode 100644 index 0000000..a5054b3 --- /dev/null +++ b/lib/Dojo/Controller/Users.pm @@ -0,0 +1,28 @@ +package Dojo::Controller::Users; +use Mojo::Base 'Mojolicious::Controller'; +use Dojo::Support qw{ merge_hash load_module }; + + +sub login { + my $c = shift; + $c->stash((load_module($c))[0]); + my $user = $c->param('uname') // ''; + my $pass = $c->param('pass') //''; + return $c->render unless my $pmid = $c->dbg->check($user, $pass); + $c->session(user => $user, pmid=>$pmid, nick=> $c->param('nick')); + $c->redirect_to('radio'); +} + +sub is_logged { + my $self = shift; + return 1 if $self->session('user'); + $self->redirect_to('login'); +} + +sub logout { + my $self = shift; + $self->session(expires => 1); + $self->redirect_to('home'); +} + +1; diff --git a/lib/Dojo/Model/Data.pm b/lib/Dojo/Model/Data.pm new file mode 100644 index 0000000..a448a14 --- /dev/null +++ b/lib/Dojo/Model/Data.pm @@ -0,0 +1,15 @@ +package Dojo::Model::Data; +use Dojo::Support qw{ dmph merge_hash load_module }; +use Dojo::Conf; + +sub new { bless {}, shift }; + + +sub tst{ + + return {tst=>"this is my rifle"}; +} + +1; + + diff --git a/lib/Dojo/Model/Users.pm b/lib/Dojo/Model/Users.pm new file mode 100644 index 0000000..05e6b8b --- /dev/null +++ b/lib/Dojo/Model/Users.pm @@ -0,0 +1,38 @@ +package Dojo::Model::Users; + +use strict; +use warnings; +use DBI; +use Mojo::Util 'secure_compare'; +use Dojo::Conf; + + +sub new { bless {}, shift } + +sub check { + my ($self, $user, $pass) = @_; + my $q="select permiso_id as pid from usuario where nombre = ? and pass=? "; +# | 0 | bloqueado | +# | 1 | invitado | +# | 2 | usuario | +# | 3 | pago | +# | 4 | master | + my $r= _read($q,$vuelo,$user,$pass)->[0]; + return $r->{pid} // 0; +} + +sub _read{ + my ($q,$d,@bind)=@_; + my (@empty,$arr); + my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::GRULLADB.":".Dojo::Conf:: GRULLADB_H,Dojo::Conf::GRULLADB_UR,Dojo::Conf::GRULLADB_URP); + return \@empty unless($dbh); + #$dbh->do(qq{SET NAMES 'utf8'}); + my $h=$dbh->selectall_arrayref($q,{ Slice => {} },@bind); + #((col1=>d1,col2=>d1),(col1=>d2,col2=>d2)) + $dbh->disconnect(); + return $h; +} + + + +1; diff --git a/lib/Dojo/Model/Vuelo.pm b/lib/Dojo/Model/Vuelo.pm new file mode 100644 index 0000000..b431289 --- /dev/null +++ b/lib/Dojo/Model/Vuelo.pm @@ -0,0 +1,79 @@ +package Dojo::Model::Vuelo; +use Mojo::File 'path'; +use Mojo::JSON qw(decode_json encode_json); +use Dojo::Support qw{ dmph merge_hash load_module }; + +use File::Basename; +use Text::Markdown qw{ markdown }; +use Encode qw{ decode_utf8 }; +use DBI; +use Dojo::Conf; + +sub new { bless {}, shift }; + + +sub mod{ + my $q="select nombre,contenido from casa;"; + return \@{_read($q,$vuelo)}; +} + +sub pang{ + my ($c,$q)=@_; + return {map { basename($_,".md") => load_md("public/$_")}@{$q->{md}}}; +} +sub cal { + my $block=_read (path("public/home/cal/q1Block.q")->slurp,$vuelo); + my $data=_read (path("public/home/cal/q3Event.q")->slurp,$vuelo); + return ($data,$block); +} + +sub event{ + my ($self,$id)=@_; + return _read (path("public/home/event/qEvent.q")->slurp,$vuelo,$id); +} + +sub store{ + return _read (path("public/home/store/qStore.q")->slurp,$vuelo); +} + +sub tv{ + my $series = _read (path("public/home/tv/qSeries.q")->slurp,$vuelo); #group,name + my $table = _read (path("public/home/tv/qTable.q")->slurp,$vuelo); #name,order,group + return ($series,$table); +} + +sub podcast{ + my $txt = path("public/home/podcast/text.txt")->slurp; + my $hash = decode_json path("public/home/podcast/jsonPod.json")->slurp; + return ($txt,$hash); +} + +sub radio{ + my $q="select contenido as rmod from casa where nombre='rmod';"; + return _read($q,$vuelo); +} + +sub _read{ + my ($q,$d,@bind)=@_; + my (@empty,$arr); + my $dbh = DBI->connect("DBI:mysql:".Dojo::Conf::VUELODB.":".Dojo::Conf::VUELODB_H,Dojo::Conf::VUELODB_UR,Dojo::Conf::VUELODB_URP); + return \@empty unless($dbh); + #$dbh->do(qq{SET NAMES 'utf8'}); + my $h=$dbh->selectall_arrayref($q,{ Slice => {} },@bind); + #((col1=>d1,col2=>d1),(col1=>d2,col2=>d2)) + $dbh->disconnect(); + return $h; +} + +sub load_md{ + return "" unless + my $text = path(shift)->slurp; + return markdown( decode_utf8($text) ); +} + +sub load_txt{ + return "" unless + my $text = path(shift)->slurp; + return decode_utf8($text); +} + diff --git a/lib/Dojo/Support.pm b/lib/Dojo/Support.pm new file mode 100644 index 0000000..bed0889 --- /dev/null +++ b/lib/Dojo/Support.pm @@ -0,0 +1,62 @@ +package Dojo::Support; +use strict; +use warnings; +use Exporter 'import'; +our @EXPORT = qw/ dmph merge_hash load_module /; +use Mojo::Base 'Mojolicious'; + +use File::Basename; +use Mojo::File 'path'; +use Path::Class; +use Encode qw{ decode_utf8 }; +use Hash::Merge; +use Dojo::Conf; + + + +sub get_names{ + my $dir = shift; + my @file_name; + opendir(DIR, $dir) or die "error opening dir: $dir \n$!"; + while (my $file = readdir(DIR)) { + next unless ( $file =~m/^[\w\d]/); + next unless (-f "$dir/$file"); + push(@file_name,$file); + } + closedir(DIR); + return sort @file_name; +}; + +sub merge_hash{ + my ($v,$w)=@_; + my $merger = Hash::Merge->new('LEFT_PRECEDENT'); + return $merger->merge( $v, $w ); +} + +sub load_module{ + my $c=shift; + my $dir=shift //"$c->{stash}{controller}/$c->{stash}{action}"; + my $lpath= Dojo::Conf::MOD."/$dir"; + my $h; $h->{js}=[]; $h->{css}=[]; #no me gusta!!! + $h->{layout} = "default"; + my $q; + my @s= get_names($lpath); + foreach (@s) { + push(@{$h->{$1}}, "/$dir/$_") if /.*\.(css|js)$/; + push(@{$q->{$1}}, "/$dir/$_") if /.*\.(q|json|txt|md)$/; + } + return ($h,$q); +}; + + +sub dmph{ + my $x = shift; + my $y=" "; + foreach (sort(keys %$x)) { + $y= "$y $_ = $x->{$_} \n"; + } + return $y; +} + + +1; diff --git a/public/ext/candy/CONTRIBUTING.md b/public/ext/candy/CONTRIBUTING.md new file mode 100755 index 0000000..a208b9d --- /dev/null +++ b/public/ext/candy/CONTRIBUTING.md @@ -0,0 +1,56 @@ +# Contributing + +## Team members + +* Patrick Stadler · [@pstadler](http://twitter.com/pstadler) · +* Michael Weibel · [@weibelm](htps://twitter.com/weibelm) · + +## Learn & listen + +[![Gitter chat](https://badges.gitter.im/candy-chat.png)](https://gitter.im/candy-chat) + +* [Mailing list](http://groups.google.com/group/candy-chat) + * yes, non-gmail users can signup as well +* [FAQ](https://github.com/candy-chat/candy/wiki/Frequently-Asked-Questions) + +## Contributing + +You want to help us? **Awesome!** + +### How to contribute +A few hopefully helpful hints to contributing to Candy + +#### Using vagrant +1. [Fork](https://help.github.com/articles/fork-a-repo) Candy +2. [Install Vagrant](http://vagrantup.com/) +3. Run `vagrant up`. +5. Create a branch based on the `master` branch (`git checkout -B my-awesome-feature`) +6. Run `grunt watch` to automatically run jshint (syntax checker) and the build of `candy.bundle.js` and `candy.min.js` while developing. +7. Make your changes, fix eventual *jshint* errors & push them back to your fork +8. Create a [pull request](https://help.github.com/articles/using-pull-requests) + + +#### On your own machine +Please note that you should have a working XMPP server to test your changes (the vagrant way does already have a working XMPP server). + +1. [Fork](https://help.github.com/articles/fork-a-repo) Candy +2. Clone your fork +3. Checkout out `master` branch (`git checkout master`) +4. Install [Node.js](http://nodejs.org/) +5. Install [Grunt](http://gruntjs.com/) (`npm install -g grunt-cli`) +6. Install [Bower](http://bower.io/) (`npm install -g bower`) +7. Install npm dependencies (`npm install` in candy root directory) +8. Install bower dependencies (`bower install` in candy root directory) +9. Create a branch based on the `master` branch (`git checkout -B my-awesome-feature`) +10. Run `grunt watch` to automatically run jshint (syntax checker) and the build of `candy.bundle.js` and `candy.min.js` while developing. +11. Make your changes, fix eventual *jshint* errors & push them back to your fork +12. Create a [pull request](https://help.github.com/articles/using-pull-requests) + +In case you have any questions, don't hesitate to ask on the [Mailing list](http://groups.google.com/group/candy-chat). + +### Running tests + +* Tests are run using [Intern](http://theintern.io). +* `grunt` and `grunt watch` will each run unit tests in Chrome on Linux (for fast feedback). +* `grunt test` will run both unit and integration tests in a variety of environments. Tests are run using Selenium Standalone and Phantom.JS while developing, and on Sauce Labs in CI or using `grunt test`. +* If you don't want to use the Vagrant box to run Selenium/PhantomJS, set `CANDY_VAGRANT='false'` to run tests. diff --git a/public/ext/candy/CREDITS.md b/public/ext/candy/CREDITS.md new file mode 100755 index 0000000..e0eb0a6 --- /dev/null +++ b/public/ext/candy/CREDITS.md @@ -0,0 +1,9 @@ +Credits +======= +- [Special thanks to our contributors](https://github.com/candy-chat/candy/graphs/contributors) +- [famfamfam silk icons](http://www.famfamfam.com/lab/icons/silk/) is a smooth, free icon set, containing over 700 16-by-16 pixel icons. +- [Simple Smileys](http://simplesmileys.org) are beautifully simple emoticons. +- [Flash MP3 Player](http://flash-mp3-player.net/players/js) is a very simple flash audio player used by Candy for audio notifications. +- [Colin Snover](http://zetafleet.com/blog/javascript-dateparse-for-iso-8601) provides a fix for browsers not supporting latest Date.parse(). +- [Ben Cherry](http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth) wrote a great article about the JS module pattern. +- [Amiado Group](http://www.amiadogroup.com) allowed us to make Candy freely available for everyone :) \ No newline at end of file diff --git a/public/ext/candy/LICENSE b/public/ext/candy/LICENSE new file mode 100755 index 0000000..7273d89 --- /dev/null +++ b/public/ext/candy/LICENSE @@ -0,0 +1,9 @@ +Copyright (c) 2011 Amiado Group AG +Copyright (c) 2012-2014 Patrick Stadler & Michael Weibel +Copyright (c) 2015 Adhearsion Foundation Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/ext/candy/README.md b/public/ext/candy/README.md new file mode 100755 index 0000000..de47635 --- /dev/null +++ b/public/ext/candy/README.md @@ -0,0 +1,28 @@ +Candy — a JavaScript-based multi-user chat client +================================================== + +[![Build Status](https://travis-ci.org/candy-chat/candy.png?branch=dev)](https://travis-ci.org/candy-chat/candy) +[![Coverage Status](https://coveralls.io/repos/candy-chat/candy/badge.png?branch=dev)](https://coveralls.io/r/candy-chat/candy) + +Visit the official project page: http://candy-chat.github.io/candy + +Features +-------- +- Focused on real-time multi-user chatting +- Easy to configure, easy to run, easy to use +- Highly customizable +- 100% well-documented JavaScript source code +- Built for Jabber (XMPP), using famous technologies +- Used and approved in a productive environment with up to 400 concurrent users +- Works with all major web browsers including IE9 + +Plugins +------- +If you wish to add new functionality (to your candy installation) or contribute plugins, take a look at our [plugin repository](http://github.com/candy-chat/candy-plugins). + +Support & Community +------------------- +Take a look at our [FAQ](https://github.com/candy-chat/candy/wiki/Frequently-Asked-Questions). If it doesn't solve your questions, you're welcome to join our [Mailinglist on Google Groups](http://groups.google.com/group/candy-chat). +You don't need to have a Gmail account for it. + +[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/a41a8075608abeaf99db685d7ef29cf6 "githalytics.com")](http://githalytics.com/candy-chat/candy) diff --git a/public/ext/candy/bower.json b/public/ext/candy/bower.json new file mode 100755 index 0000000..4819e4d --- /dev/null +++ b/public/ext/candy/bower.json @@ -0,0 +1,41 @@ +{ + "name": "candy", + "version": "2.2.0", + "homepage": "http://candy-chat.github.io/candy/", + "authors": [ + "Michael Weibel ", + "Patrick Stadler " + ], + "description": "Multi-user XMPP web client", + "main": [ + "candy.min.js" + ], + "keywords": [ + "xmpp", + "muc", + "multi-user", + "websocket", + "bosh", + "chat" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/candy-chat/candy.git" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "jquery": "~1.10.2", + "strophe": "1.1.3", + "strophejs-plugins": "benlangfeld/strophejs-plugins#30fb089457addc37e01d69c3536dee868a90a9ad", + "mustache": "0.3.0", + "jquery-i18n": "1.1.1", + "bootstrap": "~3.3.6" + } +} diff --git a/public/ext/candy/candy.bundle.js b/public/ext/candy/candy.bundle.js new file mode 100755 index 0000000..ac85d43 --- /dev/null +++ b/public/ext/candy/candy.bundle.js @@ -0,0 +1,6680 @@ +/** File: candy.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global jQuery */ +/** Class: Candy + * Candy base class for initalizing the view and the core + * + * Parameters: + * (Candy) self - itself + * (jQuery) $ - jQuery + */ +var Candy = function(self, $) { + /** Object: about + * About candy + * + * Contains: + * (String) name - Candy + * (Float) version - Candy version + */ + self.about = { + name: "Candy", + version: "2.2.0" + }; + /** Function: init + * Init view & core + * + * Parameters: + * (String) service - URL to the BOSH interface + * (Object) options - Options for candy + * + * Options: + * (Boolean) debug - Debug (Default: false) + * (Array|Boolean) autojoin - Autojoin these channels. When boolean true, do not autojoin, wait if the server sends something. + */ + self.init = function(service, options) { + if (!options.viewClass) { + options.viewClass = self.View; + } + options.viewClass.init($("#candy"), options.view); + self.Core.init(service, options.core); + }; + return self; +}(Candy || {}, jQuery); + +/** File: core.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, window, Strophe, jQuery */ +/** Class: Candy.Core + * Candy Chat Core + * + * Parameters: + * (Candy.Core) self - itself + * (Strophe) Strophe - Strophe JS + * (jQuery) $ - jQuery + */ +Candy.Core = function(self, Strophe, $) { + /** PrivateVariable: _connection + * Strophe connection + */ + var _connection = null, /** PrivateVariable: _service + * URL of BOSH service + */ + _service = null, /** PrivateVariable: _user + * Current user (me) + */ + _user = null, /** PrivateVariable: _roster + * Main roster of contacts + */ + _roster = null, /** PrivateVariable: _rooms + * Opened rooms, containing instances of Candy.Core.ChatRooms + */ + _rooms = {}, /** PrivateVariable: _anonymousConnection + * Set in when jidOrHost doesn't contain a @-char. + */ + _anonymousConnection = false, /** PrivateVariable: _status + * Current Strophe connection state + */ + _status, /** PrivateVariable: _options + * Config options + */ + _options = { + /** Boolean: autojoin + * If set to `true` try to get the bookmarks and autojoin the rooms (supported by ejabberd, Openfire). + * You may want to define an array of rooms to autojoin: `['room1@conference.host.tld', 'room2...]` (ejabberd, Openfire, ...) + */ + autojoin: undefined, + /** Boolean: disconnectWithoutTabs + * If you set to `false`, when you close all of the tabs, the service does not disconnect. + * Set to `true`, when you close all of the tabs, the service will disconnect. + */ + disconnectWithoutTabs: true, + /** String: conferenceDomain + * Holds the prefix for an XMPP chat server's conference subdomain. + * If not set, assumes no specific subdomain. + */ + conferenceDomain: undefined, + /** Boolean: debug + * Enable debug + */ + debug: false, + /** List: domains + * If non-null, causes login form to offer this + * pre-set list of domains to choose between when + * logging in. Any user-provided domain is discarded + * and the selected domain is appended. + * For each list item, only characters up to the first + * whitespace are used, so you can append extra + * information to each item if desired. + */ + domains: null, + /** Boolean: hideDomainList + * If true, the domain list defined above is suppressed. + * Without a selector displayed, the default domain + * (usually the first one listed) will be used as + * described above. Probably only makes sense with a + * single domain defined. + */ + hideDomainList: false, + /** Boolean: disableCoreNotifications + * If set to `true`, the built-in notifications (sounds and badges) are disabled. + * This is useful if you are using a plugin to handle notifications. + */ + disableCoreNotifications: false, + /** Boolean: disableWindowUnload + * Disable window unload handler which usually disconnects from XMPP + */ + disableWindowUnload: false, + /** Integer: presencePriority + * Default priority for presence messages in order to receive messages across different resources + */ + presencePriority: 1, + /** String: resource + * JID resource to use when connecting to the server. + * Specify `''` (an empty string) to request a random resource. + */ + resource: Candy.about.name, + /** Boolean: useParticipantRealJid + * If set true, will direct one-on-one chats to participant's real JID rather than their MUC jid + */ + useParticipantRealJid: false, + /** + * Roster version we claim to already have. Used when loading a cached roster. + * Defaults to null, indicating we don't have the roster. + */ + initialRosterVersion: null, + /** + * Initial roster items. Loaded from a cache, used to bootstrap displaying a roster prior to fetching updates. + */ + initialRosterItems: [] + }, /** PrivateFunction: _addNamespace + * Adds a namespace. + * + * Parameters: + * (String) name - namespace name (will become a constant living in Strophe.NS.*) + * (String) value - XML Namespace + */ + _addNamespace = function(name, value) { + Strophe.addNamespace(name, value); + }, /** PrivateFunction: _addNamespaces + * Adds namespaces needed by Candy. + */ + _addNamespaces = function() { + _addNamespace("PRIVATE", "jabber:iq:private"); + _addNamespace("BOOKMARKS", "storage:bookmarks"); + _addNamespace("PRIVACY", "jabber:iq:privacy"); + _addNamespace("DELAY", "urn:xmpp:delay"); + _addNamespace("JABBER_DELAY", "jabber:x:delay"); + _addNamespace("PUBSUB", "http://jabber.org/protocol/pubsub"); + _addNamespace("CARBONS", "urn:xmpp:carbons:2"); + }, _getEscapedJidFromJid = function(jid) { + var node = Strophe.getNodeFromJid(jid), domain = Strophe.getDomainFromJid(jid); + return node ? Strophe.escapeNode(node) + "@" + domain : domain; + }; + /** Function: init + * Initialize Core. + * + * Parameters: + * (String) service - URL of BOSH/Websocket service + * (Object) options - Options for candy + */ + self.init = function(service, options) { + _service = service; + // Apply options + $.extend(true, _options, options); + // Enable debug logging + if (_options.debug) { + if (typeof window.console !== undefined && typeof window.console.log !== undefined) { + // Strophe has a polyfill for bind which doesn't work in IE8. + if (Function.prototype.bind && Candy.Util.getIeVersion() > 8) { + self.log = Function.prototype.bind.call(console.log, console); + } else { + self.log = function() { + Function.prototype.apply.call(console.log, console, arguments); + }; + } + } + Strophe.log = function(level, message) { + var level_name, console_level; + switch (level) { + case Strophe.LogLevel.DEBUG: + level_name = "DEBUG"; + console_level = "log"; + break; + + case Strophe.LogLevel.INFO: + level_name = "INFO"; + console_level = "info"; + break; + + case Strophe.LogLevel.WARN: + level_name = "WARN"; + console_level = "info"; + break; + + case Strophe.LogLevel.ERROR: + level_name = "ERROR"; + console_level = "error"; + break; + + case Strophe.LogLevel.FATAL: + level_name = "FATAL"; + console_level = "error"; + break; + } + console[console_level]("[Strophe][" + level_name + "]: " + message); + }; + self.log("[Init] Debugging enabled"); + } + _addNamespaces(); + _roster = new Candy.Core.ChatRoster(); + // Connect to BOSH/Websocket service + _connection = new Strophe.Connection(_service); + _connection.rawInput = self.rawInput.bind(self); + _connection.rawOutput = self.rawOutput.bind(self); + // set caps node + _connection.caps.node = "https://candy-chat.github.io/candy/"; + // Window unload handler... works on all browsers but Opera. There is NO workaround. + // Opera clients getting disconnected 1-2 minutes delayed. + if (!_options.disableWindowUnload) { + window.onbeforeunload = self.onWindowUnload; + } + }; + /** Function: registerEventHandlers + * Adds listening handlers to the connection. + * + * Use with caution from outside of Candy. + */ + self.registerEventHandlers = function() { + self.addHandler(self.Event.Jabber.Version, Strophe.NS.VERSION, "iq"); + self.addHandler(self.Event.Jabber.Presence, null, "presence"); + self.addHandler(self.Event.Jabber.Message, null, "message"); + self.addHandler(self.Event.Jabber.Bookmarks, Strophe.NS.PRIVATE, "iq"); + self.addHandler(self.Event.Jabber.Room.Disco, Strophe.NS.DISCO_INFO, "iq", "result"); + self.addHandler(_connection.disco._onDiscoInfo.bind(_connection.disco), Strophe.NS.DISCO_INFO, "iq", "get"); + self.addHandler(_connection.disco._onDiscoItems.bind(_connection.disco), Strophe.NS.DISCO_ITEMS, "iq", "get"); + self.addHandler(_connection.caps._delegateCapabilities.bind(_connection.caps), Strophe.NS.CAPS); + }; + /** Function: connect + * Connect to the jabber host. + * + * There are four different procedures to login: + * connect('JID', 'password') - Connect a registered user + * connect('domain') - Connect anonymously to the domain. The user should receive a random JID. + * connect('domain', null, 'nick') - Connect anonymously to the domain. The user should receive a random JID but with a nick set. + * connect('JID') - Show login form and prompt for password. JID input is hidden. + * connect() - Show login form and prompt for JID and password. + * + * See: + * for attaching an already established session. + * + * Parameters: + * (String) jidOrHost - JID or Host + * (String) password - Password of the user + * (String) nick - Nick of the user. Set one if you want to anonymously connect but preset a nick. If jidOrHost is a domain + * and this param is not set, Candy will prompt for a nick. + */ + self.connect = function(jidOrHost, password, nick) { + // Reset before every connection attempt to make sure reconnections work after authfail, alltabsclosed, ... + _connection.reset(); + self.registerEventHandlers(); + /** Event: candy:core.before-connect + * Triggered before a connection attempt is made. + * + * Plugins should register their stanza handlers using this event + * to ensure that they are set. + * + * See also <#84 at https://github.com/candy-chat/candy/issues/84>. + * + * Parameters: + * (Strophe.Connection) conncetion - Strophe connection + */ + $(Candy).triggerHandler("candy:core.before-connect", { + connection: _connection + }); + _anonymousConnection = !_anonymousConnection ? jidOrHost && jidOrHost.indexOf("@") < 0 : true; + if (jidOrHost && password) { + // Respect the resource, if provided + var resource = Strophe.getResourceFromJid(jidOrHost); + if (resource) { + _options.resource = resource; + } + // authentication + _connection.connect(_getEscapedJidFromJid(jidOrHost) + "/" + _options.resource, password, Candy.Core.Event.Strophe.Connect); + if (nick) { + _user = new self.ChatUser(jidOrHost, nick); + } else { + _user = new self.ChatUser(jidOrHost, Strophe.getNodeFromJid(jidOrHost)); + } + } else if (jidOrHost && nick) { + // anonymous connect + _connection.connect(_getEscapedJidFromJid(jidOrHost) + "/" + _options.resource, null, Candy.Core.Event.Strophe.Connect); + _user = new self.ChatUser(null, nick); + } else if (jidOrHost) { + Candy.Core.Event.Login(jidOrHost); + } else { + // display login modal + Candy.Core.Event.Login(); + } + }; + /** Function: attach + * Attach an already binded & connected session to the server + * + * _See_ Strophe.Connection.attach + * + * Parameters: + * (String) jid - Jabber ID + * (Integer) sid - Session ID + * (Integer) rid - rid + */ + self.attach = function(jid, sid, rid, nick) { + if (nick) { + _user = new self.ChatUser(jid, nick); + } else { + _user = new self.ChatUser(jid, Strophe.getNodeFromJid(jid)); + } + // Reset before every connection attempt to make sure reconnections work after authfail, alltabsclosed, ... + _connection.reset(); + self.registerEventHandlers(); + _connection.attach(jid, sid, rid, Candy.Core.Event.Strophe.Connect); + }; + /** Function: disconnect + * Leave all rooms and disconnect + */ + self.disconnect = function() { + if (_connection.connected) { + _connection.disconnect(); + } + }; + /** Function: addHandler + * Wrapper for Strophe.Connection.addHandler() to add a stanza handler for the connection. + * + * Parameters: + * (Function) handler - The user callback. + * (String) ns - The namespace to match. + * (String) name - The stanza name to match. + * (String) type - The stanza type attribute to match. + * (String) id - The stanza id attribute to match. + * (String) from - The stanza from attribute to match. + * (String) options - The handler options + * + * Returns: + * A reference to the handler that can be used to remove it. + */ + self.addHandler = function(handler, ns, name, type, id, from, options) { + return _connection.addHandler(handler, ns, name, type, id, from, options); + }; + /** Function: getRoster + * Gets main roster + * + * Returns: + * Instance of Candy.Core.ChatRoster + */ + self.getRoster = function() { + return _roster; + }; + /** Function: getUser + * Gets current user + * + * Returns: + * Instance of Candy.Core.ChatUser + */ + self.getUser = function() { + return _user; + }; + /** Function: setUser + * Set current user. Needed when anonymous login is used, as jid gets retrieved later. + * + * Parameters: + * (Candy.Core.ChatUser) user - User instance + */ + self.setUser = function(user) { + _user = user; + }; + /** Function: getConnection + * Gets Strophe connection + * + * Returns: + * Instance of Strophe.Connection + */ + self.getConnection = function() { + return _connection; + }; + /** Function: removeRoom + * Removes a room from the rooms list + * + * Parameters: + * (String) roomJid - roomJid + */ + self.removeRoom = function(roomJid) { + delete _rooms[roomJid]; + }; + /** Function: getRooms + * Gets all joined rooms + * + * Returns: + * Object containing instances of Candy.Core.ChatRoom + */ + self.getRooms = function() { + return _rooms; + }; + /** Function: getStropheStatus + * Get the status set by Strophe. + * + * Returns: + * (Strophe.Status.*) - one of Strophe's statuses + */ + self.getStropheStatus = function() { + return _status; + }; + /** Function: setStropheStatus + * Set the strophe status + * + * Called by: + * Candy.Core.Event.Strophe.Connect + * + * Parameters: + * (Strophe.Status.*) status - Strophe's status + */ + self.setStropheStatus = function(status) { + _status = status; + }; + /** Function: isAnonymousConnection + * Returns true if was first called with a domain instead of a jid as the first param. + * + * Returns: + * (Boolean) + */ + self.isAnonymousConnection = function() { + return _anonymousConnection; + }; + /** Function: getOptions + * Gets options + * + * Returns: + * Object + */ + self.getOptions = function() { + return _options; + }; + /** Function: getRoom + * Gets a specific room + * + * Parameters: + * (String) roomJid - JID of the room + * + * Returns: + * If the room is joined, instance of Candy.Core.ChatRoom, otherwise null. + */ + self.getRoom = function(roomJid) { + if (_rooms[roomJid]) { + return _rooms[roomJid]; + } + return null; + }; + /** Function: onWindowUnload + * window.onbeforeunload event which disconnects the client from the Jabber server. + */ + self.onWindowUnload = function() { + // Enable synchronous requests because Safari doesn't send asynchronous requests within unbeforeunload events. + // Only works properly when following patch is applied to strophejs: https://github.com/metajack/strophejs/issues/16/#issuecomment-600266 + _connection.options.sync = true; + self.disconnect(); + _connection.flush(); + }; + /** Function: rawInput + * (Overridden from Strophe.Connection.rawInput) + * + * Logs all raw input if debug is set to true. + */ + self.rawInput = function(data) { + this.log("RECV: " + data); + }; + /** Function rawOutput + * (Overridden from Strophe.Connection.rawOutput) + * + * Logs all raw output if debug is set to true. + */ + self.rawOutput = function(data) { + this.log("SENT: " + data); + }; + /** Function: log + * Overridden to do something useful if debug is set to true. + * + * See: Candy.Core#init + */ + self.log = function() {}; + /** Function: warn + * Print a message to the browser's "info" log + * Enabled regardless of debug mode + */ + self.warn = function() { + Function.prototype.apply.call(console.warn, console, arguments); + }; + /** Function: error + * Print a message to the browser's "error" log + * Enabled regardless of debug mode + */ + self.error = function() { + Function.prototype.apply.call(console.error, console, arguments); + }; + return self; +}(Candy.Core || {}, Strophe, jQuery); + +/** File: view.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global jQuery, Candy, window, Mustache, document */ +/** Class: Candy.View + * The Candy View Class + * + * Parameters: + * (Candy.View) self - itself + * (jQuery) $ - jQuery + */ +Candy.View = function(self, $) { + /** PrivateObject: _current + * Object containing current container & roomJid which the client sees. + */ + var _current = { + container: null, + roomJid: null + }, /** PrivateObject: _options + * + * Options: + * (String) language - language to use + * (String) assets - path to assets (res) directory (with trailing slash) + * (Object) messages - limit: clean up message pane when n is reached / remove: remove n messages after limit has been reached + * (Object) crop - crop if longer than defined: message.nickname=15, message.body=1000, message.url=undefined (not cropped), roster.nickname=15 + * (Bool) enableXHTML - [default: false] enables XHTML messages sending & displaying + */ + _options = { + language: "en", + assets: "res/", + messages: { + limit: 2e3, + remove: 500 + }, + crop: { + message: { + nickname: 15, + body: 1e3, + url: undefined + }, + roster: { + nickname: 15 + } + }, + enableXHTML: false + }, /** PrivateFunction: _setupTranslation + * Set dictionary using jQuery.i18n plugin. + * + * See: view/translation.js + * See: libs/jquery-i18n/jquery.i18n.js + * + * Parameters: + * (String) language - Language identifier + */ + _setupTranslation = function(language) { + $.i18n.load(self.Translation[language]); + }, /** PrivateFunction: _registerObservers + * Register observers. Candy core will now notify the View on changes. + */ + _registerObservers = function() { + $(Candy).on("candy:core.chat.connection", self.Observer.Chat.Connection); + $(Candy).on("candy:core.chat.message", self.Observer.Chat.Message); + $(Candy).on("candy:core.login", self.Observer.Login); + $(Candy).on("candy:core.autojoin-missing", self.Observer.AutojoinMissing); + $(Candy).on("candy:core.presence", self.Observer.Presence.update); + $(Candy).on("candy:core.presence.leave", self.Observer.Presence.update); + $(Candy).on("candy:core.presence.room", self.Observer.Presence.update); + $(Candy).on("candy:core.presence.error", self.Observer.PresenceError); + $(Candy).on("candy:core.message", self.Observer.Message); + }, /** PrivateFunction: _registerWindowHandlers + * Register window focus / blur / resize handlers. + * + * jQuery.focus()/.blur() <= 1.5.1 do not work for IE < 9. Fortunately onfocusin/onfocusout will work for them. + */ + _registerWindowHandlers = function() { + if (Candy.Util.getIeVersion() < 9) { + $(document).focusin(Candy.View.Pane.Window.onFocus).focusout(Candy.View.Pane.Window.onBlur); + } else { + $(window).focus(Candy.View.Pane.Window.onFocus).blur(Candy.View.Pane.Window.onBlur); + } + $(window).resize(Candy.View.Pane.Chat.fitTabs); + }, /** PrivateFunction: _initToolbar + * Initialize toolbar. + */ + _initToolbar = function() { + self.Pane.Chat.Toolbar.init(); + }, /** PrivateFunction: _delegateTooltips + * Delegate mouseenter on tooltipified element to . + */ + _delegateTooltips = function() { + $("body").delegate("li[data-tooltip]", "mouseenter", Candy.View.Pane.Chat.Tooltip.show); + }; + /** Function: init + * Initialize chat view (setup DOM, register handlers & observers) + * + * Parameters: + * (jQuery.element) container - Container element of the whole chat view + * (Object) options - Options: see _options field (value passed here gets extended by the default value in _options field) + */ + self.init = function(container, options) { + // #216 + // Rename `resources` to `assets` but prevent installations from failing + // after upgrade + if (options.resources) { + options.assets = options.resources; + } + delete options.resources; + $.extend(true, _options, options); + _setupTranslation(_options.language); + // Set path to emoticons + Candy.Util.Parser.setEmoticonPath(this.getOptions().assets + "img/emoticons/"); + // Start DOMination... + _current.container = container; + _current.container.html(Mustache.to_html(Candy.View.Template.Chat.pane, { + tooltipEmoticons: $.i18n._("tooltipEmoticons"), + tooltipSound: $.i18n._("tooltipSound"), + tooltipAutoscroll: $.i18n._("tooltipAutoscroll"), + tooltipStatusmessage: $.i18n._("tooltipStatusmessage"), + tooltipAdministration: $.i18n._("tooltipAdministration"), + tooltipUsercount: $.i18n._("tooltipUsercount"), + assetsPath: this.getOptions().assets + }, { + tabs: Candy.View.Template.Chat.tabs, + mobile: Candy.View.Template.Chat.mobileIcon, + rooms: Candy.View.Template.Chat.rooms, + modal: Candy.View.Template.Chat.modal, + toolbar: Candy.View.Template.Chat.toolbar + })); + // ... and let the elements dance. + _registerWindowHandlers(); + _initToolbar(); + _registerObservers(); + _delegateTooltips(); + }; + /** Function: getCurrent + * Get current container & roomJid in an object. + * + * Returns: + * Object containing container & roomJid + */ + self.getCurrent = function() { + return _current; + }; + /** Function: getOptions + * Gets options + * + * Returns: + * Object + */ + self.getOptions = function() { + return _options; + }; + return self; +}(Candy.View || {}, jQuery); + +/** File: util.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, MD5, Strophe, document, escape, jQuery */ +/** Class: Candy.Util + * Candy utils + * + * Parameters: + * (Candy.Util) self - itself + * (jQuery) $ - jQuery + */ +Candy.Util = function(self, $) { + /** Function: jidToId + * Translates a jid to a MD5-Id + * + * Parameters: + * (String) jid - Jid + * + * Returns: + * MD5-ified jid + */ + self.jidToId = function(jid) { + return MD5.hexdigest(jid); + }; + /** Function: escapeJid + * Escapes a jid + * + * See: + * XEP-0106 + * + * Parameters: + * (String) jid - Jid + * + * Returns: + * (String) - escaped jid + */ + self.escapeJid = function(jid) { + var node = Strophe.escapeNode(Strophe.getNodeFromJid(jid)), domain = Strophe.getDomainFromJid(jid), resource = Strophe.getResourceFromJid(jid); + jid = node + "@" + domain; + if (resource) { + jid += "/" + resource; + } + return jid; + }; + /** Function: unescapeJid + * Unescapes a jid (node & resource get unescaped) + * + * See: + * XEP-0106 + * + * Parameters: + * (String) jid - Jid + * + * Returns: + * (String) - unescaped Jid + */ + self.unescapeJid = function(jid) { + var node = Strophe.unescapeNode(Strophe.getNodeFromJid(jid)), domain = Strophe.getDomainFromJid(jid), resource = Strophe.getResourceFromJid(jid); + jid = node + "@" + domain; + if (resource) { + jid += "/" + resource; + } + return jid; + }; + /** Function: crop + * Crop a string with the specified length + * + * Parameters: + * (String) str - String to crop + * (Integer) len - Max length + */ + self.crop = function(str, len) { + if (str.length > len) { + str = str.substr(0, len - 3) + "..."; + } + return str; + }; + /** Function: parseAndCropXhtml + * Parses the XHTML and applies various Candy related filters to it. + * + * - Ensures it contains only valid XHTML + * - Crops text to a max length + * - Parses the text in order to display html + * + * Parameters: + * (String) str - String containing XHTML + * (Integer) len - Max text length + */ + self.parseAndCropXhtml = function(str, len) { + return $("
").append(self.createHtml($(str).get(0), len)).html(); + }; + /** Function: setCookie + * Sets a new cookie + * + * Parameters: + * (String) name - cookie name + * (String) value - Value + * (Integer) lifetime_days - Lifetime in days + */ + self.setCookie = function(name, value, lifetime_days) { + var exp = new Date(); + exp.setDate(new Date().getDate() + lifetime_days); + document.cookie = name + "=" + value + ";expires=" + exp.toUTCString() + ";path=/"; + }; + /** Function: cookieExists + * Tests if a cookie with the given name exists + * + * Parameters: + * (String) name - Cookie name + * + * Returns: + * (Boolean) - true/false + */ + self.cookieExists = function(name) { + return document.cookie.indexOf(name) > -1; + }; + /** Function: getCookie + * Returns the cookie value if there's one with this name, otherwise returns undefined + * + * Parameters: + * (String) name - Cookie name + * + * Returns: + * Cookie value or undefined + */ + self.getCookie = function(name) { + if (document.cookie) { + var regex = new RegExp(escape(name) + "=([^;]*)", "gm"), matches = regex.exec(document.cookie); + if (matches) { + return matches[1]; + } + } + }; + /** Function: deleteCookie + * Deletes a cookie with the given name + * + * Parameters: + * (String) name - cookie name + */ + self.deleteCookie = function(name) { + document.cookie = name + "=;expires=Thu, 01-Jan-70 00:00:01 GMT;path=/"; + }; + /** Function: getPosLeftAccordingToWindowBounds + * Fetches the window width and element width + * and checks if specified position + element width is bigger + * than the window width. + * + * If this evaluates to true, the position gets substracted by the element width. + * + * Parameters: + * (jQuery.Element) elem - Element to position + * (Integer) pos - Position left + * + * Returns: + * Object containing `px` (calculated position in pixel) and `alignment` (alignment of the element in relation to pos, either 'left' or 'right') + */ + self.getPosLeftAccordingToWindowBounds = function(elem, pos) { + var windowWidth = $(document).width(), elemWidth = elem.outerWidth(), marginDiff = elemWidth - elem.outerWidth(true), backgroundPositionAlignment = "left"; + if (pos + elemWidth >= windowWidth) { + pos -= elemWidth - marginDiff; + backgroundPositionAlignment = "right"; + } + return { + px: pos, + backgroundPositionAlignment: backgroundPositionAlignment + }; + }; + /** Function: getPosTopAccordingToWindowBounds + * Fetches the window height and element height + * and checks if specified position + element height is bigger + * than the window height. + * + * If this evaluates to true, the position gets substracted by the element height. + * + * Parameters: + * (jQuery.Element) elem - Element to position + * (Integer) pos - Position top + * + * Returns: + * Object containing `px` (calculated position in pixel) and `alignment` (alignment of the element in relation to pos, either 'top' or 'bottom') + */ + self.getPosTopAccordingToWindowBounds = function(elem, pos) { + var windowHeight = $(document).height(), elemHeight = elem.outerHeight(), marginDiff = elemHeight - elem.outerHeight(true), backgroundPositionAlignment = "top"; + if (pos + elemHeight >= windowHeight) { + pos -= elemHeight - marginDiff; + backgroundPositionAlignment = "bottom"; + } + return { + px: pos, + backgroundPositionAlignment: backgroundPositionAlignment + }; + }; + /** Function: localizedTime + * Localizes ISO-8610 Date with the time/dateformat specified in the translation. + * + * See: libs/dateformat/dateFormat.js + * See: src/view/translation.js + * See: jquery-i18n/jquery.i18n.js + * + * Parameters: + * (String) dateTime - ISO-8610 Datetime + * + * Returns: + * If current date is equal to the date supplied, format with timeFormat, otherwise with dateFormat + */ + self.localizedTime = function(dateTime) { + if (dateTime === undefined) { + return undefined; + } + // See if we were passed a Date object + var date; + if (dateTime.toDateString) { + date = dateTime; + } else { + date = self.iso8601toDate(dateTime); + } + if (date.toDateString() === new Date().toDateString()) { + return date.format($.i18n._("timeFormat")); + } else { + return date.format($.i18n._("dateFormat")); + } + }; + /** Function: iso8610toDate + * Parses a ISO-8610 Date to a Date-Object. + * + * Uses a fallback if the client's browser doesn't support it. + * + * Quote: + * ECMAScript revision 5 adds native support for ISO-8601 dates in the Date.parse method, + * but many browsers currently on the market (Safari 4, Chrome 4, IE 6-8) do not support it. + * + * Credits: + * + * + * Parameters: + * (String) date - ISO-8610 Date + * + * Returns: + * Date-Object + */ + self.iso8601toDate = function(date) { + var timestamp = Date.parse(date); + if (isNaN(timestamp)) { + var struct = /^(\d{4}|[+\-]\d{6})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?))?/.exec(date); + if (struct) { + var minutesOffset = 0; + if (struct[8] !== "Z") { + minutesOffset = +struct[10] * 60 + +struct[11]; + if (struct[9] === "+") { + minutesOffset = -minutesOffset; + } + } + minutesOffset -= new Date().getTimezoneOffset(); + return new Date(+struct[1], +struct[2] - 1, +struct[3], +struct[4], +struct[5] + minutesOffset, +struct[6], struct[7] ? +struct[7].substr(0, 3) : 0); + } else { + // XEP-0091 date + timestamp = Date.parse(date.replace(/^(\d{4})(\d{2})(\d{2})/, "$1-$2-$3") + "Z"); + } + } + return new Date(timestamp); + }; + /** Function: isEmptyObject + * IE7 doesn't work with jQuery.isEmptyObject (<=1.5.1), workaround. + * + * Parameters: + * (Object) obj - the object to test for + * + * Returns: + * Boolean true or false. + */ + self.isEmptyObject = function(obj) { + var prop; + for (prop in obj) { + if (obj.hasOwnProperty(prop)) { + return false; + } + } + return true; + }; + /** Function: forceRedraw + * Fix IE7 not redrawing under some circumstances. + * + * Parameters: + * (jQuery.element) elem - jQuery element to redraw + */ + self.forceRedraw = function(elem) { + elem.css({ + display: "none" + }); + setTimeout(function() { + this.css({ + display: "block" + }); + }.bind(elem), 1); + }; + /** PrivateVariable: ie + * Checks for IE version + * + * From: http://stackoverflow.com/a/5574871/315242 + */ + var ie = function() { + var undef, v = 3, div = document.createElement("div"), all = div.getElementsByTagName("i"); + while (// adds innerhtml and continues as long as all[0] is truthy + div.innerHTML = "", all[0]) {} + return v > 4 ? v : undef; + }(); + /** Function: getIeVersion + * Returns local variable `ie` which you can use to detect which IE version + * is available. + * + * Use e.g. like this: if(Candy.Util.getIeVersion() < 9) alert('kaboom'); + */ + self.getIeVersion = function() { + return ie; + }; + /** Function: isMobile + * Checks to see if we're on a mobile device. + */ + self.isMobile = function() { + var check = false; + (function(a) { + if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|android|ipad|playbook|silk|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) { + check = true; + } + })(navigator.userAgent || navigator.vendor || window.opera); + return check; + }; + /** Class: Candy.Util.Parser + * Parser for emoticons, links and also supports escaping. + */ + self.Parser = { + /** Function: jid + * Parse a JID into an object with each element + * + * Parameters: + * (String) jid - The string representation of a JID + */ + jid: function(jid) { + var r = /^(([^@]+)@)?([^\/]+)(\/(.*))?$/i, a = jid.match(r); + if (!a) { + throw "not a valid jid (" + jid + ")"; + } + return { + node: a[2], + domain: a[3], + resource: a[4] + }; + }, + /** PrivateVariable: _emoticonPath + * Path to emoticons. + * + * Use setEmoticonPath() to change it + */ + _emoticonPath: "", + /** Function: setEmoticonPath + * Set emoticons location. + * + * Parameters: + * (String) path - location of emoticons with trailing slash + */ + setEmoticonPath: function(path) { + this._emoticonPath = path; + }, + /** Array: emoticons + * Array containing emoticons to be replaced by their images. + * + * Can be overridden/extended. + */ + emoticons: [ { + plain: ":)", + regex: /((\s):-?\)|:-?\)(\s|$))/gm, + image: "Smiling.png" + }, { + plain: ";)", + regex: /((\s);-?\)|;-?\)(\s|$))/gm, + image: "Winking.png" + }, { + plain: ":D", + regex: /((\s):-?D|:-?D(\s|$))/gm, + image: "Grinning.png" + }, { + plain: ";D", + regex: /((\s);-?D|;-?D(\s|$))/gm, + image: "Grinning_Winking.png" + }, { + plain: ":(", + regex: /((\s):-?\(|:-?\((\s|$))/gm, + image: "Unhappy.png" + }, { + plain: "^^", + regex: /((\s)\^\^|\^\^(\s|$))/gm, + image: "Happy_3.png" + }, { + plain: ":P", + regex: /((\s):-?P|:-?P(\s|$))/gim, + image: "Tongue_Out.png" + }, { + plain: ";P", + regex: /((\s);-?P|;-?P(\s|$))/gim, + image: "Tongue_Out_Winking.png" + }, { + plain: ":S", + regex: /((\s):-?S|:-?S(\s|$))/gim, + image: "Confused.png" + }, { + plain: ":/", + regex: /((\s):-?\/|:-?\/(\s|$))/gm, + image: "Uncertain.png" + }, { + plain: "8)", + regex: /((\s)8-?\)|8-?\)(\s|$))/gm, + image: "Sunglasses.png" + }, { + plain: "$)", + regex: /((\s)\$-?\)|\$-?\)(\s|$))/gm, + image: "Greedy.png" + }, { + plain: "oO", + regex: /((\s)oO|oO(\s|$))/gm, + image: "Huh.png" + }, { + plain: ":x", + regex: /((\s):x|:x(\s|$))/gm, + image: "Lips_Sealed.png" + }, { + plain: ":666:", + regex: /((\s):666:|:666:(\s|$))/gm, + image: "Devil.png" + }, { + plain: "<3", + regex: /((\s)<3|<3(\s|$))/gm, + image: "Heart.png" + } ], + /** Function: emotify + * Replaces text-emoticons with their image equivalent. + * + * Parameters: + * (String) text - Text to emotify + * + * Returns: + * Emotified text + */ + emotify: function(text) { + var i; + for (i = this.emoticons.length - 1; i >= 0; i--) { + text = text.replace(this.emoticons[i].regex, '$2$1$3'); + } + return text; + }, + /** Function: linkify + * Replaces URLs with a HTML-link. + * big regex adapted from https://gist.github.com/dperini/729294 - Diego Perini, MIT license. + * + * Parameters: + * (String) text - Text to linkify + * + * Returns: + * Linkified text + */ + linkify: function(text) { + text = text.replace(/(^|[^\/])(www\.[^\.]+\.[\S]+(\b|$))/gi, "$1http://$2"); + return text.replace(/(\b(?:(?:https?|ftp|file):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:1\d\d|2[01]\d|22[0-3]|[1-9]\d?)(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?)/gi, function(matched, url) { + return '' + self.crop(url, Candy.View.getOptions().crop.message.url) + ""; + }); + }, + /** Function: escape + * Escapes a text using a jQuery function (like htmlspecialchars in PHP) + * + * Parameters: + * (String) text - Text to escape + * + * Returns: + * Escaped text + */ + escape: function(text) { + return $("
").text(text).html(); + }, + /** Function: nl2br + * replaces newline characters with a
to make multi line messages look nice + * + * Parameters: + * (String) text - Text to process + * + * Returns: + * Processed text + */ + nl2br: function(text) { + return text.replace(/\r\n|\r|\n/g, "
"); + }, + /** Function: all + * Does everything of the parser: escaping, linkifying and emotifying. + * + * Parameters: + * (String) text - Text to parse + * + * Returns: + * (String) Parsed text + */ + all: function(text) { + if (text) { + text = this.escape(text); + text = this.linkify(text); + text = this.emotify(text); + text = this.nl2br(text); + } + return text; + } + }; + /** Function: createHtml + * Copy an HTML DOM element into an XML DOM. + * + * This function copies a DOM element and all its descendants and returns + * the new copy. + * + * It's a function copied & adapted from [Strophe.js core.js](https://github.com/strophe/strophejs/blob/master/src/core.js). + * + * Parameters: + * (HTMLElement) elem - A DOM element. + * (Integer) maxLength - Max length of text + * (Integer) currentLength - Current accumulated text length + * + * Returns: + * A new, copied DOM element tree. + */ + self.createHtml = function(elem, maxLength, currentLength) { + /* jshint -W073 */ + currentLength = currentLength || 0; + var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue; + if (elem.nodeType === Strophe.ElementType.NORMAL) { + tag = elem.nodeName.toLowerCase(); + if (Strophe.XHTML.validTag(tag)) { + try { + el = $("<" + tag + "/>"); + for (i = 0; i < Strophe.XHTML.attributes[tag].length; i++) { + attribute = Strophe.XHTML.attributes[tag][i]; + value = elem.getAttribute(attribute); + if (typeof value === "undefined" || value === null || value === "" || value === false || value === 0) { + continue; + } + if (attribute === "style" && typeof value === "object") { + if (typeof value.cssText !== "undefined") { + value = value.cssText; + } + } + // filter out invalid css styles + if (attribute === "style") { + css = []; + cssAttrs = value.split(";"); + for (j = 0; j < cssAttrs.length; j++) { + attr = cssAttrs[j].split(":"); + cssName = attr[0].replace(/^\s*/, "").replace(/\s*$/, "").toLowerCase(); + if (Strophe.XHTML.validCSS(cssName)) { + cssValue = attr[1].replace(/^\s*/, "").replace(/\s*$/, ""); + css.push(cssName + ": " + cssValue); + } + } + if (css.length > 0) { + value = css.join("; "); + el.attr(attribute, value); + } + } else { + el.attr(attribute, value); + } + } + for (i = 0; i < elem.childNodes.length; i++) { + el.append(self.createHtml(elem.childNodes[i], maxLength, currentLength)); + } + } catch (e) { + // invalid elements + Candy.Core.warn("[Util:createHtml] Error while parsing XHTML:", e); + el = Strophe.xmlTextNode(""); + } + } else { + el = Strophe.xmlGenerator().createDocumentFragment(); + for (i = 0; i < elem.childNodes.length; i++) { + el.appendChild(self.createHtml(elem.childNodes[i], maxLength, currentLength)); + } + } + } else if (elem.nodeType === Strophe.ElementType.FRAGMENT) { + el = Strophe.xmlGenerator().createDocumentFragment(); + for (i = 0; i < elem.childNodes.length; i++) { + el.appendChild(self.createHtml(elem.childNodes[i], maxLength, currentLength)); + } + } else if (elem.nodeType === Strophe.ElementType.TEXT) { + var text = elem.nodeValue; + currentLength += text.length; + if (maxLength && currentLength > maxLength) { + text = text.substring(0, maxLength); + } + text = Candy.Util.Parser.all(text); + el = $.parseHTML(text); + } + return el; + }; + return self; +}(Candy.Util || {}, jQuery); + +/** File: action.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, $iq, navigator, Candy, $pres, Strophe, jQuery, $msg */ +/** Class: Candy.Core.Action + * Chat Actions (basicly a abstraction of Jabber commands) + * + * Parameters: + * (Candy.Core.Action) self - itself + * (Strophe) Strophe - Strophe + * (jQuery) $ - jQuery + */ +Candy.Core.Action = function(self, Strophe, $) { + /** Class: Candy.Core.Action.Jabber + * Jabber actions + */ + self.Jabber = { + /** Function: Version + * Replies to a version request + * + * Parameters: + * (jQuery.element) msg - jQuery element + */ + Version: function(msg) { + Candy.Core.getConnection().sendIQ($iq({ + type: "result", + to: Candy.Util.escapeJid(msg.attr("from")), + from: Candy.Util.escapeJid(msg.attr("to")), + id: msg.attr("id") + }).c("query", { + xmlns: Strophe.NS.VERSION + }).c("name", Candy.about.name).up().c("version", Candy.about.version).up().c("os", navigator.userAgent)); + }, + /** Function: SetNickname + * Sets the supplied nickname for all rooms (if parameter "room" is not specified) or + * sets it only for the specified rooms + * + * Parameters: + * (String) nickname - New nickname + * (Array) rooms - Rooms + */ + SetNickname: function(nickname, rooms) { + rooms = rooms instanceof Array ? rooms : Candy.Core.getRooms(); + var roomNick, presence, conn = Candy.Core.getConnection(); + $.each(rooms, function(roomJid) { + roomNick = Candy.Util.escapeJid(roomJid + "/" + nickname); + presence = $pres({ + to: roomNick, + from: conn.jid, + id: "pres:" + conn.getUniqueId() + }); + Candy.Core.getConnection().send(presence); + }); + }, + /** Function: Roster + * Sends a request for a roster + */ + Roster: function() { + var roster = Candy.Core.getConnection().roster, options = Candy.Core.getOptions(); + roster.registerCallback(Candy.Core.Event.Jabber.RosterPush); + $.each(options.initialRosterItems, function(i, item) { + // Blank out resources because their cached value is not relevant + item.resources = {}; + }); + roster.get(Candy.Core.Event.Jabber.RosterFetch, options.initialRosterVersion, options.initialRosterItems); + // Bootstrap our roster with cached items + Candy.Core.Event.Jabber.RosterLoad(roster.items); + }, + /** Function: Presence + * Sends a request for presence + * + * Parameters: + * (Object) attr - Optional attributes + * (Strophe.Builder) el - Optional element to include in presence stanza + */ + Presence: function(attr, el) { + var conn = Candy.Core.getConnection(); + attr = attr || {}; + if (!attr.id) { + attr.id = "pres:" + conn.getUniqueId(); + } + var pres = $pres(attr).c("priority").t(Candy.Core.getOptions().presencePriority.toString()).up().c("c", conn.caps.generateCapsAttrs()).up(); + if (el) { + pres.node.appendChild(el.node); + } + conn.send(pres.tree()); + }, + /** Function: Services + * Sends a request for disco items + */ + Services: function() { + Candy.Core.getConnection().sendIQ($iq({ + type: "get", + xmlns: Strophe.NS.CLIENT + }).c("query", { + xmlns: Strophe.NS.DISCO_ITEMS + }).tree()); + }, + /** Function: Autojoin + * When Candy.Core.getOptions().autojoin is true, request autojoin bookmarks (OpenFire) + * + * Otherwise, if Candy.Core.getOptions().autojoin is an array, join each channel specified. + * Channel can be in jid:password format to pass room password if needed. + + * Triggers: + * candy:core.autojoin-missing in case no autojoin info has been found + */ + Autojoin: function() { + // Request bookmarks + if (Candy.Core.getOptions().autojoin === true) { + Candy.Core.getConnection().sendIQ($iq({ + type: "get", + xmlns: Strophe.NS.CLIENT + }).c("query", { + xmlns: Strophe.NS.PRIVATE + }).c("storage", { + xmlns: Strophe.NS.BOOKMARKS + }).tree()); + var pubsubBookmarkRequest = Candy.Core.getConnection().getUniqueId("pubsub"); + Candy.Core.addHandler(Candy.Core.Event.Jabber.Bookmarks, Strophe.NS.PUBSUB, "iq", "result", pubsubBookmarkRequest); + Candy.Core.getConnection().sendIQ($iq({ + type: "get", + id: pubsubBookmarkRequest + }).c("pubsub", { + xmlns: Strophe.NS.PUBSUB + }).c("items", { + node: Strophe.NS.BOOKMARKS + }).tree()); + } else if ($.isArray(Candy.Core.getOptions().autojoin)) { + $.each(Candy.Core.getOptions().autojoin, function() { + self.Jabber.Room.Join.apply(null, this.valueOf().split(":", 2)); + }); + } else { + /** Event: candy:core.autojoin-missing + * Triggered when no autojoin information has been found + */ + $(Candy).triggerHandler("candy:core.autojoin-missing"); + } + }, + /** Function: EnableCarbons + * Enable message carbons (XEP-0280) + */ + EnableCarbons: function() { + Candy.Core.getConnection().sendIQ($iq({ + type: "set" + }).c("enable", { + xmlns: Strophe.NS.CARBONS + }).tree()); + }, + /** Function: ResetIgnoreList + * Create new ignore privacy list (and reset the previous one, if it exists). + */ + ResetIgnoreList: function() { + Candy.Core.getConnection().sendIQ($iq({ + type: "set", + from: Candy.Core.getUser().getEscapedJid() + }).c("query", { + xmlns: Strophe.NS.PRIVACY + }).c("list", { + name: "ignore" + }).c("item", { + action: "allow", + order: "0" + }).tree()); + }, + /** Function: RemoveIgnoreList + * Remove an existing ignore list. + */ + RemoveIgnoreList: function() { + Candy.Core.getConnection().sendIQ($iq({ + type: "set", + from: Candy.Core.getUser().getEscapedJid() + }).c("query", { + xmlns: Strophe.NS.PRIVACY + }).c("list", { + name: "ignore" + }).tree()); + }, + /** Function: GetIgnoreList + * Get existing ignore privacy list when connecting. + */ + GetIgnoreList: function() { + var iq = $iq({ + type: "get", + from: Candy.Core.getUser().getEscapedJid() + }).c("query", { + xmlns: Strophe.NS.PRIVACY + }).c("list", { + name: "ignore" + }).tree(); + var iqId = Candy.Core.getConnection().sendIQ(iq); + // add handler (<#200 at https://github.com/candy-chat/candy/issues/200>) + Candy.Core.addHandler(Candy.Core.Event.Jabber.PrivacyList, null, "iq", null, iqId); + }, + /** Function: SetIgnoreListActive + * Set ignore privacy list active + */ + SetIgnoreListActive: function() { + Candy.Core.getConnection().sendIQ($iq({ + type: "set", + from: Candy.Core.getUser().getEscapedJid() + }).c("query", { + xmlns: Strophe.NS.PRIVACY + }).c("active", { + name: "ignore" + }).tree()); + }, + /** Function: GetJidIfAnonymous + * On anonymous login, initially we don't know the jid and as a result, Candy.Core._user doesn't have a jid. + * Check if user doesn't have a jid and get it if necessary from the connection. + */ + GetJidIfAnonymous: function() { + if (!Candy.Core.getUser().getJid()) { + Candy.Core.log("[Jabber] Anonymous login"); + Candy.Core.getUser().data.jid = Candy.Core.getConnection().jid; + } + }, + /** Class: Candy.Core.Action.Jabber.Room + * Room-specific commands + */ + Room: { + /** Function: Join + * Requests disco of specified room and joins afterwards. + * + * TODO: + * maybe we should wait for disco and later join the room? + * but what if we send disco but don't want/can join the room + * + * Parameters: + * (String) roomJid - Room to join + * (String) password - [optional] Password for the room + */ + Join: function(roomJid, password) { + self.Jabber.Room.Disco(roomJid); + roomJid = Candy.Util.escapeJid(roomJid); + var conn = Candy.Core.getConnection(), roomNick = roomJid + "/" + Candy.Core.getUser().getNick(), pres = $pres({ + to: roomNick, + id: "pres:" + conn.getUniqueId() + }).c("x", { + xmlns: Strophe.NS.MUC + }); + if (password) { + pres.c("password").t(password); + } + pres.up().c("c", conn.caps.generateCapsAttrs()); + conn.send(pres.tree()); + }, + /** Function: Leave + * Leaves a room. + * + * Parameters: + * (String) roomJid - Room to leave + */ + Leave: function(roomJid) { + var user = Candy.Core.getRoom(roomJid).getUser(); + if (user) { + Candy.Core.getConnection().muc.leave(roomJid, user.getNick(), function() {}); + } + }, + /** Function: Disco + * Requests . + * + * Parameters: + * (String) roomJid - Room to get info for + */ + Disco: function(roomJid) { + Candy.Core.getConnection().sendIQ($iq({ + type: "get", + from: Candy.Core.getUser().getEscapedJid(), + to: Candy.Util.escapeJid(roomJid) + }).c("query", { + xmlns: Strophe.NS.DISCO_INFO + }).tree()); + }, + /** Function: Message + * Send message + * + * Parameters: + * (String) roomJid - Room to which send the message into + * (String) msg - Message + * (String) type - "groupchat" or "chat" ("chat" is for private messages) + * (String) xhtmlMsg - XHTML formatted message [optional] + * + * Returns: + * (Boolean) - true if message is not empty after trimming, false otherwise. + */ + Message: function(roomJid, msg, type, xhtmlMsg) { + // Trim message + msg = $.trim(msg); + if (msg === "") { + return false; + } + var nick = null; + if (type === "chat") { + nick = Strophe.getResourceFromJid(roomJid); + roomJid = Strophe.getBareJidFromJid(roomJid); + } + // muc takes care of the escaping now. + Candy.Core.getConnection().muc.message(roomJid, nick, msg, xhtmlMsg, type); + return true; + }, + /** Function: Invite + * Sends an invite stanza to multiple JIDs + * + * Parameters: + * (String) roomJid - Room to which send the message into + * (Array) invitees - Array of JIDs to be invited to the room + * (String) reason - Message to include with the invitation [optional] + * (String) password - Password for the MUC, if required [optional] + */ + Invite: function(roomJid, invitees, reason, password) { + reason = $.trim(reason); + var message = $msg({ + to: roomJid + }); + var x = message.c("x", { + xmlns: Strophe.NS.MUC_USER + }); + $.each(invitees, function(i, invitee) { + invitee = Strophe.getBareJidFromJid(invitee); + x.c("invite", { + to: invitee + }); + if (typeof reason !== "undefined" && reason !== "") { + x.c("reason", reason); + } + }); + if (typeof password !== "undefined" && password !== "") { + x.c("password", password); + } + Candy.Core.getConnection().send(message); + }, + /** Function: IgnoreUnignore + * Checks if the user is already ignoring the target user, if yes: unignore him, if no: ignore him. + * + * Uses the ignore privacy list set on connecting. + * + * Parameters: + * (String) userJid - Target user jid + */ + IgnoreUnignore: function(userJid) { + Candy.Core.getUser().addToOrRemoveFromPrivacyList("ignore", userJid); + Candy.Core.Action.Jabber.Room.UpdatePrivacyList(); + }, + /** Function: UpdatePrivacyList + * Updates privacy list according to the privacylist in the currentUser + */ + UpdatePrivacyList: function() { + var currentUser = Candy.Core.getUser(), iq = $iq({ + type: "set", + from: currentUser.getEscapedJid() + }).c("query", { + xmlns: "jabber:iq:privacy" + }).c("list", { + name: "ignore" + }), privacyList = currentUser.getPrivacyList("ignore"); + if (privacyList.length > 0) { + $.each(privacyList, function(index, jid) { + iq.c("item", { + type: "jid", + value: Candy.Util.escapeJid(jid), + action: "deny", + order: index + }).c("message").up().up(); + }); + } else { + iq.c("item", { + action: "allow", + order: "0" + }); + } + Candy.Core.getConnection().sendIQ(iq.tree()); + }, + /** Class: Candy.Core.Action.Jabber.Room.Admin + * Room administration commands + */ + Admin: { + /** Function: UserAction + * Kick or ban a user + * + * Parameters: + * (String) roomJid - Room in which the kick/ban should be done + * (String) userJid - Victim + * (String) type - "kick" or "ban" + * (String) msg - Reason + * + * Returns: + * (Boolean) - true if sent successfully, false if type is not one of "kick" or "ban". + */ + UserAction: function(roomJid, userJid, type, reason) { + roomJid = Candy.Util.escapeJid(roomJid); + userJid = Candy.Util.escapeJid(userJid); + var itemObj = { + nick: Strophe.getResourceFromJid(userJid) + }; + switch (type) { + case "kick": + itemObj.role = "none"; + break; + + case "ban": + itemObj.affiliation = "outcast"; + break; + + default: + return false; + } + Candy.Core.getConnection().sendIQ($iq({ + type: "set", + from: Candy.Core.getUser().getEscapedJid(), + to: roomJid + }).c("query", { + xmlns: Strophe.NS.MUC_ADMIN + }).c("item", itemObj).c("reason").t(reason).tree()); + return true; + }, + /** Function: SetSubject + * Sets subject (topic) of a room. + * + * Parameters: + * (String) roomJid - Room + * (String) subject - Subject to set + */ + SetSubject: function(roomJid, subject) { + Candy.Core.getConnection().muc.setTopic(Candy.Util.escapeJid(roomJid), subject); + } + } + } + }; + return self; +}(Candy.Core.Action || {}, Strophe, jQuery); + +/** File: chatRoom.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Strophe */ +/** Class: Candy.Core.ChatRoom + * Candy Chat Room + * + * Parameters: + * (String) roomJid - Room jid + */ +Candy.Core.ChatRoom = function(roomJid) { + /** Object: room + * Object containing roomJid and name. + */ + this.room = { + jid: roomJid, + name: Strophe.getNodeFromJid(roomJid) + }; + /** Variable: user + * Current local user of this room. + */ + this.user = null; + /** Variable: Roster + * Candy.Core.ChatRoster instance + */ + this.roster = new Candy.Core.ChatRoster(); +}; + +/** Function: setUser + * Set user of this room. + * + * Parameters: + * (Candy.Core.ChatUser) user - Chat user + */ +Candy.Core.ChatRoom.prototype.setUser = function(user) { + this.user = user; +}; + +/** Function: getUser + * Get current local user + * + * Returns: + * (Object) - Candy.Core.ChatUser instance or null + */ +Candy.Core.ChatRoom.prototype.getUser = function() { + return this.user; +}; + +/** Function: getJid + * Get room jid + * + * Returns: + * (String) - Room jid + */ +Candy.Core.ChatRoom.prototype.getJid = function() { + return this.room.jid; +}; + +/** Function: setName + * Set room name + * + * Parameters: + * (String) name - Room name + */ +Candy.Core.ChatRoom.prototype.setName = function(name) { + this.room.name = name; +}; + +/** Function: getName + * Get room name + * + * Returns: + * (String) - Room name + */ +Candy.Core.ChatRoom.prototype.getName = function() { + return this.room.name; +}; + +/** Function: setRoster + * Set roster of room + * + * Parameters: + * (Candy.Core.ChatRoster) roster - Chat roster + */ +Candy.Core.ChatRoom.prototype.setRoster = function(roster) { + this.roster = roster; +}; + +/** Function: getRoster + * Get roster + * + * Returns + * (Candy.Core.ChatRoster) - instance + */ +Candy.Core.ChatRoom.prototype.getRoster = function() { + return this.roster; +}; + +/** File: chatRoster.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy */ +/** Class: Candy.Core.ChatRoster + * Chat Roster + */ +Candy.Core.ChatRoster = function() { + /** Object: items + * Roster items + */ + this.items = {}; +}; + +/** Function: add + * Add user to roster + * + * Parameters: + * (Candy.Core.ChatUser) user - User to add + */ +Candy.Core.ChatRoster.prototype.add = function(user) { + this.items[user.getJid()] = user; +}; + +/** Function: remove + * Remove user from roster + * + * Parameters: + * (String) jid - User jid + */ +Candy.Core.ChatRoster.prototype.remove = function(jid) { + delete this.items[jid]; +}; + +/** Function: get + * Get user from roster + * + * Parameters: + * (String) jid - User jid + * + * Returns: + * (Candy.Core.ChatUser) - User + */ +Candy.Core.ChatRoster.prototype.get = function(jid) { + return this.items[jid]; +}; + +/** Function: getAll + * Get all items + * + * Returns: + * (Object) - all roster items + */ +Candy.Core.ChatRoster.prototype.getAll = function() { + return this.items; +}; + +/** File: chatUser.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Strophe */ +/** Class: Candy.Core.ChatUser + * Chat User + */ +Candy.Core.ChatUser = function(jid, nick, affiliation, role, realJid) { + /** Constant: ROLE_MODERATOR + * Moderator role + */ + this.ROLE_MODERATOR = "moderator"; + /** Constant: AFFILIATION_OWNER + * Affiliation owner + */ + this.AFFILIATION_OWNER = "owner"; + /** Object: data + * User data containing: + * - jid + * - realJid + * - nick + * - affiliation + * - role + * - privacyLists + * - customData to be used by e.g. plugins + */ + this.data = { + jid: jid, + realJid: realJid, + nick: Strophe.unescapeNode(nick), + affiliation: affiliation, + role: role, + privacyLists: {}, + customData: {}, + previousNick: undefined, + status: "unavailable" + }; +}; + +/** Function: getJid + * Gets an unescaped user jid + * + * See: + * + * + * Returns: + * (String) - jid + */ +Candy.Core.ChatUser.prototype.getJid = function() { + if (this.data.jid) { + return Candy.Util.unescapeJid(this.data.jid); + } + return; +}; + +/** Function: getEscapedJid + * Escapes the user's jid (node & resource get escaped) + * + * See: + * + * + * Returns: + * (String) - escaped jid + */ +Candy.Core.ChatUser.prototype.getEscapedJid = function() { + return Candy.Util.escapeJid(this.data.jid); +}; + +/** Function: setJid + * Sets a user's jid + * + * Parameters: + * (String) jid - New Jid + */ +Candy.Core.ChatUser.prototype.setJid = function(jid) { + this.data.jid = jid; +}; + +/** Function: getRealJid + * Gets an unescaped real jid if known + * + * See: + * + * + * Returns: + * (String) - realJid + */ +Candy.Core.ChatUser.prototype.getRealJid = function() { + if (this.data.realJid) { + return Candy.Util.unescapeJid(this.data.realJid); + } + return; +}; + +/** Function: getNick + * Gets user nick + * + * Returns: + * (String) - nick + */ +Candy.Core.ChatUser.prototype.getNick = function() { + return Strophe.unescapeNode(this.data.nick); +}; + +/** Function: setNick + * Sets a user's nick + * + * Parameters: + * (String) nick - New nick + */ +Candy.Core.ChatUser.prototype.setNick = function(nick) { + this.data.nick = nick; +}; + +/** Function: getName + * Gets user's name (from contact or nick) + * + * Returns: + * (String) - name + */ +Candy.Core.ChatUser.prototype.getName = function() { + var contact = this.getContact(); + if (contact) { + return contact.getName(); + } else { + return this.getNick(); + } +}; + +/** Function: getRole + * Gets user role + * + * Returns: + * (String) - role + */ +Candy.Core.ChatUser.prototype.getRole = function() { + return this.data.role; +}; + +/** Function: setRole + * Sets user role + * + * Parameters: + * (String) role - Role + */ +Candy.Core.ChatUser.prototype.setRole = function(role) { + this.data.role = role; +}; + +/** Function: setAffiliation + * Sets user affiliation + * + * Parameters: + * (String) affiliation - new affiliation + */ +Candy.Core.ChatUser.prototype.setAffiliation = function(affiliation) { + this.data.affiliation = affiliation; +}; + +/** Function: getAffiliation + * Gets user affiliation + * + * Returns: + * (String) - affiliation + */ +Candy.Core.ChatUser.prototype.getAffiliation = function() { + return this.data.affiliation; +}; + +/** Function: isModerator + * Check if user is moderator. Depends on the room. + * + * Returns: + * (Boolean) - true if user has role moderator or affiliation owner + */ +Candy.Core.ChatUser.prototype.isModerator = function() { + return this.getRole() === this.ROLE_MODERATOR || this.getAffiliation() === this.AFFILIATION_OWNER; +}; + +/** Function: addToOrRemoveFromPrivacyList + * Convenience function for adding/removing users from ignore list. + * + * Check if user is already in privacy list. If yes, remove it. If no, add it. + * + * Parameters: + * (String) list - To which privacy list the user should be added / removed from. Candy supports curently only the "ignore" list. + * (String) jid - User jid to add/remove + * + * Returns: + * (Array) - Current privacy list. + */ +Candy.Core.ChatUser.prototype.addToOrRemoveFromPrivacyList = function(list, jid) { + if (!this.data.privacyLists[list]) { + this.data.privacyLists[list] = []; + } + var index = -1; + if ((index = this.data.privacyLists[list].indexOf(jid)) !== -1) { + this.data.privacyLists[list].splice(index, 1); + } else { + this.data.privacyLists[list].push(jid); + } + return this.data.privacyLists[list]; +}; + +/** Function: getPrivacyList + * Returns the privacy list of the listname of the param. + * + * Parameters: + * (String) list - To which privacy list the user should be added / removed from. Candy supports curently only the "ignore" list. + * + * Returns: + * (Array) - Privacy List + */ +Candy.Core.ChatUser.prototype.getPrivacyList = function(list) { + if (!this.data.privacyLists[list]) { + this.data.privacyLists[list] = []; + } + return this.data.privacyLists[list]; +}; + +/** Function: setPrivacyLists + * Sets privacy lists. + * + * Parameters: + * (Object) lists - List object + */ +Candy.Core.ChatUser.prototype.setPrivacyLists = function(lists) { + this.data.privacyLists = lists; +}; + +/** Function: isInPrivacyList + * Tests if this user ignores the user provided by jid. + * + * Parameters: + * (String) list - Privacy list + * (String) jid - Jid to test for + * + * Returns: + * (Boolean) + */ +Candy.Core.ChatUser.prototype.isInPrivacyList = function(list, jid) { + if (!this.data.privacyLists[list]) { + return false; + } + return this.data.privacyLists[list].indexOf(jid) !== -1; +}; + +/** Function: setCustomData + * Stores custom data + * + * Parameter: + * (Object) data - Object containing custom data + */ +Candy.Core.ChatUser.prototype.setCustomData = function(data) { + this.data.customData = data; +}; + +/** Function: getCustomData + * Retrieve custom data + * + * Returns: + * (Object) - Object containing custom data + */ +Candy.Core.ChatUser.prototype.getCustomData = function() { + return this.data.customData; +}; + +/** Function: setPreviousNick + * If user has nickname changed, set previous nickname. + * + * Parameters: + * (String) previousNick - the previous nickname + */ +Candy.Core.ChatUser.prototype.setPreviousNick = function(previousNick) { + this.data.previousNick = previousNick; +}; + +/** Function: hasNicknameChanged + * Gets the previous nickname if available. + * + * Returns: + * (String) - previous nickname + */ +Candy.Core.ChatUser.prototype.getPreviousNick = function() { + return this.data.previousNick; +}; + +/** Function: getContact + * Gets the contact matching this user from our roster + * + * Returns: + * (Candy.Core.Contact) - contact from roster + */ +Candy.Core.ChatUser.prototype.getContact = function() { + return Candy.Core.getRoster().get(Strophe.getBareJidFromJid(this.data.realJid)); +}; + +/** Function: setStatus + * Set the user's status + * + * Parameters: + * (String) status - the new status + */ +Candy.Core.ChatUser.prototype.setStatus = function(status) { + this.data.status = status; +}; + +/** Function: getStatus + * Gets the user's status. + * + * Returns: + * (String) - status + */ +Candy.Core.ChatUser.prototype.getStatus = function() { + return this.data.status; +}; + +/** File: contact.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Strophe, $ */ +/** Class: Candy.Core.Contact + * Roster contact + */ +Candy.Core.Contact = function(stropheRosterItem) { + /** Object: data + * Strophe Roster plugin item model containing: + * - jid + * - name + * - subscription + * - groups + */ + this.data = stropheRosterItem; +}; + +/** Function: getJid + * Gets an unescaped user jid + * + * See: + * + * + * Returns: + * (String) - jid + */ +Candy.Core.Contact.prototype.getJid = function() { + if (this.data.jid) { + return Candy.Util.unescapeJid(this.data.jid); + } + return; +}; + +/** Function: getEscapedJid + * Escapes the user's jid (node & resource get escaped) + * + * See: + * + * + * Returns: + * (String) - escaped jid + */ +Candy.Core.Contact.prototype.getEscapedJid = function() { + return Candy.Util.escapeJid(this.data.jid); +}; + +/** Function: getName + * Gets user name + * + * Returns: + * (String) - name + */ +Candy.Core.Contact.prototype.getName = function() { + if (!this.data.name) { + return this.getJid(); + } + return Strophe.unescapeNode(this.data.name); +}; + +/** Function: getNick + * Gets user name + * + * Returns: + * (String) - name + */ +Candy.Core.Contact.prototype.getNick = Candy.Core.Contact.prototype.getName; + +/** Function: getSubscription + * Gets user subscription + * + * Returns: + * (String) - subscription + */ +Candy.Core.Contact.prototype.getSubscription = function() { + if (!this.data.subscription) { + return "none"; + } + return this.data.subscription; +}; + +/** Function: getGroups + * Gets user groups + * + * Returns: + * (Array) - groups + */ +Candy.Core.Contact.prototype.getGroups = function() { + return this.data.groups; +}; + +/** Function: getStatus + * Gets user status as an aggregate of all resources + * + * Returns: + * (String) - aggregate status, one of chat|dnd|available|away|xa|unavailable + */ +Candy.Core.Contact.prototype.getStatus = function() { + var status = "unavailable", self = this, highestResourcePriority; + $.each(this.data.resources, function(resource, obj) { + var resourcePriority; + if (obj.priority === undefined || obj.priority === "") { + resourcePriority = 0; + } else { + resourcePriority = parseInt(obj.priority, 10); + } + if (obj.show === "" || obj.show === null || obj.show === undefined) { + // TODO: Submit this as a bugfix to strophejs-plugins' roster plugin + obj.show = "available"; + } + if (highestResourcePriority === undefined || highestResourcePriority < resourcePriority) { + // This resource is higher priority than the ones we've checked so far, override with this one + status = obj.show; + highestResourcePriority = resourcePriority; + } else if (highestResourcePriority === resourcePriority) { + // Two resources with the same priority means we have to weight their status + if (self._weightForStatus(status) > self._weightForStatus(obj.show)) { + status = obj.show; + } + } + }); + return status; +}; + +Candy.Core.Contact.prototype._weightForStatus = function(status) { + switch (status) { + case "chat": + case "dnd": + return 1; + + case "available": + case "": + return 2; + + case "away": + return 3; + + case "xa": + return 4; + + case "unavailable": + return 5; + } +}; + +/** File: event.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Strophe, jQuery */ +/** Class: Candy.Core.Event + * Chat Events + * + * Parameters: + * (Candy.Core.Event) self - itself + * (Strophe) Strophe - Strophe + * (jQuery) $ - jQuery + */ +Candy.Core.Event = function(self, Strophe, $) { + /** Function: Login + * Notify view that the login window should be displayed + * + * Parameters: + * (String) presetJid - Preset user JID + * + * Triggers: + * candy:core.login using {presetJid} + */ + self.Login = function(presetJid) { + /** Event: candy:core.login + * Triggered when the login window should be displayed + * + * Parameters: + * (String) presetJid - Preset user JID + */ + $(Candy).triggerHandler("candy:core.login", { + presetJid: presetJid + }); + }; + /** Class: Candy.Core.Event.Strophe + * Strophe-related events + */ + self.Strophe = { + /** Function: Connect + * Acts on strophe status events and notifies view. + * + * Parameters: + * (Strophe.Status) status - Strophe statuses + * + * Triggers: + * candy:core.chat.connection using {status} + */ + Connect: function(status) { + Candy.Core.setStropheStatus(status); + switch (status) { + case Strophe.Status.CONNECTED: + Candy.Core.log("[Connection] Connected"); + Candy.Core.Action.Jabber.GetJidIfAnonymous(); + + /* falls through */ + case Strophe.Status.ATTACHED: + Candy.Core.log("[Connection] Attached"); + $(Candy).on("candy:core:roster:fetched", function() { + Candy.Core.Action.Jabber.Presence(); + }); + Candy.Core.Action.Jabber.Roster(); + Candy.Core.Action.Jabber.EnableCarbons(); + Candy.Core.Action.Jabber.Autojoin(); + Candy.Core.Action.Jabber.GetIgnoreList(); + break; + + case Strophe.Status.DISCONNECTED: + Candy.Core.log("[Connection] Disconnected"); + break; + + case Strophe.Status.AUTHFAIL: + Candy.Core.log("[Connection] Authentication failed"); + break; + + case Strophe.Status.CONNECTING: + Candy.Core.log("[Connection] Connecting"); + break; + + case Strophe.Status.DISCONNECTING: + Candy.Core.log("[Connection] Disconnecting"); + break; + + case Strophe.Status.AUTHENTICATING: + Candy.Core.log("[Connection] Authenticating"); + break; + + case Strophe.Status.ERROR: + case Strophe.Status.CONNFAIL: + Candy.Core.log("[Connection] Failed (" + status + ")"); + break; + + default: + Candy.Core.warn("[Connection] Unknown status received:", status); + break; + } + /** Event: candy:core.chat.connection + * Connection status updates + * + * Parameters: + * (Strophe.Status) status - Strophe status + */ + $(Candy).triggerHandler("candy:core.chat.connection", { + status: status + }); + } + }; + /** Class: Candy.Core.Event.Jabber + * Jabber related events + */ + self.Jabber = { + /** Function: Version + * Responds to a version request + * + * Parameters: + * (String) msg - Raw XML Message + * + * Returns: + * (Boolean) - true + */ + Version: function(msg) { + Candy.Core.log("[Jabber] Version"); + Candy.Core.Action.Jabber.Version($(msg)); + return true; + }, + /** Function: Presence + * Acts on a presence event + * + * Parameters: + * (String) msg - Raw XML Message + * + * Triggers: + * candy:core.presence using {from, stanza} + * + * Returns: + * (Boolean) - true + */ + Presence: function(msg) { + Candy.Core.log("[Jabber] Presence"); + msg = $(msg); + if (msg.children('x[xmlns^="' + Strophe.NS.MUC + '"]').length > 0) { + if (msg.attr("type") === "error") { + self.Jabber.Room.PresenceError(msg); + } else { + self.Jabber.Room.Presence(msg); + } + } else { + /** Event: candy:core.presence + * Presence updates. Emitted only when not a muc presence. + * + * Parameters: + * (JID) from - From Jid + * (String) stanza - Stanza + */ + $(Candy).triggerHandler("candy:core.presence", { + from: msg.attr("from"), + stanza: msg + }); + } + return true; + }, + /** Function: RosterLoad + * Acts on the result of loading roster items from a cache + * + * Parameters: + * (String) items - List of roster items + * + * Triggers: + * candy:core.roster.loaded + * + * Returns: + * (Boolean) - true + */ + RosterLoad: function(items) { + self.Jabber._addRosterItems(items); + /** Event: candy:core.roster.loaded + * Notification of the roster having been loaded from cache + */ + $(Candy).triggerHandler("candy:core:roster:loaded", { + roster: Candy.Core.getRoster() + }); + return true; + }, + /** Function: RosterFetch + * Acts on the result of a roster fetch + * + * Parameters: + * (String) items - List of roster items + * + * Triggers: + * candy:core.roster.fetched + * + * Returns: + * (Boolean) - true + */ + RosterFetch: function(items) { + self.Jabber._addRosterItems(items); + /** Event: candy:core.roster.fetched + * Notification of the roster having been fetched + */ + $(Candy).triggerHandler("candy:core:roster:fetched", { + roster: Candy.Core.getRoster() + }); + return true; + }, + /** Function: RosterPush + * Acts on a roster push + * + * Parameters: + * (String) stanza - Raw XML Message + * + * Triggers: + * candy:core.roster.added + * candy:core.roster.updated + * candy:core.roster.removed + * + * Returns: + * (Boolean) - true + */ + RosterPush: function(items, updatedItem) { + if (!updatedItem) { + return true; + } + if (updatedItem.subscription === "remove") { + var contact = Candy.Core.getRoster().get(updatedItem.jid); + Candy.Core.getRoster().remove(updatedItem.jid); + /** Event: candy:core.roster.removed + * Notification of a roster entry having been removed + * + * Parameters: + * (Candy.Core.Contact) contact - The contact that was removed from the roster + */ + $(Candy).triggerHandler("candy:core:roster:removed", { + contact: contact + }); + } else { + var user = Candy.Core.getRoster().get(updatedItem.jid); + if (!user) { + user = self.Jabber._addRosterItem(updatedItem); + /** Event: candy:core.roster.added + * Notification of a roster entry having been added + * + * Parameters: + * (Candy.Core.Contact) contact - The contact that was added + */ + $(Candy).triggerHandler("candy:core:roster:added", { + contact: user + }); + } else { + /** Event: candy:core.roster.updated + * Notification of a roster entry having been updated + * + * Parameters: + * (Candy.Core.Contact) contact - The contact that was updated + */ + $(Candy).triggerHandler("candy:core:roster:updated", { + contact: user + }); + } + } + return true; + }, + _addRosterItem: function(item) { + var user = new Candy.Core.Contact(item); + Candy.Core.getRoster().add(user); + return user; + }, + _addRosterItems: function(items) { + $.each(items, function(i, item) { + self.Jabber._addRosterItem(item); + }); + }, + /** Function: Bookmarks + * Acts on a bookmarks event. When a bookmark has the attribute autojoin set, joins this room. + * + * Parameters: + * (String) msg - Raw XML Message + * + * Returns: + * (Boolean) - true + */ + Bookmarks: function(msg) { + Candy.Core.log("[Jabber] Bookmarks"); + // Autojoin bookmarks + $("conference", msg).each(function() { + var item = $(this); + if (item.attr("autojoin")) { + Candy.Core.Action.Jabber.Room.Join(item.attr("jid")); + } + }); + return true; + }, + /** Function: PrivacyList + * Acts on a privacy list event and sets up the current privacy list of this user. + * + * If no privacy list has been added yet, create the privacy list and listen again to this event. + * + * Parameters: + * (String) msg - Raw XML Message + * + * Returns: + * (Boolean) - false to disable the handler after first call. + */ + PrivacyList: function(msg) { + Candy.Core.log("[Jabber] PrivacyList"); + var currentUser = Candy.Core.getUser(); + msg = $(msg); + if (msg.attr("type") === "result") { + $('list[name="ignore"] item', msg).each(function() { + var item = $(this); + if (item.attr("action") === "deny") { + currentUser.addToOrRemoveFromPrivacyList("ignore", item.attr("value")); + } + }); + Candy.Core.Action.Jabber.SetIgnoreListActive(); + return false; + } + return self.Jabber.PrivacyListError(msg); + }, + /** Function: PrivacyListError + * Acts when a privacy list error has been received. + * + * Currently only handles the case, when a privacy list doesn't exist yet and creates one. + * + * Parameters: + * (String) msg - Raw XML Message + * + * Returns: + * (Boolean) - false to disable the handler after first call. + */ + PrivacyListError: function(msg) { + Candy.Core.log("[Jabber] PrivacyListError"); + // check if msg says that privacyList doesn't exist + if ($('error[code="404"][type="cancel"] item-not-found', msg)) { + Candy.Core.Action.Jabber.ResetIgnoreList(); + Candy.Core.Action.Jabber.SetIgnoreListActive(); + } + return false; + }, + /** Function: Message + * Acts on room, admin and server messages and notifies the view if required. + * + * Parameters: + * (String) msg - Raw XML Message + * + * Triggers: + * candy:core.chat.message.admin using {type, message} + * candy:core.chat.message.server {type, subject, message} + * + * Returns: + * (Boolean) - true + */ + Message: function(msg) { + Candy.Core.log("[Jabber] Message"); + msg = $(msg); + var type = msg.attr("type") || "normal"; + switch (type) { + case "normal": + var invite = self.Jabber._findInvite(msg); + if (invite) { + /** Event: candy:core:chat:invite + * Incoming chat invite for a MUC. + * + * Parameters: + * (String) roomJid - The room the invite is to + * (String) from - User JID that invite is from text + * (String) reason - Reason for invite + * (String) password - Password for the room + * (String) continuedThread - The thread ID if this is a continuation of a 1-on-1 chat + */ + $(Candy).triggerHandler("candy:core:chat:invite", invite); + } + /** Event: candy:core:chat:message:normal + * Messages with the type attribute of normal or those + * that do not have the optional type attribute. + * + * Parameters: + * (String) type - Type of the message + * (Object) message - Message object. + */ + $(Candy).triggerHandler("candy:core:chat:message:normal", { + type: type, + message: msg + }); + break; + + case "headline": + // Admin message + if (!msg.attr("to")) { + /** Event: candy:core.chat.message.admin + * Admin message + * + * Parameters: + * (String) type - Type of the message + * (String) message - Message text + */ + $(Candy).triggerHandler("candy:core.chat.message.admin", { + type: type, + message: msg.children("body").text() + }); + } else { + /** Event: candy:core.chat.message.server + * Server message (e.g. subject) + * + * Parameters: + * (String) type - Message type + * (String) subject - Subject text + * (String) message - Message text + */ + $(Candy).triggerHandler("candy:core.chat.message.server", { + type: type, + subject: msg.children("subject").text(), + message: msg.children("body").text() + }); + } + break; + + case "groupchat": + case "chat": + case "error": + // Room message + self.Jabber.Room.Message(msg); + break; + + default: + /** Event: candy:core:chat:message:other + * Messages with a type other than the ones listed in RFC3921 + * section 2.1.1. This allows plugins to catch custom message + * types. + * + * Parameters: + * (String) type - Type of the message [default: message] + * (Object) message - Message object. + */ + // Detect message with type normal or with no type. + $(Candy).triggerHandler("candy:core:chat:message:other", { + type: type, + message: msg + }); + } + return true; + }, + _findInvite: function(msg) { + var mediatedInvite = msg.find("invite"), directInvite = msg.find('x[xmlns="jabber:x:conference"]'), invite; + if (mediatedInvite.length > 0) { + var passwordNode = msg.find("password"), password, reasonNode = mediatedInvite.find("reason"), reason, continueNode = mediatedInvite.find("continue"); + if (passwordNode.text() !== "") { + password = passwordNode.text(); + } + if (reasonNode.text() !== "") { + reason = reasonNode.text(); + } + invite = { + roomJid: msg.attr("from"), + from: mediatedInvite.attr("from"), + reason: reason, + password: password, + continuedThread: continueNode.attr("thread") + }; + } + if (directInvite.length > 0) { + invite = { + roomJid: directInvite.attr("jid"), + from: msg.attr("from"), + reason: directInvite.attr("reason"), + password: directInvite.attr("password"), + continuedThread: directInvite.attr("thread") + }; + } + return invite; + }, + /** Class: Candy.Core.Event.Jabber.Room + * Room specific events + */ + Room: { + /** Function: Disco + * Sets informations to rooms according to the disco info received. + * + * Parameters: + * (String) msg - Raw XML Message + * + * Returns: + * (Boolean) - true + */ + Disco: function(msg) { + Candy.Core.log("[Jabber:Room] Disco"); + msg = $(msg); + // Temp fix for #219 + // Don't go further if it's no conference disco reply + // FIXME: Do this in a more beautiful way + if (!msg.find('identity[category="conference"]').length) { + return true; + } + var roomJid = Strophe.getBareJidFromJid(Candy.Util.unescapeJid(msg.attr("from"))); + // Client joined a room + if (!Candy.Core.getRooms()[roomJid]) { + Candy.Core.getRooms()[roomJid] = new Candy.Core.ChatRoom(roomJid); + } + // Room existed but room name was unknown + var identity = msg.find("identity"); + if (identity.length) { + var roomName = identity.attr("name"), room = Candy.Core.getRoom(roomJid); + if (room.getName() === null) { + room.setName(Strophe.unescapeNode(roomName)); + } + } + return true; + }, + /** Function: Presence + * Acts on various presence messages (room leaving, room joining, error presence) and notifies view. + * + * Parameters: + * (Object) msg - jQuery object of XML message + * + * Triggers: + * candy:core.presence.room using {roomJid, roomName, user, action, currentUser} + * + * Returns: + * (Boolean) - true + */ + Presence: function(msg) { + Candy.Core.log("[Jabber:Room] Presence"); + var from = Candy.Util.unescapeJid(msg.attr("from")), roomJid = Strophe.getBareJidFromJid(from), presenceType = msg.attr("type"), isNewRoom = self.Jabber.Room._msgHasStatusCode(msg, 201), nickAssign = self.Jabber.Room._msgHasStatusCode(msg, 210), nickChange = self.Jabber.Room._msgHasStatusCode(msg, 303); + // Current User joined a room + var room = Candy.Core.getRoom(roomJid); + if (!room) { + Candy.Core.getRooms()[roomJid] = new Candy.Core.ChatRoom(roomJid); + room = Candy.Core.getRoom(roomJid); + } + var roster = room.getRoster(), currentUser = room.getUser() ? room.getUser() : Candy.Core.getUser(), action, user, nick, show = msg.find("show"), item = msg.find("item"); + // User joined a room + if (presenceType !== "unavailable") { + if (roster.get(from)) { + // role/affiliation change + user = roster.get(from); + var role = item.attr("role"), affiliation = item.attr("affiliation"); + user.setRole(role); + user.setAffiliation(affiliation); + user.setStatus("available"); + // FIXME: currently role/affilation changes are handled with this action + action = "join"; + } else { + nick = Strophe.getResourceFromJid(from); + user = new Candy.Core.ChatUser(from, nick, item.attr("affiliation"), item.attr("role"), item.attr("jid")); + // Room existed but client (myself) is not yet registered + if (room.getUser() === null && (Candy.Core.getUser().getNick() === nick || nickAssign)) { + room.setUser(user); + currentUser = user; + } + user.setStatus("available"); + roster.add(user); + action = "join"; + } + if (show.length > 0) { + user.setStatus(show.text()); + } + } else { + user = roster.get(from); + roster.remove(from); + if (nickChange) { + // user changed nick + nick = item.attr("nick"); + action = "nickchange"; + user.setPreviousNick(user.getNick()); + user.setNick(nick); + user.setJid(Strophe.getBareJidFromJid(from) + "/" + nick); + roster.add(user); + } else { + action = "leave"; + if (item.attr("role") === "none") { + if (self.Jabber.Room._msgHasStatusCode(msg, 307)) { + action = "kick"; + } else if (self.Jabber.Room._msgHasStatusCode(msg, 301)) { + action = "ban"; + } + } + if (Strophe.getResourceFromJid(from) === currentUser.getNick()) { + // Current User left a room + self.Jabber.Room._selfLeave(msg, from, roomJid, room.getName(), action); + return true; + } + } + } + /** Event: candy:core.presence.room + * Room presence updates + * + * Parameters: + * (String) roomJid - Room JID + * (String) roomName - Room name + * (Candy.Core.ChatUser) user - User which does the presence update + * (String) action - Action [kick, ban, leave, join] + * (Candy.Core.ChatUser) currentUser - Current local user + * (Boolean) isNewRoom - Whether the room is new (has just been created) + */ + $(Candy).triggerHandler("candy:core.presence.room", { + roomJid: roomJid, + roomName: room.getName(), + user: user, + action: action, + currentUser: currentUser, + isNewRoom: isNewRoom + }); + return true; + }, + _msgHasStatusCode: function(msg, code) { + return msg.find('status[code="' + code + '"]').length > 0; + }, + _selfLeave: function(msg, from, roomJid, roomName, action) { + Candy.Core.log("[Jabber:Room] Leave"); + Candy.Core.removeRoom(roomJid); + var item = msg.find("item"), reason, actor; + if (action === "kick" || action === "ban") { + reason = item.find("reason").text(); + actor = item.find("actor").attr("jid"); + } + var user = new Candy.Core.ChatUser(from, Strophe.getResourceFromJid(from), item.attr("affiliation"), item.attr("role")); + /** Event: candy:core.presence.leave + * When the local client leaves a room + * + * Also triggered when the local client gets kicked or banned from a room. + * + * Parameters: + * (String) roomJid - Room + * (String) roomName - Name of room + * (String) type - Presence type [kick, ban, leave] + * (String) reason - When type equals kick|ban, this is the reason the moderator has supplied. + * (String) actor - When type equals kick|ban, this is the moderator which did the kick + * (Candy.Core.ChatUser) user - user which leaves the room + */ + $(Candy).triggerHandler("candy:core.presence.leave", { + roomJid: roomJid, + roomName: roomName, + type: action, + reason: reason, + actor: actor, + user: user + }); + }, + /** Function: PresenceError + * Acts when a presence of type error has been retrieved. + * + * Parameters: + * (Object) msg - jQuery object of XML message + * + * Triggers: + * candy:core.presence.error using {msg, type, roomJid, roomName} + * + * Returns: + * (Boolean) - true + */ + PresenceError: function(msg) { + Candy.Core.log("[Jabber:Room] Presence Error"); + var from = Candy.Util.unescapeJid(msg.attr("from")), roomJid = Strophe.getBareJidFromJid(from), room = Candy.Core.getRooms()[roomJid], roomName = room.getName(); + // Presence error: Remove room from array to prevent error when disconnecting + Candy.Core.removeRoom(roomJid); + room = undefined; + /** Event: candy:core.presence.error + * Triggered when a presence error happened + * + * Parameters: + * (Object) msg - jQuery object of XML message + * (String) type - Error type + * (String) roomJid - Room jid + * (String) roomName - Room name + */ + $(Candy).triggerHandler("candy:core.presence.error", { + msg: msg, + type: msg.children("error").children()[0].tagName.toLowerCase(), + roomJid: roomJid, + roomName: roomName + }); + return true; + }, + /** Function: Message + * Acts on various message events (subject changed, private chat message, multi-user chat message) + * and notifies view. + * + * Parameters: + * (String) msg - jQuery object of XML message + * + * Triggers: + * candy:core.message using {roomJid, message, timestamp} + * + * Returns: + * (Boolean) - true + */ + Message: function(msg) { + Candy.Core.log("[Jabber:Room] Message"); + var carbon = false, partnerJid = Candy.Util.unescapeJid(msg.attr("from")); + if (msg.children('sent[xmlns="' + Strophe.NS.CARBONS + '"]').length > 0) { + carbon = true; + msg = $(msg.children("sent").children("forwarded").children("message")); + partnerJid = Candy.Util.unescapeJid(msg.attr("to")); + } + if (msg.children('received[xmlns="' + Strophe.NS.CARBONS + '"]').length > 0) { + carbon = true; + msg = $(msg.children("received").children("forwarded").children("message")); + partnerJid = Candy.Util.unescapeJid(msg.attr("from")); + } + // Room subject + var roomJid, roomName, from, message, name, room, sender; + if (msg.children("subject").length > 0 && msg.children("subject").text().length > 0 && msg.attr("type") === "groupchat") { + roomJid = Candy.Util.unescapeJid(Strophe.getBareJidFromJid(partnerJid)); + from = Candy.Util.unescapeJid(Strophe.getBareJidFromJid(msg.attr("from"))); + roomName = Strophe.getNodeFromJid(roomJid); + message = { + from: from, + name: Strophe.getNodeFromJid(from), + body: msg.children("subject").text(), + type: "subject" + }; + } else if (msg.attr("type") === "error") { + var error = msg.children("error"); + if (error.children("text").length > 0) { + roomJid = partnerJid; + roomName = Strophe.getNodeFromJid(roomJid); + message = { + from: msg.attr("from"), + type: "info", + body: error.children("text").text() + }; + } + } else if (msg.children("body").length > 0) { + // Private chat message + if (msg.attr("type") === "chat" || msg.attr("type") === "normal") { + from = Candy.Util.unescapeJid(msg.attr("from")); + var barePartner = Strophe.getBareJidFromJid(partnerJid), bareFrom = Strophe.getBareJidFromJid(from), isNoConferenceRoomJid = !Candy.Core.getRoom(barePartner); + if (isNoConferenceRoomJid) { + roomJid = barePartner; + var partner = Candy.Core.getRoster().get(barePartner); + if (partner) { + roomName = partner.getName(); + } else { + roomName = Strophe.getNodeFromJid(barePartner); + } + if (bareFrom === Candy.Core.getUser().getJid()) { + sender = Candy.Core.getUser(); + } else { + sender = Candy.Core.getRoster().get(bareFrom); + } + if (sender) { + name = sender.getName(); + } else { + name = Strophe.getNodeFromJid(from); + } + } else { + roomJid = partnerJid; + room = Candy.Core.getRoom(Candy.Util.unescapeJid(Strophe.getBareJidFromJid(from))); + sender = room.getRoster().get(from); + if (sender) { + name = sender.getName(); + } else { + name = Strophe.getResourceFromJid(from); + } + roomName = name; + } + message = { + from: from, + name: name, + body: msg.children("body").text(), + type: msg.attr("type"), + isNoConferenceRoomJid: isNoConferenceRoomJid + }; + } else { + from = Candy.Util.unescapeJid(msg.attr("from")); + roomJid = Candy.Util.unescapeJid(Strophe.getBareJidFromJid(partnerJid)); + var resource = Strophe.getResourceFromJid(partnerJid); + // Message from a user + if (resource) { + room = Candy.Core.getRoom(roomJid); + roomName = room.getName(); + if (resource === Candy.Core.getUser().getNick()) { + sender = Candy.Core.getUser(); + } else { + sender = room.getRoster().get(from); + } + if (sender) { + name = sender.getName(); + } else { + name = Strophe.unescapeNode(resource); + } + message = { + from: roomJid, + name: name, + body: msg.children("body").text(), + type: msg.attr("type") + }; + } else { + // we are not yet present in the room, let's just drop this message (issue #105) + if (!Candy.Core.getRooms()[partnerJid]) { + return true; + } + roomName = ""; + message = { + from: roomJid, + name: "", + body: msg.children("body").text(), + type: "info" + }; + } + } + var xhtmlChild = msg.children('html[xmlns="' + Strophe.NS.XHTML_IM + '"]'); + if (xhtmlChild.length > 0) { + var xhtmlMessage = $($("
").append(xhtmlChild.children("body").first().contents()).html()); + message.xhtmlMessage = xhtmlMessage; + } + self.Jabber.Room._checkForChatStateNotification(msg, roomJid, name); + } else { + return true; + } + // besides the delayed delivery (XEP-0203), there exists also XEP-0091 which is the legacy delayed delivery. + // the x[xmlns=jabber:x:delay] is the format in XEP-0091. + var delay = msg.children('delay[xmlns="' + Strophe.NS.DELAY + '"]'); + message.delay = false; + // Default delay to being false. + if (delay.length < 1) { + // The jQuery xpath implementation doesn't support the or operator + delay = msg.children('x[xmlns="' + Strophe.NS.JABBER_DELAY + '"]'); + } else { + // Add delay to the message object so that we can more easily tell if it's a delayed message or not. + message.delay = true; + } + var timestamp = delay.length > 0 ? delay.attr("stamp") : new Date().toISOString(); + /** Event: candy:core.message + * Triggers on various message events (subject changed, private chat message, multi-user chat message). + * + * The resulting message object can contain different key-value pairs as stated in the documentation + * of the parameters itself. + * + * The following lists explain those parameters: + * + * Message Object Parameters: + * (String) from - The unmodified JID that the stanza came from + * (String) name - Sender name + * (String) body - Message text + * (String) type - Message type ([normal, chat, groupchat]) + * or 'info' which is used internally for displaying informational messages + * (Boolean) isNoConferenceRoomJid - if a 3rd-party client sends a direct message to + * this user (not via the room) then the username is the node + * and not the resource. + * This flag tells if this is the case. + * (Boolean) delay - If there is a value for the delay element on a message it is a delayed message. + * This flag tells if this is the case. + * + * Parameters: + * (String) roomJid - Room jid. For one-on-one messages, this is sanitized to the bare JID for indexing purposes. + * (String) roomName - Name of the contact + * (Object) message - Depending on what kind of message, the object consists of different key-value pairs: + * - Room Subject: {name, body, type} + * - Error message: {type = 'info', body} + * - Private chat message: {name, body, type, isNoConferenceRoomJid} + * - MUC msg from a user: {name, body, type} + * - MUC msg from server: {name = '', body, type = 'info'} + * (String) timestamp - Timestamp, only when it's an offline message + * (Boolean) carbon - Indication of wether or not the message was a carbon + * (String) stanza - The raw XML stanza + * + * TODO: + * Streamline those events sent and rename the parameters. + */ + $(Candy).triggerHandler("candy:core.message", { + roomJid: roomJid, + roomName: roomName, + message: message, + timestamp: timestamp, + carbon: carbon, + stanza: msg + }); + return true; + }, + _checkForChatStateNotification: function(msg, roomJid, name) { + var chatStateElements = msg.children('*[xmlns="http://jabber.org/protocol/chatstates"]'); + if (chatStateElements.length > 0) { + /** Event: candy:core:message:chatstate + * Triggers on any recieved chatstate notification. + * + * The resulting message object contains the name of the person, the roomJid, and the indicated chatstate. + * + * The following lists explain those parameters: + * + * Message Object Parameters: + * (String) name - User name + * (String) roomJid - Room jid + * (String) chatstate - Chatstate being indicated. ("active", "composing", "paused", "inactive", "gone") + * + */ + $(Candy).triggerHandler("candy:core:message:chatstate", { + name: name, + roomJid: roomJid, + chatstate: chatStateElements[0].tagName + }); + } + } + } + }; + return self; +}(Candy.Core.Event || {}, Strophe, jQuery); + +/** File: observer.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Strophe, Mustache, jQuery */ +/** Class: Candy.View.Observer + * Observes Candy core events + * + * Parameters: + * (Candy.View.Observer) self - itself + * (jQuery) $ - jQuery + */ +Candy.View.Observer = function(self, $) { + /** PrivateVariable: _showConnectedMessageModal + * Ugly way to determine if the 'connected' modal should be shown. + * Is set to false in case no autojoin param is set. + */ + var _showConnectedMessageModal = true; + /** Class: Candy.View.Observer.Chat + * Chat events + */ + self.Chat = { + /** Function: Connection + * The update method gets called whenever an event to which "Chat" is subscribed. + * + * Currently listens for connection status updates + * + * Parameters: + * (jQuery.Event) event - jQuery Event object + * (Object) args - {status (Strophe.Status.*)} + */ + Connection: function(event, args) { + var eventName = "candy:view.connection.status-" + args.status; + /** Event: candy:view.connection.status- + * Using this event, you can alter the default Candy (View) behaviour when reacting + * to connection updates. + * + * STROPHE-STATUS has to be replaced by one of : + * - ERROR: 0, + * - CONNECTING: 1, + * - CONNFAIL: 2, + * - AUTHENTICATING: 3, + * - AUTHFAIL: 4, + * - CONNECTED: 5, + * - DISCONNECTED: 6, + * - DISCONNECTING: 7, + * - ATTACHED: 8 + * + * + * If your event handler returns `false`, no View changes will take place. + * You can, of course, also return `true` and do custom things but still + * let Candy (View) do it's job. + * + * This event has been implemented due to + * and here's an example use-case for it: + * + * (start code) + * // react to DISCONNECTED event + * $(Candy).on('candy:view.connection.status-6', function() { + * // on next browser event loop + * setTimeout(function() { + * // reload page to automatically reattach on disconnect + * window.location.reload(); + * }, 0); + * // stop view changes right here. + * return false; + * }); + * (end code) + */ + if ($(Candy).triggerHandler(eventName) === false) { + return false; + } + switch (args.status) { + case Strophe.Status.CONNECTING: + case Strophe.Status.AUTHENTICATING: + Candy.View.Pane.Chat.Modal.show($.i18n._("statusConnecting"), false, true); + break; + + case Strophe.Status.ATTACHED: + case Strophe.Status.CONNECTED: + if (_showConnectedMessageModal === true) { + // only show 'connected' if the autojoin error is not shown + // which is determined by having a visible modal in this stage. + Candy.View.Pane.Chat.Modal.show($.i18n._("statusConnected")); + Candy.View.Pane.Chat.Modal.hide(); + } + break; + + case Strophe.Status.DISCONNECTING: + Candy.View.Pane.Chat.Modal.show($.i18n._("statusDisconnecting"), false, true); + break; + + case Strophe.Status.DISCONNECTED: + var presetJid = Candy.Core.isAnonymousConnection() ? Strophe.getDomainFromJid(Candy.Core.getUser().getJid()) : null; + Candy.View.Pane.Chat.Modal.showLoginForm($.i18n._("statusDisconnected"), presetJid); + break; + + case Strophe.Status.AUTHFAIL: + Candy.View.Pane.Chat.Modal.showLoginForm($.i18n._("statusAuthfail")); + break; + + default: + Candy.View.Pane.Chat.Modal.show($.i18n._("status", args.status)); + break; + } + }, + /** Function: Message + * Dispatches admin and info messages + * + * Parameters: + * (jQuery.Event) event - jQuery Event object + * (Object) args - {type (message/chat/groupchat), subject (if type = message), message} + */ + Message: function(event, args) { + if (args.type === "message") { + Candy.View.Pane.Chat.adminMessage(args.subject || "", args.message); + } else if (args.type === "chat" || args.type === "groupchat") { + // use onInfoMessage as infos from the server shouldn't be hidden by the infoMessage switch. + Candy.View.Pane.Chat.onInfoMessage(Candy.View.getCurrent().roomJid, args.subject || "", args.message); + } + } + }; + /** Class: Candy.View.Observer.Presence + * Presence update events + */ + self.Presence = { + /** Function: update + * Every presence update gets dispatched from this method. + * + * Parameters: + * (jQuery.Event) event - jQuery.Event object + * (Object) args - Arguments differ on each type + * + * Uses: + * - + */ + update: function(event, args) { + // Client left + if (args.type === "leave") { + var user = Candy.View.Pane.Room.getUser(args.roomJid); + Candy.View.Pane.Room.close(args.roomJid); + self.Presence.notifyPrivateChats(user, args.type); + } else if (args.type === "kick" || args.type === "ban") { + var actorName = args.actor ? Strophe.getNodeFromJid(args.actor) : null, actionLabel, translationParams = [ args.roomName ]; + if (actorName) { + translationParams.push(actorName); + } + switch (args.type) { + case "kick": + actionLabel = $.i18n._(actorName ? "youHaveBeenKickedBy" : "youHaveBeenKicked", translationParams); + break; + + case "ban": + actionLabel = $.i18n._(actorName ? "youHaveBeenBannedBy" : "youHaveBeenBanned", translationParams); + break; + } + Candy.View.Pane.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.adminMessageReason, { + reason: args.reason, + _action: actionLabel, + _reason: $.i18n._("reasonWas", [ args.reason ]) + })); + setTimeout(function() { + Candy.View.Pane.Chat.Modal.hide(function() { + Candy.View.Pane.Room.close(args.roomJid); + self.Presence.notifyPrivateChats(args.user, args.type); + }); + }, 5e3); + var evtData = { + type: args.type, + reason: args.reason, + roomJid: args.roomJid, + user: args.user + }; + /** Event: candy:view.presence + * Presence update when kicked or banned + * + * Parameters: + * (String) type - Presence type [kick, ban] + * (String) reason - Reason for the kick|ban [optional] + * (String) roomJid - Room JID + * (Candy.Core.ChatUser) user - User which has been kicked or banned + */ + $(Candy).triggerHandler("candy:view.presence", [ evtData ]); + } else if (args.roomJid) { + args.roomJid = Candy.Util.unescapeJid(args.roomJid); + // Initialize room if not yet existing + if (!Candy.View.Pane.Chat.rooms[args.roomJid]) { + if (Candy.View.Pane.Room.init(args.roomJid, args.roomName) === false) { + return false; + } + Candy.View.Pane.Room.show(args.roomJid); + } + Candy.View.Pane.Roster.update(args.roomJid, args.user, args.action, args.currentUser); + // Notify private user chats if existing, but not in case the action is nickchange + // -- this is because the nickchange presence already contains the new + // user jid + if (Candy.View.Pane.Chat.rooms[args.user.getJid()] && args.action !== "nickchange") { + Candy.View.Pane.Roster.update(args.user.getJid(), args.user, args.action, args.currentUser); + Candy.View.Pane.PrivateRoom.setStatus(args.user.getJid(), args.action); + } + } else { + // Presence for a one-on-one chat + var bareJid = Strophe.getBareJidFromJid(args.from), room = Candy.View.Pane.Chat.rooms[bareJid]; + if (!room) { + return false; + } + room.targetJid = bareJid; + } + }, + /** Function: notifyPrivateChats + * Notify private user chats if existing + * + * Parameters: + * (Candy.Core.ChatUser) user - User which has done the event + * (String) type - Event type (leave, join, kick/ban) + */ + notifyPrivateChats: function(user, type) { + Candy.Core.log("[View:Observer] notify Private Chats"); + var roomJid; + for (roomJid in Candy.View.Pane.Chat.rooms) { + if (Candy.View.Pane.Chat.rooms.hasOwnProperty(roomJid) && Candy.View.Pane.Room.getUser(roomJid) && user.getJid() === Candy.View.Pane.Room.getUser(roomJid).getJid()) { + Candy.View.Pane.Roster.update(roomJid, user, type, user); + Candy.View.Pane.PrivateRoom.setStatus(roomJid, type); + } + } + } + }; + /** Function: Candy.View.Observer.PresenceError + * Presence errors get handled in this method + * + * Parameters: + * (jQuery.Event) event - jQuery.Event object + * (Object) args - {msg, type, roomJid, roomName} + */ + self.PresenceError = function(obj, args) { + switch (args.type) { + case "not-authorized": + var message; + if (args.msg.children("x").children("password").length > 0) { + message = $.i18n._("passwordEnteredInvalid", [ args.roomName ]); + } + Candy.View.Pane.Chat.Modal.showEnterPasswordForm(args.roomJid, args.roomName, message); + break; + + case "conflict": + Candy.View.Pane.Chat.Modal.showNicknameConflictForm(args.roomJid); + break; + + case "registration-required": + Candy.View.Pane.Chat.Modal.showError("errorMembersOnly", [ args.roomName ]); + break; + + case "service-unavailable": + Candy.View.Pane.Chat.Modal.showError("errorMaxOccupantsReached", [ args.roomName ]); + break; + } + }; + /** Function: Candy.View.Observer.Message + * Messages received get dispatched from this method. + * + * Parameters: + * (jQuery.Event) event - jQuery Event object + * (Object) args - {message, roomJid} + */ + self.Message = function(event, args) { + if (args.message.type === "subject") { + if (!Candy.View.Pane.Chat.rooms[args.roomJid]) { + Candy.View.Pane.Room.init(args.roomJid, args.roomName); + Candy.View.Pane.Room.show(args.roomJid); + } + Candy.View.Pane.Room.setSubject(args.roomJid, args.message.body); + } else if (args.message.type === "info") { + Candy.View.Pane.Chat.infoMessage(args.roomJid, null, args.message.body); + } else { + // Initialize room if it's a message for a new private user chat + if (args.message.type === "chat" && !Candy.View.Pane.Chat.rooms[args.roomJid]) { + Candy.View.Pane.PrivateRoom.open(args.roomJid, args.roomName, false, args.message.isNoConferenceRoomJid); + } + var room = Candy.View.Pane.Chat.rooms[args.roomJid]; + if (room.targetJid === args.roomJid && !args.carbon) { + // No messages yet received. Lock the room to this resource. + room.targetJid = args.message.from; + } else if (room.targetJid === args.message.from) {} else { + // Message received from alternative resource. Release the resource lock. + room.targetJid = args.roomJid; + } + Candy.View.Pane.Message.show(args.roomJid, args.message.name, args.message.body, args.message.xhtmlMessage, args.timestamp, args.message.from, args.carbon, args.stanza); + } + }; + /** Function: Candy.View.Observer.Login + * The login event gets dispatched to this method + * + * Parameters: + * (jQuery.Event) event - jQuery Event object + * (Object) args - {presetJid} + */ + self.Login = function(event, args) { + Candy.View.Pane.Chat.Modal.showLoginForm(null, args.presetJid); + }; + /** Class: Candy.View.Observer.AutojoinMissing + * Displays an error about missing autojoin information + */ + self.AutojoinMissing = function() { + _showConnectedMessageModal = false; + Candy.View.Pane.Chat.Modal.showError("errorAutojoinMissing"); + }; + return self; +}(Candy.View.Observer || {}, jQuery); + +/** File: chat.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, document, Mustache, Strophe, Audio, jQuery */ +/** Class: Candy.View.Pane + * Candy view pane handles everything regarding DOM updates etc. + * + * Parameters: + * (Candy.View.Pane) self - itself + * (jQuery) $ - jQuery + */ +Candy.View.Pane = function(self, $) { + /** Class: Candy.View.Pane.Chat + * Chat-View related view updates + */ + self.Chat = { + /** Variable: rooms + * Contains opened room elements + */ + rooms: [], + /** Function: addTab + * Add a tab to the chat pane. + * + * Parameters: + * (String) roomJid - JID of room + * (String) roomName - Tab label + * (String) roomType - Type of room: `groupchat` or `chat` + */ + addTab: function(roomJid, roomName, roomType) { + var roomId = Candy.Util.jidToId(roomJid); + var evtData = { + roomJid: roomJid, + roomName: roomName, + roomType: roomType, + roomId: roomId + }; + /** Event: candy:view.pane.before-tab + * Before sending a message + * + * Parameters: + * (String) roomJid - JID of the room the tab is for. + * (String) roomName - Name of the room. + * (String) roomType - What type of room: `groupchat` or `chat` + * + * Returns: + * Boolean|undefined - If you want to handle displaying the tab on your own, return false. + */ + if ($(Candy).triggerHandler("candy:view.pane.before-tab", evtData) === false) { + event.preventDefault(); + return; + } + var html = Mustache.to_html(Candy.View.Template.Chat.tab, { + roomJid: roomJid, + roomId: roomId, + name: roomName || Strophe.getNodeFromJid(roomJid), + privateUserChat: function() { + return roomType === "chat"; + }, + roomType: roomType + }), tab = $(html).appendTo("#chat-tabs"); + tab.click(self.Chat.tabClick); + // TODO: maybe we find a better way to get the close element. + $("a.close", tab).click(self.Chat.tabClose); + self.Chat.fitTabs(); + }, + /** Function: getTab + * Get tab by JID. + * + * Parameters: + * (String) roomJid - JID of room + * + * Returns: + * (jQuery object) - Tab element + */ + getTab: function(roomJid) { + return $("#chat-tabs").children('li[data-roomjid="' + roomJid + '"]'); + }, + /** Function: removeTab + * Remove tab element. + * + * Parameters: + * (String) roomJid - JID of room + */ + removeTab: function(roomJid) { + self.Chat.getTab(roomJid).remove(); + self.Chat.fitTabs(); + }, + /** Function: setActiveTab + * Set the active tab. + * + * Add CSS classname `active` to the choosen tab and remove `active` from all other. + * + * Parameters: + * (String) roomJid - JID of room + */ + setActiveTab: function(roomJid) { + $("#chat-tabs").children().each(function() { + var tab = $(this); + if (tab.attr("data-roomjid") === roomJid) { + tab.addClass("active"); + } else { + tab.removeClass("active"); + } + }); + }, + /** Function: increaseUnreadMessages + * Increase unread message count in a tab by one. + * + * Parameters: + * (String) roomJid - JID of room + * + * Uses: + * - + */ + increaseUnreadMessages: function(roomJid) { + var unreadElem = this.getTab(roomJid).find(".unread"); + unreadElem.show().text(unreadElem.text() !== "" ? parseInt(unreadElem.text(), 10) + 1 : 1); + // only increase window unread messages in private chats + if (self.Chat.rooms[roomJid].type === "chat" || Candy.View.getOptions().updateWindowOnAllMessages === true) { + self.Window.increaseUnreadMessages(); + } + }, + /** Function: clearUnreadMessages + * Clear unread message count in a tab. + * + * Parameters: + * (String) roomJid - JID of room + * + * Uses: + * - + */ + clearUnreadMessages: function(roomJid) { + var unreadElem = self.Chat.getTab(roomJid).find(".unread"); + self.Window.reduceUnreadMessages(unreadElem.text()); + unreadElem.hide().text(""); + }, + /** Function: tabClick + * Tab click event: show the room associated with the tab and stops the event from doing the default. + */ + tabClick: function(e) { + // remember scroll position of current room + var currentRoomJid = Candy.View.getCurrent().roomJid; + var roomPane = self.Room.getPane(currentRoomJid, ".message-pane"); + if (roomPane) { + self.Chat.rooms[currentRoomJid].scrollPosition = roomPane.scrollTop(); + } + self.Room.show($(this).attr("data-roomjid")); + e.preventDefault(); + }, + /** Function: tabClose + * Tab close (click) event: Leave the room (groupchat) or simply close the tab (chat). + * + * Parameters: + * (DOMEvent) e - Event triggered + * + * Returns: + * (Boolean) - false, this will stop the event from bubbling + */ + tabClose: function() { + var roomJid = $(this).parent().attr("data-roomjid"); + // close private user tab + if (self.Chat.rooms[roomJid].type === "chat") { + self.Room.close(roomJid); + } else { + Candy.Core.Action.Jabber.Room.Leave(roomJid); + } + return false; + }, + /** Function: allTabsClosed + * All tabs closed event: Disconnect from service. Hide sound control. + * + * TODO: Handle window close + * + * Returns: + * (Boolean) - false, this will stop the event from bubbling + */ + allTabsClosed: function() { + if (Candy.Core.getOptions().disconnectWithoutTabs) { + Candy.Core.disconnect(); + self.Chat.Toolbar.hide(); + self.Chat.hideMobileIcon(); + return; + } + }, + /** Function: fitTabs + * Fit tab size according to window size + */ + fitTabs: function() { + var availableWidth = $("#chat-tabs").innerWidth(), tabsWidth = 0, tabs = $("#chat-tabs").children(); + tabs.each(function() { + tabsWidth += $(this).css({ + width: "auto", + overflow: "visible" + }).outerWidth(true); + }); + if (tabsWidth > availableWidth) { + // tabs.[outer]Width() measures the first element in `tabs`. It's no very readable but nearly two times faster than using :first + var tabDiffToRealWidth = tabs.outerWidth(true) - tabs.width(), tabWidth = Math.floor(availableWidth / tabs.length) - tabDiffToRealWidth; + tabs.css({ + width: tabWidth, + overflow: "hidden" + }); + } + }, + /** Function: hideMobileIcon + * Hide mobile roster pane icon. + */ + hideMobileIcon: function() { + $("#mobile-roster-icon").hide(); + }, + /** Function: showMobileIcon + * Show mobile roster pane icon. + */ + showMobileIcon: function() { + $("#mobile-roster-icon").show(); + }, + /** Function: clickMobileIcon + * Add class to 'open' roster pane (on mobile). + */ + clickMobileIcon: function(e) { + if ($(".room-pane").is(".open")) { + $(".room-pane").removeClass("open"); + } else { + $(".room-pane").addClass("open"); + } + e.preventDefault(); + }, + /** Function: adminMessage + * Display admin message + * + * Parameters: + * (String) subject - Admin message subject + * (String) message - Message to be displayed + * + * Triggers: + * candy:view.chat.admin-message using {subject, message} + */ + adminMessage: function(subject, message) { + if (Candy.View.getCurrent().roomJid) { + // Simply dismiss admin message if no room joined so far. TODO: maybe we should show those messages on a dedicated pane? + message = Candy.Util.Parser.all(message.substring(0, Candy.View.getOptions().crop.message.body)); + if (Candy.View.getOptions().enableXHTML === true) { + message = Candy.Util.parseAndCropXhtml(message, Candy.View.getOptions().crop.message.body); + } + var timestamp = new Date(); + var html = Mustache.to_html(Candy.View.Template.Chat.adminMessage, { + subject: subject, + message: message, + sender: $.i18n._("administratorMessageSubject"), + time: Candy.Util.localizedTime(timestamp), + timestamp: timestamp.toISOString() + }); + $("#chat-rooms").children().each(function() { + self.Room.appendToMessagePane($(this).attr("data-roomjid"), html); + }); + self.Room.scrollToBottom(Candy.View.getCurrent().roomJid); + /** Event: candy:view.chat.admin-message + * After admin message display + * + * Parameters: + * (String) presetJid - Preset user JID + */ + $(Candy).triggerHandler("candy:view.chat.admin-message", { + subject: subject, + message: message + }); + } + }, + /** Function: infoMessage + * Display info message. This is a wrapper for to be able to disable certain info messages. + * + * Parameters: + * (String) roomJid - Room JID + * (String) subject - Subject + * (String) message - Message + */ + infoMessage: function(roomJid, subject, message) { + self.Chat.onInfoMessage(roomJid, subject, message); + }, + /** Function: onInfoMessage + * Display info message. Used by and several other functions which do not wish that their info message + * can be disabled (such as kick/ban message or leave/join message in private chats). + * + * Parameters: + * (String) roomJid - Room JID + * (String) subject - Subject + * (String) message - Message + */ + onInfoMessage: function(roomJid, subject, message) { + message = message || ""; + if (Candy.View.getCurrent().roomJid && self.Chat.rooms[roomJid]) { + // Simply dismiss info message if no room joined so far. TODO: maybe we should show those messages on a dedicated pane? + if (Candy.View.getOptions().enableXHTML === true && message.length > 0) { + message = Candy.Util.parseAndCropXhtml(message, Candy.View.getOptions().crop.message.body); + } else { + message = Candy.Util.Parser.all(message.substring(0, Candy.View.getOptions().crop.message.body)); + } + var timestamp = new Date(); + var html = Mustache.to_html(Candy.View.Template.Chat.infoMessage, { + subject: subject, + message: $.i18n._(message), + time: Candy.Util.localizedTime(timestamp), + timestamp: timestamp.toISOString() + }); + self.Room.appendToMessagePane(roomJid, html); + if (Candy.View.getCurrent().roomJid === roomJid) { + self.Room.scrollToBottom(Candy.View.getCurrent().roomJid); + } + } + }, + /** Class: Candy.View.Pane.Toolbar + * Chat toolbar for things like emoticons toolbar, room management etc. + */ + Toolbar: { + _supportsNativeAudio: null, + /** Function: init + * Register handler and enable or disable sound and status messages. + */ + init: function() { + $("#emoticons-icon").click(function(e) { + self.Chat.Context.showEmoticonsMenu(e.currentTarget); + e.stopPropagation(); + }); + $("#chat-autoscroll-control").click(self.Chat.Toolbar.onAutoscrollControlClick); + try { + if (!!document.createElement("audio").canPlayType) { + var a = document.createElement("audio"); + if (!!a.canPlayType("audio/mpeg;").replace(/no/, "")) { + self.Chat.Toolbar._supportsNativeAudio = "mp3"; + } else if (!!a.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/, "")) { + self.Chat.Toolbar._supportsNativeAudio = "ogg"; + } else if (!!a.canPlayType('audio/mp4; codecs="mp4a.40.2"').replace(/no/, "")) { + self.Chat.Toolbar._supportsNativeAudio = "m4a"; + } + } + } catch (e) {} + $("#chat-sound-control").click(self.Chat.Toolbar.onSoundControlClick); + if (Candy.Util.cookieExists("candy-nosound")) { + $("#chat-sound-control").click(); + } + $("#chat-statusmessage-control").click(self.Chat.Toolbar.onStatusMessageControlClick); + if (Candy.Util.cookieExists("candy-nostatusmessages")) { + $("#chat-statusmessage-control").click(); + } + $(".box-shadow-icon").click(self.Chat.clickMobileIcon); + }, + /** Function: show + * Show toolbar. + */ + show: function() { + $("#chat-toolbar").show(); + }, + /** Function: hide + * Hide toolbar. + */ + hide: function() { + $("#chat-toolbar").hide(); + }, + /* Function: update + * Update toolbar for specific room + */ + update: function(roomJid) { + var context = $("#chat-toolbar").find(".context"), me = self.Room.getUser(roomJid); + if (!me || !me.isModerator()) { + context.hide(); + } else { + context.show().click(function(e) { + self.Chat.Context.show(e.currentTarget, roomJid); + e.stopPropagation(); + }); + } + self.Chat.Toolbar.updateUsercount(self.Chat.rooms[roomJid].usercount); + }, + /** Function: playSound + * Play sound (default method). + */ + playSound: function() { + self.Chat.Toolbar.onPlaySound(); + }, + /** Function: onPlaySound + * Sound play event handler. Uses native (HTML5) audio if supported, + * otherwise it will attempt to use bgsound with autostart. + * + * Don't call this method directly. Call `playSound()` instead. + * `playSound()` will only call this method if sound is enabled. + */ + onPlaySound: function() { + try { + if (self.Chat.Toolbar._supportsNativeAudio !== null) { + new Audio(Candy.View.getOptions().assets + "notify." + self.Chat.Toolbar._supportsNativeAudio).play(); + } else { + $("#chat-sound-control bgsound").remove(); + $("").attr({ + src: Candy.View.getOptions().assets + "notify.mp3", + loop: 1, + autostart: true + }).appendTo("#chat-sound-control"); + } + } catch (e) {} + }, + /** Function: onSoundControlClick + * Sound control click event handler. + * + * Toggle sound (overwrite `playSound()`) and handle cookies. + */ + onSoundControlClick: function() { + var control = $("#chat-sound-control"); + if (control.hasClass("checked")) { + self.Chat.Toolbar.playSound = function() {}; + Candy.Util.setCookie("candy-nosound", "1", 365); + } else { + self.Chat.Toolbar.playSound = function() { + self.Chat.Toolbar.onPlaySound(); + }; + Candy.Util.deleteCookie("candy-nosound"); + } + control.toggleClass("checked"); + }, + /** Function: onAutoscrollControlClick + * Autoscroll control event handler. + * + * Toggle autoscroll + */ + onAutoscrollControlClick: function() { + var control = $("#chat-autoscroll-control"); + if (control.hasClass("checked")) { + self.Room.scrollToBottom = function(roomJid) { + self.Room.onScrollToStoredPosition(roomJid); + }; + self.Window.autoscroll = false; + } else { + self.Room.scrollToBottom = function(roomJid) { + self.Room.onScrollToBottom(roomJid); + }; + self.Room.scrollToBottom(Candy.View.getCurrent().roomJid); + self.Window.autoscroll = true; + } + control.toggleClass("checked"); + }, + /** Function: onStatusMessageControlClick + * Status message control event handler. + * + * Toggle status message + */ + onStatusMessageControlClick: function() { + var control = $("#chat-statusmessage-control"); + if (control.hasClass("checked")) { + self.Chat.infoMessage = function() {}; + Candy.Util.setCookie("candy-nostatusmessages", "1", 365); + } else { + self.Chat.infoMessage = function(roomJid, subject, message) { + self.Chat.onInfoMessage(roomJid, subject, message); + }; + Candy.Util.deleteCookie("candy-nostatusmessages"); + } + control.toggleClass("checked"); + }, + /** Function: updateUserCount + * Update usercount element with count. + * + * Parameters: + * (Integer) count - Current usercount + */ + updateUsercount: function(count) { + $("#chat-usercount").text(count); + } + }, + /** Class: Candy.View.Pane.Modal + * Modal window + */ + Modal: { + /** Function: show + * Display modal window + * + * Parameters: + * (String) html - HTML code to put into the modal window + * (Boolean) showCloseControl - set to true if a close button should be displayed [default false] + * (Boolean) showSpinner - set to true if a loading spinner should be shown [default false] + * (String) modalClass - custom class (or space-separate classes) to attach to the modal + */ + show: function(html, showCloseControl, showSpinner, modalClass) { + if (showCloseControl) { + self.Chat.Modal.showCloseControl(); + } else { + self.Chat.Modal.hideCloseControl(); + } + if (showSpinner) { + self.Chat.Modal.showSpinner(); + } else { + self.Chat.Modal.hideSpinner(); + } + // Reset classes to 'modal-common' only in case .show() is called + // with different arguments before .hide() can remove the last applied + // custom class + $("#chat-modal").removeClass().addClass("modal-common"); + if (modalClass) { + $("#chat-modal").addClass(modalClass); + } + $("#chat-modal").stop(false, true); + $("#chat-modal-body").html(html); + $("#chat-modal").fadeIn("fast"); + $("#chat-modal-overlay").show(); + }, + /** Function: hide + * Hide modal window + * + * Parameters: + * (Function) callback - Calls the specified function after modal window has been hidden. + */ + hide: function(callback) { + // Reset classes to include only `modal-common`. + $("#chat-modal").removeClass().addClass("modal-common"); + $("#chat-modal").fadeOut("fast", function() { + $("#chat-modal-body").text(""); + $("#chat-modal-overlay").hide(); + }); + // restore initial esc handling + $(document).keydown(function(e) { + if (e.which === 27) { + e.preventDefault(); + } + }); + if (callback) { + callback(); + } + }, + /** Function: showSpinner + * Show loading spinner + */ + showSpinner: function() { + $("#chat-modal-spinner").show(); + }, + /** Function: hideSpinner + * Hide loading spinner + */ + hideSpinner: function() { + $("#chat-modal-spinner").hide(); + }, + /** Function: showCloseControl + * Show a close button + */ + showCloseControl: function() { + $("#admin-message-cancel").show().click(function(e) { + self.Chat.Modal.hide(); + // some strange behaviour on IE7 (and maybe other browsers) triggers onWindowUnload when clicking on the close button. + // prevent this. + e.preventDefault(); + }); + // enable esc to close modal + $(document).keydown(function(e) { + if (e.which === 27) { + self.Chat.Modal.hide(); + e.preventDefault(); + } + }); + }, + /** Function: hideCloseControl + * Hide the close button + */ + hideCloseControl: function() { + $("#admin-message-cancel").hide().click(function() {}); + }, + /** Function: showLoginForm + * Show the login form modal + * + * Parameters: + * (String) message - optional message to display above the form + * (String) presetJid - optional user jid. if set, the user will only be prompted for password. + */ + showLoginForm: function(message, presetJid) { + var domains = Candy.Core.getOptions().domains; + var hideDomainList = Candy.Core.getOptions().hideDomainList; + domains = domains ? domains.map(function(d) { + return { + domain: d + }; + }) : null; + var customClass = domains && !hideDomainList ? "login-with-domains" : null; + self.Chat.Modal.show((message ? message : "") + Mustache.to_html(Candy.View.Template.Login.form, { + _labelNickname: $.i18n._("labelNickname"), + _labelUsername: $.i18n._("labelUsername"), + domains: domains, + _labelPassword: $.i18n._("labelPassword"), + _loginSubmit: $.i18n._("loginSubmit"), + displayPassword: !Candy.Core.isAnonymousConnection(), + displayUsername: !presetJid, + displayDomain: domains ? true : false, + displayNickname: Candy.Core.isAnonymousConnection(), + presetJid: presetJid ? presetJid : false + }), null, null, customClass); + if (hideDomainList) { + $("#domain").hide(); + $(".at-symbol").hide(); + } + $("#login-form").children(":input:first").focus(); + // register submit handler + $("#login-form").submit(function() { + var username = $("#username").val(), password = $("#password").val(), domain = $("#domain"); + domain = domain.length ? domain.val().split(" ")[0] : null; + if (!Candy.Core.isAnonymousConnection()) { + var jid; + if (domain) { + // domain is stipulated + // Ensure there is no domain part in username + username = username.split("@")[0]; + jid = username + "@" + domain; + } else { + // domain not stipulated + // guess the input and create a jid out of it + jid = Candy.Core.getUser() && username.indexOf("@") < 0 ? username + "@" + Strophe.getDomainFromJid(Candy.Core.getUser().getJid()) : username; + } + if (jid.indexOf("@") < 0 && !Candy.Core.getUser()) { + Candy.View.Pane.Chat.Modal.showLoginForm($.i18n._("loginInvalid")); + } else { + //Candy.View.Pane.Chat.Modal.hide(); + Candy.Core.connect(jid, password); + } + } else { + // anonymous login + Candy.Core.connect(presetJid, null, username); + } + return false; + }); + }, + /** Function: showEnterPasswordForm + * Shows a form for entering room password + * + * Parameters: + * (String) roomJid - Room jid to join + * (String) roomName - Room name + * (String) message - [optional] Message to show as the label + */ + showEnterPasswordForm: function(roomJid, roomName, message) { + self.Chat.Modal.show(Mustache.to_html(Candy.View.Template.PresenceError.enterPasswordForm, { + roomName: roomName, + _labelPassword: $.i18n._("labelPassword"), + _label: message ? message : $.i18n._("enterRoomPassword", [ roomName ]), + _joinSubmit: $.i18n._("enterRoomPasswordSubmit") + }), true); + $("#password").focus(); + // register submit handler + $("#enter-password-form").submit(function() { + var password = $("#password").val(); + self.Chat.Modal.hide(function() { + Candy.Core.Action.Jabber.Room.Join(roomJid, password); + }); + return false; + }); + }, + /** Function: showNicknameConflictForm + * Shows a form indicating that the nickname is already taken and + * for chosing a new nickname + * + * Parameters: + * (String) roomJid - Room jid to join + */ + showNicknameConflictForm: function(roomJid) { + self.Chat.Modal.show(Mustache.to_html(Candy.View.Template.PresenceError.nicknameConflictForm, { + _labelNickname: $.i18n._("labelNickname"), + _label: $.i18n._("nicknameConflict"), + _loginSubmit: $.i18n._("loginSubmit") + })); + $("#nickname").focus(); + // register submit handler + $("#nickname-conflict-form").submit(function() { + var nickname = $("#nickname").val(); + self.Chat.Modal.hide(function() { + Candy.Core.getUser().data.nick = nickname; + Candy.Core.Action.Jabber.Room.Join(roomJid); + }); + return false; + }); + }, + /** Function: showError + * Show modal containing error message + * + * Parameters: + * (String) message - key of translation to display + * (Array) replacements - array containing replacements for translation (%s) + */ + showError: function(message, replacements) { + self.Chat.Modal.show(Mustache.to_html(Candy.View.Template.PresenceError.displayError, { + _error: $.i18n._(message, replacements) + }), true); + } + }, + /** Class: Candy.View.Pane.Tooltip + * Class to display tooltips over specific elements + */ + Tooltip: { + /** Function: show + * Show a tooltip on event.currentTarget with content specified or content within the target's attribute data-tooltip. + * + * On mouseleave on the target, hide the tooltip. + * + * Parameters: + * (Event) event - Triggered event + * (String) content - Content to display [optional] + */ + show: function(event, content) { + var tooltip = $("#tooltip"), target = $(event.currentTarget); + if (!content) { + content = target.attr("data-tooltip"); + } + if (tooltip.length === 0) { + var html = Mustache.to_html(Candy.View.Template.Chat.tooltip); + $("#chat-pane").append(html); + tooltip = $("#tooltip"); + } + $("#context-menu").hide(); + tooltip.stop(false, true); + tooltip.children("div").html(content); + var pos = target.offset(), posLeft = Candy.Util.getPosLeftAccordingToWindowBounds(tooltip, pos.left), posTop = Candy.Util.getPosTopAccordingToWindowBounds(tooltip, pos.top); + tooltip.css({ + left: posLeft.px, + top: posTop.px + }).removeClass("left-top left-bottom right-top right-bottom").addClass(posLeft.backgroundPositionAlignment + "-" + posTop.backgroundPositionAlignment).fadeIn("fast"); + target.mouseleave(function(event) { + event.stopPropagation(); + $("#tooltip").stop(false, true).fadeOut("fast", function() { + $(this).css({ + top: 0, + left: 0 + }); + }); + }); + } + }, + /** Class: Candy.View.Pane.Context + * Context menu for actions and settings + */ + Context: { + /** Function: init + * Initialize context menu and setup mouseleave handler. + */ + init: function() { + if ($("#context-menu").length === 0) { + var html = Mustache.to_html(Candy.View.Template.Chat.Context.menu); + $("#chat-pane").append(html); + $("#context-menu").mouseleave(function() { + $(this).fadeOut("fast"); + }); + } + }, + /** Function: show + * Show context menu (positions it according to the window height/width) + * + * Parameters: + * (Element) elem - On which element it should be shown + * (String) roomJid - Room Jid of the room it should be shown + * (Candy.Core.chatUser) user - User + * + * Uses: + * for getting menulinks the user has access to + * for positioning + * for positioning + * + * Triggers: + * candy:view.roster.after-context-menu using {roomJid, user, elements} + */ + show: function(elem, roomJid, user) { + elem = $(elem); + var roomId = self.Chat.rooms[roomJid].id, menu = $("#context-menu"), links = $("ul li", menu); + $("#tooltip").hide(); + // add specific context-user class if a user is available (when context menu should be opened next to a user) + if (!user) { + user = Candy.Core.getUser(); + } + links.remove(); + var menulinks = this.getMenuLinks(roomJid, user, elem), id, clickHandler = function(roomJid, user) { + return function(event) { + event.data.callback(event, roomJid, user); + $("#context-menu").hide(); + }; + }; + for (id in menulinks) { + if (menulinks.hasOwnProperty(id)) { + var link = menulinks[id], html = Mustache.to_html(Candy.View.Template.Chat.Context.menulinks, { + roomId: roomId, + "class": link["class"], + id: id, + label: link.label + }); + $("ul", menu).append(html); + $("#context-menu-" + id).bind("click", link, clickHandler(roomJid, user)); + } + } + // if `id` is set the menu is not empty + if (id) { + var pos = elem.offset(), posLeft = Candy.Util.getPosLeftAccordingToWindowBounds(menu, pos.left), posTop = Candy.Util.getPosTopAccordingToWindowBounds(menu, pos.top); + menu.css({ + left: posLeft.px, + top: posTop.px + }).removeClass("left-top left-bottom right-top right-bottom").addClass(posLeft.backgroundPositionAlignment + "-" + posTop.backgroundPositionAlignment).fadeIn("fast"); + /** Event: candy:view.roster.after-context-menu + * After context menu display + * + * Parameters: + * (String) roomJid - room where the context menu has been triggered + * (Candy.Core.ChatUser) user - User + * (jQuery.Element) element - Menu element + */ + $(Candy).triggerHandler("candy:view.roster.after-context-menu", { + roomJid: roomJid, + user: user, + element: menu + }); + return true; + } + }, + /** Function: getMenuLinks + * Extends with menu links gathered from candy:view.roster.contextmenu + * + * Parameters: + * (String) roomJid - Room in which the menu will be displayed + * (Candy.Core.ChatUser) user - User + * (jQuery.Element) elem - Parent element of the context menu + * + * Triggers: + * candy:view.roster.context-menu using {roomJid, user, elem} + * + * Returns: + * (Object) - object containing the extended menulinks. + */ + getMenuLinks: function(roomJid, user, elem) { + var menulinks, id; + var evtData = { + roomJid: roomJid, + user: user, + elem: elem, + menulinks: this.initialMenuLinks(elem) + }; + /** Event: candy:view.roster.context-menu + * Modify existing menu links (add links) + * + * In order to modify the links you need to change the object passed with an additional + * key "menulinks" containing the menulink object. + * + * Parameters: + * (String) roomJid - Room on which the menu should be displayed + * (Candy.Core.ChatUser) user - User + * (jQuery.Element) elem - Parent element of the context menu + */ + $(Candy).triggerHandler("candy:view.roster.context-menu", evtData); + menulinks = evtData.menulinks; + for (id in menulinks) { + if (menulinks.hasOwnProperty(id) && menulinks[id].requiredPermission !== undefined && !menulinks[id].requiredPermission(user, self.Room.getUser(roomJid), elem)) { + delete menulinks[id]; + } + } + return menulinks; + }, + /** Function: initialMenuLinks + * Returns initial menulinks. The following are initial: + * + * - Private Chat + * - Ignore + * - Unignore + * - Kick + * - Ban + * - Change Subject + * + * Returns: + * (Object) - object containing those menulinks + */ + initialMenuLinks: function() { + return { + "private": { + requiredPermission: function(user, me) { + return me.getNick() !== user.getNick() && Candy.Core.getRoom(Candy.View.getCurrent().roomJid) && !Candy.Core.getUser().isInPrivacyList("ignore", user.getJid()); + }, + "class": "private", + label: $.i18n._("privateActionLabel"), + callback: function(e, roomJid, user) { + $("#user-" + Candy.Util.jidToId(roomJid) + "-" + Candy.Util.jidToId(user.getJid())).click(); + } + }, + ignore: { + requiredPermission: function(user, me) { + return me.getNick() !== user.getNick() && !Candy.Core.getUser().isInPrivacyList("ignore", user.getJid()); + }, + "class": "ignore", + label: $.i18n._("ignoreActionLabel"), + callback: function(e, roomJid, user) { + Candy.View.Pane.Room.ignoreUser(roomJid, user.getJid()); + } + }, + unignore: { + requiredPermission: function(user, me) { + return me.getNick() !== user.getNick() && Candy.Core.getUser().isInPrivacyList("ignore", user.getJid()); + }, + "class": "unignore", + label: $.i18n._("unignoreActionLabel"), + callback: function(e, roomJid, user) { + Candy.View.Pane.Room.unignoreUser(roomJid, user.getJid()); + } + }, + kick: { + requiredPermission: function(user, me) { + return me.getNick() !== user.getNick() && me.isModerator() && !user.isModerator(); + }, + "class": "kick", + label: $.i18n._("kickActionLabel"), + callback: function(e, roomJid, user) { + self.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.contextModalForm, { + _label: $.i18n._("reason"), + _submit: $.i18n._("kickActionLabel") + }), true); + $("#context-modal-field").focus(); + $("#context-modal-form").submit(function() { + Candy.Core.Action.Jabber.Room.Admin.UserAction(roomJid, user.getJid(), "kick", $("#context-modal-field").val()); + self.Chat.Modal.hide(); + return false; + }); + } + }, + ban: { + requiredPermission: function(user, me) { + return me.getNick() !== user.getNick() && me.isModerator() && !user.isModerator(); + }, + "class": "ban", + label: $.i18n._("banActionLabel"), + callback: function(e, roomJid, user) { + self.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.contextModalForm, { + _label: $.i18n._("reason"), + _submit: $.i18n._("banActionLabel") + }), true); + $("#context-modal-field").focus(); + $("#context-modal-form").submit(function() { + Candy.Core.Action.Jabber.Room.Admin.UserAction(roomJid, user.getJid(), "ban", $("#context-modal-field").val()); + self.Chat.Modal.hide(); + return false; + }); + } + }, + subject: { + requiredPermission: function(user, me) { + return me.getNick() === user.getNick() && me.isModerator(); + }, + "class": "subject", + label: $.i18n._("setSubjectActionLabel"), + callback: function(e, roomJid) { + self.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.contextModalForm, { + _label: $.i18n._("subject"), + _submit: $.i18n._("setSubjectActionLabel") + }), true); + $("#context-modal-field").focus(); + $("#context-modal-form").submit(function(e) { + Candy.Core.Action.Jabber.Room.Admin.SetSubject(roomJid, $("#context-modal-field").val()); + self.Chat.Modal.hide(); + e.preventDefault(); + }); + } + } + }; + }, + /** Function: showEmoticonsMenu + * Shows the special emoticons menu + * + * Parameters: + * (Element) elem - Element on which it should be positioned to. + * + * Returns: + * (Boolean) - true + */ + showEmoticonsMenu: function(elem) { + elem = $(elem); + var pos = elem.offset(), menu = $("#context-menu"), content = $("ul", menu), emoticons = "", i; + $("#tooltip").hide(); + for (i = Candy.Util.Parser.emoticons.length - 1; i >= 0; i--) { + emoticons = '' + Candy.Util.Parser.emoticons[i].plain + '' + emoticons; + } + content.html('
  • ' + emoticons + "
  • "); + content.find("img").click(function() { + var input = Candy.View.Pane.Room.getPane(Candy.View.getCurrent().roomJid, ".message-form").children(".field"), value = input.val(), emoticon = $(this).attr("alt") + " "; + input.val(value ? value + " " + emoticon : emoticon).focus(); + // Once you make a selction, hide the menu. + menu.hide(); + }); + var posLeft = Candy.Util.getPosLeftAccordingToWindowBounds(menu, pos.left), posTop = Candy.Util.getPosTopAccordingToWindowBounds(menu, pos.top); + menu.css({ + left: posLeft.px, + top: posTop.px + }).removeClass("left-top left-bottom right-top right-bottom").addClass(posLeft.backgroundPositionAlignment + "-" + posTop.backgroundPositionAlignment).fadeIn("fast"); + return true; + } + } + }; + return self; +}(Candy.View.Pane || {}, jQuery); + +/** File: message.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Mustache, jQuery */ +/** Class: Candy.View.Pane + * Candy view pane handles everything regarding DOM updates etc. + * + * Parameters: + * (Candy.View.Pane) self - itself + * (jQuery) $ - jQuery + */ +Candy.View.Pane = function(self, $) { + /** Class: Candy.View.Pane.Message + * Message submit/show handling + */ + self.Message = { + /** Function: submit + * on submit handler for message field sends the message to the server and if it's a private chat, shows the message + * immediately because the server doesn't send back those message. + * + * Parameters: + * (Event) event - Triggered event + * + * Triggers: + * candy:view.message.before-send using {message} + * + * FIXME: as everywhere, `roomJid` might be slightly incorrect in this case + * - maybe rename this as part of a refactoring. + */ + submit: function(event) { + var roomJid = Candy.View.getCurrent().roomJid, room = Candy.View.Pane.Chat.rooms[roomJid], roomType = room.type, targetJid = room.targetJid, message = $(this).children(".field").val().substring(0, Candy.View.getOptions().crop.message.body), xhtmlMessage, evtData = { + roomJid: roomJid, + message: message, + xhtmlMessage: xhtmlMessage + }; + /** Event: candy:view.message.before-send + * Before sending a message + * + * Parameters: + * (String) roomJid - room to which the message should be sent + * (String) message - Message text + * (String) xhtmlMessage - XHTML formatted message [default: undefined] + * + * Returns: + * Boolean|undefined - if you like to stop sending the message, return false. + */ + if ($(Candy).triggerHandler("candy:view.message.before-send", evtData) === false) { + event.preventDefault(); + return; + } + message = evtData.message; + xhtmlMessage = evtData.xhtmlMessage; + Candy.Core.Action.Jabber.Room.Message(targetJid, message, roomType, xhtmlMessage); + // Private user chat. Jabber won't notify the user who has sent the message. Just show it as the user hits the button... + if (roomType === "chat" && message) { + self.Message.show(roomJid, self.Room.getUser(roomJid).getNick(), message, xhtmlMessage, undefined, Candy.Core.getUser().getJid()); + } + // Clear input and set focus to it + $(this).children(".field").val("").focus(); + event.preventDefault(); + }, + /** Function: show + * Show a message in the message pane + * + * Parameters: + * (String) roomJid - room in which the message has been sent to + * (String) name - Name of the user which sent the message + * (String) message - Message + * (String) xhtmlMessage - XHTML formatted message [if options enableXHTML is true] + * (String) timestamp - [optional] Timestamp of the message, if not present, current date. + * (Boolean) carbon - [optional] Indication of wether or not the message was a carbon + * + * Triggers: + * candy:view.message.before-show using {roomJid, name, message} + * candy.view.message.before-render using {template, templateData} + * candy:view.message.after-show using {roomJid, name, message, element} + */ + show: function(roomJid, name, message, xhtmlMessage, timestamp, from, carbon, stanza) { + message = Candy.Util.Parser.all(message.substring(0, Candy.View.getOptions().crop.message.body)); + if (Candy.View.getOptions().enableXHTML === true && xhtmlMessage) { + xhtmlMessage = Candy.Util.parseAndCropXhtml(xhtmlMessage, Candy.View.getOptions().crop.message.body); + } + timestamp = timestamp || new Date(); + // Assume we have an ISO-8601 date string and convert it to a Date object + if (!timestamp.toDateString) { + timestamp = Candy.Util.iso8601toDate(timestamp); + } + // Before we add the new message, check to see if we should be automatically scrolling or not. + var messagePane = self.Room.getPane(roomJid, ".message-pane"); + var enableScroll = messagePane.scrollTop() + messagePane.outerHeight() === messagePane.prop("scrollHeight") || !$(messagePane).is(":visible"); + Candy.View.Pane.Chat.rooms[roomJid].enableScroll = enableScroll; + var evtData = { + roomJid: roomJid, + name: name, + message: message, + xhtmlMessage: xhtmlMessage, + from: from, + stanza: stanza + }; + /** Event: candy:view.message.before-show + * Before showing a new message + * + * Parameters: + * (String) roomJid - Room JID + * (String) name - Name of the sending user + * (String) message - Message text + * + * Returns: + * Boolean - if you don't want to show the message, return false + */ + if ($(Candy).triggerHandler("candy:view.message.before-show", evtData) === false) { + return; + } + message = evtData.message; + xhtmlMessage = evtData.xhtmlMessage; + if (xhtmlMessage !== undefined && xhtmlMessage.length > 0) { + message = xhtmlMessage; + } + if (!message) { + return; + } + var renderEvtData = { + template: Candy.View.Template.Message.item, + templateData: { + name: name, + displayName: Candy.Util.crop(name, Candy.View.getOptions().crop.message.nickname), + message: message, + time: Candy.Util.localizedTime(timestamp), + timestamp: timestamp.toISOString(), + roomjid: roomJid, + from: from + }, + stanza: stanza + }; + /** Event: candy:view.message.before-render + * Before rendering the message element + * + * Parameters: + * (String) template - Template to use + * (Object) templateData - Template data consists of: + * - (String) name - Name of the sending user + * - (String) displayName - Cropped name of the sending user + * - (String) message - Message text + * - (String) time - Localized time of message + * - (String) timestamp - ISO formatted timestamp of message + */ + $(Candy).triggerHandler("candy:view.message.before-render", renderEvtData); + var html = Mustache.to_html(renderEvtData.template, renderEvtData.templateData); + self.Room.appendToMessagePane(roomJid, html); + var elem = self.Room.getPane(roomJid, ".message-pane").children().last(); + // click on username opens private chat + elem.find("a.label").click(function(event) { + event.preventDefault(); + // Check if user is online and not myself + var room = Candy.Core.getRoom(roomJid); + if (room && name !== self.Room.getUser(Candy.View.getCurrent().roomJid).getNick() && room.getRoster().get(roomJid + "/" + name)) { + if (Candy.View.Pane.PrivateRoom.open(roomJid + "/" + name, name, true) === false) { + return false; + } + } + }); + if (!carbon) { + var notifyEvtData = { + name: name, + displayName: Candy.Util.crop(name, Candy.View.getOptions().crop.message.nickname), + roomJid: roomJid, + message: message, + time: Candy.Util.localizedTime(timestamp), + timestamp: timestamp.toISOString() + }; + /** Event: candy:view.message.notify + * Notify the user (optionally) that a new message has been received + * + * Parameters: + * (Object) templateData - Template data consists of: + * - (String) name - Name of the sending user + * - (String) displayName - Cropped name of the sending user + * - (String) roomJid - JID into which the message was sent + * - (String) message - Message text + * - (String) time - Localized time of message + * - (String) timestamp - ISO formatted timestamp of message + * - (Boolean) carbon - Indication of wether or not the message was a carbon + */ + $(Candy).triggerHandler("candy:view.message.notify", notifyEvtData); + // Check to see if in-core notifications are disabled + if (!Candy.Core.getOptions().disableCoreNotifications) { + if (Candy.View.getCurrent().roomJid !== roomJid || !self.Window.hasFocus()) { + self.Chat.increaseUnreadMessages(roomJid); + if (!self.Window.hasFocus()) { + // Notify the user about a new private message OR on all messages if configured + if (Candy.View.Pane.Chat.rooms[roomJid].type === "chat" || Candy.View.getOptions().updateWindowOnAllMessages === true) { + self.Chat.Toolbar.playSound(); + } + } + } + } + if (Candy.View.getCurrent().roomJid === roomJid) { + self.Room.scrollToBottom(roomJid); + } + } + evtData.element = elem; + /** Event: candy:view.message.after-show + * Triggered after showing a message + * + * Parameters: + * (String) roomJid - Room JID + * (jQuery.Element) element - User element + * (String) name - Name of the sending user + * (String) message - Message text + */ + $(Candy).triggerHandler("candy:view.message.after-show", evtData); + } + }; + return self; +}(Candy.View.Pane || {}, jQuery); + +/** File: privateRoom.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Strophe, jQuery */ +/** Class: Candy.View.Pane + * Candy view pane handles everything regarding DOM updates etc. + * + * Parameters: + * (Candy.View.Pane) self - itself + * (jQuery) $ - jQuery + */ +Candy.View.Pane = function(self, $) { + /** Class: Candy.View.Pane.PrivateRoom + * Private room handling + */ + self.PrivateRoom = { + /** Function: open + * Opens a new private room + * + * Parameters: + * (String) roomJid - Room jid to open + * (String) roomName - Room name + * (Boolean) switchToRoom - If true, displayed room switches automatically to this room + * (e.g. when user clicks itself on another user to open a private chat) + * (Boolean) isNoConferenceRoomJid - true if a 3rd-party client sends a direct message to this user (not via the room) + * then the username is the node and not the resource. This param addresses this case. + * + * Triggers: + * candy:view.private-room.after-open using {roomJid, type, element} + */ + open: function(roomJid, roomName, switchToRoom, isNoConferenceRoomJid) { + var user = isNoConferenceRoomJid ? Candy.Core.getUser() : self.Room.getUser(Strophe.getBareJidFromJid(roomJid)), evtData = { + roomJid: roomJid, + roomName: roomName, + type: "chat" + }; + /** Event: candy:view.private-room.before-open + * Before opening a new private room + * + * Parameters: + * (String) roomJid - Room JID + * (String) roomName - Room name + * (String) type - 'chat' + * + * Returns: + * Boolean - if you don't want to open the private room, return false + */ + if ($(Candy).triggerHandler("candy:view.private-room.before-open", evtData) === false) { + return false; + } + // if target user is in privacy list, don't open the private chat. + if (Candy.Core.getUser().isInPrivacyList("ignore", roomJid)) { + return false; + } + if (!self.Chat.rooms[roomJid]) { + if (self.Room.init(roomJid, roomName, "chat") === false) { + return false; + } + } + if (switchToRoom) { + self.Room.show(roomJid); + } + self.Roster.update(roomJid, new Candy.Core.ChatUser(roomJid, roomName), "join", user); + self.Roster.update(roomJid, user, "join", user); + self.PrivateRoom.setStatus(roomJid, "join"); + evtData.element = self.Room.getPane(roomJid); + /** Event: candy:view.private-room.after-open + * After opening a new private room + * + * Parameters: + * (String) roomJid - Room JID + * (String) type - 'chat' + * (jQuery.Element) element - User element + */ + $(Candy).triggerHandler("candy:view.private-room.after-open", evtData); + }, + /** Function: setStatus + * Set offline or online status for private rooms (when one of the participants leaves the room) + * + * Parameters: + * (String) roomJid - Private room jid + * (String) status - "leave"/"join" + */ + setStatus: function(roomJid, status) { + var messageForm = self.Room.getPane(roomJid, ".message-form"); + if (status === "join") { + self.Chat.getTab(roomJid).addClass("online").removeClass("offline"); + messageForm.children(".field").removeAttr("disabled"); + messageForm.children(".submit").removeAttr("disabled"); + self.Chat.getTab(roomJid); + } else if (status === "leave") { + self.Chat.getTab(roomJid).addClass("offline").removeClass("online"); + messageForm.children(".field").attr("disabled", true); + messageForm.children(".submit").attr("disabled", true); + } + }, + /** Function: changeNick + * Changes the nick for every private room opened with this roomJid. + * + * Parameters: + * (String) roomJid - Public room jid + * (Candy.Core.ChatUser) user - User which changes his nick + */ + changeNick: function(roomJid, user) { + Candy.Core.log("[View:Pane:PrivateRoom] changeNick"); + var previousPrivateRoomJid = roomJid + "/" + user.getPreviousNick(), newPrivateRoomJid = roomJid + "/" + user.getNick(), previousPrivateRoomId = Candy.Util.jidToId(previousPrivateRoomJid), newPrivateRoomId = Candy.Util.jidToId(newPrivateRoomJid), room = self.Chat.rooms[previousPrivateRoomJid], roomElement, roomTabElement; + // it could happen that the new private room is already existing -> close it first. + // if this is not done, errors appear as two rooms would have the same id + if (self.Chat.rooms[newPrivateRoomJid]) { + self.Room.close(newPrivateRoomJid); + } + if (room) { + /* someone I talk with, changed nick */ + room.name = user.getNick(); + room.id = newPrivateRoomId; + self.Chat.rooms[newPrivateRoomJid] = room; + delete self.Chat.rooms[previousPrivateRoomJid]; + roomElement = $("#chat-room-" + previousPrivateRoomId); + if (roomElement) { + roomElement.attr("data-roomjid", newPrivateRoomJid); + roomElement.attr("id", "chat-room-" + newPrivateRoomId); + roomTabElement = $('#chat-tabs li[data-roomjid="' + previousPrivateRoomJid + '"]'); + roomTabElement.attr("data-roomjid", newPrivateRoomJid); + /* TODO: The '@' is defined in the template. Somehow we should + * extract both things into our CSS or do something else to prevent that. + */ + roomTabElement.children("a.label").text("@" + user.getNick()); + if (Candy.View.getCurrent().roomJid === previousPrivateRoomJid) { + Candy.View.getCurrent().roomJid = newPrivateRoomJid; + } + } + } else { + /* I changed the nick */ + roomElement = $('.room-pane.roomtype-chat[data-userjid="' + previousPrivateRoomJid + '"]'); + if (roomElement.length) { + previousPrivateRoomId = Candy.Util.jidToId(roomElement.attr("data-roomjid")); + roomElement.attr("data-userjid", newPrivateRoomJid); + } + } + if (roomElement && roomElement.length) { + self.Roster.changeNick(previousPrivateRoomId, user); + } + } + }; + return self; +}(Candy.View.Pane || {}, jQuery); + +/** File: room.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Mustache, Strophe, jQuery */ +/** Class: Candy.View.Pane + * Candy view pane handles everything regarding DOM updates etc. + * + * Parameters: + * (Candy.View.Pane) self - itself + * (jQuery) $ - jQuery + */ +Candy.View.Pane = function(self, $) { + /** Class: Candy.View.Pane.Room + * Everything which belongs to room view things belongs here. + */ + self.Room = { + /** Function: init + * Initialize a new room and inserts the room html into the DOM + * + * Parameters: + * (String) roomJid - Room JID + * (String) roomName - Room name + * (String) roomType - Type: either "groupchat" or "chat" (private chat) + * + * Uses: + * - + * - + * - + * + * Triggers: + * candy:view.room.after-add using {roomJid, type, element} + * + * Returns: + * (String) - the room id of the element created. + */ + init: function(roomJid, roomName, roomType) { + roomType = roomType || "groupchat"; + roomJid = Candy.Util.unescapeJid(roomJid); + var evtData = { + roomJid: roomJid, + type: roomType + }; + /** Event: candy:view.room.before-add + * Before initialising a room + * + * Parameters: + * (String) roomJid - Room JID + * (String) type - Room Type + * + * Returns: + * Boolean - if you don't want to initialise the room, return false. + */ + if ($(Candy).triggerHandler("candy:view.room.before-add", evtData) === false) { + return false; + } + // First room, show sound control + if (Candy.Util.isEmptyObject(self.Chat.rooms)) { + self.Chat.Toolbar.show(); + self.Chat.showMobileIcon(); + } + var roomId = Candy.Util.jidToId(roomJid); + self.Chat.rooms[roomJid] = { + id: roomId, + usercount: 0, + name: roomName, + type: roomType, + messageCount: 0, + scrollPosition: -1, + targetJid: roomJid + }; + $("#chat-rooms").append(Mustache.to_html(Candy.View.Template.Room.pane, { + roomId: roomId, + roomJid: roomJid, + roomType: roomType, + form: { + _messageSubmit: $.i18n._("messageSubmit") + }, + roster: { + _userOnline: $.i18n._("userOnline") + } + }, { + roster: Candy.View.Template.Roster.pane, + messages: Candy.View.Template.Message.pane, + form: Candy.View.Template.Room.form + })); + self.Chat.addTab(roomJid, roomName, roomType); + self.Room.getPane(roomJid, ".message-form").submit(self.Message.submit); + self.Room.scrollToBottom(roomJid); + evtData.element = self.Room.getPane(roomJid); + /** Event: candy:view.room.after-add + * After initialising a room + * + * Parameters: + * (String) roomJid - Room JID + * (String) type - Room Type + * (jQuery.Element) element - Room element + */ + $(Candy).triggerHandler("candy:view.room.after-add", evtData); + return roomId; + }, + /** Function: show + * Show a specific room and hides the other rooms (if there are any) + * + * Parameters: + * (String) roomJid - room jid to show + * + * Triggers: + * candy:view.room.after-show using {roomJid, element} + * candy:view.room.after-hide using {roomJid, element} + */ + show: function(roomJid) { + var roomId = self.Chat.rooms[roomJid].id, evtData; + $(".room-pane").each(function() { + var elem = $(this); + evtData = { + roomJid: elem.attr("data-roomjid"), + type: elem.attr("data-roomtype"), + element: elem + }; + if (elem.attr("id") === "chat-room-" + roomId) { + elem.show(); + Candy.View.getCurrent().roomJid = roomJid; + self.Chat.setActiveTab(roomJid); + self.Chat.Toolbar.update(roomJid); + self.Chat.clearUnreadMessages(roomJid); + self.Room.setFocusToForm(roomJid); + self.Room.scrollToBottom(roomJid); + /** Event: candy:view.room.after-show + * After showing a room + * + * Parameters: + * (String) roomJid - Room JID + * (String) type - Room Type + * (jQuery.Element) element - Room element + */ + $(Candy).triggerHandler("candy:view.room.after-show", evtData); + } else { + elem.hide(); + /** Event: candy:view.room.after-hide + * After hiding a room + * + * Parameters: + * (String) roomJid - Room JID + * (String) type - Room Type + * (jQuery.Element) element - Room element + */ + $(Candy).triggerHandler("candy:view.room.after-hide", evtData); + } + }); + }, + /** Function: setSubject + * Called when someone changes the subject in the channel + * + * Triggers: + * candy:view.room.after-subject-change using {roomJid, element, subject} + * + * Parameters: + * (String) roomJid - Room Jid + * (String) subject - The new subject + */ + setSubject: function(roomJid, subject) { + subject = Candy.Util.Parser.linkify(Candy.Util.Parser.escape(subject)); + var timestamp = new Date(); + var html = Mustache.to_html(Candy.View.Template.Room.subject, { + subject: subject, + roomName: self.Chat.rooms[roomJid].name, + _roomSubject: $.i18n._("roomSubject"), + time: Candy.Util.localizedTime(timestamp), + timestamp: timestamp.toISOString() + }); + self.Room.appendToMessagePane(roomJid, html); + self.Room.scrollToBottom(roomJid); + /** Event: candy:view.room.after-subject-change + * After changing the subject of a room + * + * Parameters: + * (String) roomJid - Room JID + * (jQuery.Element) element - Room element + * (String) subject - New subject + */ + $(Candy).triggerHandler("candy:view.room.after-subject-change", { + roomJid: roomJid, + element: self.Room.getPane(roomJid), + subject: subject + }); + }, + /** Function: close + * Close a room and remove everything in the DOM belonging to this room. + * + * NOTICE: There's a rendering bug in Opera when all rooms have been closed. + * (Take a look in the source for a more detailed description) + * + * Triggers: + * candy:view.room.after-close using {roomJid} + * + * Parameters: + * (String) roomJid - Room to close + */ + close: function(roomJid) { + self.Chat.removeTab(roomJid); + self.Window.clearUnreadMessages(); + /* TODO: + There's a rendering bug in Opera which doesn't redraw (remove) the message form. + Only a cosmetical issue (when all tabs are closed) but it's annoying... + This happens when form has no focus too. Maybe it's because of CSS positioning. + */ + self.Room.getPane(roomJid).remove(); + var openRooms = $("#chat-rooms").children(); + if (Candy.View.getCurrent().roomJid === roomJid) { + Candy.View.getCurrent().roomJid = null; + if (openRooms.length === 0) { + self.Chat.allTabsClosed(); + } else { + self.Room.show(openRooms.last().attr("data-roomjid")); + } + } + delete self.Chat.rooms[roomJid]; + /** Event: candy:view.room.after-close + * After closing a room + * + * Parameters: + * (String) roomJid - Room JID + */ + $(Candy).triggerHandler("candy:view.room.after-close", { + roomJid: roomJid + }); + }, + /** Function: appendToMessagePane + * Append a new message to the message pane. + * + * Parameters: + * (String) roomJid - Room JID + * (String) html - rendered message html + */ + appendToMessagePane: function(roomJid, html) { + self.Room.getPane(roomJid, ".message-pane").append(html); + self.Chat.rooms[roomJid].messageCount++; + self.Room.sliceMessagePane(roomJid); + }, + /** Function: sliceMessagePane + * Slices the message pane after the max amount of messages specified in the Candy View options (limit setting). + * + * This is done to hopefully prevent browsers from getting slow after a certain amount of messages in the DOM. + * + * The slice is only done when autoscroll is on, because otherwise someone might lose exactly the message he want to look for. + * + * Parameters: + * (String) roomJid - Room JID + */ + sliceMessagePane: function(roomJid) { + // Only clean if autoscroll is enabled + if (self.Window.autoscroll) { + var options = Candy.View.getOptions().messages; + if (self.Chat.rooms[roomJid].messageCount > options.limit) { + self.Room.getPane(roomJid, ".message-pane").children().slice(0, options.remove).remove(); + self.Chat.rooms[roomJid].messageCount -= options.remove; + } + } + }, + /** Function: scrollToBottom + * Scroll to bottom wrapper for to be able to disable it by overwriting the function. + * + * Parameters: + * (String) roomJid - Room JID + * + * Uses: + * - + */ + scrollToBottom: function(roomJid) { + self.Room.onScrollToBottom(roomJid); + }, + /** Function: onScrollToBottom + * Scrolls to the latest message received/sent. + * + * Parameters: + * (String) roomJid - Room JID + */ + onScrollToBottom: function(roomJid) { + var messagePane = self.Room.getPane(roomJid, ".message-pane-wrapper"); + if (Candy.View.Pane.Chat.rooms[roomJid].enableScroll === true) { + messagePane.scrollTop(messagePane.prop("scrollHeight")); + } else { + return false; + } + }, + /** Function: onScrollToStoredPosition + * When autoscroll is off, the position where the scrollbar is has to be stored for each room, because it otherwise + * goes to the top in the message window. + * + * Parameters: + * (String) roomJid - Room JID + */ + onScrollToStoredPosition: function(roomJid) { + // This should only apply when entering a room... + // ... therefore we set scrollPosition to -1 after execution. + if (self.Chat.rooms[roomJid].scrollPosition > -1) { + var messagePane = self.Room.getPane(roomJid, ".message-pane-wrapper"); + messagePane.scrollTop(self.Chat.rooms[roomJid].scrollPosition); + self.Chat.rooms[roomJid].scrollPosition = -1; + } + }, + /** Function: setFocusToForm + * Set focus to the message input field within the message form. + * + * Parameters: + * (String) roomJid - Room JID + */ + setFocusToForm: function(roomJid) { + // If we're on mobile, don't focus the input field. + if (Candy.Util.isMobile()) { + return true; + } + var pane = self.Room.getPane(roomJid, ".message-form"); + if (pane) { + // IE8 will fail maybe, because the field isn't there yet. + try { + pane.children(".field")[0].focus(); + } catch (e) {} + } + }, + /** Function: setUser + * Sets or updates the current user in the specified room (called by ) and set specific informations + * (roles and affiliations) on the room tab (chat-pane). + * + * Parameters: + * (String) roomJid - Room in which the user is set to. + * (Candy.Core.ChatUser) user - The user + */ + setUser: function(roomJid, user) { + self.Chat.rooms[roomJid].user = user; + var roomPane = self.Room.getPane(roomJid), chatPane = $("#chat-pane"); + roomPane.attr("data-userjid", user.getJid()); + // Set classes based on user role / affiliation + if (user.isModerator()) { + if (user.getRole() === user.ROLE_MODERATOR) { + chatPane.addClass("role-moderator"); + } + if (user.getAffiliation() === user.AFFILIATION_OWNER) { + chatPane.addClass("affiliation-owner"); + } + } else { + chatPane.removeClass("role-moderator affiliation-owner"); + } + self.Chat.Context.init(); + }, + /** Function: getUser + * Get the current user in the room specified with the jid + * + * Parameters: + * (String) roomJid - Room of which the user should be returned from + * + * Returns: + * (Candy.Core.ChatUser) - user + */ + getUser: function(roomJid) { + return self.Chat.rooms[roomJid].user; + }, + /** Function: ignoreUser + * Ignore specified user and add the ignore icon to the roster item of the user + * + * Parameters: + * (String) roomJid - Room in which the user should be ignored + * (String) userJid - User which should be ignored + */ + ignoreUser: function(roomJid, userJid) { + Candy.Core.Action.Jabber.Room.IgnoreUnignore(userJid); + Candy.View.Pane.Room.addIgnoreIcon(roomJid, userJid); + }, + /** Function: unignoreUser + * Unignore an ignored user and remove the ignore icon of the roster item. + * + * Parameters: + * (String) roomJid - Room in which the user should be unignored + * (String) userJid - User which should be unignored + */ + unignoreUser: function(roomJid, userJid) { + Candy.Core.Action.Jabber.Room.IgnoreUnignore(userJid); + Candy.View.Pane.Room.removeIgnoreIcon(roomJid, userJid); + }, + /** Function: addIgnoreIcon + * Add the ignore icon to the roster item of the specified user + * + * Parameters: + * (String) roomJid - Room in which the roster item should be updated + * (String) userJid - User of which the roster item should be updated + */ + addIgnoreIcon: function(roomJid, userJid) { + if (Candy.View.Pane.Chat.rooms[userJid]) { + $("#user-" + Candy.View.Pane.Chat.rooms[userJid].id + "-" + Candy.Util.jidToId(userJid)).addClass("status-ignored"); + } + if (Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(roomJid)]) { + $("#user-" + Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(roomJid)].id + "-" + Candy.Util.jidToId(userJid)).addClass("status-ignored"); + } + }, + /** Function: removeIgnoreIcon + * Remove the ignore icon to the roster item of the specified user + * + * Parameters: + * (String) roomJid - Room in which the roster item should be updated + * (String) userJid - User of which the roster item should be updated + */ + removeIgnoreIcon: function(roomJid, userJid) { + if (Candy.View.Pane.Chat.rooms[userJid]) { + $("#user-" + Candy.View.Pane.Chat.rooms[userJid].id + "-" + Candy.Util.jidToId(userJid)).removeClass("status-ignored"); + } + if (Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(roomJid)]) { + $("#user-" + Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(roomJid)].id + "-" + Candy.Util.jidToId(userJid)).removeClass("status-ignored"); + } + }, + /** Function: getPane + * Get the chat room pane or a subPane of it (if subPane is specified) + * + * Parameters: + * (String) roomJid - Room in which the pane lies + * (String) subPane - Sub pane of the chat room pane if needed [optional] + */ + getPane: function(roomJid, subPane) { + if (self.Chat.rooms[roomJid]) { + if (subPane) { + if (self.Chat.rooms[roomJid]["pane-" + subPane]) { + return self.Chat.rooms[roomJid]["pane-" + subPane]; + } else { + self.Chat.rooms[roomJid]["pane-" + subPane] = $("#chat-room-" + self.Chat.rooms[roomJid].id).find(subPane); + return self.Chat.rooms[roomJid]["pane-" + subPane]; + } + } else { + return $("#chat-room-" + self.Chat.rooms[roomJid].id); + } + } + }, + /** Function: changeDataUserJidIfUserIsMe + * Changes the room's data-userjid attribute if the specified user is the current user. + * + * Parameters: + * (String) roomId - Id of the room + * (Candy.Core.ChatUser) user - User + */ + changeDataUserJidIfUserIsMe: function(roomId, user) { + if (user.getNick() === Candy.Core.getUser().getNick()) { + var roomElement = $("#chat-room-" + roomId); + roomElement.attr("data-userjid", Strophe.getBareJidFromJid(roomElement.attr("data-userjid")) + "/" + user.getNick()); + } + } + }; + return self; +}(Candy.View.Pane || {}, jQuery); + +/** File: roster.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, Mustache, Strophe, jQuery */ +/** Class: Candy.View.Pane + * Candy view pane handles everything regarding DOM updates etc. + * + * Parameters: + * (Candy.View.Pane) self - itself + * (jQuery) $ - jQuery + */ +Candy.View.Pane = function(self, $) { + /** Class Candy.View.Pane.Roster + * Handles everyhing regarding roster updates. + */ + self.Roster = { + /** Function: update + * Called by to update the roster if needed. + * Adds/removes users from the roster list or updates informations on their items (roles, affiliations etc.) + * + * TODO: Refactoring, this method has too much LOC. + * + * Parameters: + * (String) roomJid - Room JID in which the update happens + * (Candy.Core.ChatUser) user - User on which the update happens + * (String) action - one of "join", "leave", "kick" and "ban" + * (Candy.Core.ChatUser) currentUser - Current user + * + * Triggers: + * candy:view.roster.before-update using {roomJid, user, action, element} + * candy:view.roster.after-update using {roomJid, user, action, element} + */ + update: function(roomJid, user, action, currentUser) { + Candy.Core.log("[View:Pane:Roster] " + action); + var roomId = self.Chat.rooms[roomJid].id, userId = Candy.Util.jidToId(user.getJid()), usercountDiff = -1, userElem = $("#user-" + roomId + "-" + userId), evtData = { + roomJid: roomJid, + user: user, + action: action, + element: userElem + }; + /** Event: candy:view.roster.before-update + * Before updating the roster of a room + * + * Parameters: + * (String) roomJid - Room JID + * (Candy.Core.ChatUser) user - User + * (String) action - [join, leave, kick, ban] + * (jQuery.Element) element - User element + */ + $(Candy).triggerHandler("candy:view.roster.before-update", evtData); + // a user joined the room + if (action === "join") { + usercountDiff = 1; + if (userElem.length < 1) { + self.Roster._insertUser(roomJid, roomId, user, userId, currentUser); + self.Roster.showJoinAnimation(user, userId, roomId, roomJid, currentUser); + } else { + usercountDiff = 0; + userElem.remove(); + self.Roster._insertUser(roomJid, roomId, user, userId, currentUser); + // it's me, update the toolbar + if (currentUser !== undefined && user.getNick() === currentUser.getNick() && self.Room.getUser(roomJid)) { + self.Chat.Toolbar.update(roomJid); + } + } + // Presence of client + if (currentUser !== undefined && currentUser.getNick() === user.getNick()) { + self.Room.setUser(roomJid, user); + } else { + $("#user-" + roomId + "-" + userId).click(self.Roster.userClick); + } + $("#user-" + roomId + "-" + userId + " .context").click(function(e) { + self.Chat.Context.show(e.currentTarget, roomJid, user); + e.stopPropagation(); + }); + // check if current user is ignoring the user who has joined. + if (currentUser !== undefined && currentUser.isInPrivacyList("ignore", user.getJid())) { + Candy.View.Pane.Room.addIgnoreIcon(roomJid, user.getJid()); + } + } else if (action === "leave") { + self.Roster.leaveAnimation("user-" + roomId + "-" + userId); + // always show leave message in private room, even if status messages have been disabled + if (self.Chat.rooms[roomJid].type === "chat") { + self.Chat.onInfoMessage(roomJid, null, $.i18n._("userLeftRoom", [ user.getNick() ])); + } else { + self.Chat.infoMessage(roomJid, null, $.i18n._("userLeftRoom", [ user.getNick() ]), ""); + } + } else if (action === "nickchange") { + usercountDiff = 0; + self.Roster.changeNick(roomId, user); + self.Room.changeDataUserJidIfUserIsMe(roomId, user); + self.PrivateRoom.changeNick(roomJid, user); + var infoMessage = $.i18n._("userChangedNick", [ user.getPreviousNick(), user.getNick() ]); + self.Chat.infoMessage(roomJid, null, infoMessage); + } else if (action === "kick") { + self.Roster.leaveAnimation("user-" + roomId + "-" + userId); + self.Chat.onInfoMessage(roomJid, null, $.i18n._("userHasBeenKickedFromRoom", [ user.getNick() ])); + } else if (action === "ban") { + self.Roster.leaveAnimation("user-" + roomId + "-" + userId); + self.Chat.onInfoMessage(roomJid, null, $.i18n._("userHasBeenBannedFromRoom", [ user.getNick() ])); + } + // Update user count + Candy.View.Pane.Chat.rooms[roomJid].usercount += usercountDiff; + if (roomJid === Candy.View.getCurrent().roomJid) { + Candy.View.Pane.Chat.Toolbar.updateUsercount(Candy.View.Pane.Chat.rooms[roomJid].usercount); + } + // in case there's been a join, the element is now there (previously not) + evtData.element = $("#user-" + roomId + "-" + userId); + /** Event: candy:view.roster.after-update + * After updating a room's roster + * + * Parameters: + * (String) roomJid - Room JID + * (Candy.Core.ChatUser) user - User + * (String) action - [join, leave, kick, ban] + * (jQuery.Element) element - User element + */ + $(Candy).triggerHandler("candy:view.roster.after-update", evtData); + }, + _insertUser: function(roomJid, roomId, user, userId, currentUser) { + var contact = user.getContact(); + var html = Mustache.to_html(Candy.View.Template.Roster.user, { + roomId: roomId, + userId: userId, + userJid: user.getJid(), + realJid: user.getRealJid(), + status: user.getStatus(), + contact_status: contact ? contact.getStatus() : "unavailable", + nick: user.getNick(), + displayNick: Candy.Util.crop(user.getNick(), Candy.View.getOptions().crop.roster.nickname), + role: user.getRole(), + affiliation: user.getAffiliation(), + me: currentUser !== undefined && user.getNick() === currentUser.getNick(), + tooltipRole: $.i18n._("tooltipRole"), + tooltipIgnored: $.i18n._("tooltipIgnored") + }); + var userInserted = false, rosterPane = self.Room.getPane(roomJid, ".roster-pane"); + // there are already users in the roster + if (rosterPane.children().length > 0) { + // insert alphabetically, sorted by status + var userSortCompare = self.Roster._userSortCompare(user.getNick(), user.getStatus()); + rosterPane.children().each(function() { + var elem = $(this); + if (self.Roster._userSortCompare(elem.attr("data-nick"), elem.attr("data-status")) > userSortCompare) { + elem.before(html); + userInserted = true; + return false; + } + return true; + }); + } + // first user in roster + if (!userInserted) { + rosterPane.append(html); + } + }, + _userSortCompare: function(nick, status) { + var statusWeight; + switch (status) { + case "available": + statusWeight = 1; + break; + + case "unavailable": + statusWeight = 9; + break; + + default: + statusWeight = 8; + } + return statusWeight + nick.toUpperCase(); + }, + /** Function: userClick + * Click handler for opening a private room + */ + userClick: function() { + var elem = $(this), realJid = elem.attr("data-real-jid"), useRealJid = Candy.Core.getOptions().useParticipantRealJid && (realJid !== undefined && realJid !== null && realJid !== ""), targetJid = useRealJid && realJid ? Strophe.getBareJidFromJid(realJid) : elem.attr("data-jid"); + self.PrivateRoom.open(targetJid, elem.attr("data-nick"), true, useRealJid); + }, + /** Function: showJoinAnimation + * Shows join animation if needed + * + * FIXME: Refactor. Part of this will be done by the big room improvements + */ + showJoinAnimation: function(user, userId, roomId, roomJid, currentUser) { + // don't show if the user has recently changed the nickname. + var rosterUserId = "user-" + roomId + "-" + userId, $rosterUserElem = $("#" + rosterUserId); + if (!user.getPreviousNick() || !$rosterUserElem || $rosterUserElem.is(":visible") === false) { + self.Roster.joinAnimation(rosterUserId); + // only show other users joining & don't show if there's no message in the room. + if (currentUser !== undefined && user.getNick() !== currentUser.getNick() && self.Room.getUser(roomJid)) { + // always show join message in private room, even if status messages have been disabled + if (self.Chat.rooms[roomJid].type === "chat") { + self.Chat.onInfoMessage(roomJid, null, $.i18n._("userJoinedRoom", [ user.getNick() ])); + } else { + self.Chat.infoMessage(roomJid, null, $.i18n._("userJoinedRoom", [ user.getNick() ])); + } + } + } + }, + /** Function: joinAnimation + * Animates specified elementId on join + * + * Parameters: + * (String) elementId - Specific element to do the animation on + */ + joinAnimation: function(elementId) { + $("#" + elementId).stop(true).slideDown("normal", function() { + $(this).animate({ + opacity: 1 + }); + }); + }, + /** Function: leaveAnimation + * Leave animation for specified element id and removes the DOM element on completion. + * + * Parameters: + * (String) elementId - Specific element to do the animation on + */ + leaveAnimation: function(elementId) { + $("#" + elementId).stop(true).attr("id", "#" + elementId + "-leaving").animate({ + opacity: 0 + }, { + complete: function() { + $(this).slideUp("normal", function() { + $(this).remove(); + }); + } + }); + }, + /** Function: changeNick + * Change nick of an existing user in the roster + * + * UserId has to be recalculated from the user because at the time of this call, + * the user is already set with the new jid & nick. + * + * Parameters: + * (String) roomId - Id of the room + * (Candy.Core.ChatUser) user - User object + */ + changeNick: function(roomId, user) { + Candy.Core.log("[View:Pane:Roster] changeNick"); + var previousUserJid = Strophe.getBareJidFromJid(user.getJid()) + "/" + user.getPreviousNick(), elementId = "user-" + roomId + "-" + Candy.Util.jidToId(previousUserJid), el = $("#" + elementId); + el.attr("data-nick", user.getNick()); + el.attr("data-jid", user.getJid()); + el.children("div.label").text(user.getNick()); + el.attr("id", "user-" + roomId + "-" + Candy.Util.jidToId(user.getJid())); + } + }; + return self; +}(Candy.View.Pane || {}, jQuery); + +/** File: window.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy, jQuery, window */ +/** Class: Candy.View.Pane + * Candy view pane handles everything regarding DOM updates etc. + * + * Parameters: + * (Candy.View.Pane) self - itself + * (jQuery) $ - jQuery + */ +Candy.View.Pane = function(self) { + /** Class: Candy.View.Pane.Window + * Window related view updates + */ + self.Window = { + /** PrivateVariable: _hasFocus + * Window has focus + */ + _hasFocus: true, + /** PrivateVariable: _plainTitle + * Document title + */ + _plainTitle: window.top.document.title, + /** PrivateVariable: _unreadMessagesCount + * Unread messages count + */ + _unreadMessagesCount: 0, + /** Variable: autoscroll + * Boolean whether autoscroll is enabled + */ + autoscroll: true, + /** Function: hasFocus + * Checks if window has focus + * + * Returns: + * (Boolean) + */ + hasFocus: function() { + return self.Window._hasFocus; + }, + /** Function: increaseUnreadMessages + * Increases unread message count in window title by one. + */ + increaseUnreadMessages: function() { + self.Window.renderUnreadMessages(++self.Window._unreadMessagesCount); + }, + /** Function: reduceUnreadMessages + * Reduce unread message count in window title by `num`. + * + * Parameters: + * (Integer) num - Unread message count will be reduced by this value + */ + reduceUnreadMessages: function(num) { + self.Window._unreadMessagesCount -= num; + if (self.Window._unreadMessagesCount <= 0) { + self.Window.clearUnreadMessages(); + } else { + self.Window.renderUnreadMessages(self.Window._unreadMessagesCount); + } + }, + /** Function: clearUnreadMessages + * Clear unread message count in window title. + */ + clearUnreadMessages: function() { + self.Window._unreadMessagesCount = 0; + window.top.document.title = self.Window._plainTitle; + }, + /** Function: renderUnreadMessages + * Update window title to show message count. + * + * Parameters: + * (Integer) count - Number of unread messages to show in window title + */ + renderUnreadMessages: function(count) { + window.top.document.title = Candy.View.Template.Window.unreadmessages.replace("{{count}}", count).replace("{{title}}", self.Window._plainTitle); + }, + /** Function: onFocus + * Window focus event handler. + */ + onFocus: function() { + self.Window._hasFocus = true; + if (Candy.View.getCurrent().roomJid) { + self.Room.setFocusToForm(Candy.View.getCurrent().roomJid); + self.Chat.clearUnreadMessages(Candy.View.getCurrent().roomJid); + } + }, + /** Function: onBlur + * Window blur event handler. + */ + onBlur: function() { + self.Window._hasFocus = false; + } + }; + return self; +}(Candy.View.Pane || {}, jQuery); + +/** File: template.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy */ +/** Class: Candy.View.Template + * Contains mustache.js templates + */ +Candy.View.Template = function(self) { + self.Window = { + /** + * Unread messages - used to extend the window title + */ + unreadmessages: "({{count}}) {{title}}" + }; + self.Chat = { + pane: '
    {{> tabs}}{{> mobile}}{{> toolbar}}{{> rooms}}
    {{> modal}}', + rooms: '
    ', + tabs: '
      ', + mobileIcon: '
      ', + tab: '
    • ' + '{{#privateUserChat}}@{{/privateUserChat}}{{name}}' + '×' + '
    • ', + modal: '
      ×' + '' + '' + '
      ', + adminMessage: '
    • {{time}}
      ' + '{{sender}}' + '{{subject}} {{{message}}}
    • ', + infoMessage: '
    • {{time}}
      ' + '{{subject}} {{{message}}}
    • ', + toolbar: '
        ' + '
      • ' + '
      • ' + '
      • ' + '
      • ' + '
      • ' + '
      • ' + '
      ', + Context: { + menu: '
      ' + '
        ', + menulinks: '
      • {{label}}
      • ', + contextModalForm: '
        ' + '' + '' + '
        ', + adminMessageReason: '×' + "

        {{_action}}

        {{#reason}}

        {{_reason}}

        {{/reason}}" + }, + tooltip: '
        ' + '
        ' + }; + self.Room = { + pane: '
        ' + "{{> roster}}{{> messages}}{{> form}}
        ", + subject: '
      • {{time}}
        ' + '{{roomName}}' + '{{_roomSubject}} {{{subject}}}
      • ', + form: '
        ' + '
        ' + '' + '
        ' + }; + self.Roster = { + pane: '
        ', + user: '
        ' + '
        {{displayNick}}
          ' + '
        • ' + '
        • ' + '
        ' + }; + self.Message = { + pane: '
          ', + item: '
        • {{time}}
          ' + '{{displayName}}' + '{{{message}}}
        • ' + }; + self.Login = { + form: '' + }; + self.PresenceError = { + enterPasswordForm: "{{_label}}" + '
          ' + '' + '
          ', + nicknameConflictForm: "{{_label}}" + '
          ' + '' + '
          ', + displayError: "{{_error}}" + }; + return self; +}(Candy.View.Template || {}); + +/** File: translation.js + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +"use strict"; + +/* global Candy */ +/** Class: Candy.View.Translation + * Contains translations + */ +Candy.View.Translation = { + en: { + status: "Status: %s", + statusConnecting: "Connecting...", + statusConnected: "Connected", + statusDisconnecting: "Disconnecting...", + statusDisconnected: "Disconnected", + statusAuthfail: "Authentication failed", + roomSubject: "Subject:", + messageSubmit: "Send", + labelUsername: "Username:", + labelNickname: "Nickname:", + labelPassword: "Password:", + loginSubmit: "Login", + loginInvalid: "Invalid JID", + reason: "Reason:", + subject: "Subject:", + reasonWas: "Reason was: %s.", + kickActionLabel: "Kick", + youHaveBeenKickedBy: "You have been kicked from %2$s by %1$s", + youHaveBeenKicked: "You have been kicked from %s", + banActionLabel: "Ban", + youHaveBeenBannedBy: "You have been banned from %1$s by %2$s", + youHaveBeenBanned: "You have been banned from %s", + privateActionLabel: "Private chat", + ignoreActionLabel: "Ignore", + unignoreActionLabel: "Unignore", + setSubjectActionLabel: "Change Subject", + administratorMessageSubject: "Administrator", + userJoinedRoom: "%s joined the room.", + userLeftRoom: "%s left the room.", + userHasBeenKickedFromRoom: "%s has been kicked from the room.", + userHasBeenBannedFromRoom: "%s has been banned from the room.", + userChangedNick: "%1$s is now known as %2$s.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderator", + tooltipIgnored: "You ignore this user", + tooltipEmoticons: "Emoticons", + tooltipSound: "Play sound for new private messages", + tooltipAutoscroll: "Autoscroll", + tooltipStatusmessage: "Display status messages", + tooltipAdministration: "Room Administration", + tooltipUsercount: "Room Occupants", + enterRoomPassword: 'Room "%s" is password protected.', + enterRoomPasswordSubmit: "Join room", + passwordEnteredInvalid: 'Invalid password for room "%s".', + nicknameConflict: "Username already in use. Please choose another one.", + errorMembersOnly: 'You can\'t join room "%s": Insufficient rights.', + errorMaxOccupantsReached: 'You can\'t join room "%s": Too many occupants.', + errorAutojoinMissing: "No autojoin parameter set in configuration. Please set one to continue.", + antiSpamMessage: "Please do not spam. You have been blocked for a short-time." + }, + de: { + status: "Status: %s", + statusConnecting: "Verbinden...", + statusConnected: "Verbunden", + statusDisconnecting: "Verbindung trennen...", + statusDisconnected: "Verbindung getrennt", + statusAuthfail: "Authentifizierung fehlgeschlagen", + roomSubject: "Thema:", + messageSubmit: "Senden", + labelUsername: "Benutzername:", + labelNickname: "Spitzname:", + labelPassword: "Passwort:", + loginSubmit: "Anmelden", + loginInvalid: "Ungültige JID", + reason: "Begründung:", + subject: "Titel:", + reasonWas: "Begründung: %s.", + kickActionLabel: "Kick", + youHaveBeenKickedBy: "Du wurdest soeben aus dem Raum %1$s gekickt (%2$s)", + youHaveBeenKicked: "Du wurdest soeben aus dem Raum %s gekickt", + banActionLabel: "Ban", + youHaveBeenBannedBy: "Du wurdest soeben aus dem Raum %1$s verbannt (%2$s)", + youHaveBeenBanned: "Du wurdest soeben aus dem Raum %s verbannt", + privateActionLabel: "Privater Chat", + ignoreActionLabel: "Ignorieren", + unignoreActionLabel: "Nicht mehr ignorieren", + setSubjectActionLabel: "Thema ändern", + administratorMessageSubject: "Administrator", + userJoinedRoom: "%s hat soeben den Raum betreten.", + userLeftRoom: "%s hat soeben den Raum verlassen.", + userHasBeenKickedFromRoom: "%s ist aus dem Raum gekickt worden.", + userHasBeenBannedFromRoom: "%s ist aus dem Raum verbannt worden.", + userChangedNick: "%1$s hat den Nicknamen zu %2$s geändert.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderator", + tooltipIgnored: "Du ignorierst diesen Benutzer", + tooltipEmoticons: "Smileys", + tooltipSound: "Ton abspielen bei neuen privaten Nachrichten", + tooltipAutoscroll: "Autoscroll", + tooltipStatusmessage: "Statusnachrichten anzeigen", + tooltipAdministration: "Raum Administration", + tooltipUsercount: "Anzahl Benutzer im Raum", + enterRoomPassword: 'Raum "%s" ist durch ein Passwort geschützt.', + enterRoomPasswordSubmit: "Raum betreten", + passwordEnteredInvalid: 'Inkorrektes Passwort für Raum "%s".', + nicknameConflict: "Der Benutzername wird bereits verwendet. Bitte wähle einen anderen.", + errorMembersOnly: 'Du kannst den Raum "%s" nicht betreten: Ungenügende Rechte.', + errorMaxOccupantsReached: 'Du kannst den Raum "%s" nicht betreten: Benutzerlimit erreicht.', + errorAutojoinMissing: 'Keine "autojoin" Konfiguration gefunden. Bitte setze eine konfiguration um fortzufahren.', + antiSpamMessage: "Bitte nicht spammen. Du wurdest für eine kurze Zeit blockiert." + }, + fr: { + status: "Status : %s", + statusConnecting: "Connexion…", + statusConnected: "Connecté", + statusDisconnecting: "Déconnexion…", + statusDisconnected: "Déconnecté", + statusAuthfail: "L’identification a échoué", + roomSubject: "Sujet :", + messageSubmit: "Envoyer", + labelUsername: "Nom d’utilisateur :", + labelNickname: "Pseudo :", + labelPassword: "Mot de passe :", + loginSubmit: "Connexion", + loginInvalid: "JID invalide", + reason: "Motif :", + subject: "Titre :", + reasonWas: "Motif : %s.", + kickActionLabel: "Kick", + youHaveBeenKickedBy: "Vous avez été expulsé du salon %1$s (%2$s)", + youHaveBeenKicked: "Vous avez été expulsé du salon %s", + banActionLabel: "Ban", + youHaveBeenBannedBy: "Vous avez été banni du salon %1$s (%2$s)", + youHaveBeenBanned: "Vous avez été banni du salon %s", + privateActionLabel: "Chat privé", + ignoreActionLabel: "Ignorer", + unignoreActionLabel: "Ne plus ignorer", + setSubjectActionLabel: "Changer le sujet", + administratorMessageSubject: "Administrateur", + userJoinedRoom: "%s vient d’entrer dans le salon.", + userLeftRoom: "%s vient de quitter le salon.", + userHasBeenKickedFromRoom: "%s a été expulsé du salon.", + userHasBeenBannedFromRoom: "%s a été banni du salon.", + dateFormat: "dd/mm/yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Modérateur", + tooltipIgnored: "Vous ignorez cette personne", + tooltipEmoticons: "Smileys", + tooltipSound: "Jouer un son lors de la réception de messages privés", + tooltipAutoscroll: "Défilement automatique", + tooltipStatusmessage: "Afficher les changements d’état", + tooltipAdministration: "Administration du salon", + tooltipUsercount: "Nombre d’utilisateurs dans le salon", + enterRoomPassword: "Le salon %s est protégé par un mot de passe.", + enterRoomPasswordSubmit: "Entrer dans le salon", + passwordEnteredInvalid: "Le mot de passe pour le salon %s est invalide.", + nicknameConflict: "Ce nom d’utilisateur est déjà utilisé. Veuillez en choisir un autre.", + errorMembersOnly: "Vous ne pouvez pas entrer dans le salon %s : droits insuffisants.", + errorMaxOccupantsReached: "Vous ne pouvez pas entrer dans le salon %s : limite d’utilisateurs atteinte.", + antiSpamMessage: "Merci de ne pas spammer. Vous avez été bloqué pendant une courte période." + }, + nl: { + status: "Status: %s", + statusConnecting: "Verbinding maken...", + statusConnected: "Verbinding is gereed", + statusDisconnecting: "Verbinding verbreken...", + statusDisconnected: "Verbinding is verbroken", + statusAuthfail: "Authenticatie is mislukt", + roomSubject: "Onderwerp:", + messageSubmit: "Verstuur", + labelUsername: "Gebruikersnaam:", + labelPassword: "Wachtwoord:", + loginSubmit: "Inloggen", + loginInvalid: "JID is onjuist", + reason: "Reden:", + subject: "Onderwerp:", + reasonWas: "De reden was: %s.", + kickActionLabel: "Verwijderen", + youHaveBeenKickedBy: "Je bent verwijderd van %1$s door %2$s", + youHaveBeenKicked: "Je bent verwijderd van %s", + banActionLabel: "Blokkeren", + youHaveBeenBannedBy: "Je bent geblokkeerd van %1$s door %2$s", + youHaveBeenBanned: "Je bent geblokkeerd van %s", + privateActionLabel: "Prive gesprek", + ignoreActionLabel: "Negeren", + unignoreActionLabel: "Niet negeren", + setSubjectActionLabel: "Onderwerp wijzigen", + administratorMessageSubject: "Beheerder", + userJoinedRoom: "%s komt de chat binnen.", + userLeftRoom: "%s heeft de chat verlaten.", + userHasBeenKickedFromRoom: "%s is verwijderd.", + userHasBeenBannedFromRoom: "%s is geblokkeerd.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderator", + tooltipIgnored: "Je negeert deze gebruiker", + tooltipEmoticons: "Emotie-iconen", + tooltipSound: "Speel een geluid af bij nieuwe privé berichten.", + tooltipAutoscroll: "Automatisch scrollen", + tooltipStatusmessage: "Statusberichten weergeven", + tooltipAdministration: "Instellingen", + tooltipUsercount: "Gebruikers", + enterRoomPassword: 'De Chatroom "%s" is met een wachtwoord beveiligd.', + enterRoomPasswordSubmit: "Ga naar Chatroom", + passwordEnteredInvalid: 'Het wachtwoord voor de Chatroom "%s" is onjuist.', + nicknameConflict: "De gebruikersnaam is reeds in gebruik. Probeer a.u.b. een andere gebruikersnaam.", + errorMembersOnly: 'Je kunt niet deelnemen aan de Chatroom "%s": Je hebt onvoldoende rechten.', + errorMaxOccupantsReached: 'Je kunt niet deelnemen aan de Chatroom "%s": Het maximum aantal gebruikers is bereikt.', + antiSpamMessage: "Het is niet toegestaan om veel berichten naar de server te versturen. Je bent voor een korte periode geblokkeerd." + }, + es: { + status: "Estado: %s", + statusConnecting: "Conectando...", + statusConnected: "Conectado", + statusDisconnecting: "Desconectando...", + statusDisconnected: "Desconectado", + statusAuthfail: "Falló la autenticación", + roomSubject: "Asunto:", + messageSubmit: "Enviar", + labelUsername: "Usuario:", + labelPassword: "Clave:", + loginSubmit: "Entrar", + loginInvalid: "JID no válido", + reason: "Razón:", + subject: "Asunto:", + reasonWas: "La razón fue: %s.", + kickActionLabel: "Expulsar", + youHaveBeenKickedBy: "Has sido expulsado de %1$s por %2$s", + youHaveBeenKicked: "Has sido expulsado de %s", + banActionLabel: "Prohibir", + youHaveBeenBannedBy: "Has sido expulsado permanentemente de %1$s por %2$s", + youHaveBeenBanned: "Has sido expulsado permanentemente de %s", + privateActionLabel: "Chat privado", + ignoreActionLabel: "Ignorar", + unignoreActionLabel: "No ignorar", + setSubjectActionLabel: "Cambiar asunto", + administratorMessageSubject: "Administrador", + userJoinedRoom: "%s se ha unido a la sala.", + userLeftRoom: "%s ha dejado la sala.", + userHasBeenKickedFromRoom: "%s ha sido expulsado de la sala.", + userHasBeenBannedFromRoom: "%s ha sido expulsado permanentemente de la sala.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderador", + tooltipIgnored: "Ignoras a éste usuario", + tooltipEmoticons: "Emoticonos", + tooltipSound: "Reproducir un sonido para nuevos mensajes privados", + tooltipAutoscroll: "Desplazamiento automático", + tooltipStatusmessage: "Mostrar mensajes de estado", + tooltipAdministration: "Administración de la sala", + tooltipUsercount: "Usuarios en la sala", + enterRoomPassword: 'La sala "%s" está protegida mediante contraseña.', + enterRoomPasswordSubmit: "Unirse a la sala", + passwordEnteredInvalid: 'Contraseña incorrecta para la sala "%s".', + nicknameConflict: "El nombre de usuario ya está siendo utilizado. Por favor elija otro.", + errorMembersOnly: 'No se puede unir a la sala "%s": no tiene privilegios suficientes.', + errorMaxOccupantsReached: 'No se puede unir a la sala "%s": demasiados participantes.', + antiSpamMessage: "Por favor, no hagas spam. Has sido bloqueado temporalmente." + }, + cn: { + status: "状态: %s", + statusConnecting: "连接中...", + statusConnected: "已连接", + statusDisconnecting: "断开连接中...", + statusDisconnected: "已断开连接", + statusAuthfail: "认证失败", + roomSubject: "主题:", + messageSubmit: "发送", + labelUsername: "用户名:", + labelPassword: "密码:", + loginSubmit: "登录", + loginInvalid: "用户名不合法", + reason: "原因:", + subject: "主题:", + reasonWas: "原因是: %s.", + kickActionLabel: "踢除", + youHaveBeenKickedBy: "你在 %1$s 被管理者 %2$s 请出房间", + banActionLabel: "禁言", + youHaveBeenBannedBy: "你在 %1$s 被管理者 %2$s 禁言", + privateActionLabel: "单独对话", + ignoreActionLabel: "忽略", + unignoreActionLabel: "不忽略", + setSubjectActionLabel: "变更主题", + administratorMessageSubject: "管理员", + userJoinedRoom: "%s 加入房间", + userLeftRoom: "%s 离开房间", + userHasBeenKickedFromRoom: "%s 被请出这个房间", + userHasBeenBannedFromRoom: "%s 被管理者禁言", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "管理", + tooltipIgnored: "你忽略了这个会员", + tooltipEmoticons: "表情", + tooltipSound: "新消息发音", + tooltipAutoscroll: "滚动条", + tooltipStatusmessage: "禁用状态消息", + tooltipAdministration: "房间管理", + tooltipUsercount: "房间占有者", + enterRoomPassword: '登录房间 "%s" 需要密码.', + enterRoomPasswordSubmit: "加入房间", + passwordEnteredInvalid: '登录房间 "%s" 的密码不正确', + nicknameConflict: "用户名已经存在,请另选一个", + errorMembersOnly: '您的权限不够,不能登录房间 "%s" ', + errorMaxOccupantsReached: '房间 "%s" 的人数已达上限,您不能登录', + antiSpamMessage: "因为您在短时间内发送过多的消息 服务器要阻止您一小段时间。" + }, + ja: { + status: "ステータス: %s", + statusConnecting: "接続中…", + statusConnected: "接続されました", + statusDisconnecting: "ディスコネクト中…", + statusDisconnected: "ディスコネクトされました", + statusAuthfail: "認証に失敗しました", + roomSubject: "トピック:", + messageSubmit: "送信", + labelUsername: "ユーザーネーム:", + labelPassword: "パスワード:", + loginSubmit: "ログイン", + loginInvalid: "ユーザーネームが正しくありません", + reason: "理由:", + subject: "トピック:", + reasonWas: "理由: %s。", + kickActionLabel: "キック", + youHaveBeenKickedBy: "あなたは%2$sにより%1$sからキックされました。", + youHaveBeenKicked: "あなたは%sからキックされました。", + banActionLabel: "アカウントバン", + youHaveBeenBannedBy: "あなたは%2$sにより%1$sからアカウントバンされました。", + youHaveBeenBanned: "あなたは%sからアカウントバンされました。", + privateActionLabel: "プライベートメッセージ", + ignoreActionLabel: "無視する", + unignoreActionLabel: "無視をやめる", + setSubjectActionLabel: "トピックを変える", + administratorMessageSubject: "管理者", + userJoinedRoom: "%sは入室しました。", + userLeftRoom: "%sは退室しました。", + userHasBeenKickedFromRoom: "%sは部屋からキックされました。", + userHasBeenBannedFromRoom: "%sは部屋からアカウントバンされました。", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "モデレーター", + tooltipIgnored: "このユーザーを無視設定にしている", + tooltipEmoticons: "絵文字", + tooltipSound: "新しいメッセージが届くたびに音を鳴らす", + tooltipAutoscroll: "オートスクロール", + tooltipStatusmessage: "ステータスメッセージを表示", + tooltipAdministration: "部屋の管理", + tooltipUsercount: "この部屋の参加者の数", + enterRoomPassword: '"%s"の部屋に入るにはパスワードが必要です。', + enterRoomPasswordSubmit: "部屋に入る", + passwordEnteredInvalid: '"%s"のパスワードと異なるパスワードを入力しました。', + nicknameConflict: "このユーザーネームはすでに利用されているため、別のユーザーネームを選んでください。", + errorMembersOnly: '"%s"の部屋に入ることができません: 利用権限を満たしていません。', + errorMaxOccupantsReached: '"%s"の部屋に入ることができません: 参加者の数はすでに上限に達しました。', + antiSpamMessage: "スパムなどの行為はやめてください。あなたは一時的にブロックされました。" + }, + sv: { + status: "Status: %s", + statusConnecting: "Ansluter...", + statusConnected: "Ansluten", + statusDisconnecting: "Kopplar från...", + statusDisconnected: "Frånkopplad", + statusAuthfail: "Autentisering misslyckades", + roomSubject: "Ämne:", + messageSubmit: "Skicka", + labelUsername: "Användarnamn:", + labelPassword: "Lösenord:", + loginSubmit: "Logga in", + loginInvalid: "Ogiltigt JID", + reason: "Anledning:", + subject: "Ämne:", + reasonWas: "Anledningen var: %s.", + kickActionLabel: "Sparka ut", + youHaveBeenKickedBy: "Du har blivit utsparkad från %2$s av %1$s", + youHaveBeenKicked: "Du har blivit utsparkad från %s", + banActionLabel: "Bannlys", + youHaveBeenBannedBy: "Du har blivit bannlyst från %1$s av %2$s", + youHaveBeenBanned: "Du har blivit bannlyst från %s", + privateActionLabel: "Privat chatt", + ignoreActionLabel: "Blockera", + unignoreActionLabel: "Avblockera", + setSubjectActionLabel: "Ändra ämne", + administratorMessageSubject: "Administratör", + userJoinedRoom: "%s kom in i rummet.", + userLeftRoom: "%s har lämnat rummet.", + userHasBeenKickedFromRoom: "%s har blivit utsparkad ur rummet.", + userHasBeenBannedFromRoom: "%s har blivit bannlyst från rummet.", + dateFormat: "yyyy-mm-dd", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderator", + tooltipIgnored: "Du blockerar denna användare", + tooltipEmoticons: "Smilies", + tooltipSound: "Spela upp ett ljud vid nytt privat meddelande", + tooltipAutoscroll: "Autoskrolla", + tooltipStatusmessage: "Visa statusmeddelanden", + tooltipAdministration: "Rumadministrering", + tooltipUsercount: "Antal användare i rummet", + enterRoomPassword: 'Rummet "%s" är lösenordsskyddat.', + enterRoomPasswordSubmit: "Anslut till rum", + passwordEnteredInvalid: 'Ogiltigt lösenord för rummet "%s".', + nicknameConflict: "Upptaget användarnamn. Var god välj ett annat.", + errorMembersOnly: 'Du kan inte ansluta till rummet "%s": Otillräckliga rättigheter.', + errorMaxOccupantsReached: 'Du kan inte ansluta till rummet "%s": Rummet är fullt.', + antiSpamMessage: "Var god avstå från att spamma. Du har blivit blockerad för en kort stund." + }, + fi: { + status: "Status: %s", + statusConnecting: "Muodostetaan yhteyttä...", + statusConnected: "Yhdistetty", + statusDisconnecting: "Katkaistaan yhteyttä...", + statusDisconnected: "Yhteys katkaistu", + statusAuthfail: "Autentikointi epäonnistui", + roomSubject: "Otsikko:", + messageSubmit: "Lähetä", + labelUsername: "Käyttäjätunnus:", + labelNickname: "Nimimerkki:", + labelPassword: "Salasana:", + loginSubmit: "Kirjaudu sisään", + loginInvalid: "Virheellinen JID", + reason: "Syy:", + subject: "Otsikko:", + reasonWas: "Syy oli: %s.", + kickActionLabel: "Potkaise", + youHaveBeenKickedBy: "Nimimerkki %1$s potkaisi sinut pois huoneesta %2$s", + youHaveBeenKicked: "Sinut potkaistiin pois huoneesta %s", + banActionLabel: "Porttikielto", + youHaveBeenBannedBy: "Nimimerkki %2$s antoi sinulle porttikiellon huoneeseen %1$s", + youHaveBeenBanned: "Sinulle on annettu porttikielto huoneeseen %s", + privateActionLabel: "Yksityinen keskustelu", + ignoreActionLabel: "Hiljennä", + unignoreActionLabel: "Peruuta hiljennys", + setSubjectActionLabel: "Vaihda otsikkoa", + administratorMessageSubject: "Ylläpitäjä", + userJoinedRoom: "%s tuli huoneeseen.", + userLeftRoom: "%s lähti huoneesta.", + userHasBeenKickedFromRoom: "%s potkaistiin pois huoneesta.", + userHasBeenBannedFromRoom: "%s sai porttikiellon huoneeseen.", + userChangedNick: "%1$s vaihtoi nimimerkikseen %2$s.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Ylläpitäjä", + tooltipIgnored: "Olet hiljentänyt tämän käyttäjän", + tooltipEmoticons: "Hymiöt", + tooltipSound: "Soita äänimerkki uusista yksityisviesteistä", + tooltipAutoscroll: "Automaattinen vieritys", + tooltipStatusmessage: "Näytä statusviestit", + tooltipAdministration: "Huoneen ylläpito", + tooltipUsercount: "Huoneen jäsenet", + enterRoomPassword: 'Huone "%s" on suojattu salasanalla.', + enterRoomPasswordSubmit: "Liity huoneeseen", + passwordEnteredInvalid: 'Virheelinen salasana huoneeseen "%s".', + nicknameConflict: "Käyttäjätunnus oli jo käytössä. Valitse jokin toinen käyttäjätunnus.", + errorMembersOnly: 'Et voi liittyä huoneeseen "%s": ei oikeuksia.', + errorMaxOccupantsReached: 'Et voi liittyä huoneeseen "%s": liian paljon jäseniä.', + errorAutojoinMissing: 'Parametria "autojoin" ei ole määritelty asetuksissa. Tee määrittely jatkaaksesi.', + antiSpamMessage: "Ethän spämmää. Sinut on nyt väliaikaisesti pistetty jäähylle." + }, + it: { + status: "Stato: %s", + statusConnecting: "Connessione...", + statusConnected: "Connessione", + statusDisconnecting: "Disconnessione...", + statusDisconnected: "Disconnesso", + statusAuthfail: "Autenticazione fallita", + roomSubject: "Oggetto:", + messageSubmit: "Invia", + labelUsername: "Nome utente:", + labelPassword: "Password:", + loginSubmit: "Login", + loginInvalid: "JID non valido", + reason: "Ragione:", + subject: "Oggetto:", + reasonWas: "Ragione precedente: %s.", + kickActionLabel: "Espelli", + youHaveBeenKickedBy: "Sei stato espulso da %2$s da %1$s", + youHaveBeenKicked: "Sei stato espulso da %s", + banActionLabel: "Escluso", + youHaveBeenBannedBy: "Sei stato escluso da %1$s da %2$s", + youHaveBeenBanned: "Sei stato escluso da %s", + privateActionLabel: "Stanza privata", + ignoreActionLabel: "Ignora", + unignoreActionLabel: "Non ignorare", + setSubjectActionLabel: "Cambia oggetto", + administratorMessageSubject: "Amministratore", + userJoinedRoom: "%s si è unito alla stanza.", + userLeftRoom: "%s ha lasciato la stanza.", + userHasBeenKickedFromRoom: "%s è stato espulso dalla stanza.", + userHasBeenBannedFromRoom: "%s è stato escluso dalla stanza.", + dateFormat: "dd/mm/yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderatore", + tooltipIgnored: "Stai ignorando questo utente", + tooltipEmoticons: "Emoticons", + tooltipSound: "Riproduci un suono quando arrivano messaggi privati", + tooltipAutoscroll: "Autoscroll", + tooltipStatusmessage: "Mostra messaggi di stato", + tooltipAdministration: "Amministrazione stanza", + tooltipUsercount: "Partecipanti alla stanza", + enterRoomPassword: 'La stanza "%s" è protetta da password.', + enterRoomPasswordSubmit: "Unisciti alla stanza", + passwordEnteredInvalid: 'Password non valida per la stanza "%s".', + nicknameConflict: "Nome utente già in uso. Scegline un altro.", + errorMembersOnly: 'Non puoi unirti alla stanza "%s": Permessi insufficienti.', + errorMaxOccupantsReached: 'Non puoi unirti alla stanza "%s": Troppi partecipanti.', + antiSpamMessage: "Per favore non scrivere messaggi pubblicitari. Sei stato bloccato per un po' di tempo." + }, + pl: { + status: "Status: %s", + statusConnecting: "Łączę...", + statusConnected: "Połączone", + statusDisconnecting: "Rozłączam...", + statusDisconnected: "Rozłączone", + statusAuthfail: "Nieprawidłowa autoryzacja", + roomSubject: "Temat:", + messageSubmit: "Wyślij", + labelUsername: "Nazwa użytkownika:", + labelNickname: "Ksywka:", + labelPassword: "Hasło:", + loginSubmit: "Zaloguj", + loginInvalid: "Nieprawidłowy JID", + reason: "Przyczyna:", + subject: "Temat:", + reasonWas: "Z powodu: %s.", + kickActionLabel: "Wykop", + youHaveBeenKickedBy: "Zostałeś wykopany z %2$s przez %1$s", + youHaveBeenKicked: "Zostałeś wykopany z %s", + banActionLabel: "Ban", + youHaveBeenBannedBy: "Zostałeś zbanowany na %1$s przez %2$s", + youHaveBeenBanned: "Zostałeś zbanowany na %s", + privateActionLabel: "Rozmowa prywatna", + ignoreActionLabel: "Zignoruj", + unignoreActionLabel: "Przestań ignorować", + setSubjectActionLabel: "Zmień temat", + administratorMessageSubject: "Administrator", + userJoinedRoom: "%s wszedł do pokoju.", + userLeftRoom: "%s opuścił pokój.", + userHasBeenKickedFromRoom: "%s został wykopany z pokoju.", + userHasBeenBannedFromRoom: "%s został zbanowany w pokoju.", + userChangedNick: "%1$s zmienił ksywkę na %2$s.", + presenceUnknownWarningSubject: "Uwaga:", + presenceUnknownWarning: "Rozmówca może nie być połączony. Nie możemy ustalić jego obecności.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderator", + tooltipIgnored: "Ignorujesz tego rozmówcę", + tooltipEmoticons: "Emoty", + tooltipSound: "Sygnał dźwiękowy przy otrzymaniu wiadomości", + tooltipAutoscroll: "Autoprzewijanie", + tooltipStatusmessage: "Wyświetl statusy", + tooltipAdministration: "Administrator pokoju", + tooltipUsercount: "Obecni rozmówcy", + enterRoomPassword: 'Pokój "%s" wymaga hasła.', + enterRoomPasswordSubmit: "Wejdź do pokoju", + passwordEnteredInvalid: 'Niewłaściwie hasło do pokoju "%s".', + nicknameConflict: "Nazwa w użyciu. Wybierz inną.", + errorMembersOnly: 'Nie możesz wejść do pokoju "%s": Niepełne uprawnienia.', + errorMaxOccupantsReached: 'Nie możesz wejść do pokoju "%s": Siedzi w nim zbyt wielu ludzi.', + errorAutojoinMissing: "Konfiguracja nie zawiera parametru automatycznego wejścia do pokoju. Wskaż pokój do którego chcesz wejść.", + antiSpamMessage: "Please do not spam. You have been blocked for a short-time." + }, + pt: { + status: "Status: %s", + statusConnecting: "Conectando...", + statusConnected: "Conectado", + statusDisconnecting: "Desligando...", + statusDisconnected: "Desligado", + statusAuthfail: "Falha na autenticação", + roomSubject: "Assunto:", + messageSubmit: "Enviar", + labelUsername: "Usuário:", + labelPassword: "Senha:", + loginSubmit: "Entrar", + loginInvalid: "JID inválido", + reason: "Motivo:", + subject: "Assunto:", + reasonWas: "O motivo foi: %s.", + kickActionLabel: "Excluir", + youHaveBeenKickedBy: "Você foi excluido de %1$s por %2$s", + youHaveBeenKicked: "Você foi excluido de %s", + banActionLabel: "Bloquear", + youHaveBeenBannedBy: "Você foi excluido permanentemente de %1$s por %2$s", + youHaveBeenBanned: "Você foi excluido permanentemente de %s", + privateActionLabel: "Bate-papo privado", + ignoreActionLabel: "Ignorar", + unignoreActionLabel: "Não ignorar", + setSubjectActionLabel: "Trocar Assunto", + administratorMessageSubject: "Administrador", + userJoinedRoom: "%s entrou na sala.", + userLeftRoom: "%s saiu da sala.", + userHasBeenKickedFromRoom: "%s foi excluido da sala.", + userHasBeenBannedFromRoom: "%s foi excluido permanentemente da sala.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderador", + tooltipIgnored: "Você ignora este usuário", + tooltipEmoticons: "Emoticons", + tooltipSound: "Reproduzir o som para novas mensagens privados", + tooltipAutoscroll: "Deslocamento automático", + tooltipStatusmessage: "Mostrar mensagens de status", + tooltipAdministration: "Administração da sala", + tooltipUsercount: "Usuários na sala", + enterRoomPassword: 'A sala "%s" é protegida por senha.', + enterRoomPasswordSubmit: "Junte-se à sala", + passwordEnteredInvalid: 'Senha incorreta para a sala "%s".', + nicknameConflict: "O nome de usuário já está em uso. Por favor, escolha outro.", + errorMembersOnly: 'Você não pode participar da sala "%s": privilégios insuficientes.', + errorMaxOccupantsReached: 'Você não pode participar da sala "%s": muitos participantes.', + antiSpamMessage: "Por favor, não envie spam. Você foi bloqueado temporariamente." + }, + pt_br: { + status: "Estado: %s", + statusConnecting: "Conectando...", + statusConnected: "Conectado", + statusDisconnecting: "Desconectando...", + statusDisconnected: "Desconectado", + statusAuthfail: "Autenticação falhou", + roomSubject: "Assunto:", + messageSubmit: "Enviar", + labelUsername: "Usuário:", + labelPassword: "Senha:", + loginSubmit: "Entrar", + loginInvalid: "JID inválido", + reason: "Motivo:", + subject: "Assunto:", + reasonWas: "Motivo foi: %s.", + kickActionLabel: "Derrubar", + youHaveBeenKickedBy: "Você foi derrubado de %2$s por %1$s", + youHaveBeenKicked: "Você foi derrubado de %s", + banActionLabel: "Banir", + youHaveBeenBannedBy: "Você foi banido de %1$s por %2$s", + youHaveBeenBanned: "Você foi banido de %s", + privateActionLabel: "Conversa privada", + ignoreActionLabel: "Ignorar", + unignoreActionLabel: "Não ignorar", + setSubjectActionLabel: "Mudar Assunto", + administratorMessageSubject: "Administrador", + userJoinedRoom: "%s entrou na sala.", + userLeftRoom: "%s saiu da sala.", + userHasBeenKickedFromRoom: "%s foi derrubado da sala.", + userHasBeenBannedFromRoom: "%s foi banido da sala.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderador", + tooltipIgnored: "Você ignora este usuário", + tooltipEmoticons: "Emoticons", + tooltipSound: "Tocar som para novas mensagens privadas", + tooltipAutoscroll: "Auto-rolagem", + tooltipStatusmessage: "Exibir mensagens de estados", + tooltipAdministration: "Administração de Sala", + tooltipUsercount: "Participantes da Sala", + enterRoomPassword: 'Sala "%s" é protegida por senha.', + enterRoomPasswordSubmit: "Entrar na sala", + passwordEnteredInvalid: 'Senha inváida para sala "%s".', + nicknameConflict: "Nome de usuário já em uso. Por favor escolha outro.", + errorMembersOnly: 'Você não pode entrar na sala "%s": privilégios insuficientes.', + errorMaxOccupantsReached: 'Você não pode entrar na sala "%s": máximo de participantes atingido.', + antiSpamMessage: "Por favor, não faça spam. Você foi bloqueado temporariamente." + }, + ru: { + status: "Статус: %s", + statusConnecting: "Подключение...", + statusConnected: "Подключено", + statusDisconnecting: "Отключение...", + statusDisconnected: "Отключено", + statusAuthfail: "Неверный логин", + roomSubject: "Топик:", + messageSubmit: "Послать", + labelUsername: "Имя:", + labelNickname: "Ник:", + labelPassword: "Пароль:", + loginSubmit: "Логин", + loginInvalid: "Неверный JID", + reason: "Причина:", + subject: "Топик:", + reasonWas: "Причина была: %s.", + kickActionLabel: "Выбросить", + youHaveBeenKickedBy: "Пользователь %1$s выбросил вас из чата %2$s", + youHaveBeenKicked: "Вас выбросили из чата %s", + banActionLabel: "Запретить доступ", + youHaveBeenBannedBy: "Пользователь %1$s запретил вам доступ в чат %2$s", + youHaveBeenBanned: "Вам запретили доступ в чат %s", + privateActionLabel: "Один-на-один чат", + ignoreActionLabel: "Игнорировать", + unignoreActionLabel: "Отменить игнорирование", + setSubjectActionLabel: "Изменить топик", + administratorMessageSubject: "Администратор", + userJoinedRoom: "%s вошёл в чат.", + userLeftRoom: "%s вышел из чата.", + userHasBeenKickedFromRoom: "%s выброшен из чата.", + userHasBeenBannedFromRoom: "%s запрещён доступ в чат.", + userChangedNick: "%1$s сменил имя на %2$s.", + presenceUnknownWarningSubject: "Уведомление:", + presenceUnknownWarning: "Этот пользователь вероятнее всего оффлайн.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Модератор", + tooltipIgnored: "Вы игнорируете этого пользователя.", + tooltipEmoticons: "Смайлики", + tooltipSound: "Озвучивать новое частное сообщение", + tooltipAutoscroll: "Авто-прокручивание", + tooltipStatusmessage: "Показывать статус сообщения", + tooltipAdministration: "Администрирование чат комнаты", + tooltipUsercount: "Участники чата", + enterRoomPassword: 'Чат комната "%s" защищена паролем.', + enterRoomPasswordSubmit: "Войти в чат", + passwordEnteredInvalid: 'Неверный пароль для комнаты "%s".', + nicknameConflict: "Это имя уже используется. Пожалуйста выберите другое имя.", + errorMembersOnly: 'Вы не можете войти в чат "%s": Недостаточно прав доступа.', + errorMaxOccupantsReached: 'Вы не можете войти в чат "%s": Слишком много участников.', + errorAutojoinMissing: "Параметры автовхода не устновлены. Настройте их для продолжения.", + antiSpamMessage: "Пожалуйста не рассылайте спам. Вас заблокировали на короткое время." + }, + ca: { + status: "Estat: %s", + statusConnecting: "Connectant...", + statusConnected: "Connectat", + statusDisconnecting: "Desconnectant...", + statusDisconnected: "Desconnectat", + statusAuthfail: "Ha fallat la autenticació", + roomSubject: "Assumpte:", + messageSubmit: "Enviar", + labelUsername: "Usuari:", + labelPassword: "Clau:", + loginSubmit: "Entrar", + loginInvalid: "JID no vàlid", + reason: "Raó:", + subject: "Assumpte:", + reasonWas: "La raó ha estat: %s.", + kickActionLabel: "Expulsar", + youHaveBeenKickedBy: "Has estat expulsat de %1$s per %2$s", + youHaveBeenKicked: "Has estat expulsat de %s", + banActionLabel: "Prohibir", + youHaveBeenBannedBy: "Has estat expulsat permanentment de %1$s per %2$s", + youHaveBeenBanned: "Has estat expulsat permanentment de %s", + privateActionLabel: "Xat privat", + ignoreActionLabel: "Ignorar", + unignoreActionLabel: "No ignorar", + setSubjectActionLabel: "Canviar assumpte", + administratorMessageSubject: "Administrador", + userJoinedRoom: "%s ha entrat a la sala.", + userLeftRoom: "%s ha deixat la sala.", + userHasBeenKickedFromRoom: "%s ha estat expulsat de la sala.", + userHasBeenBannedFromRoom: "%s ha estat expulsat permanentment de la sala.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderador", + tooltipIgnored: "Estàs ignorant aquest usuari", + tooltipEmoticons: "Emoticones", + tooltipSound: "Reproduir un so per a nous missatges", + tooltipAutoscroll: "Desplaçament automàtic", + tooltipStatusmessage: "Mostrar missatges d'estat", + tooltipAdministration: "Administració de la sala", + tooltipUsercount: "Usuaris dins la sala", + enterRoomPassword: 'La sala "%s" està protegida amb contrasenya.', + enterRoomPasswordSubmit: "Entrar a la sala", + passwordEnteredInvalid: 'Contrasenya incorrecta per a la sala "%s".', + nicknameConflict: "El nom d'usuari ja s'està utilitzant. Si us plau, escolleix-ne un altre.", + errorMembersOnly: 'No pots unir-te a la sala "%s": no tens prous privilegis.', + errorMaxOccupantsReached: 'No pots unir-te a la sala "%s": hi ha masses participants.', + antiSpamMessage: "Si us plau, no facis spam. Has estat bloquejat temporalment." + }, + cs: { + status: "Stav: %s", + statusConnecting: "Připojování...", + statusConnected: "Připojeno", + statusDisconnecting: "Odpojování...", + statusDisconnected: "Odpojeno", + statusAuthfail: "Přihlášení selhalo", + roomSubject: "Předmět:", + messageSubmit: "Odeslat", + labelUsername: "Už. jméno:", + labelNickname: "Přezdívka:", + labelPassword: "Heslo:", + loginSubmit: "Přihlásit se", + loginInvalid: "Neplatné JID", + reason: "Důvod:", + subject: "Předmět:", + reasonWas: "Důvod byl: %s.", + kickActionLabel: "Vykopnout", + youHaveBeenKickedBy: "Byl jsi vyloučen z %2$s uživatelem %1$s", + youHaveBeenKicked: "Byl jsi vyloučen z %s", + banActionLabel: "Ban", + youHaveBeenBannedBy: "Byl jsi trvale vyloučen z %1$s uživatelem %2$s", + youHaveBeenBanned: "Byl jsi trvale vyloučen z %s", + privateActionLabel: "Soukromý chat", + ignoreActionLabel: "Ignorovat", + unignoreActionLabel: "Neignorovat", + setSubjectActionLabel: "Změnit předmět", + administratorMessageSubject: "Adminitrátor", + userJoinedRoom: "%s vešel do místnosti.", + userLeftRoom: "%s opustil místnost.", + userHasBeenKickedFromRoom: "%s byl vyloučen z místnosti.", + userHasBeenBannedFromRoom: "%s byl trvale vyloučen z místnosti.", + userChangedNick: "%1$s si změnil přezdívku na %2$s.", + presenceUnknownWarningSubject: "Poznámka:", + presenceUnknownWarning: "Tento uživatel může být offiline. Nemůžeme sledovat jeho přítmonost..", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "Moderátor", + tooltipIgnored: "Tento uživatel je ignorován", + tooltipEmoticons: "Emotikony", + tooltipSound: "Přehrát zvuk při nové soukromé zprávě", + tooltipAutoscroll: "Automaticky rolovat", + tooltipStatusmessage: "Zobrazovat stavové zprávy", + tooltipAdministration: "Správa místnosti", + tooltipUsercount: "Uživatelé", + enterRoomPassword: 'Místnost "%s" je chráněna heslem.', + enterRoomPasswordSubmit: "Připojit se do místnosti", + passwordEnteredInvalid: 'Neplatné heslo pro místnost "%s".', + nicknameConflict: "Takové přihlašovací jméno je již použito. Vyberte si prosím jiné.", + errorMembersOnly: 'Nemůžete se připojit do místnosti "%s": Nedostatečné oprávnění.', + errorMaxOccupantsReached: 'Nemůžete se připojit do místnosti "%s": Příliš mnoho uživatelů.', + errorAutojoinMissing: "Není nastaven parametr autojoin. Nastavte jej prosím.", + antiSpamMessage: "Nespamujte prosím. Váš účet byl na chvilku zablokován." + }, + he: { + status: "מצב: %s", + statusConnecting: "כעת מתחבר...", + statusConnected: "מחובר", + statusDisconnecting: "כעת מתנתק...", + statusDisconnected: "מנותק", + statusAuthfail: "אימות נכשל", + roomSubject: "נושא:", + messageSubmit: "שלח", + labelUsername: "שם משתמש:", + labelNickname: "שם כינוי:", + labelPassword: "סיסמה:", + loginSubmit: "כניסה", + loginInvalid: "JID לא תקני", + reason: "סיבה:", + subject: "נושא:", + reasonWas: "סיבה היתה: %s.", + kickActionLabel: "בעט", + youHaveBeenKickedBy: "נבעטת מתוך %2$s על ידי %1$s", + youHaveBeenKicked: "נבעטת מתוך %s", + banActionLabel: "אסור", + youHaveBeenBannedBy: "נאסרת מתוך %1$s על ידי %2$s", + youHaveBeenBanned: "נאסרת מתוך %s", + privateActionLabel: "שיחה פרטית", + ignoreActionLabel: "התעלם", + unignoreActionLabel: "בטל התעלמות", + setSubjectActionLabel: "שנה נושא", + administratorMessageSubject: "מנהל", + userJoinedRoom: "%s נכנס(ה) לחדר.", + userLeftRoom: "%s עזב(ה) את החדר.", + userHasBeenKickedFromRoom: "%s נבעט(ה) מתוך החדר.", + userHasBeenBannedFromRoom: "%s נאסר(ה) מתוך החדר.", + userChangedNick: "%1$s מוכר(ת) כעת בתור %2$s.", + dateFormat: "dd.mm.yyyy", + timeFormat: "HH:MM:ss", + tooltipRole: "אחראי", + tooltipIgnored: "אתה מתעלם ממשתמש זה", + tooltipEmoticons: "רגשונים", + tooltipSound: "נגן צליל עבור הודעות פרטיות חדשות", + tooltipAutoscroll: "גלילה אוטומטית", + tooltipStatusmessage: "הצג הודעות מצב", + tooltipAdministration: "הנהלת חדר", + tooltipUsercount: "משתתפי חדר", + enterRoomPassword: 'חדר "%s" הינו מוגן סיסמה.', + enterRoomPasswordSubmit: "הצטרף לחדר", + passwordEnteredInvalid: 'סיסמה שגויה לחדר "%s".', + nicknameConflict: "שם משתמש כבר מצוי בשימוש. אנא בחר אחד אחר.", + errorMembersOnly: 'אין באפשרותך להצטרף לחדר "%s": הרשאות לקויות.', + errorMaxOccupantsReached: 'אין באפשרותך להצטרף לחדר "%s": יותר מדי משתתפים.', + errorAutojoinMissing: "לא נקבע פרמטר הצטרפות אוטומטית בתצורה. אנא הזן כזה כדי להמשיך.", + antiSpamMessage: "אנא אל תשלח ספאם. נחסמת למשך זמן קצר." + } +}; +//# sourceMappingURL=candy.bundle.map \ No newline at end of file diff --git a/public/ext/candy/candy.bundle.map b/public/ext/candy/candy.bundle.map new file mode 100755 index 0000000..bae0e53 --- /dev/null +++ b/public/ext/candy/candy.bundle.map @@ -0,0 +1 @@ +{"version":3,"file":"candy.bundle.js","sources":["src/candy.js","src/core.js","src/view.js","src/util.js","src/core/action.js","src/core/chatRoom.js","src/core/chatRoster.js","src/core/chatUser.js","src/core/contact.js","src/core/event.js","src/view/observer.js","src/view/pane/chat.js","src/view/pane/message.js","src/view/pane/privateRoom.js","src/view/pane/room.js","src/view/pane/roster.js","src/view/pane/window.js","src/view/template.js","src/view/translation.js"],"names":["Candy","self","$","about","name","version","init","service","options","viewClass","View","view","Core","core","jQuery","Strophe","_connection","_service","_user","_roster","_rooms","_anonymousConnection","_status","_options","autojoin","undefined","disconnectWithoutTabs","conferenceDomain","debug","domains","hideDomainList","disableCoreNotifications","disableWindowUnload","presencePriority","resource","useParticipantRealJid","initialRosterVersion","initialRosterItems","_addNamespace","value","addNamespace","_addNamespaces","_getEscapedJidFromJid","jid","node","getNodeFromJid","domain","getDomainFromJid","escapeNode","extend","window","console","log","Function","prototype","bind","Util","getIeVersion","call","apply","arguments","level","message","level_name","console_level","LogLevel","DEBUG","INFO","WARN","ERROR","FATAL","ChatRoster","Connection","rawInput","rawOutput","caps","onbeforeunload","onWindowUnload","registerEventHandlers","addHandler","Event","Jabber","Version","NS","VERSION","Presence","Message","Bookmarks","PRIVATE","Room","Disco","DISCO_INFO","disco","_onDiscoInfo","_onDiscoItems","DISCO_ITEMS","_delegateCapabilities","CAPS","connect","jidOrHost","password","nick","reset","triggerHandler","connection","indexOf","getResourceFromJid","Connect","ChatUser","Login","attach","sid","rid","disconnect","connected","handler","ns","type","id","from","getRoster","getUser","setUser","user","getConnection","removeRoom","roomJid","getRooms","getStropheStatus","setStropheStatus","status","isAnonymousConnection","getOptions","getRoom","sync","flush","data","this","warn","error","_current","container","language","assets","messages","limit","remove","crop","nickname","body","url","roster","enableXHTML","_setupTranslation","i18n","load","Translation","_registerObservers","on","Observer","Chat","AutojoinMissing","update","PresenceError","_registerWindowHandlers","document","focusin","Pane","Window","onFocus","focusout","onBlur","focus","blur","resize","fitTabs","_initToolbar","Toolbar","_delegateTooltips","delegate","Tooltip","show","resources","Parser","setEmoticonPath","html","Mustache","to_html","Template","pane","tooltipEmoticons","_","tooltipSound","tooltipAutoscroll","tooltipStatusmessage","tooltipAdministration","tooltipUsercount","assetsPath","tabs","mobile","mobileIcon","rooms","modal","toolbar","getCurrent","jidToId","MD5","hexdigest","escapeJid","unescapeJid","unescapeNode","str","len","length","substr","parseAndCropXhtml","append","createHtml","get","setCookie","lifetime_days","exp","Date","setDate","getDate","cookie","toUTCString","cookieExists","getCookie","regex","RegExp","escape","matches","exec","deleteCookie","getPosLeftAccordingToWindowBounds","elem","pos","windowWidth","width","elemWidth","outerWidth","marginDiff","backgroundPositionAlignment","px","getPosTopAccordingToWindowBounds","windowHeight","height","elemHeight","outerHeight","localizedTime","dateTime","date","toDateString","iso8601toDate","format","timestamp","parse","isNaN","struct","minutesOffset","getTimezoneOffset","replace","isEmptyObject","obj","prop","hasOwnProperty","forceRedraw","css","display","setTimeout","ie","undef","v","div","createElement","all","getElementsByTagName","innerHTML","isMobile","check","a","test","navigator","userAgent","vendor","opera","r","match","_emoticonPath","path","emoticons","plain","image","emotify","text","i","linkify","matched","nl2br","maxLength","currentLength","el","j","tag","attribute","cssAttrs","attr","cssName","cssValue","nodeType","ElementType","NORMAL","nodeName","toLowerCase","XHTML","validTag","attributes","getAttribute","cssText","split","validCSS","push","join","childNodes","e","xmlTextNode","xmlGenerator","createDocumentFragment","appendChild","FRAGMENT","TEXT","nodeValue","substring","parseHTML","Action","msg","sendIQ","$iq","to","c","xmlns","up","SetNickname","Array","roomNick","presence","conn","each","$pres","getUniqueId","send","Roster","registerCallback","RosterPush","item","RosterFetch","RosterLoad","items","pres","t","toString","generateCapsAttrs","tree","Services","CLIENT","Autojoin","BOOKMARKS","pubsubBookmarkRequest","PUBSUB","isArray","Join","valueOf","EnableCarbons","CARBONS","ResetIgnoreList","getEscapedJid","PRIVACY","action","order","RemoveIgnoreList","GetIgnoreList","iq","iqId","PrivacyList","SetIgnoreListActive","GetJidIfAnonymous","getJid","getNick","MUC","Leave","muc","leave","xhtmlMsg","trim","getBareJidFromJid","Invite","invitees","reason","$msg","x","MUC_USER","invitee","IgnoreUnignore","userJid","addToOrRemoveFromPrivacyList","UpdatePrivacyList","currentUser","privacyList","getPrivacyList","index","Admin","UserAction","itemObj","role","affiliation","MUC_ADMIN","SetSubject","subject","setTopic","ChatRoom","room","setName","getName","setRoster","add","getAll","realJid","ROLE_MODERATOR","AFFILIATION_OWNER","privacyLists","customData","previousNick","setJid","getRealJid","setNick","contact","getContact","getRole","setRole","setAffiliation","getAffiliation","isModerator","list","splice","setPrivacyLists","lists","isInPrivacyList","setCustomData","getCustomData","setPreviousNick","getPreviousNick","setStatus","getStatus","Contact","stropheRosterItem","getSubscription","subscription","getGroups","groups","highestResourcePriority","resourcePriority","priority","parseInt","_weightForStatus","presetJid","Status","CONNECTED","ATTACHED","DISCONNECTED","AUTHFAIL","CONNECTING","DISCONNECTING","AUTHENTICATING","CONNFAIL","children","stanza","_addRosterItems","updatedItem","_addRosterItem","PrivacyListError","invite","_findInvite","mediatedInvite","find","directInvite","passwordNode","reasonNode","continueNode","continuedThread","identity","roomName","presenceType","isNewRoom","_msgHasStatusCode","nickAssign","nickChange","_selfLeave","code","actor","tagName","carbon","partnerJid","sender","barePartner","bareFrom","isNoConferenceRoomJid","partner","xhtmlChild","XHTML_IM","xhtmlMessage","first","contents","_checkForChatStateNotification","delay","DELAY","JABBER_DELAY","toISOString","chatStateElements","chatstate","_showConnectedMessageModal","event","args","eventName","Modal","hide","showLoginForm","adminMessage","onInfoMessage","close","notifyPrivateChats","actorName","actionLabel","translationParams","Context","adminMessageReason","_action","_reason","evtData","PrivateRoom","bareJid","targetJid","showEnterPasswordForm","showNicknameConflictForm","showError","setSubject","infoMessage","open","addTab","roomType","roomId","preventDefault","tab","privateUserChat","appendTo","click","tabClick","tabClose","getTab","removeTab","setActiveTab","addClass","removeClass","increaseUnreadMessages","unreadElem","updateWindowOnAllMessages","clearUnreadMessages","reduceUnreadMessages","currentRoomJid","roomPane","getPane","scrollPosition","scrollTop","parent","allTabsClosed","hideMobileIcon","availableWidth","innerWidth","tabsWidth","overflow","tabDiffToRealWidth","tabWidth","Math","floor","showMobileIcon","clickMobileIcon","is","time","appendToMessagePane","scrollToBottom","_supportsNativeAudio","showEmoticonsMenu","currentTarget","stopPropagation","onAutoscrollControlClick","canPlayType","onSoundControlClick","onStatusMessageControlClick","context","me","updateUsercount","usercount","playSound","onPlaySound","Audio","play","src","loop","autostart","control","hasClass","toggleClass","onScrollToStoredPosition","autoscroll","onScrollToBottom","count","showCloseControl","showSpinner","modalClass","hideCloseControl","hideSpinner","stop","fadeIn","callback","fadeOut","keydown","which","map","d","customClass","form","_labelNickname","_labelUsername","_labelPassword","_loginSubmit","displayPassword","displayUsername","displayDomain","displayNickname","submit","username","val","enterPasswordForm","_label","_joinSubmit","nicknameConflictForm","replacements","displayError","_error","content","tooltip","target","offset","posLeft","left","posTop","top","mouseleave","menu","links","menulinks","getMenuLinks","clickHandler","link","class","label","element","initialMenuLinks","requiredPermission","private","ignore","ignoreUser","unignore","unignoreUser","kick","contextModalForm","_submit","ban","input","emoticon","messagePane","enableScroll","renderEvtData","template","templateData","displayName","roomjid","last","notifyEvtData","hasFocus","switchToRoom","messageForm","removeAttr","changeNick","previousPrivateRoomJid","newPrivateRoomJid","previousPrivateRoomId","newPrivateRoomId","roomElement","roomTabElement","messageCount","_messageSubmit","_userOnline","setFocusToForm","_roomSubject","openRooms","sliceMessagePane","slice","chatPane","addIgnoreIcon","removeIgnoreIcon","subPane","changeDataUserJidIfUserIsMe","userId","usercountDiff","userElem","_insertUser","showJoinAnimation","userClick","leaveAnimation","contact_status","displayNick","tooltipRole","tooltipIgnored","userInserted","rosterPane","userSortCompare","_userSortCompare","before","statusWeight","toUpperCase","useRealJid","rosterUserId","$rosterUserElem","joinAnimation","elementId","slideDown","animate","opacity","complete","slideUp","previousUserJid","_hasFocus","_plainTitle","title","_unreadMessagesCount","renderUnreadMessages","num","unreadmessages","en","statusConnecting","statusConnected","statusDisconnecting","statusDisconnected","statusAuthfail","roomSubject","messageSubmit","labelUsername","labelNickname","labelPassword","loginSubmit","loginInvalid","reasonWas","kickActionLabel","youHaveBeenKickedBy","youHaveBeenKicked","banActionLabel","youHaveBeenBannedBy","youHaveBeenBanned","privateActionLabel","ignoreActionLabel","unignoreActionLabel","setSubjectActionLabel","administratorMessageSubject","userJoinedRoom","userLeftRoom","userHasBeenKickedFromRoom","userHasBeenBannedFromRoom","userChangedNick","dateFormat","timeFormat","enterRoomPassword","enterRoomPasswordSubmit","passwordEnteredInvalid","nicknameConflict","errorMembersOnly","errorMaxOccupantsReached","errorAutojoinMissing","antiSpamMessage","de","fr","nl","es","cn","ja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AiB;QACjBC,eAAiB;QAEjBC,eAAiB;QACjBC,eAAiB;QACjBC,eAAiB;QACjBC,aAAiB;QACjBC,cAAkB;QAElB3W,QAAc;QACdoB,SAAe;QACfwV,WAAiB;QACjBC,iBAAqB;QACrBC,qBAA0B;QAC1BC,mBAA0B;QAC1BC,gBAAoB;QACpBC,qBAA0B;QAC1BC,mBAA0B;QAE1BC,oBAAuB;QACvBC,mBAAuB;QACvBC,qBAAwB;QAExBC,uBAAyB;QAEzBC,6BAAgC;QAEhCC,gBAA6B;QAC7BC,cAA6B;QAC7BC,2BAA6B;QAC7BC,2BAA6B;QAC7BC,iBAAmB;QAEnBC,YAAc;QACdC,YAAc;QAEd1D,aAAkB;QAClBC,gBAAoB;QACpBrhB,kBAAsB;QACtBE,cAAmB;QACnBC,mBAAuB;QACvBC,sBAAyB;QACzBC,uBAA0B;QAC1BC,kBAAsB;QAEtBykB,mBAAsB;QACtBC,yBAA4B;QAC5BC,wBAA2B;QAE3BC,kBAAoB;QAEpBC,kBAAoB;QACpBC,0BAA4B;QAC5BC,sBAAwB;QAExBC,iBAAoB"} \ No newline at end of file diff --git a/public/ext/candy/candy.min.js b/public/ext/candy/candy.min.js new file mode 100755 index 0000000..0a8ec84 --- /dev/null +++ b/public/ext/candy/candy.min.js @@ -0,0 +1,5 @@ +"use strict";var Candy=function(a,b){return a.about={name:"Candy",version:"2.2.0"},a.init=function(c,d){d.viewClass||(d.viewClass=a.View),d.viewClass.init(b("#candy"),d.view),a.Core.init(c,d.core)},a}(Candy||{},jQuery);Candy.Core=function(a,b,c){var d,e=null,f=null,g=null,h=null,i={},j=!1,k={autojoin:void 0,disconnectWithoutTabs:!0,conferenceDomain:void 0,debug:!1,domains:null,hideDomainList:!1,disableCoreNotifications:!1,disableWindowUnload:!1,presencePriority:1,resource:Candy.about.name,useParticipantRealJid:!1,initialRosterVersion:null,initialRosterItems:[]},l=function(a,c){b.addNamespace(a,c)},m=function(){l("PRIVATE","jabber:iq:private"),l("BOOKMARKS","storage:bookmarks"),l("PRIVACY","jabber:iq:privacy"),l("DELAY","urn:xmpp:delay"),l("JABBER_DELAY","jabber:x:delay"),l("PUBSUB","http://jabber.org/protocol/pubsub"),l("CARBONS","urn:xmpp:carbons:2")},n=function(a){var c=b.getNodeFromJid(a),d=b.getDomainFromJid(a);return c?b.escapeNode(c)+"@"+d:d};return a.init=function(d,g){f=d,c.extend(!0,k,g),k.debug&&(void 0!==typeof window.console&&void 0!==typeof window.console.log&&(Function.prototype.bind&&Candy.Util.getIeVersion()>8?a.log=Function.prototype.bind.call(console.log,console):a.log=function(){Function.prototype.apply.call(console.log,console,arguments)}),b.log=function(a,c){var d,e;switch(a){case b.LogLevel.DEBUG:d="DEBUG",e="log";break;case b.LogLevel.INFO:d="INFO",e="info";break;case b.LogLevel.WARN:d="WARN",e="info";break;case b.LogLevel.ERROR:d="ERROR",e="error";break;case b.LogLevel.FATAL:d="FATAL",e="error"}console[e]("[Strophe]["+d+"]: "+c)},a.log("[Init] Debugging enabled")),m(),h=new Candy.Core.ChatRoster,e=new b.Connection(f),e.rawInput=a.rawInput.bind(a),e.rawOutput=a.rawOutput.bind(a),e.caps.node="https://candy-chat.github.io/candy/",k.disableWindowUnload||(window.onbeforeunload=a.onWindowUnload)},a.registerEventHandlers=function(){a.addHandler(a.Event.Jabber.Version,b.NS.VERSION,"iq"),a.addHandler(a.Event.Jabber.Presence,null,"presence"),a.addHandler(a.Event.Jabber.Message,null,"message"),a.addHandler(a.Event.Jabber.Bookmarks,b.NS.PRIVATE,"iq"),a.addHandler(a.Event.Jabber.Room.Disco,b.NS.DISCO_INFO,"iq","result"),a.addHandler(e.disco._onDiscoInfo.bind(e.disco),b.NS.DISCO_INFO,"iq","get"),a.addHandler(e.disco._onDiscoItems.bind(e.disco),b.NS.DISCO_ITEMS,"iq","get"),a.addHandler(e.caps._delegateCapabilities.bind(e.caps),b.NS.CAPS)},a.connect=function(d,f,h){if(e.reset(),a.registerEventHandlers(),c(Candy).triggerHandler("candy:core.before-connect",{connection:e}),j=j?!0:d&&d.indexOf("@")<0,d&&f){var i=b.getResourceFromJid(d);i&&(k.resource=i),e.connect(n(d)+"/"+k.resource,f,Candy.Core.Event.Strophe.Connect),g=h?new a.ChatUser(d,h):new a.ChatUser(d,b.getNodeFromJid(d))}else d&&h?(e.connect(n(d)+"/"+k.resource,null,Candy.Core.Event.Strophe.Connect),g=new a.ChatUser(null,h)):d?Candy.Core.Event.Login(d):Candy.Core.Event.Login()},a.attach=function(c,d,f,h){g=h?new a.ChatUser(c,h):new a.ChatUser(c,b.getNodeFromJid(c)),e.reset(),a.registerEventHandlers(),e.attach(c,d,f,Candy.Core.Event.Strophe.Connect)},a.disconnect=function(){e.connected&&e.disconnect()},a.addHandler=function(a,b,c,d,f,g,h){return e.addHandler(a,b,c,d,f,g,h)},a.getRoster=function(){return h},a.getUser=function(){return g},a.setUser=function(a){g=a},a.getConnection=function(){return e},a.removeRoom=function(a){delete i[a]},a.getRooms=function(){return i},a.getStropheStatus=function(){return d},a.setStropheStatus=function(a){d=a},a.isAnonymousConnection=function(){return j},a.getOptions=function(){return k},a.getRoom=function(a){return i[a]?i[a]:null},a.onWindowUnload=function(){e.options.sync=!0,a.disconnect(),e.flush()},a.rawInput=function(a){this.log("RECV: "+a)},a.rawOutput=function(a){this.log("SENT: "+a)},a.log=function(){},a.warn=function(){Function.prototype.apply.call(console.warn,console,arguments)},a.error=function(){Function.prototype.apply.call(console.error,console,arguments)},a}(Candy.Core||{},Strophe,jQuery),Candy.View=function(a,b){var c={container:null,roomJid:null},d={language:"en",assets:"res/",messages:{limit:2e3,remove:500},crop:{message:{nickname:15,body:1e3,url:void 0},roster:{nickname:15}},enableXHTML:!1},e=function(c){b.i18n.load(a.Translation[c])},f=function(){b(Candy).on("candy:core.chat.connection",a.Observer.Chat.Connection),b(Candy).on("candy:core.chat.message",a.Observer.Chat.Message),b(Candy).on("candy:core.login",a.Observer.Login),b(Candy).on("candy:core.autojoin-missing",a.Observer.AutojoinMissing),b(Candy).on("candy:core.presence",a.Observer.Presence.update),b(Candy).on("candy:core.presence.leave",a.Observer.Presence.update),b(Candy).on("candy:core.presence.room",a.Observer.Presence.update),b(Candy).on("candy:core.presence.error",a.Observer.PresenceError),b(Candy).on("candy:core.message",a.Observer.Message)},g=function(){Candy.Util.getIeVersion()<9?b(document).focusin(Candy.View.Pane.Window.onFocus).focusout(Candy.View.Pane.Window.onBlur):b(window).focus(Candy.View.Pane.Window.onFocus).blur(Candy.View.Pane.Window.onBlur),b(window).resize(Candy.View.Pane.Chat.fitTabs)},h=function(){a.Pane.Chat.Toolbar.init()},i=function(){b("body").delegate("li[data-tooltip]","mouseenter",Candy.View.Pane.Chat.Tooltip.show)};return a.init=function(a,j){j.resources&&(j.assets=j.resources),delete j.resources,b.extend(!0,d,j),e(d.language),Candy.Util.Parser.setEmoticonPath(this.getOptions().assets+"img/emoticons/"),c.container=a,c.container.html(Mustache.to_html(Candy.View.Template.Chat.pane,{tooltipEmoticons:b.i18n._("tooltipEmoticons"),tooltipSound:b.i18n._("tooltipSound"),tooltipAutoscroll:b.i18n._("tooltipAutoscroll"),tooltipStatusmessage:b.i18n._("tooltipStatusmessage"),tooltipAdministration:b.i18n._("tooltipAdministration"),tooltipUsercount:b.i18n._("tooltipUsercount"),assetsPath:this.getOptions().assets},{tabs:Candy.View.Template.Chat.tabs,mobile:Candy.View.Template.Chat.mobileIcon,rooms:Candy.View.Template.Chat.rooms,modal:Candy.View.Template.Chat.modal,toolbar:Candy.View.Template.Chat.toolbar})),g(),h(),f(),i()},a.getCurrent=function(){return c},a.getOptions=function(){return d},a}(Candy.View||{},jQuery),Candy.Util=function(a,b){a.jidToId=function(a){return MD5.hexdigest(a)},a.escapeJid=function(a){var b=Strophe.escapeNode(Strophe.getNodeFromJid(a)),c=Strophe.getDomainFromJid(a),d=Strophe.getResourceFromJid(a);return a=b+"@"+c,d&&(a+="/"+d),a},a.unescapeJid=function(a){var b=Strophe.unescapeNode(Strophe.getNodeFromJid(a)),c=Strophe.getDomainFromJid(a),d=Strophe.getResourceFromJid(a);return a=b+"@"+c,d&&(a+="/"+d),a},a.crop=function(a,b){return a.length>b&&(a=a.substr(0,b-3)+"..."),a},a.parseAndCropXhtml=function(c,d){return b("
          ").append(a.createHtml(b(c).get(0),d)).html()},a.setCookie=function(a,b,c){var d=new Date;d.setDate((new Date).getDate()+c),document.cookie=a+"="+b+";expires="+d.toUTCString()+";path=/"},a.cookieExists=function(a){return document.cookie.indexOf(a)>-1},a.getCookie=function(a){if(document.cookie){var b=new RegExp(escape(a)+"=([^;]*)","gm"),c=b.exec(document.cookie);if(c)return c[1]}},a.deleteCookie=function(a){document.cookie=a+"=;expires=Thu, 01-Jan-70 00:00:01 GMT;path=/"},a.getPosLeftAccordingToWindowBounds=function(a,c){var d=b(document).width(),e=a.outerWidth(),f=e-a.outerWidth(!0),g="left";return c+e>=d&&(c-=e-f,g="right"),{px:c,backgroundPositionAlignment:g}},a.getPosTopAccordingToWindowBounds=function(a,c){var d=b(document).height(),e=a.outerHeight(),f=e-a.outerHeight(!0),g="top";return c+e>=d&&(c-=e-f,g="bottom"),{px:c,backgroundPositionAlignment:g}},a.localizedTime=function(c){if(void 0===c)return void 0;var d;return d=c.toDateString?c:a.iso8601toDate(c),d.toDateString()===(new Date).toDateString()?d.format(b.i18n._("timeFormat")):d.format(b.i18n._("dateFormat"))},a.iso8601toDate=function(a){var b=Date.parse(a);if(isNaN(b)){var c=/^(\d{4}|[+\-]\d{6})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?))?/.exec(a);if(c){var d=0;return"Z"!==c[8]&&(d=60*+c[10]+ +c[11],"+"===c[9]&&(d=-d)),d-=(new Date).getTimezoneOffset(),new Date(+c[1],+c[2]-1,+c[3],+c[4],+c[5]+d,+c[6],c[7]?+c[7].substr(0,3):0)}b=Date.parse(a.replace(/^(\d{4})(\d{2})(\d{2})/,"$1-$2-$3")+"Z")}return new Date(b)},a.isEmptyObject=function(a){var b;for(b in a)if(a.hasOwnProperty(b))return!1;return!0},a.forceRedraw=function(a){a.css({display:"none"}),setTimeout(function(){this.css({display:"block"})}.bind(a),1)};var c=function(){for(var a,b=3,c=document.createElement("div"),d=c.getElementsByTagName("i");c.innerHTML="",d[0];);return b>4?b:a}();return a.getIeVersion=function(){return c},a.isMobile=function(){var a=!1;return function(b){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|android|ipad|playbook|silk|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(b)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(b.substr(0,4)))&&(a=!0)}(navigator.userAgent||navigator.vendor||window.opera),a},a.Parser={jid:function(a){var b=/^(([^@]+)@)?([^\/]+)(\/(.*))?$/i,c=a.match(b);if(!c)throw"not a valid jid ("+a+")";return{node:c[2],domain:c[3],resource:c[4]}},_emoticonPath:"",setEmoticonPath:function(a){this._emoticonPath=a},emoticons:[{plain:":)",regex:/((\s):-?\)|:-?\)(\s|$))/gm,image:"Smiling.png"},{plain:";)",regex:/((\s);-?\)|;-?\)(\s|$))/gm,image:"Winking.png"},{plain:":D",regex:/((\s):-?D|:-?D(\s|$))/gm,image:"Grinning.png"},{plain:";D",regex:/((\s);-?D|;-?D(\s|$))/gm,image:"Grinning_Winking.png"},{plain:":(",regex:/((\s):-?\(|:-?\((\s|$))/gm,image:"Unhappy.png"},{plain:"^^",regex:/((\s)\^\^|\^\^(\s|$))/gm,image:"Happy_3.png"},{plain:":P",regex:/((\s):-?P|:-?P(\s|$))/gim,image:"Tongue_Out.png"},{plain:";P",regex:/((\s);-?P|;-?P(\s|$))/gim,image:"Tongue_Out_Winking.png"},{plain:":S",regex:/((\s):-?S|:-?S(\s|$))/gim,image:"Confused.png"},{plain:":/",regex:/((\s):-?\/|:-?\/(\s|$))/gm,image:"Uncertain.png"},{plain:"8)",regex:/((\s)8-?\)|8-?\)(\s|$))/gm,image:"Sunglasses.png"},{plain:"$)",regex:/((\s)\$-?\)|\$-?\)(\s|$))/gm,image:"Greedy.png"},{plain:"oO",regex:/((\s)oO|oO(\s|$))/gm,image:"Huh.png"},{plain:":x",regex:/((\s):x|:x(\s|$))/gm,image:"Lips_Sealed.png"},{plain:":666:",regex:/((\s):666:|:666:(\s|$))/gm,image:"Devil.png"},{plain:"<3",regex:/((\s)<3|<3(\s|$))/gm,image:"Heart.png"}],emotify:function(a){var b;for(b=this.emoticons.length-1;b>=0;b--)a=a.replace(this.emoticons[b].regex,'$2$1$3');return a},linkify:function(b){return b=b.replace(/(^|[^\/])(www\.[^\.]+\.[\S]+(\b|$))/gi,"$1http://$2"),b.replace(/(\b(?:(?:https?|ftp|file):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:1\d\d|2[01]\d|22[0-3]|[1-9]\d?)(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?)/gi,function(b,c){return''+a.crop(c,Candy.View.getOptions().crop.message.url)+""})},escape:function(a){return b("
          ").text(a).html()},nl2br:function(a){return a.replace(/\r\n|\r|\n/g,"
          ")},all:function(a){return a&&(a=this.escape(a),a=this.linkify(a),a=this.emotify(a),a=this.nl2br(a)),a}},a.createHtml=function(c,d,e){e=e||0;var f,g,h,i,j,k,l,m,n,o,p;if(c.nodeType===Strophe.ElementType.NORMAL)if(i=c.nodeName.toLowerCase(),Strophe.XHTML.validTag(i))try{for(g=b("<"+i+"/>"),f=0;f0&&(k=l.join("; "),g.attr(j,k))}else g.attr(j,k);for(f=0;fd&&(r=r.substring(0,d)),r=Candy.Util.Parser.all(r),g=b.parseHTML(r)}return g},a}(Candy.Util||{},jQuery),Candy.Core.Action=function(a,b,c){return a.Jabber={Version:function(a){Candy.Core.getConnection().sendIQ($iq({type:"result",to:Candy.Util.escapeJid(a.attr("from")),from:Candy.Util.escapeJid(a.attr("to")),id:a.attr("id")}).c("query",{xmlns:b.NS.VERSION}).c("name",Candy.about.name).up().c("version",Candy.about.version).up().c("os",navigator.userAgent))},SetNickname:function(a,b){b=b instanceof Array?b:Candy.Core.getRooms();var d,e,f=Candy.Core.getConnection();c.each(b,function(b){d=Candy.Util.escapeJid(b+"/"+a),e=$pres({to:d,from:f.jid,id:"pres:"+f.getUniqueId()}),Candy.Core.getConnection().send(e)})},Roster:function(){var a=Candy.Core.getConnection().roster,b=Candy.Core.getOptions();a.registerCallback(Candy.Core.Event.Jabber.RosterPush),c.each(b.initialRosterItems,function(a,b){b.resources={}}),a.get(Candy.Core.Event.Jabber.RosterFetch,b.initialRosterVersion,b.initialRosterItems),Candy.Core.Event.Jabber.RosterLoad(a.items)},Presence:function(a,b){var c=Candy.Core.getConnection();a=a||{},a.id||(a.id="pres:"+c.getUniqueId());var d=$pres(a).c("priority").t(Candy.Core.getOptions().presencePriority.toString()).up().c("c",c.caps.generateCapsAttrs()).up();b&&d.node.appendChild(b.node),c.send(d.tree())},Services:function(){Candy.Core.getConnection().sendIQ($iq({type:"get",xmlns:b.NS.CLIENT}).c("query",{xmlns:b.NS.DISCO_ITEMS}).tree())},Autojoin:function(){if(Candy.Core.getOptions().autojoin===!0){Candy.Core.getConnection().sendIQ($iq({type:"get",xmlns:b.NS.CLIENT}).c("query",{xmlns:b.NS.PRIVATE}).c("storage",{xmlns:b.NS.BOOKMARKS}).tree());var d=Candy.Core.getConnection().getUniqueId("pubsub");Candy.Core.addHandler(Candy.Core.Event.Jabber.Bookmarks,b.NS.PUBSUB,"iq","result",d),Candy.Core.getConnection().sendIQ($iq({type:"get",id:d}).c("pubsub",{xmlns:b.NS.PUBSUB}).c("items",{node:b.NS.BOOKMARKS}).tree())}else c.isArray(Candy.Core.getOptions().autojoin)?c.each(Candy.Core.getOptions().autojoin,function(){a.Jabber.Room.Join.apply(null,this.valueOf().split(":",2))}):c(Candy).triggerHandler("candy:core.autojoin-missing")},EnableCarbons:function(){Candy.Core.getConnection().sendIQ($iq({type:"set"}).c("enable",{xmlns:b.NS.CARBONS}).tree())},ResetIgnoreList:function(){Candy.Core.getConnection().sendIQ($iq({type:"set",from:Candy.Core.getUser().getEscapedJid()}).c("query",{xmlns:b.NS.PRIVACY}).c("list",{name:"ignore"}).c("item",{action:"allow",order:"0"}).tree())},RemoveIgnoreList:function(){Candy.Core.getConnection().sendIQ($iq({type:"set",from:Candy.Core.getUser().getEscapedJid()}).c("query",{xmlns:b.NS.PRIVACY}).c("list",{name:"ignore"}).tree())},GetIgnoreList:function(){var a=$iq({type:"get",from:Candy.Core.getUser().getEscapedJid()}).c("query",{xmlns:b.NS.PRIVACY}).c("list",{name:"ignore"}).tree(),c=Candy.Core.getConnection().sendIQ(a);Candy.Core.addHandler(Candy.Core.Event.Jabber.PrivacyList,null,"iq",null,c)},SetIgnoreListActive:function(){Candy.Core.getConnection().sendIQ($iq({type:"set",from:Candy.Core.getUser().getEscapedJid()}).c("query",{xmlns:b.NS.PRIVACY}).c("active",{name:"ignore"}).tree())},GetJidIfAnonymous:function(){Candy.Core.getUser().getJid()||(Candy.Core.log("[Jabber] Anonymous login"),Candy.Core.getUser().data.jid=Candy.Core.getConnection().jid)},Room:{Join:function(c,d){a.Jabber.Room.Disco(c),c=Candy.Util.escapeJid(c);var e=Candy.Core.getConnection(),f=c+"/"+Candy.Core.getUser().getNick(),g=$pres({to:f,id:"pres:"+e.getUniqueId()}).c("x",{xmlns:b.NS.MUC});d&&g.c("password").t(d),g.up().c("c",e.caps.generateCapsAttrs()),e.send(g.tree())},Leave:function(a){var b=Candy.Core.getRoom(a).getUser();b&&Candy.Core.getConnection().muc.leave(a,b.getNick(),function(){})},Disco:function(a){Candy.Core.getConnection().sendIQ($iq({type:"get",from:Candy.Core.getUser().getEscapedJid(),to:Candy.Util.escapeJid(a)}).c("query",{xmlns:b.NS.DISCO_INFO}).tree())},Message:function(a,d,e,f){if(d=c.trim(d),""===d)return!1;var g=null;return"chat"===e&&(g=b.getResourceFromJid(a),a=b.getBareJidFromJid(a)),Candy.Core.getConnection().muc.message(a,g,d,f,e),!0},Invite:function(a,d,e,f){e=c.trim(e);var g=$msg({to:a}),h=g.c("x",{xmlns:b.NS.MUC_USER});c.each(d,function(a,c){c=b.getBareJidFromJid(c),h.c("invite",{to:c}),"undefined"!=typeof e&&""!==e&&h.c("reason",e)}),"undefined"!=typeof f&&""!==f&&h.c("password",f),Candy.Core.getConnection().send(g)},IgnoreUnignore:function(a){Candy.Core.getUser().addToOrRemoveFromPrivacyList("ignore",a),Candy.Core.Action.Jabber.Room.UpdatePrivacyList()},UpdatePrivacyList:function(){var a=Candy.Core.getUser(),b=$iq({type:"set",from:a.getEscapedJid()}).c("query",{xmlns:"jabber:iq:privacy"}).c("list",{name:"ignore"}),d=a.getPrivacyList("ignore");d.length>0?c.each(d,function(a,c){b.c("item",{type:"jid",value:Candy.Util.escapeJid(c),action:"deny",order:a}).c("message").up().up()}):b.c("item",{action:"allow",order:"0"}),Candy.Core.getConnection().sendIQ(b.tree())},Admin:{UserAction:function(a,c,d,e){a=Candy.Util.escapeJid(a),c=Candy.Util.escapeJid(c);var f={nick:b.getResourceFromJid(c)};switch(d){case"kick":f.role="none";break;case"ban":f.affiliation="outcast";break;default:return!1}return Candy.Core.getConnection().sendIQ($iq({type:"set",from:Candy.Core.getUser().getEscapedJid(),to:a}).c("query",{xmlns:b.NS.MUC_ADMIN}).c("item",f).c("reason").t(e).tree()),!0},SetSubject:function(a,b){Candy.Core.getConnection().muc.setTopic(Candy.Util.escapeJid(a),b)}}}},a}(Candy.Core.Action||{},Strophe,jQuery),Candy.Core.ChatRoom=function(a){this.room={jid:a,name:Strophe.getNodeFromJid(a)},this.user=null,this.roster=new Candy.Core.ChatRoster},Candy.Core.ChatRoom.prototype.setUser=function(a){this.user=a},Candy.Core.ChatRoom.prototype.getUser=function(){return this.user},Candy.Core.ChatRoom.prototype.getJid=function(){return this.room.jid},Candy.Core.ChatRoom.prototype.setName=function(a){this.room.name=a},Candy.Core.ChatRoom.prototype.getName=function(){return this.room.name},Candy.Core.ChatRoom.prototype.setRoster=function(a){this.roster=a},Candy.Core.ChatRoom.prototype.getRoster=function(){return this.roster},Candy.Core.ChatRoster=function(){this.items={}},Candy.Core.ChatRoster.prototype.add=function(a){this.items[a.getJid()]=a},Candy.Core.ChatRoster.prototype.remove=function(a){delete this.items[a]},Candy.Core.ChatRoster.prototype.get=function(a){return this.items[a]},Candy.Core.ChatRoster.prototype.getAll=function(){return this.items},Candy.Core.ChatUser=function(a,b,c,d,e){this.ROLE_MODERATOR="moderator",this.AFFILIATION_OWNER="owner",this.data={jid:a,realJid:e,nick:Strophe.unescapeNode(b),affiliation:c,role:d,privacyLists:{},customData:{},previousNick:void 0,status:"unavailable"}},Candy.Core.ChatUser.prototype.getJid=function(){return this.data.jid?Candy.Util.unescapeJid(this.data.jid):void 0},Candy.Core.ChatUser.prototype.getEscapedJid=function(){return Candy.Util.escapeJid(this.data.jid)},Candy.Core.ChatUser.prototype.setJid=function(a){this.data.jid=a},Candy.Core.ChatUser.prototype.getRealJid=function(){return this.data.realJid?Candy.Util.unescapeJid(this.data.realJid):void 0},Candy.Core.ChatUser.prototype.getNick=function(){return Strophe.unescapeNode(this.data.nick)},Candy.Core.ChatUser.prototype.setNick=function(a){this.data.nick=a},Candy.Core.ChatUser.prototype.getName=function(){var a=this.getContact();return a?a.getName():this.getNick()},Candy.Core.ChatUser.prototype.getRole=function(){return this.data.role},Candy.Core.ChatUser.prototype.setRole=function(a){this.data.role=a},Candy.Core.ChatUser.prototype.setAffiliation=function(a){this.data.affiliation=a},Candy.Core.ChatUser.prototype.getAffiliation=function(){return this.data.affiliation},Candy.Core.ChatUser.prototype.isModerator=function(){return this.getRole()===this.ROLE_MODERATOR||this.getAffiliation()===this.AFFILIATION_OWNER},Candy.Core.ChatUser.prototype.addToOrRemoveFromPrivacyList=function(a,b){this.data.privacyLists[a]||(this.data.privacyLists[a]=[]);var c=-1;return-1!==(c=this.data.privacyLists[a].indexOf(b))?this.data.privacyLists[a].splice(c,1):this.data.privacyLists[a].push(b),this.data.privacyLists[a]},Candy.Core.ChatUser.prototype.getPrivacyList=function(a){return this.data.privacyLists[a]||(this.data.privacyLists[a]=[]),this.data.privacyLists[a]},Candy.Core.ChatUser.prototype.setPrivacyLists=function(a){this.data.privacyLists=a},Candy.Core.ChatUser.prototype.isInPrivacyList=function(a,b){return this.data.privacyLists[a]?-1!==this.data.privacyLists[a].indexOf(b):!1},Candy.Core.ChatUser.prototype.setCustomData=function(a){this.data.customData=a},Candy.Core.ChatUser.prototype.getCustomData=function(){return this.data.customData},Candy.Core.ChatUser.prototype.setPreviousNick=function(a){this.data.previousNick=a},Candy.Core.ChatUser.prototype.getPreviousNick=function(){return this.data.previousNick},Candy.Core.ChatUser.prototype.getContact=function(){return Candy.Core.getRoster().get(Strophe.getBareJidFromJid(this.data.realJid))},Candy.Core.ChatUser.prototype.setStatus=function(a){this.data.status=a},Candy.Core.ChatUser.prototype.getStatus=function(){return this.data.status},Candy.Core.Contact=function(a){this.data=a},Candy.Core.Contact.prototype.getJid=function(){return this.data.jid?Candy.Util.unescapeJid(this.data.jid):void 0},Candy.Core.Contact.prototype.getEscapedJid=function(){return Candy.Util.escapeJid(this.data.jid)},Candy.Core.Contact.prototype.getName=function(){return this.data.name?Strophe.unescapeNode(this.data.name):this.getJid()},Candy.Core.Contact.prototype.getNick=Candy.Core.Contact.prototype.getName,Candy.Core.Contact.prototype.getSubscription=function(){return this.data.subscription?this.data.subscription:"none"},Candy.Core.Contact.prototype.getGroups=function(){return this.data.groups},Candy.Core.Contact.prototype.getStatus=function(){var a,b="unavailable",c=this;return $.each(this.data.resources,function(d,e){var f;f=void 0===e.priority||""===e.priority?0:parseInt(e.priority,10),(""===e.show||null===e.show||void 0===e.show)&&(e.show="available"),void 0===a||f>a?(b=e.show,a=f):a===f&&c._weightForStatus(b)>c._weightForStatus(e.show)&&(b=e.show)}),b},Candy.Core.Contact.prototype._weightForStatus=function(a){switch(a){case"chat":case"dnd":return 1;case"available":case"":return 2;case"away":return 3;case"xa":return 4;case"unavailable":return 5}},Candy.Core.Event=function(a,b,c){return a.Login=function(a){c(Candy).triggerHandler("candy:core.login",{presetJid:a})},a.Strophe={Connect:function(a){switch(Candy.Core.setStropheStatus(a),a){case b.Status.CONNECTED:Candy.Core.log("[Connection] Connected"),Candy.Core.Action.Jabber.GetJidIfAnonymous();case b.Status.ATTACHED:Candy.Core.log("[Connection] Attached"),c(Candy).on("candy:core:roster:fetched",function(){Candy.Core.Action.Jabber.Presence()}),Candy.Core.Action.Jabber.Roster(),Candy.Core.Action.Jabber.EnableCarbons(),Candy.Core.Action.Jabber.Autojoin(),Candy.Core.Action.Jabber.GetIgnoreList();break;case b.Status.DISCONNECTED:Candy.Core.log("[Connection] Disconnected");break;case b.Status.AUTHFAIL:Candy.Core.log("[Connection] Authentication failed");break;case b.Status.CONNECTING:Candy.Core.log("[Connection] Connecting");break;case b.Status.DISCONNECTING:Candy.Core.log("[Connection] Disconnecting");break;case b.Status.AUTHENTICATING:Candy.Core.log("[Connection] Authenticating");break;case b.Status.ERROR:case b.Status.CONNFAIL:Candy.Core.log("[Connection] Failed ("+a+")");break;default:Candy.Core.warn("[Connection] Unknown status received:",a)}c(Candy).triggerHandler("candy:core.chat.connection",{status:a})}},a.Jabber={Version:function(a){return Candy.Core.log("[Jabber] Version"),Candy.Core.Action.Jabber.Version(c(a)),!0},Presence:function(d){return Candy.Core.log("[Jabber] Presence"),d=c(d),d.children('x[xmlns^="'+b.NS.MUC+'"]').length>0?"error"===d.attr("type")?a.Jabber.Room.PresenceError(d):a.Jabber.Room.Presence(d):c(Candy).triggerHandler("candy:core.presence",{from:d.attr("from"),stanza:d}),!0},RosterLoad:function(b){return a.Jabber._addRosterItems(b),c(Candy).triggerHandler("candy:core:roster:loaded",{roster:Candy.Core.getRoster()}),!0},RosterFetch:function(b){return a.Jabber._addRosterItems(b),c(Candy).triggerHandler("candy:core:roster:fetched",{roster:Candy.Core.getRoster()}),!0},RosterPush:function(b,d){if(!d)return!0;if("remove"===d.subscription){var e=Candy.Core.getRoster().get(d.jid);Candy.Core.getRoster().remove(d.jid),c(Candy).triggerHandler("candy:core:roster:removed",{contact:e})}else{var f=Candy.Core.getRoster().get(d.jid);f?c(Candy).triggerHandler("candy:core:roster:updated",{contact:f}):(f=a.Jabber._addRosterItem(d),c(Candy).triggerHandler("candy:core:roster:added",{contact:f}))}return!0},_addRosterItem:function(a){var b=new Candy.Core.Contact(a);return Candy.Core.getRoster().add(b),b},_addRosterItems:function(b){c.each(b,function(b,c){a.Jabber._addRosterItem(c)})},Bookmarks:function(a){return Candy.Core.log("[Jabber] Bookmarks"),c("conference",a).each(function(){var a=c(this);a.attr("autojoin")&&Candy.Core.Action.Jabber.Room.Join(a.attr("jid"))}),!0},PrivacyList:function(b){Candy.Core.log("[Jabber] PrivacyList");var d=Candy.Core.getUser();return b=c(b),"result"===b.attr("type")?(c('list[name="ignore"] item',b).each(function(){var a=c(this);"deny"===a.attr("action")&&d.addToOrRemoveFromPrivacyList("ignore",a.attr("value"))}),Candy.Core.Action.Jabber.SetIgnoreListActive(),!1):a.Jabber.PrivacyListError(b)},PrivacyListError:function(a){return Candy.Core.log("[Jabber] PrivacyListError"),c('error[code="404"][type="cancel"] item-not-found',a)&&(Candy.Core.Action.Jabber.ResetIgnoreList(),Candy.Core.Action.Jabber.SetIgnoreListActive()),!1},Message:function(b){Candy.Core.log("[Jabber] Message"),b=c(b);var d=b.attr("type")||"normal";switch(d){case"normal":var e=a.Jabber._findInvite(b);e&&c(Candy).triggerHandler("candy:core:chat:invite",e),c(Candy).triggerHandler("candy:core:chat:message:normal",{type:d,message:b});break;case"headline":b.attr("to")?c(Candy).triggerHandler("candy:core.chat.message.server",{type:d,subject:b.children("subject").text(),message:b.children("body").text()}):c(Candy).triggerHandler("candy:core.chat.message.admin",{type:d,message:b.children("body").text()});break;case"groupchat":case"chat":case"error":a.Jabber.Room.Message(b);break;default:c(Candy).triggerHandler("candy:core:chat:message:other",{type:d,message:b})}return!0},_findInvite:function(a){var b,c=a.find("invite"),d=a.find('x[xmlns="jabber:x:conference"]');if(c.length>0){var e,f,g=a.find("password"),h=c.find("reason"),i=c.find("continue");""!==g.text()&&(e=g.text()),""!==h.text()&&(f=h.text()),b={roomJid:a.attr("from"),from:c.attr("from"),reason:f,password:e,continuedThread:i.attr("thread")}}return d.length>0&&(b={roomJid:d.attr("jid"),from:a.attr("from"),reason:d.attr("reason"),password:d.attr("password"),continuedThread:d.attr("thread")}),b},Room:{Disco:function(a){if(Candy.Core.log("[Jabber:Room] Disco"),a=c(a),!a.find('identity[category="conference"]').length)return!0;var d=b.getBareJidFromJid(Candy.Util.unescapeJid(a.attr("from")));Candy.Core.getRooms()[d]||(Candy.Core.getRooms()[d]=new Candy.Core.ChatRoom(d));var e=a.find("identity");if(e.length){var f=e.attr("name"),g=Candy.Core.getRoom(d);null===g.getName()&&g.setName(b.unescapeNode(f))}return!0},Presence:function(d){Candy.Core.log("[Jabber:Room] Presence");var e=Candy.Util.unescapeJid(d.attr("from")),f=b.getBareJidFromJid(e),g=d.attr("type"),h=a.Jabber.Room._msgHasStatusCode(d,201),i=a.Jabber.Room._msgHasStatusCode(d,210),j=a.Jabber.Room._msgHasStatusCode(d,303),k=Candy.Core.getRoom(f);k||(Candy.Core.getRooms()[f]=new Candy.Core.ChatRoom(f),k=Candy.Core.getRoom(f));var l,m,n,o=k.getRoster(),p=k.getUser()?k.getUser():Candy.Core.getUser(),q=d.find("show"),r=d.find("item");if("unavailable"!==g){if(o.get(e)){m=o.get(e);var s=r.attr("role"),t=r.attr("affiliation");m.setRole(s),m.setAffiliation(t),m.setStatus("available"),l="join"}else n=b.getResourceFromJid(e),m=new Candy.Core.ChatUser(e,n,r.attr("affiliation"),r.attr("role"),r.attr("jid")),null!==k.getUser()||Candy.Core.getUser().getNick()!==n&&!i||(k.setUser(m),p=m),m.setStatus("available"),o.add(m),l="join";q.length>0&&m.setStatus(q.text())}else if(m=o.get(e),o.remove(e),j)n=r.attr("nick"),l="nickchange",m.setPreviousNick(m.getNick()),m.setNick(n),m.setJid(b.getBareJidFromJid(e)+"/"+n),o.add(m);else if(l="leave","none"===r.attr("role")&&(a.Jabber.Room._msgHasStatusCode(d,307)?l="kick":a.Jabber.Room._msgHasStatusCode(d,301)&&(l="ban")),b.getResourceFromJid(e)===p.getNick())return a.Jabber.Room._selfLeave(d,e,f,k.getName(),l),!0;return c(Candy).triggerHandler("candy:core.presence.room",{roomJid:f,roomName:k.getName(),user:m,action:l,currentUser:p,isNewRoom:h}),!0},_msgHasStatusCode:function(a,b){return a.find('status[code="'+b+'"]').length>0},_selfLeave:function(a,d,e,f,g){Candy.Core.log("[Jabber:Room] Leave"),Candy.Core.removeRoom(e);var h,i,j=a.find("item");("kick"===g||"ban"===g)&&(h=j.find("reason").text(),i=j.find("actor").attr("jid"));var k=new Candy.Core.ChatUser(d,b.getResourceFromJid(d),j.attr("affiliation"),j.attr("role"));c(Candy).triggerHandler("candy:core.presence.leave",{roomJid:e,roomName:f,type:g,reason:h,actor:i,user:k})},PresenceError:function(a){Candy.Core.log("[Jabber:Room] Presence Error");var d=Candy.Util.unescapeJid(a.attr("from")),e=b.getBareJidFromJid(d),f=Candy.Core.getRooms()[e],g=f.getName();return Candy.Core.removeRoom(e),f=void 0,c(Candy).triggerHandler("candy:core.presence.error",{msg:a,type:a.children("error").children()[0].tagName.toLowerCase(),roomJid:e,roomName:g}), +!0},Message:function(d){Candy.Core.log("[Jabber:Room] Message");var e=!1,f=Candy.Util.unescapeJid(d.attr("from"));d.children('sent[xmlns="'+b.NS.CARBONS+'"]').length>0&&(e=!0,d=c(d.children("sent").children("forwarded").children("message")),f=Candy.Util.unescapeJid(d.attr("to"))),d.children('received[xmlns="'+b.NS.CARBONS+'"]').length>0&&(e=!0,d=c(d.children("received").children("forwarded").children("message")),f=Candy.Util.unescapeJid(d.attr("from")));var g,h,i,j,k,l,m;if(d.children("subject").length>0&&d.children("subject").text().length>0&&"groupchat"===d.attr("type"))g=Candy.Util.unescapeJid(b.getBareJidFromJid(f)),i=Candy.Util.unescapeJid(b.getBareJidFromJid(d.attr("from"))),h=b.getNodeFromJid(g),j={from:i,name:b.getNodeFromJid(i),body:d.children("subject").text(),type:"subject"};else if("error"===d.attr("type")){var n=d.children("error");n.children("text").length>0&&(g=f,h=b.getNodeFromJid(g),j={from:d.attr("from"),type:"info",body:n.children("text").text()})}else{if(!(d.children("body").length>0))return!0;if("chat"===d.attr("type")||"normal"===d.attr("type")){i=Candy.Util.unescapeJid(d.attr("from"));var o=b.getBareJidFromJid(f),p=b.getBareJidFromJid(i),q=!Candy.Core.getRoom(o);if(q){g=o;var r=Candy.Core.getRoster().get(o);h=r?r.getName():b.getNodeFromJid(o),m=p===Candy.Core.getUser().getJid()?Candy.Core.getUser():Candy.Core.getRoster().get(p),k=m?m.getName():b.getNodeFromJid(i)}else g=f,l=Candy.Core.getRoom(Candy.Util.unescapeJid(b.getBareJidFromJid(i))),m=l.getRoster().get(i),k=m?m.getName():b.getResourceFromJid(i),h=k;j={from:i,name:k,body:d.children("body").text(),type:d.attr("type"),isNoConferenceRoomJid:q}}else{i=Candy.Util.unescapeJid(d.attr("from")),g=Candy.Util.unescapeJid(b.getBareJidFromJid(f));var s=b.getResourceFromJid(f);if(s)l=Candy.Core.getRoom(g),h=l.getName(),m=s===Candy.Core.getUser().getNick()?Candy.Core.getUser():l.getRoster().get(i),k=m?m.getName():b.unescapeNode(s),j={from:g,name:k,body:d.children("body").text(),type:d.attr("type")};else{if(!Candy.Core.getRooms()[f])return!0;h="",j={from:g,name:"",body:d.children("body").text(),type:"info"}}}var t=d.children('html[xmlns="'+b.NS.XHTML_IM+'"]');if(t.length>0){var u=c(c("
          ").append(t.children("body").first().contents()).html());j.xhtmlMessage=u}a.Jabber.Room._checkForChatStateNotification(d,g,k)}var v=d.children('delay[xmlns="'+b.NS.DELAY+'"]');j.delay=!1,v.length<1?v=d.children('x[xmlns="'+b.NS.JABBER_DELAY+'"]'):j.delay=!0;var w=v.length>0?v.attr("stamp"):(new Date).toISOString();return c(Candy).triggerHandler("candy:core.message",{roomJid:g,roomName:h,message:j,timestamp:w,carbon:e,stanza:d}),!0},_checkForChatStateNotification:function(a,b,d){var e=a.children('*[xmlns="http://jabber.org/protocol/chatstates"]');e.length>0&&c(Candy).triggerHandler("candy:core:message:chatstate",{name:d,roomJid:b,chatstate:e[0].tagName})}}},a}(Candy.Core.Event||{},Strophe,jQuery),Candy.View.Observer=function(a,b){var c=!0;return a.Chat={Connection:function(a,d){var e="candy:view.connection.status-"+d.status;if(b(Candy).triggerHandler(e)===!1)return!1;switch(d.status){case Strophe.Status.CONNECTING:case Strophe.Status.AUTHENTICATING:Candy.View.Pane.Chat.Modal.show(b.i18n._("statusConnecting"),!1,!0);break;case Strophe.Status.ATTACHED:case Strophe.Status.CONNECTED:c===!0&&(Candy.View.Pane.Chat.Modal.show(b.i18n._("statusConnected")),Candy.View.Pane.Chat.Modal.hide());break;case Strophe.Status.DISCONNECTING:Candy.View.Pane.Chat.Modal.show(b.i18n._("statusDisconnecting"),!1,!0);break;case Strophe.Status.DISCONNECTED:var f=Candy.Core.isAnonymousConnection()?Strophe.getDomainFromJid(Candy.Core.getUser().getJid()):null;Candy.View.Pane.Chat.Modal.showLoginForm(b.i18n._("statusDisconnected"),f);break;case Strophe.Status.AUTHFAIL:Candy.View.Pane.Chat.Modal.showLoginForm(b.i18n._("statusAuthfail"));break;default:Candy.View.Pane.Chat.Modal.show(b.i18n._("status",d.status))}},Message:function(a,b){"message"===b.type?Candy.View.Pane.Chat.adminMessage(b.subject||"",b.message):("chat"===b.type||"groupchat"===b.type)&&Candy.View.Pane.Chat.onInfoMessage(Candy.View.getCurrent().roomJid,b.subject||"",b.message)}},a.Presence={update:function(c,d){if("leave"===d.type){var e=Candy.View.Pane.Room.getUser(d.roomJid);Candy.View.Pane.Room.close(d.roomJid),a.Presence.notifyPrivateChats(e,d.type)}else if("kick"===d.type||"ban"===d.type){var f,g=d.actor?Strophe.getNodeFromJid(d.actor):null,h=[d.roomName];switch(g&&h.push(g),d.type){case"kick":f=b.i18n._(g?"youHaveBeenKickedBy":"youHaveBeenKicked",h);break;case"ban":f=b.i18n._(g?"youHaveBeenBannedBy":"youHaveBeenBanned",h)}Candy.View.Pane.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.adminMessageReason,{reason:d.reason,_action:f,_reason:b.i18n._("reasonWas",[d.reason])})),setTimeout(function(){Candy.View.Pane.Chat.Modal.hide(function(){Candy.View.Pane.Room.close(d.roomJid),a.Presence.notifyPrivateChats(d.user,d.type)})},5e3);var i={type:d.type,reason:d.reason,roomJid:d.roomJid,user:d.user};b(Candy).triggerHandler("candy:view.presence",[i])}else if(d.roomJid){if(d.roomJid=Candy.Util.unescapeJid(d.roomJid),!Candy.View.Pane.Chat.rooms[d.roomJid]){if(Candy.View.Pane.Room.init(d.roomJid,d.roomName)===!1)return!1;Candy.View.Pane.Room.show(d.roomJid)}Candy.View.Pane.Roster.update(d.roomJid,d.user,d.action,d.currentUser),Candy.View.Pane.Chat.rooms[d.user.getJid()]&&"nickchange"!==d.action&&(Candy.View.Pane.Roster.update(d.user.getJid(),d.user,d.action,d.currentUser),Candy.View.Pane.PrivateRoom.setStatus(d.user.getJid(),d.action))}else{var j=Strophe.getBareJidFromJid(d.from),k=Candy.View.Pane.Chat.rooms[j];if(!k)return!1;k.targetJid=j}},notifyPrivateChats:function(a,b){Candy.Core.log("[View:Observer] notify Private Chats");var c;for(c in Candy.View.Pane.Chat.rooms)Candy.View.Pane.Chat.rooms.hasOwnProperty(c)&&Candy.View.Pane.Room.getUser(c)&&a.getJid()===Candy.View.Pane.Room.getUser(c).getJid()&&(Candy.View.Pane.Roster.update(c,a,b,a),Candy.View.Pane.PrivateRoom.setStatus(c,b))}},a.PresenceError=function(a,c){switch(c.type){case"not-authorized":var d;c.msg.children("x").children("password").length>0&&(d=b.i18n._("passwordEnteredInvalid",[c.roomName])),Candy.View.Pane.Chat.Modal.showEnterPasswordForm(c.roomJid,c.roomName,d);break;case"conflict":Candy.View.Pane.Chat.Modal.showNicknameConflictForm(c.roomJid);break;case"registration-required":Candy.View.Pane.Chat.Modal.showError("errorMembersOnly",[c.roomName]);break;case"service-unavailable":Candy.View.Pane.Chat.Modal.showError("errorMaxOccupantsReached",[c.roomName])}},a.Message=function(a,b){if("subject"===b.message.type)Candy.View.Pane.Chat.rooms[b.roomJid]||(Candy.View.Pane.Room.init(b.roomJid,b.roomName),Candy.View.Pane.Room.show(b.roomJid)),Candy.View.Pane.Room.setSubject(b.roomJid,b.message.body);else if("info"===b.message.type)Candy.View.Pane.Chat.infoMessage(b.roomJid,null,b.message.body);else{"chat"!==b.message.type||Candy.View.Pane.Chat.rooms[b.roomJid]||Candy.View.Pane.PrivateRoom.open(b.roomJid,b.roomName,!1,b.message.isNoConferenceRoomJid);var c=Candy.View.Pane.Chat.rooms[b.roomJid];c.targetJid!==b.roomJid||b.carbon?c.targetJid===b.message.from||(c.targetJid=b.roomJid):c.targetJid=b.message.from,Candy.View.Pane.Message.show(b.roomJid,b.message.name,b.message.body,b.message.xhtmlMessage,b.timestamp,b.message.from,b.carbon,b.stanza)}},a.Login=function(a,b){Candy.View.Pane.Chat.Modal.showLoginForm(null,b.presetJid)},a.AutojoinMissing=function(){c=!1,Candy.View.Pane.Chat.Modal.showError("errorAutojoinMissing")},a}(Candy.View.Observer||{},jQuery),Candy.View.Pane=function(a,b){return a.Chat={rooms:[],addTab:function(c,d,e){var f=Candy.Util.jidToId(c),g={roomJid:c,roomName:d,roomType:e,roomId:f};if(b(Candy).triggerHandler("candy:view.pane.before-tab",g)===!1)return void event.preventDefault();var h=Mustache.to_html(Candy.View.Template.Chat.tab,{roomJid:c,roomId:f,name:d||Strophe.getNodeFromJid(c),privateUserChat:function(){return"chat"===e},roomType:e}),i=b(h).appendTo("#chat-tabs");i.click(a.Chat.tabClick),b("a.close",i).click(a.Chat.tabClose),a.Chat.fitTabs()},getTab:function(a){return b("#chat-tabs").children('li[data-roomjid="'+a+'"]')},removeTab:function(b){a.Chat.getTab(b).remove(),a.Chat.fitTabs()},setActiveTab:function(a){b("#chat-tabs").children().each(function(){var c=b(this);c.attr("data-roomjid")===a?c.addClass("active"):c.removeClass("active")})},increaseUnreadMessages:function(b){var c=this.getTab(b).find(".unread");c.show().text(""!==c.text()?parseInt(c.text(),10)+1:1),("chat"===a.Chat.rooms[b].type||Candy.View.getOptions().updateWindowOnAllMessages===!0)&&a.Window.increaseUnreadMessages()},clearUnreadMessages:function(b){var c=a.Chat.getTab(b).find(".unread");a.Window.reduceUnreadMessages(c.text()),c.hide().text("")},tabClick:function(c){var d=Candy.View.getCurrent().roomJid,e=a.Room.getPane(d,".message-pane");e&&(a.Chat.rooms[d].scrollPosition=e.scrollTop()),a.Room.show(b(this).attr("data-roomjid")),c.preventDefault()},tabClose:function(){var c=b(this).parent().attr("data-roomjid");return"chat"===a.Chat.rooms[c].type?a.Room.close(c):Candy.Core.Action.Jabber.Room.Leave(c),!1},allTabsClosed:function(){return Candy.Core.getOptions().disconnectWithoutTabs?(Candy.Core.disconnect(),a.Chat.Toolbar.hide(),void a.Chat.hideMobileIcon()):void 0},fitTabs:function(){var a=b("#chat-tabs").innerWidth(),c=0,d=b("#chat-tabs").children();if(d.each(function(){c+=b(this).css({width:"auto",overflow:"visible"}).outerWidth(!0)}),c>a){var e=d.outerWidth(!0)-d.width(),f=Math.floor(a/d.length)-e;d.css({width:f,overflow:"hidden"})}},hideMobileIcon:function(){b("#mobile-roster-icon").hide()},showMobileIcon:function(){b("#mobile-roster-icon").show()},clickMobileIcon:function(a){b(".room-pane").is(".open")?b(".room-pane").removeClass("open"):b(".room-pane").addClass("open"),a.preventDefault()},adminMessage:function(c,d){if(Candy.View.getCurrent().roomJid){d=Candy.Util.Parser.all(d.substring(0,Candy.View.getOptions().crop.message.body)),Candy.View.getOptions().enableXHTML===!0&&(d=Candy.Util.parseAndCropXhtml(d,Candy.View.getOptions().crop.message.body));var e=new Date,f=Mustache.to_html(Candy.View.Template.Chat.adminMessage,{subject:c,message:d,sender:b.i18n._("administratorMessageSubject"),time:Candy.Util.localizedTime(e),timestamp:e.toISOString()});b("#chat-rooms").children().each(function(){a.Room.appendToMessagePane(b(this).attr("data-roomjid"),f)}),a.Room.scrollToBottom(Candy.View.getCurrent().roomJid),b(Candy).triggerHandler("candy:view.chat.admin-message",{subject:c,message:d})}},infoMessage:function(b,c,d){a.Chat.onInfoMessage(b,c,d)},onInfoMessage:function(c,d,e){if(e=e||"",Candy.View.getCurrent().roomJid&&a.Chat.rooms[c]){e=Candy.View.getOptions().enableXHTML===!0&&e.length>0?Candy.Util.parseAndCropXhtml(e,Candy.View.getOptions().crop.message.body):Candy.Util.Parser.all(e.substring(0,Candy.View.getOptions().crop.message.body));var f=new Date,g=Mustache.to_html(Candy.View.Template.Chat.infoMessage,{subject:d,message:b.i18n._(e),time:Candy.Util.localizedTime(f),timestamp:f.toISOString()});a.Room.appendToMessagePane(c,g),Candy.View.getCurrent().roomJid===c&&a.Room.scrollToBottom(Candy.View.getCurrent().roomJid)}},Toolbar:{_supportsNativeAudio:null,init:function(){b("#emoticons-icon").click(function(b){a.Chat.Context.showEmoticonsMenu(b.currentTarget),b.stopPropagation()}),b("#chat-autoscroll-control").click(a.Chat.Toolbar.onAutoscrollControlClick);try{if(document.createElement("audio").canPlayType){var c=document.createElement("audio");c.canPlayType("audio/mpeg;").replace(/no/,"")?a.Chat.Toolbar._supportsNativeAudio="mp3":c.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/,"")?a.Chat.Toolbar._supportsNativeAudio="ogg":c.canPlayType('audio/mp4; codecs="mp4a.40.2"').replace(/no/,"")&&(a.Chat.Toolbar._supportsNativeAudio="m4a")}}catch(d){}b("#chat-sound-control").click(a.Chat.Toolbar.onSoundControlClick),Candy.Util.cookieExists("candy-nosound")&&b("#chat-sound-control").click(),b("#chat-statusmessage-control").click(a.Chat.Toolbar.onStatusMessageControlClick),Candy.Util.cookieExists("candy-nostatusmessages")&&b("#chat-statusmessage-control").click(),b(".box-shadow-icon").click(a.Chat.clickMobileIcon)},show:function(){b("#chat-toolbar").show()},hide:function(){b("#chat-toolbar").hide()},update:function(c){var d=b("#chat-toolbar").find(".context"),e=a.Room.getUser(c);e&&e.isModerator()?d.show().click(function(b){a.Chat.Context.show(b.currentTarget,c),b.stopPropagation()}):d.hide(),a.Chat.Toolbar.updateUsercount(a.Chat.rooms[c].usercount)},playSound:function(){a.Chat.Toolbar.onPlaySound()},onPlaySound:function(){try{null!==a.Chat.Toolbar._supportsNativeAudio?new Audio(Candy.View.getOptions().assets+"notify."+a.Chat.Toolbar._supportsNativeAudio).play():(b("#chat-sound-control bgsound").remove(),b("").attr({src:Candy.View.getOptions().assets+"notify.mp3",loop:1,autostart:!0}).appendTo("#chat-sound-control"))}catch(c){}},onSoundControlClick:function(){var c=b("#chat-sound-control");c.hasClass("checked")?(a.Chat.Toolbar.playSound=function(){},Candy.Util.setCookie("candy-nosound","1",365)):(a.Chat.Toolbar.playSound=function(){a.Chat.Toolbar.onPlaySound()},Candy.Util.deleteCookie("candy-nosound")),c.toggleClass("checked")},onAutoscrollControlClick:function(){var c=b("#chat-autoscroll-control");c.hasClass("checked")?(a.Room.scrollToBottom=function(b){a.Room.onScrollToStoredPosition(b)},a.Window.autoscroll=!1):(a.Room.scrollToBottom=function(b){a.Room.onScrollToBottom(b)},a.Room.scrollToBottom(Candy.View.getCurrent().roomJid),a.Window.autoscroll=!0),c.toggleClass("checked")},onStatusMessageControlClick:function(){var c=b("#chat-statusmessage-control");c.hasClass("checked")?(a.Chat.infoMessage=function(){},Candy.Util.setCookie("candy-nostatusmessages","1",365)):(a.Chat.infoMessage=function(b,c,d){a.Chat.onInfoMessage(b,c,d)},Candy.Util.deleteCookie("candy-nostatusmessages")),c.toggleClass("checked")},updateUsercount:function(a){b("#chat-usercount").text(a)}},Modal:{show:function(c,d,e,f){d?a.Chat.Modal.showCloseControl():a.Chat.Modal.hideCloseControl(),e?a.Chat.Modal.showSpinner():a.Chat.Modal.hideSpinner(),b("#chat-modal").removeClass().addClass("modal-common"),f&&b("#chat-modal").addClass(f),b("#chat-modal").stop(!1,!0),b("#chat-modal-body").html(c),b("#chat-modal").fadeIn("fast"),b("#chat-modal-overlay").show()},hide:function(a){b("#chat-modal").removeClass().addClass("modal-common"),b("#chat-modal").fadeOut("fast",function(){b("#chat-modal-body").text(""),b("#chat-modal-overlay").hide()}),b(document).keydown(function(a){27===a.which&&a.preventDefault()}),a&&a()},showSpinner:function(){b("#chat-modal-spinner").show()},hideSpinner:function(){b("#chat-modal-spinner").hide()},showCloseControl:function(){b("#admin-message-cancel").show().click(function(b){a.Chat.Modal.hide(),b.preventDefault()}),b(document).keydown(function(b){27===b.which&&(a.Chat.Modal.hide(),b.preventDefault())})},hideCloseControl:function(){b("#admin-message-cancel").hide().click(function(){})},showLoginForm:function(c,d){var e=Candy.Core.getOptions().domains,f=Candy.Core.getOptions().hideDomainList;e=e?e.map(function(a){return{domain:a}}):null;var g=e&&!f?"login-with-domains":null;a.Chat.Modal.show((c?c:"")+Mustache.to_html(Candy.View.Template.Login.form,{_labelNickname:b.i18n._("labelNickname"),_labelUsername:b.i18n._("labelUsername"),domains:e,_labelPassword:b.i18n._("labelPassword"),_loginSubmit:b.i18n._("loginSubmit"),displayPassword:!Candy.Core.isAnonymousConnection(),displayUsername:!d,displayDomain:e?!0:!1,displayNickname:Candy.Core.isAnonymousConnection(),presetJid:d?d:!1}),null,null,g),f&&(b("#domain").hide(),b(".at-symbol").hide()),b("#login-form").children(":input:first").focus(),b("#login-form").submit(function(){var a=b("#username").val(),c=b("#password").val(),e=b("#domain");if(e=e.length?e.val().split(" ")[0]:null,Candy.Core.isAnonymousConnection())Candy.Core.connect(d,null,a);else{var f;e?(a=a.split("@")[0],f=a+"@"+e):f=Candy.Core.getUser()&&a.indexOf("@")<0?a+"@"+Strophe.getDomainFromJid(Candy.Core.getUser().getJid()):a,f.indexOf("@")<0&&!Candy.Core.getUser()?Candy.View.Pane.Chat.Modal.showLoginForm(b.i18n._("loginInvalid")):Candy.Core.connect(f,c)}return!1})},showEnterPasswordForm:function(c,d,e){a.Chat.Modal.show(Mustache.to_html(Candy.View.Template.PresenceError.enterPasswordForm,{roomName:d,_labelPassword:b.i18n._("labelPassword"),_label:e?e:b.i18n._("enterRoomPassword",[d]),_joinSubmit:b.i18n._("enterRoomPasswordSubmit")}),!0),b("#password").focus(),b("#enter-password-form").submit(function(){var d=b("#password").val();return a.Chat.Modal.hide(function(){Candy.Core.Action.Jabber.Room.Join(c,d)}),!1})},showNicknameConflictForm:function(c){a.Chat.Modal.show(Mustache.to_html(Candy.View.Template.PresenceError.nicknameConflictForm,{_labelNickname:b.i18n._("labelNickname"),_label:b.i18n._("nicknameConflict"),_loginSubmit:b.i18n._("loginSubmit")})),b("#nickname").focus(),b("#nickname-conflict-form").submit(function(){var d=b("#nickname").val();return a.Chat.Modal.hide(function(){Candy.Core.getUser().data.nick=d,Candy.Core.Action.Jabber.Room.Join(c)}),!1})},showError:function(c,d){a.Chat.Modal.show(Mustache.to_html(Candy.View.Template.PresenceError.displayError,{_error:b.i18n._(c,d)}),!0)}},Tooltip:{show:function(a,c){var d=b("#tooltip"),e=b(a.currentTarget);if(c||(c=e.attr("data-tooltip")),0===d.length){var f=Mustache.to_html(Candy.View.Template.Chat.tooltip);b("#chat-pane").append(f),d=b("#tooltip")}b("#context-menu").hide(),d.stop(!1,!0),d.children("div").html(c);var g=e.offset(),h=Candy.Util.getPosLeftAccordingToWindowBounds(d,g.left),i=Candy.Util.getPosTopAccordingToWindowBounds(d,g.top);d.css({left:h.px,top:i.px}).removeClass("left-top left-bottom right-top right-bottom").addClass(h.backgroundPositionAlignment+"-"+i.backgroundPositionAlignment).fadeIn("fast"),e.mouseleave(function(a){a.stopPropagation(),b("#tooltip").stop(!1,!0).fadeOut("fast",function(){b(this).css({top:0,left:0})})})}},Context:{init:function(){if(0===b("#context-menu").length){var a=Mustache.to_html(Candy.View.Template.Chat.Context.menu);b("#chat-pane").append(a),b("#context-menu").mouseleave(function(){b(this).fadeOut("fast")})}},show:function(c,d,e){c=b(c);var f=a.Chat.rooms[d].id,g=b("#context-menu"),h=b("ul li",g);b("#tooltip").hide(),e||(e=Candy.Core.getUser()),h.remove();var i,j=this.getMenuLinks(d,e,c),k=function(a,c){return function(d){d.data.callback(d,a,c),b("#context-menu").hide()}};for(i in j)if(j.hasOwnProperty(i)){var l=j[i],m=Mustache.to_html(Candy.View.Template.Chat.Context.menulinks,{roomId:f,"class":l["class"],id:i,label:l.label});b("ul",g).append(m),b("#context-menu-"+i).bind("click",l,k(d,e))}if(i){var n=c.offset(),o=Candy.Util.getPosLeftAccordingToWindowBounds(g,n.left),p=Candy.Util.getPosTopAccordingToWindowBounds(g,n.top);return g.css({left:o.px,top:p.px}).removeClass("left-top left-bottom right-top right-bottom").addClass(o.backgroundPositionAlignment+"-"+p.backgroundPositionAlignment).fadeIn("fast"),b(Candy).triggerHandler("candy:view.roster.after-context-menu",{roomJid:d,user:e,element:g}),!0}},getMenuLinks:function(c,d,e){var f,g,h={roomJid:c,user:d,elem:e,menulinks:this.initialMenuLinks(e)};b(Candy).triggerHandler("candy:view.roster.context-menu",h),f=h.menulinks;for(g in f)f.hasOwnProperty(g)&&void 0!==f[g].requiredPermission&&!f[g].requiredPermission(d,a.Room.getUser(c),e)&&delete f[g];return f},initialMenuLinks:function(){return{"private":{requiredPermission:function(a,b){return b.getNick()!==a.getNick()&&Candy.Core.getRoom(Candy.View.getCurrent().roomJid)&&!Candy.Core.getUser().isInPrivacyList("ignore",a.getJid())},"class":"private",label:b.i18n._("privateActionLabel"),callback:function(a,c,d){b("#user-"+Candy.Util.jidToId(c)+"-"+Candy.Util.jidToId(d.getJid())).click()}},ignore:{requiredPermission:function(a,b){return b.getNick()!==a.getNick()&&!Candy.Core.getUser().isInPrivacyList("ignore",a.getJid())},"class":"ignore",label:b.i18n._("ignoreActionLabel"),callback:function(a,b,c){Candy.View.Pane.Room.ignoreUser(b,c.getJid())}},unignore:{requiredPermission:function(a,b){return b.getNick()!==a.getNick()&&Candy.Core.getUser().isInPrivacyList("ignore",a.getJid())},"class":"unignore",label:b.i18n._("unignoreActionLabel"),callback:function(a,b,c){Candy.View.Pane.Room.unignoreUser(b,c.getJid())}},kick:{requiredPermission:function(a,b){return b.getNick()!==a.getNick()&&b.isModerator()&&!a.isModerator()},"class":"kick",label:b.i18n._("kickActionLabel"),callback:function(c,d,e){a.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.contextModalForm,{_label:b.i18n._("reason"),_submit:b.i18n._("kickActionLabel")}),!0),b("#context-modal-field").focus(),b("#context-modal-form").submit(function(){return Candy.Core.Action.Jabber.Room.Admin.UserAction(d,e.getJid(),"kick",b("#context-modal-field").val()),a.Chat.Modal.hide(),!1})}},ban:{requiredPermission:function(a,b){return b.getNick()!==a.getNick()&&b.isModerator()&&!a.isModerator()},"class":"ban",label:b.i18n._("banActionLabel"),callback:function(c,d,e){a.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.contextModalForm,{_label:b.i18n._("reason"),_submit:b.i18n._("banActionLabel")}),!0),b("#context-modal-field").focus(),b("#context-modal-form").submit(function(){return Candy.Core.Action.Jabber.Room.Admin.UserAction(d,e.getJid(),"ban",b("#context-modal-field").val()),a.Chat.Modal.hide(),!1})}},subject:{requiredPermission:function(a,b){return b.getNick()===a.getNick()&&b.isModerator()},"class":"subject",label:b.i18n._("setSubjectActionLabel"),callback:function(c,d){a.Chat.Modal.show(Mustache.to_html(Candy.View.Template.Chat.Context.contextModalForm,{_label:b.i18n._("subject"),_submit:b.i18n._("setSubjectActionLabel")}),!0),b("#context-modal-field").focus(),b("#context-modal-form").submit(function(c){Candy.Core.Action.Jabber.Room.Admin.SetSubject(d,b("#context-modal-field").val()),a.Chat.Modal.hide(),c.preventDefault()})}}}},showEmoticonsMenu:function(a){a=b(a);var c,d=a.offset(),e=b("#context-menu"),f=b("ul",e),g="";for(b("#tooltip").hide(),c=Candy.Util.Parser.emoticons.length-1;c>=0;c--)g=''+Candy.Util.Parser.emoticons[c].plain+''+g;f.html('
        • '+g+"
        • "),f.find("img").click(function(){var a=Candy.View.Pane.Room.getPane(Candy.View.getCurrent().roomJid,".message-form").children(".field"),c=a.val(),d=b(this).attr("alt")+" ";a.val(c?c+" "+d:d).focus(),e.hide()});var h=Candy.Util.getPosLeftAccordingToWindowBounds(e,d.left),i=Candy.Util.getPosTopAccordingToWindowBounds(e,d.top);return e.css({left:h.px,top:i.px}).removeClass("left-top left-bottom right-top right-bottom").addClass(h.backgroundPositionAlignment+"-"+i.backgroundPositionAlignment).fadeIn("fast"),!0}}},a}(Candy.View.Pane||{},jQuery),Candy.View.Pane=function(a,b){return a.Message={submit:function(c){var d,e=Candy.View.getCurrent().roomJid,f=Candy.View.Pane.Chat.rooms[e],g=f.type,h=f.targetJid,i=b(this).children(".field").val().substring(0,Candy.View.getOptions().crop.message.body),j={roomJid:e,message:i,xhtmlMessage:d};return b(Candy).triggerHandler("candy:view.message.before-send",j)===!1?void c.preventDefault():(i=j.message,d=j.xhtmlMessage,Candy.Core.Action.Jabber.Room.Message(h,i,g,d),"chat"===g&&i&&a.Message.show(e,a.Room.getUser(e).getNick(),i,d,void 0,Candy.Core.getUser().getJid()),b(this).children(".field").val("").focus(),void c.preventDefault())},show:function(c,d,e,f,g,h,i,j){e=Candy.Util.Parser.all(e.substring(0,Candy.View.getOptions().crop.message.body)),Candy.View.getOptions().enableXHTML===!0&&f&&(f=Candy.Util.parseAndCropXhtml(f,Candy.View.getOptions().crop.message.body)),g=g||new Date,g.toDateString||(g=Candy.Util.iso8601toDate(g));var k=a.Room.getPane(c,".message-pane"),l=k.scrollTop()+k.outerHeight()===k.prop("scrollHeight")||!b(k).is(":visible");Candy.View.Pane.Chat.rooms[c].enableScroll=l;var m={roomJid:c,name:d,message:e,xhtmlMessage:f,from:h,stanza:j};if(b(Candy).triggerHandler("candy:view.message.before-show",m)!==!1&&(e=m.message,f=m.xhtmlMessage,void 0!==f&&f.length>0&&(e=f),e)){var n={template:Candy.View.Template.Message.item,templateData:{name:d,displayName:Candy.Util.crop(d,Candy.View.getOptions().crop.message.nickname),message:e,time:Candy.Util.localizedTime(g),timestamp:g.toISOString(),roomjid:c,from:h},stanza:j};b(Candy).triggerHandler("candy:view.message.before-render",n);var o=Mustache.to_html(n.template,n.templateData);a.Room.appendToMessagePane(c,o);var p=a.Room.getPane(c,".message-pane").children().last();if(p.find("a.label").click(function(b){b.preventDefault();var e=Candy.Core.getRoom(c);return e&&d!==a.Room.getUser(Candy.View.getCurrent().roomJid).getNick()&&e.getRoster().get(c+"/"+d)&&Candy.View.Pane.PrivateRoom.open(c+"/"+d,d,!0)===!1?!1:void 0}),!i){var q={name:d,displayName:Candy.Util.crop(d,Candy.View.getOptions().crop.message.nickname),roomJid:c,message:e,time:Candy.Util.localizedTime(g),timestamp:g.toISOString()};b(Candy).triggerHandler("candy:view.message.notify",q),Candy.Core.getOptions().disableCoreNotifications||Candy.View.getCurrent().roomJid===c&&a.Window.hasFocus()||(a.Chat.increaseUnreadMessages(c),a.Window.hasFocus()||("chat"===Candy.View.Pane.Chat.rooms[c].type||Candy.View.getOptions().updateWindowOnAllMessages===!0)&&a.Chat.Toolbar.playSound()),Candy.View.getCurrent().roomJid===c&&a.Room.scrollToBottom(c)}m.element=p,b(Candy).triggerHandler("candy:view.message.after-show",m)}}},a}(Candy.View.Pane||{},jQuery),Candy.View.Pane=function(a,b){return a.PrivateRoom={open:function(c,d,e,f){var g=f?Candy.Core.getUser():a.Room.getUser(Strophe.getBareJidFromJid(c)),h={roomJid:c,roomName:d,type:"chat"};return b(Candy).triggerHandler("candy:view.private-room.before-open",h)===!1?!1:Candy.Core.getUser().isInPrivacyList("ignore",c)?!1:a.Chat.rooms[c]||a.Room.init(c,d,"chat")!==!1?(e&&a.Room.show(c),a.Roster.update(c,new Candy.Core.ChatUser(c,d),"join",g),a.Roster.update(c,g,"join",g),a.PrivateRoom.setStatus(c,"join"),h.element=a.Room.getPane(c),void b(Candy).triggerHandler("candy:view.private-room.after-open",h)):!1},setStatus:function(b,c){var d=a.Room.getPane(b,".message-form");"join"===c?(a.Chat.getTab(b).addClass("online").removeClass("offline"),d.children(".field").removeAttr("disabled"),d.children(".submit").removeAttr("disabled"),a.Chat.getTab(b)):"leave"===c&&(a.Chat.getTab(b).addClass("offline").removeClass("online"),d.children(".field").attr("disabled",!0),d.children(".submit").attr("disabled",!0))},changeNick:function(c,d){Candy.Core.log("[View:Pane:PrivateRoom] changeNick");var e,f,g=c+"/"+d.getPreviousNick(),h=c+"/"+d.getNick(),i=Candy.Util.jidToId(g),j=Candy.Util.jidToId(h),k=a.Chat.rooms[g];a.Chat.rooms[h]&&a.Room.close(h),k?(k.name=d.getNick(),k.id=j,a.Chat.rooms[h]=k,delete a.Chat.rooms[g],e=b("#chat-room-"+i),e&&(e.attr("data-roomjid",h),e.attr("id","chat-room-"+j),f=b('#chat-tabs li[data-roomjid="'+g+'"]'),f.attr("data-roomjid",h),f.children("a.label").text("@"+d.getNick()),Candy.View.getCurrent().roomJid===g&&(Candy.View.getCurrent().roomJid=h))):(e=b('.room-pane.roomtype-chat[data-userjid="'+g+'"]'),e.length&&(i=Candy.Util.jidToId(e.attr("data-roomjid")),e.attr("data-userjid",h))),e&&e.length&&a.Roster.changeNick(i,d)}},a}(Candy.View.Pane||{},jQuery),Candy.View.Pane=function(a,b){return a.Room={init:function(c,d,e){e=e||"groupchat",c=Candy.Util.unescapeJid(c);var f={roomJid:c,type:e};if(b(Candy).triggerHandler("candy:view.room.before-add",f)===!1)return!1;Candy.Util.isEmptyObject(a.Chat.rooms)&&(a.Chat.Toolbar.show(),a.Chat.showMobileIcon());var g=Candy.Util.jidToId(c);return a.Chat.rooms[c]={id:g,usercount:0,name:d,type:e,messageCount:0,scrollPosition:-1,targetJid:c},b("#chat-rooms").append(Mustache.to_html(Candy.View.Template.Room.pane,{roomId:g,roomJid:c,roomType:e,form:{_messageSubmit:b.i18n._("messageSubmit")},roster:{_userOnline:b.i18n._("userOnline")}},{roster:Candy.View.Template.Roster.pane,messages:Candy.View.Template.Message.pane,form:Candy.View.Template.Room.form})),a.Chat.addTab(c,d,e),a.Room.getPane(c,".message-form").submit(a.Message.submit),a.Room.scrollToBottom(c),f.element=a.Room.getPane(c),b(Candy).triggerHandler("candy:view.room.after-add",f),g},show:function(c){var d,e=a.Chat.rooms[c].id;b(".room-pane").each(function(){var f=b(this);d={roomJid:f.attr("data-roomjid"),type:f.attr("data-roomtype"),element:f},f.attr("id")==="chat-room-"+e?(f.show(),Candy.View.getCurrent().roomJid=c,a.Chat.setActiveTab(c),a.Chat.Toolbar.update(c),a.Chat.clearUnreadMessages(c),a.Room.setFocusToForm(c),a.Room.scrollToBottom(c),b(Candy).triggerHandler("candy:view.room.after-show",d)):(f.hide(),b(Candy).triggerHandler("candy:view.room.after-hide",d))})},setSubject:function(c,d){d=Candy.Util.Parser.linkify(Candy.Util.Parser.escape(d));var e=new Date,f=Mustache.to_html(Candy.View.Template.Room.subject,{subject:d,roomName:a.Chat.rooms[c].name,_roomSubject:b.i18n._("roomSubject"),time:Candy.Util.localizedTime(e),timestamp:e.toISOString()});a.Room.appendToMessagePane(c,f),a.Room.scrollToBottom(c),b(Candy).triggerHandler("candy:view.room.after-subject-change",{roomJid:c,element:a.Room.getPane(c),subject:d})},close:function(c){a.Chat.removeTab(c),a.Window.clearUnreadMessages(),a.Room.getPane(c).remove();var d=b("#chat-rooms").children();Candy.View.getCurrent().roomJid===c&&(Candy.View.getCurrent().roomJid=null,0===d.length?a.Chat.allTabsClosed():a.Room.show(d.last().attr("data-roomjid"))),delete a.Chat.rooms[c],b(Candy).triggerHandler("candy:view.room.after-close",{roomJid:c})},appendToMessagePane:function(b,c){a.Room.getPane(b,".message-pane").append(c),a.Chat.rooms[b].messageCount++,a.Room.sliceMessagePane(b)},sliceMessagePane:function(b){if(a.Window.autoscroll){var c=Candy.View.getOptions().messages;a.Chat.rooms[b].messageCount>c.limit&&(a.Room.getPane(b,".message-pane").children().slice(0,c.remove).remove(),a.Chat.rooms[b].messageCount-=c.remove)}},scrollToBottom:function(b){a.Room.onScrollToBottom(b)},onScrollToBottom:function(b){var c=a.Room.getPane(b,".message-pane-wrapper");return Candy.View.Pane.Chat.rooms[b].enableScroll!==!0?!1:void c.scrollTop(c.prop("scrollHeight"))},onScrollToStoredPosition:function(b){if(a.Chat.rooms[b].scrollPosition>-1){var c=a.Room.getPane(b,".message-pane-wrapper");c.scrollTop(a.Chat.rooms[b].scrollPosition),a.Chat.rooms[b].scrollPosition=-1}},setFocusToForm:function(b){if(Candy.Util.isMobile())return!0;var c=a.Room.getPane(b,".message-form");if(c)try{c.children(".field")[0].focus()}catch(d){}},setUser:function(c,d){a.Chat.rooms[c].user=d;var e=a.Room.getPane(c),f=b("#chat-pane");e.attr("data-userjid",d.getJid()),d.isModerator()?(d.getRole()===d.ROLE_MODERATOR&&f.addClass("role-moderator"),d.getAffiliation()===d.AFFILIATION_OWNER&&f.addClass("affiliation-owner")):f.removeClass("role-moderator affiliation-owner"),a.Chat.Context.init()},getUser:function(b){return a.Chat.rooms[b].user},ignoreUser:function(a,b){Candy.Core.Action.Jabber.Room.IgnoreUnignore(b),Candy.View.Pane.Room.addIgnoreIcon(a,b)},unignoreUser:function(a,b){Candy.Core.Action.Jabber.Room.IgnoreUnignore(b),Candy.View.Pane.Room.removeIgnoreIcon(a,b)},addIgnoreIcon:function(a,c){Candy.View.Pane.Chat.rooms[c]&&b("#user-"+Candy.View.Pane.Chat.rooms[c].id+"-"+Candy.Util.jidToId(c)).addClass("status-ignored"),Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(a)]&&b("#user-"+Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(a)].id+"-"+Candy.Util.jidToId(c)).addClass("status-ignored")},removeIgnoreIcon:function(a,c){Candy.View.Pane.Chat.rooms[c]&&b("#user-"+Candy.View.Pane.Chat.rooms[c].id+"-"+Candy.Util.jidToId(c)).removeClass("status-ignored"),Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(a)]&&b("#user-"+Candy.View.Pane.Chat.rooms[Strophe.getBareJidFromJid(a)].id+"-"+Candy.Util.jidToId(c)).removeClass("status-ignored")},getPane:function(c,d){return a.Chat.rooms[c]?d?a.Chat.rooms[c]["pane-"+d]?a.Chat.rooms[c]["pane-"+d]:(a.Chat.rooms[c]["pane-"+d]=b("#chat-room-"+a.Chat.rooms[c].id).find(d), +a.Chat.rooms[c]["pane-"+d]):b("#chat-room-"+a.Chat.rooms[c].id):void 0},changeDataUserJidIfUserIsMe:function(a,c){if(c.getNick()===Candy.Core.getUser().getNick()){var d=b("#chat-room-"+a);d.attr("data-userjid",Strophe.getBareJidFromJid(d.attr("data-userjid"))+"/"+c.getNick())}}},a}(Candy.View.Pane||{},jQuery),Candy.View.Pane=function(a,b){return a.Roster={update:function(c,d,e,f){Candy.Core.log("[View:Pane:Roster] "+e);var g=a.Chat.rooms[c].id,h=Candy.Util.jidToId(d.getJid()),i=-1,j=b("#user-"+g+"-"+h),k={roomJid:c,user:d,action:e,element:j};if(b(Candy).triggerHandler("candy:view.roster.before-update",k),"join"===e)i=1,j.length<1?(a.Roster._insertUser(c,g,d,h,f),a.Roster.showJoinAnimation(d,h,g,c,f)):(i=0,j.remove(),a.Roster._insertUser(c,g,d,h,f),void 0!==f&&d.getNick()===f.getNick()&&a.Room.getUser(c)&&a.Chat.Toolbar.update(c)),void 0!==f&&f.getNick()===d.getNick()?a.Room.setUser(c,d):b("#user-"+g+"-"+h).click(a.Roster.userClick),b("#user-"+g+"-"+h+" .context").click(function(b){a.Chat.Context.show(b.currentTarget,c,d),b.stopPropagation()}),void 0!==f&&f.isInPrivacyList("ignore",d.getJid())&&Candy.View.Pane.Room.addIgnoreIcon(c,d.getJid());else if("leave"===e)a.Roster.leaveAnimation("user-"+g+"-"+h),"chat"===a.Chat.rooms[c].type?a.Chat.onInfoMessage(c,null,b.i18n._("userLeftRoom",[d.getNick()])):a.Chat.infoMessage(c,null,b.i18n._("userLeftRoom",[d.getNick()]),"");else if("nickchange"===e){i=0,a.Roster.changeNick(g,d),a.Room.changeDataUserJidIfUserIsMe(g,d),a.PrivateRoom.changeNick(c,d);var l=b.i18n._("userChangedNick",[d.getPreviousNick(),d.getNick()]);a.Chat.infoMessage(c,null,l)}else"kick"===e?(a.Roster.leaveAnimation("user-"+g+"-"+h),a.Chat.onInfoMessage(c,null,b.i18n._("userHasBeenKickedFromRoom",[d.getNick()]))):"ban"===e&&(a.Roster.leaveAnimation("user-"+g+"-"+h),a.Chat.onInfoMessage(c,null,b.i18n._("userHasBeenBannedFromRoom",[d.getNick()])));Candy.View.Pane.Chat.rooms[c].usercount+=i,c===Candy.View.getCurrent().roomJid&&Candy.View.Pane.Chat.Toolbar.updateUsercount(Candy.View.Pane.Chat.rooms[c].usercount),k.element=b("#user-"+g+"-"+h),b(Candy).triggerHandler("candy:view.roster.after-update",k)},_insertUser:function(c,d,e,f,g){var h=e.getContact(),i=Mustache.to_html(Candy.View.Template.Roster.user,{roomId:d,userId:f,userJid:e.getJid(),realJid:e.getRealJid(),status:e.getStatus(),contact_status:h?h.getStatus():"unavailable",nick:e.getNick(),displayNick:Candy.Util.crop(e.getNick(),Candy.View.getOptions().crop.roster.nickname),role:e.getRole(),affiliation:e.getAffiliation(),me:void 0!==g&&e.getNick()===g.getNick(),tooltipRole:b.i18n._("tooltipRole"),tooltipIgnored:b.i18n._("tooltipIgnored")}),j=!1,k=a.Room.getPane(c,".roster-pane");if(k.children().length>0){var l=a.Roster._userSortCompare(e.getNick(),e.getStatus());k.children().each(function(){var c=b(this);return a.Roster._userSortCompare(c.attr("data-nick"),c.attr("data-status"))>l?(c.before(i),j=!0,!1):!0})}j||k.append(i)},_userSortCompare:function(a,b){var c;switch(b){case"available":c=1;break;case"unavailable":c=9;break;default:c=8}return c+a.toUpperCase()},userClick:function(){var c=b(this),d=c.attr("data-real-jid"),e=Candy.Core.getOptions().useParticipantRealJid&&void 0!==d&&null!==d&&""!==d,f=e&&d?Strophe.getBareJidFromJid(d):c.attr("data-jid");a.PrivateRoom.open(f,c.attr("data-nick"),!0,e)},showJoinAnimation:function(c,d,e,f,g){var h="user-"+e+"-"+d,i=b("#"+h);c.getPreviousNick()&&i&&i.is(":visible")!==!1||(a.Roster.joinAnimation(h),void 0!==g&&c.getNick()!==g.getNick()&&a.Room.getUser(f)&&("chat"===a.Chat.rooms[f].type?a.Chat.onInfoMessage(f,null,b.i18n._("userJoinedRoom",[c.getNick()])):a.Chat.infoMessage(f,null,b.i18n._("userJoinedRoom",[c.getNick()]))))},joinAnimation:function(a){b("#"+a).stop(!0).slideDown("normal",function(){b(this).animate({opacity:1})})},leaveAnimation:function(a){b("#"+a).stop(!0).attr("id","#"+a+"-leaving").animate({opacity:0},{complete:function(){b(this).slideUp("normal",function(){b(this).remove()})}})},changeNick:function(a,c){Candy.Core.log("[View:Pane:Roster] changeNick");var d=Strophe.getBareJidFromJid(c.getJid())+"/"+c.getPreviousNick(),e="user-"+a+"-"+Candy.Util.jidToId(d),f=b("#"+e);f.attr("data-nick",c.getNick()),f.attr("data-jid",c.getJid()),f.children("div.label").text(c.getNick()),f.attr("id","user-"+a+"-"+Candy.Util.jidToId(c.getJid()))}},a}(Candy.View.Pane||{},jQuery),Candy.View.Pane=function(a){return a.Window={_hasFocus:!0,_plainTitle:window.top.document.title,_unreadMessagesCount:0,autoscroll:!0,hasFocus:function(){return a.Window._hasFocus},increaseUnreadMessages:function(){a.Window.renderUnreadMessages(++a.Window._unreadMessagesCount)},reduceUnreadMessages:function(b){a.Window._unreadMessagesCount-=b,a.Window._unreadMessagesCount<=0?a.Window.clearUnreadMessages():a.Window.renderUnreadMessages(a.Window._unreadMessagesCount)},clearUnreadMessages:function(){a.Window._unreadMessagesCount=0,window.top.document.title=a.Window._plainTitle},renderUnreadMessages:function(b){window.top.document.title=Candy.View.Template.Window.unreadmessages.replace("{{count}}",b).replace("{{title}}",a.Window._plainTitle)},onFocus:function(){a.Window._hasFocus=!0,Candy.View.getCurrent().roomJid&&(a.Room.setFocusToForm(Candy.View.getCurrent().roomJid),a.Chat.clearUnreadMessages(Candy.View.getCurrent().roomJid))},onBlur:function(){a.Window._hasFocus=!1}},a}(Candy.View.Pane||{},jQuery),Candy.View.Template=function(a){return a.Window={unreadmessages:"({{count}}) {{title}}"},a.Chat={pane:'
          {{> tabs}}{{> mobile}}{{> toolbar}}{{> rooms}}
          {{> modal}}',rooms:'
          ',tabs:'
            ',mobileIcon:'
            ',tab:'
          • {{#privateUserChat}}@{{/privateUserChat}}{{name}}×
          • ',modal:'
            ',adminMessage:'
          • {{time}}
            {{sender}}{{subject}} {{{message}}}
          • ',infoMessage:'
          • {{time}}
            {{subject}} {{{message}}}
          • ',toolbar:'
            ',Context:{menu:'
              ',menulinks:'
            • {{label}}
            • ',contextModalForm:'
              ',adminMessageReason:'×

              {{_action}}

              {{#reason}}

              {{_reason}}

              {{/reason}}'},tooltip:'
              '},a.Room={pane:'
              {{> roster}}{{> messages}}{{> form}}
              ',subject:'
            • {{time}}
              {{roomName}}{{_roomSubject}} {{{subject}}}
            • ',form:'
              '},a.Roster={pane:'
              ',user:'
              {{displayNick}}
              '},a.Message={pane:'
                ',item:'
              • {{time}}
                {{displayName}}{{{message}}}
              • '},a.Login={form:''},a.PresenceError={enterPasswordForm:'{{_label}}
                ',nicknameConflictForm:'{{_label}}
                ',displayError:"{{_error}}"},a}(Candy.View.Template||{}),Candy.View.Translation={en:{status:"Status: %s",statusConnecting:"Connecting...",statusConnected:"Connected",statusDisconnecting:"Disconnecting...",statusDisconnected:"Disconnected",statusAuthfail:"Authentication failed",roomSubject:"Subject:",messageSubmit:"Send",labelUsername:"Username:",labelNickname:"Nickname:",labelPassword:"Password:",loginSubmit:"Login",loginInvalid:"Invalid JID",reason:"Reason:",subject:"Subject:",reasonWas:"Reason was: %s.",kickActionLabel:"Kick",youHaveBeenKickedBy:"You have been kicked from %2$s by %1$s",youHaveBeenKicked:"You have been kicked from %s",banActionLabel:"Ban",youHaveBeenBannedBy:"You have been banned from %1$s by %2$s",youHaveBeenBanned:"You have been banned from %s",privateActionLabel:"Private chat",ignoreActionLabel:"Ignore",unignoreActionLabel:"Unignore",setSubjectActionLabel:"Change Subject",administratorMessageSubject:"Administrator",userJoinedRoom:"%s joined the room.",userLeftRoom:"%s left the room.",userHasBeenKickedFromRoom:"%s has been kicked from the room.",userHasBeenBannedFromRoom:"%s has been banned from the room.",userChangedNick:"%1$s is now known as %2$s.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderator",tooltipIgnored:"You ignore this user",tooltipEmoticons:"Emoticons",tooltipSound:"Play sound for new private messages",tooltipAutoscroll:"Autoscroll",tooltipStatusmessage:"Display status messages",tooltipAdministration:"Room Administration",tooltipUsercount:"Room Occupants",enterRoomPassword:'Room "%s" is password protected.',enterRoomPasswordSubmit:"Join room",passwordEnteredInvalid:'Invalid password for room "%s".',nicknameConflict:"Username already in use. Please choose another one.",errorMembersOnly:'You can\'t join room "%s": Insufficient rights.',errorMaxOccupantsReached:'You can\'t join room "%s": Too many occupants.',errorAutojoinMissing:"No autojoin parameter set in configuration. Please set one to continue.",antiSpamMessage:"Please do not spam. You have been blocked for a short-time."},de:{status:"Status: %s",statusConnecting:"Verbinden...",statusConnected:"Verbunden",statusDisconnecting:"Verbindung trennen...",statusDisconnected:"Verbindung getrennt",statusAuthfail:"Authentifizierung fehlgeschlagen",roomSubject:"Thema:",messageSubmit:"Senden",labelUsername:"Benutzername:",labelNickname:"Spitzname:",labelPassword:"Passwort:",loginSubmit:"Anmelden",loginInvalid:"Ungültige JID",reason:"Begründung:",subject:"Titel:",reasonWas:"Begründung: %s.",kickActionLabel:"Kick",youHaveBeenKickedBy:"Du wurdest soeben aus dem Raum %1$s gekickt (%2$s)",youHaveBeenKicked:"Du wurdest soeben aus dem Raum %s gekickt",banActionLabel:"Ban",youHaveBeenBannedBy:"Du wurdest soeben aus dem Raum %1$s verbannt (%2$s)",youHaveBeenBanned:"Du wurdest soeben aus dem Raum %s verbannt",privateActionLabel:"Privater Chat",ignoreActionLabel:"Ignorieren",unignoreActionLabel:"Nicht mehr ignorieren",setSubjectActionLabel:"Thema ändern",administratorMessageSubject:"Administrator",userJoinedRoom:"%s hat soeben den Raum betreten.",userLeftRoom:"%s hat soeben den Raum verlassen.",userHasBeenKickedFromRoom:"%s ist aus dem Raum gekickt worden.",userHasBeenBannedFromRoom:"%s ist aus dem Raum verbannt worden.",userChangedNick:"%1$s hat den Nicknamen zu %2$s geändert.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderator",tooltipIgnored:"Du ignorierst diesen Benutzer",tooltipEmoticons:"Smileys",tooltipSound:"Ton abspielen bei neuen privaten Nachrichten",tooltipAutoscroll:"Autoscroll",tooltipStatusmessage:"Statusnachrichten anzeigen",tooltipAdministration:"Raum Administration",tooltipUsercount:"Anzahl Benutzer im Raum",enterRoomPassword:'Raum "%s" ist durch ein Passwort geschützt.',enterRoomPasswordSubmit:"Raum betreten",passwordEnteredInvalid:'Inkorrektes Passwort für Raum "%s".',nicknameConflict:"Der Benutzername wird bereits verwendet. Bitte wähle einen anderen.",errorMembersOnly:'Du kannst den Raum "%s" nicht betreten: Ungenügende Rechte.',errorMaxOccupantsReached:'Du kannst den Raum "%s" nicht betreten: Benutzerlimit erreicht.',errorAutojoinMissing:'Keine "autojoin" Konfiguration gefunden. Bitte setze eine konfiguration um fortzufahren.',antiSpamMessage:"Bitte nicht spammen. Du wurdest für eine kurze Zeit blockiert."},fr:{status:"Status : %s",statusConnecting:"Connexion…",statusConnected:"Connecté",statusDisconnecting:"Déconnexion…",statusDisconnected:"Déconnecté",statusAuthfail:"L’identification a échoué",roomSubject:"Sujet :",messageSubmit:"Envoyer",labelUsername:"Nom d’utilisateur :",labelNickname:"Pseudo :",labelPassword:"Mot de passe :",loginSubmit:"Connexion",loginInvalid:"JID invalide",reason:"Motif :",subject:"Titre :",reasonWas:"Motif : %s.",kickActionLabel:"Kick",youHaveBeenKickedBy:"Vous avez été expulsé du salon %1$s (%2$s)",youHaveBeenKicked:"Vous avez été expulsé du salon %s",banActionLabel:"Ban",youHaveBeenBannedBy:"Vous avez été banni du salon %1$s (%2$s)",youHaveBeenBanned:"Vous avez été banni du salon %s",privateActionLabel:"Chat privé",ignoreActionLabel:"Ignorer",unignoreActionLabel:"Ne plus ignorer",setSubjectActionLabel:"Changer le sujet",administratorMessageSubject:"Administrateur",userJoinedRoom:"%s vient d’entrer dans le salon.",userLeftRoom:"%s vient de quitter le salon.",userHasBeenKickedFromRoom:"%s a été expulsé du salon.",userHasBeenBannedFromRoom:"%s a été banni du salon.",dateFormat:"dd/mm/yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Modérateur",tooltipIgnored:"Vous ignorez cette personne",tooltipEmoticons:"Smileys",tooltipSound:"Jouer un son lors de la réception de messages privés",tooltipAutoscroll:"Défilement automatique",tooltipStatusmessage:"Afficher les changements d’état",tooltipAdministration:"Administration du salon",tooltipUsercount:"Nombre d’utilisateurs dans le salon",enterRoomPassword:"Le salon %s est protégé par un mot de passe.",enterRoomPasswordSubmit:"Entrer dans le salon",passwordEnteredInvalid:"Le mot de passe pour le salon %s est invalide.",nicknameConflict:"Ce nom d’utilisateur est déjà utilisé. Veuillez en choisir un autre.",errorMembersOnly:"Vous ne pouvez pas entrer dans le salon %s : droits insuffisants.",errorMaxOccupantsReached:"Vous ne pouvez pas entrer dans le salon %s : limite d’utilisateurs atteinte.",antiSpamMessage:"Merci de ne pas spammer. Vous avez été bloqué pendant une courte période."},nl:{status:"Status: %s",statusConnecting:"Verbinding maken...",statusConnected:"Verbinding is gereed",statusDisconnecting:"Verbinding verbreken...",statusDisconnected:"Verbinding is verbroken",statusAuthfail:"Authenticatie is mislukt",roomSubject:"Onderwerp:",messageSubmit:"Verstuur",labelUsername:"Gebruikersnaam:",labelPassword:"Wachtwoord:",loginSubmit:"Inloggen",loginInvalid:"JID is onjuist",reason:"Reden:",subject:"Onderwerp:",reasonWas:"De reden was: %s.",kickActionLabel:"Verwijderen",youHaveBeenKickedBy:"Je bent verwijderd van %1$s door %2$s",youHaveBeenKicked:"Je bent verwijderd van %s",banActionLabel:"Blokkeren",youHaveBeenBannedBy:"Je bent geblokkeerd van %1$s door %2$s",youHaveBeenBanned:"Je bent geblokkeerd van %s",privateActionLabel:"Prive gesprek",ignoreActionLabel:"Negeren",unignoreActionLabel:"Niet negeren",setSubjectActionLabel:"Onderwerp wijzigen",administratorMessageSubject:"Beheerder",userJoinedRoom:"%s komt de chat binnen.",userLeftRoom:"%s heeft de chat verlaten.",userHasBeenKickedFromRoom:"%s is verwijderd.",userHasBeenBannedFromRoom:"%s is geblokkeerd.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderator",tooltipIgnored:"Je negeert deze gebruiker",tooltipEmoticons:"Emotie-iconen",tooltipSound:"Speel een geluid af bij nieuwe privé berichten.",tooltipAutoscroll:"Automatisch scrollen",tooltipStatusmessage:"Statusberichten weergeven",tooltipAdministration:"Instellingen",tooltipUsercount:"Gebruikers",enterRoomPassword:'De Chatroom "%s" is met een wachtwoord beveiligd.',enterRoomPasswordSubmit:"Ga naar Chatroom",passwordEnteredInvalid:'Het wachtwoord voor de Chatroom "%s" is onjuist.',nicknameConflict:"De gebruikersnaam is reeds in gebruik. Probeer a.u.b. een andere gebruikersnaam.",errorMembersOnly:'Je kunt niet deelnemen aan de Chatroom "%s": Je hebt onvoldoende rechten.',errorMaxOccupantsReached:'Je kunt niet deelnemen aan de Chatroom "%s": Het maximum aantal gebruikers is bereikt.',antiSpamMessage:"Het is niet toegestaan om veel berichten naar de server te versturen. Je bent voor een korte periode geblokkeerd."},es:{status:"Estado: %s",statusConnecting:"Conectando...",statusConnected:"Conectado",statusDisconnecting:"Desconectando...",statusDisconnected:"Desconectado",statusAuthfail:"Falló la autenticación",roomSubject:"Asunto:",messageSubmit:"Enviar",labelUsername:"Usuario:",labelPassword:"Clave:",loginSubmit:"Entrar",loginInvalid:"JID no válido",reason:"Razón:",subject:"Asunto:",reasonWas:"La razón fue: %s.",kickActionLabel:"Expulsar",youHaveBeenKickedBy:"Has sido expulsado de %1$s por %2$s",youHaveBeenKicked:"Has sido expulsado de %s",banActionLabel:"Prohibir",youHaveBeenBannedBy:"Has sido expulsado permanentemente de %1$s por %2$s",youHaveBeenBanned:"Has sido expulsado permanentemente de %s",privateActionLabel:"Chat privado",ignoreActionLabel:"Ignorar",unignoreActionLabel:"No ignorar",setSubjectActionLabel:"Cambiar asunto",administratorMessageSubject:"Administrador",userJoinedRoom:"%s se ha unido a la sala.",userLeftRoom:"%s ha dejado la sala.",userHasBeenKickedFromRoom:"%s ha sido expulsado de la sala.",userHasBeenBannedFromRoom:"%s ha sido expulsado permanentemente de la sala.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderador",tooltipIgnored:"Ignoras a éste usuario",tooltipEmoticons:"Emoticonos",tooltipSound:"Reproducir un sonido para nuevos mensajes privados",tooltipAutoscroll:"Desplazamiento automático",tooltipStatusmessage:"Mostrar mensajes de estado",tooltipAdministration:"Administración de la sala",tooltipUsercount:"Usuarios en la sala",enterRoomPassword:'La sala "%s" está protegida mediante contraseña.',enterRoomPasswordSubmit:"Unirse a la sala",passwordEnteredInvalid:'Contraseña incorrecta para la sala "%s".',nicknameConflict:"El nombre de usuario ya está siendo utilizado. Por favor elija otro.",errorMembersOnly:'No se puede unir a la sala "%s": no tiene privilegios suficientes.',errorMaxOccupantsReached:'No se puede unir a la sala "%s": demasiados participantes.',antiSpamMessage:"Por favor, no hagas spam. Has sido bloqueado temporalmente."},cn:{status:"状态: %s",statusConnecting:"连接中...",statusConnected:"已连接",statusDisconnecting:"断开连接中...",statusDisconnected:"已断开连接",statusAuthfail:"认证失败",roomSubject:"主题:",messageSubmit:"发送",labelUsername:"用户名:",labelPassword:"密码:",loginSubmit:"登录",loginInvalid:"用户名不合法",reason:"原因:",subject:"主题:",reasonWas:"原因是: %s.",kickActionLabel:"踢除",youHaveBeenKickedBy:"你在 %1$s 被管理者 %2$s 请出房间",banActionLabel:"禁言",youHaveBeenBannedBy:"你在 %1$s 被管理者 %2$s 禁言",privateActionLabel:"单独对话",ignoreActionLabel:"忽略",unignoreActionLabel:"不忽略",setSubjectActionLabel:"变更主题",administratorMessageSubject:"管理员",userJoinedRoom:"%s 加入房间",userLeftRoom:"%s 离开房间",userHasBeenKickedFromRoom:"%s 被请出这个房间",userHasBeenBannedFromRoom:"%s 被管理者禁言",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"管理",tooltipIgnored:"你忽略了这个会员",tooltipEmoticons:"表情",tooltipSound:"新消息发音",tooltipAutoscroll:"滚动条",tooltipStatusmessage:"禁用状态消息",tooltipAdministration:"房间管理",tooltipUsercount:"房间占有者",enterRoomPassword:'登录房间 "%s" 需要密码.',enterRoomPasswordSubmit:"加入房间",passwordEnteredInvalid:'登录房间 "%s" 的密码不正确',nicknameConflict:"用户名已经存在,请另选一个",errorMembersOnly:'您的权限不够,不能登录房间 "%s" ',errorMaxOccupantsReached:'房间 "%s" 的人数已达上限,您不能登录',antiSpamMessage:"因为您在短时间内发送过多的消息 服务器要阻止您一小段时间。"},ja:{status:"ステータス: %s",statusConnecting:"接続中…",statusConnected:"接続されました",statusDisconnecting:"ディスコネクト中…",statusDisconnected:"ディスコネクトされました",statusAuthfail:"認証に失敗しました",roomSubject:"トピック:",messageSubmit:"送信",labelUsername:"ユーザーネーム:",labelPassword:"パスワード:",loginSubmit:"ログイン",loginInvalid:"ユーザーネームが正しくありません",reason:"理由:",subject:"トピック:",reasonWas:"理由: %s。",kickActionLabel:"キック",youHaveBeenKickedBy:"あなたは%2$sにより%1$sからキックされました。",youHaveBeenKicked:"あなたは%sからキックされました。",banActionLabel:"アカウントバン",youHaveBeenBannedBy:"あなたは%2$sにより%1$sからアカウントバンされました。",youHaveBeenBanned:"あなたは%sからアカウントバンされました。",privateActionLabel:"プライベートメッセージ",ignoreActionLabel:"無視する",unignoreActionLabel:"無視をやめる",setSubjectActionLabel:"トピックを変える",administratorMessageSubject:"管理者",userJoinedRoom:"%sは入室しました。",userLeftRoom:"%sは退室しました。",userHasBeenKickedFromRoom:"%sは部屋からキックされました。",userHasBeenBannedFromRoom:"%sは部屋からアカウントバンされました。",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"モデレーター",tooltipIgnored:"このユーザーを無視設定にしている",tooltipEmoticons:"絵文字",tooltipSound:"新しいメッセージが届くたびに音を鳴らす",tooltipAutoscroll:"オートスクロール",tooltipStatusmessage:"ステータスメッセージを表示",tooltipAdministration:"部屋の管理",tooltipUsercount:"この部屋の参加者の数",enterRoomPassword:'"%s"の部屋に入るにはパスワードが必要です。',enterRoomPasswordSubmit:"部屋に入る",passwordEnteredInvalid:'"%s"のパスワードと異なるパスワードを入力しました。',nicknameConflict:"このユーザーネームはすでに利用されているため、別のユーザーネームを選んでください。",errorMembersOnly:'"%s"の部屋に入ることができません: 利用権限を満たしていません。',errorMaxOccupantsReached:'"%s"の部屋に入ることができません: 参加者の数はすでに上限に達しました。',antiSpamMessage:"スパムなどの行為はやめてください。あなたは一時的にブロックされました。"},sv:{status:"Status: %s",statusConnecting:"Ansluter...",statusConnected:"Ansluten",statusDisconnecting:"Kopplar från...",statusDisconnected:"Frånkopplad",statusAuthfail:"Autentisering misslyckades",roomSubject:"Ämne:",messageSubmit:"Skicka",labelUsername:"Användarnamn:",labelPassword:"Lösenord:",loginSubmit:"Logga in",loginInvalid:"Ogiltigt JID",reason:"Anledning:",subject:"Ämne:",reasonWas:"Anledningen var: %s.",kickActionLabel:"Sparka ut",youHaveBeenKickedBy:"Du har blivit utsparkad från %2$s av %1$s",youHaveBeenKicked:"Du har blivit utsparkad från %s",banActionLabel:"Bannlys",youHaveBeenBannedBy:"Du har blivit bannlyst från %1$s av %2$s",youHaveBeenBanned:"Du har blivit bannlyst från %s",privateActionLabel:"Privat chatt",ignoreActionLabel:"Blockera",unignoreActionLabel:"Avblockera",setSubjectActionLabel:"Ändra ämne",administratorMessageSubject:"Administratör",userJoinedRoom:"%s kom in i rummet.",userLeftRoom:"%s har lämnat rummet.",userHasBeenKickedFromRoom:"%s har blivit utsparkad ur rummet.",userHasBeenBannedFromRoom:"%s har blivit bannlyst från rummet.",dateFormat:"yyyy-mm-dd",timeFormat:"HH:MM:ss",tooltipRole:"Moderator",tooltipIgnored:"Du blockerar denna användare",tooltipEmoticons:"Smilies",tooltipSound:"Spela upp ett ljud vid nytt privat meddelande",tooltipAutoscroll:"Autoskrolla",tooltipStatusmessage:"Visa statusmeddelanden",tooltipAdministration:"Rumadministrering",tooltipUsercount:"Antal användare i rummet",enterRoomPassword:'Rummet "%s" är lösenordsskyddat.',enterRoomPasswordSubmit:"Anslut till rum",passwordEnteredInvalid:'Ogiltigt lösenord för rummet "%s".',nicknameConflict:"Upptaget användarnamn. Var god välj ett annat.",errorMembersOnly:'Du kan inte ansluta till rummet "%s": Otillräckliga rättigheter.',errorMaxOccupantsReached:'Du kan inte ansluta till rummet "%s": Rummet är fullt.',antiSpamMessage:"Var god avstå från att spamma. Du har blivit blockerad för en kort stund."},fi:{status:"Status: %s",statusConnecting:"Muodostetaan yhteyttä...",statusConnected:"Yhdistetty",statusDisconnecting:"Katkaistaan yhteyttä...",statusDisconnected:"Yhteys katkaistu",statusAuthfail:"Autentikointi epäonnistui",roomSubject:"Otsikko:",messageSubmit:"Lähetä",labelUsername:"Käyttäjätunnus:",labelNickname:"Nimimerkki:",labelPassword:"Salasana:",loginSubmit:"Kirjaudu sisään",loginInvalid:"Virheellinen JID",reason:"Syy:",subject:"Otsikko:",reasonWas:"Syy oli: %s.",kickActionLabel:"Potkaise",youHaveBeenKickedBy:"Nimimerkki %1$s potkaisi sinut pois huoneesta %2$s",youHaveBeenKicked:"Sinut potkaistiin pois huoneesta %s",banActionLabel:"Porttikielto",youHaveBeenBannedBy:"Nimimerkki %2$s antoi sinulle porttikiellon huoneeseen %1$s",youHaveBeenBanned:"Sinulle on annettu porttikielto huoneeseen %s",privateActionLabel:"Yksityinen keskustelu",ignoreActionLabel:"Hiljennä",unignoreActionLabel:"Peruuta hiljennys",setSubjectActionLabel:"Vaihda otsikkoa",administratorMessageSubject:"Ylläpitäjä",userJoinedRoom:"%s tuli huoneeseen.",userLeftRoom:"%s lähti huoneesta.",userHasBeenKickedFromRoom:"%s potkaistiin pois huoneesta.",userHasBeenBannedFromRoom:"%s sai porttikiellon huoneeseen.",userChangedNick:"%1$s vaihtoi nimimerkikseen %2$s.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Ylläpitäjä",tooltipIgnored:"Olet hiljentänyt tämän käyttäjän",tooltipEmoticons:"Hymiöt",tooltipSound:"Soita äänimerkki uusista yksityisviesteistä",tooltipAutoscroll:"Automaattinen vieritys",tooltipStatusmessage:"Näytä statusviestit",tooltipAdministration:"Huoneen ylläpito",tooltipUsercount:"Huoneen jäsenet",enterRoomPassword:'Huone "%s" on suojattu salasanalla.',enterRoomPasswordSubmit:"Liity huoneeseen",passwordEnteredInvalid:'Virheelinen salasana huoneeseen "%s".',nicknameConflict:"Käyttäjätunnus oli jo käytössä. Valitse jokin toinen käyttäjätunnus.",errorMembersOnly:'Et voi liittyä huoneeseen "%s": ei oikeuksia.',errorMaxOccupantsReached:'Et voi liittyä huoneeseen "%s": liian paljon jäseniä.',errorAutojoinMissing:'Parametria "autojoin" ei ole määritelty asetuksissa. Tee määrittely jatkaaksesi.',antiSpamMessage:"Ethän spämmää. Sinut on nyt väliaikaisesti pistetty jäähylle."},it:{status:"Stato: %s",statusConnecting:"Connessione...",statusConnected:"Connessione",statusDisconnecting:"Disconnessione...",statusDisconnected:"Disconnesso",statusAuthfail:"Autenticazione fallita",roomSubject:"Oggetto:",messageSubmit:"Invia",labelUsername:"Nome utente:",labelPassword:"Password:",loginSubmit:"Login",loginInvalid:"JID non valido",reason:"Ragione:",subject:"Oggetto:",reasonWas:"Ragione precedente: %s.",kickActionLabel:"Espelli",youHaveBeenKickedBy:"Sei stato espulso da %2$s da %1$s",youHaveBeenKicked:"Sei stato espulso da %s",banActionLabel:"Escluso",youHaveBeenBannedBy:"Sei stato escluso da %1$s da %2$s",youHaveBeenBanned:"Sei stato escluso da %s",privateActionLabel:"Stanza privata",ignoreActionLabel:"Ignora",unignoreActionLabel:"Non ignorare",setSubjectActionLabel:"Cambia oggetto",administratorMessageSubject:"Amministratore",userJoinedRoom:"%s si è unito alla stanza.",userLeftRoom:"%s ha lasciato la stanza.",userHasBeenKickedFromRoom:"%s è stato espulso dalla stanza.",userHasBeenBannedFromRoom:"%s è stato escluso dalla stanza.",dateFormat:"dd/mm/yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderatore",tooltipIgnored:"Stai ignorando questo utente",tooltipEmoticons:"Emoticons",tooltipSound:"Riproduci un suono quando arrivano messaggi privati",tooltipAutoscroll:"Autoscroll",tooltipStatusmessage:"Mostra messaggi di stato",tooltipAdministration:"Amministrazione stanza",tooltipUsercount:"Partecipanti alla stanza",enterRoomPassword:'La stanza "%s" è protetta da password.',enterRoomPasswordSubmit:"Unisciti alla stanza",passwordEnteredInvalid:'Password non valida per la stanza "%s".',nicknameConflict:"Nome utente già in uso. Scegline un altro.",errorMembersOnly:'Non puoi unirti alla stanza "%s": Permessi insufficienti.',errorMaxOccupantsReached:'Non puoi unirti alla stanza "%s": Troppi partecipanti.',antiSpamMessage:"Per favore non scrivere messaggi pubblicitari. Sei stato bloccato per un po' di tempo."},pl:{status:"Status: %s",statusConnecting:"Łączę...",statusConnected:"Połączone",statusDisconnecting:"Rozłączam...",statusDisconnected:"Rozłączone",statusAuthfail:"Nieprawidłowa autoryzacja",roomSubject:"Temat:",messageSubmit:"Wyślij",labelUsername:"Nazwa użytkownika:",labelNickname:"Ksywka:",labelPassword:"Hasło:",loginSubmit:"Zaloguj",loginInvalid:"Nieprawidłowy JID",reason:"Przyczyna:",subject:"Temat:",reasonWas:"Z powodu: %s.",kickActionLabel:"Wykop",youHaveBeenKickedBy:"Zostałeś wykopany z %2$s przez %1$s",youHaveBeenKicked:"Zostałeś wykopany z %s",banActionLabel:"Ban",youHaveBeenBannedBy:"Zostałeś zbanowany na %1$s przez %2$s",youHaveBeenBanned:"Zostałeś zbanowany na %s",privateActionLabel:"Rozmowa prywatna",ignoreActionLabel:"Zignoruj",unignoreActionLabel:"Przestań ignorować",setSubjectActionLabel:"Zmień temat",administratorMessageSubject:"Administrator",userJoinedRoom:"%s wszedł do pokoju.",userLeftRoom:"%s opuścił pokój.",userHasBeenKickedFromRoom:"%s został wykopany z pokoju.",userHasBeenBannedFromRoom:"%s został zbanowany w pokoju.",userChangedNick:"%1$s zmienił ksywkę na %2$s.",presenceUnknownWarningSubject:"Uwaga:",presenceUnknownWarning:"Rozmówca może nie być połączony. Nie możemy ustalić jego obecności.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderator",tooltipIgnored:"Ignorujesz tego rozmówcę",tooltipEmoticons:"Emoty",tooltipSound:"Sygnał dźwiękowy przy otrzymaniu wiadomości",tooltipAutoscroll:"Autoprzewijanie",tooltipStatusmessage:"Wyświetl statusy",tooltipAdministration:"Administrator pokoju",tooltipUsercount:"Obecni rozmówcy",enterRoomPassword:'Pokój "%s" wymaga hasła.',enterRoomPasswordSubmit:"Wejdź do pokoju",passwordEnteredInvalid:'Niewłaściwie hasło do pokoju "%s".',nicknameConflict:"Nazwa w użyciu. Wybierz inną.",errorMembersOnly:'Nie możesz wejść do pokoju "%s": Niepełne uprawnienia.', +errorMaxOccupantsReached:'Nie możesz wejść do pokoju "%s": Siedzi w nim zbyt wielu ludzi.',errorAutojoinMissing:"Konfiguracja nie zawiera parametru automatycznego wejścia do pokoju. Wskaż pokój do którego chcesz wejść.",antiSpamMessage:"Please do not spam. You have been blocked for a short-time."},pt:{status:"Status: %s",statusConnecting:"Conectando...",statusConnected:"Conectado",statusDisconnecting:"Desligando...",statusDisconnected:"Desligado",statusAuthfail:"Falha na autenticação",roomSubject:"Assunto:",messageSubmit:"Enviar",labelUsername:"Usuário:",labelPassword:"Senha:",loginSubmit:"Entrar",loginInvalid:"JID inválido",reason:"Motivo:",subject:"Assunto:",reasonWas:"O motivo foi: %s.",kickActionLabel:"Excluir",youHaveBeenKickedBy:"Você foi excluido de %1$s por %2$s",youHaveBeenKicked:"Você foi excluido de %s",banActionLabel:"Bloquear",youHaveBeenBannedBy:"Você foi excluido permanentemente de %1$s por %2$s",youHaveBeenBanned:"Você foi excluido permanentemente de %s",privateActionLabel:"Bate-papo privado",ignoreActionLabel:"Ignorar",unignoreActionLabel:"Não ignorar",setSubjectActionLabel:"Trocar Assunto",administratorMessageSubject:"Administrador",userJoinedRoom:"%s entrou na sala.",userLeftRoom:"%s saiu da sala.",userHasBeenKickedFromRoom:"%s foi excluido da sala.",userHasBeenBannedFromRoom:"%s foi excluido permanentemente da sala.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderador",tooltipIgnored:"Você ignora este usuário",tooltipEmoticons:"Emoticons",tooltipSound:"Reproduzir o som para novas mensagens privados",tooltipAutoscroll:"Deslocamento automático",tooltipStatusmessage:"Mostrar mensagens de status",tooltipAdministration:"Administração da sala",tooltipUsercount:"Usuários na sala",enterRoomPassword:'A sala "%s" é protegida por senha.',enterRoomPasswordSubmit:"Junte-se à sala",passwordEnteredInvalid:'Senha incorreta para a sala "%s".',nicknameConflict:"O nome de usuário já está em uso. Por favor, escolha outro.",errorMembersOnly:'Você não pode participar da sala "%s": privilégios insuficientes.',errorMaxOccupantsReached:'Você não pode participar da sala "%s": muitos participantes.',antiSpamMessage:"Por favor, não envie spam. Você foi bloqueado temporariamente."},pt_br:{status:"Estado: %s",statusConnecting:"Conectando...",statusConnected:"Conectado",statusDisconnecting:"Desconectando...",statusDisconnected:"Desconectado",statusAuthfail:"Autenticação falhou",roomSubject:"Assunto:",messageSubmit:"Enviar",labelUsername:"Usuário:",labelPassword:"Senha:",loginSubmit:"Entrar",loginInvalid:"JID inválido",reason:"Motivo:",subject:"Assunto:",reasonWas:"Motivo foi: %s.",kickActionLabel:"Derrubar",youHaveBeenKickedBy:"Você foi derrubado de %2$s por %1$s",youHaveBeenKicked:"Você foi derrubado de %s",banActionLabel:"Banir",youHaveBeenBannedBy:"Você foi banido de %1$s por %2$s",youHaveBeenBanned:"Você foi banido de %s",privateActionLabel:"Conversa privada",ignoreActionLabel:"Ignorar",unignoreActionLabel:"Não ignorar",setSubjectActionLabel:"Mudar Assunto",administratorMessageSubject:"Administrador",userJoinedRoom:"%s entrou na sala.",userLeftRoom:"%s saiu da sala.",userHasBeenKickedFromRoom:"%s foi derrubado da sala.",userHasBeenBannedFromRoom:"%s foi banido da sala.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderador",tooltipIgnored:"Você ignora este usuário",tooltipEmoticons:"Emoticons",tooltipSound:"Tocar som para novas mensagens privadas",tooltipAutoscroll:"Auto-rolagem",tooltipStatusmessage:"Exibir mensagens de estados",tooltipAdministration:"Administração de Sala",tooltipUsercount:"Participantes da Sala",enterRoomPassword:'Sala "%s" é protegida por senha.',enterRoomPasswordSubmit:"Entrar na sala",passwordEnteredInvalid:'Senha inváida para sala "%s".',nicknameConflict:"Nome de usuário já em uso. Por favor escolha outro.",errorMembersOnly:'Você não pode entrar na sala "%s": privilégios insuficientes.',errorMaxOccupantsReached:'Você não pode entrar na sala "%s": máximo de participantes atingido.',antiSpamMessage:"Por favor, não faça spam. Você foi bloqueado temporariamente."},ru:{status:"Статус: %s",statusConnecting:"Подключение...",statusConnected:"Подключено",statusDisconnecting:"Отключение...",statusDisconnected:"Отключено",statusAuthfail:"Неверный логин",roomSubject:"Топик:",messageSubmit:"Послать",labelUsername:"Имя:",labelNickname:"Ник:",labelPassword:"Пароль:",loginSubmit:"Логин",loginInvalid:"Неверный JID",reason:"Причина:",subject:"Топик:",reasonWas:"Причина была: %s.",kickActionLabel:"Выбросить",youHaveBeenKickedBy:"Пользователь %1$s выбросил вас из чата %2$s",youHaveBeenKicked:"Вас выбросили из чата %s",banActionLabel:"Запретить доступ",youHaveBeenBannedBy:"Пользователь %1$s запретил вам доступ в чат %2$s",youHaveBeenBanned:"Вам запретили доступ в чат %s",privateActionLabel:"Один-на-один чат",ignoreActionLabel:"Игнорировать",unignoreActionLabel:"Отменить игнорирование",setSubjectActionLabel:"Изменить топик",administratorMessageSubject:"Администратор",userJoinedRoom:"%s вошёл в чат.",userLeftRoom:"%s вышел из чата.",userHasBeenKickedFromRoom:"%s выброшен из чата.",userHasBeenBannedFromRoom:"%s запрещён доступ в чат.",userChangedNick:"%1$s сменил имя на %2$s.",presenceUnknownWarningSubject:"Уведомление:",presenceUnknownWarning:"Этот пользователь вероятнее всего оффлайн.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Модератор",tooltipIgnored:"Вы игнорируете этого пользователя.",tooltipEmoticons:"Смайлики",tooltipSound:"Озвучивать новое частное сообщение",tooltipAutoscroll:"Авто-прокручивание",tooltipStatusmessage:"Показывать статус сообщения",tooltipAdministration:"Администрирование чат комнаты",tooltipUsercount:"Участники чата",enterRoomPassword:'Чат комната "%s" защищена паролем.',enterRoomPasswordSubmit:"Войти в чат",passwordEnteredInvalid:'Неверный пароль для комнаты "%s".',nicknameConflict:"Это имя уже используется. Пожалуйста выберите другое имя.",errorMembersOnly:'Вы не можете войти в чат "%s": Недостаточно прав доступа.',errorMaxOccupantsReached:'Вы не можете войти в чат "%s": Слишком много участников.',errorAutojoinMissing:"Параметры автовхода не устновлены. Настройте их для продолжения.",antiSpamMessage:"Пожалуйста не рассылайте спам. Вас заблокировали на короткое время."},ca:{status:"Estat: %s",statusConnecting:"Connectant...",statusConnected:"Connectat",statusDisconnecting:"Desconnectant...",statusDisconnected:"Desconnectat",statusAuthfail:"Ha fallat la autenticació",roomSubject:"Assumpte:",messageSubmit:"Enviar",labelUsername:"Usuari:",labelPassword:"Clau:",loginSubmit:"Entrar",loginInvalid:"JID no vàlid",reason:"Raó:",subject:"Assumpte:",reasonWas:"La raó ha estat: %s.",kickActionLabel:"Expulsar",youHaveBeenKickedBy:"Has estat expulsat de %1$s per %2$s",youHaveBeenKicked:"Has estat expulsat de %s",banActionLabel:"Prohibir",youHaveBeenBannedBy:"Has estat expulsat permanentment de %1$s per %2$s",youHaveBeenBanned:"Has estat expulsat permanentment de %s",privateActionLabel:"Xat privat",ignoreActionLabel:"Ignorar",unignoreActionLabel:"No ignorar",setSubjectActionLabel:"Canviar assumpte",administratorMessageSubject:"Administrador",userJoinedRoom:"%s ha entrat a la sala.",userLeftRoom:"%s ha deixat la sala.",userHasBeenKickedFromRoom:"%s ha estat expulsat de la sala.",userHasBeenBannedFromRoom:"%s ha estat expulsat permanentment de la sala.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderador",tooltipIgnored:"Estàs ignorant aquest usuari",tooltipEmoticons:"Emoticones",tooltipSound:"Reproduir un so per a nous missatges",tooltipAutoscroll:"Desplaçament automàtic",tooltipStatusmessage:"Mostrar missatges d'estat",tooltipAdministration:"Administració de la sala",tooltipUsercount:"Usuaris dins la sala",enterRoomPassword:'La sala "%s" està protegida amb contrasenya.',enterRoomPasswordSubmit:"Entrar a la sala",passwordEnteredInvalid:'Contrasenya incorrecta per a la sala "%s".',nicknameConflict:"El nom d'usuari ja s'està utilitzant. Si us plau, escolleix-ne un altre.",errorMembersOnly:'No pots unir-te a la sala "%s": no tens prous privilegis.',errorMaxOccupantsReached:'No pots unir-te a la sala "%s": hi ha masses participants.',antiSpamMessage:"Si us plau, no facis spam. Has estat bloquejat temporalment."},cs:{status:"Stav: %s",statusConnecting:"Připojování...",statusConnected:"Připojeno",statusDisconnecting:"Odpojování...",statusDisconnected:"Odpojeno",statusAuthfail:"Přihlášení selhalo",roomSubject:"Předmět:",messageSubmit:"Odeslat",labelUsername:"Už. jméno:",labelNickname:"Přezdívka:",labelPassword:"Heslo:",loginSubmit:"Přihlásit se",loginInvalid:"Neplatné JID",reason:"Důvod:",subject:"Předmět:",reasonWas:"Důvod byl: %s.",kickActionLabel:"Vykopnout",youHaveBeenKickedBy:"Byl jsi vyloučen z %2$s uživatelem %1$s",youHaveBeenKicked:"Byl jsi vyloučen z %s",banActionLabel:"Ban",youHaveBeenBannedBy:"Byl jsi trvale vyloučen z %1$s uživatelem %2$s",youHaveBeenBanned:"Byl jsi trvale vyloučen z %s",privateActionLabel:"Soukromý chat",ignoreActionLabel:"Ignorovat",unignoreActionLabel:"Neignorovat",setSubjectActionLabel:"Změnit předmět",administratorMessageSubject:"Adminitrátor",userJoinedRoom:"%s vešel do místnosti.",userLeftRoom:"%s opustil místnost.",userHasBeenKickedFromRoom:"%s byl vyloučen z místnosti.",userHasBeenBannedFromRoom:"%s byl trvale vyloučen z místnosti.",userChangedNick:"%1$s si změnil přezdívku na %2$s.",presenceUnknownWarningSubject:"Poznámka:",presenceUnknownWarning:"Tento uživatel může být offiline. Nemůžeme sledovat jeho přítmonost..",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"Moderátor",tooltipIgnored:"Tento uživatel je ignorován",tooltipEmoticons:"Emotikony",tooltipSound:"Přehrát zvuk při nové soukromé zprávě",tooltipAutoscroll:"Automaticky rolovat",tooltipStatusmessage:"Zobrazovat stavové zprávy",tooltipAdministration:"Správa místnosti",tooltipUsercount:"Uživatelé",enterRoomPassword:'Místnost "%s" je chráněna heslem.',enterRoomPasswordSubmit:"Připojit se do místnosti",passwordEnteredInvalid:'Neplatné heslo pro místnost "%s".',nicknameConflict:"Takové přihlašovací jméno je již použito. Vyberte si prosím jiné.",errorMembersOnly:'Nemůžete se připojit do místnosti "%s": Nedostatečné oprávnění.',errorMaxOccupantsReached:'Nemůžete se připojit do místnosti "%s": Příliš mnoho uživatelů.',errorAutojoinMissing:"Není nastaven parametr autojoin. Nastavte jej prosím.",antiSpamMessage:"Nespamujte prosím. Váš účet byl na chvilku zablokován."},he:{status:"מצב: %s",statusConnecting:"כעת מתחבר...",statusConnected:"מחובר",statusDisconnecting:"כעת מתנתק...",statusDisconnected:"מנותק",statusAuthfail:"אימות נכשל",roomSubject:"נושא:",messageSubmit:"שלח",labelUsername:"שם משתמש:",labelNickname:"שם כינוי:",labelPassword:"סיסמה:",loginSubmit:"כניסה",loginInvalid:"JID לא תקני",reason:"סיבה:",subject:"נושא:",reasonWas:"סיבה היתה: %s.",kickActionLabel:"בעט",youHaveBeenKickedBy:"נבעטת מתוך %2$s על ידי %1$s",youHaveBeenKicked:"נבעטת מתוך %s",banActionLabel:"אסור",youHaveBeenBannedBy:"נאסרת מתוך %1$s על ידי %2$s",youHaveBeenBanned:"נאסרת מתוך %s",privateActionLabel:"שיחה פרטית",ignoreActionLabel:"התעלם",unignoreActionLabel:"בטל התעלמות",setSubjectActionLabel:"שנה נושא",administratorMessageSubject:"מנהל",userJoinedRoom:"%s נכנס(ה) לחדר.",userLeftRoom:"%s עזב(ה) את החדר.",userHasBeenKickedFromRoom:"%s נבעט(ה) מתוך החדר.",userHasBeenBannedFromRoom:"%s נאסר(ה) מתוך החדר.",userChangedNick:"%1$s מוכר(ת) כעת בתור %2$s.",dateFormat:"dd.mm.yyyy",timeFormat:"HH:MM:ss",tooltipRole:"אחראי",tooltipIgnored:"אתה מתעלם ממשתמש זה",tooltipEmoticons:"רגשונים",tooltipSound:"נגן צליל עבור הודעות פרטיות חדשות",tooltipAutoscroll:"גלילה אוטומטית",tooltipStatusmessage:"הצג הודעות מצב",tooltipAdministration:"הנהלת חדר",tooltipUsercount:"משתתפי חדר",enterRoomPassword:'חדר "%s" הינו מוגן סיסמה.',enterRoomPasswordSubmit:"הצטרף לחדר",passwordEnteredInvalid:'סיסמה שגויה לחדר "%s".',nicknameConflict:"שם משתמש כבר מצוי בשימוש. אנא בחר אחד אחר.",errorMembersOnly:'אין באפשרותך להצטרף לחדר "%s": הרשאות לקויות.',errorMaxOccupantsReached:'אין באפשרותך להצטרף לחדר "%s": יותר מדי משתתפים.',errorAutojoinMissing:"לא נקבע פרמטר הצטרפות אוטומטית בתצורה. אנא הזן כזה כדי להמשיך.",antiSpamMessage:"אנא אל תשלח ספאם. נחסמת למשך זמן קצר."}}; +//# sourceMappingURL=candy.min.map \ No newline at end of file diff --git a/public/ext/candy/candy.min.map b/public/ext/candy/candy.min.map new file mode 100755 index 0000000..ff881ad --- /dev/null +++ b/public/ext/candy/candy.min.map @@ -0,0 +1 @@ +{"version":3,"file":"candy.min.js","sources":["candy.bundle.js"],"names":["Candy","self","$","about","name","version","init","service","options","viewClass","View","view","Core","core","jQuery","Strophe","_status","_connection","_service","_user","_roster","_rooms","_anonymousConnection","_options","autojoin","undefined","disconnectWithoutTabs","conferenceDomain","debug","domains","hideDomainList","disableCoreNotifications","disableWindowUnload","presencePriority","resource","useParticipantRealJid","initialRosterVersion","initialRosterItems","_addNamespace","value","addNamespace","_addNamespaces","_getEscapedJidFromJid","jid","node","getNodeFromJid","domain","getDomainFromJid","escapeNode","extend","window","console","log","Function","prototype","bind","Util","getIeVersion","call","apply","arguments","level","message","level_name","console_level","LogLevel","DEBUG","INFO","WARN","ERROR","FATAL","ChatRoster","Connection","rawInput","rawOutput","caps","onbeforeunload","onWindowUnload","registerEventHandlers","addHandler","Event","Jabber","Version","NS","VERSION","Presence","Message","Bookmarks","PRIVATE","Room","Disco","DISCO_INFO","disco","_onDiscoInfo","_onDiscoItems","DISCO_ITEMS","_delegateCapabilities","CAPS","connect","jidOrHost","password","nick","reset","triggerHandler","connection","indexOf","getResourceFromJid","Connect","ChatUser","Login","attach","sid","rid","disconnect","connected","handler","ns","type","id","from","getRoster","getUser","setUser","user","getConnection","removeRoom","roomJid","getRooms","getStropheStatus","setStropheStatus","status","isAnonymousConnection","getOptions","getRoom","sync","flush","data","this","warn","error","_current","container","language","assets","messages","limit","remove","crop","nickname","body","url","roster","enableXHTML","_setupTranslation","i18n","load","Translation","_registerObservers","on","Observer","Chat","AutojoinMissing","update","PresenceError","_registerWindowHandlers","document","focusin","Pane","Window","onFocus","focusout","onBlur","focus","blur","resize","fitTabs","_initToolbar","Toolbar","_delegateTooltips","delegate","Tooltip","show","resources","Parser","setEmoticonPath","html","Mustache","to_html","Template","pane","tooltipEmoticons","_","tooltipSound","tooltipAutoscroll","tooltipStatusmessage","tooltipAdministration","tooltipUsercount","assetsPath","tabs","mobile","mobileIcon","rooms","modal","toolbar","getCurrent","jidToId","MD5","hexdigest","escapeJid","unescapeJid","unescapeNode","str","len","length","substr","parseAndCropXhtml","append","createHtml","get","setCookie","lifetime_days","exp","Date","setDate","getDate","cookie","toUTCString","cookieExists","getCookie","regex","RegExp","escape","matches","exec","deleteCookie","getPosLeftAccordingToWindowBounds","elem","pos","windowWidth","width","elemWidth","outerWidth","marginDiff","backgroundPositionAlignment","px","getPosTopAccordingToWindowBounds","windowHeight","height","elemHeight","outerHeight","localizedTime","dateTime","date","toDateString","iso8601toDate","format","timestamp","parse","isNaN","struct","minutesOffset","getTimezoneOffset","replace","isEmptyObject","obj","prop","hasOwnProperty","forceRedraw","css","display","setTimeout","ie","undef","v","div","createElement","all","getElementsByTagName","innerHTML","isMobile","check","a","test","navigator","userAgent","vendor","opera","r","match","_emoticonPath","path","emoticons","plain","image","emotify","text","i","linkify","matched","nl2br","maxLength","currentLength","el","j","tag","attribute","cssAttrs","attr","cssName","cssValue","nodeType","ElementType","NORMAL","nodeName","toLowerCase","XHTML","validTag","attributes","getAttribute","cssText","split","validCSS","push","join","childNodes","e","xmlTextNode","xmlGenerator","createDocumentFragment","appendChild","FRAGMENT","TEXT","nodeValue","substring","parseHTML","Action","msg","sendIQ","$iq","to","c","xmlns","up","SetNickname","Array","roomNick","presence","conn","each","$pres","getUniqueId","send","Roster","registerCallback","RosterPush","item","RosterFetch","RosterLoad","items","pres","t","toString","generateCapsAttrs","tree","Services","CLIENT","Autojoin","BOOKMARKS","pubsubBookmarkRequest","PUBSUB","isArray","Join","valueOf","EnableCarbons","CARBONS","ResetIgnoreList","getEscapedJid","PRIVACY","action","order","RemoveIgnoreList","GetIgnoreList","iq","iqId","PrivacyList","SetIgnoreListActive","GetJidIfAnonymous","getJid","getNick","MUC","Leave","muc","leave","xhtmlMsg","trim","getBareJidFromJid","Invite","invitees","reason","$msg","x","MUC_USER","invitee","IgnoreUnignore","userJid","addToOrRemoveFromPrivacyList","UpdatePrivacyList","currentUser","privacyList","getPrivacyList","index","Admin","UserAction","itemObj","role","affiliation","MUC_ADMIN","SetSubject","subject","setTopic","ChatRoom","room","setName","getName","setRoster","add","getAll","realJid","ROLE_MODERATOR","AFFILIATION_OWNER","privacyLists","customData","previousNick","setJid","getRealJid","setNick","contact","getContact","getRole","setRole","setAffiliation","getAffiliation","isModerator","list","splice","setPrivacyLists","lists","isInPrivacyList","setCustomData","getCustomData","setPreviousNick","getPreviousNick","setStatus","getStatus","Contact","stropheRosterItem","getSubscription","subscription","getGroups","groups","highestResourcePriority","resourcePriority","priority","parseInt","_weightForStatus","presetJid","Status","CONNECTED","ATTACHED","DISCONNECTED","AUTHFAIL","CONNECTING","DISCONNECTING","AUTHENTICATING","CONNFAIL","children","stanza","_addRosterItems","updatedItem","_addRosterItem","PrivacyListError","invite","_findInvite","mediatedInvite","find","directInvite","passwordNode","reasonNode","continueNode","continuedThread","identity","roomName","presenceType","isNewRoom","_msgHasStatusCode","nickAssign","nickChange","_selfLeave","code","actor","tagName","carbon","partnerJid","sender","barePartner","bareFrom","isNoConferenceRoomJid","partner","xhtmlChild","XHTML_IM","xhtmlMessage","first","contents","_checkForChatStateNotification","delay","DELAY","JABBER_DELAY","toISOString","chatStateElements","chatstate","_showConnectedMessageModal","event","args","eventName","Modal","hide","showLoginForm","adminMessage","onInfoMessage","close","notifyPrivateChats","actionLabel","actorName","translationParams","Context","adminMessageReason","_action","_reason","evtData","PrivateRoom","bareJid","targetJid","showEnterPasswordForm","showNicknameConflictForm","showError","setSubject","infoMessage","open","addTab","roomType","roomId","preventDefault","tab","privateUserChat","appendTo","click","tabClick","tabClose","getTab","removeTab","setActiveTab","addClass","removeClass","increaseUnreadMessages","unreadElem","updateWindowOnAllMessages","clearUnreadMessages","reduceUnreadMessages","currentRoomJid","roomPane","getPane","scrollPosition","scrollTop","parent","allTabsClosed","hideMobileIcon","availableWidth","innerWidth","tabsWidth","overflow","tabDiffToRealWidth","tabWidth","Math","floor","showMobileIcon","clickMobileIcon","is","time","appendToMessagePane","scrollToBottom","_supportsNativeAudio","showEmoticonsMenu","currentTarget","stopPropagation","onAutoscrollControlClick","canPlayType","onSoundControlClick","onStatusMessageControlClick","context","me","updateUsercount","usercount","playSound","onPlaySound","Audio","play","src","loop","autostart","control","hasClass","toggleClass","onScrollToStoredPosition","autoscroll","onScrollToBottom","count","showCloseControl","showSpinner","modalClass","hideCloseControl","hideSpinner","stop","fadeIn","callback","fadeOut","keydown","which","map","d","customClass","form","_labelNickname","_labelUsername","_labelPassword","_loginSubmit","displayPassword","displayUsername","displayDomain","displayNickname","submit","username","val","enterPasswordForm","_label","_joinSubmit","nicknameConflictForm","replacements","displayError","_error","content","tooltip","target","offset","posLeft","left","posTop","top","mouseleave","menu","links","menulinks","getMenuLinks","clickHandler","link","class","label","element","initialMenuLinks","requiredPermission","private","ignore","ignoreUser","unignore","unignoreUser","kick","contextModalForm","_submit","ban","input","emoticon","messagePane","enableScroll","renderEvtData","template","templateData","displayName","roomjid","last","notifyEvtData","hasFocus","switchToRoom","messageForm","removeAttr","changeNick","roomElement","roomTabElement","previousPrivateRoomJid","newPrivateRoomJid","previousPrivateRoomId","newPrivateRoomId","messageCount","_messageSubmit","_userOnline","setFocusToForm","_roomSubject","openRooms","sliceMessagePane","slice","chatPane","addIgnoreIcon","removeIgnoreIcon","subPane","changeDataUserJidIfUserIsMe","userId","usercountDiff","userElem","_insertUser","showJoinAnimation","userClick","leaveAnimation","contact_status","displayNick","tooltipRole","tooltipIgnored","userInserted","rosterPane","userSortCompare","_userSortCompare","before","statusWeight","toUpperCase","useRealJid","rosterUserId","$rosterUserElem","joinAnimation","elementId","slideDown","animate","opacity","complete","slideUp","previousUserJid","_hasFocus","_plainTitle","title","_unreadMessagesCount","renderUnreadMessages","num","unreadmessages","en","statusConnecting","statusConnected","statusDisconnecting","statusDisconnected","statusAuthfail","roomSubject","messageSubmit","labelUsername","labelNickname","labelPassword","loginSubmit","loginInvalid","reasonWas","kickActionLabel","youHaveBeenKickedBy","youHaveBeenKicked","banActionLabel","youHaveBeenBannedBy","youHaveBeenBanned","privateActionLabel","ignoreActionLabel","unignoreActionLabel","setSubjectActionLabel","administratorMessageSubject","userJoinedRoom","userLeftRoom","userHasBeenKickedFromRoom","userHasBeenBannedFromRoom","userChangedNick","dateFormat","timeFormat","enterRoomPassword","enterRoomPasswordSubmit","passwordEnteredInvalid","nicknameConflict","errorMembersOnly","errorMaxOccupantsReached","errorAutojoinMissing","antiSpamMessage","de","fr","nl","es","cn","ja","sv","fi","it","pl","presenceUnknownWarningSubject","presenceUnknownWarning","pt","pt_br","ru","ca","cs","he"],"mappings":"AAKA,YAUA,IAAIA,OAAQ,SAASC,EAAMC,GA8BvB,MAtBAD,GAAKE,OACDC,KAAM,QACNC,QAAS,SAabJ,EAAKK,KAAO,SAASC,EAASC,GACrBA,EAAQC,YACTD,EAAQC,UAAYR,EAAKS,MAE7BF,EAAQC,UAAUH,KAAKJ,EAAE,UAAWM,EAAQG,MAC5CV,EAAKW,KAAKN,KAAKC,EAASC,EAAQK,OAE7BZ,GACTD,UAAac,OAkBfd,OAAMY,KAAO,SAASX,EAAMc,EAASb,GAIjC,GAkBAc,GAlBIC,EAAc,KAGlBC,EAAW,KAGXC,EAAQ,KAGRC,EAAU,KAGVC,KAGAC,GAAuB,EAMvBC,GAKIC,SAAUC,OAKVC,uBAAuB,EAKvBC,iBAAkBF,OAIlBG,OAAO,EAUPC,QAAS,KAQTC,gBAAgB,EAKhBC,0BAA0B,EAI1BC,qBAAqB,EAIrBC,iBAAkB,EAKlBC,SAAUlC,MAAMG,MAAMC,KAItB+B,uBAAuB,EAKvBC,qBAAsB,KAItBC,uBAQJC,EAAgB,SAASlC,EAAMmC,GAC3BxB,EAAQyB,aAAapC,EAAMmC,IAI/BE,EAAiB,WACbH,EAAc,UAAW,qBACzBA,EAAc,YAAa,qBAC3BA,EAAc,UAAW,qBACzBA,EAAc,QAAS,kBACvBA,EAAc,eAAgB,kBAC9BA,EAAc,SAAU,qCACxBA,EAAc,UAAW,uBAC1BI,EAAwB,SAASC,GAChC,GAAIC,GAAO7B,EAAQ8B,eAAeF,GAAMG,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C,sBAAuB,YACvBC,iBAAkB,aAClBykB,kBAAmB,4BACnBC,wBAAyB,aACzBC,uBAAwB,yBACxBC,iBAAkB,6CAClBC,iBAAkB,gDAClBC,yBAA0B,mDAC1BC,qBAAsB,iEACtBC,gBAAiB"} \ No newline at end of file diff --git a/public/ext/candy/example/htaccess b/public/ext/candy/example/htaccess new file mode 100755 index 0000000..e6d70c5 --- /dev/null +++ b/public/ext/candy/example/htaccess @@ -0,0 +1,4 @@ +AddDefaultCharset UTF-8 +Options +MultiViews +RewriteEngine On +RewriteRule http-bind/ http://localhost:5280/http-bind/ [P] diff --git a/public/ext/candy/example/index.html b/public/ext/candy/example/index.html new file mode 100755 index 0000000..d2a0551 --- /dev/null +++ b/public/ext/candy/example/index.html @@ -0,0 +1,51 @@ + + + + + + Candy - Chats are not dead yet + + + + + + + + + + +
                + + diff --git a/public/ext/candy/libs.bundle.css b/public/ext/candy/libs.bundle.css new file mode 100755 index 0000000..42c79d6 --- /dev/null +++ b/public/ext/candy/libs.bundle.css @@ -0,0 +1,6760 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + -webkit-box-shadow: none !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + .navbar { + display: none; + } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; + } + .label { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table td, + .table th { + background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); +} +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.glyphicon-asterisk:before { + content: "\002a"; +} +.glyphicon-plus:before { + content: "\002b"; +} +.glyphicon-euro:before, +.glyphicon-eur:before { + content: "\20ac"; +} +.glyphicon-minus:before { + content: "\2212"; +} +.glyphicon-cloud:before { + content: "\2601"; +} +.glyphicon-envelope:before { + content: "\2709"; +} +.glyphicon-pencil:before { + content: "\270f"; +} +.glyphicon-glass:before { + content: "\e001"; +} +.glyphicon-music:before { + content: "\e002"; +} +.glyphicon-search:before { + content: "\e003"; +} +.glyphicon-heart:before { + content: "\e005"; +} +.glyphicon-star:before { + content: "\e006"; +} +.glyphicon-star-empty:before { + content: "\e007"; +} +.glyphicon-user:before { + content: "\e008"; +} +.glyphicon-film:before { + content: "\e009"; +} +.glyphicon-th-large:before { + content: "\e010"; +} +.glyphicon-th:before { + content: "\e011"; +} +.glyphicon-th-list:before { + content: "\e012"; +} +.glyphicon-ok:before { + content: "\e013"; +} +.glyphicon-remove:before { + content: "\e014"; +} +.glyphicon-zoom-in:before { + content: "\e015"; +} +.glyphicon-zoom-out:before { + content: "\e016"; +} +.glyphicon-off:before { + content: "\e017"; +} +.glyphicon-signal:before { + content: "\e018"; +} +.glyphicon-cog:before { + content: "\e019"; +} +.glyphicon-trash:before { + content: "\e020"; +} +.glyphicon-home:before { + content: "\e021"; +} +.glyphicon-file:before { + content: "\e022"; +} +.glyphicon-time:before { + content: "\e023"; +} +.glyphicon-road:before { + content: "\e024"; +} +.glyphicon-download-alt:before { + content: "\e025"; +} +.glyphicon-download:before { + content: "\e026"; +} +.glyphicon-upload:before { + content: "\e027"; +} +.glyphicon-inbox:before { + content: "\e028"; +} +.glyphicon-play-circle:before { + content: "\e029"; +} +.glyphicon-repeat:before { + content: "\e030"; +} +.glyphicon-refresh:before { + content: "\e031"; +} +.glyphicon-list-alt:before { + content: "\e032"; +} +.glyphicon-lock:before { + content: "\e033"; +} +.glyphicon-flag:before { + content: "\e034"; +} +.glyphicon-headphones:before { + content: "\e035"; +} +.glyphicon-volume-off:before { + content: "\e036"; +} +.glyphicon-volume-down:before { + content: "\e037"; +} +.glyphicon-volume-up:before { + content: "\e038"; +} +.glyphicon-qrcode:before { + content: "\e039"; +} +.glyphicon-barcode:before { + content: "\e040"; +} +.glyphicon-tag:before { + content: "\e041"; +} +.glyphicon-tags:before { + content: "\e042"; +} +.glyphicon-book:before { + content: "\e043"; +} +.glyphicon-bookmark:before { + content: "\e044"; +} +.glyphicon-print:before { + content: "\e045"; +} +.glyphicon-camera:before { + content: "\e046"; +} +.glyphicon-font:before { + content: "\e047"; +} +.glyphicon-bold:before { + content: "\e048"; +} +.glyphicon-italic:before { + content: "\e049"; +} +.glyphicon-text-height:before { + content: "\e050"; +} +.glyphicon-text-width:before { + content: "\e051"; +} +.glyphicon-align-left:before { + content: "\e052"; +} +.glyphicon-align-center:before { + content: "\e053"; +} +.glyphicon-align-right:before { + content: "\e054"; +} +.glyphicon-align-justify:before { + content: "\e055"; +} +.glyphicon-list:before { + content: "\e056"; +} +.glyphicon-indent-left:before { + content: "\e057"; +} +.glyphicon-indent-right:before { + content: "\e058"; +} +.glyphicon-facetime-video:before { + content: "\e059"; +} +.glyphicon-picture:before { + content: "\e060"; +} +.glyphicon-map-marker:before { + content: "\e062"; +} +.glyphicon-adjust:before { + content: "\e063"; +} +.glyphicon-tint:before { + content: "\e064"; +} +.glyphicon-edit:before { + content: "\e065"; +} +.glyphicon-share:before { + content: "\e066"; +} +.glyphicon-check:before { + content: "\e067"; +} +.glyphicon-move:before { + content: "\e068"; +} +.glyphicon-step-backward:before { + content: "\e069"; +} +.glyphicon-fast-backward:before { + content: "\e070"; +} +.glyphicon-backward:before { + content: "\e071"; +} +.glyphicon-play:before { + content: "\e072"; +} +.glyphicon-pause:before { + content: "\e073"; +} +.glyphicon-stop:before { + content: "\e074"; +} +.glyphicon-forward:before { + content: "\e075"; +} +.glyphicon-fast-forward:before { + content: "\e076"; +} +.glyphicon-step-forward:before { + content: "\e077"; +} +.glyphicon-eject:before { + content: "\e078"; +} +.glyphicon-chevron-left:before { + content: "\e079"; +} +.glyphicon-chevron-right:before { + content: "\e080"; +} +.glyphicon-plus-sign:before { + content: "\e081"; +} +.glyphicon-minus-sign:before { + content: "\e082"; +} +.glyphicon-remove-sign:before { + content: "\e083"; +} +.glyphicon-ok-sign:before { + content: "\e084"; +} +.glyphicon-question-sign:before { + content: "\e085"; +} +.glyphicon-info-sign:before { + content: "\e086"; +} +.glyphicon-screenshot:before { + content: "\e087"; +} +.glyphicon-remove-circle:before { + content: "\e088"; +} +.glyphicon-ok-circle:before { + content: "\e089"; +} +.glyphicon-ban-circle:before { + content: "\e090"; +} +.glyphicon-arrow-left:before { + content: "\e091"; +} +.glyphicon-arrow-right:before { + content: "\e092"; +} +.glyphicon-arrow-up:before { + content: "\e093"; +} +.glyphicon-arrow-down:before { + content: "\e094"; +} +.glyphicon-share-alt:before { + content: "\e095"; +} +.glyphicon-resize-full:before { + content: "\e096"; +} +.glyphicon-resize-small:before { + content: "\e097"; +} +.glyphicon-exclamation-sign:before { + content: "\e101"; +} +.glyphicon-gift:before { + content: "\e102"; +} +.glyphicon-leaf:before { + content: "\e103"; +} +.glyphicon-fire:before { + content: "\e104"; +} +.glyphicon-eye-open:before { + content: "\e105"; +} +.glyphicon-eye-close:before { + content: "\e106"; +} +.glyphicon-warning-sign:before { + content: "\e107"; +} +.glyphicon-plane:before { + content: "\e108"; +} +.glyphicon-calendar:before { + content: "\e109"; +} +.glyphicon-random:before { + content: "\e110"; +} +.glyphicon-comment:before { + content: "\e111"; +} +.glyphicon-magnet:before { + content: "\e112"; +} +.glyphicon-chevron-up:before { + content: "\e113"; +} +.glyphicon-chevron-down:before { + content: "\e114"; +} +.glyphicon-retweet:before { + content: "\e115"; +} +.glyphicon-shopping-cart:before { + content: "\e116"; +} +.glyphicon-folder-close:before { + content: "\e117"; +} +.glyphicon-folder-open:before { + content: "\e118"; +} +.glyphicon-resize-vertical:before { + content: "\e119"; +} +.glyphicon-resize-horizontal:before { + content: "\e120"; +} +.glyphicon-hdd:before { + content: "\e121"; +} +.glyphicon-bullhorn:before { + content: "\e122"; +} +.glyphicon-bell:before { + content: "\e123"; +} +.glyphicon-certificate:before { + content: "\e124"; +} +.glyphicon-thumbs-up:before { + content: "\e125"; +} +.glyphicon-thumbs-down:before { + content: "\e126"; +} +.glyphicon-hand-right:before { + content: "\e127"; +} +.glyphicon-hand-left:before { + content: "\e128"; +} +.glyphicon-hand-up:before { + content: "\e129"; +} +.glyphicon-hand-down:before { + content: "\e130"; +} +.glyphicon-circle-arrow-right:before { + content: "\e131"; +} +.glyphicon-circle-arrow-left:before { + content: "\e132"; +} +.glyphicon-circle-arrow-up:before { + content: "\e133"; +} +.glyphicon-circle-arrow-down:before { + content: "\e134"; +} +.glyphicon-globe:before { + content: "\e135"; +} +.glyphicon-wrench:before { + content: "\e136"; +} +.glyphicon-tasks:before { + content: "\e137"; +} +.glyphicon-filter:before { + content: "\e138"; +} +.glyphicon-briefcase:before { + content: "\e139"; +} +.glyphicon-fullscreen:before { + content: "\e140"; +} +.glyphicon-dashboard:before { + content: "\e141"; +} +.glyphicon-paperclip:before { + content: "\e142"; +} +.glyphicon-heart-empty:before { + content: "\e143"; +} +.glyphicon-link:before { + content: "\e144"; +} +.glyphicon-phone:before { + content: "\e145"; +} +.glyphicon-pushpin:before { + content: "\e146"; +} +.glyphicon-usd:before { + content: "\e148"; +} +.glyphicon-gbp:before { + content: "\e149"; +} +.glyphicon-sort:before { + content: "\e150"; +} +.glyphicon-sort-by-alphabet:before { + content: "\e151"; +} +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152"; +} +.glyphicon-sort-by-order:before { + content: "\e153"; +} +.glyphicon-sort-by-order-alt:before { + content: "\e154"; +} +.glyphicon-sort-by-attributes:before { + content: "\e155"; +} +.glyphicon-sort-by-attributes-alt:before { + content: "\e156"; +} +.glyphicon-unchecked:before { + content: "\e157"; +} +.glyphicon-expand:before { + content: "\e158"; +} +.glyphicon-collapse-down:before { + content: "\e159"; +} +.glyphicon-collapse-up:before { + content: "\e160"; +} +.glyphicon-log-in:before { + content: "\e161"; +} +.glyphicon-flash:before { + content: "\e162"; +} +.glyphicon-log-out:before { + content: "\e163"; +} +.glyphicon-new-window:before { + content: "\e164"; +} +.glyphicon-record:before { + content: "\e165"; +} +.glyphicon-save:before { + content: "\e166"; +} +.glyphicon-open:before { + content: "\e167"; +} +.glyphicon-saved:before { + content: "\e168"; +} +.glyphicon-import:before { + content: "\e169"; +} +.glyphicon-export:before { + content: "\e170"; +} +.glyphicon-send:before { + content: "\e171"; +} +.glyphicon-floppy-disk:before { + content: "\e172"; +} +.glyphicon-floppy-saved:before { + content: "\e173"; +} +.glyphicon-floppy-remove:before { + content: "\e174"; +} +.glyphicon-floppy-save:before { + content: "\e175"; +} +.glyphicon-floppy-open:before { + content: "\e176"; +} +.glyphicon-credit-card:before { + content: "\e177"; +} +.glyphicon-transfer:before { + content: "\e178"; +} +.glyphicon-cutlery:before { + content: "\e179"; +} +.glyphicon-header:before { + content: "\e180"; +} +.glyphicon-compressed:before { + content: "\e181"; +} +.glyphicon-earphone:before { + content: "\e182"; +} +.glyphicon-phone-alt:before { + content: "\e183"; +} +.glyphicon-tower:before { + content: "\e184"; +} +.glyphicon-stats:before { + content: "\e185"; +} +.glyphicon-sd-video:before { + content: "\e186"; +} +.glyphicon-hd-video:before { + content: "\e187"; +} +.glyphicon-subtitles:before { + content: "\e188"; +} +.glyphicon-sound-stereo:before { + content: "\e189"; +} +.glyphicon-sound-dolby:before { + content: "\e190"; +} +.glyphicon-sound-5-1:before { + content: "\e191"; +} +.glyphicon-sound-6-1:before { + content: "\e192"; +} +.glyphicon-sound-7-1:before { + content: "\e193"; +} +.glyphicon-copyright-mark:before { + content: "\e194"; +} +.glyphicon-registration-mark:before { + content: "\e195"; +} +.glyphicon-cloud-download:before { + content: "\e197"; +} +.glyphicon-cloud-upload:before { + content: "\e198"; +} +.glyphicon-tree-conifer:before { + content: "\e199"; +} +.glyphicon-tree-deciduous:before { + content: "\e200"; +} +.glyphicon-cd:before { + content: "\e201"; +} +.glyphicon-save-file:before { + content: "\e202"; +} +.glyphicon-open-file:before { + content: "\e203"; +} +.glyphicon-level-up:before { + content: "\e204"; +} +.glyphicon-copy:before { + content: "\e205"; +} +.glyphicon-paste:before { + content: "\e206"; +} +.glyphicon-alert:before { + content: "\e209"; +} +.glyphicon-equalizer:before { + content: "\e210"; +} +.glyphicon-king:before { + content: "\e211"; +} +.glyphicon-queen:before { + content: "\e212"; +} +.glyphicon-pawn:before { + content: "\e213"; +} +.glyphicon-bishop:before { + content: "\e214"; +} +.glyphicon-knight:before { + content: "\e215"; +} +.glyphicon-baby-formula:before { + content: "\e216"; +} +.glyphicon-tent:before { + content: "\26fa"; +} +.glyphicon-blackboard:before { + content: "\e218"; +} +.glyphicon-bed:before { + content: "\e219"; +} +.glyphicon-apple:before { + content: "\f8ff"; +} +.glyphicon-erase:before { + content: "\e221"; +} +.glyphicon-hourglass:before { + content: "\231b"; +} +.glyphicon-lamp:before { + content: "\e223"; +} +.glyphicon-duplicate:before { + content: "\e224"; +} +.glyphicon-piggy-bank:before { + content: "\e225"; +} +.glyphicon-scissors:before { + content: "\e226"; +} +.glyphicon-bitcoin:before { + content: "\e227"; +} +.glyphicon-btc:before { + content: "\e227"; +} +.glyphicon-xbt:before { + content: "\e227"; +} +.glyphicon-yen:before { + content: "\00a5"; +} +.glyphicon-jpy:before { + content: "\00a5"; +} +.glyphicon-ruble:before { + content: "\20bd"; +} +.glyphicon-rub:before { + content: "\20bd"; +} +.glyphicon-scale:before { + content: "\e230"; +} +.glyphicon-ice-lolly:before { + content: "\e231"; +} +.glyphicon-ice-lolly-tasted:before { + content: "\e232"; +} +.glyphicon-education:before { + content: "\e233"; +} +.glyphicon-option-horizontal:before { + content: "\e234"; +} +.glyphicon-option-vertical:before { + content: "\e235"; +} +.glyphicon-menu-hamburger:before { + content: "\e236"; +} +.glyphicon-modal-window:before { + content: "\e237"; +} +.glyphicon-oil:before { + content: "\e238"; +} +.glyphicon-grain:before { + content: "\e239"; +} +.glyphicon-sunglasses:before { + content: "\e240"; +} +.glyphicon-text-size:before { + content: "\e241"; +} +.glyphicon-text-color:before { + content: "\e242"; +} +.glyphicon-text-background:before { + content: "\e243"; +} +.glyphicon-object-align-top:before { + content: "\e244"; +} +.glyphicon-object-align-bottom:before { + content: "\e245"; +} +.glyphicon-object-align-horizontal:before { + content: "\e246"; +} +.glyphicon-object-align-left:before { + content: "\e247"; +} +.glyphicon-object-align-vertical:before { + content: "\e248"; +} +.glyphicon-object-align-right:before { + content: "\e249"; +} +.glyphicon-triangle-right:before { + content: "\e250"; +} +.glyphicon-triangle-left:before { + content: "\e251"; +} +.glyphicon-triangle-bottom:before { + content: "\e252"; +} +.glyphicon-triangle-top:before { + content: "\e253"; +} +.glyphicon-console:before { + content: "\e254"; +} +.glyphicon-superscript:before { + content: "\e255"; +} +.glyphicon-subscript:before { + content: "\e256"; +} +.glyphicon-menu-left:before { + content: "\e257"; +} +.glyphicon-menu-right:before { + content: "\e258"; +} +.glyphicon-menu-down:before { + content: "\e259"; +} +.glyphicon-menu-up:before { + content: "\e260"; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +html { + font-size: 10px; + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #337ab7; + text-decoration: none; +} +a:hover, +a:focus { + color: #23527c; + text-decoration: underline; +} +a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +figure { + margin: 0; +} +img { + vertical-align: middle; +} +.img-responsive, +.thumbnail > img, +.thumbnail a > img, +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + max-width: 100%; + height: auto; +} +.img-rounded { + border-radius: 6px; +} +.img-thumbnail { + display: inline-block; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; +} +.img-circle { + border-radius: 50%; +} +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} +[role="button"] { + cursor: pointer; +} +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small, +.h1 small, +.h2 small, +.h3 small, +.h4 small, +.h5 small, +.h6 small, +h1 .small, +h2 .small, +h3 .small, +h4 .small, +h5 .small, +h6 .small, +.h1 .small, +.h2 .small, +.h3 .small, +.h4 .small, +.h5 .small, +.h6 .small { + font-weight: normal; + line-height: 1; + color: #777; +} +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: 20px; + margin-bottom: 10px; +} +h1 small, +.h1 small, +h2 small, +.h2 small, +h3 small, +.h3 small, +h1 .small, +.h1 .small, +h2 .small, +.h2 .small, +h3 .small, +.h3 .small { + font-size: 65%; +} +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: 10px; + margin-bottom: 10px; +} +h4 small, +.h4 small, +h5 small, +.h5 small, +h6 small, +.h6 small, +h4 .small, +.h4 .small, +h5 .small, +.h5 .small, +h6 .small, +.h6 .small { + font-size: 75%; +} +h1, +.h1 { + font-size: 36px; +} +h2, +.h2 { + font-size: 30px; +} +h3, +.h3 { + font-size: 24px; +} +h4, +.h4 { + font-size: 18px; +} +h5, +.h5 { + font-size: 14px; +} +h6, +.h6 { + font-size: 12px; +} +p { + margin: 0 0 10px; +} +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4; +} +@media (min-width: 768px) { + .lead { + font-size: 21px; + } +} +small, +.small { + font-size: 85%; +} +mark, +.mark { + padding: .2em; + background-color: #fcf8e3; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} +.text-nowrap { + white-space: nowrap; +} +.text-lowercase { + text-transform: lowercase; +} +.text-uppercase { + text-transform: uppercase; +} +.text-capitalize { + text-transform: capitalize; +} +.text-muted { + color: #777; +} +.text-primary { + color: #337ab7; +} +a.text-primary:hover, +a.text-primary:focus { + color: #286090; +} +.text-success { + color: #3c763d; +} +a.text-success:hover, +a.text-success:focus { + color: #2b542c; +} +.text-info { + color: #31708f; +} +a.text-info:hover, +a.text-info:focus { + color: #245269; +} +.text-warning { + color: #8a6d3b; +} +a.text-warning:hover, +a.text-warning:focus { + color: #66512c; +} +.text-danger { + color: #a94442; +} +a.text-danger:hover, +a.text-danger:focus { + color: #843534; +} +.bg-primary { + color: #fff; + background-color: #337ab7; +} +a.bg-primary:hover, +a.bg-primary:focus { + background-color: #286090; +} +.bg-success { + background-color: #dff0d8; +} +a.bg-success:hover, +a.bg-success:focus { + background-color: #c1e2b3; +} +.bg-info { + background-color: #d9edf7; +} +a.bg-info:hover, +a.bg-info:focus { + background-color: #afd9ee; +} +.bg-warning { + background-color: #fcf8e3; +} +a.bg-warning:hover, +a.bg-warning:focus { + background-color: #f7ecb5; +} +.bg-danger { + background-color: #f2dede; +} +a.bg-danger:hover, +a.bg-danger:focus { + background-color: #e4b9b9; +} +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee; +} +ul, +ol { + margin-top: 0; + margin-bottom: 10px; +} +ul ul, +ol ul, +ul ol, +ol ol { + margin-bottom: 0; +} +.list-unstyled { + padding-left: 0; + list-style: none; +} +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none; +} +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; +} +dl { + margin-top: 0; + margin-bottom: 20px; +} +dt, +dd { + line-height: 1.42857143; +} +dt { + font-weight: bold; +} +dd { + margin-left: 0; +} +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; + } + .dl-horizontal dd { + margin-left: 180px; + } +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #777; +} +.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee; +} +blockquote p:last-child, +blockquote ul:last-child, +blockquote ol:last-child { + margin-bottom: 0; +} +blockquote footer, +blockquote small, +blockquote .small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #777; +} +blockquote footer:before, +blockquote small:before, +blockquote .small:before { + content: '\2014 \00A0'; +} +.blockquote-reverse, +blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0; +} +.blockquote-reverse footer:before, +blockquote.pull-right footer:before, +.blockquote-reverse small:before, +blockquote.pull-right small:before, +.blockquote-reverse .small:before, +blockquote.pull-right .small:before { + content: ''; +} +.blockquote-reverse footer:after, +blockquote.pull-right footer:after, +.blockquote-reverse small:after, +blockquote.pull-right small:after, +.blockquote-reverse .small:after, +blockquote.pull-right .small:after { + content: '\00A0 \2014'; +} +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143; +} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; +} +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; +} +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); +} +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; + -webkit-box-shadow: none; + box-shadow: none; +} +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px; +} +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +@media (min-width: 768px) { + .container { + width: 750px; + } +} +@media (min-width: 992px) { + .container { + width: 970px; + } +} +@media (min-width: 1200px) { + .container { + width: 1170px; + } +} +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} +.row { + margin-right: -15px; + margin-left: -15px; +} +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0; +} +@media (min-width: 768px) { + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0; + } +} +@media (min-width: 992px) { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1200px) { + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +table { + background-color: transparent; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #ddd; +} +.table .table { + background-color: #fff; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #ddd; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f9f9f9; +} +.table-hover > tbody > tr:hover { + background-color: #f5f5f5; +} +table col[class*="col-"] { + position: static; + display: table-column; + float: none; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + display: table-cell; + float: none; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #f5f5f5; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #e8e8e8; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #dff0d8; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #d0e9c6; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #d9edf7; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #c4e3f3; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #fcf8e3; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #faf2cc; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #f2dede; +} +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ebcccc; +} +.table-responsive { + min-height: .01%; + overflow-x: auto; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; +} +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; +} +input[type="file"] { + display: block; +} +input[type="range"] { + display: block; + width: 100%; +} +select[multiple], +select[size] { + height: auto; +} +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555; +} +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); +} +.form-control::-moz-placeholder { + color: #999; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #999; +} +.form-control::-webkit-input-placeholder { + color: #999; +} +.form-control::-ms-expand { + background-color: transparent; + border: 0; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + background-color: #eee; + opacity: 1; +} +.form-control[disabled], +fieldset[disabled] .form-control { + cursor: not-allowed; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type="date"].form-control, + input[type="time"].form-control, + input[type="datetime-local"].form-control, + input[type="month"].form-control { + line-height: 34px; + } + input[type="date"].input-sm, + input[type="time"].input-sm, + input[type="datetime-local"].input-sm, + input[type="month"].input-sm, + .input-group-sm input[type="date"], + .input-group-sm input[type="time"], + .input-group-sm input[type="datetime-local"], + .input-group-sm input[type="month"] { + line-height: 30px; + } + input[type="date"].input-lg, + input[type="time"].input-lg, + input[type="datetime-local"].input-lg, + input[type="month"].input-lg, + .input-group-lg input[type="date"], + .input-group-lg input[type="time"], + .input-group-lg input[type="datetime-local"], + .input-group-lg input[type="month"] { + line-height: 46px; + } +} +.form-group { + margin-bottom: 15px; +} +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; +} +.radio label, +.checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; +} +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px; +} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; +} +.radio-inline, +.checkbox-inline { + position: relative; + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + vertical-align: middle; + cursor: pointer; +} +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { + margin-top: 0; + margin-left: 10px; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"].disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="radio"], +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; +} +.radio-inline.disabled, +.checkbox-inline.disabled, +fieldset[disabled] .radio-inline, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; +} +.radio.disabled label, +.checkbox.disabled label, +fieldset[disabled] .radio label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; +} +.form-control-static { + min-height: 34px; + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0; +} +.form-control-static.input-lg, +.form-control-static.input-sm { + padding-right: 0; + padding-left: 0; +} +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-sm { + height: 30px; + line-height: 30px; +} +textarea.input-sm, +select[multiple].input-sm { + height: auto; +} +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.form-group-sm select.form-control { + height: 30px; + line-height: 30px; +} +.form-group-sm textarea.form-control, +.form-group-sm select[multiple].form-control { + height: auto; +} +.form-group-sm .form-control-static { + height: 30px; + min-height: 32px; + padding: 6px 10px; + font-size: 12px; + line-height: 1.5; +} +.input-lg { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-lg { + height: 46px; + line-height: 46px; +} +textarea.input-lg, +select[multiple].input-lg { + height: auto; +} +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.form-group-lg select.form-control { + height: 46px; + line-height: 46px; +} +.form-group-lg textarea.form-control, +.form-group-lg select[multiple].form-control { + height: auto; +} +.form-group-lg .form-control-static { + height: 46px; + min-height: 38px; + padding: 11px 16px; + font-size: 18px; + line-height: 1.3333333; +} +.has-feedback { + position: relative; +} +.has-feedback .form-control { + padding-right: 42.5px; +} +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none; +} +.input-lg + .form-control-feedback, +.input-group-lg + .form-control-feedback, +.form-group-lg .form-control + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px; +} +.input-sm + .form-control-feedback, +.input-group-sm + .form-control-feedback, +.form-group-sm .form-control + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px; +} +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #3c763d; +} +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; +} +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d; +} +.has-success .form-control-feedback { + color: #3c763d; +} +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #8a6d3b; +} +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; +} +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b; +} +.has-warning .form-control-feedback { + color: #8a6d3b; +} +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #a94442; +} +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); +} +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; +} +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442; +} +.has-error .form-control-feedback { + color: #a94442; +} +.has-feedback label ~ .form-control-feedback { + top: 25px; +} +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0; +} +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-static { + display: inline-block; + } + .form-inline .input-group { + display: inline-table; + vertical-align: middle; + } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; + } + .form-inline .input-group > .form-control { + width: 100%; + } + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio, + .form-inline .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; + } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .form-inline .has-feedback .form-control-feedback { + top: 0; + } +} +.form-horizontal .radio, +.form-horizontal .checkbox, +.form-horizontal .radio-inline, +.form-horizontal .checkbox-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; +} +.form-horizontal .radio, +.form-horizontal .checkbox { + min-height: 27px; +} +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 7px; + margin-bottom: 0; + text-align: right; + } +} +.form-horizontal .has-feedback .form-control-feedback { + right: 15px; +} +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 11px; + font-size: 18px; + } +} +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + font-size: 12px; + } +} +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn:hover, +.btn:focus, +.btn.focus { + color: #333; + text-decoration: none; +} +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn.disabled, +.btn[disabled], +fieldset[disabled] .btn { + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; +} +a.btn.disabled, +fieldset[disabled] a.btn { + pointer-events: none; +} +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; +} +.btn-default:focus, +.btn-default.focus { + color: #333; + background-color: #e6e6e6; + border-color: #8c8c8c; +} +.btn-default:hover { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} +.btn-default:active:hover, +.btn-default.active:hover, +.open > .dropdown-toggle.btn-default:hover, +.btn-default:active:focus, +.btn-default.active:focus, +.open > .dropdown-toggle.btn-default:focus, +.btn-default:active.focus, +.btn-default.active.focus, +.open > .dropdown-toggle.btn-default.focus { + color: #333; + background-color: #d4d4d4; + border-color: #8c8c8c; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus { + background-color: #fff; + border-color: #ccc; +} +.btn-default .badge { + color: #fff; + background-color: #333; +} +.btn-primary { + color: #fff; + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary:focus, +.btn-primary.focus { + color: #fff; + background-color: #286090; + border-color: #122b40; +} +.btn-primary:hover { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #286090; + border-color: #204d74; +} +.btn-primary:active:hover, +.btn-primary.active:hover, +.open > .dropdown-toggle.btn-primary:hover, +.btn-primary:active:focus, +.btn-primary.active:focus, +.open > .dropdown-toggle.btn-primary:focus, +.btn-primary:active.focus, +.btn-primary.active.focus, +.open > .dropdown-toggle.btn-primary.focus { + color: #fff; + background-color: #204d74; + border-color: #122b40; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus { + background-color: #337ab7; + border-color: #2e6da4; +} +.btn-primary .badge { + color: #337ab7; + background-color: #fff; +} +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success:focus, +.btn-success.focus { + color: #fff; + background-color: #449d44; + border-color: #255625; +} +.btn-success:hover { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-success:active:hover, +.btn-success.active:hover, +.open > .dropdown-toggle.btn-success:hover, +.btn-success:active:focus, +.btn-success.active:focus, +.open > .dropdown-toggle.btn-success:focus, +.btn-success:active.focus, +.btn-success.active.focus, +.open > .dropdown-toggle.btn-success.focus { + color: #fff; + background-color: #398439; + border-color: #255625; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus { + background-color: #5cb85c; + border-color: #4cae4c; +} +.btn-success .badge { + color: #5cb85c; + background-color: #fff; +} +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info:focus, +.btn-info.focus { + color: #fff; + background-color: #31b0d5; + border-color: #1b6d85; +} +.btn-info:hover { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; +} +.btn-info:active:hover, +.btn-info.active:hover, +.open > .dropdown-toggle.btn-info:hover, +.btn-info:active:focus, +.btn-info.active:focus, +.open > .dropdown-toggle.btn-info:focus, +.btn-info:active.focus, +.btn-info.active.focus, +.open > .dropdown-toggle.btn-info.focus { + color: #fff; + background-color: #269abc; + border-color: #1b6d85; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus { + background-color: #5bc0de; + border-color: #46b8da; +} +.btn-info .badge { + color: #5bc0de; + background-color: #fff; +} +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning:focus, +.btn-warning.focus { + color: #fff; + background-color: #ec971f; + border-color: #985f0d; +} +.btn-warning:hover { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512; +} +.btn-warning:active:hover, +.btn-warning.active:hover, +.open > .dropdown-toggle.btn-warning:hover, +.btn-warning:active:focus, +.btn-warning.active:focus, +.open > .dropdown-toggle.btn-warning:focus, +.btn-warning:active.focus, +.btn-warning.active.focus, +.open > .dropdown-toggle.btn-warning.focus { + color: #fff; + background-color: #d58512; + border-color: #985f0d; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus { + background-color: #f0ad4e; + border-color: #eea236; +} +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; +} +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger:focus, +.btn-danger.focus { + color: #fff; + background-color: #c9302c; + border-color: #761c19; +} +.btn-danger:hover { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; +} +.btn-danger:active:hover, +.btn-danger.active:hover, +.open > .dropdown-toggle.btn-danger:hover, +.btn-danger:active:focus, +.btn-danger.active:focus, +.open > .dropdown-toggle.btn-danger:focus, +.btn-danger:active.focus, +.btn-danger.active.focus, +.open > .dropdown-toggle.btn-danger.focus { + color: #fff; + background-color: #ac2925; + border-color: #761c19; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus { + background-color: #d9534f; + border-color: #d43f3a; +} +.btn-danger .badge { + color: #d9534f; + background-color: #fff; +} +.btn-link { + font-weight: normal; + color: #337ab7; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #23527c; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #777; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + display: none; +} +.collapse.in { + display: block; +} +tr.collapse.in { + display: table-row; +} +tbody.collapse.in { + display: table-row-group; +} +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-transition-duration: .35s; + -o-transition-duration: .35s; + transition-duration: .35s; + -webkit-transition-property: height, visibility; + -o-transition-property: height, visibility; + transition-property: height, visibility; +} +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px dashed; + border-top: 4px solid \9; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle:focus { + outline: 0; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175); +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: #333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #fff; + text-decoration: none; + background-color: #337ab7; + outline: 0; +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #777; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.open > .dropdown-menu { + display: block; +} +.open > a { + outline: 0; +} +.dropdown-menu-right { + right: 0; + left: auto; +} +.dropdown-menu-left { + right: auto; + left: 0; +} +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap; +} +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px dashed; + border-bottom: 4px solid \9; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px; +} +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto; + } + .navbar-right .dropdown-menu-left { + right: auto; + left: 0; + } +} +.btn-group, +.btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle; +} +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + float: left; +} +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover, +.btn-group > .btn:focus, +.btn-group-vertical > .btn:focus, +.btn-group > .btn:active, +.btn-group-vertical > .btn:active, +.btn-group > .btn.active, +.btn-group-vertical > .btn.active { + z-index: 2; +} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; +} +.btn-toolbar { + margin-left: -5px; +} +.btn-toolbar .btn, +.btn-toolbar .btn-group, +.btn-toolbar .input-group { + float: left; +} +.btn-toolbar > .btn, +.btn-toolbar > .btn-group, +.btn-toolbar > .input-group { + margin-left: 5px; +} +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0; +} +.btn-group > .btn:first-child { + margin-left: 0; +} +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group > .btn-group { + float: left; +} +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px; +} +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px; +} +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); +} +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none; +} +.btn .caret { + margin-left: 0; +} +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0; +} +.dropup .btn-lg .caret { + border-width: 0 5px 5px; +} +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; +} +.btn-group-vertical > .btn-group > .btn { + float: none; +} +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0; +} +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0; +} +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; +} +.btn-group-justified > .btn, +.btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1%; +} +.btn-group-justified > .btn-group .btn { + width: 100%; +} +.btn-group-justified > .btn-group .dropdown-menu { + left: auto; +} +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} +.input-group { + position: relative; + display: table; + border-collapse: separate; +} +.input-group[class*="col-"] { + float: none; + padding-right: 0; + padding-left: 0; +} +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0; +} +.input-group .form-control:focus { + z-index: 3; +} +.input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +select.input-group-lg > .form-control, +select.input-group-lg > .input-group-addon, +select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px; +} +textarea.input-group-lg > .form-control, +textarea.input-group-lg > .input-group-addon, +textarea.input-group-lg > .input-group-btn > .btn, +select[multiple].input-group-lg > .form-control, +select[multiple].input-group-lg > .input-group-addon, +select[multiple].input-group-lg > .input-group-btn > .btn { + height: auto; +} +.input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +select.input-group-sm > .form-control, +select.input-group-sm > .input-group-addon, +select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px; +} +textarea.input-group-sm > .form-control, +textarea.input-group-sm > .input-group-addon, +textarea.input-group-sm > .input-group-btn > .btn, +select[multiple].input-group-sm > .form-control, +select[multiple].input-group-sm > .input-group-addon, +select[multiple].input-group-sm > .input-group-btn > .btn { + height: auto; +} +.input-group-addon, +.input-group-btn, +.input-group .form-control { + display: table-cell; +} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; +} +.input-group-addon, +.input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle; +} +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: normal; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px; +} +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px; +} +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px; +} +.input-group-addon input[type="radio"], +.input-group-addon input[type="checkbox"] { + margin-top: 0; +} +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group-addon:first-child { + border-right: 0; +} +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.input-group-addon:last-child { + border-left: 0; +} +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap; +} +.input-group-btn > .btn { + position: relative; +} +.input-group-btn > .btn + .btn { + margin-left: -1px; +} +.input-group-btn > .btn:hover, +.input-group-btn > .btn:focus, +.input-group-btn > .btn:active { + z-index: 2; +} +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group { + margin-right: -1px; +} +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group { + z-index: 2; + margin-left: -1px; +} +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav > li { + position: relative; + display: block; +} +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; +} +.nav > li.disabled > a { + color: #777; +} +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; +} +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #337ab7; +} +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; +} +.nav > li > a > img { + max-width: none; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + float: left; + margin-bottom: -1px; +} +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd; +} +.nav-tabs > li.active > a, +.nav-tabs > li.active > a:hover, +.nav-tabs > li.active > a:focus { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0; +} +.nav-tabs.nav-justified > li { + float: none; +} +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-tabs.nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs.nav-justified > .active > a, +.nav-tabs.nav-justified > .active > a:hover, +.nav-tabs.nav-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs.nav-justified > .active > a, + .nav-tabs.nav-justified > .active > a:hover, + .nav-tabs.nav-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.nav-pills > li { + float: left; +} +.nav-pills > li > a { + border-radius: 4px; +} +.nav-pills > li + li { + margin-left: 2px; +} +.nav-pills > li.active > a, +.nav-pills > li.active > a:hover, +.nav-pills > li.active > a:focus { + color: #fff; + background-color: #337ab7; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0; +} +.nav-justified { + width: 100%; +} +.nav-justified > li { + float: none; +} +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center; +} +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto; +} +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1%; + } + .nav-justified > li > a { + margin-bottom: 0; + } +} +.nav-tabs-justified { + border-bottom: 0; +} +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px; +} +.nav-tabs-justified > .active > a, +.nav-tabs-justified > .active > a:hover, +.nav-tabs-justified > .active > a:focus { + border: 1px solid #ddd; +} +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0; + } + .nav-tabs-justified > .active > a, + .nav-tabs-justified > .active > a:hover, + .nav-tabs-justified > .active > a:focus { + border-bottom-color: #fff; + } +} +.tab-content > .tab-pane { + display: none; +} +.tab-content > .active { + display: block; +} +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent; +} +@media (min-width: 768px) { + .navbar { + border-radius: 4px; + } +} +@media (min-width: 768px) { + .navbar-header { + float: left; + } +} +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); +} +.navbar-collapse.in { + overflow-y: auto; +} +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .navbar-collapse.in { + overflow-y: visible; + } + .navbar-fixed-top .navbar-collapse, + .navbar-static-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + padding-right: 0; + padding-left: 0; + } +} +.navbar-fixed-top .navbar-collapse, +.navbar-fixed-bottom .navbar-collapse { + max-height: 340px; +} +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-top .navbar-collapse, + .navbar-fixed-bottom .navbar-collapse { + max-height: 200px; + } +} +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; +} +@media (min-width: 768px) { + .container > .navbar-header, + .container-fluid > .navbar-header, + .container > .navbar-collapse, + .container-fluid > .navbar-collapse { + margin-right: 0; + margin-left: 0; + } +} +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px; +} +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0; + } +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; +} +@media (min-width: 768px) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; + } +} +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px; +} +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0; +} +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; +} +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; +} +.navbar-brand > img { + display: block; +} +@media (min-width: 768px) { + .navbar > .container .navbar-brand, + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } +} +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; +} +.navbar-toggle:focus { + outline: 0; +} +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; +} +@media (min-width: 768px) { + .navbar-toggle { + display: none; + } +} +.navbar-nav { + margin: 7.5px -15px; +} +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; +} +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } + .navbar-nav .open .dropdown-menu > li > a, + .navbar-nav .open .dropdown-menu .dropdown-header { + padding: 5px 15px 5px 25px; + } + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px; + } + .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-nav .open .dropdown-menu > li > a:focus { + background-image: none; + } +} +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0; + } + .navbar-nav > li { + float: left; + } + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; + } +} +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); +} +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .navbar-form .form-control-static { + display: inline-block; + } + .navbar-form .input-group { + display: inline-table; + vertical-align: middle; + } + .navbar-form .input-group .input-group-addon, + .navbar-form .input-group .input-group-btn, + .navbar-form .input-group .form-control { + width: auto; + } + .navbar-form .input-group > .form-control { + width: 100%; + } + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio, + .navbar-form .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; + } + .navbar-form .radio label, + .navbar-form .checkbox label { + padding-left: 0; + } + .navbar-form .radio input[type="radio"], + .navbar-form .checkbox input[type="checkbox"] { + position: relative; + margin-left: 0; + } + .navbar-form .has-feedback .form-control-feedback { + top: 0; + } +} +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px; + } + .navbar-form .form-group:last-child { + margin-bottom: 0; + } +} +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + } +} +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + margin-bottom: 0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px; +} +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px; +} +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px; +} +.navbar-text { + margin-top: 15px; + margin-bottom: 15px; +} +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px; + } +} +@media (min-width: 768px) { + .navbar-left { + float: left !important; + } + .navbar-right { + float: right !important; + margin-right: -15px; + } + .navbar-right ~ .navbar-right { + margin-right: 0; + } +} +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7; +} +.navbar-default .navbar-brand { + color: #777; +} +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #5e5e5e; + background-color: transparent; +} +.navbar-default .navbar-text { + color: #777; +} +.navbar-default .navbar-nav > li > a { + color: #777; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #333; + background-color: transparent; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #555; + background-color: #e7e7e7; +} +.navbar-default .navbar-nav > .disabled > a, +.navbar-default .navbar-nav > .disabled > a:hover, +.navbar-default .navbar-nav > .disabled > a:focus { + color: #ccc; + background-color: transparent; +} +.navbar-default .navbar-toggle { + border-color: #ddd; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #ddd; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #888; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #e7e7e7; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #555; + background-color: #e7e7e7; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #333; + background-color: transparent; + } + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #555; + background-color: #e7e7e7; + } + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #ccc; + background-color: transparent; + } +} +.navbar-default .navbar-link { + color: #777; +} +.navbar-default .navbar-link:hover { + color: #333; +} +.navbar-default .btn-link { + color: #777; +} +.navbar-default .btn-link:hover, +.navbar-default .btn-link:focus { + color: #333; +} +.navbar-default .btn-link[disabled]:hover, +fieldset[disabled] .navbar-default .btn-link:hover, +.navbar-default .btn-link[disabled]:focus, +fieldset[disabled] .navbar-default .btn-link:focus { + color: #ccc; +} +.navbar-inverse { + background-color: #222; + border-color: #080808; +} +.navbar-inverse .navbar-brand { + color: #9d9d9d; +} +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-text { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a { + color: #9d9d9d; +} +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; +} +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; +} +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; +} +.navbar-inverse .navbar-toggle { + border-color: #333; +} +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; +} +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; +} +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; +} +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; +} +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #9d9d9d; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { + color: #fff; + background-color: transparent; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { + color: #fff; + background-color: #080808; + } + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { + color: #444; + background-color: transparent; + } +} +.navbar-inverse .navbar-link { + color: #9d9d9d; +} +.navbar-inverse .navbar-link:hover { + color: #fff; +} +.navbar-inverse .btn-link { + color: #9d9d9d; +} +.navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link:focus { + color: #fff; +} +.navbar-inverse .btn-link[disabled]:hover, +fieldset[disabled] .navbar-inverse .btn-link:hover, +.navbar-inverse .btn-link[disabled]:focus, +fieldset[disabled] .navbar-inverse .btn-link:focus { + color: #444; +} +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px; +} +.breadcrumb > li { + display: inline-block; +} +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0"; +} +.breadcrumb > .active { + color: #777; +} +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px; +} +.pagination > li { + display: inline; +} +.pagination > li > a, +.pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #337ab7; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; +} +.pagination > li:first-child > a, +.pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} +.pagination > li:last-child > a, +.pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + z-index: 2; + color: #23527c; + background-color: #eee; + border-color: #ddd; +} +.pagination > .active > a, +.pagination > .active > span, +.pagination > .active > a:hover, +.pagination > .active > span:hover, +.pagination > .active > a:focus, +.pagination > .active > span:focus { + z-index: 3; + color: #fff; + cursor: default; + background-color: #337ab7; + border-color: #337ab7; +} +.pagination > .disabled > span, +.pagination > .disabled > span:hover, +.pagination > .disabled > span:focus, +.pagination > .disabled > a, +.pagination > .disabled > a:hover, +.pagination > .disabled > a:focus { + color: #777; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; +} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; +} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; +} +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #eee; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #777; + cursor: not-allowed; + background-color: #fff; +} +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; +} +a.label:hover, +a.label:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.label:empty { + display: none; +} +.btn .label { + position: relative; + top: -1px; +} +.label-default { + background-color: #777; +} +.label-default[href]:hover, +.label-default[href]:focus { + background-color: #5e5e5e; +} +.label-primary { + background-color: #337ab7; +} +.label-primary[href]:hover, +.label-primary[href]:focus { + background-color: #286090; +} +.label-success { + background-color: #5cb85c; +} +.label-success[href]:hover, +.label-success[href]:focus { + background-color: #449d44; +} +.label-info { + background-color: #5bc0de; +} +.label-info[href]:hover, +.label-info[href]:focus { + background-color: #31b0d5; +} +.label-warning { + background-color: #f0ad4e; +} +.label-warning[href]:hover, +.label-warning[href]:focus { + background-color: #ec971f; +} +.label-danger { + background-color: #d9534f; +} +.label-danger[href]:hover, +.label-danger[href]:focus { + background-color: #c9302c; +} +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-color: #777; + border-radius: 10px; +} +.badge:empty { + display: none; +} +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge, +.btn-group-xs > .btn .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { + color: #fff; + text-decoration: none; + cursor: pointer; +} +.list-group-item.active > .badge, +.nav-pills > .active > a > .badge { + color: #337ab7; + background-color: #fff; +} +.list-group-item > .badge { + float: right; +} +.list-group-item > .badge + .badge { + margin-right: 5px; +} +.nav-pills > li > a > .badge { + margin-left: 3px; +} +.jumbotron { + padding-top: 30px; + padding-bottom: 30px; + margin-bottom: 30px; + color: inherit; + background-color: #eee; +} +.jumbotron h1, +.jumbotron .h1 { + color: inherit; +} +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200; +} +.jumbotron > hr { + border-top-color: #d5d5d5; +} +.container .jumbotron, +.container-fluid .jumbotron { + padding-right: 15px; + padding-left: 15px; + border-radius: 6px; +} +.jumbotron .container { + max-width: 100%; +} +@media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px; + } + .container .jumbotron, + .container-fluid .jumbotron { + padding-right: 60px; + padding-left: 60px; + } + .jumbotron h1, + .jumbotron .h1 { + font-size: 63px; + } +} +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: border .2s ease-in-out; + -o-transition: border .2s ease-in-out; + transition: border .2s ease-in-out; +} +.thumbnail > img, +.thumbnail a > img { + margin-right: auto; + margin-left: auto; +} +a.thumbnail:hover, +a.thumbnail:focus, +a.thumbnail.active { + border-color: #337ab7; +} +.thumbnail .caption { + padding: 9px; + color: #333; +} +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px; +} +.alert h4 { + margin-top: 0; + color: inherit; +} +.alert .alert-link { + font-weight: bold; +} +.alert > p, +.alert > ul { + margin-bottom: 0; +} +.alert > p + p { + margin-top: 5px; +} +.alert-dismissable, +.alert-dismissible { + padding-right: 35px; +} +.alert-dismissable .close, +.alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; +} +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.alert-success hr { + border-top-color: #c9e2b3; +} +.alert-success .alert-link { + color: #2b542c; +} +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.alert-info hr { + border-top-color: #a6e1ec; +} +.alert-info .alert-link { + color: #245269; +} +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.alert-warning hr { + border-top-color: #f7e1b5; +} +.alert-warning .alert-link { + color: #66512c; +} +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.alert-danger hr { + border-top-color: #e4b9c0; +} +.alert-danger .alert-link { + color: #843534; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #337ab7; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease; +} +.progress-striped .progress-bar, +.progress-bar-striped { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .progress-bar, +.progress-bar.active { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-bar-success { + background-color: #5cb85c; +} +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-info { + background-color: #5bc0de; +} +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-warning { + background-color: #f0ad4e; +} +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.progress-bar-danger { + background-color: #d9534f; +} +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); +} +.media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media, +.media-body { + overflow: hidden; + zoom: 1; +} +.media-body { + width: 10000px; +} +.media-object { + display: block; +} +.media-object.img-thumbnail { + max-width: none; +} +.media-right, +.media > .pull-right { + padding-left: 10px; +} +.media-left, +.media > .pull-left { + padding-right: 10px; +} +.media-left, +.media-right, +.media-body { + display: table-cell; + vertical-align: top; +} +.media-middle { + vertical-align: middle; +} +.media-bottom { + vertical-align: bottom; +} +.media-heading { + margin-top: 0; + margin-bottom: 5px; +} +.media-list { + padding-left: 0; + list-style: none; +} +.list-group { + padding-left: 0; + margin-bottom: 20px; +} +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd; +} +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; +} +a.list-group-item, +button.list-group-item { + color: #555; +} +a.list-group-item .list-group-item-heading, +button.list-group-item .list-group-item-heading { + color: #333; +} +a.list-group-item:hover, +button.list-group-item:hover, +a.list-group-item:focus, +button.list-group-item:focus { + color: #555; + text-decoration: none; + background-color: #f5f5f5; +} +button.list-group-item { + width: 100%; + text-align: left; +} +.list-group-item.disabled, +.list-group-item.disabled:hover, +.list-group-item.disabled:focus { + color: #777; + cursor: not-allowed; + background-color: #eee; +} +.list-group-item.disabled .list-group-item-heading, +.list-group-item.disabled:hover .list-group-item-heading, +.list-group-item.disabled:focus .list-group-item-heading { + color: inherit; +} +.list-group-item.disabled .list-group-item-text, +.list-group-item.disabled:hover .list-group-item-text, +.list-group-item.disabled:focus .list-group-item-text { + color: #777; +} +.list-group-item.active, +.list-group-item.active:hover, +.list-group-item.active:focus { + z-index: 2; + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.list-group-item.active .list-group-item-heading, +.list-group-item.active:hover .list-group-item-heading, +.list-group-item.active:focus .list-group-item-heading, +.list-group-item.active .list-group-item-heading > small, +.list-group-item.active:hover .list-group-item-heading > small, +.list-group-item.active:focus .list-group-item-heading > small, +.list-group-item.active .list-group-item-heading > .small, +.list-group-item.active:hover .list-group-item-heading > .small, +.list-group-item.active:focus .list-group-item-heading > .small { + color: inherit; +} +.list-group-item.active .list-group-item-text, +.list-group-item.active:hover .list-group-item-text, +.list-group-item.active:focus .list-group-item-text { + color: #c7ddef; +} +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8; +} +a.list-group-item-success, +button.list-group-item-success { + color: #3c763d; +} +a.list-group-item-success .list-group-item-heading, +button.list-group-item-success .list-group-item-heading { + color: inherit; +} +a.list-group-item-success:hover, +button.list-group-item-success:hover, +a.list-group-item-success:focus, +button.list-group-item-success:focus { + color: #3c763d; + background-color: #d0e9c6; +} +a.list-group-item-success.active, +button.list-group-item-success.active, +a.list-group-item-success.active:hover, +button.list-group-item-success.active:hover, +a.list-group-item-success.active:focus, +button.list-group-item-success.active:focus { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; +} +.list-group-item-info { + color: #31708f; + background-color: #d9edf7; +} +a.list-group-item-info, +button.list-group-item-info { + color: #31708f; +} +a.list-group-item-info .list-group-item-heading, +button.list-group-item-info .list-group-item-heading { + color: inherit; +} +a.list-group-item-info:hover, +button.list-group-item-info:hover, +a.list-group-item-info:focus, +button.list-group-item-info:focus { + color: #31708f; + background-color: #c4e3f3; +} +a.list-group-item-info.active, +button.list-group-item-info.active, +a.list-group-item-info.active:hover, +button.list-group-item-info.active:hover, +a.list-group-item-info.active:focus, +button.list-group-item-info.active:focus { + color: #fff; + background-color: #31708f; + border-color: #31708f; +} +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3; +} +a.list-group-item-warning, +button.list-group-item-warning { + color: #8a6d3b; +} +a.list-group-item-warning .list-group-item-heading, +button.list-group-item-warning .list-group-item-heading { + color: inherit; +} +a.list-group-item-warning:hover, +button.list-group-item-warning:hover, +a.list-group-item-warning:focus, +button.list-group-item-warning:focus { + color: #8a6d3b; + background-color: #faf2cc; +} +a.list-group-item-warning.active, +button.list-group-item-warning.active, +a.list-group-item-warning.active:hover, +button.list-group-item-warning.active:hover, +a.list-group-item-warning.active:focus, +button.list-group-item-warning.active:focus { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; +} +.list-group-item-danger { + color: #a94442; + background-color: #f2dede; +} +a.list-group-item-danger, +button.list-group-item-danger { + color: #a94442; +} +a.list-group-item-danger .list-group-item-heading, +button.list-group-item-danger .list-group-item-heading { + color: inherit; +} +a.list-group-item-danger:hover, +button.list-group-item-danger:hover, +a.list-group-item-danger:focus, +button.list-group-item-danger:focus { + color: #a94442; + background-color: #ebcccc; +} +a.list-group-item-danger.active, +button.list-group-item-danger.active, +a.list-group-item-danger.active:hover, +button.list-group-item-danger.active:hover, +a.list-group-item-danger.active:focus, +button.list-group-item-danger.active:focus { + color: #fff; + background-color: #a94442; + border-color: #a94442; +} +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px; +} +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3; +} +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit; +} +.panel-title > a, +.panel-title > small, +.panel-title > .small, +.panel-title > small > a, +.panel-title > .small > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-right: 15px; + padding-left: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + margin-bottom: 0; + border: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid #ddd; +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd; +} +.panel-default { + border-color: #ddd; +} +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd; +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd; +} +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd; +} +.panel-primary { + border-color: #337ab7; +} +.panel-primary > .panel-heading { + color: #fff; + background-color: #337ab7; + border-color: #337ab7; +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #337ab7; +} +.panel-primary > .panel-heading .badge { + color: #337ab7; + background-color: #fff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #337ab7; +} +.panel-success { + border-color: #d6e9c6; +} +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6; +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6; +} +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6; +} +.panel-info { + border-color: #bce8f1; +} +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1; +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1; +} +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1; +} +.panel-warning { + border-color: #faebcc; +} +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc; +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc; +} +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc; +} +.panel-danger { + border-color: #ebccd1; +} +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1; +} +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1; +} +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden; +} +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object, +.embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} +.embed-responsive-16by9 { + padding-bottom: 56.25%; +} +.embed-responsive-4by3 { + padding-bottom: 75%; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15); +} +.well-lg { + padding: 24px; + border-radius: 6px; +} +.well-sm { + padding: 9px; + border-radius: 3px; +} +.close { + float: right; + font-size: 21px; + font-weight: bold; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2; +} +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5; +} +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: transparent; + border: 0; +} +.modal-open { + overflow: hidden; +} +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: hidden; + -webkit-overflow-scrolling: touch; + outline: 0; +} +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%); +} +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0); +} +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} +.modal-dialog { + position: relative; + width: auto; + margin: 10px; +} +.modal-content { + position: relative; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: 0; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5); +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; +} +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0; +} +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5; +} +.modal-header { + padding: 15px; + border-bottom: 1px solid #e5e5e5; +} +.modal-header .close { + margin-top: -2px; +} +.modal-title { + margin: 0; + line-height: 1.42857143; +} +.modal-body { + position: relative; + padding: 15px; +} +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5; +} +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto; + } + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + } + .modal-sm { + width: 300px; + } +} +@media (min-width: 992px) { + .modal-lg { + width: 900px; + } +} +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-style: normal; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + filter: alpha(opacity=0); + opacity: 0; + + line-break: auto; +} +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9; +} +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + background-color: #000; + border-radius: 4px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-left .tooltip-arrow { + right: 5px; + bottom: 0; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-style: normal; + font-weight: normal; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + + line-break: auto; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} +.popover-content { + padding: 9px 14px; +} +.popover > .arrow, +.popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover > .arrow { + border-width: 11px; +} +.popover > .arrow:after { + content: ""; + border-width: 10px; +} +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0; +} +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0; +} +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0; +} +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0; +} +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25); +} +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff; +} +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25); +} +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff; +} +.carousel { + position: relative; +} +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + line-height: 1; +} +@media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .item { + -webkit-transition: -webkit-transform .6s ease-in-out; + -o-transition: -o-transform .6s ease-in-out; + transition: transform .6s ease-in-out; + + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000px; + perspective: 1000px; + } + .carousel-inner > .item.next, + .carousel-inner > .item.active.right { + left: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + .carousel-inner > .item.prev, + .carousel-inner > .item.active.left { + left: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + .carousel-inner > .item.next.left, + .carousel-inner > .item.prev.right, + .carousel-inner > .item.active { + left: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + background-color: rgba(0, 0, 0, 0); + filter: alpha(opacity=50); + opacity: .5; +} +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x; +} +.carousel-control:hover, +.carousel-control:focus { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: 0; + opacity: .9; +} +.carousel-control .icon-prev, +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-left, +.carousel-control .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; + margin-top: -10px; +} +.carousel-control .icon-prev, +.carousel-control .glyphicon-chevron-left { + left: 50%; + margin-left: -10px; +} +.carousel-control .icon-next, +.carousel-control .glyphicon-chevron-right { + right: 50%; + margin-right: -10px; +} +.carousel-control .icon-prev, +.carousel-control .icon-next { + width: 20px; + height: 20px; + font-family: serif; + line-height: 1; +} +.carousel-control .icon-prev:before { + content: '\2039'; +} +.carousel-control .icon-next:before { + content: '\203a'; +} +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none; +} +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px; +} +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; +} +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); +} +.carousel-caption .btn { + text-shadow: none; +} +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-prev, + .carousel-control .icon-next { + width: 30px; + height: 30px; + margin-top: -10px; + font-size: 30px; + } + .carousel-control .glyphicon-chevron-left, + .carousel-control .icon-prev { + margin-left: -10px; + } + .carousel-control .glyphicon-chevron-right, + .carousel-control .icon-next { + margin-right: -10px; + } + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px; + } + .carousel-indicators { + bottom: 20px; + } +} +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.container-fluid:before, +.container-fluid:after, +.row:before, +.row:after, +.form-horizontal .form-group:before, +.form-horizontal .form-group:after, +.btn-toolbar:before, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:before, +.btn-group-vertical > .btn-group:after, +.nav:before, +.nav:after, +.navbar:before, +.navbar:after, +.navbar-header:before, +.navbar-header:after, +.navbar-collapse:before, +.navbar-collapse:after, +.pager:before, +.pager:after, +.panel-body:before, +.panel-body:after, +.modal-header:before, +.modal-header:after, +.modal-footer:before, +.modal-footer:after { + display: table; + content: " "; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.container-fluid:after, +.row:after, +.form-horizontal .form-group:after, +.btn-toolbar:after, +.btn-group-vertical > .btn-group:after, +.nav:after, +.navbar:after, +.navbar-header:after, +.navbar-collapse:after, +.pager:after, +.panel-body:after, +.modal-header:after, +.modal-footer:after { + clear: both; +} +.center-block { + display: block; + margin-right: auto; + margin-left: auto; +} +.pull-right { + float: right !important; +} +.pull-left { + float: left !important; +} +.hide { + display: none !important; +} +.show { + display: block !important; +} +.invisible { + visibility: hidden; +} +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.hidden { + display: none !important; +} +.affix { + position: fixed; +} +@-ms-viewport { + width: device-width; +} +.visible-xs, +.visible-sm, +.visible-md, +.visible-lg { + display: none !important; +} +.visible-xs-block, +.visible-xs-inline, +.visible-xs-inline-block, +.visible-sm-block, +.visible-sm-inline, +.visible-sm-inline-block, +.visible-md-block, +.visible-md-inline, +.visible-md-inline-block, +.visible-lg-block, +.visible-lg-inline, +.visible-lg-inline-block { + display: none !important; +} +@media (max-width: 767px) { + .visible-xs { + display: block !important; + } + table.visible-xs { + display: table !important; + } + tr.visible-xs { + display: table-row !important; + } + th.visible-xs, + td.visible-xs { + display: table-cell !important; + } +} +@media (max-width: 767px) { + .visible-xs-block { + display: block !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important; + } +} +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important; + } + table.visible-sm { + display: table !important; + } + tr.visible-sm { + display: table-row !important; + } + th.visible-sm, + td.visible-sm { + display: table-cell !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important; + } + table.visible-md { + display: table !important; + } + tr.visible-md { + display: table-row !important; + } + th.visible-md, + td.visible-md { + display: table-cell !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important; + } +} +@media (min-width: 1200px) { + .visible-lg { + display: block !important; + } + table.visible-lg { + display: table !important; + } + tr.visible-lg { + display: table-row !important; + } + th.visible-lg, + td.visible-lg { + display: table-cell !important; + } +} +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important; + } +} +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important; + } +} +@media (max-width: 767px) { + .hidden-xs { + display: none !important; + } +} +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important; + } +} +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important; + } +} +@media (min-width: 1200px) { + .hidden-lg { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: block !important; + } + table.visible-print { + display: table !important; + } + tr.visible-print { + display: table-row !important; + } + th.visible-print, + td.visible-print { + display: table-cell !important; + } +} +.visible-print-block { + display: none !important; +} +@media print { + .visible-print-block { + display: block !important; + } +} +.visible-print-inline { + display: none !important; +} +@media print { + .visible-print-inline { + display: inline !important; + } +} +.visible-print-inline-block { + display: none !important; +} +@media print { + .visible-print-inline-block { + display: inline-block !important; + } +} +@media print { + .hidden-print { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap.css.map */ diff --git a/public/ext/candy/libs.bundle.js b/public/ext/candy/libs.bundle.js new file mode 100755 index 0000000..bb56778 --- /dev/null +++ b/public/ext/candy/libs.bundle.js @@ -0,0 +1,6782 @@ +// This code was written by Tyler Akins and has been placed in the +// public domain. It would be nice if you left this header intact. +// Base64 code from Tyler Akins -- http://rumkin.com +var Base64 = function() { + var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + var obj = { + /** + * Encodes a string in base64 + * @param {String} input The string to encode in base64. + */ + encode: function(input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + do { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + enc1 = chr1 >> 2; + enc2 = (chr1 & 3) << 4 | chr2 >> 4; + enc3 = (chr2 & 15) << 2 | chr3 >> 6; + enc4 = chr3 & 63; + if (isNaN(chr2)) { + enc3 = enc4 = 64; + } else if (isNaN(chr3)) { + enc4 = 64; + } + output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4); + } while (i < input.length); + return output; + }, + /** + * Decodes a base64 string. + * @param {String} input The string to decode. + */ + decode: function(input) { + var output = ""; + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0; + // remove all characters that are not A-Z, a-z, 0-9, +, /, or = + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + do { + enc1 = keyStr.indexOf(input.charAt(i++)); + enc2 = keyStr.indexOf(input.charAt(i++)); + enc3 = keyStr.indexOf(input.charAt(i++)); + enc4 = keyStr.indexOf(input.charAt(i++)); + chr1 = enc1 << 2 | enc2 >> 4; + chr2 = (enc2 & 15) << 4 | enc3 >> 2; + chr3 = (enc3 & 3) << 6 | enc4; + output = output + String.fromCharCode(chr1); + if (enc3 != 64) { + output = output + String.fromCharCode(chr2); + } + if (enc4 != 64) { + output = output + String.fromCharCode(chr3); + } + } while (i < input.length); + return output; + } + }; + return obj; +}(); + +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS PUB 180-1 + * Version 2.1a Copyright Paul Johnston 2000 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ +/* Some functions and variables have been stripped for use with Strophe */ +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function b64_sha1(s) { + return binb2b64(core_sha1(str2binb(s), s.length * 8)); +} + +function str_sha1(s) { + return binb2str(core_sha1(str2binb(s), s.length * 8)); +} + +function b64_hmac_sha1(key, data) { + return binb2b64(core_hmac_sha1(key, data)); +} + +function str_hmac_sha1(key, data) { + return binb2str(core_hmac_sha1(key, data)); +} + +/* + * Calculate the SHA-1 of an array of big-endian words, and a bit length + */ +function core_sha1(x, len) { + /* append padding */ + x[len >> 5] |= 128 << 24 - len % 32; + x[(len + 64 >> 9 << 4) + 15] = len; + var w = new Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + var i, j, t, olda, oldb, oldc, oldd, olde; + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + olde = e; + for (j = 0; j < 80; j++) { + if (j < 16) { + w[j] = x[i + j]; + } else { + w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); + } + t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j))); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + e = safe_add(e, olde); + } + return [ a, b, c, d, e ]; +} + +/* + * Perform the appropriate triplet combination function for the current + * iteration + */ +function sha1_ft(t, b, c, d) { + if (t < 20) { + return b & c | ~b & d; + } + if (t < 40) { + return b ^ c ^ d; + } + if (t < 60) { + return b & c | b & d | c & d; + } + return b ^ c ^ d; +} + +/* + * Determine the appropriate additive constant for the current iteration + */ +function sha1_kt(t) { + return t < 20 ? 1518500249 : t < 40 ? 1859775393 : t < 60 ? -1894007588 : -899497514; +} + +/* + * Calculate the HMAC-SHA1 of a key and some data + */ +function core_hmac_sha1(key, data) { + var bkey = str2binb(key); + if (bkey.length > 16) { + bkey = core_sha1(bkey, key.length * 8); + } + var ipad = new Array(16), opad = new Array(16); + for (var i = 0; i < 16; i++) { + ipad[i] = bkey[i] ^ 909522486; + opad[i] = bkey[i] ^ 1549556828; + } + var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * 8); + return core_sha1(opad.concat(hash), 512 + 160); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) { + var lsw = (x & 65535) + (y & 65535); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 65535; +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function rol(num, cnt) { + return num << cnt | num >>> 32 - cnt; +} + +/* + * Convert an 8-bit or 16-bit string to an array of big-endian words + * In 8-bit function, characters >255 have their hi-byte silently ignored. + */ +function str2binb(str) { + var bin = []; + var mask = 255; + for (var i = 0; i < str.length * 8; i += 8) { + bin[i >> 5] |= (str.charCodeAt(i / 8) & mask) << 24 - i % 32; + } + return bin; +} + +/* + * Convert an array of big-endian words to a string + */ +function binb2str(bin) { + var str = ""; + var mask = 255; + for (var i = 0; i < bin.length * 32; i += 8) { + str += String.fromCharCode(bin[i >> 5] >>> 24 - i % 32 & mask); + } + return str; +} + +/* + * Convert an array of big-endian words to a base-64 string + */ +function binb2b64(binarray) { + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + var triplet, j; + for (var i = 0; i < binarray.length * 4; i += 3) { + triplet = (binarray[i >> 2] >> 8 * (3 - i % 4) & 255) << 16 | (binarray[i + 1 >> 2] >> 8 * (3 - (i + 1) % 4) & 255) << 8 | binarray[i + 2 >> 2] >> 8 * (3 - (i + 2) % 4) & 255; + for (j = 0; j < 4; j++) { + if (i * 8 + j * 6 > binarray.length * 32) { + str += "="; + } else { + str += tab.charAt(triplet >> 6 * (3 - j) & 63); + } + } + } + return str; +} + +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ +/* + * Everything that isn't used by Strophe has been stripped here! + */ +var MD5 = function() { + /* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ + var safe_add = function(x, y) { + var lsw = (x & 65535) + (y & 65535); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 65535; + }; + /* + * Bitwise rotate a 32-bit number to the left. + */ + var bit_rol = function(num, cnt) { + return num << cnt | num >>> 32 - cnt; + }; + /* + * Convert a string to an array of little-endian words + */ + var str2binl = function(str) { + var bin = []; + for (var i = 0; i < str.length * 8; i += 8) { + bin[i >> 5] |= (str.charCodeAt(i / 8) & 255) << i % 32; + } + return bin; + }; + /* + * Convert an array of little-endian words to a string + */ + var binl2str = function(bin) { + var str = ""; + for (var i = 0; i < bin.length * 32; i += 8) { + str += String.fromCharCode(bin[i >> 5] >>> i % 32 & 255); + } + return str; + }; + /* + * Convert an array of little-endian words to a hex string. + */ + var binl2hex = function(binarray) { + var hex_tab = "0123456789abcdef"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i++) { + str += hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 + 4 & 15) + hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 & 15); + } + return str; + }; + /* + * These functions implement the four basic operations the algorithm uses. + */ + var md5_cmn = function(q, a, b, x, s, t) { + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b); + }; + var md5_ff = function(a, b, c, d, x, s, t) { + return md5_cmn(b & c | ~b & d, a, b, x, s, t); + }; + var md5_gg = function(a, b, c, d, x, s, t) { + return md5_cmn(b & d | c & ~d, a, b, x, s, t); + }; + var md5_hh = function(a, b, c, d, x, s, t) { + return md5_cmn(b ^ c ^ d, a, b, x, s, t); + }; + var md5_ii = function(a, b, c, d, x, s, t) { + return md5_cmn(c ^ (b | ~d), a, b, x, s, t); + }; + /* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ + var core_md5 = function(x, len) { + /* append padding */ + x[len >> 5] |= 128 << len % 32; + x[(len + 64 >>> 9 << 4) + 14] = len; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var olda, oldb, oldc, oldd; + for (var i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936); + d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = md5_hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651); + a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844); + d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551); + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return [ a, b, c, d ]; + }; + var obj = { + /* + * These are the functions you'll usually want to call. + * They take string arguments and return either hex or base-64 encoded + * strings. + */ + hexdigest: function(s) { + return binl2hex(core_md5(str2binl(s), s.length * 8)); + }, + hash: function(s) { + return binl2str(core_md5(str2binl(s), s.length * 8)); + } + }; + return obj; +}(); + +/* + This program is distributed under the terms of the MIT license. + Please see the LICENSE file for details. + + Copyright 2006-2008, OGG, LLC +*/ +/* jshint undef: true, unused: true:, noarg: true, latedef: true */ +/*global document, window, setTimeout, clearTimeout, console, + ActiveXObject, Base64, MD5, DOMParser */ +// from sha1.js +/*global core_hmac_sha1, binb2str, str_hmac_sha1, str_sha1, b64_hmac_sha1*/ +/** File: strophe.js + * A JavaScript library for XMPP BOSH/XMPP over Websocket. + * + * This is the JavaScript version of the Strophe library. Since JavaScript + * had no facilities for persistent TCP connections, this library uses + * Bidirectional-streams Over Synchronous HTTP (BOSH) to emulate + * a persistent, stateful, two-way connection to an XMPP server. More + * information on BOSH can be found in XEP 124. + * + * This version of Strophe also works with WebSockets. + * For more information on XMPP-over WebSocket see this RFC draft: + * http://tools.ietf.org/html/draft-ietf-xmpp-websocket-00 + */ +/** PrivateFunction: Function.prototype.bind + * Bind a function to an instance. + * + * This Function object extension method creates a bound method similar + * to those in Python. This means that the 'this' object will point + * to the instance you want. See + * MDC's bind() documentation and + * Bound Functions and Function Imports in JavaScript + * for a complete explanation. + * + * This extension already exists in some browsers (namely, Firefox 3), but + * we provide it to support those that don't. + * + * Parameters: + * (Object) obj - The object that will become 'this' in the bound function. + * (Object) argN - An option argument that will be prepended to the + * arguments given for the function call + * + * Returns: + * The bound function. + */ +if (!Function.prototype.bind) { + Function.prototype.bind = function(obj) { + var func = this; + var _slice = Array.prototype.slice; + var _concat = Array.prototype.concat; + var _args = _slice.call(arguments, 1); + return function() { + return func.apply(obj ? obj : this, _concat.call(_args, _slice.call(arguments, 0))); + }; + }; +} + +/** PrivateFunction: Array.prototype.indexOf + * Return the index of an object in an array. + * + * This function is not supplied by some JavaScript implementations, so + * we provide it if it is missing. This code is from: + * http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference:Objects:Array:indexOf + * + * Parameters: + * (Object) elt - The object to look for. + * (Integer) from - The index from which to start looking. (optional). + * + * Returns: + * The index of elt in the array or -1 if not found. + */ +if (!Array.prototype.indexOf) { + Array.prototype.indexOf = function(elt) { + var len = this.length; + var from = Number(arguments[1]) || 0; + from = from < 0 ? Math.ceil(from) : Math.floor(from); + if (from < 0) { + from += len; + } + for (;from < len; from++) { + if (from in this && this[from] === elt) { + return from; + } + } + return -1; + }; +} + +/* All of the Strophe globals are defined in this special function below so + * that references to the globals become closures. This will ensure that + * on page reload, these references will still be available to callbacks + * that are still executing. + */ +(function(callback) { + var Strophe; + /** Function: $build + * Create a Strophe.Builder. + * This is an alias for 'new Strophe.Builder(name, attrs)'. + * + * Parameters: + * (String) name - The root element name. + * (Object) attrs - The attributes for the root element in object notation. + * + * Returns: + * A new Strophe.Builder object. + */ + function $build(name, attrs) { + return new Strophe.Builder(name, attrs); + } + /** Function: $msg + * Create a Strophe.Builder with a element as the root. + * + * Parmaeters: + * (Object) attrs - The element attributes in object notation. + * + * Returns: + * A new Strophe.Builder object. + */ + function $msg(attrs) { + return new Strophe.Builder("message", attrs); + } + /** Function: $iq + * Create a Strophe.Builder with an element as the root. + * + * Parameters: + * (Object) attrs - The element attributes in object notation. + * + * Returns: + * A new Strophe.Builder object. + */ + function $iq(attrs) { + return new Strophe.Builder("iq", attrs); + } + /** Function: $pres + * Create a Strophe.Builder with a element as the root. + * + * Parameters: + * (Object) attrs - The element attributes in object notation. + * + * Returns: + * A new Strophe.Builder object. + */ + function $pres(attrs) { + return new Strophe.Builder("presence", attrs); + } + /** Class: Strophe + * An object container for all Strophe library functions. + * + * This class is just a container for all the objects and constants + * used in the library. It is not meant to be instantiated, but to + * provide a namespace for library objects, constants, and functions. + */ + Strophe = { + /** Constant: VERSION + * The version of the Strophe library. Unreleased builds will have + * a version of head-HASH where HASH is a partial revision. + */ + VERSION: "1.1.3", + /** Constants: XMPP Namespace Constants + * Common namespace constants from the XMPP RFCs and XEPs. + * + * NS.HTTPBIND - HTTP BIND namespace from XEP 124. + * NS.BOSH - BOSH namespace from XEP 206. + * NS.CLIENT - Main XMPP client namespace. + * NS.AUTH - Legacy authentication namespace. + * NS.ROSTER - Roster operations namespace. + * NS.PROFILE - Profile namespace. + * NS.DISCO_INFO - Service discovery info namespace from XEP 30. + * NS.DISCO_ITEMS - Service discovery items namespace from XEP 30. + * NS.MUC - Multi-User Chat namespace from XEP 45. + * NS.SASL - XMPP SASL namespace from RFC 3920. + * NS.STREAM - XMPP Streams namespace from RFC 3920. + * NS.BIND - XMPP Binding namespace from RFC 3920. + * NS.SESSION - XMPP Session namespace from RFC 3920. + * NS.XHTML_IM - XHTML-IM namespace from XEP 71. + * NS.XHTML - XHTML body namespace from XEP 71. + */ + NS: { + HTTPBIND: "http://jabber.org/protocol/httpbind", + BOSH: "urn:xmpp:xbosh", + CLIENT: "jabber:client", + AUTH: "jabber:iq:auth", + ROSTER: "jabber:iq:roster", + PROFILE: "jabber:iq:profile", + DISCO_INFO: "http://jabber.org/protocol/disco#info", + DISCO_ITEMS: "http://jabber.org/protocol/disco#items", + MUC: "http://jabber.org/protocol/muc", + SASL: "urn:ietf:params:xml:ns:xmpp-sasl", + STREAM: "http://etherx.jabber.org/streams", + BIND: "urn:ietf:params:xml:ns:xmpp-bind", + SESSION: "urn:ietf:params:xml:ns:xmpp-session", + VERSION: "jabber:iq:version", + STANZAS: "urn:ietf:params:xml:ns:xmpp-stanzas", + XHTML_IM: "http://jabber.org/protocol/xhtml-im", + XHTML: "http://www.w3.org/1999/xhtml" + }, + /** Constants: XHTML_IM Namespace + * contains allowed tags, tag attributes, and css properties. + * Used in the createHtml function to filter incoming html into the allowed XHTML-IM subset. + * See http://xmpp.org/extensions/xep-0071.html#profile-summary for the list of recommended + * allowed tags and their attributes. + */ + XHTML: { + tags: [ "a", "blockquote", "br", "cite", "em", "img", "li", "ol", "p", "span", "strong", "ul", "body" ], + attributes: { + a: [ "href" ], + blockquote: [ "style" ], + br: [], + cite: [ "style" ], + em: [], + img: [ "src", "alt", "style", "height", "width" ], + li: [ "style" ], + ol: [ "style" ], + p: [ "style" ], + span: [ "style" ], + strong: [], + ul: [ "style" ], + body: [] + }, + css: [ "background-color", "color", "font-family", "font-size", "font-style", "font-weight", "margin-left", "margin-right", "text-align", "text-decoration" ], + validTag: function(tag) { + for (var i = 0; i < Strophe.XHTML.tags.length; i++) { + if (tag == Strophe.XHTML.tags[i]) { + return true; + } + } + return false; + }, + validAttribute: function(tag, attribute) { + if (typeof Strophe.XHTML.attributes[tag] !== "undefined" && Strophe.XHTML.attributes[tag].length > 0) { + for (var i = 0; i < Strophe.XHTML.attributes[tag].length; i++) { + if (attribute == Strophe.XHTML.attributes[tag][i]) { + return true; + } + } + } + return false; + }, + validCSS: function(style) { + for (var i = 0; i < Strophe.XHTML.css.length; i++) { + if (style == Strophe.XHTML.css[i]) { + return true; + } + } + return false; + } + }, + /** Constants: Connection Status Constants + * Connection status constants for use by the connection handler + * callback. + * + * Status.ERROR - An error has occurred + * Status.CONNECTING - The connection is currently being made + * Status.CONNFAIL - The connection attempt failed + * Status.AUTHENTICATING - The connection is authenticating + * Status.AUTHFAIL - The authentication attempt failed + * Status.CONNECTED - The connection has succeeded + * Status.DISCONNECTED - The connection has been terminated + * Status.DISCONNECTING - The connection is currently being terminated + * Status.ATTACHED - The connection has been attached + */ + Status: { + ERROR: 0, + CONNECTING: 1, + CONNFAIL: 2, + AUTHENTICATING: 3, + AUTHFAIL: 4, + CONNECTED: 5, + DISCONNECTED: 6, + DISCONNECTING: 7, + ATTACHED: 8 + }, + /** Constants: Log Level Constants + * Logging level indicators. + * + * LogLevel.DEBUG - Debug output + * LogLevel.INFO - Informational output + * LogLevel.WARN - Warnings + * LogLevel.ERROR - Errors + * LogLevel.FATAL - Fatal errors + */ + LogLevel: { + DEBUG: 0, + INFO: 1, + WARN: 2, + ERROR: 3, + FATAL: 4 + }, + /** PrivateConstants: DOM Element Type Constants + * DOM element types. + * + * ElementType.NORMAL - Normal element. + * ElementType.TEXT - Text data element. + * ElementType.FRAGMENT - XHTML fragment element. + */ + ElementType: { + NORMAL: 1, + TEXT: 3, + CDATA: 4, + FRAGMENT: 11 + }, + /** PrivateConstants: Timeout Values + * Timeout values for error states. These values are in seconds. + * These should not be changed unless you know exactly what you are + * doing. + * + * TIMEOUT - Timeout multiplier. A waiting request will be considered + * failed after Math.floor(TIMEOUT * wait) seconds have elapsed. + * This defaults to 1.1, and with default wait, 66 seconds. + * SECONDARY_TIMEOUT - Secondary timeout multiplier. In cases where + * Strophe can detect early failure, it will consider the request + * failed if it doesn't return after + * Math.floor(SECONDARY_TIMEOUT * wait) seconds have elapsed. + * This defaults to 0.1, and with default wait, 6 seconds. + */ + TIMEOUT: 1.1, + SECONDARY_TIMEOUT: .1, + /** Function: addNamespace + * This function is used to extend the current namespaces in + * Strophe.NS. It takes a key and a value with the key being the + * name of the new namespace, with its actual value. + * For example: + * Strophe.addNamespace('PUBSUB', "http://jabber.org/protocol/pubsub"); + * + * Parameters: + * (String) name - The name under which the namespace will be + * referenced under Strophe.NS + * (String) value - The actual namespace. + */ + addNamespace: function(name, value) { + Strophe.NS[name] = value; + }, + /** Function: forEachChild + * Map a function over some or all child elements of a given element. + * + * This is a small convenience function for mapping a function over + * some or all of the children of an element. If elemName is null, all + * children will be passed to the function, otherwise only children + * whose tag names match elemName will be passed. + * + * Parameters: + * (XMLElement) elem - The element to operate on. + * (String) elemName - The child element tag name filter. + * (Function) func - The function to apply to each child. This + * function should take a single argument, a DOM element. + */ + forEachChild: function(elem, elemName, func) { + var i, childNode; + for (i = 0; i < elem.childNodes.length; i++) { + childNode = elem.childNodes[i]; + if (childNode.nodeType == Strophe.ElementType.NORMAL && (!elemName || this.isTagEqual(childNode, elemName))) { + func(childNode); + } + } + }, + /** Function: isTagEqual + * Compare an element's tag name with a string. + * + * This function is case insensitive. + * + * Parameters: + * (XMLElement) el - A DOM element. + * (String) name - The element name. + * + * Returns: + * true if the element's tag name matches _el_, and false + * otherwise. + */ + isTagEqual: function(el, name) { + return el.tagName.toLowerCase() == name.toLowerCase(); + }, + /** PrivateVariable: _xmlGenerator + * _Private_ variable that caches a DOM document to + * generate elements. + */ + _xmlGenerator: null, + /** PrivateFunction: _makeGenerator + * _Private_ function that creates a dummy XML DOM document to serve as + * an element and text node generator. + */ + _makeGenerator: function() { + var doc; + // IE9 does implement createDocument(); however, using it will cause the browser to leak memory on page unload. + // Here, we test for presence of createDocument() plus IE's proprietary documentMode attribute, which would be + // less than 10 in the case of IE9 and below. + if (document.implementation.createDocument === undefined || document.implementation.createDocument && document.documentMode && document.documentMode < 10) { + doc = this._getIEXmlDom(); + doc.appendChild(doc.createElement("strophe")); + } else { + doc = document.implementation.createDocument("jabber:client", "strophe", null); + } + return doc; + }, + /** Function: xmlGenerator + * Get the DOM document to generate elements. + * + * Returns: + * The currently used DOM document. + */ + xmlGenerator: function() { + if (!Strophe._xmlGenerator) { + Strophe._xmlGenerator = Strophe._makeGenerator(); + } + return Strophe._xmlGenerator; + }, + /** PrivateFunction: _getIEXmlDom + * Gets IE xml doc object + * + * Returns: + * A Microsoft XML DOM Object + * See Also: + * http://msdn.microsoft.com/en-us/library/ms757837%28VS.85%29.aspx + */ + _getIEXmlDom: function() { + var doc = null; + var docStrings = [ "Msxml2.DOMDocument.6.0", "Msxml2.DOMDocument.5.0", "Msxml2.DOMDocument.4.0", "MSXML2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM" ]; + for (var d = 0; d < docStrings.length; d++) { + if (doc === null) { + try { + doc = new ActiveXObject(docStrings[d]); + } catch (e) { + doc = null; + } + } else { + break; + } + } + return doc; + }, + /** Function: xmlElement + * Create an XML DOM element. + * + * This function creates an XML DOM element correctly across all + * implementations. Note that these are not HTML DOM elements, which + * aren't appropriate for XMPP stanzas. + * + * Parameters: + * (String) name - The name for the element. + * (Array|Object) attrs - An optional array or object containing + * key/value pairs to use as element attributes. The object should + * be in the format {'key': 'value'} or {key: 'value'}. The array + * should have the format [['key1', 'value1'], ['key2', 'value2']]. + * (String) text - The text child data for the element. + * + * Returns: + * A new XML DOM element. + */ + xmlElement: function(name) { + if (!name) { + return null; + } + var node = Strophe.xmlGenerator().createElement(name); + // FIXME: this should throw errors if args are the wrong type or + // there are more than two optional args + var a, i, k; + for (a = 1; a < arguments.length; a++) { + if (!arguments[a]) { + continue; + } + if (typeof arguments[a] == "string" || typeof arguments[a] == "number") { + node.appendChild(Strophe.xmlTextNode(arguments[a])); + } else if (typeof arguments[a] == "object" && typeof arguments[a].sort == "function") { + for (i = 0; i < arguments[a].length; i++) { + if (typeof arguments[a][i] == "object" && typeof arguments[a][i].sort == "function") { + node.setAttribute(arguments[a][i][0], arguments[a][i][1]); + } + } + } else if (typeof arguments[a] == "object") { + for (k in arguments[a]) { + if (arguments[a].hasOwnProperty(k)) { + node.setAttribute(k, arguments[a][k]); + } + } + } + } + return node; + }, + /* Function: xmlescape + * Excapes invalid xml characters. + * + * Parameters: + * (String) text - text to escape. + * + * Returns: + * Escaped text. + */ + xmlescape: function(text) { + text = text.replace(/\&/g, "&"); + text = text.replace(//g, ">"); + text = text.replace(/'/g, "'"); + text = text.replace(/"/g, """); + return text; + }, + /** Function: xmlTextNode + * Creates an XML DOM text node. + * + * Provides a cross implementation version of document.createTextNode. + * + * Parameters: + * (String) text - The content of the text node. + * + * Returns: + * A new XML DOM text node. + */ + xmlTextNode: function(text) { + return Strophe.xmlGenerator().createTextNode(text); + }, + /** Function: xmlHtmlNode + * Creates an XML DOM html node. + * + * Parameters: + * (String) html - The content of the html node. + * + * Returns: + * A new XML DOM text node. + */ + xmlHtmlNode: function(html) { + var node; + //ensure text is escaped + if (window.DOMParser) { + var parser = new DOMParser(); + node = parser.parseFromString(html, "text/xml"); + } else { + node = new ActiveXObject("Microsoft.XMLDOM"); + node.async = "false"; + node.loadXML(html); + } + return node; + }, + /** Function: getText + * Get the concatenation of all text children of an element. + * + * Parameters: + * (XMLElement) elem - A DOM element. + * + * Returns: + * A String with the concatenated text of all text element children. + */ + getText: function(elem) { + if (!elem) { + return null; + } + var str = ""; + if (elem.childNodes.length === 0 && elem.nodeType == Strophe.ElementType.TEXT) { + str += elem.nodeValue; + } + for (var i = 0; i < elem.childNodes.length; i++) { + if (elem.childNodes[i].nodeType == Strophe.ElementType.TEXT) { + str += elem.childNodes[i].nodeValue; + } + } + return Strophe.xmlescape(str); + }, + /** Function: copyElement + * Copy an XML DOM element. + * + * This function copies a DOM element and all its descendants and returns + * the new copy. + * + * Parameters: + * (XMLElement) elem - A DOM element. + * + * Returns: + * A new, copied DOM element tree. + */ + copyElement: function(elem) { + var i, el; + if (elem.nodeType == Strophe.ElementType.NORMAL) { + el = Strophe.xmlElement(elem.tagName); + for (i = 0; i < elem.attributes.length; i++) { + el.setAttribute(elem.attributes[i].nodeName.toLowerCase(), elem.attributes[i].value); + } + for (i = 0; i < elem.childNodes.length; i++) { + el.appendChild(Strophe.copyElement(elem.childNodes[i])); + } + } else if (elem.nodeType == Strophe.ElementType.TEXT) { + el = Strophe.xmlGenerator().createTextNode(elem.nodeValue); + } + return el; + }, + /** Function: createHtml + * Copy an HTML DOM element into an XML DOM. + * + * This function copies a DOM element and all its descendants and returns + * the new copy. + * + * Parameters: + * (HTMLElement) elem - A DOM element. + * + * Returns: + * A new, copied DOM element tree. + */ + createHtml: function(elem) { + var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue; + if (elem.nodeType == Strophe.ElementType.NORMAL) { + tag = elem.nodeName.toLowerCase(); + if (Strophe.XHTML.validTag(tag)) { + try { + el = Strophe.xmlElement(tag); + for (i = 0; i < Strophe.XHTML.attributes[tag].length; i++) { + attribute = Strophe.XHTML.attributes[tag][i]; + value = elem.getAttribute(attribute); + if (typeof value == "undefined" || value === null || value === "" || value === false || value === 0) { + continue; + } + if (attribute == "style" && typeof value == "object") { + if (typeof value.cssText != "undefined") { + value = value.cssText; + } + } + // filter out invalid css styles + if (attribute == "style") { + css = []; + cssAttrs = value.split(";"); + for (j = 0; j < cssAttrs.length; j++) { + attr = cssAttrs[j].split(":"); + cssName = attr[0].replace(/^\s*/, "").replace(/\s*$/, "").toLowerCase(); + if (Strophe.XHTML.validCSS(cssName)) { + cssValue = attr[1].replace(/^\s*/, "").replace(/\s*$/, ""); + css.push(cssName + ": " + cssValue); + } + } + if (css.length > 0) { + value = css.join("; "); + el.setAttribute(attribute, value); + } + } else { + el.setAttribute(attribute, value); + } + } + for (i = 0; i < elem.childNodes.length; i++) { + el.appendChild(Strophe.createHtml(elem.childNodes[i])); + } + } catch (e) { + // invalid elements + el = Strophe.xmlTextNode(""); + } + } else { + el = Strophe.xmlGenerator().createDocumentFragment(); + for (i = 0; i < elem.childNodes.length; i++) { + el.appendChild(Strophe.createHtml(elem.childNodes[i])); + } + } + } else if (elem.nodeType == Strophe.ElementType.FRAGMENT) { + el = Strophe.xmlGenerator().createDocumentFragment(); + for (i = 0; i < elem.childNodes.length; i++) { + el.appendChild(Strophe.createHtml(elem.childNodes[i])); + } + } else if (elem.nodeType == Strophe.ElementType.TEXT) { + el = Strophe.xmlTextNode(elem.nodeValue); + } + return el; + }, + /** Function: escapeNode + * Escape the node part (also called local part) of a JID. + * + * Parameters: + * (String) node - A node (or local part). + * + * Returns: + * An escaped node (or local part). + */ + escapeNode: function(node) { + return node.replace(/^\s+|\s+$/g, "").replace(/\\/g, "\\5c").replace(/ /g, "\\20").replace(/\"/g, "\\22").replace(/\&/g, "\\26").replace(/\'/g, "\\27").replace(/\//g, "\\2f").replace(/:/g, "\\3a").replace(//g, "\\3e").replace(/@/g, "\\40"); + }, + /** Function: unescapeNode + * Unescape a node part (also called local part) of a JID. + * + * Parameters: + * (String) node - A node (or local part). + * + * Returns: + * An unescaped node (or local part). + */ + unescapeNode: function(node) { + return node.replace(/\\20/g, " ").replace(/\\22/g, '"').replace(/\\26/g, "&").replace(/\\27/g, "'").replace(/\\2f/g, "/").replace(/\\3a/g, ":").replace(/\\3c/g, "<").replace(/\\3e/g, ">").replace(/\\40/g, "@").replace(/\\5c/g, "\\"); + }, + /** Function: getNodeFromJid + * Get the node portion of a JID String. + * + * Parameters: + * (String) jid - A JID. + * + * Returns: + * A String containing the node. + */ + getNodeFromJid: function(jid) { + if (jid.indexOf("@") < 0) { + return null; + } + return jid.split("@")[0]; + }, + /** Function: getDomainFromJid + * Get the domain portion of a JID String. + * + * Parameters: + * (String) jid - A JID. + * + * Returns: + * A String containing the domain. + */ + getDomainFromJid: function(jid) { + var bare = Strophe.getBareJidFromJid(jid); + if (bare.indexOf("@") < 0) { + return bare; + } else { + var parts = bare.split("@"); + parts.splice(0, 1); + return parts.join("@"); + } + }, + /** Function: getResourceFromJid + * Get the resource portion of a JID String. + * + * Parameters: + * (String) jid - A JID. + * + * Returns: + * A String containing the resource. + */ + getResourceFromJid: function(jid) { + var s = jid.split("/"); + if (s.length < 2) { + return null; + } + s.splice(0, 1); + return s.join("/"); + }, + /** Function: getBareJidFromJid + * Get the bare JID from a JID String. + * + * Parameters: + * (String) jid - A JID. + * + * Returns: + * A String containing the bare JID. + */ + getBareJidFromJid: function(jid) { + return jid ? jid.split("/")[0] : null; + }, + /** Function: log + * User overrideable logging function. + * + * This function is called whenever the Strophe library calls any + * of the logging functions. The default implementation of this + * function does nothing. If client code wishes to handle the logging + * messages, it should override this with + * > Strophe.log = function (level, msg) { + * > (user code here) + * > }; + * + * Please note that data sent and received over the wire is logged + * via Strophe.Connection.rawInput() and Strophe.Connection.rawOutput(). + * + * The different levels and their meanings are + * + * DEBUG - Messages useful for debugging purposes. + * INFO - Informational messages. This is mostly information like + * 'disconnect was called' or 'SASL auth succeeded'. + * WARN - Warnings about potential problems. This is mostly used + * to report transient connection errors like request timeouts. + * ERROR - Some error occurred. + * FATAL - A non-recoverable fatal error occurred. + * + * Parameters: + * (Integer) level - The log level of the log message. This will + * be one of the values in Strophe.LogLevel. + * (String) msg - The log message. + */ + /* jshint ignore:start */ + log: function(level, msg) { + return; + }, + /* jshint ignore:end */ + /** Function: debug + * Log a message at the Strophe.LogLevel.DEBUG level. + * + * Parameters: + * (String) msg - The log message. + */ + debug: function(msg) { + this.log(this.LogLevel.DEBUG, msg); + }, + /** Function: info + * Log a message at the Strophe.LogLevel.INFO level. + * + * Parameters: + * (String) msg - The log message. + */ + info: function(msg) { + this.log(this.LogLevel.INFO, msg); + }, + /** Function: warn + * Log a message at the Strophe.LogLevel.WARN level. + * + * Parameters: + * (String) msg - The log message. + */ + warn: function(msg) { + this.log(this.LogLevel.WARN, msg); + }, + /** Function: error + * Log a message at the Strophe.LogLevel.ERROR level. + * + * Parameters: + * (String) msg - The log message. + */ + error: function(msg) { + this.log(this.LogLevel.ERROR, msg); + }, + /** Function: fatal + * Log a message at the Strophe.LogLevel.FATAL level. + * + * Parameters: + * (String) msg - The log message. + */ + fatal: function(msg) { + this.log(this.LogLevel.FATAL, msg); + }, + /** Function: serialize + * Render a DOM element and all descendants to a String. + * + * Parameters: + * (XMLElement) elem - A DOM element. + * + * Returns: + * The serialized element tree as a String. + */ + serialize: function(elem) { + var result; + if (!elem) { + return null; + } + if (typeof elem.tree === "function") { + elem = elem.tree(); + } + var nodeName = elem.nodeName; + var i, child; + if (elem.getAttribute("_realname")) { + nodeName = elem.getAttribute("_realname"); + } + result = "<" + nodeName; + for (i = 0; i < elem.attributes.length; i++) { + if (elem.attributes[i].nodeName != "_realname") { + result += " " + elem.attributes[i].nodeName.toLowerCase() + "='" + elem.attributes[i].value.replace(/&/g, "&").replace(/\'/g, "'").replace(/>/g, ">").replace(/ 0) { + result += ">"; + for (i = 0; i < elem.childNodes.length; i++) { + child = elem.childNodes[i]; + switch (child.nodeType) { + case Strophe.ElementType.NORMAL: + // normal element, so recurse + result += Strophe.serialize(child); + break; + + case Strophe.ElementType.TEXT: + // text element to escape values + result += Strophe.xmlescape(child.nodeValue); + break; + + case Strophe.ElementType.CDATA: + // cdata section so don't escape values + result += ""; + } + } + result += ""; + } else { + result += "/>"; + } + return result; + }, + /** PrivateVariable: _requestId + * _Private_ variable that keeps track of the request ids for + * connections. + */ + _requestId: 0, + /** PrivateVariable: Strophe.connectionPlugins + * _Private_ variable Used to store plugin names that need + * initialization on Strophe.Connection construction. + */ + _connectionPlugins: {}, + /** Function: addConnectionPlugin + * Extends the Strophe.Connection object with the given plugin. + * + * Parameters: + * (String) name - The name of the extension. + * (Object) ptype - The plugin's prototype. + */ + addConnectionPlugin: function(name, ptype) { + Strophe._connectionPlugins[name] = ptype; + } + }; + /** Class: Strophe.Builder + * XML DOM builder. + * + * This object provides an interface similar to JQuery but for building + * DOM element easily and rapidly. All the functions except for toString() + * and tree() return the object, so calls can be chained. Here's an + * example using the $iq() builder helper. + * > $iq({to: 'you', from: 'me', type: 'get', id: '1'}) + * > .c('query', {xmlns: 'strophe:example'}) + * > .c('example') + * > .toString() + * The above generates this XML fragment + * > + * > + * > + * > + * > + * The corresponding DOM manipulations to get a similar fragment would be + * a lot more tedious and probably involve several helper variables. + * + * Since adding children makes new operations operate on the child, up() + * is provided to traverse up the tree. To add two children, do + * > builder.c('child1', ...).up().c('child2', ...) + * The next operation on the Builder will be relative to the second child. + */ + /** Constructor: Strophe.Builder + * Create a Strophe.Builder object. + * + * The attributes should be passed in object notation. For example + * > var b = new Builder('message', {to: 'you', from: 'me'}); + * or + * > var b = new Builder('messsage', {'xml:lang': 'en'}); + * + * Parameters: + * (String) name - The name of the root element. + * (Object) attrs - The attributes for the root element in object notation. + * + * Returns: + * A new Strophe.Builder. + */ + Strophe.Builder = function(name, attrs) { + // Set correct namespace for jabber:client elements + if (name == "presence" || name == "message" || name == "iq") { + if (attrs && !attrs.xmlns) { + attrs.xmlns = Strophe.NS.CLIENT; + } else if (!attrs) { + attrs = { + xmlns: Strophe.NS.CLIENT + }; + } + } + // Holds the tree being built. + this.nodeTree = Strophe.xmlElement(name, attrs); + // Points to the current operation node. + this.node = this.nodeTree; + }; + Strophe.Builder.prototype = { + /** Function: tree + * Return the DOM tree. + * + * This function returns the current DOM tree as an element object. This + * is suitable for passing to functions like Strophe.Connection.send(). + * + * Returns: + * The DOM tree as a element object. + */ + tree: function() { + return this.nodeTree; + }, + /** Function: toString + * Serialize the DOM tree to a String. + * + * This function returns a string serialization of the current DOM + * tree. It is often used internally to pass data to a + * Strophe.Request object. + * + * Returns: + * The serialized DOM tree in a String. + */ + toString: function() { + return Strophe.serialize(this.nodeTree); + }, + /** Function: up + * Make the current parent element the new current element. + * + * This function is often used after c() to traverse back up the tree. + * For example, to add two children to the same element + * > builder.c('child1', {}).up().c('child2', {}); + * + * Returns: + * The Stophe.Builder object. + */ + up: function() { + this.node = this.node.parentNode; + return this; + }, + /** Function: attrs + * Add or modify attributes of the current element. + * + * The attributes should be passed in object notation. This function + * does not move the current element pointer. + * + * Parameters: + * (Object) moreattrs - The attributes to add/modify in object notation. + * + * Returns: + * The Strophe.Builder object. + */ + attrs: function(moreattrs) { + for (var k in moreattrs) { + if (moreattrs.hasOwnProperty(k)) { + this.node.setAttribute(k, moreattrs[k]); + } + } + return this; + }, + /** Function: c + * Add a child to the current element and make it the new current + * element. + * + * This function moves the current element pointer to the child, + * unless text is provided. If you need to add another child, it + * is necessary to use up() to go back to the parent in the tree. + * + * Parameters: + * (String) name - The name of the child. + * (Object) attrs - The attributes of the child in object notation. + * (String) text - The text to add to the child. + * + * Returns: + * The Strophe.Builder object. + */ + c: function(name, attrs, text) { + var child = Strophe.xmlElement(name, attrs, text); + this.node.appendChild(child); + if (!text) { + this.node = child; + } + return this; + }, + /** Function: cnode + * Add a child to the current element and make it the new current + * element. + * + * This function is the same as c() except that instead of using a + * name and an attributes object to create the child it uses an + * existing DOM element object. + * + * Parameters: + * (XMLElement) elem - A DOM element. + * + * Returns: + * The Strophe.Builder object. + */ + cnode: function(elem) { + var impNode; + var xmlGen = Strophe.xmlGenerator(); + try { + impNode = xmlGen.importNode !== undefined; + } catch (e) { + impNode = false; + } + var newElem = impNode ? xmlGen.importNode(elem, true) : Strophe.copyElement(elem); + this.node.appendChild(newElem); + this.node = newElem; + return this; + }, + /** Function: t + * Add a child text element. + * + * This *does not* make the child the new current element since there + * are no children of text elements. + * + * Parameters: + * (String) text - The text data to append to the current element. + * + * Returns: + * The Strophe.Builder object. + */ + t: function(text) { + var child = Strophe.xmlTextNode(text); + this.node.appendChild(child); + return this; + }, + /** Function: h + * Replace current element contents with the HTML passed in. + * + * This *does not* make the child the new current element + * + * Parameters: + * (String) html - The html to insert as contents of current element. + * + * Returns: + * The Strophe.Builder object. + */ + h: function(html) { + var fragment = document.createElement("body"); + // force the browser to try and fix any invalid HTML tags + fragment.innerHTML = html; + // copy cleaned html into an xml dom + var xhtml = Strophe.createHtml(fragment); + while (xhtml.childNodes.length > 0) { + this.node.appendChild(xhtml.childNodes[0]); + } + return this; + } + }; + /** PrivateClass: Strophe.Handler + * _Private_ helper class for managing stanza handlers. + * + * A Strophe.Handler encapsulates a user provided callback function to be + * executed when matching stanzas are received by the connection. + * Handlers can be either one-off or persistant depending on their + * return value. Returning true will cause a Handler to remain active, and + * returning false will remove the Handler. + * + * Users will not use Strophe.Handler objects directly, but instead they + * will use Strophe.Connection.addHandler() and + * Strophe.Connection.deleteHandler(). + */ + /** PrivateConstructor: Strophe.Handler + * Create and initialize a new Strophe.Handler. + * + * Parameters: + * (Function) handler - A function to be executed when the handler is run. + * (String) ns - The namespace to match. + * (String) name - The element name to match. + * (String) type - The element type to match. + * (String) id - The element id attribute to match. + * (String) from - The element from attribute to match. + * (Object) options - Handler options + * + * Returns: + * A new Strophe.Handler object. + */ + Strophe.Handler = function(handler, ns, name, type, id, from, options) { + this.handler = handler; + this.ns = ns; + this.name = name; + this.type = type; + this.id = id; + this.options = options || { + matchBare: false + }; + // default matchBare to false if undefined + if (!this.options.matchBare) { + this.options.matchBare = false; + } + if (this.options.matchBare) { + this.from = from ? Strophe.getBareJidFromJid(from) : null; + } else { + this.from = from; + } + // whether the handler is a user handler or a system handler + this.user = true; + }; + Strophe.Handler.prototype = { + /** PrivateFunction: isMatch + * Tests if a stanza matches the Strophe.Handler. + * + * Parameters: + * (XMLElement) elem - The XML element to test. + * + * Returns: + * true if the stanza matches and false otherwise. + */ + isMatch: function(elem) { + var nsMatch; + var from = null; + if (this.options.matchBare) { + from = Strophe.getBareJidFromJid(elem.getAttribute("from")); + } else { + from = elem.getAttribute("from"); + } + nsMatch = false; + if (!this.ns) { + nsMatch = true; + } else { + var that = this; + Strophe.forEachChild(elem, null, function(elem) { + if (elem.getAttribute("xmlns") == that.ns) { + nsMatch = true; + } + }); + nsMatch = nsMatch || elem.getAttribute("xmlns") == this.ns; + } + if (nsMatch && (!this.name || Strophe.isTagEqual(elem, this.name)) && (!this.type || elem.getAttribute("type") == this.type) && (!this.id || elem.getAttribute("id") == this.id) && (!this.from || from == this.from)) { + return true; + } + return false; + }, + /** PrivateFunction: run + * Run the callback on a matching stanza. + * + * Parameters: + * (XMLElement) elem - The DOM element that triggered the + * Strophe.Handler. + * + * Returns: + * A boolean indicating if the handler should remain active. + */ + run: function(elem) { + var result = null; + try { + result = this.handler(elem); + } catch (e) { + if (e.sourceURL) { + Strophe.fatal("error: " + this.handler + " " + e.sourceURL + ":" + e.line + " - " + e.name + ": " + e.message); + } else if (e.fileName) { + if (typeof console != "undefined") { + console.trace(); + console.error(this.handler, " - error - ", e, e.message); + } + Strophe.fatal("error: " + this.handler + " " + e.fileName + ":" + e.lineNumber + " - " + e.name + ": " + e.message); + } else { + Strophe.fatal("error: " + e.message + "\n" + e.stack); + } + throw e; + } + return result; + }, + /** PrivateFunction: toString + * Get a String representation of the Strophe.Handler object. + * + * Returns: + * A String. + */ + toString: function() { + return "{Handler: " + this.handler + "(" + this.name + "," + this.id + "," + this.ns + ")}"; + } + }; + /** PrivateClass: Strophe.TimedHandler + * _Private_ helper class for managing timed handlers. + * + * A Strophe.TimedHandler encapsulates a user provided callback that + * should be called after a certain period of time or at regular + * intervals. The return value of the callback determines whether the + * Strophe.TimedHandler will continue to fire. + * + * Users will not use Strophe.TimedHandler objects directly, but instead + * they will use Strophe.Connection.addTimedHandler() and + * Strophe.Connection.deleteTimedHandler(). + */ + /** PrivateConstructor: Strophe.TimedHandler + * Create and initialize a new Strophe.TimedHandler object. + * + * Parameters: + * (Integer) period - The number of milliseconds to wait before the + * handler is called. + * (Function) handler - The callback to run when the handler fires. This + * function should take no arguments. + * + * Returns: + * A new Strophe.TimedHandler object. + */ + Strophe.TimedHandler = function(period, handler) { + this.period = period; + this.handler = handler; + this.lastCalled = new Date().getTime(); + this.user = true; + }; + Strophe.TimedHandler.prototype = { + /** PrivateFunction: run + * Run the callback for the Strophe.TimedHandler. + * + * Returns: + * true if the Strophe.TimedHandler should be called again, and false + * otherwise. + */ + run: function() { + this.lastCalled = new Date().getTime(); + return this.handler(); + }, + /** PrivateFunction: reset + * Reset the last called time for the Strophe.TimedHandler. + */ + reset: function() { + this.lastCalled = new Date().getTime(); + }, + /** PrivateFunction: toString + * Get a string representation of the Strophe.TimedHandler object. + * + * Returns: + * The string representation. + */ + toString: function() { + return "{TimedHandler: " + this.handler + "(" + this.period + ")}"; + } + }; + /** Class: Strophe.Connection + * XMPP Connection manager. + * + * This class is the main part of Strophe. It manages a BOSH connection + * to an XMPP server and dispatches events to the user callbacks as + * data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, SASL SCRAM-SHA1 + * and legacy authentication. + * + * After creating a Strophe.Connection object, the user will typically + * call connect() with a user supplied callback to handle connection level + * events like authentication failure, disconnection, or connection + * complete. + * + * The user will also have several event handlers defined by using + * addHandler() and addTimedHandler(). These will allow the user code to + * respond to interesting stanzas or do something periodically with the + * connection. These handlers will be active once authentication is + * finished. + * + * To send data to the connection, use send(). + */ + /** Constructor: Strophe.Connection + * Create and initialize a Strophe.Connection object. + * + * The transport-protocol for this connection will be chosen automatically + * based on the given service parameter. URLs starting with "ws://" or + * "wss://" will use WebSockets, URLs starting with "http://", "https://" + * or without a protocol will use BOSH. + * + * To make Strophe connect to the current host you can leave out the protocol + * and host part and just pass the path, e.g. + * + * > var conn = new Strophe.Connection("/http-bind/"); + * + * WebSocket options: + * + * If you want to connect to the current host with a WebSocket connection you + * can tell Strophe to use WebSockets through a "protocol" attribute in the + * optional options parameter. Valid values are "ws" for WebSocket and "wss" + * for Secure WebSocket. + * So to connect to "wss://CURRENT_HOSTNAME/xmpp-websocket" you would call + * + * > var conn = new Strophe.Connection("/xmpp-websocket/", {protocol: "wss"}); + * + * Note that relative URLs _NOT_ starting with a "/" will also include the path + * of the current site. + * + * Also because downgrading security is not permitted by browsers, when using + * relative URLs both BOSH and WebSocket connections will use their secure + * variants if the current connection to the site is also secure (https). + * + * BOSH options: + * + * by adding "sync" to the options, you can control if requests will + * be made synchronously or not. The default behaviour is asynchronous. + * If you want to make requests synchronous, make "sync" evaluate to true: + * > var conn = new Strophe.Connection("/http-bind/", {sync: true}); + * You can also toggle this on an already established connection: + * > conn.options.sync = true; + * + * + * Parameters: + * (String) service - The BOSH or WebSocket service URL. + * (Object) options - A hash of configuration options + * + * Returns: + * A new Strophe.Connection object. + */ + Strophe.Connection = function(service, options) { + // The service URL + this.service = service; + // Configuration options + this.options = options || {}; + var proto = this.options.protocol || ""; + // Select protocal based on service or options + if (service.indexOf("ws:") === 0 || service.indexOf("wss:") === 0 || proto.indexOf("ws") === 0) { + this._proto = new Strophe.Websocket(this); + } else { + this._proto = new Strophe.Bosh(this); + } + /* The connected JID. */ + this.jid = ""; + /* the JIDs domain */ + this.domain = null; + /* stream:features */ + this.features = null; + // SASL + this._sasl_data = {}; + this.do_session = false; + this.do_bind = false; + // handler lists + this.timedHandlers = []; + this.handlers = []; + this.removeTimeds = []; + this.removeHandlers = []; + this.addTimeds = []; + this.addHandlers = []; + this._authentication = {}; + this._idleTimeout = null; + this._disconnectTimeout = null; + this.do_authentication = true; + this.authenticated = false; + this.disconnecting = false; + this.connected = false; + this.errors = 0; + this.paused = false; + this._data = []; + this._uniqueId = 0; + this._sasl_success_handler = null; + this._sasl_failure_handler = null; + this._sasl_challenge_handler = null; + // Max retries before disconnecting + this.maxRetries = 5; + // setup onIdle callback every 1/10th of a second + this._idleTimeout = setTimeout(this._onIdle.bind(this), 100); + // initialize plugins + for (var k in Strophe._connectionPlugins) { + if (Strophe._connectionPlugins.hasOwnProperty(k)) { + var ptype = Strophe._connectionPlugins[k]; + // jslint complaints about the below line, but this is fine + var F = function() {}; + // jshint ignore:line + F.prototype = ptype; + this[k] = new F(); + this[k].init(this); + } + } + }; + Strophe.Connection.prototype = { + /** Function: reset + * Reset the connection. + * + * This function should be called after a connection is disconnected + * before that connection is reused. + */ + reset: function() { + this._proto._reset(); + // SASL + this.do_session = false; + this.do_bind = false; + // handler lists + this.timedHandlers = []; + this.handlers = []; + this.removeTimeds = []; + this.removeHandlers = []; + this.addTimeds = []; + this.addHandlers = []; + this._authentication = {}; + this.authenticated = false; + this.disconnecting = false; + this.connected = false; + this.errors = 0; + this._requests = []; + this._uniqueId = 0; + }, + /** Function: pause + * Pause the request manager. + * + * This will prevent Strophe from sending any more requests to the + * server. This is very useful for temporarily pausing + * BOSH-Connections while a lot of send() calls are happening quickly. + * This causes Strophe to send the data in a single request, saving + * many request trips. + */ + pause: function() { + this.paused = true; + }, + /** Function: resume + * Resume the request manager. + * + * This resumes after pause() has been called. + */ + resume: function() { + this.paused = false; + }, + /** Function: getUniqueId + * Generate a unique ID for use in elements. + * + * All stanzas are required to have unique id attributes. This + * function makes creating these easy. Each connection instance has + * a counter which starts from zero, and the value of this counter + * plus a colon followed by the suffix becomes the unique id. If no + * suffix is supplied, the counter is used as the unique id. + * + * Suffixes are used to make debugging easier when reading the stream + * data, and their use is recommended. The counter resets to 0 for + * every new connection for the same reason. For connections to the + * same server that authenticate the same way, all the ids should be + * the same, which makes it easy to see changes. This is useful for + * automated testing as well. + * + * Parameters: + * (String) suffix - A optional suffix to append to the id. + * + * Returns: + * A unique string to be used for the id attribute. + */ + getUniqueId: function(suffix) { + if (typeof suffix == "string" || typeof suffix == "number") { + return ++this._uniqueId + ":" + suffix; + } else { + return ++this._uniqueId + ""; + } + }, + /** Function: connect + * Starts the connection process. + * + * As the connection process proceeds, the user supplied callback will + * be triggered multiple times with status updates. The callback + * should take two arguments - the status code and the error condition. + * + * The status code will be one of the values in the Strophe.Status + * constants. The error condition will be one of the conditions + * defined in RFC 3920 or the condition 'strophe-parsererror'. + * + * The Parameters _wait_, _hold_ and _route_ are optional and only relevant + * for BOSH connections. Please see XEP 124 for a more detailed explanation + * of the optional parameters. + * + * Parameters: + * (String) jid - The user's JID. This may be a bare JID, + * or a full JID. If a node is not supplied, SASL ANONYMOUS + * authentication will be attempted. + * (String) pass - The user's password. + * (Function) callback - The connect callback function. + * (Integer) wait - The optional HTTPBIND wait value. This is the + * time the server will wait before returning an empty result for + * a request. The default setting of 60 seconds is recommended. + * (Integer) hold - The optional HTTPBIND hold value. This is the + * number of connections the server will hold at one time. This + * should almost always be set to 1 (the default). + * (String) route - The optional route value. + */ + connect: function(jid, pass, callback, wait, hold, route) { + this.jid = jid; + /** Variable: authzid + * Authorization identity. + */ + this.authzid = Strophe.getBareJidFromJid(this.jid); + /** Variable: authcid + * Authentication identity (User name). + */ + this.authcid = Strophe.getNodeFromJid(this.jid); + /** Variable: pass + * Authentication identity (User password). + */ + this.pass = pass; + /** Variable: servtype + * Digest MD5 compatibility. + */ + this.servtype = "xmpp"; + this.connect_callback = callback; + this.disconnecting = false; + this.connected = false; + this.authenticated = false; + this.errors = 0; + // parse jid for domain + this.domain = Strophe.getDomainFromJid(this.jid); + this._changeConnectStatus(Strophe.Status.CONNECTING, null); + this._proto._connect(wait, hold, route); + }, + /** Function: attach + * Attach to an already created and authenticated BOSH session. + * + * This function is provided to allow Strophe to attach to BOSH + * sessions which have been created externally, perhaps by a Web + * application. This is often used to support auto-login type features + * without putting user credentials into the page. + * + * Parameters: + * (String) jid - The full JID that is bound by the session. + * (String) sid - The SID of the BOSH session. + * (String) rid - The current RID of the BOSH session. This RID + * will be used by the next request. + * (Function) callback The connect callback function. + * (Integer) wait - The optional HTTPBIND wait value. This is the + * time the server will wait before returning an empty result for + * a request. The default setting of 60 seconds is recommended. + * Other settings will require tweaks to the Strophe.TIMEOUT value. + * (Integer) hold - The optional HTTPBIND hold value. This is the + * number of connections the server will hold at one time. This + * should almost always be set to 1 (the default). + * (Integer) wind - The optional HTTBIND window value. This is the + * allowed range of request ids that are valid. The default is 5. + */ + attach: function(jid, sid, rid, callback, wait, hold, wind) { + this._proto._attach(jid, sid, rid, callback, wait, hold, wind); + }, + /** Function: xmlInput + * User overrideable function that receives XML data coming into the + * connection. + * + * The default function does nothing. User code can override this with + * > Strophe.Connection.xmlInput = function (elem) { + * > (user code) + * > }; + * + * Due to limitations of current Browsers' XML-Parsers the opening and closing + * tag for WebSocket-Connoctions will be passed as selfclosing here. + * + * BOSH-Connections will have all stanzas wrapped in a tag. See + * if you want to strip this tag. + * + * Parameters: + * (XMLElement) elem - The XML data received by the connection. + */ + /* jshint unused:false */ + xmlInput: function(elem) { + return; + }, + /* jshint unused:true */ + /** Function: xmlOutput + * User overrideable function that receives XML data sent to the + * connection. + * + * The default function does nothing. User code can override this with + * > Strophe.Connection.xmlOutput = function (elem) { + * > (user code) + * > }; + * + * Due to limitations of current Browsers' XML-Parsers the opening and closing + * tag for WebSocket-Connoctions will be passed as selfclosing here. + * + * BOSH-Connections will have all stanzas wrapped in a tag. See + * if you want to strip this tag. + * + * Parameters: + * (XMLElement) elem - The XMLdata sent by the connection. + */ + /* jshint unused:false */ + xmlOutput: function(elem) { + return; + }, + /* jshint unused:true */ + /** Function: rawInput + * User overrideable function that receives raw data coming into the + * connection. + * + * The default function does nothing. User code can override this with + * > Strophe.Connection.rawInput = function (data) { + * > (user code) + * > }; + * + * Parameters: + * (String) data - The data received by the connection. + */ + /* jshint unused:false */ + rawInput: function(data) { + return; + }, + /* jshint unused:true */ + /** Function: rawOutput + * User overrideable function that receives raw data sent to the + * connection. + * + * The default function does nothing. User code can override this with + * > Strophe.Connection.rawOutput = function (data) { + * > (user code) + * > }; + * + * Parameters: + * (String) data - The data sent by the connection. + */ + /* jshint unused:false */ + rawOutput: function(data) { + return; + }, + /* jshint unused:true */ + /** Function: send + * Send a stanza. + * + * This function is called to push data onto the send queue to + * go out over the wire. Whenever a request is sent to the BOSH + * server, all pending data is sent and the queue is flushed. + * + * Parameters: + * (XMLElement | + * [XMLElement] | + * Strophe.Builder) elem - The stanza to send. + */ + send: function(elem) { + if (elem === null) { + return; + } + if (typeof elem.sort === "function") { + for (var i = 0; i < elem.length; i++) { + this._queueData(elem[i]); + } + } else if (typeof elem.tree === "function") { + this._queueData(elem.tree()); + } else { + this._queueData(elem); + } + this._proto._send(); + }, + /** Function: flush + * Immediately send any pending outgoing data. + * + * Normally send() queues outgoing data until the next idle period + * (100ms), which optimizes network use in the common cases when + * several send()s are called in succession. flush() can be used to + * immediately send all pending data. + */ + flush: function() { + // cancel the pending idle period and run the idle function + // immediately + clearTimeout(this._idleTimeout); + this._onIdle(); + }, + /** Function: sendIQ + * Helper function to send IQ stanzas. + * + * Parameters: + * (XMLElement) elem - The stanza to send. + * (Function) callback - The callback function for a successful request. + * (Function) errback - The callback function for a failed or timed + * out request. On timeout, the stanza will be null. + * (Integer) timeout - The time specified in milliseconds for a + * timeout to occur. + * + * Returns: + * The id used to send the IQ. + */ + sendIQ: function(elem, callback, errback, timeout) { + var timeoutHandler = null; + var that = this; + if (typeof elem.tree === "function") { + elem = elem.tree(); + } + var id = elem.getAttribute("id"); + // inject id if not found + if (!id) { + id = this.getUniqueId("sendIQ"); + elem.setAttribute("id", id); + } + var handler = this.addHandler(function(stanza) { + // remove timeout handler if there is one + if (timeoutHandler) { + that.deleteTimedHandler(timeoutHandler); + } + var iqtype = stanza.getAttribute("type"); + if (iqtype == "result") { + if (callback) { + callback(stanza); + } + } else if (iqtype == "error") { + if (errback) { + errback(stanza); + } + } else { + throw { + name: "StropheError", + message: "Got bad IQ type of " + iqtype + }; + } + }, null, "iq", null, id); + // if timeout specified, setup timeout handler. + if (timeout) { + timeoutHandler = this.addTimedHandler(timeout, function() { + // get rid of normal handler + that.deleteHandler(handler); + // call errback on timeout with null stanza + if (errback) { + errback(null); + } + return false; + }); + } + this.send(elem); + return id; + }, + /** PrivateFunction: _queueData + * Queue outgoing data for later sending. Also ensures that the data + * is a DOMElement. + */ + _queueData: function(element) { + if (element === null || !element.tagName || !element.childNodes) { + throw { + name: "StropheError", + message: "Cannot queue non-DOMElement." + }; + } + this._data.push(element); + }, + /** PrivateFunction: _sendRestart + * Send an xmpp:restart stanza. + */ + _sendRestart: function() { + this._data.push("restart"); + this._proto._sendRestart(); + this._idleTimeout = setTimeout(this._onIdle.bind(this), 100); + }, + /** Function: addTimedHandler + * Add a timed handler to the connection. + * + * This function adds a timed handler. The provided handler will + * be called every period milliseconds until it returns false, + * the connection is terminated, or the handler is removed. Handlers + * that wish to continue being invoked should return true. + * + * Because of method binding it is necessary to save the result of + * this function if you wish to remove a handler with + * deleteTimedHandler(). + * + * Note that user handlers are not active until authentication is + * successful. + * + * Parameters: + * (Integer) period - The period of the handler. + * (Function) handler - The callback function. + * + * Returns: + * A reference to the handler that can be used to remove it. + */ + addTimedHandler: function(period, handler) { + var thand = new Strophe.TimedHandler(period, handler); + this.addTimeds.push(thand); + return thand; + }, + /** Function: deleteTimedHandler + * Delete a timed handler for a connection. + * + * This function removes a timed handler from the connection. The + * handRef parameter is *not* the function passed to addTimedHandler(), + * but is the reference returned from addTimedHandler(). + * + * Parameters: + * (Strophe.TimedHandler) handRef - The handler reference. + */ + deleteTimedHandler: function(handRef) { + // this must be done in the Idle loop so that we don't change + // the handlers during iteration + this.removeTimeds.push(handRef); + }, + /** Function: addHandler + * Add a stanza handler for the connection. + * + * This function adds a stanza handler to the connection. The + * handler callback will be called for any stanza that matches + * the parameters. Note that if multiple parameters are supplied, + * they must all match for the handler to be invoked. + * + * The handler will receive the stanza that triggered it as its argument. + * The handler should return true if it is to be invoked again; + * returning false will remove the handler after it returns. + * + * As a convenience, the ns parameters applies to the top level element + * and also any of its immediate children. This is primarily to make + * matching /iq/query elements easy. + * + * The options argument contains handler matching flags that affect how + * matches are determined. Currently the only flag is matchBare (a + * boolean). When matchBare is true, the from parameter and the from + * attribute on the stanza will be matched as bare JIDs instead of + * full JIDs. To use this, pass {matchBare: true} as the value of + * options. The default value for matchBare is false. + * + * The return value should be saved if you wish to remove the handler + * with deleteHandler(). + * + * Parameters: + * (Function) handler - The user callback. + * (String) ns - The namespace to match. + * (String) name - The stanza name to match. + * (String) type - The stanza type attribute to match. + * (String) id - The stanza id attribute to match. + * (String) from - The stanza from attribute to match. + * (String) options - The handler options + * + * Returns: + * A reference to the handler that can be used to remove it. + */ + addHandler: function(handler, ns, name, type, id, from, options) { + var hand = new Strophe.Handler(handler, ns, name, type, id, from, options); + this.addHandlers.push(hand); + return hand; + }, + /** Function: deleteHandler + * Delete a stanza handler for a connection. + * + * This function removes a stanza handler from the connection. The + * handRef parameter is *not* the function passed to addHandler(), + * but is the reference returned from addHandler(). + * + * Parameters: + * (Strophe.Handler) handRef - The handler reference. + */ + deleteHandler: function(handRef) { + // this must be done in the Idle loop so that we don't change + // the handlers during iteration + this.removeHandlers.push(handRef); + }, + /** Function: disconnect + * Start the graceful disconnection process. + * + * This function starts the disconnection process. This process starts + * by sending unavailable presence and sending BOSH body of type + * terminate. A timeout handler makes sure that disconnection happens + * even if the BOSH server does not respond. + * + * The user supplied connection callback will be notified of the + * progress as this process happens. + * + * Parameters: + * (String) reason - The reason the disconnect is occuring. + */ + disconnect: function(reason) { + this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason); + Strophe.info("Disconnect was called because: " + reason); + if (this.connected) { + var pres = false; + this.disconnecting = true; + if (this.authenticated) { + pres = $pres({ + xmlns: Strophe.NS.CLIENT, + type: "unavailable" + }); + } + // setup timeout handler + this._disconnectTimeout = this._addSysTimedHandler(3e3, this._onDisconnectTimeout.bind(this)); + this._proto._disconnect(pres); + } + }, + /** PrivateFunction: _changeConnectStatus + * _Private_ helper function that makes sure plugins and the user's + * callback are notified of connection status changes. + * + * Parameters: + * (Integer) status - the new connection status, one of the values + * in Strophe.Status + * (String) condition - the error condition or null + */ + _changeConnectStatus: function(status, condition) { + // notify all plugins listening for status changes + for (var k in Strophe._connectionPlugins) { + if (Strophe._connectionPlugins.hasOwnProperty(k)) { + var plugin = this[k]; + if (plugin.statusChanged) { + try { + plugin.statusChanged(status, condition); + } catch (err) { + Strophe.error("" + k + " plugin caused an exception " + "changing status: " + err); + } + } + } + } + // notify the user's callback + if (this.connect_callback) { + try { + this.connect_callback(status, condition); + } catch (e) { + Strophe.error("User connection callback caused an " + "exception: " + e); + } + } + }, + /** PrivateFunction: _doDisconnect + * _Private_ function to disconnect. + * + * This is the last piece of the disconnection logic. This resets the + * connection and alerts the user's connection callback. + */ + _doDisconnect: function() { + // Cancel Disconnect Timeout + if (this._disconnectTimeout !== null) { + this.deleteTimedHandler(this._disconnectTimeout); + this._disconnectTimeout = null; + } + Strophe.info("_doDisconnect was called"); + this._proto._doDisconnect(); + this.authenticated = false; + this.disconnecting = false; + // delete handlers + this.handlers = []; + this.timedHandlers = []; + this.removeTimeds = []; + this.removeHandlers = []; + this.addTimeds = []; + this.addHandlers = []; + // tell the parent we disconnected + this._changeConnectStatus(Strophe.Status.DISCONNECTED, null); + this.connected = false; + }, + /** PrivateFunction: _dataRecv + * _Private_ handler to processes incoming data from the the connection. + * + * Except for _connect_cb handling the initial connection request, + * this function handles the incoming data for all requests. This + * function also fires stanza handlers that match each incoming + * stanza. + * + * Parameters: + * (Strophe.Request) req - The request that has data ready. + * (string) req - The stanza a raw string (optiona). + */ + _dataRecv: function(req, raw) { + Strophe.info("_dataRecv called"); + var elem = this._proto._reqToData(req); + if (elem === null) { + return; + } + if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) { + if (elem.nodeName === this._proto.strip && elem.childNodes.length) { + this.xmlInput(elem.childNodes[0]); + } else { + this.xmlInput(elem); + } + } + if (this.rawInput !== Strophe.Connection.prototype.rawInput) { + if (raw) { + this.rawInput(raw); + } else { + this.rawInput(Strophe.serialize(elem)); + } + } + // remove handlers scheduled for deletion + var i, hand; + while (this.removeHandlers.length > 0) { + hand = this.removeHandlers.pop(); + i = this.handlers.indexOf(hand); + if (i >= 0) { + this.handlers.splice(i, 1); + } + } + // add handlers scheduled for addition + while (this.addHandlers.length > 0) { + this.handlers.push(this.addHandlers.pop()); + } + // handle graceful disconnect + if (this.disconnecting && this._proto._emptyQueue()) { + this._doDisconnect(); + return; + } + var typ = elem.getAttribute("type"); + var cond, conflict; + if (typ !== null && typ == "terminate") { + // Don't process stanzas that come in after disconnect + if (this.disconnecting) { + return; + } + // an error occurred + cond = elem.getAttribute("condition"); + conflict = elem.getElementsByTagName("conflict"); + if (cond !== null) { + if (cond == "remote-stream-error" && conflict.length > 0) { + cond = "conflict"; + } + this._changeConnectStatus(Strophe.Status.CONNFAIL, cond); + } else { + this._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown"); + } + this.disconnect("unknown stream-error"); + return; + } + // send each incoming stanza through the handler chain + var that = this; + Strophe.forEachChild(elem, null, function(child) { + var i, newList; + // process handlers + newList = that.handlers; + that.handlers = []; + for (i = 0; i < newList.length; i++) { + var hand = newList[i]; + // encapsulate 'handler.run' not to lose the whole handler list if + // one of the handlers throws an exception + try { + if (hand.isMatch(child) && (that.authenticated || !hand.user)) { + if (hand.run(child)) { + that.handlers.push(hand); + } + } else { + that.handlers.push(hand); + } + } catch (e) { + // if the handler throws an exception, we consider it as false + Strophe.warn("Removing Strophe handlers due to uncaught exception: " + e.message); + } + } + }); + }, + /** Attribute: mechanisms + * SASL Mechanisms available for Conncection. + */ + mechanisms: {}, + /** PrivateFunction: _connect_cb + * _Private_ handler for initial connection request. + * + * This handler is used to process the initial connection request + * response from the BOSH server. It is used to set up authentication + * handlers and start the authentication process. + * + * SASL authentication will be attempted if available, otherwise + * the code will fall back to legacy authentication. + * + * Parameters: + * (Strophe.Request) req - The current request. + * (Function) _callback - low level (xmpp) connect callback function. + * Useful for plugins with their own xmpp connect callback (when their) + * want to do something special). + */ + _connect_cb: function(req, _callback, raw) { + Strophe.info("_connect_cb was called"); + this.connected = true; + var bodyWrap = this._proto._reqToData(req); + if (!bodyWrap) { + return; + } + if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) { + if (bodyWrap.nodeName === this._proto.strip && bodyWrap.childNodes.length) { + this.xmlInput(bodyWrap.childNodes[0]); + } else { + this.xmlInput(bodyWrap); + } + } + if (this.rawInput !== Strophe.Connection.prototype.rawInput) { + if (raw) { + this.rawInput(raw); + } else { + this.rawInput(Strophe.serialize(bodyWrap)); + } + } + var conncheck = this._proto._connect_cb(bodyWrap); + if (conncheck === Strophe.Status.CONNFAIL) { + return; + } + this._authentication.sasl_scram_sha1 = false; + this._authentication.sasl_plain = false; + this._authentication.sasl_digest_md5 = false; + this._authentication.sasl_anonymous = false; + this._authentication.legacy_auth = false; + // Check for the stream:features tag + var hasFeatures = bodyWrap.getElementsByTagName("stream:features").length > 0; + if (!hasFeatures) { + hasFeatures = bodyWrap.getElementsByTagName("features").length > 0; + } + var mechanisms = bodyWrap.getElementsByTagName("mechanism"); + var matched = []; + var i, mech, found_authentication = false; + if (!hasFeatures) { + this._proto._no_auth_received(_callback); + return; + } + if (mechanisms.length > 0) { + for (i = 0; i < mechanisms.length; i++) { + mech = Strophe.getText(mechanisms[i]); + if (this.mechanisms[mech]) matched.push(this.mechanisms[mech]); + } + } + this._authentication.legacy_auth = bodyWrap.getElementsByTagName("auth").length > 0; + found_authentication = this._authentication.legacy_auth || matched.length > 0; + if (!found_authentication) { + this._proto._no_auth_received(_callback); + return; + } + if (this.do_authentication !== false) this.authenticate(matched); + }, + /** Function: authenticate + * Set up authentication + * + * Contiunues the initial connection request by setting up authentication + * handlers and start the authentication process. + * + * SASL authentication will be attempted if available, otherwise + * the code will fall back to legacy authentication. + * + */ + authenticate: function(matched) { + var i; + // Sorting matched mechanisms according to priority. + for (i = 0; i < matched.length - 1; ++i) { + var higher = i; + for (var j = i + 1; j < matched.length; ++j) { + if (matched[j].prototype.priority > matched[higher].prototype.priority) { + higher = j; + } + } + if (higher != i) { + var swap = matched[i]; + matched[i] = matched[higher]; + matched[higher] = swap; + } + } + // run each mechanism + var mechanism_found = false; + for (i = 0; i < matched.length; ++i) { + if (!matched[i].test(this)) continue; + this._sasl_success_handler = this._addSysHandler(this._sasl_success_cb.bind(this), null, "success", null, null); + this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null); + this._sasl_challenge_handler = this._addSysHandler(this._sasl_challenge_cb.bind(this), null, "challenge", null, null); + this._sasl_mechanism = new matched[i](); + this._sasl_mechanism.onStart(this); + var request_auth_exchange = $build("auth", { + xmlns: Strophe.NS.SASL, + mechanism: this._sasl_mechanism.name + }); + if (this._sasl_mechanism.isClientFirst) { + var response = this._sasl_mechanism.onChallenge(this, null); + request_auth_exchange.t(Base64.encode(response)); + } + this.send(request_auth_exchange.tree()); + mechanism_found = true; + break; + } + if (!mechanism_found) { + // if none of the mechanism worked + if (Strophe.getNodeFromJid(this.jid) === null) { + // we don't have a node, which is required for non-anonymous + // client connections + this._changeConnectStatus(Strophe.Status.CONNFAIL, "x-strophe-bad-non-anon-jid"); + this.disconnect("x-strophe-bad-non-anon-jid"); + } else { + // fall back to legacy authentication + this._changeConnectStatus(Strophe.Status.AUTHENTICATING, null); + this._addSysHandler(this._auth1_cb.bind(this), null, null, null, "_auth_1"); + this.send($iq({ + type: "get", + to: this.domain, + id: "_auth_1" + }).c("query", { + xmlns: Strophe.NS.AUTH + }).c("username", {}).t(Strophe.getNodeFromJid(this.jid)).tree()); + } + } + }, + _sasl_challenge_cb: function(elem) { + var challenge = Base64.decode(Strophe.getText(elem)); + var response = this._sasl_mechanism.onChallenge(this, challenge); + var stanza = $build("response", { + xmlns: Strophe.NS.SASL + }); + if (response !== "") { + stanza.t(Base64.encode(response)); + } + this.send(stanza.tree()); + return true; + }, + /** PrivateFunction: _auth1_cb + * _Private_ handler for legacy authentication. + * + * This handler is called in response to the initial + * for legacy authentication. It builds an authentication and + * sends it, creating a handler (calling back to _auth2_cb()) to + * handle the result + * + * Parameters: + * (XMLElement) elem - The stanza that triggered the callback. + * + * Returns: + * false to remove the handler. + */ + /* jshint unused:false */ + _auth1_cb: function(elem) { + // build plaintext auth iq + var iq = $iq({ + type: "set", + id: "_auth_2" + }).c("query", { + xmlns: Strophe.NS.AUTH + }).c("username", {}).t(Strophe.getNodeFromJid(this.jid)).up().c("password").t(this.pass); + if (!Strophe.getResourceFromJid(this.jid)) { + // since the user has not supplied a resource, we pick + // a default one here. unlike other auth methods, the server + // cannot do this for us. + this.jid = Strophe.getBareJidFromJid(this.jid) + "/strophe"; + } + iq.up().c("resource", {}).t(Strophe.getResourceFromJid(this.jid)); + this._addSysHandler(this._auth2_cb.bind(this), null, null, null, "_auth_2"); + this.send(iq.tree()); + return false; + }, + /* jshint unused:true */ + /** PrivateFunction: _sasl_success_cb + * _Private_ handler for succesful SASL authentication. + * + * Parameters: + * (XMLElement) elem - The matching stanza. + * + * Returns: + * false to remove the handler. + */ + _sasl_success_cb: function(elem) { + if (this._sasl_data["server-signature"]) { + var serverSignature; + var success = Base64.decode(Strophe.getText(elem)); + var attribMatch = /([a-z]+)=([^,]+)(,|$)/; + var matches = success.match(attribMatch); + if (matches[1] == "v") { + serverSignature = matches[2]; + } + if (serverSignature != this._sasl_data["server-signature"]) { + // remove old handlers + this.deleteHandler(this._sasl_failure_handler); + this._sasl_failure_handler = null; + if (this._sasl_challenge_handler) { + this.deleteHandler(this._sasl_challenge_handler); + this._sasl_challenge_handler = null; + } + this._sasl_data = {}; + return this._sasl_failure_cb(null); + } + } + Strophe.info("SASL authentication succeeded."); + if (this._sasl_mechanism) this._sasl_mechanism.onSuccess(); + // remove old handlers + this.deleteHandler(this._sasl_failure_handler); + this._sasl_failure_handler = null; + if (this._sasl_challenge_handler) { + this.deleteHandler(this._sasl_challenge_handler); + this._sasl_challenge_handler = null; + } + this._addSysHandler(this._sasl_auth1_cb.bind(this), null, "stream:features", null, null); + // we must send an xmpp:restart now + this._sendRestart(); + return false; + }, + /** PrivateFunction: _sasl_auth1_cb + * _Private_ handler to start stream binding. + * + * Parameters: + * (XMLElement) elem - The matching stanza. + * + * Returns: + * false to remove the handler. + */ + _sasl_auth1_cb: function(elem) { + // save stream:features for future usage + this.features = elem; + var i, child; + for (i = 0; i < elem.childNodes.length; i++) { + child = elem.childNodes[i]; + if (child.nodeName == "bind") { + this.do_bind = true; + } + if (child.nodeName == "session") { + this.do_session = true; + } + } + if (!this.do_bind) { + this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); + return false; + } else { + this._addSysHandler(this._sasl_bind_cb.bind(this), null, null, null, "_bind_auth_2"); + var resource = Strophe.getResourceFromJid(this.jid); + if (resource) { + this.send($iq({ + type: "set", + id: "_bind_auth_2" + }).c("bind", { + xmlns: Strophe.NS.BIND + }).c("resource", {}).t(resource).tree()); + } else { + this.send($iq({ + type: "set", + id: "_bind_auth_2" + }).c("bind", { + xmlns: Strophe.NS.BIND + }).tree()); + } + } + return false; + }, + /** PrivateFunction: _sasl_bind_cb + * _Private_ handler for binding result and session start. + * + * Parameters: + * (XMLElement) elem - The matching stanza. + * + * Returns: + * false to remove the handler. + */ + _sasl_bind_cb: function(elem) { + if (elem.getAttribute("type") == "error") { + Strophe.info("SASL binding failed."); + var conflict = elem.getElementsByTagName("conflict"), condition; + if (conflict.length > 0) { + condition = "conflict"; + } + this._changeConnectStatus(Strophe.Status.AUTHFAIL, condition); + return false; + } + // TODO - need to grab errors + var bind = elem.getElementsByTagName("bind"); + var jidNode; + if (bind.length > 0) { + // Grab jid + jidNode = bind[0].getElementsByTagName("jid"); + if (jidNode.length > 0) { + this.jid = Strophe.getText(jidNode[0]); + if (this.do_session) { + this._addSysHandler(this._sasl_session_cb.bind(this), null, null, null, "_session_auth_2"); + this.send($iq({ + type: "set", + id: "_session_auth_2" + }).c("session", { + xmlns: Strophe.NS.SESSION + }).tree()); + } else { + this.authenticated = true; + this._changeConnectStatus(Strophe.Status.CONNECTED, null); + } + } + } else { + Strophe.info("SASL binding failed."); + this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); + return false; + } + }, + /** PrivateFunction: _sasl_session_cb + * _Private_ handler to finish successful SASL connection. + * + * This sets Connection.authenticated to true on success, which + * starts the processing of user handlers. + * + * Parameters: + * (XMLElement) elem - The matching stanza. + * + * Returns: + * false to remove the handler. + */ + _sasl_session_cb: function(elem) { + if (elem.getAttribute("type") == "result") { + this.authenticated = true; + this._changeConnectStatus(Strophe.Status.CONNECTED, null); + } else if (elem.getAttribute("type") == "error") { + Strophe.info("Session creation failed."); + this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); + return false; + } + return false; + }, + /** PrivateFunction: _sasl_failure_cb + * _Private_ handler for SASL authentication failure. + * + * Parameters: + * (XMLElement) elem - The matching stanza. + * + * Returns: + * false to remove the handler. + */ + /* jshint unused:false */ + _sasl_failure_cb: function(elem) { + // delete unneeded handlers + if (this._sasl_success_handler) { + this.deleteHandler(this._sasl_success_handler); + this._sasl_success_handler = null; + } + if (this._sasl_challenge_handler) { + this.deleteHandler(this._sasl_challenge_handler); + this._sasl_challenge_handler = null; + } + if (this._sasl_mechanism) this._sasl_mechanism.onFailure(); + this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); + return false; + }, + /* jshint unused:true */ + /** PrivateFunction: _auth2_cb + * _Private_ handler to finish legacy authentication. + * + * This handler is called when the result from the jabber:iq:auth + * stanza is returned. + * + * Parameters: + * (XMLElement) elem - The stanza that triggered the callback. + * + * Returns: + * false to remove the handler. + */ + _auth2_cb: function(elem) { + if (elem.getAttribute("type") == "result") { + this.authenticated = true; + this._changeConnectStatus(Strophe.Status.CONNECTED, null); + } else if (elem.getAttribute("type") == "error") { + this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); + this.disconnect("authentication failed"); + } + return false; + }, + /** PrivateFunction: _addSysTimedHandler + * _Private_ function to add a system level timed handler. + * + * This function is used to add a Strophe.TimedHandler for the + * library code. System timed handlers are allowed to run before + * authentication is complete. + * + * Parameters: + * (Integer) period - The period of the handler. + * (Function) handler - The callback function. + */ + _addSysTimedHandler: function(period, handler) { + var thand = new Strophe.TimedHandler(period, handler); + thand.user = false; + this.addTimeds.push(thand); + return thand; + }, + /** PrivateFunction: _addSysHandler + * _Private_ function to add a system level stanza handler. + * + * This function is used to add a Strophe.Handler for the + * library code. System stanza handlers are allowed to run before + * authentication is complete. + * + * Parameters: + * (Function) handler - The callback function. + * (String) ns - The namespace to match. + * (String) name - The stanza name to match. + * (String) type - The stanza type attribute to match. + * (String) id - The stanza id attribute to match. + */ + _addSysHandler: function(handler, ns, name, type, id) { + var hand = new Strophe.Handler(handler, ns, name, type, id); + hand.user = false; + this.addHandlers.push(hand); + return hand; + }, + /** PrivateFunction: _onDisconnectTimeout + * _Private_ timeout handler for handling non-graceful disconnection. + * + * If the graceful disconnect process does not complete within the + * time allotted, this handler finishes the disconnect anyway. + * + * Returns: + * false to remove the handler. + */ + _onDisconnectTimeout: function() { + Strophe.info("_onDisconnectTimeout was called"); + this._proto._onDisconnectTimeout(); + // actually disconnect + this._doDisconnect(); + return false; + }, + /** PrivateFunction: _onIdle + * _Private_ handler to process events during idle cycle. + * + * This handler is called every 100ms to fire timed handlers that + * are ready and keep poll requests going. + */ + _onIdle: function() { + var i, thand, since, newList; + // add timed handlers scheduled for addition + // NOTE: we add before remove in the case a timed handler is + // added and then deleted before the next _onIdle() call. + while (this.addTimeds.length > 0) { + this.timedHandlers.push(this.addTimeds.pop()); + } + // remove timed handlers that have been scheduled for deletion + while (this.removeTimeds.length > 0) { + thand = this.removeTimeds.pop(); + i = this.timedHandlers.indexOf(thand); + if (i >= 0) { + this.timedHandlers.splice(i, 1); + } + } + // call ready timed handlers + var now = new Date().getTime(); + newList = []; + for (i = 0; i < this.timedHandlers.length; i++) { + thand = this.timedHandlers[i]; + if (this.authenticated || !thand.user) { + since = thand.lastCalled + thand.period; + if (since - now <= 0) { + if (thand.run()) { + newList.push(thand); + } + } else { + newList.push(thand); + } + } + } + this.timedHandlers = newList; + clearTimeout(this._idleTimeout); + this._proto._onIdle(); + // reactivate the timer only if connected + if (this.connected) { + this._idleTimeout = setTimeout(this._onIdle.bind(this), 100); + } + } + }; + if (callback) { + callback(Strophe, $build, $msg, $iq, $pres); + } + /** Class: Strophe.SASLMechanism + * + * encapsulates SASL authentication mechanisms. + * + * User code may override the priority for each mechanism or disable it completely. + * See for information about changing priority and for informatian on + * how to disable a mechanism. + * + * By default, all mechanisms are enabled and the priorities are + * + * SCRAM-SHA1 - 40 + * DIGEST-MD5 - 30 + * Plain - 20 + */ + /** + * PrivateConstructor: Strophe.SASLMechanism + * SASL auth mechanism abstraction. + * + * Parameters: + * (String) name - SASL Mechanism name. + * (Boolean) isClientFirst - If client should send response first without challenge. + * (Number) priority - Priority. + * + * Returns: + * A new Strophe.SASLMechanism object. + */ + Strophe.SASLMechanism = function(name, isClientFirst, priority) { + /** PrivateVariable: name + * Mechanism name. + */ + this.name = name; + /** PrivateVariable: isClientFirst + * If client sends response without initial server challenge. + */ + this.isClientFirst = isClientFirst; + /** Variable: priority + * Determines which is chosen for authentication (Higher is better). + * Users may override this to prioritize mechanisms differently. + * + * In the default configuration the priorities are + * + * SCRAM-SHA1 - 40 + * DIGEST-MD5 - 30 + * Plain - 20 + * + * Example: (This will cause Strophe to choose the mechanism that the server sent first) + * + * > Strophe.SASLMD5.priority = Strophe.SASLSHA1.priority; + * + * See for a list of available mechanisms. + * + */ + this.priority = priority; + }; + Strophe.SASLMechanism.prototype = { + /** + * Function: test + * Checks if mechanism able to run. + * To disable a mechanism, make this return false; + * + * To disable plain authentication run + * > Strophe.SASLPlain.test = function() { + * > return false; + * > } + * + * See for a list of available mechanisms. + * + * Parameters: + * (Strophe.Connection) connection - Target Connection. + * + * Returns: + * (Boolean) If mechanism was able to run. + */ + /* jshint unused:false */ + test: function(connection) { + return true; + }, + /* jshint unused:true */ + /** PrivateFunction: onStart + * Called before starting mechanism on some connection. + * + * Parameters: + * (Strophe.Connection) connection - Target Connection. + */ + onStart: function(connection) { + this._connection = connection; + }, + /** PrivateFunction: onChallenge + * Called by protocol implementation on incoming challenge. If client is + * first (isClientFirst == true) challenge will be null on the first call. + * + * Parameters: + * (Strophe.Connection) connection - Target Connection. + * (String) challenge - current challenge to handle. + * + * Returns: + * (String) Mechanism response. + */ + /* jshint unused:false */ + onChallenge: function(connection, challenge) { + throw new Error("You should implement challenge handling!"); + }, + /* jshint unused:true */ + /** PrivateFunction: onFailure + * Protocol informs mechanism implementation about SASL failure. + */ + onFailure: function() { + this._connection = null; + }, + /** PrivateFunction: onSuccess + * Protocol informs mechanism implementation about SASL success. + */ + onSuccess: function() { + this._connection = null; + } + }; + /** Constants: SASL mechanisms + * Available authentication mechanisms + * + * Strophe.SASLAnonymous - SASL Anonymous authentication. + * Strophe.SASLPlain - SASL Plain authentication. + * Strophe.SASLMD5 - SASL Digest-MD5 authentication + * Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication + */ + // Building SASL callbacks + /** PrivateConstructor: SASLAnonymous + * SASL Anonymous authentication. + */ + Strophe.SASLAnonymous = function() {}; + Strophe.SASLAnonymous.prototype = new Strophe.SASLMechanism("ANONYMOUS", false, 10); + Strophe.SASLAnonymous.test = function(connection) { + return connection.authcid === null; + }; + Strophe.Connection.prototype.mechanisms[Strophe.SASLAnonymous.prototype.name] = Strophe.SASLAnonymous; + /** PrivateConstructor: SASLPlain + * SASL Plain authentication. + */ + Strophe.SASLPlain = function() {}; + Strophe.SASLPlain.prototype = new Strophe.SASLMechanism("PLAIN", true, 20); + Strophe.SASLPlain.test = function(connection) { + return connection.authcid !== null; + }; + Strophe.SASLPlain.prototype.onChallenge = function(connection) { + var auth_str = connection.authzid; + auth_str = auth_str + "\x00"; + auth_str = auth_str + connection.authcid; + auth_str = auth_str + "\x00"; + auth_str = auth_str + connection.pass; + return auth_str; + }; + Strophe.Connection.prototype.mechanisms[Strophe.SASLPlain.prototype.name] = Strophe.SASLPlain; + /** PrivateConstructor: SASLSHA1 + * SASL SCRAM SHA 1 authentication. + */ + Strophe.SASLSHA1 = function() {}; + /* TEST: + * This is a simple example of a SCRAM-SHA-1 authentication exchange + * when the client doesn't support channel bindings (username 'user' and + * password 'pencil' are used): + * + * C: n,,n=user,r=fyko+d2lbbFgONRv9qkxdawL + * S: r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j,s=QSXCR+Q6sek8bf92, + * i=4096 + * C: c=biws,r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j, + * p=v0X8v3Bz2T0CJGbJQyF0X+HI4Ts= + * S: v=rmF9pqV8S7suAoZWja4dJRkFsKQ= + * + */ + Strophe.SASLSHA1.prototype = new Strophe.SASLMechanism("SCRAM-SHA-1", true, 40); + Strophe.SASLSHA1.test = function(connection) { + return connection.authcid !== null; + }; + Strophe.SASLSHA1.prototype.onChallenge = function(connection, challenge, test_cnonce) { + var cnonce = test_cnonce || MD5.hexdigest(Math.random() * 1234567890); + var auth_str = "n=" + connection.authcid; + auth_str += ",r="; + auth_str += cnonce; + connection._sasl_data.cnonce = cnonce; + connection._sasl_data["client-first-message-bare"] = auth_str; + auth_str = "n,," + auth_str; + this.onChallenge = function(connection, challenge) { + var nonce, salt, iter, Hi, U, U_old, i, k; + var clientKey, serverKey, clientSignature; + var responseText = "c=biws,"; + var authMessage = connection._sasl_data["client-first-message-bare"] + "," + challenge + ","; + var cnonce = connection._sasl_data.cnonce; + var attribMatch = /([a-z]+)=([^,]+)(,|$)/; + while (challenge.match(attribMatch)) { + var matches = challenge.match(attribMatch); + challenge = challenge.replace(matches[0], ""); + switch (matches[1]) { + case "r": + nonce = matches[2]; + break; + + case "s": + salt = matches[2]; + break; + + case "i": + iter = matches[2]; + break; + } + } + if (nonce.substr(0, cnonce.length) !== cnonce) { + connection._sasl_data = {}; + return connection._sasl_failure_cb(); + } + responseText += "r=" + nonce; + authMessage += responseText; + salt = Base64.decode(salt); + salt += "\x00\x00\x00"; + Hi = U_old = core_hmac_sha1(connection.pass, salt); + for (i = 1; i < iter; i++) { + U = core_hmac_sha1(connection.pass, binb2str(U_old)); + for (k = 0; k < 5; k++) { + Hi[k] ^= U[k]; + } + U_old = U; + } + Hi = binb2str(Hi); + clientKey = core_hmac_sha1(Hi, "Client Key"); + serverKey = str_hmac_sha1(Hi, "Server Key"); + clientSignature = core_hmac_sha1(str_sha1(binb2str(clientKey)), authMessage); + connection._sasl_data["server-signature"] = b64_hmac_sha1(serverKey, authMessage); + for (k = 0; k < 5; k++) { + clientKey[k] ^= clientSignature[k]; + } + responseText += ",p=" + Base64.encode(binb2str(clientKey)); + return responseText; + }.bind(this); + return auth_str; + }; + Strophe.Connection.prototype.mechanisms[Strophe.SASLSHA1.prototype.name] = Strophe.SASLSHA1; + /** PrivateConstructor: SASLMD5 + * SASL DIGEST MD5 authentication. + */ + Strophe.SASLMD5 = function() {}; + Strophe.SASLMD5.prototype = new Strophe.SASLMechanism("DIGEST-MD5", false, 30); + Strophe.SASLMD5.test = function(connection) { + return connection.authcid !== null; + }; + /** PrivateFunction: _quote + * _Private_ utility function to backslash escape and quote strings. + * + * Parameters: + * (String) str - The string to be quoted. + * + * Returns: + * quoted string + */ + Strophe.SASLMD5.prototype._quote = function(str) { + return '"' + str.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'; + }; + Strophe.SASLMD5.prototype.onChallenge = function(connection, challenge, test_cnonce) { + var attribMatch = /([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/; + var cnonce = test_cnonce || MD5.hexdigest("" + Math.random() * 1234567890); + var realm = ""; + var host = null; + var nonce = ""; + var qop = ""; + var matches; + while (challenge.match(attribMatch)) { + matches = challenge.match(attribMatch); + challenge = challenge.replace(matches[0], ""); + matches[2] = matches[2].replace(/^"(.+)"$/, "$1"); + switch (matches[1]) { + case "realm": + realm = matches[2]; + break; + + case "nonce": + nonce = matches[2]; + break; + + case "qop": + qop = matches[2]; + break; + + case "host": + host = matches[2]; + break; + } + } + var digest_uri = connection.servtype + "/" + connection.domain; + if (host !== null) { + digest_uri = digest_uri + "/" + host; + } + var A1 = MD5.hash(connection.authcid + ":" + realm + ":" + this._connection.pass) + ":" + nonce + ":" + cnonce; + var A2 = "AUTHENTICATE:" + digest_uri; + var responseText = ""; + responseText += "charset=utf-8,"; + responseText += "username=" + this._quote(connection.authcid) + ","; + responseText += "realm=" + this._quote(realm) + ","; + responseText += "nonce=" + this._quote(nonce) + ","; + responseText += "nc=00000001,"; + responseText += "cnonce=" + this._quote(cnonce) + ","; + responseText += "digest-uri=" + this._quote(digest_uri) + ","; + responseText += "response=" + MD5.hexdigest(MD5.hexdigest(A1) + ":" + nonce + ":00000001:" + cnonce + ":auth:" + MD5.hexdigest(A2)) + ","; + responseText += "qop=auth"; + this.onChallenge = function() { + return ""; + }.bind(this); + return responseText; + }; + Strophe.Connection.prototype.mechanisms[Strophe.SASLMD5.prototype.name] = Strophe.SASLMD5; +})(function() { + window.Strophe = arguments[0]; + window.$build = arguments[1]; + window.$msg = arguments[2]; + window.$iq = arguments[3]; + window.$pres = arguments[4]; +}); + +/* + This program is distributed under the terms of the MIT license. + Please see the LICENSE file for details. + + Copyright 2006-2008, OGG, LLC +*/ +/* jshint undef: true, unused: true:, noarg: true, latedef: true */ +/*global window, setTimeout, clearTimeout, + XMLHttpRequest, ActiveXObject, + Strophe, $build */ +/** PrivateClass: Strophe.Request + * _Private_ helper class that provides a cross implementation abstraction + * for a BOSH related XMLHttpRequest. + * + * The Strophe.Request class is used internally to encapsulate BOSH request + * information. It is not meant to be used from user's code. + */ +/** PrivateConstructor: Strophe.Request + * Create and initialize a new Strophe.Request object. + * + * Parameters: + * (XMLElement) elem - The XML data to be sent in the request. + * (Function) func - The function that will be called when the + * XMLHttpRequest readyState changes. + * (Integer) rid - The BOSH rid attribute associated with this request. + * (Integer) sends - The number of times this same request has been + * sent. + */ +Strophe.Request = function(elem, func, rid, sends) { + this.id = ++Strophe._requestId; + this.xmlData = elem; + this.data = Strophe.serialize(elem); + // save original function in case we need to make a new request + // from this one. + this.origFunc = func; + this.func = func; + this.rid = rid; + this.date = NaN; + this.sends = sends || 0; + this.abort = false; + this.dead = null; + this.age = function() { + if (!this.date) { + return 0; + } + var now = new Date(); + return (now - this.date) / 1e3; + }; + this.timeDead = function() { + if (!this.dead) { + return 0; + } + var now = new Date(); + return (now - this.dead) / 1e3; + }; + this.xhr = this._newXHR(); +}; + +Strophe.Request.prototype = { + /** PrivateFunction: getResponse + * Get a response from the underlying XMLHttpRequest. + * + * This function attempts to get a response from the request and checks + * for errors. + * + * Throws: + * "parsererror" - A parser error occured. + * + * Returns: + * The DOM element tree of the response. + */ + getResponse: function() { + var node = null; + if (this.xhr.responseXML && this.xhr.responseXML.documentElement) { + node = this.xhr.responseXML.documentElement; + if (node.tagName == "parsererror") { + Strophe.error("invalid response received"); + Strophe.error("responseText: " + this.xhr.responseText); + Strophe.error("responseXML: " + Strophe.serialize(this.xhr.responseXML)); + throw "parsererror"; + } + } else if (this.xhr.responseText) { + Strophe.error("invalid response received"); + Strophe.error("responseText: " + this.xhr.responseText); + Strophe.error("responseXML: " + Strophe.serialize(this.xhr.responseXML)); + } + return node; + }, + /** PrivateFunction: _newXHR + * _Private_ helper function to create XMLHttpRequests. + * + * This function creates XMLHttpRequests across all implementations. + * + * Returns: + * A new XMLHttpRequest. + */ + _newXHR: function() { + var xhr = null; + if (window.XMLHttpRequest) { + xhr = new XMLHttpRequest(); + if (xhr.overrideMimeType) { + xhr.overrideMimeType("text/xml"); + } + } else if (window.ActiveXObject) { + xhr = new ActiveXObject("Microsoft.XMLHTTP"); + } + // use Function.bind() to prepend ourselves as an argument + xhr.onreadystatechange = this.func.bind(null, this); + return xhr; + } +}; + +/** Class: Strophe.Bosh + * _Private_ helper class that handles BOSH Connections + * + * The Strophe.Bosh class is used internally by Strophe.Connection + * to encapsulate BOSH sessions. It is not meant to be used from user's code. + */ +/** File: bosh.js + * A JavaScript library to enable BOSH in Strophejs. + * + * this library uses Bidirectional-streams Over Synchronous HTTP (BOSH) + * to emulate a persistent, stateful, two-way connection to an XMPP server. + * More information on BOSH can be found in XEP 124. + */ +/** PrivateConstructor: Strophe.Bosh + * Create and initialize a Strophe.Bosh object. + * + * Parameters: + * (Strophe.Connection) connection - The Strophe.Connection that will use BOSH. + * + * Returns: + * A new Strophe.Bosh object. + */ +Strophe.Bosh = function(connection) { + this._conn = connection; + /* request id for body tags */ + this.rid = Math.floor(Math.random() * 4294967295); + /* The current session ID. */ + this.sid = null; + // default BOSH values + this.hold = 1; + this.wait = 60; + this.window = 5; + this._requests = []; +}; + +Strophe.Bosh.prototype = { + /** Variable: strip + * + * BOSH-Connections will have all stanzas wrapped in a tag when + * passed to or . + * To strip this tag, User code can set to "body": + * + * > Strophe.Bosh.prototype.strip = "body"; + * + * This will enable stripping of the body tag in both + * and . + */ + strip: null, + /** PrivateFunction: _buildBody + * _Private_ helper function to generate the wrapper for BOSH. + * + * Returns: + * A Strophe.Builder with a element. + */ + _buildBody: function() { + var bodyWrap = $build("body", { + rid: this.rid++, + xmlns: Strophe.NS.HTTPBIND + }); + if (this.sid !== null) { + bodyWrap.attrs({ + sid: this.sid + }); + } + return bodyWrap; + }, + /** PrivateFunction: _reset + * Reset the connection. + * + * This function is called by the reset function of the Strophe Connection + */ + _reset: function() { + this.rid = Math.floor(Math.random() * 4294967295); + this.sid = null; + }, + /** PrivateFunction: _connect + * _Private_ function that initializes the BOSH connection. + * + * Creates and sends the Request that initializes the BOSH connection. + */ + _connect: function(wait, hold, route) { + this.wait = wait || this.wait; + this.hold = hold || this.hold; + // build the body tag + var body = this._buildBody().attrs({ + to: this._conn.domain, + "xml:lang": "en", + wait: this.wait, + hold: this.hold, + content: "text/xml; charset=utf-8", + ver: "1.6", + "xmpp:version": "1.0", + "xmlns:xmpp": Strophe.NS.BOSH + }); + if (route) { + body.attrs({ + route: route + }); + } + var _connect_cb = this._conn._connect_cb; + this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, _connect_cb.bind(this._conn)), body.tree().getAttribute("rid"))); + this._throttledRequestHandler(); + }, + /** PrivateFunction: _attach + * Attach to an already created and authenticated BOSH session. + * + * This function is provided to allow Strophe to attach to BOSH + * sessions which have been created externally, perhaps by a Web + * application. This is often used to support auto-login type features + * without putting user credentials into the page. + * + * Parameters: + * (String) jid - The full JID that is bound by the session. + * (String) sid - The SID of the BOSH session. + * (String) rid - The current RID of the BOSH session. This RID + * will be used by the next request. + * (Function) callback The connect callback function. + * (Integer) wait - The optional HTTPBIND wait value. This is the + * time the server will wait before returning an empty result for + * a request. The default setting of 60 seconds is recommended. + * Other settings will require tweaks to the Strophe.TIMEOUT value. + * (Integer) hold - The optional HTTPBIND hold value. This is the + * number of connections the server will hold at one time. This + * should almost always be set to 1 (the default). + * (Integer) wind - The optional HTTBIND window value. This is the + * allowed range of request ids that are valid. The default is 5. + */ + _attach: function(jid, sid, rid, callback, wait, hold, wind) { + this._conn.jid = jid; + this.sid = sid; + this.rid = rid; + this._conn.connect_callback = callback; + this._conn.domain = Strophe.getDomainFromJid(this._conn.jid); + this._conn.authenticated = true; + this._conn.connected = true; + this.wait = wait || this.wait; + this.hold = hold || this.hold; + this.window = wind || this.window; + this._conn._changeConnectStatus(Strophe.Status.ATTACHED, null); + }, + /** PrivateFunction: _connect_cb + * _Private_ handler for initial connection request. + * + * This handler is used to process the Bosh-part of the initial request. + * Parameters: + * (Strophe.Request) bodyWrap - The received stanza. + */ + _connect_cb: function(bodyWrap) { + var typ = bodyWrap.getAttribute("type"); + var cond, conflict; + if (typ !== null && typ == "terminate") { + // an error occurred + Strophe.error("BOSH-Connection failed: " + cond); + cond = bodyWrap.getAttribute("condition"); + conflict = bodyWrap.getElementsByTagName("conflict"); + if (cond !== null) { + if (cond == "remote-stream-error" && conflict.length > 0) { + cond = "conflict"; + } + this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, cond); + } else { + this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown"); + } + this._conn._doDisconnect(); + return Strophe.Status.CONNFAIL; + } + // check to make sure we don't overwrite these if _connect_cb is + // called multiple times in the case of missing stream:features + if (!this.sid) { + this.sid = bodyWrap.getAttribute("sid"); + } + var wind = bodyWrap.getAttribute("requests"); + if (wind) { + this.window = parseInt(wind, 10); + } + var hold = bodyWrap.getAttribute("hold"); + if (hold) { + this.hold = parseInt(hold, 10); + } + var wait = bodyWrap.getAttribute("wait"); + if (wait) { + this.wait = parseInt(wait, 10); + } + }, + /** PrivateFunction: _disconnect + * _Private_ part of Connection.disconnect for Bosh + * + * Parameters: + * (Request) pres - This stanza will be sent before disconnecting. + */ + _disconnect: function(pres) { + this._sendTerminate(pres); + }, + /** PrivateFunction: _doDisconnect + * _Private_ function to disconnect. + * + * Resets the SID and RID. + */ + _doDisconnect: function() { + this.sid = null; + this.rid = Math.floor(Math.random() * 4294967295); + }, + /** PrivateFunction: _emptyQueue + * _Private_ function to check if the Request queue is empty. + * + * Returns: + * True, if there are no Requests queued, False otherwise. + */ + _emptyQueue: function() { + return this._requests.length === 0; + }, + /** PrivateFunction: _hitError + * _Private_ function to handle the error count. + * + * Requests are resent automatically until their error count reaches + * 5. Each time an error is encountered, this function is called to + * increment the count and disconnect if the count is too high. + * + * Parameters: + * (Integer) reqStatus - The request status. + */ + _hitError: function(reqStatus) { + this.errors++; + Strophe.warn("request errored, status: " + reqStatus + ", number of errors: " + this.errors); + if (this.errors > 4) { + this._onDisconnectTimeout(); + } + }, + /** PrivateFunction: _no_auth_received + * + * Called on stream start/restart when no stream:features + * has been received and sends a blank poll request. + */ + _no_auth_received: function(_callback) { + if (_callback) { + _callback = _callback.bind(this._conn); + } else { + _callback = this._conn._connect_cb.bind(this._conn); + } + var body = this._buildBody(); + this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, _callback.bind(this._conn)), body.tree().getAttribute("rid"))); + this._throttledRequestHandler(); + }, + /** PrivateFunction: _onDisconnectTimeout + * _Private_ timeout handler for handling non-graceful disconnection. + * + * Cancels all remaining Requests and clears the queue. + */ + _onDisconnectTimeout: function() { + var req; + while (this._requests.length > 0) { + req = this._requests.pop(); + req.abort = true; + req.xhr.abort(); + // jslint complains, but this is fine. setting to empty func + // is necessary for IE6 + req.xhr.onreadystatechange = function() {}; + } + }, + /** PrivateFunction: _onIdle + * _Private_ handler called by Strophe.Connection._onIdle + * + * Sends all queued Requests or polls with empty Request if there are none. + */ + _onIdle: function() { + var data = this._conn._data; + // if no requests are in progress, poll + if (this._conn.authenticated && this._requests.length === 0 && data.length === 0 && !this._conn.disconnecting) { + Strophe.info("no requests during idle cycle, sending " + "blank request"); + data.push(null); + } + if (this._requests.length < 2 && data.length > 0 && !this._conn.paused) { + var body = this._buildBody(); + for (var i = 0; i < data.length; i++) { + if (data[i] !== null) { + if (data[i] === "restart") { + body.attrs({ + to: this._conn.domain, + "xml:lang": "en", + "xmpp:restart": "true", + "xmlns:xmpp": Strophe.NS.BOSH + }); + } else { + body.cnode(data[i]).up(); + } + } + } + delete this._conn._data; + this._conn._data = []; + this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)), body.tree().getAttribute("rid"))); + this._processRequest(this._requests.length - 1); + } + if (this._requests.length > 0) { + var time_elapsed = this._requests[0].age(); + if (this._requests[0].dead !== null) { + if (this._requests[0].timeDead() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait)) { + this._throttledRequestHandler(); + } + } + if (time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait)) { + Strophe.warn("Request " + this._requests[0].id + " timed out, over " + Math.floor(Strophe.TIMEOUT * this.wait) + " seconds since last activity"); + this._throttledRequestHandler(); + } + } + }, + /** PrivateFunction: _onRequestStateChange + * _Private_ handler for Strophe.Request state changes. + * + * This function is called when the XMLHttpRequest readyState changes. + * It contains a lot of error handling logic for the many ways that + * requests can fail, and calls the request callback when requests + * succeed. + * + * Parameters: + * (Function) func - The handler for the request. + * (Strophe.Request) req - The request that is changing readyState. + */ + _onRequestStateChange: function(func, req) { + Strophe.debug("request id " + req.id + "." + req.sends + " state changed to " + req.xhr.readyState); + if (req.abort) { + req.abort = false; + return; + } + // request complete + var reqStatus; + if (req.xhr.readyState == 4) { + reqStatus = 0; + try { + reqStatus = req.xhr.status; + } catch (e) {} + if (typeof reqStatus == "undefined") { + reqStatus = 0; + } + if (this.disconnecting) { + if (reqStatus >= 400) { + this._hitError(reqStatus); + return; + } + } + var reqIs0 = this._requests[0] == req; + var reqIs1 = this._requests[1] == req; + if (reqStatus > 0 && reqStatus < 500 || req.sends > 5) { + // remove from internal queue + this._removeRequest(req); + Strophe.debug("request id " + req.id + " should now be removed"); + } + // request succeeded + if (reqStatus == 200) { + // if request 1 finished, or request 0 finished and request + // 1 is over Strophe.SECONDARY_TIMEOUT seconds old, we need to + // restart the other - both will be in the first spot, as the + // completed request has been removed from the queue already + if (reqIs1 || reqIs0 && this._requests.length > 0 && this._requests[0].age() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait)) { + this._restartRequest(0); + } + // call handler + Strophe.debug("request id " + req.id + "." + req.sends + " got 200"); + func(req); + this.errors = 0; + } else { + Strophe.error("request id " + req.id + "." + req.sends + " error " + reqStatus + " happened"); + if (reqStatus === 0 || reqStatus >= 400 && reqStatus < 600 || reqStatus >= 12e3) { + this._hitError(reqStatus); + if (reqStatus >= 400 && reqStatus < 500) { + this._conn._changeConnectStatus(Strophe.Status.DISCONNECTING, null); + this._conn._doDisconnect(); + } + } + } + if (!(reqStatus > 0 && reqStatus < 500 || req.sends > 5)) { + this._throttledRequestHandler(); + } + } + }, + /** PrivateFunction: _processRequest + * _Private_ function to process a request in the queue. + * + * This function takes requests off the queue and sends them and + * restarts dead requests. + * + * Parameters: + * (Integer) i - The index of the request in the queue. + */ + _processRequest: function(i) { + var self = this; + var req = this._requests[i]; + var reqStatus = -1; + try { + if (req.xhr.readyState == 4) { + reqStatus = req.xhr.status; + } + } catch (e) { + Strophe.error("caught an error in _requests[" + i + "], reqStatus: " + reqStatus); + } + if (typeof reqStatus == "undefined") { + reqStatus = -1; + } + // make sure we limit the number of retries + if (req.sends > this.maxRetries) { + this._onDisconnectTimeout(); + return; + } + var time_elapsed = req.age(); + var primaryTimeout = !isNaN(time_elapsed) && time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait); + var secondaryTimeout = req.dead !== null && req.timeDead() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait); + var requestCompletedWithServerError = req.xhr.readyState == 4 && (reqStatus < 1 || reqStatus >= 500); + if (primaryTimeout || secondaryTimeout || requestCompletedWithServerError) { + if (secondaryTimeout) { + Strophe.error("Request " + this._requests[i].id + " timed out (secondary), restarting"); + } + req.abort = true; + req.xhr.abort(); + // setting to null fails on IE6, so set to empty function + req.xhr.onreadystatechange = function() {}; + this._requests[i] = new Strophe.Request(req.xmlData, req.origFunc, req.rid, req.sends); + req = this._requests[i]; + } + if (req.xhr.readyState === 0) { + Strophe.debug("request id " + req.id + "." + req.sends + " posting"); + try { + req.xhr.open("POST", this._conn.service, this._conn.options.sync ? false : true); + } catch (e2) { + Strophe.error("XHR open failed."); + if (!this._conn.connected) { + this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "bad-service"); + } + this._conn.disconnect(); + return; + } + // Fires the XHR request -- may be invoked immediately + // or on a gradually expanding retry window for reconnects + var sendFunc = function() { + req.date = new Date(); + if (self._conn.options.customHeaders) { + var headers = self._conn.options.customHeaders; + for (var header in headers) { + if (headers.hasOwnProperty(header)) { + req.xhr.setRequestHeader(header, headers[header]); + } + } + } + req.xhr.send(req.data); + }; + // Implement progressive backoff for reconnects -- + // First retry (send == 1) should also be instantaneous + if (req.sends > 1) { + // Using a cube of the retry number creates a nicely + // expanding retry window + var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait), Math.pow(req.sends, 3)) * 1e3; + setTimeout(sendFunc, backoff); + } else { + sendFunc(); + } + req.sends++; + if (this._conn.xmlOutput !== Strophe.Connection.prototype.xmlOutput) { + if (req.xmlData.nodeName === this.strip && req.xmlData.childNodes.length) { + this._conn.xmlOutput(req.xmlData.childNodes[0]); + } else { + this._conn.xmlOutput(req.xmlData); + } + } + if (this._conn.rawOutput !== Strophe.Connection.prototype.rawOutput) { + this._conn.rawOutput(req.data); + } + } else { + Strophe.debug("_processRequest: " + (i === 0 ? "first" : "second") + " request has readyState of " + req.xhr.readyState); + } + }, + /** PrivateFunction: _removeRequest + * _Private_ function to remove a request from the queue. + * + * Parameters: + * (Strophe.Request) req - The request to remove. + */ + _removeRequest: function(req) { + Strophe.debug("removing request"); + var i; + for (i = this._requests.length - 1; i >= 0; i--) { + if (req == this._requests[i]) { + this._requests.splice(i, 1); + } + } + // IE6 fails on setting to null, so set to empty function + req.xhr.onreadystatechange = function() {}; + this._throttledRequestHandler(); + }, + /** PrivateFunction: _restartRequest + * _Private_ function to restart a request that is presumed dead. + * + * Parameters: + * (Integer) i - The index of the request in the queue. + */ + _restartRequest: function(i) { + var req = this._requests[i]; + if (req.dead === null) { + req.dead = new Date(); + } + this._processRequest(i); + }, + /** PrivateFunction: _reqToData + * _Private_ function to get a stanza out of a request. + * + * Tries to extract a stanza out of a Request Object. + * When this fails the current connection will be disconnected. + * + * Parameters: + * (Object) req - The Request. + * + * Returns: + * The stanza that was passed. + */ + _reqToData: function(req) { + try { + return req.getResponse(); + } catch (e) { + if (e != "parsererror") { + throw e; + } + this._conn.disconnect("strophe-parsererror"); + } + }, + /** PrivateFunction: _sendTerminate + * _Private_ function to send initial disconnect sequence. + * + * This is the first step in a graceful disconnect. It sends + * the BOSH server a terminate body and includes an unavailable + * presence if authentication has completed. + */ + _sendTerminate: function(pres) { + Strophe.info("_sendTerminate was called"); + var body = this._buildBody().attrs({ + type: "terminate" + }); + if (pres) { + body.cnode(pres.tree()); + } + var req = new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)), body.tree().getAttribute("rid")); + this._requests.push(req); + this._throttledRequestHandler(); + }, + /** PrivateFunction: _send + * _Private_ part of the Connection.send function for BOSH + * + * Just triggers the RequestHandler to send the messages that are in the queue + */ + _send: function() { + clearTimeout(this._conn._idleTimeout); + this._throttledRequestHandler(); + this._conn._idleTimeout = setTimeout(this._conn._onIdle.bind(this._conn), 100); + }, + /** PrivateFunction: _sendRestart + * + * Send an xmpp:restart stanza. + */ + _sendRestart: function() { + this._throttledRequestHandler(); + clearTimeout(this._conn._idleTimeout); + }, + /** PrivateFunction: _throttledRequestHandler + * _Private_ function to throttle requests to the connection window. + * + * This function makes sure we don't send requests so fast that the + * request ids overflow the connection window in the case that one + * request died. + */ + _throttledRequestHandler: function() { + if (!this._requests) { + Strophe.debug("_throttledRequestHandler called with " + "undefined requests"); + } else { + Strophe.debug("_throttledRequestHandler called with " + this._requests.length + " requests"); + } + if (!this._requests || this._requests.length === 0) { + return; + } + if (this._requests.length > 0) { + this._processRequest(0); + } + if (this._requests.length > 1 && Math.abs(this._requests[0].rid - this._requests[1].rid) < this.window) { + this._processRequest(1); + } + } +}; + +/* + This program is distributed under the terms of the MIT license. + Please see the LICENSE file for details. + + Copyright 2006-2008, OGG, LLC +*/ +/* jshint undef: true, unused: true:, noarg: true, latedef: true */ +/*global document, window, clearTimeout, WebSocket, + DOMParser, Strophe, $build */ +/** Class: Strophe.WebSocket + * _Private_ helper class that handles WebSocket Connections + * + * The Strophe.WebSocket class is used internally by Strophe.Connection + * to encapsulate WebSocket sessions. It is not meant to be used from user's code. + */ +/** File: websocket.js + * A JavaScript library to enable XMPP over Websocket in Strophejs. + * + * This file implements XMPP over WebSockets for Strophejs. + * If a Connection is established with a Websocket url (ws://...) + * Strophe will use WebSockets. + * For more information on XMPP-over WebSocket see this RFC draft: + * http://tools.ietf.org/html/draft-ietf-xmpp-websocket-00 + * + * WebSocket support implemented by Andreas Guth (andreas.guth@rwth-aachen.de) + */ +/** PrivateConstructor: Strophe.Websocket + * Create and initialize a Strophe.WebSocket object. + * Currently only sets the connection Object. + * + * Parameters: + * (Strophe.Connection) connection - The Strophe.Connection that will use WebSockets. + * + * Returns: + * A new Strophe.WebSocket object. + */ +Strophe.Websocket = function(connection) { + this._conn = connection; + this.strip = "stream:stream"; + var service = connection.service; + if (service.indexOf("ws:") !== 0 && service.indexOf("wss:") !== 0) { + // If the service is not an absolute URL, assume it is a path and put the absolute + // URL together from options, current URL and the path. + var new_service = ""; + if (connection.options.protocol === "ws" && window.location.protocol !== "https:") { + new_service += "ws"; + } else { + new_service += "wss"; + } + new_service += "://" + window.location.host; + if (service.indexOf("/") !== 0) { + new_service += window.location.pathname + service; + } else { + new_service += service; + } + connection.service = new_service; + } +}; + +Strophe.Websocket.prototype = { + /** PrivateFunction: _buildStream + * _Private_ helper function to generate the start tag for WebSockets + * + * Returns: + * A Strophe.Builder with a element. + */ + _buildStream: function() { + return $build("stream:stream", { + to: this._conn.domain, + xmlns: Strophe.NS.CLIENT, + "xmlns:stream": Strophe.NS.STREAM, + version: "1.0" + }); + }, + /** PrivateFunction: _check_streamerror + * _Private_ checks a message for stream:error + * + * Parameters: + * (Strophe.Request) bodyWrap - The received stanza. + * connectstatus - The ConnectStatus that will be set on error. + * Returns: + * true if there was a streamerror, false otherwise. + */ + _check_streamerror: function(bodyWrap, connectstatus) { + var errors = bodyWrap.getElementsByTagName("stream:error"); + if (errors.length === 0) { + return false; + } + var error = errors[0]; + var condition = ""; + var text = ""; + var ns = "urn:ietf:params:xml:ns:xmpp-streams"; + for (var i = 0; i < error.childNodes.length; i++) { + var e = error.childNodes[i]; + if (e.getAttribute("xmlns") !== ns) { + break; + } + if (e.nodeName === "text") { + text = e.textContent; + } else { + condition = e.nodeName; + } + } + var errorString = "WebSocket stream error: "; + if (condition) { + errorString += condition; + } else { + errorString += "unknown"; + } + if (text) { + errorString += " - " + condition; + } + Strophe.error(errorString); + // close the connection on stream_error + this._conn._changeConnectStatus(connectstatus, condition); + this._conn._doDisconnect(); + return true; + }, + /** PrivateFunction: _reset + * Reset the connection. + * + * This function is called by the reset function of the Strophe Connection. + * Is not needed by WebSockets. + */ + _reset: function() { + return; + }, + /** PrivateFunction: _connect + * _Private_ function called by Strophe.Connection.connect + * + * Creates a WebSocket for a connection and assigns Callbacks to it. + * Does nothing if there already is a WebSocket. + */ + _connect: function() { + // Ensure that there is no open WebSocket from a previous Connection. + this._closeSocket(); + // Create the new WobSocket + this.socket = new WebSocket(this._conn.service, "xmpp"); + this.socket.onopen = this._onOpen.bind(this); + this.socket.onerror = this._onError.bind(this); + this.socket.onclose = this._onClose.bind(this); + this.socket.onmessage = this._connect_cb_wrapper.bind(this); + }, + /** PrivateFunction: _connect_cb + * _Private_ function called by Strophe.Connection._connect_cb + * + * checks for stream:error + * + * Parameters: + * (Strophe.Request) bodyWrap - The received stanza. + */ + _connect_cb: function(bodyWrap) { + var error = this._check_streamerror(bodyWrap, Strophe.Status.CONNFAIL); + if (error) { + return Strophe.Status.CONNFAIL; + } + }, + /** PrivateFunction: _handleStreamStart + * _Private_ function that checks the opening stream:stream tag for errors. + * + * Disconnects if there is an error and returns false, true otherwise. + * + * Parameters: + * (Node) message - Stanza containing the stream:stream. + */ + _handleStreamStart: function(message) { + var error = false; + // Check for errors in the stream:stream tag + var ns = message.getAttribute("xmlns"); + if (typeof ns !== "string") { + error = "Missing xmlns in stream:stream"; + } else if (ns !== Strophe.NS.CLIENT) { + error = "Wrong xmlns in stream:stream: " + ns; + } + var ns_stream = message.namespaceURI; + if (typeof ns_stream !== "string") { + error = "Missing xmlns:stream in stream:stream"; + } else if (ns_stream !== Strophe.NS.STREAM) { + error = "Wrong xmlns:stream in stream:stream: " + ns_stream; + } + var ver = message.getAttribute("version"); + if (typeof ver !== "string") { + error = "Missing version in stream:stream"; + } else if (ver !== "1.0") { + error = "Wrong version in stream:stream: " + ver; + } + if (error) { + this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, error); + this._conn._doDisconnect(); + return false; + } + return true; + }, + /** PrivateFunction: _connect_cb_wrapper + * _Private_ function that handles the first connection messages. + * + * On receiving an opening stream tag this callback replaces itself with the real + * message handler. On receiving a stream error the connection is terminated. + */ + _connect_cb_wrapper: function(message) { + if (message.data.indexOf("\s*)*/, ""); + if (data === "") return; + //Make the initial stream:stream selfclosing to parse it without a SAX parser. + data = message.data.replace(//, ""); + var streamStart = new DOMParser().parseFromString(data, "text/xml").documentElement; + this._conn.xmlInput(streamStart); + this._conn.rawInput(message.data); + //_handleStreamSteart will check for XML errors and disconnect on error + if (this._handleStreamStart(streamStart)) { + //_connect_cb will check for stream:error and disconnect on error + this._connect_cb(streamStart); + // ensure received stream:stream is NOT selfclosing and save it for following messages + this.streamStart = message.data.replace(/^$/, ""); + } + } else if (message.data === "") { + this._conn.rawInput(message.data); + this._conn.xmlInput(document.createElement("stream:stream")); + this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Received closing stream"); + this._conn._doDisconnect(); + return; + } else { + var string = this._streamWrap(message.data); + var elem = new DOMParser().parseFromString(string, "text/xml").documentElement; + this.socket.onmessage = this._onMessage.bind(this); + this._conn._connect_cb(elem, null, message.data); + } + }, + /** PrivateFunction: _disconnect + * _Private_ function called by Strophe.Connection.disconnect + * + * Disconnects and sends a last stanza if one is given + * + * Parameters: + * (Request) pres - This stanza will be sent before disconnecting. + */ + _disconnect: function(pres) { + if (this.socket.readyState !== WebSocket.CLOSED) { + if (pres) { + this._conn.send(pres); + } + var close = ""; + this._conn.xmlOutput(document.createElement("stream:stream")); + this._conn.rawOutput(close); + try { + this.socket.send(close); + } catch (e) { + Strophe.info("Couldn't send closing stream tag."); + } + } + this._conn._doDisconnect(); + }, + /** PrivateFunction: _doDisconnect + * _Private_ function to disconnect. + * + * Just closes the Socket for WebSockets + */ + _doDisconnect: function() { + Strophe.info("WebSockets _doDisconnect was called"); + this._closeSocket(); + }, + /** PrivateFunction _streamWrap + * _Private_ helper function to wrap a stanza in a tag. + * This is used so Strophe can process stanzas from WebSockets like BOSH + */ + _streamWrap: function(stanza) { + return this.streamStart + stanza + ""; + }, + /** PrivateFunction: _closeSocket + * _Private_ function to close the WebSocket. + * + * Closes the socket if it is still open and deletes it + */ + _closeSocket: function() { + if (this.socket) { + try { + this.socket.close(); + } catch (e) {} + } + this.socket = null; + }, + /** PrivateFunction: _emptyQueue + * _Private_ function to check if the message queue is empty. + * + * Returns: + * True, because WebSocket messages are send immediately after queueing. + */ + _emptyQueue: function() { + return true; + }, + /** PrivateFunction: _onClose + * _Private_ function to handle websockets closing. + * + * Nothing to do here for WebSockets + */ + _onClose: function() { + if (this._conn.connected && !this._conn.disconnecting) { + Strophe.error("Websocket closed unexcectedly"); + this._conn._doDisconnect(); + } else { + Strophe.info("Websocket closed"); + } + }, + /** PrivateFunction: _no_auth_received + * + * Called on stream start/restart when no stream:features + * has been received. + */ + _no_auth_received: function(_callback) { + Strophe.error("Server did not send any auth methods"); + this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Server did not send any auth methods"); + if (_callback) { + _callback = _callback.bind(this._conn); + _callback(); + } + this._conn._doDisconnect(); + }, + /** PrivateFunction: _onDisconnectTimeout + * _Private_ timeout handler for handling non-graceful disconnection. + * + * This does nothing for WebSockets + */ + _onDisconnectTimeout: function() {}, + /** PrivateFunction: _onError + * _Private_ function to handle websockets errors. + * + * Parameters: + * (Object) error - The websocket error. + */ + _onError: function(error) { + Strophe.error("Websocket error " + error); + this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established was disconnected."); + this._disconnect(); + }, + /** PrivateFunction: _onIdle + * _Private_ function called by Strophe.Connection._onIdle + * + * sends all queued stanzas + */ + _onIdle: function() { + var data = this._conn._data; + if (data.length > 0 && !this._conn.paused) { + for (var i = 0; i < data.length; i++) { + if (data[i] !== null) { + var stanza, rawStanza; + if (data[i] === "restart") { + stanza = this._buildStream(); + rawStanza = this._removeClosingTag(stanza); + stanza = stanza.tree(); + } else { + stanza = data[i]; + rawStanza = Strophe.serialize(stanza); + } + this._conn.xmlOutput(stanza); + this._conn.rawOutput(rawStanza); + this.socket.send(rawStanza); + } + } + this._conn._data = []; + } + }, + /** PrivateFunction: _onMessage + * _Private_ function to handle websockets messages. + * + * This function parses each of the messages as if they are full documents. [TODO : We may actually want to use a SAX Push parser]. + * + * Since all XMPP traffic starts with "" + * The first stanza will always fail to be parsed... + * Addtionnaly, the seconds stanza will always be a with the stream NS defined in the previous stanza... so we need to 'force' the inclusion of the NS in this stanza! + * + * Parameters: + * (string) message - The websocket message. + */ + _onMessage: function(message) { + var elem, data; + // check for closing stream + if (message.data === "") { + var close = ""; + this._conn.rawInput(close); + this._conn.xmlInput(document.createElement("stream:stream")); + if (!this._conn.disconnecting) { + this._conn._doDisconnect(); + } + return; + } else if (message.data.search("/, ""); + elem = new DOMParser().parseFromString(data, "text/xml").documentElement; + if (!this._handleStreamStart(elem)) { + return; + } + } else { + data = this._streamWrap(message.data); + elem = new DOMParser().parseFromString(data, "text/xml").documentElement; + } + if (this._check_streamerror(elem, Strophe.Status.ERROR)) { + return; + } + //handle unavailable presence stanza before disconnecting + if (this._conn.disconnecting && elem.firstChild.nodeName === "presence" && elem.firstChild.getAttribute("type") === "unavailable") { + this._conn.xmlInput(elem); + this._conn.rawInput(Strophe.serialize(elem)); + // if we are already disconnecting we will ignore the unavailable stanza and + // wait for the tag before we close the connection + return; + } + this._conn._dataRecv(elem, message.data); + }, + /** PrivateFunction: _onOpen + * _Private_ function to handle websockets connection setup. + * + * The opening stream tag is sent here. + */ + _onOpen: function() { + Strophe.info("Websocket open"); + var start = this._buildStream(); + this._conn.xmlOutput(start.tree()); + var startString = this._removeClosingTag(start); + this._conn.rawOutput(startString); + this.socket.send(startString); + }, + /** PrivateFunction: _removeClosingTag + * _Private_ function to Make the first non-selfclosing + * + * Parameters: + * (Object) elem - The tag. + * + * Returns: + * The stream:stream tag as String + */ + _removeClosingTag: function(elem) { + var string = Strophe.serialize(elem); + string = string.replace(/<(stream:stream .*[^\/])\/>$/, "<$1>"); + return string; + }, + /** PrivateFunction: _reqToData + * _Private_ function to get a stanza out of a request. + * + * WebSockets don't use requests, so the passed argument is just returned. + * + * Parameters: + * (Object) stanza - The stanza. + * + * Returns: + * The stanza that was passed. + */ + _reqToData: function(stanza) { + return stanza; + }, + /** PrivateFunction: _send + * _Private_ part of the Connection.send function for WebSocket + * + * Just flushes the messages that are in the queue + */ + _send: function() { + this._conn.flush(); + }, + /** PrivateFunction: _sendRestart + * + * Send an xmpp:restart stanza. + */ + _sendRestart: function() { + clearTimeout(this._conn._idleTimeout); + this._conn._onIdle.bind(this._conn)(); + } +}; + +// Generated by CoffeeScript 1.7.1 +/* + *Plugin to implement the MUC extension. + http://xmpp.org/extensions/xep-0045.html + *Previous Author: + Nathan Zorn + *Complete CoffeeScript rewrite: + Andreas Guth + */ +(function() { + var Occupant, RoomConfig, XmppRoom, __bind = function(fn, me) { + return function() { + return fn.apply(me, arguments); + }; + }; + Strophe.addConnectionPlugin("muc", { + _connection: null, + rooms: {}, + roomNames: [], + /*Function + Initialize the MUC plugin. Sets the correct connection object and + extends the namesace. + */ + init: function(conn) { + this._connection = conn; + this._muc_handler = null; + Strophe.addNamespace("MUC_OWNER", Strophe.NS.MUC + "#owner"); + Strophe.addNamespace("MUC_ADMIN", Strophe.NS.MUC + "#admin"); + Strophe.addNamespace("MUC_USER", Strophe.NS.MUC + "#user"); + return Strophe.addNamespace("MUC_ROOMCONF", Strophe.NS.MUC + "#roomconfig"); + }, + /*Function + Join a multi-user chat room + Parameters: + (String) room - The multi-user chat room to join. + (String) nick - The nickname to use in the chat room. Optional + (Function) msg_handler_cb - The function call to handle messages from the + specified chat room. + (Function) pres_handler_cb - The function call back to handle presence + in the chat room. + (Function) roster_cb - The function call to handle roster info in the chat room + (String) password - The optional password to use. (password protected + rooms only) + (Object) history_attrs - Optional attributes for retrieving history + (XML DOM Element) extended_presence - Optional XML for extending presence + */ + join: function(room, nick, msg_handler_cb, pres_handler_cb, roster_cb, password, history_attrs) { + var msg, room_nick; + room_nick = this.test_append_nick(room, nick); + msg = $pres({ + from: this._connection.jid, + to: room_nick + }).c("x", { + xmlns: Strophe.NS.MUC + }); + if (history_attrs != null) { + msg = msg.c("history", history_attrs).up; + } + if (password != null) { + msg.cnode(Strophe.xmlElement("password", [], password)); + } + if (typeof extended_presence !== "undefined" && extended_presence !== null) { + msg.up.cnode(extended_presence); + } + if (this._muc_handler == null) { + this._muc_handler = this._connection.addHandler(function(_this) { + return function(stanza) { + var from, handler, handlers, id, roomname, x, xmlns, xquery, _i, _len; + from = stanza.getAttribute("from"); + if (!from) { + return true; + } + roomname = from.split("/")[0]; + if (!_this.rooms[roomname]) { + return true; + } + room = _this.rooms[roomname]; + handlers = {}; + if (stanza.nodeName === "message") { + handlers = room._message_handlers; + } else if (stanza.nodeName === "presence") { + xquery = stanza.getElementsByTagName("x"); + if (xquery.length > 0) { + for (_i = 0, _len = xquery.length; _i < _len; _i++) { + x = xquery[_i]; + xmlns = x.getAttribute("xmlns"); + if (xmlns && xmlns.match(Strophe.NS.MUC)) { + handlers = room._presence_handlers; + break; + } + } + } + } + for (id in handlers) { + handler = handlers[id]; + if (!handler(stanza, room)) { + delete handlers[id]; + } + } + return true; + }; + }(this)); + } + if (!this.rooms.hasOwnProperty(room)) { + this.rooms[room] = new XmppRoom(this, room, nick, password); + this.roomNames.push(room); + } + if (pres_handler_cb) { + this.rooms[room].addHandler("presence", pres_handler_cb); + } + if (msg_handler_cb) { + this.rooms[room].addHandler("message", msg_handler_cb); + } + if (roster_cb) { + this.rooms[room].addHandler("roster", roster_cb); + } + return this._connection.send(msg); + }, + /*Function + Leave a multi-user chat room + Parameters: + (String) room - The multi-user chat room to leave. + (String) nick - The nick name used in the room. + (Function) handler_cb - Optional function to handle the successful leave. + (String) exit_msg - optional exit message. + Returns: + iqid - The unique id for the room leave. + */ + leave: function(room, nick, handler_cb, exit_msg) { + var id, presence, presenceid, room_nick; + id = this.roomNames.indexOf(room); + delete this.rooms[room]; + if (id >= 0) { + this.roomNames.splice(id, 1); + if (this.roomNames.length === 0) { + this._connection.deleteHandler(this._muc_handler); + this._muc_handler = null; + } + } + room_nick = this.test_append_nick(room, nick); + presenceid = this._connection.getUniqueId(); + presence = $pres({ + type: "unavailable", + id: presenceid, + from: this._connection.jid, + to: room_nick + }); + if (exit_msg != null) { + presence.c("status", exit_msg); + } + if (handler_cb != null) { + this._connection.addHandler(handler_cb, null, "presence", null, presenceid); + } + this._connection.send(presence); + return presenceid; + }, + /*Function + Parameters: + (String) room - The multi-user chat room name. + (String) nick - The nick name used in the chat room. + (String) message - The plaintext message to send to the room. + (String) html_message - The message to send to the room with html markup. + (String) type - "groupchat" for group chat messages o + "chat" for private chat messages + Returns: + msgiq - the unique id used to send the message + */ + message: function(room, nick, message, html_message, type) { + var msg, msgid, parent, room_nick; + room_nick = this.test_append_nick(room, nick); + type = type || (nick != null ? "chat" : "groupchat"); + msgid = this._connection.getUniqueId(); + msg = $msg({ + to: room_nick, + from: this._connection.jid, + type: type, + id: msgid + }).c("body", { + xmlns: Strophe.NS.CLIENT + }).t(message); + msg.up(); + if (html_message != null) { + msg.c("html", { + xmlns: Strophe.NS.XHTML_IM + }).c("body", { + xmlns: Strophe.NS.XHTML + }).h(html_message); + if (msg.node.childNodes.length === 0) { + parent = msg.node.parentNode; + msg.up().up(); + msg.node.removeChild(parent); + } else { + msg.up().up(); + } + } + msg.c("x", { + xmlns: "jabber:x:event" + }).c("composing"); + this._connection.send(msg); + return msgid; + }, + /*Function + Convenience Function to send a Message to all Occupants + Parameters: + (String) room - The multi-user chat room name. + (String) message - The plaintext message to send to the room. + (String) html_message - The message to send to the room with html markup. + Returns: + msgiq - the unique id used to send the message + */ + groupchat: function(room, message, html_message) { + return this.message(room, null, message, html_message); + }, + /*Function + Send a mediated invitation. + Parameters: + (String) room - The multi-user chat room name. + (String) receiver - The invitation's receiver. + (String) reason - Optional reason for joining the room. + Returns: + msgiq - the unique id used to send the invitation + */ + invite: function(room, receiver, reason) { + var invitation, msgid; + msgid = this._connection.getUniqueId(); + invitation = $msg({ + from: this._connection.jid, + to: room, + id: msgid + }).c("x", { + xmlns: Strophe.NS.MUC_USER + }).c("invite", { + to: receiver + }); + if (reason != null) { + invitation.c("reason", reason); + } + this._connection.send(invitation); + return msgid; + }, + /*Function + Send a direct invitation. + Parameters: + (String) room - The multi-user chat room name. + (String) receiver - The invitation's receiver. + (String) reason - Optional reason for joining the room. + (String) password - Optional password for the room. + Returns: + msgiq - the unique id used to send the invitation + */ + directInvite: function(room, receiver, reason, password) { + var attrs, invitation, msgid; + msgid = this._connection.getUniqueId(); + attrs = { + xmlns: "jabber:x:conference", + jid: room + }; + if (reason != null) { + attrs.reason = reason; + } + if (password != null) { + attrs.password = password; + } + invitation = $msg({ + from: this._connection.jid, + to: receiver, + id: msgid + }).c("x", attrs); + this._connection.send(invitation); + return msgid; + }, + /*Function + Queries a room for a list of occupants + (String) room - The multi-user chat room name. + (Function) success_cb - Optional function to handle the info. + (Function) error_cb - Optional function to handle an error. + Returns: + id - the unique id used to send the info request + */ + queryOccupants: function(room, success_cb, error_cb) { + var attrs, info; + attrs = { + xmlns: Strophe.NS.DISCO_ITEMS + }; + info = $iq({ + from: this._connection.jid, + to: room, + type: "get" + }).c("query", attrs); + return this._connection.sendIQ(info, success_cb, error_cb); + }, + /*Function + Start a room configuration. + Parameters: + (String) room - The multi-user chat room name. + (Function) handler_cb - Optional function to handle the config form. + Returns: + id - the unique id used to send the configuration request + */ + configure: function(room, handler_cb, error_cb) { + var config, stanza; + config = $iq({ + to: room, + type: "get" + }).c("query", { + xmlns: Strophe.NS.MUC_OWNER + }); + stanza = config.tree(); + return this._connection.sendIQ(stanza, handler_cb, error_cb); + }, + /*Function + Cancel the room configuration + Parameters: + (String) room - The multi-user chat room name. + Returns: + id - the unique id used to cancel the configuration. + */ + cancelConfigure: function(room) { + var config, stanza; + config = $iq({ + to: room, + type: "set" + }).c("query", { + xmlns: Strophe.NS.MUC_OWNER + }).c("x", { + xmlns: "jabber:x:data", + type: "cancel" + }); + stanza = config.tree(); + return this._connection.sendIQ(stanza); + }, + /*Function + Save a room configuration. + Parameters: + (String) room - The multi-user chat room name. + (Array) config- Form Object or an array of form elements used to configure the room. + Returns: + id - the unique id used to save the configuration. + */ + saveConfiguration: function(room, config, success_cb, error_cb) { + var conf, iq, stanza, _i, _len; + iq = $iq({ + to: room, + type: "set" + }).c("query", { + xmlns: Strophe.NS.MUC_OWNER + }); + if (typeof Form !== "undefined" && config instanceof Form) { + config.type = "submit"; + iq.cnode(config.toXML()); + } else { + iq.c("x", { + xmlns: "jabber:x:data", + type: "submit" + }); + for (_i = 0, _len = config.length; _i < _len; _i++) { + conf = config[_i]; + iq.cnode(conf).up(); + } + } + stanza = iq.tree(); + return this._connection.sendIQ(stanza, success_cb, error_cb); + }, + /*Function + Parameters: + (String) room - The multi-user chat room name. + Returns: + id - the unique id used to create the chat room. + */ + createInstantRoom: function(room, success_cb, error_cb) { + var roomiq; + roomiq = $iq({ + to: room, + type: "set" + }).c("query", { + xmlns: Strophe.NS.MUC_OWNER + }).c("x", { + xmlns: "jabber:x:data", + type: "submit" + }); + return this._connection.sendIQ(roomiq.tree(), success_cb, error_cb); + }, + /*Function + Set the topic of the chat room. + Parameters: + (String) room - The multi-user chat room name. + (String) topic - Topic message. + */ + setTopic: function(room, topic) { + var msg; + msg = $msg({ + to: room, + from: this._connection.jid, + type: "groupchat" + }).c("subject", { + xmlns: "jabber:client" + }).t(topic); + return this._connection.send(msg.tree()); + }, + /*Function + Internal Function that Changes the role or affiliation of a member + of a MUC room. This function is used by modifyRole and modifyAffiliation. + The modification can only be done by a room moderator. An error will be + returned if the user doesn't have permission. + Parameters: + (String) room - The multi-user chat room name. + (Object) item - Object with nick and role or jid and affiliation attribute + (String) reason - Optional reason for the change. + (Function) handler_cb - Optional callback for success + (Function) error_cb - Optional callback for error + Returns: + iq - the id of the mode change request. + */ + _modifyPrivilege: function(room, item, reason, handler_cb, error_cb) { + var iq; + iq = $iq({ + to: room, + type: "set" + }).c("query", { + xmlns: Strophe.NS.MUC_ADMIN + }).cnode(item.node); + if (reason != null) { + iq.c("reason", reason); + } + return this._connection.sendIQ(iq.tree(), handler_cb, error_cb); + }, + /*Function + Changes the role of a member of a MUC room. + The modification can only be done by a room moderator. An error will be + returned if the user doesn't have permission. + Parameters: + (String) room - The multi-user chat room name. + (String) nick - The nick name of the user to modify. + (String) role - The new role of the user. + (String) affiliation - The new affiliation of the user. + (String) reason - Optional reason for the change. + (Function) handler_cb - Optional callback for success + (Function) error_cb - Optional callback for error + Returns: + iq - the id of the mode change request. + */ + modifyRole: function(room, nick, role, reason, handler_cb, error_cb) { + var item; + item = $build("item", { + nick: nick, + role: role + }); + return this._modifyPrivilege(room, item, reason, handler_cb, error_cb); + }, + kick: function(room, nick, reason, handler_cb, error_cb) { + return this.modifyRole(room, nick, "none", reason, handler_cb, error_cb); + }, + voice: function(room, nick, reason, handler_cb, error_cb) { + return this.modifyRole(room, nick, "participant", reason, handler_cb, error_cb); + }, + mute: function(room, nick, reason, handler_cb, error_cb) { + return this.modifyRole(room, nick, "visitor", reason, handler_cb, error_cb); + }, + op: function(room, nick, reason, handler_cb, error_cb) { + return this.modifyRole(room, nick, "moderator", reason, handler_cb, error_cb); + }, + deop: function(room, nick, reason, handler_cb, error_cb) { + return this.modifyRole(room, nick, "participant", reason, handler_cb, error_cb); + }, + /*Function + Changes the affiliation of a member of a MUC room. + The modification can only be done by a room moderator. An error will be + returned if the user doesn't have permission. + Parameters: + (String) room - The multi-user chat room name. + (String) jid - The jid of the user to modify. + (String) affiliation - The new affiliation of the user. + (String) reason - Optional reason for the change. + (Function) handler_cb - Optional callback for success + (Function) error_cb - Optional callback for error + Returns: + iq - the id of the mode change request. + */ + modifyAffiliation: function(room, jid, affiliation, reason, handler_cb, error_cb) { + var item; + item = $build("item", { + jid: jid, + affiliation: affiliation + }); + return this._modifyPrivilege(room, item, reason, handler_cb, error_cb); + }, + ban: function(room, jid, reason, handler_cb, error_cb) { + return this.modifyAffiliation(room, jid, "outcast", reason, handler_cb, error_cb); + }, + member: function(room, jid, reason, handler_cb, error_cb) { + return this.modifyAffiliation(room, jid, "member", reason, handler_cb, error_cb); + }, + revoke: function(room, jid, reason, handler_cb, error_cb) { + return this.modifyAffiliation(room, jid, "none", reason, handler_cb, error_cb); + }, + owner: function(room, jid, reason, handler_cb, error_cb) { + return this.modifyAffiliation(room, jid, "owner", reason, handler_cb, error_cb); + }, + admin: function(room, jid, reason, handler_cb, error_cb) { + return this.modifyAffiliation(room, jid, "admin", reason, handler_cb, error_cb); + }, + /*Function + Change the current users nick name. + Parameters: + (String) room - The multi-user chat room name. + (String) user - The new nick name. + */ + changeNick: function(room, user) { + var presence, room_nick; + room_nick = this.test_append_nick(room, user); + presence = $pres({ + from: this._connection.jid, + to: room_nick, + id: this._connection.getUniqueId() + }); + return this._connection.send(presence.tree()); + }, + /*Function + Change the current users status. + Parameters: + (String) room - The multi-user chat room name. + (String) user - The current nick. + (String) show - The new show-text. + (String) status - The new status-text. + */ + setStatus: function(room, user, show, status) { + var presence, room_nick; + room_nick = this.test_append_nick(room, user); + presence = $pres({ + from: this._connection.jid, + to: room_nick + }); + if (show != null) { + presence.c("show", show).up(); + } + if (status != null) { + presence.c("status", status); + } + return this._connection.send(presence.tree()); + }, + /*Function + List all chat room available on a server. + Parameters: + (String) server - name of chat server. + (String) handle_cb - Function to call for room list return. + (String) error_cb - Function to call on error. + */ + listRooms: function(server, handle_cb, error_cb) { + var iq; + iq = $iq({ + to: server, + from: this._connection.jid, + type: "get" + }).c("query", { + xmlns: Strophe.NS.DISCO_ITEMS + }); + return this._connection.sendIQ(iq, handle_cb, error_cb); + }, + test_append_nick: function(room, nick) { + var domain, node; + node = Strophe.escapeNode(Strophe.getNodeFromJid(room)); + domain = Strophe.getDomainFromJid(room); + return node + "@" + domain + (nick != null ? "/" + nick : ""); + } + }); + XmppRoom = function() { + function XmppRoom(client, name, nick, password) { + this.client = client; + this.name = name; + this.nick = nick; + this.password = password; + this._roomRosterHandler = __bind(this._roomRosterHandler, this); + this._addOccupant = __bind(this._addOccupant, this); + this.roster = {}; + this._message_handlers = {}; + this._presence_handlers = {}; + this._roster_handlers = {}; + this._handler_ids = 0; + if (client.muc) { + this.client = client.muc; + } + this.name = Strophe.getBareJidFromJid(name); + this.addHandler("presence", this._roomRosterHandler); + } + XmppRoom.prototype.join = function(msg_handler_cb, pres_handler_cb, roster_cb) { + return this.client.join(this.name, this.nick, msg_handler_cb, pres_handler_cb, roster_cb, this.password); + }; + XmppRoom.prototype.leave = function(handler_cb, message) { + this.client.leave(this.name, this.nick, handler_cb, message); + return delete this.client.rooms[this.name]; + }; + XmppRoom.prototype.message = function(nick, message, html_message, type) { + return this.client.message(this.name, nick, message, html_message, type); + }; + XmppRoom.prototype.groupchat = function(message, html_message) { + return this.client.groupchat(this.name, message, html_message); + }; + XmppRoom.prototype.invite = function(receiver, reason) { + return this.client.invite(this.name, receiver, reason); + }; + XmppRoom.prototype.directInvite = function(receiver, reason) { + return this.client.directInvite(this.name, receiver, reason, this.password); + }; + XmppRoom.prototype.configure = function(handler_cb) { + return this.client.configure(this.name, handler_cb); + }; + XmppRoom.prototype.cancelConfigure = function() { + return this.client.cancelConfigure(this.name); + }; + XmppRoom.prototype.saveConfiguration = function(config) { + return this.client.saveConfiguration(this.name, config); + }; + XmppRoom.prototype.queryOccupants = function(success_cb, error_cb) { + return this.client.queryOccupants(this.name, success_cb, error_cb); + }; + XmppRoom.prototype.setTopic = function(topic) { + return this.client.setTopic(this.name, topic); + }; + XmppRoom.prototype.modifyRole = function(nick, role, reason, success_cb, error_cb) { + return this.client.modifyRole(this.name, nick, role, reason, success_cb, error_cb); + }; + XmppRoom.prototype.kick = function(nick, reason, handler_cb, error_cb) { + return this.client.kick(this.name, nick, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.voice = function(nick, reason, handler_cb, error_cb) { + return this.client.voice(this.name, nick, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.mute = function(nick, reason, handler_cb, error_cb) { + return this.client.mute(this.name, nick, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.op = function(nick, reason, handler_cb, error_cb) { + return this.client.op(this.name, nick, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.deop = function(nick, reason, handler_cb, error_cb) { + return this.client.deop(this.name, nick, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.modifyAffiliation = function(jid, affiliation, reason, success_cb, error_cb) { + return this.client.modifyAffiliation(this.name, jid, affiliation, reason, success_cb, error_cb); + }; + XmppRoom.prototype.ban = function(jid, reason, handler_cb, error_cb) { + return this.client.ban(this.name, jid, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.member = function(jid, reason, handler_cb, error_cb) { + return this.client.member(this.name, jid, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.revoke = function(jid, reason, handler_cb, error_cb) { + return this.client.revoke(this.name, jid, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.owner = function(jid, reason, handler_cb, error_cb) { + return this.client.owner(this.name, jid, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.admin = function(jid, reason, handler_cb, error_cb) { + return this.client.admin(this.name, jid, reason, handler_cb, error_cb); + }; + XmppRoom.prototype.changeNick = function(nick) { + this.nick = nick; + return this.client.changeNick(this.name, nick); + }; + XmppRoom.prototype.setStatus = function(show, status) { + return this.client.setStatus(this.name, this.nick, show, status); + }; + /*Function + Adds a handler to the MUC room. + Parameters: + (String) handler_type - 'message', 'presence' or 'roster'. + (Function) handler - The handler function. + Returns: + id - the id of handler. + */ + XmppRoom.prototype.addHandler = function(handler_type, handler) { + var id; + id = this._handler_ids++; + switch (handler_type) { + case "presence": + this._presence_handlers[id] = handler; + break; + + case "message": + this._message_handlers[id] = handler; + break; + + case "roster": + this._roster_handlers[id] = handler; + break; + + default: + this._handler_ids--; + return null; + } + return id; + }; + /*Function + Removes a handler from the MUC room. + This function takes ONLY ids returned by the addHandler function + of this room. passing handler ids returned by connection.addHandler + may brake things! + Parameters: + (number) id - the id of the handler + */ + XmppRoom.prototype.removeHandler = function(id) { + delete this._presence_handlers[id]; + delete this._message_handlers[id]; + return delete this._roster_handlers[id]; + }; + /*Function + Creates and adds an Occupant to the Room Roster. + Parameters: + (Object) data - the data the Occupant is filled with + Returns: + occ - the created Occupant. + */ + XmppRoom.prototype._addOccupant = function(data) { + var occ; + occ = new Occupant(data, this); + this.roster[occ.nick] = occ; + return occ; + }; + /*Function + The standard handler that managed the Room Roster. + Parameters: + (Object) pres - the presence stanza containing user information + */ + XmppRoom.prototype._roomRosterHandler = function(pres) { + var data, handler, id, newnick, nick, _ref; + data = XmppRoom._parsePresence(pres); + nick = data.nick; + newnick = data.newnick || null; + switch (data.type) { + case "error": + return; + + case "unavailable": + if (newnick) { + data.nick = newnick; + if (this.roster[nick] && this.roster[newnick]) { + this.roster[nick].update(this.roster[newnick]); + this.roster[newnick] = this.roster[nick]; + } + if (this.roster[nick] && !this.roster[newnick]) { + this.roster[newnick] = this.roster[nick].update(data); + } + } + delete this.roster[nick]; + break; + + default: + if (this.roster[nick]) { + this.roster[nick].update(data); + } else { + this._addOccupant(data); + } + } + _ref = this._roster_handlers; + for (id in _ref) { + handler = _ref[id]; + if (!handler(this.roster, this)) { + delete this._roster_handlers[id]; + } + } + return true; + }; + /*Function + Parses a presence stanza + Parameters: + (Object) data - the data extracted from the presence stanza + */ + XmppRoom._parsePresence = function(pres) { + var a, c, c2, data, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + data = {}; + a = pres.attributes; + data.nick = Strophe.getResourceFromJid(a.from.textContent); + data.type = ((_ref = a.type) != null ? _ref.textContent : void 0) || null; + data.states = []; + _ref1 = pres.childNodes; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + c = _ref1[_i]; + switch (c.nodeName) { + case "status": + data.status = c.textContent || null; + break; + + case "show": + data.show = c.textContent || null; + break; + + case "x": + a = c.attributes; + if (((_ref2 = a.xmlns) != null ? _ref2.textContent : void 0) === Strophe.NS.MUC_USER) { + _ref3 = c.childNodes; + for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { + c2 = _ref3[_j]; + switch (c2.nodeName) { + case "item": + a = c2.attributes; + data.affiliation = ((_ref4 = a.affiliation) != null ? _ref4.textContent : void 0) || null; + data.role = ((_ref5 = a.role) != null ? _ref5.textContent : void 0) || null; + data.jid = ((_ref6 = a.jid) != null ? _ref6.textContent : void 0) || null; + data.newnick = ((_ref7 = a.nick) != null ? _ref7.textContent : void 0) || null; + break; + + case "status": + if (c2.attributes.code) { + data.states.push(c2.attributes.code.textContent); + } + } + } + } + } + } + return data; + }; + return XmppRoom; + }(); + RoomConfig = function() { + function RoomConfig(info) { + this.parse = __bind(this.parse, this); + if (info != null) { + this.parse(info); + } + } + RoomConfig.prototype.parse = function(result) { + var attr, attrs, child, field, identity, query, _i, _j, _k, _len, _len1, _len2, _ref; + query = result.getElementsByTagName("query")[0].childNodes; + this.identities = []; + this.features = []; + this.x = []; + for (_i = 0, _len = query.length; _i < _len; _i++) { + child = query[_i]; + attrs = child.attributes; + switch (child.nodeName) { + case "identity": + identity = {}; + for (_j = 0, _len1 = attrs.length; _j < _len1; _j++) { + attr = attrs[_j]; + identity[attr.name] = attr.textContent; + } + this.identities.push(identity); + break; + + case "feature": + this.features.push(attrs["var"].textContent); + break; + + case "x": + attrs = child.childNodes[0].attributes; + if (!attrs["var"].textContent === "FORM_TYPE" || !attrs.type.textContent === "hidden") { + break; + } + _ref = child.childNodes; + for (_k = 0, _len2 = _ref.length; _k < _len2; _k++) { + field = _ref[_k]; + if (!!field.attributes.type) { + continue; + } + attrs = field.attributes; + this.x.push({ + "var": attrs["var"].textContent, + label: attrs.label.textContent || "", + value: field.firstChild.textContent || "" + }); + } + } + } + return { + identities: this.identities, + features: this.features, + x: this.x + }; + }; + return RoomConfig; + }(); + Occupant = function() { + function Occupant(data, room) { + this.room = room; + this.update = __bind(this.update, this); + this.admin = __bind(this.admin, this); + this.owner = __bind(this.owner, this); + this.revoke = __bind(this.revoke, this); + this.member = __bind(this.member, this); + this.ban = __bind(this.ban, this); + this.modifyAffiliation = __bind(this.modifyAffiliation, this); + this.deop = __bind(this.deop, this); + this.op = __bind(this.op, this); + this.mute = __bind(this.mute, this); + this.voice = __bind(this.voice, this); + this.kick = __bind(this.kick, this); + this.modifyRole = __bind(this.modifyRole, this); + this.update(data); + } + Occupant.prototype.modifyRole = function(role, reason, success_cb, error_cb) { + return this.room.modifyRole(this.nick, role, reason, success_cb, error_cb); + }; + Occupant.prototype.kick = function(reason, handler_cb, error_cb) { + return this.room.kick(this.nick, reason, handler_cb, error_cb); + }; + Occupant.prototype.voice = function(reason, handler_cb, error_cb) { + return this.room.voice(this.nick, reason, handler_cb, error_cb); + }; + Occupant.prototype.mute = function(reason, handler_cb, error_cb) { + return this.room.mute(this.nick, reason, handler_cb, error_cb); + }; + Occupant.prototype.op = function(reason, handler_cb, error_cb) { + return this.room.op(this.nick, reason, handler_cb, error_cb); + }; + Occupant.prototype.deop = function(reason, handler_cb, error_cb) { + return this.room.deop(this.nick, reason, handler_cb, error_cb); + }; + Occupant.prototype.modifyAffiliation = function(affiliation, reason, success_cb, error_cb) { + return this.room.modifyAffiliation(this.jid, affiliation, reason, success_cb, error_cb); + }; + Occupant.prototype.ban = function(reason, handler_cb, error_cb) { + return this.room.ban(this.jid, reason, handler_cb, error_cb); + }; + Occupant.prototype.member = function(reason, handler_cb, error_cb) { + return this.room.member(this.jid, reason, handler_cb, error_cb); + }; + Occupant.prototype.revoke = function(reason, handler_cb, error_cb) { + return this.room.revoke(this.jid, reason, handler_cb, error_cb); + }; + Occupant.prototype.owner = function(reason, handler_cb, error_cb) { + return this.room.owner(this.jid, reason, handler_cb, error_cb); + }; + Occupant.prototype.admin = function(reason, handler_cb, error_cb) { + return this.room.admin(this.jid, reason, handler_cb, error_cb); + }; + Occupant.prototype.update = function(data) { + this.nick = data.nick || null; + this.affiliation = data.affiliation || null; + this.role = data.role || null; + this.jid = data.jid || null; + this.status = data.status || null; + this.show = data.show || null; + return this; + }; + return Occupant; + }(); +}).call(this); + +/* + Copyright 2010, François de Metz +*/ +/** + * Roster Plugin + * Allow easily roster management + * + * Features + * * Get roster from server + * * handle presence + * * handle roster iq + * * subscribe/unsubscribe + * * authorize/unauthorize + * * roster versioning (xep 237) + */ +Strophe.addConnectionPlugin("roster", { + /** Function: init + * Plugin init + * + * Parameters: + * (Strophe.Connection) conn - Strophe connection + */ + init: function(conn) { + this._connection = conn; + this._callbacks = []; + this._callbacks_request = []; + /** Property: items + * Roster items + * [ + * { + * name : "", + * jid : "", + * subscription : "", + * ask : "", + * groups : ["", ""], + * resources : { + * myresource : { + * show : "", + * status : "", + * priority : "" + * } + * } + * } + * ] + */ + items = []; + /** Property: ver + * current roster revision + * always null if server doesn't support xep 237 + */ + ver = null; + // Override the connect and attach methods to always add presence and roster handlers. + // They are removed when the connection disconnects, so must be added on connection. + var oldCallback, roster = this, _connect = conn.connect, _attach = conn.attach; + var newCallback = function(status) { + if (status == Strophe.Status.ATTACHED || status == Strophe.Status.CONNECTED) { + try { + // Presence subscription + conn.addHandler(roster._onReceivePresence.bind(roster), null, "presence", null, null, null); + conn.addHandler(roster._onReceiveIQ.bind(roster), Strophe.NS.ROSTER, "iq", "set", null, null); + } catch (e) { + Strophe.error(e); + } + } + if (oldCallback !== null) oldCallback.apply(this, arguments); + }; + conn.connect = function(jid, pass, callback, wait, hold, route) { + oldCallback = callback; + if (typeof jid == "undefined") jid = null; + if (typeof pass == "undefined") pass = null; + callback = newCallback; + _connect.apply(conn, [ jid, pass, callback, wait, hold, route ]); + }; + conn.attach = function(jid, sid, rid, callback, wait, hold, wind) { + oldCallback = callback; + if (typeof jid == "undefined") jid = null; + if (typeof sid == "undefined") sid = null; + if (typeof rid == "undefined") rid = null; + callback = newCallback; + _attach.apply(conn, [ jid, sid, rid, callback, wait, hold, wind ]); + }; + Strophe.addNamespace("ROSTER_VER", "urn:xmpp:features:rosterver"); + Strophe.addNamespace("NICK", "http://jabber.org/protocol/nick"); + }, + /** Function: supportVersioning + * return true if roster versioning is enabled on server + */ + supportVersioning: function() { + return this._connection.features && this._connection.features.getElementsByTagName("ver").length > 0; + }, + /** Function: get + * Get Roster on server + * + * Parameters: + * (Function) userCallback - callback on roster result + * (String) ver - current rev of roster + * (only used if roster versioning is enabled) + * (Array) items - initial items of ver + * (only used if roster versioning is enabled) + * In browser context you can use sessionStorage + * to store your roster in json (JSON.stringify()) + */ + get: function(userCallback, ver, items) { + var attrs = { + xmlns: Strophe.NS.ROSTER + }; + this.items = []; + if (this.supportVersioning()) { + // empty rev because i want an rev attribute in the result + attrs.ver = ver || ""; + this.items = items || []; + } + var iq = $iq({ + type: "get", + id: this._connection.getUniqueId("roster") + }).c("query", attrs); + return this._connection.sendIQ(iq, this._onReceiveRosterSuccess.bind(this, userCallback), this._onReceiveRosterError.bind(this, userCallback)); + }, + /** Function: registerCallback + * register callback on roster (presence and iq) + * + * Parameters: + * (Function) call_back + */ + registerCallback: function(call_back) { + this._callbacks.push(call_back); + }, + registerRequestCallback: function(call_back) { + this._callbacks_request.push(call_back); + }, + /** Function: findItem + * Find item by JID + * + * Parameters: + * (String) jid + */ + findItem: function(jid) { + for (var i = 0; i < this.items.length; i++) { + if (this.items[i] && this.items[i].jid == jid) { + return this.items[i]; + } + } + return false; + }, + /** Function: removeItem + * Remove item by JID + * + * Parameters: + * (String) jid + */ + removeItem: function(jid) { + for (var i = 0; i < this.items.length; i++) { + if (this.items[i] && this.items[i].jid == jid) { + this.items.splice(i, 1); + return true; + } + } + return false; + }, + /** Function: subscribe + * Subscribe presence + * + * Parameters: + * (String) jid + * (String) message (optional) + * (String) nick (optional) + */ + subscribe: function(jid, message, nick) { + var pres = $pres({ + to: jid, + type: "subscribe" + }); + if (message && message !== "") { + pres.c("status").t(message).up(); + } + if (nick && nick !== "") { + pres.c("nick", { + xmlns: Strophe.NS.NICK + }).t(nick).up(); + } + this._connection.send(pres); + }, + /** Function: unsubscribe + * Unsubscribe presence + * + * Parameters: + * (String) jid + * (String) message + */ + unsubscribe: function(jid, message) { + var pres = $pres({ + to: jid, + type: "unsubscribe" + }); + if (message && message !== "") pres.c("status").t(message); + this._connection.send(pres); + }, + /** Function: authorize + * Authorize presence subscription + * + * Parameters: + * (String) jid + * (String) message + */ + authorize: function(jid, message) { + var pres = $pres({ + to: jid, + type: "subscribed" + }); + if (message && message !== "") pres.c("status").t(message); + this._connection.send(pres); + }, + /** Function: unauthorize + * Unauthorize presence subscription + * + * Parameters: + * (String) jid + * (String) message + */ + unauthorize: function(jid, message) { + var pres = $pres({ + to: jid, + type: "unsubscribed" + }); + if (message && message !== "") pres.c("status").t(message); + this._connection.send(pres); + }, + /** Function: add + * Add roster item + * + * Parameters: + * (String) jid - item jid + * (String) name - name + * (Array) groups + * (Function) call_back + */ + add: function(jid, name, groups, call_back) { + var iq = $iq({ + type: "set" + }).c("query", { + xmlns: Strophe.NS.ROSTER + }).c("item", { + jid: jid, + name: name + }); + for (var i = 0; i < groups.length; i++) { + iq.c("group").t(groups[i]).up(); + } + this._connection.sendIQ(iq, call_back, call_back); + }, + /** Function: update + * Update roster item + * + * Parameters: + * (String) jid - item jid + * (String) name - name + * (Array) groups + * (Function) call_back + */ + update: function(jid, name, groups, call_back) { + var item = this.findItem(jid); + if (!item) { + throw "item not found"; + } + var newName = name || item.name; + var newGroups = groups || item.groups; + var iq = $iq({ + type: "set" + }).c("query", { + xmlns: Strophe.NS.ROSTER + }).c("item", { + jid: item.jid, + name: newName + }); + for (var i = 0; i < newGroups.length; i++) { + iq.c("group").t(newGroups[i]).up(); + } + return this._connection.sendIQ(iq, call_back, call_back); + }, + /** Function: remove + * Remove roster item + * + * Parameters: + * (String) jid - item jid + * (Function) call_back + */ + remove: function(jid, call_back) { + var item = this.findItem(jid); + if (!item) { + throw "item not found"; + } + var iq = $iq({ + type: "set" + }).c("query", { + xmlns: Strophe.NS.ROSTER + }).c("item", { + jid: item.jid, + subscription: "remove" + }); + this._connection.sendIQ(iq, call_back, call_back); + }, + /** PrivateFunction: _onReceiveRosterSuccess + * + */ + _onReceiveRosterSuccess: function(userCallback, stanza) { + this._updateItems(stanza); + this._call_backs(this.items); + userCallback(this.items); + }, + /** PrivateFunction: _onReceiveRosterError + * + */ + _onReceiveRosterError: function(userCallback, stanza) { + userCallback(this.items); + }, + /** PrivateFunction: _onReceivePresence + * Handle presence + */ + _onReceivePresence: function(presence) { + // TODO: from is optional + var jid = presence.getAttribute("from"); + var from = Strophe.getBareJidFromJid(jid); + var item = this.findItem(from); + var type = presence.getAttribute("type"); + // not in roster + if (!item) { + // if 'friend request' presence + if (type === "subscribe") { + this._call_backs_request(from); + } + return true; + } + if (type == "unavailable") { + delete item.resources[Strophe.getResourceFromJid(jid)]; + } else if (!type) { + // TODO: add timestamp + item.resources[Strophe.getResourceFromJid(jid)] = { + show: presence.getElementsByTagName("show").length !== 0 ? Strophe.getText(presence.getElementsByTagName("show")[0]) : "", + status: presence.getElementsByTagName("status").length !== 0 ? Strophe.getText(presence.getElementsByTagName("status")[0]) : "", + priority: presence.getElementsByTagName("priority").length !== 0 ? Strophe.getText(presence.getElementsByTagName("priority")[0]) : "" + }; + } else { + // Stanza is not a presence notification. (It's probably a subscription type stanza.) + return true; + } + this._call_backs(this.items, item); + return true; + }, + /** PrivateFunction: _call_backs_request + * call all the callbacks waiting for 'friend request' presences + */ + _call_backs_request: function(from) { + for (var i = 0; i < this._callbacks_request.length; i++) // [].forEach my love ... + { + this._callbacks_request[i](from); + } + }, + /** PrivateFunction: _call_backs + * + */ + _call_backs: function(items, item) { + for (var i = 0; i < this._callbacks.length; i++) // [].forEach my love ... + { + this._callbacks[i](items, item); + } + }, + /** PrivateFunction: _onReceiveIQ + * Handle roster push. + */ + _onReceiveIQ: function(iq) { + var id = iq.getAttribute("id"); + var from = iq.getAttribute("from"); + // Receiving client MUST ignore stanza unless it has no from or from = user's JID. + if (from && from !== "" && from != this._connection.jid && from != Strophe.getBareJidFromJid(this._connection.jid)) return true; + var iqresult = $iq({ + type: "result", + id: id, + from: this._connection.jid + }); + this._connection.send(iqresult); + this._updateItems(iq); + return true; + }, + /** PrivateFunction: _updateItems + * Update items from iq + */ + _updateItems: function(iq) { + var query = iq.getElementsByTagName("query"); + if (query.length !== 0) { + this.ver = query.item(0).getAttribute("ver"); + var self = this; + Strophe.forEachChild(query.item(0), "item", function(item) { + self._updateItem(item); + }); + } + }, + /** PrivateFunction: _updateItem + * Update internal representation of roster item + */ + _updateItem: function(item) { + var jid = item.getAttribute("jid"); + var name = item.getAttribute("name"); + var subscription = item.getAttribute("subscription"); + var ask = item.getAttribute("ask"); + var groups = []; + Strophe.forEachChild(item, "group", function(group) { + groups.push(Strophe.getText(group)); + }); + if (subscription == "remove") { + this.removeItem(jid); + this._call_backs(this.items, { + jid: jid, + subscription: "remove" + }); + return; + } + item = this.findItem(jid); + if (!item) { + item = { + name: name, + jid: jid, + subscription: subscription, + ask: ask, + groups: groups, + resources: {} + }; + this.items.push(item); + } else { + item.name = name; + item.subscription = subscription; + item.ask = ask; + item.groups = groups; + } + this._call_backs(this.items, item); + } +}); + +/* + Copyright 2010, François de Metz +*/ +/** + * Disco Strophe Plugin + * Implement http://xmpp.org/extensions/xep-0030.html + * TODO: manage node hierarchies, and node on info request + */ +Strophe.addConnectionPlugin("disco", { + _connection: null, + _identities: [], + _features: [], + _items: [], + /** Function: init + * Plugin init + * + * Parameters: + * (Strophe.Connection) conn - Strophe connection + */ + init: function(conn) { + this._connection = conn; + this._identities = []; + this._features = []; + this._items = []; + // disco info + conn.addHandler(this._onDiscoInfo.bind(this), Strophe.NS.DISCO_INFO, "iq", "get", null, null); + // disco items + conn.addHandler(this._onDiscoItems.bind(this), Strophe.NS.DISCO_ITEMS, "iq", "get", null, null); + }, + /** Function: addIdentity + * See http://xmpp.org/registrar/disco-categories.html + * Parameters: + * (String) category - category of identity (like client, automation, etc ...) + * (String) type - type of identity (like pc, web, bot , etc ...) + * (String) name - name of identity in natural language + * (String) lang - lang of name parameter + * + * Returns: + * Boolean + */ + addIdentity: function(category, type, name, lang) { + for (var i = 0; i < this._identities.length; i++) { + if (this._identities[i].category == category && this._identities[i].type == type && this._identities[i].name == name && this._identities[i].lang == lang) { + return false; + } + } + this._identities.push({ + category: category, + type: type, + name: name, + lang: lang + }); + return true; + }, + /** Function: addFeature + * + * Parameters: + * (String) var_name - feature name (like jabber:iq:version) + * + * Returns: + * boolean + */ + addFeature: function(var_name) { + for (var i = 0; i < this._features.length; i++) { + if (this._features[i] == var_name) return false; + } + this._features.push(var_name); + return true; + }, + /** Function: removeFeature + * + * Parameters: + * (String) var_name - feature name (like jabber:iq:version) + * + * Returns: + * boolean + */ + removeFeature: function(var_name) { + for (var i = 0; i < this._features.length; i++) { + if (this._features[i] === var_name) { + this._features.splice(i, 1); + return true; + } + } + return false; + }, + /** Function: addItem + * + * Parameters: + * (String) jid + * (String) name + * (String) node + * (Function) call_back + * + * Returns: + * boolean + */ + addItem: function(jid, name, node, call_back) { + if (node && !call_back) return false; + this._items.push({ + jid: jid, + name: name, + node: node, + call_back: call_back + }); + return true; + }, + /** Function: info + * Info query + * + * Parameters: + * (Function) call_back + * (String) jid + * (String) node + */ + info: function(jid, node, success, error, timeout) { + var attrs = { + xmlns: Strophe.NS.DISCO_INFO + }; + if (node) attrs.node = node; + var info = $iq({ + from: this._connection.jid, + to: jid, + type: "get" + }).c("query", attrs); + this._connection.sendIQ(info, success, error, timeout); + }, + /** Function: items + * Items query + * + * Parameters: + * (Function) call_back + * (String) jid + * (String) node + */ + items: function(jid, node, success, error, timeout) { + var attrs = { + xmlns: Strophe.NS.DISCO_ITEMS + }; + if (node) attrs.node = node; + var items = $iq({ + from: this._connection.jid, + to: jid, + type: "get" + }).c("query", attrs); + this._connection.sendIQ(items, success, error, timeout); + }, + /** PrivateFunction: _buildIQResult + */ + _buildIQResult: function(stanza, query_attrs) { + var id = stanza.getAttribute("id"); + var from = stanza.getAttribute("from"); + var iqresult = $iq({ + type: "result", + id: id + }); + if (from !== null) { + iqresult.attrs({ + to: from + }); + } + return iqresult.c("query", query_attrs); + }, + /** PrivateFunction: _onDiscoInfo + * Called when receive info request + */ + _onDiscoInfo: function(stanza) { + var node = stanza.getElementsByTagName("query")[0].getAttribute("node"); + var attrs = { + xmlns: Strophe.NS.DISCO_INFO + }; + if (node) { + attrs.node = node; + } + var iqresult = this._buildIQResult(stanza, attrs); + for (var i = 0; i < this._identities.length; i++) { + var attrs = { + category: this._identities[i].category, + type: this._identities[i].type + }; + if (this._identities[i].name) attrs.name = this._identities[i].name; + if (this._identities[i].lang) attrs["xml:lang"] = this._identities[i].lang; + iqresult.c("identity", attrs).up(); + } + for (var i = 0; i < this._features.length; i++) { + iqresult.c("feature", { + "var": this._features[i] + }).up(); + } + this._connection.send(iqresult.tree()); + return true; + }, + /** PrivateFunction: _onDiscoItems + * Called when receive items request + */ + _onDiscoItems: function(stanza) { + var query_attrs = { + xmlns: Strophe.NS.DISCO_ITEMS + }; + var node = stanza.getElementsByTagName("query")[0].getAttribute("node"); + if (node) { + query_attrs.node = node; + var items = []; + for (var i = 0; i < this._items.length; i++) { + if (this._items[i].node == node) { + items = this._items[i].call_back(stanza); + break; + } + } + } else { + var items = this._items; + } + var iqresult = this._buildIQResult(stanza, query_attrs); + for (var i = 0; i < items.length; i++) { + var attrs = { + jid: items[i].jid + }; + if (items[i].name) attrs.name = items[i].name; + if (items[i].node) attrs.node = items[i].node; + iqresult.c("item", attrs).up(); + } + this._connection.send(iqresult.tree()); + return true; + } +}); + +/** + * Entity Capabilities (XEP-0115) + * + * Depends on disco plugin. + * + * See: http://xmpp.org/extensions/xep-0115.html + * + * Authors: + * - Michael Weibel + * + * Copyright: + * - Michael Weibel + */ +Strophe.addConnectionPlugin("caps", { + /** Constant: HASH + * Hash used + * + * Currently only sha-1 is supported. + */ + HASH: "sha-1", + /** Variable: node + * Client which is being used. + * + * Can be overwritten as soon as Strophe has been initialized. + */ + node: "http://strophe.im/strophejs/", + /** PrivateVariable: _ver + * Own generated version string + */ + _ver: "", + /** PrivateVariable: _connection + * Strophe connection + */ + _connection: null, + /** PrivateVariable: _knownCapabilities + * A hashtable containing version-strings and their capabilities, serialized + * as string. + * + * TODO: Maybe those caps shouldn't be serialized. + */ + _knownCapabilities: {}, + /** PrivateVariable: _jidVerIndex + * A hashtable containing jids and their versions for better lookup of capabilities. + */ + _jidVerIndex: {}, + /** Function: init + * Initialize plugin: + * - Add caps namespace + * - Add caps feature to disco plugin + * - Add handler for caps stanzas + * + * Parameters: + * (Strophe.Connection) conn - Strophe connection + */ + init: function(conn) { + this._connection = conn; + Strophe.addNamespace("CAPS", "http://jabber.org/protocol/caps"); + if (!this._connection.disco) { + throw "Caps plugin requires the disco plugin to be installed."; + } + this._connection.disco.addFeature(Strophe.NS.CAPS); + this._connection.addHandler(this._delegateCapabilities.bind(this), Strophe.NS.CAPS); + }, + /** Function: generateCapsAttrs + * Returns the attributes for generating the "c"-stanza containing the own version + * + * Returns: + * (Object) - attributes + */ + generateCapsAttrs: function() { + return { + xmlns: Strophe.NS.CAPS, + hash: this.HASH, + node: this.node, + ver: this.generateVer() + }; + }, + /** Function: generateVer + * Returns the base64 encoded version string (encoded itself with sha1) + * + * Returns: + * (String) - version + */ + generateVer: function() { + if (this._ver !== "") { + return this._ver; + } + var ver = "", identities = this._connection.disco._identities.sort(this._sortIdentities), identitiesLen = identities.length, features = this._connection.disco._features.sort(), featuresLen = features.length; + for (var i = 0; i < identitiesLen; i++) { + var curIdent = identities[i]; + ver += curIdent.category + "/" + curIdent.type + "/" + curIdent.lang + "/" + curIdent.name + "<"; + } + for (var i = 0; i < featuresLen; i++) { + ver += features[i] + "<"; + } + this._ver = b64_sha1(ver); + return this._ver; + }, + /** Function: getCapabilitiesByJid + * Returns serialized capabilities of a jid (if available). + * Otherwise null. + * + * Parameters: + * (String) jid - Jabber id + * + * Returns: + * (String|null) - capabilities, serialized; or null when not available. + */ + getCapabilitiesByJid: function(jid) { + if (this._jidVerIndex[jid]) { + return this._knownCapabilities[this._jidVerIndex[jid]]; + } + return null; + }, + /** PrivateFunction: _delegateCapabilities + * Checks if the version has already been saved. + * If yes: do nothing. + * If no: Request capabilities + * + * Parameters: + * (Strophe.Builder) stanza - Stanza + * + * Returns: + * (Boolean) + */ + _delegateCapabilities: function(stanza) { + var from = stanza.getAttribute("from"), c = stanza.querySelector("c"), ver = c.getAttribute("ver"), node = c.getAttribute("node"); + if (!this._knownCapabilities[ver]) { + return this._requestCapabilities(from, node, ver); + } else { + this._jidVerIndex[from] = ver; + } + if (!this._jidVerIndex[from] || !this._jidVerIndex[from] !== ver) { + this._jidVerIndex[from] = ver; + } + return true; + }, + /** PrivateFunction: _requestCapabilities + * Requests capabilities from the one which sent the caps-info stanza. + * This is done using disco info. + * + * Additionally, it registers a handler for handling the reply. + * + * Parameters: + * (String) to - Destination jid + * (String) node - Node attribute of the caps-stanza + * (String) ver - Version of the caps-stanza + * + * Returns: + * (Boolean) - true + */ + _requestCapabilities: function(to, node, ver) { + if (to !== this._connection.jid) { + var id = this._connection.disco.info(to, node + "#" + ver); + this._connection.addHandler(this._handleDiscoInfoReply.bind(this), Strophe.NS.DISCO_INFO, "iq", "result", id, to); + } + return true; + }, + /** PrivateFunction: _handleDiscoInfoReply + * Parses the disco info reply and adds the version & it's capabilities to the _knownCapabilities variable. + * Additionally, it adds the jid & the version to the _jidVerIndex variable for a better lookup. + * + * Parameters: + * (Strophe.Builder) stanza - Disco info stanza + * + * Returns: + * (Boolean) - false, to automatically remove the handler. + */ + _handleDiscoInfoReply: function(stanza) { + var query = stanza.querySelector("query"), node = query.getAttribute("node").split("#"), ver = node[1], from = stanza.getAttribute("from"); + if (!this._knownCapabilities[ver]) { + var childNodes = query.childNodes, childNodesLen = childNodes.length; + this._knownCapabilities[ver] = []; + for (var i = 0; i < childNodesLen; i++) { + var node = childNodes[i]; + this._knownCapabilities[ver].push({ + name: node.nodeName, + attributes: node.attributes + }); + } + this._jidVerIndex[from] = ver; + } else if (!this._jidVerIndex[from] || !this._jidVerIndex[from] !== ver) { + this._jidVerIndex[from] = ver; + } + return false; + }, + /** PrivateFunction: _sortIdentities + * Sorts two identities according the sorting requirements in XEP-0115. + * + * Parameters: + * (Object) a - Identity a + * (Object) b - Identity b + * + * Returns: + * (Integer) - 1, 0 or -1; according to which one's greater. + */ + _sortIdentities: function(a, b) { + if (a.category > b.category) { + return 1; + } + if (a.category < b.category) { + return -1; + } + if (a.type > b.type) { + return 1; + } + if (a.type < b.type) { + return -1; + } + if (a.lang > b.lang) { + return 1; + } + if (a.lang < b.lang) { + return -1; + } + return 0; + } +}); + +/* + mustache.js — Logic-less templates in JavaScript + + See http://mustache.github.com/ for more info. +*/ +var Mustache = function() { + var Renderer = function() {}; + Renderer.prototype = { + otag: "{{", + ctag: "}}", + pragmas: {}, + buffer: [], + pragmas_implemented: { + "IMPLICIT-ITERATOR": true + }, + context: {}, + render: function(template, context, partials, in_recursion) { + // reset buffer & set context + if (!in_recursion) { + this.context = context; + this.buffer = []; + } + // fail fast + if (!this.includes("", template)) { + if (in_recursion) { + return template; + } else { + this.send(template); + return; + } + } + template = this.render_pragmas(template); + var html = this.render_section(template, context, partials); + if (in_recursion) { + return this.render_tags(html, context, partials, in_recursion); + } + this.render_tags(html, context, partials, in_recursion); + }, + /* + Sends parsed lines + */ + send: function(line) { + if (line != "") { + this.buffer.push(line); + } + }, + /* + Looks for %PRAGMAS + */ + render_pragmas: function(template) { + // no pragmas + if (!this.includes("%", template)) { + return template; + } + var that = this; + var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" + this.ctag); + return template.replace(regex, function(match, pragma, options) { + if (!that.pragmas_implemented[pragma]) { + throw { + message: "This implementation of mustache doesn't understand the '" + pragma + "' pragma" + }; + } + that.pragmas[pragma] = {}; + if (options) { + var opts = options.split("="); + that.pragmas[pragma][opts[0]] = opts[1]; + } + return ""; + }); + }, + /* + Tries to find a partial in the curent scope and render it + */ + render_partial: function(name, context, partials) { + name = this.trim(name); + if (!partials || partials[name] === undefined) { + throw { + message: "unknown_partial '" + name + "'" + }; + } + if (typeof context[name] != "object") { + return this.render(partials[name], context, partials, true); + } + return this.render(partials[name], context[name], partials, true); + }, + /* + Renders inverted (^) and normal (#) sections + */ + render_section: function(template, context, partials) { + if (!this.includes("#", template) && !this.includes("^", template)) { + return template; + } + var that = this; + // CSW - Added "+?" so it finds the tighest bound, not the widest + var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag + "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag + "\\s*", "mg"); + // for each {{#foo}}{{/foo}} section do... + return template.replace(regex, function(match, type, name, content) { + var value = that.find(name, context); + if (type == "^") { + // inverted section + if (!value || that.is_array(value) && value.length === 0) { + // false or empty list, render it + return that.render(content, context, partials, true); + } else { + return ""; + } + } else if (type == "#") { + // normal section + if (that.is_array(value)) { + // Enumerable, Let's loop! + return that.map(value, function(row) { + return that.render(content, that.create_context(row), partials, true); + }).join(""); + } else if (that.is_object(value)) { + // Object, Use it as subcontext! + return that.render(content, that.create_context(value), partials, true); + } else if (typeof value === "function") { + // higher order section + return value.call(context, content, function(text) { + return that.render(text, context, partials, true); + }); + } else if (value) { + // boolean section + return that.render(content, context, partials, true); + } else { + return ""; + } + } + }); + }, + /* + Replace {{foo}} and friends with values from our view + */ + render_tags: function(template, context, partials, in_recursion) { + // tit for tat + var that = this; + var new_regex = function() { + return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?" + that.ctag + "+", "g"); + }; + var regex = new_regex(); + var tag_replace_callback = function(match, operator, name) { + switch (operator) { + case "!": + // ignore comments + return ""; + + case "=": + // set new delimiters, rebuild the replace regexp + that.set_delimiters(name); + regex = new_regex(); + return ""; + + case ">": + // render partial + return that.render_partial(name, context, partials); + + case "{": + // the triple mustache is unescaped + return that.find(name, context); + + default: + // escape the value + return that.escape(that.find(name, context)); + } + }; + var lines = template.split("\n"); + for (var i = 0; i < lines.length; i++) { + lines[i] = lines[i].replace(regex, tag_replace_callback, this); + if (!in_recursion) { + this.send(lines[i]); + } + } + if (in_recursion) { + return lines.join("\n"); + } + }, + set_delimiters: function(delimiters) { + var dels = delimiters.split(" "); + this.otag = this.escape_regex(dels[0]); + this.ctag = this.escape_regex(dels[1]); + }, + escape_regex: function(text) { + // thank you Simon Willison + if (!arguments.callee.sRE) { + var specials = [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\" ]; + arguments.callee.sRE = new RegExp("(\\" + specials.join("|\\") + ")", "g"); + } + return text.replace(arguments.callee.sRE, "\\$1"); + }, + /* + find `name` in current `context`. That is find me a value + from the view object + */ + find: function(name, context) { + name = this.trim(name); + // Checks whether a value is thruthy or false or 0 + function is_kinda_truthy(bool) { + return bool === false || bool === 0 || bool; + } + var value; + if (is_kinda_truthy(context[name])) { + value = context[name]; + } else if (is_kinda_truthy(this.context[name])) { + value = this.context[name]; + } + if (typeof value === "function") { + return value.apply(context); + } + if (value !== undefined) { + return value; + } + // silently ignore unkown variables + return ""; + }, + // Utility methods + /* includes tag */ + includes: function(needle, haystack) { + return haystack.indexOf(this.otag + needle) != -1; + }, + /* + Does away with nasty characters + */ + escape: function(s) { + s = String(s === null ? "" : s); + return s.replace(/&(?!\w+;)|["<>\\]/g, function(s) { + switch (s) { + case "&": + return "&"; + + case "\\": + return "\\\\"; + + case '"': + return '"'; + + case "<": + return "<"; + + case ">": + return ">"; + + default: + return s; + } + }); + }, + // by @langalex, support for arrays of strings + create_context: function(_context) { + if (this.is_object(_context)) { + return _context; + } else { + var iterator = "."; + if (this.pragmas["IMPLICIT-ITERATOR"]) { + iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator; + } + var ctx = {}; + ctx[iterator] = _context; + return ctx; + } + }, + is_object: function(a) { + return a && typeof a == "object"; + }, + is_array: function(a) { + return Object.prototype.toString.call(a) === "[object Array]"; + }, + /* + Gets rid of leading and trailing whitespace + */ + trim: function(s) { + return s.replace(/^\s*|\s*$/g, ""); + }, + /* + Why, why, why? Because IE. Cry, cry cry. + */ + map: function(array, fn) { + if (typeof array.map == "function") { + return array.map(fn); + } else { + var r = []; + var l = array.length; + for (var i = 0; i < l; i++) { + r.push(fn(array[i])); + } + return r; + } + } + }; + return { + name: "mustache.js", + version: "0.3.0", + /* + Turns a template and view into HTML + */ + to_html: function(template, view, partials, send_fun) { + var renderer = new Renderer(); + if (send_fun) { + renderer.send = send_fun; + } + renderer.render(template, view, partials); + if (!send_fun) { + return renderer.buffer.join("\n"); + } + } + }; +}(); + +/*! + * jQuery i18n plugin + * @requires jQuery v1.1 or later + * + * See https://github.com/recurser/jquery-i18n + * + * Licensed under the MIT license. + * + * Version: 1.1.1 (Sun, 05 Jan 2014 05:26:50 GMT) + */ +(function($) { + /** + * i18n provides a mechanism for translating strings using a jscript dictionary. + * + */ + var __slice = Array.prototype.slice; + /* + * i18n property list + */ + var i18n = { + dict: null, + /** + * load() + * + * Load translations. + * + * @param property_list i18n_dict : The dictionary to use for translation. + */ + load: function(i18n_dict) { + if (this.dict !== null) { + $.extend(this.dict, i18n_dict); + } else { + this.dict = i18n_dict; + } + }, + /** + * _() + * + * Looks the given string up in the dictionary and returns the translation if + * one exists. If a translation is not found, returns the original word. + * + * @param string str : The string to translate. + * @param property_list params.. : params for using printf() on the string. + * + * @return string : Translated word. + */ + _: function(str) { + dict = this.dict; + if (dict && dict.hasOwnProperty(str)) { + str = dict[str]; + } + args = __slice.call(arguments); + args[0] = str; + // Substitute any params. + return this.printf.apply(this, args); + }, + /* + * printf() + * + * Substitutes %s with parameters given in list. %%s is used to escape %s. + * + * @param string str : String to perform printf on. + * @param string args : Array of arguments for printf. + * + * @return string result : Substituted string + */ + printf: function(str, args) { + if (arguments.length < 2) return str; + args = $.isArray(args) ? args : __slice.call(arguments, 1); + return str.replace(/([^%]|^)%(?:(\d+)\$)?s/g, function(p0, p, position) { + if (position) { + return p + args[parseInt(position) - 1]; + } + return p + args.shift(); + }).replace(/%%s/g, "%s"); + } + }; + /* + * _t() + * + * Allows you to translate a jQuery selector. + * + * eg $('h1')._t('some text') + * + * @param string str : The string to translate . + * @param property_list params : Params for using printf() on the string. + * + * @return element : Chained and translated element(s). + */ + $.fn._t = function(str, params) { + return $(this).html(i18n._.apply(i18n, arguments)); + }; + $.i18n = i18n; +})(jQuery); + +/* + * Date Format 1.2.3 + * (c) 2007-2009 Steven Levithan + * MIT license + * + * Includes enhancements by Scott Trenda + * and Kris Kowal + * + * Accepts a date, a mask, or a date and a mask. + * Returns a formatted version of the given date. + * The date defaults to the current date/time. + * The mask defaults to dateFormat.masks.default. + * + * @link http://blog.stevenlevithan.com/archives/date-time-format + */ +var dateFormat = function() { + var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g, timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, timezoneClip = /[^-+\dA-Z]/g, pad = function(val, len) { + val = String(val); + len = len || 2; + while (val.length < len) val = "0" + val; + return val; + }; + // Regexes and supporting functions are cached through closure + return function(date, mask, utc) { + var dF = dateFormat; + // You can't provide utc if you skip other args (use the "UTC:" mask prefix) + if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { + mask = date; + date = undefined; + } + // Passing date through Date applies Date.parse, if necessary + date = date ? new Date(date) : new Date(); + if (isNaN(date)) throw SyntaxError("invalid date"); + mask = String(dF.masks[mask] || mask || dF.masks["default"]); + // Allow setting the utc argument via the mask + if (mask.slice(0, 4) == "UTC:") { + mask = mask.slice(4); + utc = true; + } + var _ = utc ? "getUTC" : "get", d = date[_ + "Date"](), D = date[_ + "Day"](), m = date[_ + "Month"](), y = date[_ + "FullYear"](), H = date[_ + "Hours"](), M = date[_ + "Minutes"](), s = date[_ + "Seconds"](), L = date[_ + "Milliseconds"](), o = utc ? 0 : date.getTimezoneOffset(), flags = { + d: d, + dd: pad(d), + ddd: dF.i18n.dayNames[D], + dddd: dF.i18n.dayNames[D + 7], + m: m + 1, + mm: pad(m + 1), + mmm: dF.i18n.monthNames[m], + mmmm: dF.i18n.monthNames[m + 12], + yy: String(y).slice(2), + yyyy: y, + h: H % 12 || 12, + hh: pad(H % 12 || 12), + H: H, + HH: pad(H), + M: M, + MM: pad(M), + s: s, + ss: pad(s), + l: pad(L, 3), + L: pad(L > 99 ? Math.round(L / 10) : L), + t: H < 12 ? "a" : "p", + tt: H < 12 ? "am" : "pm", + T: H < 12 ? "A" : "P", + TT: H < 12 ? "AM" : "PM", + Z: utc ? "UTC" : (String(date).match(timezone) || [ "" ]).pop().replace(timezoneClip, ""), + o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), + S: [ "th", "st", "nd", "rd" ][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10] + }; + return mask.replace(token, function($0) { + return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); + }); + }; +}(); + +// Some common format strings +dateFormat.masks = { + "default": "ddd mmm dd yyyy HH:MM:ss", + shortDate: "m/d/yy", + mediumDate: "mmm d, yyyy", + longDate: "mmmm d, yyyy", + fullDate: "dddd, mmmm d, yyyy", + shortTime: "h:MM TT", + mediumTime: "h:MM:ss TT", + longTime: "h:MM:ss TT Z", + isoDate: "yyyy-mm-dd", + isoTime: "HH:MM:ss", + isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", + isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" +}; + +// Internationalization strings +dateFormat.i18n = { + dayNames: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], + monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ] +}; + +// For convenience... +Date.prototype.format = function(mask, utc) { + return dateFormat(this, mask, utc); +}; +//# sourceMappingURL=libs.bundle.map \ No newline at end of file diff --git a/public/ext/candy/libs.bundle.map b/public/ext/candy/libs.bundle.map new file mode 100755 index 0000000..1729e2f --- /dev/null +++ b/public/ext/candy/libs.bundle.map @@ -0,0 +1 @@ +{"version":3,"file":"libs.bundle.js","sources":["bower_components/strophe/strophe.js","bower_components/strophejs-plugins/muc/strophe.muc.js","bower_components/strophejs-plugins/roster/strophe.roster.js","bower_components/strophejs-plugins/disco/strophe.disco.js","bower_components/strophejs-plugins/caps/strophe.caps.jsonly.js","bower_components/mustache/mustache.js","bower_components/jquery-i18n/jquery.i18n.js","vendor_libs/dateformat/dateFormat.js"],"names":["Base64","keyStr","obj","encode","input","output","chr1","chr2","chr3","enc1","enc2","enc3","enc4","i","charCodeAt","isNaN","charAt","length","decode","replace","indexOf","String","fromCharCode","b64_sha1","s","binb2b64","core_sha1","str2binb","str_sha1","binb2str","b64_hmac_sha1","key","data","core_hmac_sha1","str_hmac_sha1","x","len","w","Array","a","b","c","d","e","j","t","olda","oldb","oldc","oldd","olde","rol","safe_add","sha1_ft","sha1_kt","bkey","ipad","opad","hash","concat","y","lsw","msw","num","cnt","str","bin","mask","binarray","tab","triplet","MD5","bit_rol","str2binl","binl2str","binl2hex","hex_tab","md5_cmn","q","md5_ff","md5_gg","md5_hh","md5_ii","core_md5","hexdigest","Function","prototype","bind","func","this","_slice","slice","_concat","_args","call","arguments","apply","elt","from","Number","Math","ceil","floor","callback","Strophe","$build","name","attrs","Builder","$msg","$iq","$pres","VERSION","NS","HTTPBIND","BOSH","CLIENT","AUTH","ROSTER","PROFILE","DISCO_INFO","DISCO_ITEMS","MUC","SASL","STREAM","BIND","SESSION","STANZAS","XHTML_IM","XHTML","tags","attributes","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body","css","validTag","tag","validAttribute","attribute","validCSS","style","Status","ERROR","CONNECTING","CONNFAIL","AUTHENTICATING","AUTHFAIL","CONNECTED","DISCONNECTED","DISCONNECTING","ATTACHED","LogLevel","DEBUG","INFO","WARN","FATAL","ElementType","NORMAL","TEXT","CDATA","FRAGMENT","TIMEOUT","SECONDARY_TIMEOUT","addNamespace","value","forEachChild","elem","elemName","childNode","childNodes","nodeType","isTagEqual","el","tagName","toLowerCase","_xmlGenerator","_makeGenerator","doc","document","implementation","createDocument","undefined","documentMode","_getIEXmlDom","appendChild","createElement","xmlGenerator","docStrings","ActiveXObject","xmlElement","node","k","xmlTextNode","setAttribute","hasOwnProperty","xmlescape","text","createTextNode","xmlHtmlNode","html","window","DOMParser","parser","parseFromString","async","loadXML","getText","nodeValue","copyElement","nodeName","createHtml","cssAttrs","attr","cssName","cssValue","getAttribute","cssText","split","push","join","createDocumentFragment","escapeNode","unescapeNode","getNodeFromJid","jid","getDomainFromJid","bare","getBareJidFromJid","parts","splice","getResourceFromJid","log","level","msg","debug","info","warn","error","fatal","serialize","result","tree","child","_requestId","_connectionPlugins","addConnectionPlugin","ptype","xmlns","nodeTree","toString","up","parentNode","moreattrs","cnode","impNode","xmlGen","importNode","newElem","h","fragment","innerHTML","xhtml","Handler","handler","ns","type","id","options","matchBare","user","isMatch","nsMatch","that","run","sourceURL","line","message","fileName","console","trace","lineNumber","stack","TimedHandler","period","lastCalled","Date","getTime","reset","Connection","service","proto","protocol","_proto","Websocket","Bosh","domain","features","_sasl_data","do_session","do_bind","timedHandlers","handlers","removeTimeds","removeHandlers","addTimeds","addHandlers","_authentication","_idleTimeout","_disconnectTimeout","do_authentication","authenticated","disconnecting","connected","errors","paused","_data","_uniqueId","_sasl_success_handler","_sasl_failure_handler","_sasl_challenge_handler","maxRetries","setTimeout","_onIdle","F","init","_reset","_requests","pause","resume","getUniqueId","suffix","connect","pass","wait","hold","route","authzid","authcid","servtype","connect_callback","_changeConnectStatus","_connect","attach","sid","rid","wind","_attach","xmlInput","xmlOutput","rawInput","rawOutput","send","_queueData","_send","flush","clearTimeout","sendIQ","errback","timeout","timeoutHandler","addHandler","stanza","deleteTimedHandler","iqtype","addTimedHandler","deleteHandler","element","_sendRestart","thand","handRef","hand","disconnect","reason","pres","_addSysTimedHandler","_onDisconnectTimeout","_disconnect","status","condition","plugin","statusChanged","err","_doDisconnect","_dataRecv","req","raw","_reqToData","strip","pop","_emptyQueue","typ","cond","conflict","getElementsByTagName","newList","mechanisms","_connect_cb","_callback","bodyWrap","conncheck","sasl_scram_sha1","sasl_plain","sasl_digest_md5","sasl_anonymous","legacy_auth","hasFeatures","matched","mech","found_authentication","_no_auth_received","authenticate","higher","priority","swap","mechanism_found","test","_addSysHandler","_sasl_success_cb","_sasl_failure_cb","_sasl_challenge_cb","_sasl_mechanism","onStart","request_auth_exchange","mechanism","isClientFirst","response","onChallenge","_auth1_cb","to","challenge","iq","_auth2_cb","serverSignature","success","attribMatch","matches","match","onSuccess","_sasl_auth1_cb","_sasl_bind_cb","resource","jidNode","_sasl_session_cb","onFailure","since","now","SASLMechanism","connection","_connection","Error","SASLAnonymous","SASLPlain","auth_str","SASLSHA1","test_cnonce","cnonce","random","nonce","salt","iter","Hi","U","U_old","clientKey","serverKey","clientSignature","responseText","authMessage","substr","SASLMD5","_quote","realm","host","qop","digest_uri","A1","A2","Request","sends","xmlData","origFunc","date","NaN","abort","dead","age","timeDead","xhr","_newXHR","getResponse","responseXML","documentElement","XMLHttpRequest","overrideMimeType","onreadystatechange","_conn","_buildBody","xml:lang","content","ver","xmpp:version","xmlns:xmpp","_onRequestStateChange","_throttledRequestHandler","parseInt","_sendTerminate","_hitError","reqStatus","xmpp:restart","_processRequest","time_elapsed","readyState","reqIs0","reqIs1","_removeRequest","_restartRequest","self","primaryTimeout","secondaryTimeout","requestCompletedWithServerError","open","sync","e2","sendFunc","customHeaders","headers","header","setRequestHeader","backoff","min","pow","abs","new_service","location","pathname","_buildStream","xmlns:stream","version","_check_streamerror","connectstatus","textContent","errorString","_closeSocket","socket","WebSocket","onopen","_onOpen","onerror","_onError","onclose","_onClose","onmessage","_connect_cb_wrapper","_handleStreamStart","ns_stream","namespaceURI","streamStart","string","_streamWrap","_onMessage","CLOSED","close","rawStanza","_removeClosingTag","search","firstChild","start","startString","Occupant","RoomConfig","XmppRoom","__bind","fn","me","rooms","roomNames","conn","_muc_handler","room","nick","msg_handler_cb","pres_handler_cb","roster_cb","password","history_attrs","room_nick","test_append_nick","extended_presence","_this","roomname","xquery","_i","_len","_message_handlers","_presence_handlers","leave","handler_cb","exit_msg","presence","presenceid","html_message","msgid","parent","removeChild","groupchat","invite","receiver","invitation","MUC_USER","directInvite","queryOccupants","success_cb","error_cb","configure","config","MUC_OWNER","cancelConfigure","saveConfiguration","conf","Form","toXML","createInstantRoom","roomiq","setTopic","topic","_modifyPrivilege","item","MUC_ADMIN","modifyRole","role","kick","voice","mute","op","deop","modifyAffiliation","affiliation","ban","member","revoke","owner","admin","changeNick","setStatus","show","listRooms","server","handle_cb","client","_roomRosterHandler","_addOccupant","roster","_roster_handlers","_handler_ids","muc","handler_type","removeHandler","occ","newnick","_ref","_parsePresence","update","c2","_j","_len1","_ref1","_ref2","_ref3","_ref4","_ref5","_ref6","_ref7","states","code","parse","field","identity","query","_k","_len2","identities","var","label","_callbacks","_callbacks_request","items","oldCallback","newCallback","_onReceivePresence","_onReceiveIQ","supportVersioning","get","userCallback","_onReceiveRosterSuccess","_onReceiveRosterError","registerCallback","call_back","registerRequestCallback","findItem","removeItem","subscribe","NICK","unsubscribe","authorize","unauthorize","add","groups","newName","newGroups","remove","subscription","_updateItems","_call_backs","_call_backs_request","resources","iqresult","_updateItem","ask","group","_identities","_features","_items","_onDiscoInfo","_onDiscoItems","addIdentity","category","lang","addFeature","var_name","removeFeature","addItem","_buildIQResult","query_attrs","HASH","_ver","_knownCapabilities","_jidVerIndex","disco","CAPS","_delegateCapabilities","generateCapsAttrs","generateVer","sort","_sortIdentities","identitiesLen","featuresLen","curIdent","getCapabilitiesByJid","querySelector","_requestCapabilities","_handleDiscoInfoReply","childNodesLen","Mustache","Renderer","otag","ctag","pragmas","buffer","pragmas_implemented","IMPLICIT-ITERATOR","context","render","template","partials","in_recursion","includes","render_pragmas","render_section","render_tags","regex","RegExp","pragma","opts","render_partial","trim","find","is_array","map","row","create_context","is_object","new_regex","tag_replace_callback","operator","set_delimiters","escape","lines","delimiters","dels","escape_regex","callee","sRE","specials","is_kinda_truthy","bool","needle","haystack","_context","iterator","ctx","Object","array","r","l","to_html","view","send_fun","renderer","$","__slice","i18n","dict","load","i18n_dict","extend","_","args","printf","isArray","p0","position","shift","_t","params","jQuery","dateFormat","token","timezone","timezoneClip","pad","val","utc","dF","SyntaxError","masks","D","m","H","M","L","o","getTimezoneOffset","flags","dd","ddd","dayNames","dddd","mm","mmm","monthNames","mmmm","yy","yyyy","hh","HH","MM","ss","round","tt","T","TT","Z","S","$0","default","shortDate","mediumDate","longDate","fullDate","shortTime","mediumTime","longTime","isoDate","isoTime","isoDateTime","isoUtcDateTime","format"],"mappings":";;;AAIA,IAAIA,SAAS;IACT,IAAIC,SAAS;IAEb,IAAIC;;;;;QAKAC,QAAQ,SAAUC;YACd,IAAIC,SAAS;YACb,IAAIC,MAAMC,MAAMC;YAChB,IAAIC,MAAMC,MAAMC,MAAMC;YACtB,IAAIC,IAAI;YAER,GAAG;gBACCP,OAAOF,MAAMU,WAAWD;gBACxBN,OAAOH,MAAMU,WAAWD;gBACxBL,OAAOJ,MAAMU,WAAWD;gBAExBJ,OAAOH,QAAQ;gBACfI,QAASJ,OAAO,MAAM,IAAMC,QAAQ;gBACpCI,QAASJ,OAAO,OAAO,IAAMC,QAAQ;gBACrCI,OAAOJ,OAAO;gBAEd,IAAIO,MAAMR,OAAO;oBACbI,OAAOC,OAAO;uBACX,IAAIG,MAAMP,OAAO;oBACpBI,OAAO;;gBAGXP,SAASA,SAASJ,OAAOe,OAAOP,QAAQR,OAA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ACV8B,WAAgB;IAChBC,WAAgB;IAChBC,YAAgB;IAChBC,UAAgB;IAChBC,UAAgB;IAChBC,WAAgB;IAChBC,YAAgB;IAChBC,UAAgB;IAChBC,SAAgB;IAChBC,SAAgB;IAChBC,aAAgB;IAChBC,gBAAgB;;;;AAIjBlD,WAAWf;IACVmC,YACC,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAC1C,UAAU,UAAU,WAAW,aAAa,YAAY,UAAU;IAEnEI,cACC,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAC7E,WAAW,YAAY,SAAS,SAAS,OAAO,QAAQ,QAAQ,UAAU,aAAa,WAAW,YAAY;;;;AAKhHpjB,KAAKjN,UAAUgyB,SAAS,SAAUnzB,MAAMswB;IACvC,OAAON,WAAW1uB,MAAMtB,MAAMswB"} \ No newline at end of file diff --git a/public/ext/candy/libs.min.css b/public/ext/candy/libs.min.css new file mode 100755 index 0000000..e637fd5 --- /dev/null +++ b/public/ext/candy/libs.min.css @@ -0,0 +1,5 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{color:#000;background:#ff0}sub,sup{position:relative;font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}.glyphicon,address{font-style:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.dropdown-menu,.modal-content{-webkit-background-clip:padding-box}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.dropdown-toggle.btn-danger,.open>.dropdown-toggle.btn-default,.open>.dropdown-toggle.btn-info,.open>.dropdown-toggle.btn-primary,.open>.dropdown-toggle.btn-warning{background-image:none}.img-thumbnail,body{background-color:#fff}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}address,blockquote .small,blockquote footer,blockquote small,dd,dt,pre{line-height:1.42857143}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:20px}ol,ul{margin-bottom:10px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;color:#777}legend,pre{display:block;color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-right:15px;padding-left:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{min-width:0;margin:0}legend{width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.42857143;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.form-group-sm .form-control,.input-sm{padding:5px 10px;border-radius:3px;font-size:12px}.input-sm{height:30px;line-height:1.5}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;line-height:1.5}.form-group-lg .form-control,.input-lg{border-radius:6px;padding:10px 16px;font-size:18px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;line-height:1.3333333}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;line-height:1.3333333}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu-right,.dropdown-menu.pull-right{right:0;left:auto}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.42857143;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{clear:both;font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{right:auto;left:0}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.nav-justified>.dropdown .dropdown-menu,.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.nav>li,.nav>li>a{display:block;position:relative}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center;margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0;border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.carousel-inner,.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:8px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:20px 0;border-radius:4px}.pager li,.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:20px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-striped .progress-bar-info,.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.popover,.tooltip{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:400;line-height:1.42857143;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;line-break:auto;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal{position:fixed;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.carousel-control,.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;text-align:left;text-align:start;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-size:14px;text-align:left;text-align:start;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.left>.arrow:after,.popover.right>.arrow:after{bottom:-10px;content:" "}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{width:100%}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}} \ No newline at end of file diff --git a/public/ext/candy/libs.min.js b/public/ext/candy/libs.min.js new file mode 100755 index 0000000..d0f225e --- /dev/null +++ b/public/ext/candy/libs.min.js @@ -0,0 +1,3 @@ +function b64_sha1(a){return binb2b64(core_sha1(str2binb(a),8*a.length))}function str_sha1(a){return binb2str(core_sha1(str2binb(a),8*a.length))}function b64_hmac_sha1(a,b){return binb2b64(core_hmac_sha1(a,b))}function str_hmac_sha1(a,b){return binb2str(core_hmac_sha1(a,b))}function core_sha1(a,b){a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;var c,d,e,f,g,h,i,j,k=new Array(80),l=1732584193,m=-271733879,n=-1732584194,o=271733878,p=-1009589776;for(c=0;cd;d++)16>d?k[d]=a[c+d]:k[d]=rol(k[d-3]^k[d-8]^k[d-14]^k[d-16],1),e=safe_add(safe_add(rol(l,5),sha1_ft(d,m,n,o)),safe_add(safe_add(p,k[d]),sha1_kt(d))),p=o,o=n,n=rol(m,30),m=l,l=e;l=safe_add(l,f),m=safe_add(m,g),n=safe_add(n,h),o=safe_add(o,i),p=safe_add(p,j)}return[l,m,n,o,p]}function sha1_ft(a,b,c,d){return 20>a?b&c|~b&d:40>a?b^c^d:60>a?b&c|b&d|c&d:b^c^d}function sha1_kt(a){return 20>a?1518500249:40>a?1859775393:60>a?-1894007588:-899497514}function core_hmac_sha1(a,b){var c=str2binb(a);c.length>16&&(c=core_sha1(c,8*a.length));for(var d=new Array(16),e=new Array(16),f=0;16>f;f++)d[f]=909522486^c[f],e[f]=1549556828^c[f];var g=core_sha1(d.concat(str2binb(b)),512+8*b.length);return core_sha1(e.concat(g),672)}function safe_add(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function rol(a,b){return a<>>32-b}function str2binb(a){for(var b=[],c=255,d=0;d<8*a.length;d+=8)b[d>>5]|=(a.charCodeAt(d/8)&c)<<24-d%32;return b}function binb2str(a){for(var b="",c=255,d=0;d<32*a.length;d+=8)b+=String.fromCharCode(a[d>>5]>>>24-d%32&c);return b}function binb2b64(a){for(var b,c,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e="",f=0;f<4*a.length;f+=3)for(b=(a[f>>2]>>8*(3-f%4)&255)<<16|(a[f+1>>2]>>8*(3-(f+1)%4)&255)<<8|a[f+2>>2]>>8*(3-(f+2)%4)&255,c=0;4>c;c++)e+=8*f+6*c>32*a.length?"=":d.charAt(b>>6*(3-c)&63);return e}var Base64=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b={encode:function(b){var c,d,e,f,g,h,i,j="",k=0;do c=b.charCodeAt(k++),d=b.charCodeAt(k++),e=b.charCodeAt(k++),f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,isNaN(d)?h=i=64:isNaN(e)&&(i=64),j=j+a.charAt(f)+a.charAt(g)+a.charAt(h)+a.charAt(i);while(k>4,d=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(c),64!=h&&(j+=String.fromCharCode(d)),64!=i&&(j+=String.fromCharCode(e));while(k>16)+(b>>16)+(c>>16);return d<<16|65535&c},b=function(a,b){return a<>>32-b},c=function(a){for(var b=[],c=0;c<8*a.length;c+=8)b[c>>5]|=(255&a.charCodeAt(c/8))<>5]>>>c%32&255);return b},e=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>d%4*8+4&15)+b.charAt(a[d>>2]>>d%4*8&15);return c},f=function(c,d,e,f,g,h){return a(b(a(a(d,c),a(f,h)),g),e)},g=function(a,b,c,d,e,g,h){return f(b&c|~b&d,a,b,e,g,h)},h=function(a,b,c,d,e,g,h){return f(b&d|c&~d,a,b,e,g,h)},i=function(a,b,c,d,e,g,h){return f(b^c^d,a,b,e,g,h)},j=function(a,b,c,d,e,g,h){return f(c^(b|~d),a,b,e,g,h)},k=function(b,c){b[c>>5]|=128<>>9<<4)+14]=c;for(var d,e,f,k,l=1732584193,m=-271733879,n=-1732584194,o=271733878,p=0;pc?Math.ceil(c):Math.floor(c),0>c&&(c+=b);b>c;c++)if(c in this&&this[c]===a)return c;return-1}),function(a){function b(a,b){return new f.Builder(a,b)}function c(a){return new f.Builder("message",a)}function d(a){return new f.Builder("iq",a)}function e(a){return new f.Builder("presence",a)}var f;f={VERSION:"1.1.3",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag:function(a){for(var b=0;b0)for(var c=0;c/g,">"),a=a.replace(/'/g,"'"),a=a.replace(/"/g,""")},xmlTextNode:function(a){return f.xmlGenerator().createTextNode(a)},xmlHtmlNode:function(a){var b;if(window.DOMParser){var c=new DOMParser;b=c.parseFromString(a,"text/xml")}else b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a);return b},getText:function(a){if(!a)return null;var b="";0===a.childNodes.length&&a.nodeType==f.ElementType.TEXT&&(b+=a.nodeValue);for(var c=0;c0&&(h=i.join("; "),c.setAttribute(g,h))}else c.setAttribute(g,h);for(b=0;b/g,"\\3e").replace(/@/g,"\\40")},unescapeNode:function(a){return a.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")},getNodeFromJid:function(a){return a.indexOf("@")<0?null:a.split("@")[0]},getDomainFromJid:function(a){var b=f.getBareJidFromJid(a);if(b.indexOf("@")<0)return b;var c=b.split("@");return c.splice(0,1),c.join("@")},getResourceFromJid:function(a){var b=a.split("/");return b.length<2?null:(b.splice(0,1),b.join("/"))},getBareJidFromJid:function(a){return a?a.split("/")[0]:null},log:function(a,b){},debug:function(a){this.log(this.LogLevel.DEBUG,a)},info:function(a){this.log(this.LogLevel.INFO,a)},warn:function(a){this.log(this.LogLevel.WARN,a)},error:function(a){this.log(this.LogLevel.ERROR,a)},fatal:function(a){this.log(this.LogLevel.FATAL,a)},serialize:function(a){var b;if(!a)return null;"function"==typeof a.tree&&(a=a.tree());var c,d,e=a.nodeName;for(a.getAttribute("_realname")&&(e=a.getAttribute("_realname")),b="<"+e,c=0;c/g,">").replace(/0){for(b+=">",c=0;c"}b+=""}else b+="/>";return b},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(a,b){f._connectionPlugins[a]=b}},f.Builder=function(a,b){("presence"==a||"message"==a||"iq"==a)&&(b&&!b.xmlns?b.xmlns=f.NS.CLIENT:b||(b={xmlns:f.NS.CLIENT})),this.nodeTree=f.xmlElement(a,b),this.node=this.nodeTree},f.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return f.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},attrs:function(a){for(var b in a)a.hasOwnProperty(b)&&this.node.setAttribute(b,a[b]);return this},c:function(a,b,c){var d=f.xmlElement(a,b,c);return this.node.appendChild(d),c||(this.node=d),this},cnode:function(a){var b,c=f.xmlGenerator();try{b=void 0!==c.importNode}catch(d){b=!1}var e=b?c.importNode(a,!0):f.copyElement(a);return this.node.appendChild(e),this.node=e,this},t:function(a){var b=f.xmlTextNode(a);return this.node.appendChild(b),this},h:function(a){var b=document.createElement("body");b.innerHTML=a;for(var c=f.createHtml(b);c.childNodes.length>0;)this.node.appendChild(c.childNodes[0]);return this}},f.Handler=function(a,b,c,d,e,g,h){this.handler=a,this.ns=b,this.name=c,this.type=d,this.id=e,this.options=h||{matchBare:!1},this.options.matchBare||(this.options.matchBare=!1),this.options.matchBare?this.from=g?f.getBareJidFromJid(g):null:this.from=g,this.user=!0},f.Handler.prototype={isMatch:function(a){var b,c=null;if(c=this.options.matchBare?f.getBareJidFromJid(a.getAttribute("from")):a.getAttribute("from"),b=!1,this.ns){var d=this;f.forEachChild(a,null,function(a){a.getAttribute("xmlns")==d.ns&&(b=!0)}),b=b||a.getAttribute("xmlns")==this.ns}else b=!0;return!b||this.name&&!f.isTagEqual(a,this.name)||this.type&&a.getAttribute("type")!=this.type||this.id&&a.getAttribute("id")!=this.id||this.from&&c!=this.from?!1:!0},run:function(a){var b=null;try{b=this.handler(a)}catch(c){throw c.sourceURL?f.fatal("error: "+this.handler+" "+c.sourceURL+":"+c.line+" - "+c.name+": "+c.message):c.fileName?("undefined"!=typeof console&&(console.trace(),console.error(this.handler," - error - ",c,c.message)),f.fatal("error: "+this.handler+" "+c.fileName+":"+c.lineNumber+" - "+c.name+": "+c.message)):f.fatal("error: "+c.message+"\n"+c.stack),c}return b},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},f.TimedHandler=function(a,b){this.period=a,this.handler=b,this.lastCalled=(new Date).getTime(),this.user=!0},f.TimedHandler.prototype={run:function(){return this.lastCalled=(new Date).getTime(),this.handler()},reset:function(){this.lastCalled=(new Date).getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},f.Connection=function(a,b){this.service=a,this.options=b||{};var c=this.options.protocol||"";0===a.indexOf("ws:")||0===a.indexOf("wss:")||0===c.indexOf("ws")?this._proto=new f.Websocket(this):this._proto=new f.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this._idleTimeout=null,this._disconnectTimeout=null,this.do_authentication=!0,this.authenticated=!1,this.disconnecting=!1,this.connected=!1,this.errors=0,this.paused=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(this._onIdle.bind(this),100);for(var d in f._connectionPlugins)if(f._connectionPlugins.hasOwnProperty(d)){var e=f._connectionPlugins[d],g=function(){};g.prototype=e,this[d]=new g,this[d].init(this)}},f.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this.authenticated=!1,this.disconnecting=!1,this.connected=!1,this.errors=0,this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(a){return"string"==typeof a||"number"==typeof a?++this._uniqueId+":"+a:++this._uniqueId+""},connect:function(a,b,c,d,e,g){this.jid=a,this.authzid=f.getBareJidFromJid(this.jid),this.authcid=f.getNodeFromJid(this.jid),this.pass=b,this.servtype="xmpp",this.connect_callback=c,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.errors=0,this.domain=f.getDomainFromJid(this.jid),this._changeConnectStatus(f.Status.CONNECTING,null),this._proto._connect(d,e,g)},attach:function(a,b,c,d,e,f,g){this._proto._attach(a,b,c,d,e,f,g)},xmlInput:function(a){},xmlOutput:function(a){},rawInput:function(a){},rawOutput:function(a){},send:function(a){if(null!==a){if("function"==typeof a.sort)for(var b=0;b0;)e=this.removeHandlers.pop(),d=this.handlers.indexOf(e),d>=0&&this.handlers.splice(d,1);for(;this.addHandlers.length>0;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())return void this._doDisconnect();var g,h,i=c.getAttribute("type");if(null!==i&&"terminate"==i){if(this.disconnecting)return;return g=c.getAttribute("condition"),h=c.getElementsByTagName("conflict"),null!==g?("remote-stream-error"==g&&h.length>0&&(g="conflict"),this._changeConnectStatus(f.Status.CONNFAIL,g)):this._changeConnectStatus(f.Status.CONNFAIL,"unknown"),void this.disconnect("unknown stream-error")}var j=this;f.forEachChild(c,null,function(a){var b,c;for(c=j.handlers,j.handlers=[],b=0;b0;g||(g=d.getElementsByTagName("features").length>0);var h,i,j=d.getElementsByTagName("mechanism"),k=[],l=!1;if(!g)return void this._proto._no_auth_received(b);if(j.length>0)for(h=0;h0,(l=this._authentication.legacy_auth||k.length>0)?void(this.do_authentication!==!1&&this.authenticate(k)):void this._proto._no_auth_received(b)}}},authenticate:function(a){var c;for(c=0;ca[e].prototype.priority&&(e=g);if(e!=c){var h=a[c];a[c]=a[e],a[e]=h}}var i=!1;for(c=0;c0&&(b="conflict"),this._changeConnectStatus(f.Status.AUTHFAIL,b),!1}var e,g=a.getElementsByTagName("bind");return g.length>0?(e=g[0].getElementsByTagName("jid"),void(e.length>0&&(this.jid=f.getText(e[0]),this.do_session?(this._addSysHandler(this._sasl_session_cb.bind(this),null,null,null,"_session_auth_2"),this.send(d({type:"set",id:"_session_auth_2"}).c("session",{xmlns:f.NS.SESSION}).tree())):(this.authenticated=!0,this._changeConnectStatus(f.Status.CONNECTED,null))))):(f.info("SASL binding failed."),this._changeConnectStatus(f.Status.AUTHFAIL,null),!1)},_sasl_session_cb:function(a){if("result"==a.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(f.Status.CONNECTED,null);else if("error"==a.getAttribute("type"))return f.info("Session creation failed."),this._changeConnectStatus(f.Status.AUTHFAIL,null),!1;return!1},_sasl_failure_cb:function(a){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(f.Status.AUTHFAIL,null),!1},_auth2_cb:function(a){return"result"==a.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(f.Status.CONNECTED,null)):"error"==a.getAttribute("type")&&(this._changeConnectStatus(f.Status.AUTHFAIL,null),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(a,b){var c=new f.TimedHandler(a,b);return c.user=!1,this.addTimeds.push(c),c},_addSysHandler:function(a,b,c,d,e){var g=new f.Handler(a,b,c,d,e);return g.user=!1,this.addHandlers.push(g),g},_onDisconnectTimeout:function(){return f.info("_onDisconnectTimeout was called"),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){for(var a,b,c,d;this.addTimeds.length>0;)this.timedHandlers.push(this.addTimeds.pop());for(;this.removeTimeds.length>0;)b=this.removeTimeds.pop(),a=this.timedHandlers.indexOf(b),a>=0&&this.timedHandlers.splice(a,1);var e=(new Date).getTime();for(d=[],a=0;a=c-e?b.run()&&d.push(b):d.push(b));this.timedHandlers=d,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(this._onIdle.bind(this),100))}},a&&a(f,b,c,d,e),f.SASLMechanism=function(a,b,c){this.name=a,this.isClientFirst=b,this.priority=c},f.SASLMechanism.prototype={test:function(a){return!0},onStart:function(a){this._connection=a},onChallenge:function(a,b){throw new Error("You should implement challenge handling!")},onFailure:function(){this._connection=null},onSuccess:function(){this._connection=null}},f.SASLAnonymous=function(){},f.SASLAnonymous.prototype=new f.SASLMechanism("ANONYMOUS",!1,10),f.SASLAnonymous.test=function(a){return null===a.authcid},f.Connection.prototype.mechanisms[f.SASLAnonymous.prototype.name]=f.SASLAnonymous,f.SASLPlain=function(){},f.SASLPlain.prototype=new f.SASLMechanism("PLAIN",!0,20),f.SASLPlain.test=function(a){return null!==a.authcid},f.SASLPlain.prototype.onChallenge=function(a){var b=a.authzid;return b+="\x00",b+=a.authcid,b+="\x00",b+=a.pass},f.Connection.prototype.mechanisms[f.SASLPlain.prototype.name]=f.SASLPlain,f.SASLSHA1=function(){},f.SASLSHA1.prototype=new f.SASLMechanism("SCRAM-SHA-1",!0,40),f.SASLSHA1.test=function(a){return null!==a.authcid},f.SASLSHA1.prototype.onChallenge=function(a,b,c){var d=c||MD5.hexdigest(1234567890*Math.random()),e="n="+a.authcid;return e+=",r=",e+=d,a._sasl_data.cnonce=d,a._sasl_data["client-first-message-bare"]=e,e="n,,"+e,this.onChallenge=function(a,b){for(var c,d,e,f,g,h,i,j,k,l,m,n="c=biws,",o=a._sasl_data["client-first-message-bare"]+","+b+",",p=a._sasl_data.cnonce,q=/([a-z]+)=([^,]+)(,|$)/;b.match(q);){var r=b.match(q);switch(b=b.replace(r[0],""),r[1]){case"r":c=r[2];break;case"s":d=r[2];break;case"i":e=r[2]}}if(c.substr(0,p.length)!==p)return a._sasl_data={},a._sasl_failure_cb();for(n+="r="+c,o+=n,d=Base64.decode(d),d+="\x00\x00\x00",f=h=core_hmac_sha1(a.pass,d),i=1;e>i;i++){for(g=core_hmac_sha1(a.pass,binb2str(h)),j=0;5>j;j++)f[j]^=g[j];h=g}for(f=binb2str(f),k=core_hmac_sha1(f,"Client Key"),l=str_hmac_sha1(f,"Server Key"),m=core_hmac_sha1(str_sha1(binb2str(k)),o),a._sasl_data["server-signature"]=b64_hmac_sha1(l,o),j=0;5>j;j++)k[j]^=m[j];return n+=",p="+Base64.encode(binb2str(k))}.bind(this),e},f.Connection.prototype.mechanisms[f.SASLSHA1.prototype.name]=f.SASLSHA1,f.SASLMD5=function(){},f.SASLMD5.prototype=new f.SASLMechanism("DIGEST-MD5",!1,30),f.SASLMD5.test=function(a){return null!==a.authcid},f.SASLMD5.prototype._quote=function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'},f.SASLMD5.prototype.onChallenge=function(a,b,c){ +for(var d,e=/([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/,f=c||MD5.hexdigest(""+1234567890*Math.random()),g="",h=null,i="",j="";b.match(e);)switch(d=b.match(e),b=b.replace(d[0],""),d[2]=d[2].replace(/^"(.+)"$/,"$1"),d[1]){case"realm":g=d[2];break;case"nonce":i=d[2];break;case"qop":j=d[2];break;case"host":h=d[2]}var k=a.servtype+"/"+a.domain;null!==h&&(k=k+"/"+h);var l=MD5.hash(a.authcid+":"+g+":"+this._connection.pass)+":"+i+":"+f,m="AUTHENTICATE:"+k,n="";return n+="charset=utf-8,",n+="username="+this._quote(a.authcid)+",",n+="realm="+this._quote(g)+",",n+="nonce="+this._quote(i)+",",n+="nc=00000001,",n+="cnonce="+this._quote(f)+",",n+="digest-uri="+this._quote(k)+",",n+="response="+MD5.hexdigest(MD5.hexdigest(l)+":"+i+":00000001:"+f+":auth:"+MD5.hexdigest(m))+",",n+="qop=auth",this.onChallenge=function(){return""}.bind(this),n},f.Connection.prototype.mechanisms[f.SASLMD5.prototype.name]=f.SASLMD5}(function(){window.Strophe=arguments[0],window.$build=arguments[1],window.$msg=arguments[2],window.$iq=arguments[3],window.$pres=arguments[4]}),Strophe.Request=function(a,b,c,d){this.id=++Strophe._requestId,this.xmlData=a,this.data=Strophe.serialize(a),this.origFunc=b,this.func=b,this.rid=c,this.date=NaN,this.sends=d||0,this.abort=!1,this.dead=null,this.age=function(){if(!this.date)return 0;var a=new Date;return(a-this.date)/1e3},this.timeDead=function(){if(!this.dead)return 0;var a=new Date;return(a-this.dead)/1e3},this.xhr=this._newXHR()},Strophe.Request.prototype={getResponse:function(){var a=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if(a=this.xhr.responseXML.documentElement,"parsererror"==a.tagName)throw Strophe.error("invalid response received"),Strophe.error("responseText: "+this.xhr.responseText),Strophe.error("responseXML: "+Strophe.serialize(this.xhr.responseXML)),"parsererror"}else this.xhr.responseText&&(Strophe.error("invalid response received"),Strophe.error("responseText: "+this.xhr.responseText),Strophe.error("responseXML: "+Strophe.serialize(this.xhr.responseXML)));return a},_newXHR:function(){var a=null;return window.XMLHttpRequest?(a=new XMLHttpRequest,a.overrideMimeType&&a.overrideMimeType("text/xml")):window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLHTTP")),a.onreadystatechange=this.func.bind(null,this),a}},Strophe.Bosh=function(a){this._conn=a,this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.hold=1,this.wait=60,this.window=5,this._requests=[]},Strophe.Bosh.prototype={strip:null,_buildBody:function(){var a=$build("body",{rid:this.rid++,xmlns:Strophe.NS.HTTPBIND});return null!==this.sid&&a.attrs({sid:this.sid}),a},_reset:function(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null},_connect:function(a,b,c){this.wait=a||this.wait,this.hold=b||this.hold;var d=this._buildBody().attrs({to:this._conn.domain,"xml:lang":"en",wait:this.wait,hold:this.hold,content:"text/xml; charset=utf-8",ver:"1.6","xmpp:version":"1.0","xmlns:xmpp":Strophe.NS.BOSH});c&&d.attrs({route:c});var e=this._conn._connect_cb;this._requests.push(new Strophe.Request(d.tree(),this._onRequestStateChange.bind(this,e.bind(this._conn)),d.tree().getAttribute("rid"))),this._throttledRequestHandler()},_attach:function(a,b,c,d,e,f,g){this._conn.jid=a,this.sid=b,this.rid=c,this._conn.connect_callback=d,this._conn.domain=Strophe.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=e||this.wait,this.hold=f||this.hold,this.window=g||this.window,this._conn._changeConnectStatus(Strophe.Status.ATTACHED,null)},_connect_cb:function(a){var b,c,d=a.getAttribute("type");if(null!==d&&"terminate"==d)return Strophe.error("BOSH-Connection failed: "+b),b=a.getAttribute("condition"),c=a.getElementsByTagName("conflict"),null!==b?("remote-stream-error"==b&&c.length>0&&(b="conflict"),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,b)):this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(),Strophe.Status.CONNFAIL;this.sid||(this.sid=a.getAttribute("sid"));var e=a.getAttribute("requests");e&&(this.window=parseInt(e,10));var f=a.getAttribute("hold");f&&(this.hold=parseInt(f,10));var g=a.getAttribute("wait");g&&(this.wait=parseInt(g,10))},_disconnect:function(a){this._sendTerminate(a)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random())},_emptyQueue:function(){return 0===this._requests.length},_hitError:function(a){this.errors++,Strophe.warn("request errored, status: "+a+", number of errors: "+this.errors),this.errors>4&&this._onDisconnectTimeout()},_no_auth_received:function(a){a=a?a.bind(this._conn):this._conn._connect_cb.bind(this._conn);var b=this._buildBody();this._requests.push(new Strophe.Request(b.tree(),this._onRequestStateChange.bind(this,a.bind(this._conn)),b.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){for(var a;this._requests.length>0;)a=this._requests.pop(),a.abort=!0,a.xhr.abort(),a.xhr.onreadystatechange=function(){}},_onIdle:function(){var a=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===a.length&&!this._conn.disconnecting&&(Strophe.info("no requests during idle cycle, sending blank request"),a.push(null)),this._requests.length<2&&a.length>0&&!this._conn.paused){for(var b=this._buildBody(),c=0;c0){var d=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),d>Math.floor(Strophe.TIMEOUT*this.wait)&&(Strophe.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(Strophe.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}},_onRequestStateChange:function(a,b){if(Strophe.debug("request id "+b.id+"."+b.sends+" state changed to "+b.xhr.readyState),b.abort)return void(b.abort=!1);var c;if(4==b.xhr.readyState){c=0;try{c=b.xhr.status}catch(d){}if("undefined"==typeof c&&(c=0),this.disconnecting&&c>=400)return void this._hitError(c);var e=this._requests[0]==b,f=this._requests[1]==b;(c>0&&500>c||b.sends>5)&&(this._removeRequest(b),Strophe.debug("request id "+b.id+" should now be removed")),200==c?((f||e&&this._requests.length>0&&this._requests[0].age()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),Strophe.debug("request id "+b.id+"."+b.sends+" got 200"),a(b),this.errors=0):(Strophe.error("request id "+b.id+"."+b.sends+" error "+c+" happened"),(0===c||c>=400&&600>c||c>=12e3)&&(this._hitError(c),c>=400&&500>c&&(this._conn._changeConnectStatus(Strophe.Status.DISCONNECTING,null),this._conn._doDisconnect()))),c>0&&500>c||b.sends>5||this._throttledRequestHandler()}},_processRequest:function(a){var b=this,c=this._requests[a],d=-1;try{4==c.xhr.readyState&&(d=c.xhr.status)}catch(e){Strophe.error("caught an error in _requests["+a+"], reqStatus: "+d)}if("undefined"==typeof d&&(d=-1),c.sends>this.maxRetries)return void this._onDisconnectTimeout();var f=c.age(),g=!isNaN(f)&&f>Math.floor(Strophe.TIMEOUT*this.wait),h=null!==c.dead&&c.timeDead()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait),i=4==c.xhr.readyState&&(1>d||d>=500);if((g||h||i)&&(h&&Strophe.error("Request "+this._requests[a].id+" timed out (secondary), restarting"),c.abort=!0,c.xhr.abort(),c.xhr.onreadystatechange=function(){},this._requests[a]=new Strophe.Request(c.xmlData,c.origFunc,c.rid,c.sends),c=this._requests[a]),0===c.xhr.readyState){Strophe.debug("request id "+c.id+"."+c.sends+" posting");try{c.xhr.open("POST",this._conn.service,this._conn.options.sync?!1:!0)}catch(j){return Strophe.error("XHR open failed."),this._conn.connected||this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}var k=function(){if(c.date=new Date,b._conn.options.customHeaders){var a=b._conn.options.customHeaders;for(var d in a)a.hasOwnProperty(d)&&c.xhr.setRequestHeader(d,a[d])}c.xhr.send(c.data)};if(c.sends>1){var l=1e3*Math.min(Math.floor(Strophe.TIMEOUT*this.wait),Math.pow(c.sends,3));setTimeout(k,l)}else k();c.sends++,this._conn.xmlOutput!==Strophe.Connection.prototype.xmlOutput&&(c.xmlData.nodeName===this.strip&&c.xmlData.childNodes.length?this._conn.xmlOutput(c.xmlData.childNodes[0]):this._conn.xmlOutput(c.xmlData)),this._conn.rawOutput!==Strophe.Connection.prototype.rawOutput&&this._conn.rawOutput(c.data)}else Strophe.debug("_processRequest: "+(0===a?"first":"second")+" request has readyState of "+c.xhr.readyState)},_removeRequest:function(a){Strophe.debug("removing request");var b;for(b=this._requests.length-1;b>=0;b--)a==this._requests[b]&&this._requests.splice(b,1);a.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(a){var b=this._requests[a];null===b.dead&&(b.dead=new Date),this._processRequest(a)},_reqToData:function(a){try{return a.getResponse()}catch(b){if("parsererror"!=b)throw b;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(a){Strophe.info("_sendTerminate was called");var b=this._buildBody().attrs({type:"terminate"});a&&b.cnode(a.tree());var c=new Strophe.Request(b.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),b.tree().getAttribute("rid"));this._requests.push(c),this._throttledRequestHandler()},_send:function(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(this._conn._onIdle.bind(this._conn),100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?Strophe.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):Strophe.debug("_throttledRequestHandler called with undefined requests"),this._requests&&0!==this._requests.length&&(this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid)\s*)*/,"");if(""===b)return;b=a.data.replace(//,"");var c=(new DOMParser).parseFromString(b,"text/xml").documentElement;this._conn.xmlInput(c),this._conn.rawInput(a.data),this._handleStreamStart(c)&&(this._connect_cb(c),this.streamStart=a.data.replace(/^$/,""))}else{if(""===a.data)return this._conn.rawInput(a.data),this._conn.xmlInput(document.createElement("stream:stream")),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"Received closing stream"),void this._conn._doDisconnect();var d=this._streamWrap(a.data),e=(new DOMParser).parseFromString(d,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(e,null,a.data)}},_disconnect:function(a){if(this.socket.readyState!==WebSocket.CLOSED){a&&this._conn.send(a);var b="";this._conn.xmlOutput(document.createElement("stream:stream")),this._conn.rawOutput(b);try{this.socket.send(b)}catch(c){Strophe.info("Couldn't send closing stream tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){Strophe.info("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(a){return this.streamStart+a+""},_closeSocket:function(){if(this.socket)try{this.socket.close()}catch(a){}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(){this._conn.connected&&!this._conn.disconnecting?(Strophe.error("Websocket closed unexcectedly"),this._conn._doDisconnect()):Strophe.info("Websocket closed")},_no_auth_received:function(a){Strophe.error("Server did not send any auth methods"),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"Server did not send any auth methods"),a&&(a=a.bind(this._conn))(),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_onError:function(a){Strophe.error("Websocket error "+a),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"The WebSocket connection could not be established was disconnected."),this._disconnect()},_onIdle:function(){var a=this._conn._data;if(a.length>0&&!this._conn.paused){for(var b=0;b"===a.data){var d="";return this._conn.rawInput(d),this._conn.xmlInput(document.createElement("stream:stream")),void(this._conn.disconnecting||this._conn._doDisconnect())}if(0===a.data.search("/,""),b=(new DOMParser).parseFromString(c,"text/xml").documentElement,!this._handleStreamStart(b))return}else c=this._streamWrap(a.data),b=(new DOMParser).parseFromString(c,"text/xml").documentElement;if(!this._check_streamerror(b,Strophe.Status.ERROR))return this._conn.disconnecting&&"presence"===b.firstChild.nodeName&&"unavailable"===b.firstChild.getAttribute("type")?(this._conn.xmlInput(b),void this._conn.rawInput(Strophe.serialize(b))):void this._conn._dataRecv(b,a.data)},_onOpen:function(){Strophe.info("Websocket open");var a=this._buildStream();this._conn.xmlOutput(a.tree());var b=this._removeClosingTag(a);this._conn.rawOutput(b),this.socket.send(b)},_removeClosingTag:function(a){var b=Strophe.serialize(a);return b=b.replace(/<(stream:stream .*[^\/])\/>$/,"<$1>")},_reqToData:function(a){return a},_send:function(){this._conn.flush()},_sendRestart:function(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}},function(){var a,b,c,d=function(a,b){return function(){return a.apply(b,arguments)}};Strophe.addConnectionPlugin("muc",{_connection:null,rooms:{},roomNames:[],init:function(a){return this._connection=a,this._muc_handler=null,Strophe.addNamespace("MUC_OWNER",Strophe.NS.MUC+"#owner"),Strophe.addNamespace("MUC_ADMIN",Strophe.NS.MUC+"#admin"),Strophe.addNamespace("MUC_USER",Strophe.NS.MUC+"#user"),Strophe.addNamespace("MUC_ROOMCONF",Strophe.NS.MUC+"#roomconfig")},join:function(a,b,d,e,f,g,h){var i,j;return j=this.test_append_nick(a,b),i=$pres({from:this._connection.jid,to:j}).c("x",{xmlns:Strophe.NS.MUC}),null!=h&&(i=i.c("history",h).up),null!=g&&i.cnode(Strophe.xmlElement("password",[],g)),"undefined"!=typeof extended_presence&&null!==extended_presence&&i.up.cnode(extended_presence),null==this._muc_handler&&(this._muc_handler=this._connection.addHandler(function(b){return function(c){var d,e,f,g,h,i,j,k,l,m;if(d=c.getAttribute("from"),!d)return!0;if(h=d.split("/")[0],!b.rooms[h])return!0;if(a=b.rooms[h],f={},"message"===c.nodeName)f=a._message_handlers;else if("presence"===c.nodeName&&(k=c.getElementsByTagName("x"),k.length>0))for(l=0,m=k.length;m>l;l++)if(i=k[l],j=i.getAttribute("xmlns"),j&&j.match(Strophe.NS.MUC)){f=a._presence_handlers;break}for(g in f)e=f[g],e(c,a)||delete f[g];return!0}}(this))),this.rooms.hasOwnProperty(a)||(this.rooms[a]=new c(this,a,b,g),this.roomNames.push(a)),e&&this.rooms[a].addHandler("presence",e),d&&this.rooms[a].addHandler("message",d),f&&this.rooms[a].addHandler("roster",f),this._connection.send(i)},leave:function(a,b,c,d){var e,f,g,h;return e=this.roomNames.indexOf(a),delete this.rooms[a],e>=0&&(this.roomNames.splice(e,1),0===this.roomNames.length&&(this._connection.deleteHandler(this._muc_handler),this._muc_handler=null)),h=this.test_append_nick(a,b),g=this._connection.getUniqueId(),f=$pres({type:"unavailable",id:g,from:this._connection.jid,to:h}),null!=d&&f.c("status",d),null!=c&&this._connection.addHandler(c,null,"presence",null,g),this._connection.send(f),g},message:function(a,b,c,d,e){var f,g,h,i;return i=this.test_append_nick(a,b),e=e||(null!=b?"chat":"groupchat"),g=this._connection.getUniqueId(),f=$msg({to:i,from:this._connection.jid,type:e,id:g}).c("body",{xmlns:Strophe.NS.CLIENT}).t(c),f.up(),null!=d&&(f.c("html",{xmlns:Strophe.NS.XHTML_IM}).c("body",{xmlns:Strophe.NS.XHTML}).h(d),0===f.node.childNodes.length?(h=f.node.parentNode,f.up().up(),f.node.removeChild(h)):f.up().up()),f.c("x",{xmlns:"jabber:x:event"}).c("composing"),this._connection.send(f),g},groupchat:function(a,b,c){return this.message(a,null,b,c)},invite:function(a,b,c){var d,e;return e=this._connection.getUniqueId(),d=$msg({from:this._connection.jid,to:a,id:e}).c("x",{xmlns:Strophe.NS.MUC_USER}).c("invite",{to:b}),null!=c&&d.c("reason",c),this._connection.send(d),e},directInvite:function(a,b,c,d){var e,f,g;return g=this._connection.getUniqueId(),e={xmlns:"jabber:x:conference",jid:a},null!=c&&(e.reason=c),null!=d&&(e.password=d),f=$msg({from:this._connection.jid,to:b,id:g}).c("x",e),this._connection.send(f),g},queryOccupants:function(a,b,c){var d,e;return d={xmlns:Strophe.NS.DISCO_ITEMS},e=$iq({from:this._connection.jid,to:a,type:"get"}).c("query",d),this._connection.sendIQ(e,b,c)},configure:function(a,b,c){var d,e;return d=$iq({to:a,type:"get"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}),e=d.tree(),this._connection.sendIQ(e,b,c)},cancelConfigure:function(a){var b,c;return b=$iq({to:a,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"cancel"}),c=b.tree(),this._connection.sendIQ(c)},saveConfiguration:function(a,b,c,d){var e,f,g,h,i;if(f=$iq({to:a,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}),"undefined"!=typeof Form&&b instanceof Form)b.type="submit",f.cnode(b.toXML());else for(f.c("x",{xmlns:"jabber:x:data",type:"submit"}),h=0,i=b.length;i>h;h++)e=b[h],f.cnode(e).up();return g=f.tree(),this._connection.sendIQ(g,c,d)},createInstantRoom:function(a,b,c){var d;return d=$iq({to:a,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"submit"}),this._connection.sendIQ(d.tree(),b,c)},setTopic:function(a,b){var c;return c=$msg({to:a,from:this._connection.jid,type:"groupchat"}).c("subject",{xmlns:"jabber:client"}).t(b),this._connection.send(c.tree())},_modifyPrivilege:function(a,b,c,d,e){var f;return f=$iq({to:a,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_ADMIN}).cnode(b.node),null!=c&&f.c("reason",c),this._connection.sendIQ(f.tree(),d,e)},modifyRole:function(a,b,c,d,e,f){var g;return g=$build("item",{nick:b,role:c}),this._modifyPrivilege(a,g,d,e,f)},kick:function(a,b,c,d,e){return this.modifyRole(a,b,"none",c,d,e)},voice:function(a,b,c,d,e){return this.modifyRole(a,b,"participant",c,d,e)},mute:function(a,b,c,d,e){return this.modifyRole(a,b,"visitor",c,d,e)},op:function(a,b,c,d,e){return this.modifyRole(a,b,"moderator",c,d,e)},deop:function(a,b,c,d,e){return this.modifyRole(a,b,"participant",c,d,e)},modifyAffiliation:function(a,b,c,d,e,f){var g;return g=$build("item",{jid:b,affiliation:c}),this._modifyPrivilege(a,g,d,e,f)},ban:function(a,b,c,d,e){return this.modifyAffiliation(a,b,"outcast",c,d,e)},member:function(a,b,c,d,e){return this.modifyAffiliation(a,b,"member",c,d,e)},revoke:function(a,b,c,d,e){return this.modifyAffiliation(a,b,"none",c,d,e)},owner:function(a,b,c,d,e){return this.modifyAffiliation(a,b,"owner",c,d,e)},admin:function(a,b,c,d,e){return this.modifyAffiliation(a,b,"admin",c,d,e)},changeNick:function(a,b){var c,d;return d=this.test_append_nick(a,b),c=$pres({from:this._connection.jid,to:d,id:this._connection.getUniqueId()}),this._connection.send(c.tree())},setStatus:function(a,b,c,d){var e,f;return f=this.test_append_nick(a,b),e=$pres({from:this._connection.jid,to:f}),null!=c&&e.c("show",c).up(),null!=d&&e.c("status",d),this._connection.send(e.tree())},listRooms:function(a,b,c){var d;return d=$iq({to:a,from:this._connection.jid,type:"get"}).c("query",{xmlns:Strophe.NS.DISCO_ITEMS}),this._connection.sendIQ(d,b,c)},test_append_nick:function(a,b){var c,d;return d=Strophe.escapeNode(Strophe.getNodeFromJid(a)),c=Strophe.getDomainFromJid(a),d+"@"+c+(null!=b?"/"+b:"")}}),c=function(){function b(a,b,c,e){this.client=a,this.name=b,this.nick=c,this.password=e,this._roomRosterHandler=d(this._roomRosterHandler,this),this._addOccupant=d(this._addOccupant,this),this.roster={},this._message_handlers={},this._presence_handlers={},this._roster_handlers={},this._handler_ids=0,a.muc&&(this.client=a.muc),this.name=Strophe.getBareJidFromJid(b),this.addHandler("presence",this._roomRosterHandler)}return b.prototype.join=function(a,b,c){return this.client.join(this.name,this.nick,a,b,c,this.password)},b.prototype.leave=function(a,b){return this.client.leave(this.name,this.nick,a,b),delete this.client.rooms[this.name]},b.prototype.message=function(a,b,c,d){return this.client.message(this.name,a,b,c,d)},b.prototype.groupchat=function(a,b){return this.client.groupchat(this.name,a,b)},b.prototype.invite=function(a,b){return this.client.invite(this.name,a,b)},b.prototype.directInvite=function(a,b){return this.client.directInvite(this.name,a,b,this.password)},b.prototype.configure=function(a){return this.client.configure(this.name,a)},b.prototype.cancelConfigure=function(){return this.client.cancelConfigure(this.name)},b.prototype.saveConfiguration=function(a){return this.client.saveConfiguration(this.name,a)},b.prototype.queryOccupants=function(a,b){return this.client.queryOccupants(this.name,a,b)},b.prototype.setTopic=function(a){return this.client.setTopic(this.name,a)},b.prototype.modifyRole=function(a,b,c,d,e){return this.client.modifyRole(this.name,a,b,c,d,e)},b.prototype.kick=function(a,b,c,d){return this.client.kick(this.name,a,b,c,d)},b.prototype.voice=function(a,b,c,d){return this.client.voice(this.name,a,b,c,d)},b.prototype.mute=function(a,b,c,d){return this.client.mute(this.name,a,b,c,d)},b.prototype.op=function(a,b,c,d){return this.client.op(this.name,a,b,c,d)},b.prototype.deop=function(a,b,c,d){return this.client.deop(this.name,a,b,c,d)},b.prototype.modifyAffiliation=function(a,b,c,d,e){return this.client.modifyAffiliation(this.name,a,b,c,d,e)},b.prototype.ban=function(a,b,c,d){return this.client.ban(this.name,a,b,c,d)},b.prototype.member=function(a,b,c,d){return this.client.member(this.name,a,b,c,d)},b.prototype.revoke=function(a,b,c,d){return this.client.revoke(this.name,a,b,c,d)},b.prototype.owner=function(a,b,c,d){return this.client.owner(this.name,a,b,c,d)},b.prototype.admin=function(a,b,c,d){return this.client.admin(this.name,a,b,c,d)},b.prototype.changeNick=function(a){return this.nick=a,this.client.changeNick(this.name,a)},b.prototype.setStatus=function(a,b){return this.client.setStatus(this.name,this.nick,a,b)},b.prototype.addHandler=function(a,b){var c;switch(c=this._handler_ids++,a){case"presence":this._presence_handlers[c]=b;break;case"message":this._message_handlers[c]=b;break;case"roster":this._roster_handlers[c]=b;break;default:return this._handler_ids--,null}return c},b.prototype.removeHandler=function(a){return delete this._presence_handlers[a],delete this._message_handlers[a],delete this._roster_handlers[a]},b.prototype._addOccupant=function(b){var c;return c=new a(b,this),this.roster[c.nick]=c,c},b.prototype._roomRosterHandler=function(a){var c,d,e,f,g,h;switch(c=b._parsePresence(a),g=c.nick,f=c.newnick||null,c.type){case"error":return;case"unavailable":f&&(c.nick=f,this.roster[g]&&this.roster[f]&&(this.roster[g].update(this.roster[f]),this.roster[f]=this.roster[g]),this.roster[g]&&!this.roster[f]&&(this.roster[f]=this.roster[g].update(c))),delete this.roster[g];break;default:this.roster[g]?this.roster[g].update(c):this._addOccupant(c)}h=this._roster_handlers;for(e in h)d=h[e],d(this.roster,this)||delete this._roster_handlers[e];return!0},b._parsePresence=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;for(e={},b=a.attributes,e.nick=Strophe.getResourceFromJid(b.from.textContent),e.type=(null!=(j=b.type)?j.textContent:void 0)||null,e.states=[],k=a.childNodes,f=0,h=k.length;h>f;f++)switch(c=k[f],c.nodeName){case"status":e.status=c.textContent||null;break;case"show":e.show=c.textContent||null;break;case"x":if(b=c.attributes,(null!=(l=b.xmlns)?l.textContent:void 0)===Strophe.NS.MUC_USER)for(m=c.childNodes,g=0,i=m.length;i>g;g++)switch(d=m[g],d.nodeName){case"item":b=d.attributes,e.affiliation=(null!=(n=b.affiliation)?n.textContent:void 0)||null,e.role=(null!=(o=b.role)?o.textContent:void 0)||null,e.jid=(null!=(p=b.jid)?p.textContent:void 0)||null,e.newnick=(null!=(q=b.nick)?q.textContent:void 0)||null;break;case"status":d.attributes.code&&e.states.push(d.attributes.code.textContent)}}return e},b}(),b=function(){function a(a){this.parse=d(this.parse,this),null!=a&&this.parse(a)}return a.prototype.parse=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;for(g=a.getElementsByTagName("query")[0].childNodes,this.identities=[],this.features=[],this.x=[],h=0,k=g.length;k>h;h++)switch(d=g[h],c=d.attributes,d.nodeName){case"identity":for(f={},i=0,l=c.length;l>i;i++)b=c[i],f[b.name]=b.textContent;this.identities.push(f);break;case"feature":this.features.push(c["var"].textContent);break;case"x":if(c=d.childNodes[0].attributes,"FORM_TYPE"===!c["var"].textContent||"hidden"===!c.type.textContent)break;for(n=d.childNodes,j=0,m=n.length;m>j;j++)e=n[j],e.attributes.type||(c=e.attributes,this.x.push({"var":c["var"].textContent,label:c.label.textContent||"",value:e.firstChild.textContent||""}))}return{identities:this.identities,features:this.features,x:this.x}},a}(),a=function(){function a(a,b){this.room=b,this.update=d(this.update,this),this.admin=d(this.admin,this),this.owner=d(this.owner,this),this.revoke=d(this.revoke,this),this.member=d(this.member,this),this.ban=d(this.ban,this),this.modifyAffiliation=d(this.modifyAffiliation,this),this.deop=d(this.deop,this),this.op=d(this.op,this),this.mute=d(this.mute,this),this.voice=d(this.voice,this),this.kick=d(this.kick,this),this.modifyRole=d(this.modifyRole,this),this.update(a)}return a.prototype.modifyRole=function(a,b,c,d){return this.room.modifyRole(this.nick,a,b,c,d)},a.prototype.kick=function(a,b,c){return this.room.kick(this.nick,a,b,c)},a.prototype.voice=function(a,b,c){return this.room.voice(this.nick,a,b,c)},a.prototype.mute=function(a,b,c){return this.room.mute(this.nick,a,b,c)},a.prototype.op=function(a,b,c){return this.room.op(this.nick,a,b,c)},a.prototype.deop=function(a,b,c){return this.room.deop(this.nick,a,b,c)},a.prototype.modifyAffiliation=function(a,b,c,d){return this.room.modifyAffiliation(this.jid,a,b,c,d)},a.prototype.ban=function(a,b,c){return this.room.ban(this.jid,a,b,c)},a.prototype.member=function(a,b,c){return this.room.member(this.jid,a,b,c)},a.prototype.revoke=function(a,b,c){return this.room.revoke(this.jid,a,b,c)},a.prototype.owner=function(a,b,c){return this.room.owner(this.jid,a,b,c)},a.prototype.admin=function(a,b,c){return this.room.admin(this.jid,a,b,c)},a.prototype.update=function(a){return this.nick=a.nick||null,this.affiliation=a.affiliation||null,this.role=a.role||null,this.jid=a.jid||null,this.status=a.status||null,this.show=a.show||null,this},a}()}.call(this),Strophe.addConnectionPlugin("roster",{init:function(a){this._connection=a,this._callbacks=[],this._callbacks_request=[],items=[],ver=null;var b,c=this,d=a.connect,e=a.attach,f=function(d){if(d==Strophe.Status.ATTACHED||d==Strophe.Status.CONNECTED)try{a.addHandler(c._onReceivePresence.bind(c),null,"presence",null,null,null),a.addHandler(c._onReceiveIQ.bind(c),Strophe.NS.ROSTER,"iq","set",null,null)}catch(e){Strophe.error(e)}null!==b&&b.apply(this,arguments)};a.connect=function(c,e,g,h,i,j){b=g,"undefined"==typeof c&&(c=null),"undefined"==typeof e&&(e=null),g=f,d.apply(a,[c,e,g,h,i,j])},a.attach=function(c,d,g,h,i,j,k){b=h,"undefined"==typeof c&&(c=null),"undefined"==typeof d&&(d=null),"undefined"==typeof g&&(g=null),h=f,e.apply(a,[c,d,g,h,i,j,k])},Strophe.addNamespace("ROSTER_VER","urn:xmpp:features:rosterver"),Strophe.addNamespace("NICK","http://jabber.org/protocol/nick")},supportVersioning:function(){return this._connection.features&&this._connection.features.getElementsByTagName("ver").length>0},get:function(a,b,c){var d={xmlns:Strophe.NS.ROSTER};this.items=[],this.supportVersioning()&&(d.ver=b||"",this.items=c||[]);var e=$iq({type:"get",id:this._connection.getUniqueId("roster")}).c("query",d);return this._connection.sendIQ(e,this._onReceiveRosterSuccess.bind(this,a),this._onReceiveRosterError.bind(this,a))},registerCallback:function(a){this._callbacks.push(a)},registerRequestCallback:function(a){this._callbacks_request.push(a)},findItem:function(a){for(var b=0;bf;f++){var g=b[f];a+=g.category+"/"+g.type+"/"+g.lang+"/"+g.name+"<"}for(var f=0;e>f;f++)a+=d[f]+"<";return this._ver=b64_sha1(a),this._ver},getCapabilitiesByJid:function(a){return this._jidVerIndex[a]?this._knownCapabilities[this._jidVerIndex[a]]:null},_delegateCapabilities:function(a){var b=a.getAttribute("from"),c=a.querySelector("c"),d=c.getAttribute("ver"),e=c.getAttribute("node");return this._knownCapabilities[d]?(this._jidVerIndex[b]=d,this._jidVerIndex[b]&&!this._jidVerIndex[b]===d||(this._jidVerIndex[b]=d),!0):this._requestCapabilities(b,e,d)},_requestCapabilities:function(a,b,c){if(a!==this._connection.jid){var d=this._connection.disco.info(a,b+"#"+c);this._connection.addHandler(this._handleDiscoInfoReply.bind(this),Strophe.NS.DISCO_INFO,"iq","result",d,a)}return!0},_handleDiscoInfoReply:function(a){var b=a.querySelector("query"),c=b.getAttribute("node").split("#"),d=c[1],e=a.getAttribute("from");if(this._knownCapabilities[d])this._jidVerIndex[e]&&!this._jidVerIndex[e]===d||(this._jidVerIndex[e]=d);else{var f=b.childNodes,g=f.length;this._knownCapabilities[d]=[];for(var h=0;g>h;h++){var c=f[h];this._knownCapabilities[d].push({name:c.nodeName,attributes:c.attributes})}this._jidVerIndex[e]=d}return!1},_sortIdentities:function(a,b){return a.category>b.category?1:a.categoryb.type?1:a.typeb.lang?1:a.lang|\\{|%)?([^\\/#\\^]+?)\\1?"+e.ctag+"+","g")},g=f(),h=function(a,d,h){switch(d){case"!":return"";case"=":return e.set_delimiters(h),g=f(),"";case">":return e.render_partial(h,b,c);case"{":return e.find(h,b);default:return e.escape(e.find(h,b))}},i=a.split("\n"),j=0;j\\]/g,function(a){switch(a){case"&":return"&";case"\\":return"\\\\";case'"':return'"';case"<":return"<";case">":return">";default:return a}})},create_context:function(a){if(this.is_object(a))return a;var b=".";this.pragmas["IMPLICIT-ITERATOR"]&&(b=this.pragmas["IMPLICIT-ITERATOR"].iterator);var c={};return c[b]=a,c},is_object:function(a){return a&&"object"==typeof a},is_array:function(a){return"[object Array]"===Object.prototype.toString.call(a)},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if("function"==typeof a.map)return a.map(b);for(var c=[],d=a.length,e=0;d>e;e++)c.push(b(a[e]));return c}},{name:"mustache.js",version:"0.3.0",to_html:function(b,c,d,e){var f=new a;return e&&(f.send=e),f.render(b,c,d),e?void 0:f.buffer.join("\n")}}}();!function(a){var b=Array.prototype.slice,c={dict:null,load:function(b){null!==this.dict?a.extend(this.dict,b):this.dict=b},_:function(a){return dict=this.dict,dict&&dict.hasOwnProperty(a)&&(a=dict[a]),args=b.call(arguments),args[0]=a,this.printf.apply(this,args)},printf:function(c,d){return arguments.length<2?c:(d=a.isArray(d)?d:b.call(arguments,1),c.replace(/([^%]|^)%(?:(\d+)\$)?s/g,function(a,b,c){return c?b+d[parseInt(c)-1]:b+d.shift()}).replace(/%%s/g,"%s"))}};a.fn._t=function(b,d){return a(this).html(c._.apply(c,arguments))},a.i18n=c}(jQuery);var dateFormat=function(){var a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,d=function(a,b){for(a=String(a),b=b||2;a.length99?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:g?"UTC":(String(e).match(b)||[""]).pop().replace(c,""),o:(r>0?"-":"+")+d(100*Math.floor(Math.abs(r)/60)+Math.abs(r)%60,4),S:["th","st","nd","rd"][j%10>3?0:(j%100-j%10!=10)*j%10]};return f.replace(a,function(a){return a in s?s[a]:a.slice(1,a.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},Date.prototype.format=function(a,b){return dateFormat(this,a,b)}; \ No newline at end of file diff --git a/public/ext/candy/package.json b/public/ext/candy/package.json new file mode 100755 index 0000000..ee4bef1 --- /dev/null +++ b/public/ext/candy/package.json @@ -0,0 +1,65 @@ +{ + "name": "candy", + "version": "2.2.0", + "description": "Multi-user XMPP web client", + "main": "candy.min.js", + "directories": { + "doc": "docs", + "example": "example" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/candy-chat/candy.git" + }, + "keywords": [ + "xmpp", + "muc", + "multi-user", + "websocket", + "bosh", + "chat" + ], + "contributors": [ + { + "name": "Michael Weibel", + "email": "michael.weibel@gmail.com" + }, + { + "name": "Patrick Stadler", + "email": "patrick.stadler@gmail.com", + "url": "http://pstadler.sh" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/candy-chat/candy/issues" + }, + "homepage": "http://candy-chat.github.io/candy/", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-clear": "^0.2.1", + "grunt-contrib-clean": "^0.5.0", + "grunt-contrib-compress": "^0.13.0", + "grunt-contrib-concat": "^0.5.1", + "grunt-contrib-cssmin": "^0.14.0", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-uglify": "^0.4.0", + "grunt-contrib-watch": "^0.6.1", + "grunt-coveralls": "^0.3.0", + "grunt-github-releaser": "^0.1.17", + "grunt-mkdir": "^0.1.1", + "grunt-natural-docs": "^0.1.1", + "grunt-notify": "^0.3.0", + "grunt-prompt": "^1.3.0", + "grunt-sync-pkg": "^0.1.2", + "grunt-todo": "~0.4.0", + "intern": "^2.0.1", + "jshint-stylish": "^0.2.0", + "lolex": "^1.2.0", + "sinon": "^1.10.3", + "sinon-chai": "^2.5.0" + } +} diff --git a/public/ext/candy/res/default.css b/public/ext/candy/res/default.css new file mode 100755 index 0000000..e46e290 --- /dev/null +++ b/public/ext/candy/res/default.css @@ -0,0 +1,803 @@ +/** File: default.css + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +html, body { + margin: 0; + padding: 0; + font-family: 'Helvetica Neue', Helvetica, sans-serif; +} + +#candy { + position: absolute; + top: 0; + bottom: 0; + right: 0; + left: 0; + background-color: #444; + color: #333; + overflow: hidden; +} + +a { + color: #333; + text-decoration: none; +} + +ul { + list-style: none; + padding: 0; + margin: 0; +} + +#chat-tabs { + list-style: none; + margin: 0 200px 0 0; + padding: 0; + overflow: auto; + overflow-y: hidden; +} + +#chat-tabs li { + margin: 0; + float: left; + position: relative; + white-space: nowrap; + margin: 3px 0 0 3px; +} + +#chat-tabs a { + padding: 4px 50px 4px 10px; + display: inline-block; + color: #ccc; + height: 20px; + background-color: #666; + border-radius: 3px 3px 0 0; +} + +#chat-tabs .active a { + background-color: #eee; + color: black; +} + +#chat-tabs .transition { + position: absolute; + top: 0; + right: 0; + padding: 0; + width: 30px; + height: 30px; + background: url(img/tab-transitions.png) repeat-y left; + border-radius: 0 3px 0 0; +} + +#chat-tabs a.close { + background-color: transparent; + position: absolute; + right: -2px; + top: -3px; + height: auto; + padding: 5px; + margin: 0 5px 0 2px; + color: #999; +} + +#chat-tabs .active .transition { + background: url(img/tab-transitions.png) repeat-y -50px; +} + +#chat-tabs .close:hover { + color: black; +} + +#chat-tabs .unread { + color: white; + background-color: #9b1414; + padding: 2px 4px; + font-weight: bold; + font-size: 10px; + position: absolute; + top: 5px; + right: 22px; + border-radius: 3px; +} + +#chat-tabs .offline .label { + text-decoration: line-through; +} + +#chat-toolbar { + position: fixed; + bottom: 0; + right: 0; + font-size: 11px; + color: #666; + width: 200px; + height: 24px; + padding-top: 7px; + background-color: #444; + display: none; + border-top: 1px solid black; + box-shadow: 0 1px 0 0 #555 inset; +} + +#chat-toolbar li { + width: 16px; + height: 16px; + margin-left: 5px; + float: left; + display: inline-block; + cursor: pointer; + background-position: top left; + background-repeat: no-repeat; +} + +#chat-toolbar #emoticons-icon { + background-image: url(img/action/emoticons.png); +} + +#chat-toolbar .context { + background-image: url(img/action/settings.png); + display: none; +} + +.role-moderator #chat-toolbar .context, .affiliation-owner #chat-toolbar .context { + display: inline-block; +} + +#chat-sound-control { + background-image: url(img/action/sound-off.png); +} + +#chat-sound-control.checked { + background-image: url(img/action/sound-on.png); +} + +#chat-autoscroll-control { + background-image: url(img/action/autoscroll-off.png); +} + +#chat-autoscroll-control.checked { + background-image: url(img/action/autoscroll-on.png); +} + +#chat-statusmessage-control { + background-image: url(img/action/statusmessage-off.png); +} + +#chat-statusmessage-control.checked { + background-image: url(img/action/statusmessage-on.png); +} + +#chat-toolbar .usercount { + background-image: url(img/action/usercount.png); + cursor: default; + padding-left: 20px; + width: auto; + margin-right: 5px; + float: right; +} + +.usercount span { + display: inline-block; + padding: 1px 3px; + background-color: #666; + font-weight: bold; + border-radius: 3px; + color: #ccc; +} + +.room-pane { + display: none; +} + +.roster-pane { + position: absolute; + overflow: auto; + top: 0; + right: 0; + bottom: 0; + width: 200px; + margin: 30px 0 31px 0; + background-color: #333; + border-top: 1px solid black; + box-shadow: inset 0 1px 0 0 #555; +} + +.roster-pane .user { + cursor: pointer; + padding: 7px 10px; + font-size: 12px; + opacity: 0; + display: none; + color: #ccc; + clear: both; + height: 14px; + border-bottom: 1px solid black; + box-shadow: 0 1px 0 0 #555; +} + +.roster-pane .user:hover { + background-color: #222; +} + +.roster-pane .user.status-ignored { + cursor: default; +} + +.roster-pane .user.me { + font-weight: bold; + cursor: default; +} + +.roster-pane .user.me:hover { + background-color: transparent; +} + +.roster-pane .label { + float: left; + width: 110px; + overflow: hidden; + white-space: nowrap; + text-shadow: 1px 1px black; +} + +.roster-pane li { + width: 16px; + height: 16px; + float: right; + display: block; + margin-left: 3px; + background-repeat: no-repeat; + background-position: center; +} + +.roster-pane li.role { + cursor: default; + display: none; +} + +.roster-pane li.role-moderator { + background-image: url(img/roster/role-moderator.png); + display: block; +} + +.roster-pane li.affiliation-owner { + background-image: url(img/roster/affiliation-owner.png); + display: block; +} + +.roster-pane li.ignore { + background-image: url(img/roster/ignore.png); + display: none; +} + +.roster-pane .status-ignored li.ignore { + display: block; +} + +.roster-pane li.context { + color: #999; + text-align: center; + cursor: pointer; +} + +.roster-pane li.context:hover { + background-color: #666; + border-radius: 4px; +} + +.roster-pane .me li.context { + display: none; +} + +.message-pane-wrapper { + clear: both; + overflow: auto; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + height: auto; + width: auto; + margin: 30px 200px 31px 0; + background-color: #eee; + font-size: 13px; + padding: 0 5px; +} + +.message-pane { + padding-top: 1px; +} + +.message-pane li { + cursor: default; + border-bottom: 1px solid #ccc; + box-shadow: 0 1px 0 0 white; +} + +.message-pane small { + display: none; + color: #a00; + font-size: 10px; + position: absolute; + background-color: #f7f7f7; + text-align: center; + line-height: 20px; + margin: 4px 0; + padding: 0 5px; + right: 5px; +} + +.message-pane li:hover { + background-color: #f7f7f7; +} + +.message-pane li:hover small { + display: block; +} + +.message-pane li>div { + overflow: auto; + padding: 2px 0 2px 130px; + line-height: 24px; + white-space: -o-pre-wrap; /* Opera */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ +} + +.message-pane li>div p { + margin: 0; +} + +.message-pane .label { + font-weight: bold; + white-space: nowrap; + display: block; + margin-left: -130px; + width: 110px; + float: left; + overflow: hidden; + text-align: right; + color: black; +} + +.message-pane .label:hover, +.message-pane .label:focus { + color: inherit; +} + +.message-pane .spacer { + color: #aaa; + font-weight: bold; + margin-left: -14px; + float: left; +} + +.message-pane .subject, .message-pane .subject .label { + color: #a00; + font-weight: bold; +} + +.message-pane .adminmessage { + color: #a00; + font-weight: bold; +} + +.message-pane .infomessage { + color: #888; + font-style: italic; +} + +.message-pane div>a { + color: #a00; +} + +.message-pane a:hover { + text-decoration: underline; +} + +.message-pane .emoticon { + vertical-align: text-bottom; + height: 15px; + width: 15px; +} + +.message-form-wrapper { + position: fixed; + bottom: 0; + left: 0; + right: 0; + width: auto; + margin-right: 200px; + border-top: 1px solid #ccc; + background-color: white; + height: 31px; +} + +.message-form { + position: fixed; + bottom: 0; + left: 0; + right: 0; + margin-right: 320px; + padding: 0; +} + +.message-form input { + border: 0 none; + padding: 5px 10px; + font-size: 14px; + width: 100%; + display: block; + outline-width: 0; + background-color: white; +} + +.message-form input.submit { + cursor: pointer; + background-color: #ccc; + color: #666; + position: fixed; + bottom: 0; + right: 0; + margin: 3px 203px 3px 3px; + padding: 0 10px; + width: auto; + font-size: 12px; + line-height: 12px; + height: 25px; + font-weight: bold; + border-radius: 3px; +} + +#tooltip { + position: absolute; + z-index: 10; + display: none; + margin: 13px -18px -3px -2px; + color: #333; + font-size: 11px; + padding: 5px 0; +} + +#tooltip div { + background-color: #f7f7f7; + padding: 2px 5px; + zoom: 1; + box-shadow: 0 1px 2px rgba(0, 0, 0, .75); +} + +.arrow { + background: url(img/tooltip-arrows.gif) no-repeat left bottom; + height: 5px; + display: block; + position: relative; + z-index: 11; +} + +.right-bottom .arrow-bottom { + background-position: right bottom; +} + +.arrow-top { + display: none; + background-position: left top; +} + +.right-top .arrow-top { + display: block; + background-position: right top; +} + +.left-top .arrow-top { + display: block; +} + + +.left-top .arrow-bottom, +.right-top .arrow-bottom { + display: none; +} + +#context-menu { + position: absolute; + z-index: 10; + display: none; + padding: 5px 10px; + margin: 13px -28px -3px -12px; +} + +#context-menu ul { + background-color: #f7f7f7; + color: #333; + font-size: 12px; + padding: 2px; + zoom: 1; + box-shadow: 0 1px 2px rgba(0, 0, 0, .75); +} + +#context-menu li { + padding: 3px 5px 3px 20px; + line-height: 12px; + cursor: pointer; + margin-bottom: 2px; + background: 1px no-repeat; + white-space: nowrap; +} + +#context-menu li:hover { + background-color: #ccc; +} + +#context-menu li:last-child { + margin-bottom: 0; +} + +#context-menu .private { + background-image: url(img/action/private.png); +} + +#context-menu .ignore { + background-image: url(img/action/ignore.png); +} + +#context-menu .unignore { + background-image: url(img/action/unignore.png); +} + +#context-menu .kick { + background-image: url(img/action/kick.png); +} + +#context-menu .ban { + background-image: url(img/action/ban.png); +} + +#context-menu .subject { + background-image: url(img/action/subject.png); +} + +#context-menu .emoticons { + padding-left: 5px; + width: 85px; + white-space: normal; +} + +#context-menu .emoticons:hover { + background-color: transparent; +} + +#context-menu .emoticons img { + cursor: pointer; + margin: 3px; + height: 15px; + width: 15px; +} + +#chat-modal.modal-common { + background: #eee; + width: 300px; + padding: 20px 5px; + color: #333; + font-size: 16px; + position: fixed; + left: 50%; + top: 50%; + margin-left: -160px; + margin-top: -45px; + text-align: center; + display: none; + z-index: 100; + border: 5px solid #888; + border-radius: 5px; + box-shadow: 0 0 5px black; +} + +#chat-modal-overlay { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + z-index: 90; + background-image: url(img/overlay.png); +} + +#chat-modal.modal-login { + display: block; + margin-top: -100px; +} + +#chat-modal-spinner { + display: none; + margin-left: 15px; +} + +#chat-modal form { + margin: 15px 0; +} + +#chat-modal label, #chat-modal input, #chat-modal select { + display: block; + float: left; + line-height: 26px; + font-size: 16px; + margin: 5px 0; +} + +#chat-modal input, #chat-modal select { + padding: 2px; + line-height: 16px; + width: 150px; +} + +#chat-modal input[type='text'], +#chat-modal input[type='password'] { + background-color: white; + border: 1px solid #ccc; + padding: 4px; + font-size: 14px; + color: #333; +} + +#chat-modal.login-with-domains { + width: 650px; + margin-left: -330px; +} + +#chat-modal span.at-symbol { + float: left; + padding: 6px; + font-size: 14px; +} + +#chat-modal select[name=domain] { + width: 320px; +} + +#chat-modal label { + text-align: right; + padding-right: 1em; + clear: both; + width: 100px; +} + +#chat-modal input.button { + float: none; + display: block; + margin: 5px auto; + clear: both; + position: relative; + top: 10px; + width: 200px; +} + +#chat-modal .close { + position: absolute; + right: 0; + display: none; + padding: 0 5px; + margin: -17px 3px 0 0; + color: #999; + border-radius: 3px; +} + +#chat-modal .close:hover { + color: #333; + background-color: #aaa; +} + +/** + * Bootstrap Responsive Design styles + * It add styles to every element so we need to override some to keep the look of Candy + */ +*, :after, :before { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +label { + font-weight: normal; +} + +.label { + font-size: 100%; + font-weight: normal; + text-align: left; + line-height: inherit; + padding: 0; + color: inherit; +} + +.close { + font-size: inherit; + line-height: inherit; + opacity: 1; + text-shadow: none; +} + +#mobile-roster-icon { + display: none; +} + +/* + * Responsive specific styles for devices under 600px + * Mainly changing the size of room, roster and message panes when opened / closed + */ +@media (max-width: 599px) { + .room-pane .message-pane-wrapper { + margin-right: 50px; + } + + .room-pane:not(.open) .roster-pane { + right: -150px; + } + + .roster-pane { + z-index: 10; + } + + .message-pane li>div { + padding-left: 10px; + } + + .message-pane li>div.infomessage { + padding-left: 30px; + } + + .message-pane .label { + width: auto; + margin-left: 0; + } + + .message-pane .spacer { + margin: 0 5px; + } + + .room-pane:not(.open) .message-form-wrapper { + margin-right: 50px; + } + + .room-pane:not(.open) .message-form { + margin-right: 150px; + } + + .room-pane:not(.open) .message-form input.submit { + margin-right: 53px; + } + + #mobile-roster-icon { + position: fixed; + top: 0; + right: 0; + } + +/* + * These are for the hamburger icon. The box-shadow adds the extra lines + */ + .box-shadow-icon { + position: relative; + display: block; + width: 50px; + height: 30px; + cursor: pointer; + } + + .box-shadow-icon:before { + content: ""; + position: absolute; + left: 15px; + top: 9px; + width: 20px; + height: 2px; + background: #aaa; + box-shadow: 0 5px 0 0 #aaa, 0 10px 0 0 #aaa; + } + + .box-shadow-icon:hover { + background: #222; + } +} diff --git a/public/ext/candy/res/img/action/autoscroll-off.png b/public/ext/candy/res/img/action/autoscroll-off.png new file mode 100755 index 0000000..a0b8aa6 Binary files /dev/null and b/public/ext/candy/res/img/action/autoscroll-off.png differ diff --git a/public/ext/candy/res/img/action/autoscroll-on.png b/public/ext/candy/res/img/action/autoscroll-on.png new file mode 100755 index 0000000..3f55052 Binary files /dev/null and b/public/ext/candy/res/img/action/autoscroll-on.png differ diff --git a/public/ext/candy/res/img/action/ban.png b/public/ext/candy/res/img/action/ban.png new file mode 100755 index 0000000..b335cb1 Binary files /dev/null and b/public/ext/candy/res/img/action/ban.png differ diff --git a/public/ext/candy/res/img/action/emoticons.png b/public/ext/candy/res/img/action/emoticons.png new file mode 100755 index 0000000..ade4318 Binary files /dev/null and b/public/ext/candy/res/img/action/emoticons.png differ diff --git a/public/ext/candy/res/img/action/ignore.png b/public/ext/candy/res/img/action/ignore.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/public/ext/candy/res/img/action/ignore.png differ diff --git a/public/ext/candy/res/img/action/kick.png b/public/ext/candy/res/img/action/kick.png new file mode 100755 index 0000000..bce1c97 Binary files /dev/null and b/public/ext/candy/res/img/action/kick.png differ diff --git a/public/ext/candy/res/img/action/menu.png b/public/ext/candy/res/img/action/menu.png new file mode 100755 index 0000000..be4540c Binary files /dev/null and b/public/ext/candy/res/img/action/menu.png differ diff --git a/public/ext/candy/res/img/action/private.png b/public/ext/candy/res/img/action/private.png new file mode 100755 index 0000000..39433cf Binary files /dev/null and b/public/ext/candy/res/img/action/private.png differ diff --git a/public/ext/candy/res/img/action/settings.png b/public/ext/candy/res/img/action/settings.png new file mode 100755 index 0000000..327fdf4 Binary files /dev/null and b/public/ext/candy/res/img/action/settings.png differ diff --git a/public/ext/candy/res/img/action/sound-off.png b/public/ext/candy/res/img/action/sound-off.png new file mode 100755 index 0000000..7ba81fe Binary files /dev/null and b/public/ext/candy/res/img/action/sound-off.png differ diff --git a/public/ext/candy/res/img/action/sound-on.png b/public/ext/candy/res/img/action/sound-on.png new file mode 100755 index 0000000..b435160 Binary files /dev/null and b/public/ext/candy/res/img/action/sound-on.png differ diff --git a/public/ext/candy/res/img/action/statusmessage-off.png b/public/ext/candy/res/img/action/statusmessage-off.png new file mode 100755 index 0000000..03eb01d Binary files /dev/null and b/public/ext/candy/res/img/action/statusmessage-off.png differ diff --git a/public/ext/candy/res/img/action/statusmessage-on.png b/public/ext/candy/res/img/action/statusmessage-on.png new file mode 100755 index 0000000..063e8dc Binary files /dev/null and b/public/ext/candy/res/img/action/statusmessage-on.png differ diff --git a/public/ext/candy/res/img/action/subject.png b/public/ext/candy/res/img/action/subject.png new file mode 100755 index 0000000..7bc9233 Binary files /dev/null and b/public/ext/candy/res/img/action/subject.png differ diff --git a/public/ext/candy/res/img/action/unignore.png b/public/ext/candy/res/img/action/unignore.png new file mode 100755 index 0000000..89c8129 Binary files /dev/null and b/public/ext/candy/res/img/action/unignore.png differ diff --git a/public/ext/candy/res/img/action/usercount.png b/public/ext/candy/res/img/action/usercount.png new file mode 100755 index 0000000..7fb4e1f Binary files /dev/null and b/public/ext/candy/res/img/action/usercount.png differ diff --git a/public/ext/candy/res/img/emoticons/Angel.png b/public/ext/candy/res/img/emoticons/Angel.png new file mode 100755 index 0000000..0cf707b Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Angel.png differ diff --git a/public/ext/candy/res/img/emoticons/Angry.png b/public/ext/candy/res/img/emoticons/Angry.png new file mode 100755 index 0000000..9ae5d18 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Angry.png differ diff --git a/public/ext/candy/res/img/emoticons/Aww.png b/public/ext/candy/res/img/emoticons/Aww.png new file mode 100755 index 0000000..3512863 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Aww.png differ diff --git a/public/ext/candy/res/img/emoticons/Aww_2.png b/public/ext/candy/res/img/emoticons/Aww_2.png new file mode 100755 index 0000000..60510bb Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Aww_2.png differ diff --git a/public/ext/candy/res/img/emoticons/Blushing.png b/public/ext/candy/res/img/emoticons/Blushing.png new file mode 100755 index 0000000..ab03ee8 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Blushing.png differ diff --git a/public/ext/candy/res/img/emoticons/Childish.png b/public/ext/candy/res/img/emoticons/Childish.png new file mode 100755 index 0000000..1a31c50 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Childish.png differ diff --git a/public/ext/candy/res/img/emoticons/Confused.png b/public/ext/candy/res/img/emoticons/Confused.png new file mode 100755 index 0000000..08ba7d3 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Confused.png differ diff --git a/public/ext/candy/res/img/emoticons/Creepy.png b/public/ext/candy/res/img/emoticons/Creepy.png new file mode 100755 index 0000000..5615058 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Creepy.png differ diff --git a/public/ext/candy/res/img/emoticons/Crying.png b/public/ext/candy/res/img/emoticons/Crying.png new file mode 100755 index 0000000..2532976 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Crying.png differ diff --git a/public/ext/candy/res/img/emoticons/Cthulhu.png b/public/ext/candy/res/img/emoticons/Cthulhu.png new file mode 100755 index 0000000..fafc4b3 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Cthulhu.png differ diff --git a/public/ext/candy/res/img/emoticons/Cute.png b/public/ext/candy/res/img/emoticons/Cute.png new file mode 100755 index 0000000..a883ac3 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Cute.png differ diff --git a/public/ext/candy/res/img/emoticons/Cute_Winking.png b/public/ext/candy/res/img/emoticons/Cute_Winking.png new file mode 100755 index 0000000..ad3383d Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Cute_Winking.png differ diff --git a/public/ext/candy/res/img/emoticons/Devil.png b/public/ext/candy/res/img/emoticons/Devil.png new file mode 100755 index 0000000..afc5c2c Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Devil.png differ diff --git a/public/ext/candy/res/img/emoticons/Gah.png b/public/ext/candy/res/img/emoticons/Gah.png new file mode 100755 index 0000000..b03ee1b Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Gah.png differ diff --git a/public/ext/candy/res/img/emoticons/Gah_2.png b/public/ext/candy/res/img/emoticons/Gah_2.png new file mode 100755 index 0000000..b682458 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Gah_2.png differ diff --git a/public/ext/candy/res/img/emoticons/Gasping.png b/public/ext/candy/res/img/emoticons/Gasping.png new file mode 100755 index 0000000..b6655ce Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Gasping.png differ diff --git a/public/ext/candy/res/img/emoticons/Greedy.png b/public/ext/candy/res/img/emoticons/Greedy.png new file mode 100755 index 0000000..a179638 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Greedy.png differ diff --git a/public/ext/candy/res/img/emoticons/Grinning.png b/public/ext/candy/res/img/emoticons/Grinning.png new file mode 100755 index 0000000..85ff915 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Grinning.png differ diff --git a/public/ext/candy/res/img/emoticons/Grinning_Winking.png b/public/ext/candy/res/img/emoticons/Grinning_Winking.png new file mode 100755 index 0000000..5b1d5b7 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Grinning_Winking.png differ diff --git a/public/ext/candy/res/img/emoticons/Happy.png b/public/ext/candy/res/img/emoticons/Happy.png new file mode 100755 index 0000000..51cf1a2 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Happy.png differ diff --git a/public/ext/candy/res/img/emoticons/Happy_2.png b/public/ext/candy/res/img/emoticons/Happy_2.png new file mode 100755 index 0000000..1332686 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Happy_2.png differ diff --git a/public/ext/candy/res/img/emoticons/Happy_3.png b/public/ext/candy/res/img/emoticons/Happy_3.png new file mode 100755 index 0000000..be79df0 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Happy_3.png differ diff --git a/public/ext/candy/res/img/emoticons/Heart.png b/public/ext/candy/res/img/emoticons/Heart.png new file mode 100755 index 0000000..dcd28b9 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Heart.png differ diff --git a/public/ext/candy/res/img/emoticons/Huh.png b/public/ext/candy/res/img/emoticons/Huh.png new file mode 100755 index 0000000..241f50f Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Huh.png differ diff --git a/public/ext/candy/res/img/emoticons/Huh_2.png b/public/ext/candy/res/img/emoticons/Huh_2.png new file mode 100755 index 0000000..a1a54e4 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Huh_2.png differ diff --git a/public/ext/candy/res/img/emoticons/Laughing.png b/public/ext/candy/res/img/emoticons/Laughing.png new file mode 100755 index 0000000..edefc95 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Laughing.png differ diff --git a/public/ext/candy/res/img/emoticons/Lips_Sealed.png b/public/ext/candy/res/img/emoticons/Lips_Sealed.png new file mode 100755 index 0000000..46e4701 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Lips_Sealed.png differ diff --git a/public/ext/candy/res/img/emoticons/Madness.png b/public/ext/candy/res/img/emoticons/Madness.png new file mode 100755 index 0000000..1c0946c Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Madness.png differ diff --git a/public/ext/candy/res/img/emoticons/Malicious.png b/public/ext/candy/res/img/emoticons/Malicious.png new file mode 100755 index 0000000..23f2579 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Malicious.png differ diff --git a/public/ext/candy/res/img/emoticons/README b/public/ext/candy/res/img/emoticons/README new file mode 100755 index 0000000..208db2c --- /dev/null +++ b/public/ext/candy/res/img/emoticons/README @@ -0,0 +1,2 @@ +Simple Smileys is a set of 49 clean, free as in freedom, Public Domain smileys. +For more packages or older versions, visit http://simplesmileys.org diff --git a/public/ext/candy/res/img/emoticons/Sick.png b/public/ext/candy/res/img/emoticons/Sick.png new file mode 100755 index 0000000..6f73e2f Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Sick.png differ diff --git a/public/ext/candy/res/img/emoticons/Smiling.png b/public/ext/candy/res/img/emoticons/Smiling.png new file mode 100755 index 0000000..725eef5 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Smiling.png differ diff --git a/public/ext/candy/res/img/emoticons/Speechless.png b/public/ext/candy/res/img/emoticons/Speechless.png new file mode 100755 index 0000000..4fc4246 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Speechless.png differ diff --git a/public/ext/candy/res/img/emoticons/Spiteful.png b/public/ext/candy/res/img/emoticons/Spiteful.png new file mode 100755 index 0000000..195ced8 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Spiteful.png differ diff --git a/public/ext/candy/res/img/emoticons/Stupid.png b/public/ext/candy/res/img/emoticons/Stupid.png new file mode 100755 index 0000000..3fcea49 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Stupid.png differ diff --git a/public/ext/candy/res/img/emoticons/Sunglasses.png b/public/ext/candy/res/img/emoticons/Sunglasses.png new file mode 100755 index 0000000..cad8379 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Sunglasses.png differ diff --git a/public/ext/candy/res/img/emoticons/Terrified.png b/public/ext/candy/res/img/emoticons/Terrified.png new file mode 100755 index 0000000..fad2e06 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Terrified.png differ diff --git a/public/ext/candy/res/img/emoticons/Thumb_Down.png b/public/ext/candy/res/img/emoticons/Thumb_Down.png new file mode 100755 index 0000000..4f70696 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Thumb_Down.png differ diff --git a/public/ext/candy/res/img/emoticons/Thumb_Up.png b/public/ext/candy/res/img/emoticons/Thumb_Up.png new file mode 100755 index 0000000..2ca0e0d Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Thumb_Up.png differ diff --git a/public/ext/candy/res/img/emoticons/Tired.png b/public/ext/candy/res/img/emoticons/Tired.png new file mode 100755 index 0000000..13f7d12 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Tired.png differ diff --git a/public/ext/candy/res/img/emoticons/Tongue_Out.png b/public/ext/candy/res/img/emoticons/Tongue_Out.png new file mode 100755 index 0000000..3d154f9 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Tongue_Out.png differ diff --git a/public/ext/candy/res/img/emoticons/Tongue_Out_Laughing.png b/public/ext/candy/res/img/emoticons/Tongue_Out_Laughing.png new file mode 100755 index 0000000..fba5d75 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Tongue_Out_Laughing.png differ diff --git a/public/ext/candy/res/img/emoticons/Tongue_Out_Left.png b/public/ext/candy/res/img/emoticons/Tongue_Out_Left.png new file mode 100755 index 0000000..8015de7 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Tongue_Out_Left.png differ diff --git a/public/ext/candy/res/img/emoticons/Tongue_Out_Up.png b/public/ext/candy/res/img/emoticons/Tongue_Out_Up.png new file mode 100755 index 0000000..46328fb Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Tongue_Out_Up.png differ diff --git a/public/ext/candy/res/img/emoticons/Tongue_Out_Up_Left.png b/public/ext/candy/res/img/emoticons/Tongue_Out_Up_Left.png new file mode 100755 index 0000000..b67b69f Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Tongue_Out_Up_Left.png differ diff --git a/public/ext/candy/res/img/emoticons/Tongue_Out_Winking.png b/public/ext/candy/res/img/emoticons/Tongue_Out_Winking.png new file mode 100755 index 0000000..2a22cf6 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Tongue_Out_Winking.png differ diff --git a/public/ext/candy/res/img/emoticons/Uncertain.png b/public/ext/candy/res/img/emoticons/Uncertain.png new file mode 100755 index 0000000..7176856 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Uncertain.png differ diff --git a/public/ext/candy/res/img/emoticons/Uncertain_2.png b/public/ext/candy/res/img/emoticons/Uncertain_2.png new file mode 100755 index 0000000..a7f5370 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Uncertain_2.png differ diff --git a/public/ext/candy/res/img/emoticons/Unhappy.png b/public/ext/candy/res/img/emoticons/Unhappy.png new file mode 100755 index 0000000..79fc0c0 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Unhappy.png differ diff --git a/public/ext/candy/res/img/emoticons/Winking.png b/public/ext/candy/res/img/emoticons/Winking.png new file mode 100755 index 0000000..1e01f94 Binary files /dev/null and b/public/ext/candy/res/img/emoticons/Winking.png differ diff --git a/public/ext/candy/res/img/favicon.png b/public/ext/candy/res/img/favicon.png new file mode 100755 index 0000000..d384cc4 Binary files /dev/null and b/public/ext/candy/res/img/favicon.png differ diff --git a/public/ext/candy/res/img/modal-spinner.gif b/public/ext/candy/res/img/modal-spinner.gif new file mode 100755 index 0000000..5b6a68d Binary files /dev/null and b/public/ext/candy/res/img/modal-spinner.gif differ diff --git a/public/ext/candy/res/img/overlay.png b/public/ext/candy/res/img/overlay.png new file mode 100755 index 0000000..0593fcf Binary files /dev/null and b/public/ext/candy/res/img/overlay.png differ diff --git a/public/ext/candy/res/img/roster/affiliation-owner.png b/public/ext/candy/res/img/roster/affiliation-owner.png new file mode 100755 index 0000000..b88c857 Binary files /dev/null and b/public/ext/candy/res/img/roster/affiliation-owner.png differ diff --git a/public/ext/candy/res/img/roster/ignore.png b/public/ext/candy/res/img/roster/ignore.png new file mode 100755 index 0000000..08f2493 Binary files /dev/null and b/public/ext/candy/res/img/roster/ignore.png differ diff --git a/public/ext/candy/res/img/roster/role-moderator.png b/public/ext/candy/res/img/roster/role-moderator.png new file mode 100755 index 0000000..0d064d1 Binary files /dev/null and b/public/ext/candy/res/img/roster/role-moderator.png differ diff --git a/public/ext/candy/res/img/tab-transitions.png b/public/ext/candy/res/img/tab-transitions.png new file mode 100755 index 0000000..c45d24c Binary files /dev/null and b/public/ext/candy/res/img/tab-transitions.png differ diff --git a/public/ext/candy/res/img/tooltip-arrows.gif b/public/ext/candy/res/img/tooltip-arrows.gif new file mode 100755 index 0000000..6faa6fd Binary files /dev/null and b/public/ext/candy/res/img/tooltip-arrows.gif differ diff --git a/public/ext/candy/res/notify.m4a b/public/ext/candy/res/notify.m4a new file mode 100755 index 0000000..b090b29 Binary files /dev/null and b/public/ext/candy/res/notify.m4a differ diff --git a/public/ext/candy/res/notify.mp3 b/public/ext/candy/res/notify.mp3 new file mode 100755 index 0000000..c7f7495 Binary files /dev/null and b/public/ext/candy/res/notify.mp3 differ diff --git a/public/ext/candy/res/notify.ogg b/public/ext/candy/res/notify.ogg new file mode 100755 index 0000000..c6663d3 Binary files /dev/null and b/public/ext/candy/res/notify.ogg differ diff --git a/public/ext/candyReadme b/public/ext/candyReadme new file mode 100755 index 0000000..5b2a001 --- /dev/null +++ b/public/ext/candyReadme @@ -0,0 +1,19 @@ +wget https://github.com/candy-chat/candy/releases/download/v2.2.0/candy-2.2.0.zip + + +Candy Javascript client for XMMS +Xmms setup instructions: + +install prosody +edit and copy prosody.cfg.lua -> /etc/prosody/ (arch) +run +# luac5.1 -p /etc/prosody/prosody.cfg.lua +no output = ok. + +Enable/start service +# prosodyctl adduser user_admin@virtualserver.org + +check bosh module at +http://virtualserver.org:5280/http-bind + + diff --git a/public/ext/d3.v4.min.js b/public/ext/d3.v4.min.js new file mode 100755 index 0000000..1a81e55 --- /dev/null +++ b/public/ext/d3.v4.min.js @@ -0,0 +1,8 @@ +// https://d3js.org Version 4.2.2. Copyright 2016 Mike Bostock. +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t,n){return tn?1:t>=n?0:NaN}function e(t){return 1===t.length&&(t=r(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}function r(t){return function(e,r){return n(t(e),r)}}function i(t,n){return nt?1:n>=t?0:NaN}function o(t){return null===t?NaN:+t}function u(t,n){var e,r,i=t.length,u=0,a=0,c=-1,s=0;if(null==n)for(;++c1)return a/(s-1)}function a(t,n){var e=u(t,n);return e?Math.sqrt(e):e}function c(t,n){var e,r,i,o=-1,u=t.length;if(null==n){for(;++o=r){e=i=r;break}for(;++or&&(e=r),i=r){e=i=r;break}for(;++or&&(e=r),i=Rd?i*=10:o>=Ud?i*=5:o>=Dd&&(i*=2),n=f;)l.pop(),--p;var d,v=new Array(p+1);for(i=0;i<=p;++i)d=v[i]=[],d.x0=i>0?l[i-1]:s,d.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),a=+e(t[u],u,t),c=+e(t[u+1],u+1,t);return a+(c-a)*(i-u)}}function y(t,e,r){return t=Ld.call(t,o).sort(n),Math.ceil((r-e)/(2*(_(t,.75)-_(t,.25))*Math.pow(t.length,-1/3)))}function g(t,n,e){return Math.ceil((e-n)/(3.5*a(t)*Math.pow(t.length,-1/3)))}function m(t,n){var e,r,i=-1,o=t.length;if(null==n){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e}function x(t,n){var e,r=0,i=t.length,u=-1,a=i;if(null==n)for(;++u=0;)for(r=t[i],n=r.length;--n>=0;)e[--u]=r[n];return e}function M(t,n){var e,r,i=-1,o=t.length;if(null==n){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e}function T(t){for(var n=0,e=t.length-1,r=t[0],i=new Array(e<0?0:e);n=o.length)return null!=r?r(n):null!=e?n.sort(e):n;for(var c,s,f,l=-1,h=n.length,p=o[i++],d=q(),v=u();++lo.length)return t;var i,a=u[e-1];return null!=r&&e>=o.length?i=t.entries():(i=[],t.each(function(t,r){i.push({key:r,values:n(t,e)})})),null!=a?i.sort(function(t,n){return a(t.key,n.key)}):i}var e,r,i,o=[],u=[];return i={object:function(n){return t(n,0,R,U)},map:function(n){return t(n,0,D,O)},entries:function(e){return n(t(e,0,D,O),0)},key:function(t){return o.push(t),i},sortKeys:function(t){return u[o.length-1]=t,i},sortValues:function(t){return e=t,i},rollup:function(t){return r=t,i}}}function R(){return{}}function U(t,n,e){t[n]=e}function D(){return q()}function O(t,n,e){t.set(n,e)}function F(){}function I(t,n){var e=new F;if(t instanceof F)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r1);return t+n*i*Math.sqrt(-2*Math.log(r)/r)}}function V(){var t=X.apply(this,arguments);return function(){return Math.exp(t())}}function W(t){return function(){for(var n=0,e=0;e1&&yt(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function xt(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)s.push(t[r[o[n]][2]]);for(n=+a;na!=s>a&&u<(c-e)*(a-r)/(s-r)+e&&(f=!f),c=e,s=r;return f}function wt(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],c=0;++r=(o=(v+y)/2))?v=o:y=o,(f=e>=(u=(_+g)/2))?_=u:g=u,i=p,!(p=p[l=f<<1|s]))return i[l]=d,t;if(a=+t._x.call(null,p.data),c=+t._y.call(null,p.data),n===a&&e===c)return d.next=p,i?i[l]=d:t._root=d,t;do i=i?i[l]=new Array(4):t._root=new Array(4),(s=n>=(o=(v+y)/2))?v=o:y=o,(f=e>=(u=(_+g)/2))?_=u:g=u;while((l=f<<1|s)===(h=(c>=u)<<1|a>=o));return i[h]=p,i[l]=d,t}function Nt(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),c=1/0,s=1/0,f=-(1/0),l=-(1/0);for(e=0;ef&&(f=r),il&&(l=i));for(ft||t>i||r>n||n>o))return this;var u,a,c=i-e,s=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do u=new Array(4),u[a]=s,s=u;while(c*=2,i=e+c,o=r+c,t>i||n>o);break;case 1:do u=new Array(4),u[a]=s,s=u;while(c*=2,e=i-c,o=r+c,e>t||n>o);break;case 2:do u=new Array(4),u[a]=s,s=u;while(c*=2,i=e+c,r=o-c,t>i||r>n);break;case 3:do u=new Array(4),u[a]=s,s=u;while(c*=2,e=i-c,r=o-c,e>t||r>n)}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this}function Et(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t}function Ct(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function zt(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function Pt(t,n,e){var r,i,o,u,a,c,s,f=this._x0,l=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new zt(v,f,l,h,p)),null==e?e=1/0:(f=t-e,l=n-e,h=t+e,p=n+e,e*=e);c=d.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(o=c.y0)>p||(u=c.x1)=y)<<1|t>=_)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=c)}else{var g=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=g*g+m*m;if(x=(a=(d+_)/2))?d=a:_=a,(f=u>=(c=(v+y)/2))?v=c:y=c,n=p,!(p=p[l=f<<1|s]))return this;if(!p.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)}function Lt(t){for(var n=0,e=t.length;n=1))throw new Error;this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function Wt(t){if(!t._start)try{$t(t)}catch(n){t._tasks[t._ended+t._active-1]&&Gt(t,n)}}function $t(t){for(;t._start=t._waiting&&t._active=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(t){}t._active=NaN,Jt(t)}function Jt(t){!t._active&&t._call&&t._call(t._error,t._data)}function Qt(t){return new Vt(arguments.length?+t:1/0)}function Kt(t){return function(){return t}}function tn(t){return t.innerRadius}function nn(t){return t.outerRadius}function en(t){return t.startAngle}function rn(t){return t.endAngle}function on(t){return t&&t.padAngle}function un(t){return t>=1?bv:t<=-1?-bv:Math.asin(t)}function an(t,n,e,r,i,o,u,a){var c=e-t,s=r-n,f=u-i,l=a-o,h=(f*(n-o)-l*(t-i))/(l*c-f*s);return[t+h*c,n+h*s]}function cn(t,n,e,r,i,o,u){var a=t-e,c=n-r,s=(u?o:-o)/Math.sqrt(a*a+c*c),f=s*c,l=-s*a,h=t+f,p=n+l,d=e+f,v=r+l,_=(h+d)/2,y=(p+v)/2,g=d-h,m=v-p,x=g*g+m*m,b=i-o,w=h*v-d*p,M=(m<0?-1:1)*Math.sqrt(Math.max(0,b*b*x-w*w)),T=(w*m-g*M)/x,k=(-w*g-m*M)/x,S=(w*m+g*M)/x,N=(-w*g+m*M)/x,A=T-_,E=k-y,C=S-_,z=N-y;return A*A+E*E>C*C+z*z&&(T=S,k=N),{cx:T,cy:k,x01:-f,y01:-l,x11:T*(i/b-1),y11:k*(i/b-1)}}function sn(){function t(){var t,s,f=+n.apply(this,arguments),l=+e.apply(this,arguments),h=o.apply(this,arguments)-bv,p=u.apply(this,arguments)-bv,d=Math.abs(p-h),v=p>h;if(c||(c=t=Tt()),lmv)if(d>wv-mv)c.moveTo(l*Math.cos(h),l*Math.sin(h)),c.arc(0,0,l,h,p,!v),f>mv&&(c.moveTo(f*Math.cos(p),f*Math.sin(p)),c.arc(0,0,f,p,h,v));else{var _,y,g=h,m=p,x=h,b=p,w=d,M=d,T=a.apply(this,arguments)/2,k=T>mv&&(i?+i.apply(this,arguments):Math.sqrt(f*f+l*l)),S=Math.min(Math.abs(l-f)/2,+r.apply(this,arguments)),N=S,A=S;if(k>mv){var E=un(k/f*Math.sin(T)),C=un(k/l*Math.sin(T));(w-=2*E)>mv?(E*=v?1:-1,x+=E,b-=E):(w=0,x=b=(h+p)/2),(M-=2*C)>mv?(C*=v?1:-1,g+=C,m-=C):(M=0,g=m=(h+p)/2)}var z=l*Math.cos(g),P=l*Math.sin(g),q=f*Math.cos(b),L=f*Math.sin(b);if(S>mv){var R=l*Math.cos(m),U=l*Math.sin(m),D=f*Math.cos(x),O=f*Math.sin(x);if(dmv?an(z,P,D,O,R,U,q,L):[q,L],I=z-F[0],Y=P-F[1],B=R-F[0],j=U-F[1],H=1/Math.sin(Math.acos((I*B+Y*j)/(Math.sqrt(I*I+Y*Y)*Math.sqrt(B*B+j*j)))/2),X=Math.sqrt(F[0]*F[0]+F[1]*F[1]);N=Math.min(S,(f-X)/(H-1)),A=Math.min(S,(l-X)/(H+1))}}M>mv?A>mv?(_=cn(D,O,z,P,l,A,v),y=cn(R,U,q,L,l,A,v),c.moveTo(_.cx+_.x01,_.cy+_.y01),Amv&&w>mv?N>mv?(_=cn(q,L,R,U,f,-N,v),y=cn(z,P,D,O,f,-N,v),c.lineTo(_.cx+_.x01,_.cy+_.y01),N=f;--l)s.point(_[l],y[l]);s.lineEnd(),s.areaEnd()}v&&(_[n]=+e(h,n,t),y[n]=+i(h,n,t),s.point(r?+r(h,n,t):_[n],o?+o(h,n,t):y[n]))}if(p)return s=null,p+""||null}function n(){return dn().defined(u).curve(c).context(a)}var e=hn,r=null,i=Kt(0),o=pn,u=Kt(!0),a=null,c=ln,s=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),r=null,t):e},t.x0=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),t):e},t.x1=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:Kt(+n),t):r},t.y=function(n){return arguments.length?(i="function"==typeof n?n:Kt(+n),o=null,t):i},t.y0=function(n){return arguments.length?(i="function"==typeof n?n:Kt(+n),t):i},t.y1=function(n){return arguments.length?(o=null==n?null:"function"==typeof n?n:Kt(+n),t):o},t.lineX0=t.lineY0=function(){return n().x(e).y(i)},t.lineY1=function(){return n().x(e).y(o)},t.lineX1=function(){return n().x(r).y(i)},t.defined=function(n){return arguments.length?(u="function"==typeof n?n:Kt(!!n),t):u},t.curve=function(n){return arguments.length?(c=n,null!=a&&(s=c(a)),t):c},t.context=function(n){return arguments.length?(null==n?a=s=null:s=c(a=n),t):a},t}function _n(t,n){return nt?1:n>=t?0:NaN}function yn(t){return t}function gn(){function t(t){var a,c,s,f,l,h=t.length,p=0,d=new Array(h),v=new Array(h),_=+i.apply(this,arguments),y=Math.min(wv,Math.max(-wv,o.apply(this,arguments)-_)),g=Math.min(Math.abs(y)/h,u.apply(this,arguments)),m=g*(y<0?-1:1);for(a=0;a0&&(p+=l);for(null!=e?d.sort(function(t,n){return e(v[t],v[n])}):null!=r&&d.sort(function(n,e){return r(t[n],t[e])}),a=0,s=p?(y-h*m)/p:0;a0?l*s:0)+m,v[c]={data:t[c],index:a,value:l,startAngle:_,endAngle:f,padAngle:g};return v}var n=yn,e=_n,r=null,i=Kt(0),o=Kt(wv),u=Kt(0);return t.value=function(e){return arguments.length?(n="function"==typeof e?e:Kt(+e),t):n},t.sortValues=function(n){return arguments.length?(e=n,r=null,t):e},t.sort=function(n){return arguments.length?(r=n,e=null,t):r},t.startAngle=function(n){return arguments.length?(i="function"==typeof n?n:Kt(+n),t):i},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:Kt(+n),t):o},t.padAngle=function(n){return arguments.length?(u="function"==typeof n?n:Kt(+n),t):u},t}function mn(t){this._curve=t}function xn(t){function n(n){return new mn(t(n))}return n._curve=t,n}function bn(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(xn(t)):n()._curve},t}function wn(){return bn(dn().curve(Mv))}function Mn(){var t=vn().curve(Mv),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return bn(e())},delete t.lineX0,t.lineEndAngle=function(){return bn(r())},delete t.lineX1,t.lineInnerRadius=function(){return bn(i())},delete t.lineY0,t.lineOuterRadius=function(){return bn(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(xn(t)):n()._curve},t}function Tn(){function t(){var t;if(r||(r=t=Tt()),n.apply(this,arguments).draw(r,+e.apply(this,arguments)),t)return r=null,t+""||null}var n=Kt(Tv),e=Kt(64),r=null;return t.type=function(e){return arguments.length?(n="function"==typeof e?e:Kt(e),t):n},t.size=function(n){return arguments.length?(e="function"==typeof n?n:Kt(+n),t):e},t.context=function(n){return arguments.length?(r=null==n?null:n,t):r},t}function kn(){}function Sn(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Nn(t){this._context=t}function An(t){return new Nn(t)}function En(t){this._context=t}function Cn(t){return new En(t)}function zn(t){this._context=t}function Pn(t){return new zn(t)}function qn(t,n){this._basis=new Nn(t),this._beta=n}function Ln(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Rn(t,n){this._context=t,this._k=(1-n)/6}function Un(t,n){this._context=t,this._k=(1-n)/6}function Dn(t,n){this._context=t,this._k=(1-n)/6}function On(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>mv){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>mv){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/f,u=(u*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Fn(t,n){this._context=t,this._alpha=n}function In(t,n){this._context=t,this._alpha=n}function Yn(t,n){this._context=t,this._alpha=n}function Bn(t){this._context=t}function jn(t){return new Bn(t)}function Hn(t){return t<0?-1:1}function Xn(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(Hn(o)+Hn(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Vn(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Wn(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function $n(t){this._context=t}function Zn(t){this._context=new Gn(t)}function Gn(t){this._context=t}function Jn(t){return new $n(t)}function Qn(t){return new Zn(t)}function Kn(t){this._context=t}function te(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n1)for(var e,r,i=1,o=t[n[0]],u=o.length;i=0;)e[n]=n;return e}function ce(t,n){return t[n]}function se(){function t(t){var o,u,a=n.apply(this,arguments),c=t.length,s=a.length,f=new Array(s);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;u>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=t_.exec(t))?we(parseInt(n[1],16)):(n=n_.exec(t))?new Se(n[1],n[2],n[3],1):(n=e_.exec(t))?new Se(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=r_.exec(t))?Me(n[1],n[2],n[3],n[4]):(n=i_.exec(t))?Me(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=o_.exec(t))?Ne(n[1],n[2]/100,n[3]/100,1):(n=u_.exec(t))?Ne(n[1],n[2]/100,n[3]/100,n[4]):a_.hasOwnProperty(t)?we(a_[t]):"transparent"===t?new Se(NaN,NaN,NaN,0):null}function we(t){return new Se(t>>16&255,t>>8&255,255&t,1)}function Me(t,n,e,r){return r<=0&&(t=n=e=NaN),new Se(t,n,e,r)}function Te(t){return t instanceof xe||(t=be(t)),t?(t=t.rgb(),new Se(t.r,t.g,t.b,t.opacity)):new Se}function ke(t,n,e,r){return 1===arguments.length?Te(t):new Se(t,n,e,null==r?1:r)}function Se(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ne(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Ce(t,n,e,r)}function Ae(t){if(t instanceof Ce)return new Ce(t.h,t.s,t.l,t.opacity);if(t instanceof xe||(t=be(t)),!t)return new Ce;if(t instanceof Ce)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&c<1?0:u,new Ce(u,a,c,t.opacity)}function Ee(t,n,e,r){return 1===arguments.length?Ae(t):new Ce(t,n,e,null==r?1:r)}function Ce(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ze(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Pe(t){if(t instanceof Le)return new Le(t.l,t.a,t.b,t.opacity);if(t instanceof Ye){var n=t.h*c_;return new Le(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Se||(t=Te(t));var e=Oe(t.r),r=Oe(t.g),i=Oe(t.b),o=Re((.4124564*e+.3575761*r+.1804375*i)/l_),u=Re((.2126729*e+.7151522*r+.072175*i)/h_),a=Re((.0193339*e+.119192*r+.9503041*i)/p_);return new Le(116*u-16,500*(o-u),200*(u-a),t.opacity)}function qe(t,n,e,r){return 1===arguments.length?Pe(t):new Le(t,n,e,null==r?1:r)}function Le(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Re(t){return t>y_?Math.pow(t,1/3):t/__+d_}function Ue(t){return t>v_?t*t*t:__*(t-d_)}function De(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Fe(t){if(t instanceof Ye)return new Ye(t.h,t.c,t.l,t.opacity);t instanceof Le||(t=Pe(t));var n=Math.atan2(t.b,t.a)*s_;return new Ye(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ie(t,n,e,r){return 1===arguments.length?Fe(t):new Ye(t,n,e,null==r?1:r)}function Ye(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Be(t){if(t instanceof He)return new He(t.h,t.s,t.l,t.opacity);t instanceof Se||(t=Te(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(k_*r+M_*n-T_*e)/(k_+M_-T_),o=r-i,u=(w_*(e-i)-x_*o)/b_,a=Math.sqrt(u*u+o*o)/(w_*i*(1-i)),c=a?Math.atan2(u,o)*s_-120:NaN;return new He(c<0?c+360:c,a,i,t.opacity)}function je(t,n,e,r){return 1===arguments.length?Be(t):new He(t,n,e,null==r?1:r)}function He(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Xe(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}function Ve(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r180||e<-180?e-360*Math.round(e/360):e):$e(isNaN(t)?n:t)}function Qe(t){return 1===(t=+t)?Ke:function(n,e){return e-n?Ge(n,e,t):$e(isNaN(n)?e:n)}}function Ke(t,n){var e=n-t;return e?Ze(t,e):$e(isNaN(t)?n:t)}function tr(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;eo&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:rr(e,r)})),o=L_.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:rr(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function a(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:rr(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function c(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:rr(t,e)},{i:a-2,x:rr(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,r,i),u(n.rotate,e.rotate,r,i),a(n.skewX,e.skewX,r,i),c(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,o=i.length;++e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function Sr(t,n){for(var e,r=0,i=t.length;r=s)return u;if(i)return i=!1,o;var n,e=f;if(34===t.charCodeAt(e)){for(var r=e;r++=200&&e<300||304===e){if(o)try{n=o.call(r,s)}catch(t){return void a.call("error",r,t)}else n=s;a.call("load",r,n)}else a.call("error",r,t)}var r,i,o,u,a=Mr("beforesend","progress","load","error"),c=q(),s=new XMLHttpRequest,f=null,l=null,h=0;if("undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=s.ontimeout=e:s.onreadystatechange=function(t){s.readyState>3&&e(t)},s.onprogress=function(t){a.call("progress",r,t)},r={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?c.get(t):(null==n?c.remove(t):c.set(t,n+""),r)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",r):i},responseType:function(t){return arguments.length?(u=t,r):u},timeout:function(t){return arguments.length?(h=+t,r):h},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",r)},password:function(t){return arguments.length<1?l:(l=null==t?null:t+"",r)},response:function(t){return o=t,r},get:function(t,n){return r.send("GET",t,n)},post:function(t,n){return r.send("POST",t,n)},send:function(n,e,o){return s.open(n,t,!0,f,l),null==i||c.has("accept")||c.set("accept",i+",*/*"),s.setRequestHeader&&c.each(function(t,n){s.setRequestHeader(n,t)}),null!=i&&s.overrideMimeType&&s.overrideMimeType(i),null!=u&&(s.responseType=u),h>0&&(s.timeout=h),null==o&&"function"==typeof e&&(o=e,e=null),null!=o&&1===o.length&&(o=qr(o)),null!=o&&r.on("error",o).on("load",function(t){o(null,t)}),a.call("beforesend",r,s),s.send(null==e?null:e),r},abort:function(){return s.abort(),r},on:function(){var t=a.on.apply(a,arguments);return t===a?r:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return r.get(n)}return r}function qr(t){return function(n,e){t(null==n?e:null)}}function Lr(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function Rr(t,n){return function(e,r){var i=Pr(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}}function Ur(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=Pr(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(Dr(n,r=t)):r},o.row(r),i?o.get(i):o}}function Dr(t,n){return function(e){return t(e.responseText,n)}}function Or(){return my||(wy(Fr),my=by.now()+xy)}function Fr(){my=0}function Ir(){this._call=this._time=this._next=null}function Yr(t,n,e){var r=new Ir;return r.restart(t,n,e),r}function Br(){Or(),++dy;for(var t,n=G_;n;)(t=my-n._time)>=0&&n._call.call(null,t),n=n._next;--dy}function jr(t){my=(gy=t||by.now())+xy,dy=vy=0;try{Br()}finally{dy=0,Xr(),my=0}}function Hr(){var t=by.now(),n=t-gy;n>yy&&(xy-=n,gy=t)}function Xr(){for(var t,n,e=G_,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:G_=n);J_=t,Vr(r)}function Vr(t){if(!dy){vy&&(vy=clearTimeout(vy));var n=t-my;n>24?(t<1/0&&(vy=setTimeout(jr,n)),_y&&(_y=clearInterval(_y))):(_y||(_y=setInterval(Hr,yy)),dy=1,wy(jr))}}function Wr(t,n,e){var r=new Ir;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r}function $r(t,n,e){var r=new Ir,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?Or():+e,r.restart(function o(u){u+=i,r.restart(o,i+=n,e),t(u)},n,e),r)}function Zr(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return u;do u.push(new Date(+e));while(n(e,o),t(e),e=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return My.setTime(+n),Ty.setTime(+r),t(My),t(Ty),Math.floor(e(My,Ty))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t===0}:function(n){return i.count(0,n)%t===0}):i:null}),i}function Gr(t){return Zr(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ay)/zy})}function Jr(t){return Zr(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/zy})}function Qr(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Kr(t){return t=Qr(Math.abs(t)),t?t[1]:NaN}function ti(t,n){return function(e,r){for(var i=e.length,o=[],u=0,a=t[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(e.substring(i-=a,i+a)),!((c+=a+1)>r));)a=t[u=(u+1)%t.length];return o.reverse().join(n)}}function ni(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,o=-1;i0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}function ei(t,n){var e=Qr(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Ng=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Qr(t,Math.max(0,n+o-1))[0]}function ri(t,n){var e=Qr(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function ii(t){return new oi(t)}function oi(t){if(!(n=Cg.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",u=!!n[5],a=n[6]&&+n[6],c=!!n[7],s=n[8]&&+n[8].slice(1),f=n[9]||"";"n"===f?(c=!0,f="g"):Eg[f]||(f=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=u,this.width=a,this.comma=c,this.precision=s,this.type=f}function ui(t){return t}function ai(t){function n(t){function n(t){var n,i,c,g=d,m=v;if("c"===p)m=_(t)+m,t="";else{t=+t;var x=(t<0||1/t<0)&&(t*=-1,!0);if(t=_(t,h),x)for(n=-1,i=t.length,x=!1;++nc||c>57){m=(46===c?o+t.slice(n+1):t.slice(n))+m,t=t.slice(0,n);break}}l&&!s&&(t=r(t,1/0));var b=g.length+t.length+m.length,w=b>1)+g+t+m+w.slice(b)}return w+g+t+m}t=ii(t);var e=t.fill,u=t.align,a=t.sign,c=t.symbol,s=t.zero,f=t.width,l=t.comma,h=t.precision,p=t.type,d="$"===c?i[0]:"#"===c&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",v="$"===c?i[1]:/[%p]/.test(p)?"%":"",_=Eg[p],y=!p||/[defgprs%]/.test(p);return h=null==h?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),n.toString=function(){return t+""},n}function e(t,e){var r=n((t=ii(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Kr(e)/3))),o=Math.pow(10,-i),u=Pg[8+i/3];return function(t){return r(o*t)+u}}var r=t.grouping&&t.thousands?ti(t.grouping,t.thousands):ui,i=t.currency,o=t.decimal;return{format:n,formatPrefix:e}}function ci(n){return zg=ai(n),t.format=zg.format,t.formatPrefix=zg.formatPrefix,zg}function si(t){return Math.max(0,-Kr(Math.abs(t)))}function fi(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Kr(n)/3)))-Kr(Math.abs(t)))}function li(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Kr(n)-Kr(t))+1}function hi(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function pi(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function di(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function vi(t){function n(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++a=c)return-1;if(i=n.charCodeAt(u++),37===i){if(i=n.charAt(u++),o=B[i in Lg?n.charAt(u++):i],!o||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function i(t,n,e){var r=C.exec(n.slice(e));return r?(t.p=z[r[0].toLowerCase()],e+r[0].length):-1}function o(t,n,e){var r=L.exec(n.slice(e));return r?(t.w=R[r[0].toLowerCase()],e+r[0].length):-1}function u(t,n,e){var r=P.exec(n.slice(e));return r?(t.w=q[r[0].toLowerCase()],e+r[0].length):-1}function a(t,n,e){var r=O.exec(n.slice(e));return r?(t.m=F[r[0].toLowerCase()],e+r[0].length):-1}function c(t,n,e){var r=U.exec(n.slice(e));return r?(t.m=D[r[0].toLowerCase()],e+r[0].length):-1}function s(t,n,e){return r(t,w,n,e)}function f(t,n,e){return r(t,M,n,e)}function l(t,n,e){return r(t,T,n,e)}function h(t){return N[t.getDay()]}function p(t){return S[t.getDay()]}function d(t){return E[t.getMonth()]}function v(t){return A[t.getMonth()]}function _(t){return k[+(t.getHours()>=12)]}function y(t){return N[t.getUTCDay()]}function g(t){return S[t.getUTCDay()]}function m(t){return E[t.getUTCMonth()]}function x(t){return A[t.getUTCMonth()]}function b(t){return k[+(t.getUTCHours()>=12)]}var w=t.dateTime,M=t.date,T=t.time,k=t.periods,S=t.days,N=t.shortDays,A=t.months,E=t.shortMonths,C=gi(k),z=mi(k),P=gi(S),q=mi(S),L=gi(N),R=mi(N),U=gi(A),D=mi(A),O=gi(E),F=mi(E),I={a:h,A:p,b:d,B:v,c:null,d:Li,e:Li,H:Ri,I:Ui,j:Di,L:Oi,m:Fi,M:Ii,p:_,S:Yi,U:Bi,w:ji,W:Hi,x:null,X:null,y:Xi,Y:Vi,Z:Wi,"%":co},Y={a:y,A:g,b:m,B:x,c:null,d:$i,e:$i,H:Zi,I:Gi,j:Ji,L:Qi,m:Ki,M:to,p:b,S:no,U:eo,w:ro,W:io,x:null,X:null,y:oo,Y:uo,Z:ao,"%":co},B={a:o,A:u,b:a,B:c,c:s,d:Ni,e:Ni,H:Ei,I:Ei,j:Ai,L:Pi,m:Si,M:Ci,p:i,S:zi,U:bi,w:xi,W:wi,x:f,X:l,y:Ti,Y:Mi,Z:ki,"%":qi};return I.x=n(M,I),I.X=n(T,I),I.c=n(w,I),Y.x=n(M,Y),Y.X=n(T,Y),Y.c=n(w,Y),{format:function(t){var e=n(t+="",I);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",hi);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",Y);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,pi);return n.toString=function(){return t},n}}}function _i(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function ki(t,n,e){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Si(t,n,e){var r=Rg.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Ni(t,n,e){var r=Rg.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Ai(t,n,e){var r=Rg.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Ei(t,n,e){var r=Rg.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Ci(t,n,e){var r=Rg.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function zi(t,n,e){var r=Rg.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Pi(t,n,e){var r=Rg.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function qi(t,n,e){var r=Ug.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Li(t,n){return _i(t.getDate(),n,2)}function Ri(t,n){return _i(t.getHours(),n,2)}function Ui(t,n){return _i(t.getHours()%12||12,n,2)}function Di(t,n){return _i(1+Oy.count(eg(t),t),n,3)}function Oi(t,n){return _i(t.getMilliseconds(),n,3)}function Fi(t,n){return _i(t.getMonth()+1,n,2)}function Ii(t,n){return _i(t.getMinutes(),n,2)}function Yi(t,n){return _i(t.getSeconds(),n,2)}function Bi(t,n){return _i(Iy.count(eg(t),t),n,2)}function ji(t){return t.getDay()}function Hi(t,n){return _i(Yy.count(eg(t),t),n,2)}function Xi(t,n){return _i(t.getFullYear()%100,n,2)}function Vi(t,n){return _i(t.getFullYear()%1e4,n,4)}function Wi(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+_i(n/60|0,"0",2)+_i(n%60,"0",2)}function $i(t,n){return _i(t.getUTCDate(),n,2)}function Zi(t,n){return _i(t.getUTCHours(),n,2)}function Gi(t,n){return _i(t.getUTCHours()%12||12,n,2)}function Ji(t,n){return _i(1+cg.count(Sg(t),t),n,3)}function Qi(t,n){return _i(t.getUTCMilliseconds(),n,3)}function Ki(t,n){return _i(t.getUTCMonth()+1,n,2)}function to(t,n){return _i(t.getUTCMinutes(),n,2)}function no(t,n){return _i(t.getUTCSeconds(),n,2)}function eo(t,n){return _i(fg.count(Sg(t),t),n,2)}function ro(t){return t.getUTCDay()}function io(t,n){return _i(lg.count(Sg(t),t),n,2)}function oo(t,n){return _i(t.getUTCFullYear()%100,n,2)}function uo(t,n){return _i(t.getUTCFullYear()%1e4,n,4)}function ao(){return"+0000"}function co(){return"%"}function so(n){return qg=vi(n),t.timeFormat=qg.format,t.timeParse=qg.parse,t.utcFormat=qg.utcFormat,t.utcParse=qg.utcParse,qg}function fo(t){return t.toISOString()}function lo(t){var n=new Date(t);return isNaN(n)?null:n}function ho(t){function n(n){var o=n+"",u=e.get(o);if(!u){if(i!==Hg)return i;e.set(o,u=r.push(n))}return t[(u-1)%t.length]}var e=q(),r=[],i=Hg;return t=null==t?[]:jg.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],e=q();for(var i,o,u=-1,a=t.length;++u=e?1:r(t)}}}function bo(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}function wo(t,n,e,r){var i=t[0],o=t[1],u=n[0],a=n[1];return o2?Mo:wo,o=u=null,r}function r(n){return(o||(o=i(a,c,f?xo(t):t,s)))(+n)}var i,o,u,a=Xg,c=Xg,s=cr,f=!1;return r.invert=function(t){return(u||(u=i(c,a,mo,f?bo(n):n)))(+t)},r.domain=function(t){return arguments.length?(a=Bg.call(t,go),e()):a.slice()},r.range=function(t){return arguments.length?(c=jg.call(t),e()):c.slice()},r.rangeRound=function(t){return c=jg.call(t),s=sr,e()},r.clamp=function(t){return arguments.length?(f=!!t,e()):f},r.interpolate=function(t){return arguments.length?(s=t,e()):s},e()}function So(n,e,r){var i,o=n[0],u=n[n.length-1],a=p(o,u,null==e?10:e);switch(r=ii(null==r?",f":r),r.type){case"s":var c=Math.max(Math.abs(o),Math.abs(u));return null!=r.precision||isNaN(i=fi(a,c))||(r.precision=i),t.formatPrefix(r,c);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=li(a,Math.max(Math.abs(o),Math.abs(u))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=si(a))||(r.precision=i-2*("%"===r.type))}return t.format(r)}function No(t){var n=t.domain;return t.ticks=function(t){var e=n();return h(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return So(n(),t,e)},t.nice=function(e){var r=n(),i=r.length-1,o=null==e?10:e,u=r[0],a=r[i],c=p(u,a,o);return c&&(c=p(Math.floor(u/c)*c,Math.ceil(a/c)*c,o),r[0]=Math.floor(u/c)*c,r[i]=Math.ceil(a/c)*c,n(r)),t},t}function Ao(){var t=ko(mo,rr);return t.copy=function(){return To(t,Ao())},No(t)}function Eo(){function t(t){return+t}var n=[0,1];return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=Bg.call(e,go),t):n.slice()},t.copy=function(){return Eo().domain(n)},No(t)}function Co(t,n){t=t.slice();var e,r=0,i=t.length-1,o=t[r],u=t[i];return u0){for(;pc)break;_.push(l)}}else for(;p=1;--f)if(l=s*f,!(lc)break;_.push(l)}}else _=h(p,d,Math.min(d-p,v)).map(u);return n?_.reverse():_},e.tickFormat=function(n,r){if(null==r&&(r=10===i?".0e":","),"function"!=typeof r&&(r=t.format(r)),n===1/0)return r;null==n&&(n=10);var a=Math.max(1,i*n/e.ticks().length);return function(t){var n=t/u(Math.round(o(t)));return n*i0?o[n-1]:r[0],n=i?[o[i-1],r]:[o[n-1],o[n]]},t.copy=function(){return Bo().domain([e,r]).range(u)},No(t)}function jo(){function t(t){if(t<=t)return e[Cd(n,t,0,r)]}var n=[.5],e=[0,1],r=1;return t.domain=function(i){return arguments.length?(n=jg.call(i),r=Math.min(n.length,e.length-1),t):n.slice()},t.range=function(i){return arguments.length?(e=jg.call(i),r=Math.min(n.length,e.length-1),t):e.slice()},t.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},t.copy=function(){return jo().domain(n).range(e)},t}function Ho(t){return new Date(t)}function Xo(t){return t instanceof Date?+t:+new Date(+t)}function Vo(t,n,r,i,o,u,a,c,s){function f(e){return(a(e)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return um.h=360*t-100,um.s=1.5-1.5*n,um.l=.8-.9*n,um+""}function Jo(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function Qo(t){function n(n){var o=(n-e)/(r-e);return t(i?Math.max(0,Math.min(1,o)):o)}var e=0,r=1,i=!1;return n.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n):[e,r]},n.clamp=function(t){return arguments.length?(i=!!t,n):i},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Qo(t).domain([e,r]).clamp(i)},No(n)}function Ko(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),hm.hasOwnProperty(n)?{space:hm[n],local:t}:t}function tu(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===lm&&n.documentElement.namespaceURI===lm?n.createElement(t):n.createElementNS(e,t)}}function nu(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function eu(t){var n=Ko(t);return(n.local?nu:tu)(n)}function ru(){return new iu}function iu(){this._="@"+(++pm).toString(36)}function ou(t,n,e){return t=uu(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function uu(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function au(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)), +{type:t,name:n}})}function cu(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=b&&(b=x+1);!(m=_[b])&&++b=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this}function Pu(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=qu);for(var e=this._groups,r=e.length,i=new Array(r),o=0;on?1:t>=n?0:NaN}function Lu(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ru(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function Uu(){for(var t=this._groups,n=0,e=t.length;n1?this.each((null==n?$u:"function"==typeof n?Gu:Zu)(t,n,null==e?"":e)):Wu(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function Qu(t){return function(){delete this[t]}}function Ku(t,n){return function(){this[t]=n}}function ta(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function na(t,n){return arguments.length>1?this.each((null==n?Qu:"function"==typeof n?ta:Ku)(t,n)):this.node()[t]}function ea(t){return t.trim().split(/^|\s+/)}function ra(t){return t.classList||new ia(t)}function ia(t){this._node=t,this._names=ea(t.getAttribute("class")||"")}function oa(t,n){for(var e=ra(t),r=-1,i=n.length;++rTm)throw new Error("too late");return e}function Ya(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>Sm)throw new Error("too late");return e}function Ba(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function ja(t,n,e){function r(t){e.state=km,e.delay<=t?i(t-e.delay):e.timer.restart(i,e.delay,e.time)}function i(r){var i,c,s,f;for(i in a)f=a[i],f.name===e.name&&(f.state===Nm?(f.state=Em,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete a[i]):+i=0&&(t=t.slice(0,n)),!t||"start"===t})}function gc(t,n,e){var r,i,o=yc(n)?Ia:Ya;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function mc(t,n){var e=this._id;return arguments.length<2?Ba(this.node(),e).on.on(t):this.each(gc(e,t,n))}function xc(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function bc(){return this.on("end.remove",xc(this._id))}function wc(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=_u(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;ukm&&e.name===n)return new Uc([[t]],Lm,n,+r)}return null}function Bc(t){return t}function jc(t,n,e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}function Hc(t,n,e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}function Xc(t){var n=t.bandwidth()/2;return t.round()&&(n=Math.round(n)),function(e){return t(e)+n}}function Vc(){return!this.__axis}function Wc(t,n){function e(e){var s,f=null==i?n.ticks?n.ticks.apply(n,r):n.domain():i,l=null==o?n.tickFormat?n.tickFormat.apply(n,r):Bc:o,h=Math.max(u,0)+c,p=t===Um||t===Om?jc:Hc,d=n.range(),v=d[0]+.5,_=d[d.length-1]+.5,y=(n.bandwidth?Xc:Bc)(n.copy()),g=e.selection?e.selection():e,m=g.selectAll(".domain").data([null]),x=g.selectAll(".tick").data(f,n).order(),b=x.exit(),w=x.enter().append("g").attr("class","tick"),M=x.select("line"),T=x.select("text"),k=t===Um||t===Fm?-1:1,S=t===Fm||t===Dm?(s="x","y"):(s="y","x");m=m.merge(m.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),x=x.merge(w),M=M.merge(w.append("line").attr("stroke","#000").attr(s+"2",k*u).attr(S+"1",.5).attr(S+"2",.5)),T=T.merge(w.append("text").attr("fill","#000").attr(s,k*h).attr(S,.5).attr("dy",t===Um?"0em":t===Om?"0.71em":"0.32em")),e!==g&&(m=m.transition(e),x=x.transition(e),M=M.transition(e),T=T.transition(e),b=b.transition(e).attr("opacity",Im).attr("transform",function(t){return p(y,this.parentNode.__axis||y,t)}),w.attr("opacity",Im).attr("transform",function(t){return p(this.parentNode.__axis||y,y,t)})),b.remove(),m.attr("d",t===Fm||t==Dm?"M"+k*a+","+v+"H0.5V"+_+"H"+k*a:"M"+v+","+k*a+"V0.5H"+_+"V"+k*a),x.attr("opacity",1).attr("transform",function(t){return p(y,y,t)}),M.attr(s+"2",k*u),T.attr(s,k*h).text(l),g.filter(Vc).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Dm?"start":t===Fm?"end":"middle"),g.each(function(){this.__axis=y})}var r=[],i=null,o=null,u=6,a=6,c=3;return e.scale=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return r=Rm.call(arguments),e},e.tickArguments=function(t){return arguments.length?(r=null==t?[]:Rm.call(t),e):r.slice()},e.tickValues=function(t){return arguments.length?(i=null==t?null:Rm.call(t),e):i&&i.slice()},e.tickFormat=function(t){return arguments.length?(o=t,e):o},e.tickSize=function(t){return arguments.length?(u=a=+t,e):u},e.tickSizeInner=function(t){return arguments.length?(u=+t,e):u},e.tickSizeOuter=function(t){return arguments.length?(a=+t,e):a},e.tickPadding=function(t){return arguments.length?(c=+t,e):c},e}function $c(t){return Wc(Um,t)}function Zc(t){return Wc(Dm,t)}function Gc(t){return Wc(Om,t)}function Jc(t){return Wc(Fm,t)}function Qc(t,n){return t.parent===n.parent?1:2}function Kc(t){return t.reduce(ts,0)/t.length}function ts(t,n){return t+n.x}function ns(t){return 1+t.reduce(es,0)}function es(t,n){return Math.max(t,n.y)}function rs(t){for(var n;n=t.children;)t=n[0];return t}function is(t){for(var n;n=t.children;)t=n[n.length-1];return t}function os(){function t(t){var o,u=0;t.eachAfter(function(t){var e=t.children;e?(t.x=Kc(e),t.y=ns(e)):(t.x=o?u+=n(t,o):0,t.y=0,o=t)});var a=rs(t),c=is(t),s=a.x-n(a,c)/2,f=c.x+n(c,a)/2;return t.eachAfter(i?function(n){n.x=(n.x-t.x)*e,n.y=(t.y-n.y)*r}:function(n){n.x=(n.x-s)/(f-s)*e,n.y=(1-(t.y?n.y/t.y:1))*r})}var n=Qc,e=1,r=1,i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(n){return arguments.length?(i=!1,e=+n[0],r=+n[1],t):i?null:[e,r]},t.nodeSize=function(n){return arguments.length?(i=!0,e=+n[0],r=+n[1],t):i?[e,r]:null},t}function us(t){var n,e,r,i,o=this,u=[o];do for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this}function cs(t){for(var n,e,r,i=this,o=[i],u=[];i=o.pop();)if(u.push(i),n=i.children)for(e=0,r=n.length;e=0;)e+=r[i].value;n.value=e})}function fs(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})}function ls(t){for(var n=this,e=hs(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r}function hs(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function ps(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n}function ds(){var t=[];return this.each(function(n){t.push(n)}),t}function vs(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t}function _s(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n}function ys(t,n){var e,r,i,o,u,a=new ws(t),c=+t.value&&(a.value=t.value),s=[a];for(null==n&&(n=ms);e=s.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)s.push(r=e.children[o]=new ws(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(bs)}function gs(){return ys(this).eachBefore(xs)}function ms(t){return t.children}function xs(t){t.data=t.data.data}function bs(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function ws(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ms(t){this._=t,this.next=null}function Ts(t){for(var n,e=(t=t.slice()).length,r=null,i=r;e;){var o=new Ms(t[e-1]);i=i?i.next=o:r=o,t[n]=t[--e]}return{head:r,tail:i}}function ks(t){return Ns(Ts(t),[])}function Ss(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r-n.r;return i*i+1e-6>e*e+r*r}function Ns(t,n){var e,r,i,o=null,u=t.head;switch(n.length){case 1:e=As(n[0]);break;case 2:e=Es(n[0],n[1]);break;case 3:e=Cs(n[0],n[1],n[2])}for(;u;)i=u._,r=u.next,e&&Ss(e,i)?o=u:(o?(t.tail=o,o.next=null):t.head=t.tail=null,n.push(i),e=Ns(t,n),n.pop(),t.head?(u.next=t.head,t.head=u):(u.next=null,t.head=t.tail=u),o=t.tail,o.next=r),u=r;return t.tail=o,e}function As(t){return{x:t.x,y:t.y,r:t.r}}function Es(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,u=n.y,a=n.r,c=o-e,s=u-r,f=a-i,l=Math.sqrt(c*c+s*s);return{x:(e+o+c/l*f)/2,y:(r+u+s/l*f)/2,r:(l+i+a)/2}}function Cs(t,n,e){var r=t.x,i=t.y,o=t.r,u=n.x,a=n.y,c=n.r,s=e.x,f=e.y,l=e.r,h=2*(r-u),p=2*(i-a),d=2*(c-o),v=r*r+i*i-o*o-u*u-a*a+c*c,_=2*(r-s),y=2*(i-f),g=2*(l-o),m=r*r+i*i-o*o-s*s-f*f+l*l,x=_*p-h*y,b=(p*m-y*v)/x-r,w=(y*d-p*g)/x,M=(_*v-h*m)/x-i,T=(h*g-_*d)/x,k=w*w+T*T-1,S=2*(b*w+M*T+o),N=b*b+M*M-o*o,A=(-S-Math.sqrt(S*S-4*k*N))/(2*k);return{x:b+w*A+r,y:M+T*A+i,r:A}}function zs(t,n,e){var r=t.x,i=t.y,o=n.r+e.r,u=t.r+e.r,a=n.x-r,c=n.y-i,s=a*a+c*c;if(s){var f=.5+((u*=u)-(o*=o))/(2*s),l=Math.sqrt(Math.max(0,2*o*(u+s)-(u-=s)*u-o*o))/(2*s);e.x=r+f*a+l*c,e.y=i+f*c-l*a}else e.x=r+u,e.y=i}function Ps(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i>e*e+r*r}function qs(t,n,e){var r=t.x-n,i=t.y-e;return r*r+i*i}function Ls(t){this._=t,this.next=null,this.previous=null}function Rs(t){if(!(i=t.length))return 0;var n,e,r,i;if(n=t[0],n.x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;zs(e,n,r=t[2]);var o,u,a,c,s,f,l,h=n.r*n.r,p=e.r*e.r,d=r.r*r.r,v=h+p+d,_=h*n.x+p*e.x+d*r.x,y=h*n.y+p*e.y+d*r.y;n=new Ls(n),e=new Ls(e),r=new Ls(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return o}var n=Zs,e=Gs;return t.id=function(e){return arguments.length?(n=Os(e),t):n},t.parentId=function(n){return arguments.length?(e=Os(n),t):e},t}function Qs(t,n){return t.parent===n.parent?1:2}function Ks(t){var n=t.children;return n?n[0]:t.t}function tf(t){var n=t.children;return n?n[n.length-1]:t.t}function nf(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function ef(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)n=i[o],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function rf(t,n,e){return t.a.parent===n.parent?t.a:e}function of(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function uf(t){for(var n,e,r,i,o,u=new of(t,0),a=[u];n=a.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(e=n.children[i]=new of(r[i],i)),e.parent=n;return(u.parent=new of(null,0)).children=[u],u}function af(){function t(t){var r=uf(t);if(r.eachAfter(n),r.parent.m=-r.z,r.eachBefore(e),c)t.eachBefore(i);else{var s=t,f=t,l=t;t.eachBefore(function(t){t.xf.x&&(f=t),t.depth>l.depth&&(l=t)});var h=s===f?1:o(s,f)/2,p=h-s.x,d=u/(f.x+h+p),v=a/(l.depth||1);t.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return t}function n(t){var n=t.children,e=t.parent.children,i=t.i?e[t.i-1]:null;if(n){ef(t);var u=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-u):t.z=u}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||e[0])}function e(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,n,e){if(n){for(var r,i=t,u=t,a=n,c=i.parent.children[0],s=i.m,f=u.m,l=a.m,h=c.m;a=tf(a),i=Ks(i),a&&i;)c=Ks(c),u=tf(u),u.a=t,r=a.z+l-i.z-s+o(a._,i._),r>0&&(nf(rf(a,t,e),t,r),s+=r,f+=r),l+=a.m,s+=i.m,h+=c.m,f+=u.m;a&&!tf(u)&&(u.t=a,u.m+=l-f),i&&!Ks(c)&&(c.t=i,c.m+=s-h,e=t)}return e}function i(t){t.x*=u,t.y=t.depth*a}var o=Qs,u=1,a=1,c=null;return t.separation=function(n){return arguments.length?(o=n,t):o},t.size=function(n){return arguments.length?(c=!1,u=+n[0],a=+n[1],t):c?null:[u,a]},t.nodeSize=function(n){return arguments.length?(c=!0,u=+n[0],a=+n[1],t):c?[u,a]:null},t}function cf(t,n,e,r,i){for(var o,u=t.children,a=-1,c=u.length,s=t.value&&(i-e)/t.value;++ap&&(p=a),y=l*l*_,d=Math.max(p/y,y/h),d>v){l-=a;break}v=d}g.push(u={value:l,dice:s=n-1){var s=c[t];return s.x0=r,s.y0=i,s.x1=u,s.y1=a,void 0}for(var l=f[t],h=e/2+l,p=t+1,d=n-1;p>>1;f[v]u-r){var g=(i*y+a*_)/e;o(t,p,_,r,i,u,g),o(p,n,y,r,g,u,a)}else{var m=(r*y+u*_)/e;o(t,p,_,r,i,m,a),o(p,n,y,m,i,u,a)}}var u,a,c=t.children,s=c.length,f=new Array(s+1);for(f[0]=a=u=0;us+d||if+d||un){var v=s-a.x-a.vx,_=f-a.y-a.vy,y=v*v+_*_;yt.r&&(t.r=t[n].r)}var r,i,o=1,u=1;return"function"!=typeof t&&(t=df(null==t?1:+t)),n.initialize=function(n){var e,o=(r=n).length;for(i=new Array(o),e=0;e1?(null==n?l.remove(t):l.set(t,i(n)),o):l.get(t)},find:function(n,e,r){var i,o,u,a,c,s=0,f=t.length;for(null==r?r=1/0:r*=r,s=0;s1?(p.on(t,n),o):p.on(t)}}}function Tf(){function t(t){var n,a=i.length,c=jt(i,bf,wf).visitAfter(e);for(u=t,n=0;n=f)){(t.data!==o||t.next)&&(0===i&&(i=vf(),p+=i*i),0===c&&(c=vf(),p+=c*c),p0)){if(o/=d,d<0){if(o0){if(o>p)return;o>h&&(h=o)}if(o=r-c,d||!(o<0)){if(o/=d,d<0){if(o>p)return;o>h&&(h=o)}else if(d>0){if(o0)){if(o/=v,v<0){if(o0){if(o>p)return;o>h&&(h=o)}if(o=i-s,v||!(o<0)){if(o/=v,v<0){if(o>p)return;o>h&&(h=o)}else if(v>0){if(o0||p<1)||(h>0&&(t[0]=[c+h*d,s+h*v]),p<1&&(t[1]=[c+p*d,s+p*v]),!0)}}}}}function Zf(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,c=t[0],s=t.left,f=t.right,l=s[0],h=s[1],p=f[0],d=f[1],v=(l+p)/2,_=(h+d)/2;if(d===h){if(v=r)return;if(l>p){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]1)if(l>p){if(c){if(c[1]>=i)return}else c=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(c){if(c[1]=r)return}else c=[n,u*n+a];o=[r,u*r+a]}else{if(c){if(c[0]ex||Math.abs(i[0][1]-i[1][1])>ex)||delete Km[o]}function Jf(t){return Jm[t.index]={site:t,halfedges:[]}}function Qf(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Kf(t,n){return n[+(n.left!==t.site)]}function tl(t,n){return n[+(n.left===t.site)]}function nl(){for(var t,n,e,r,i=0,o=Jm.length;iex||Math.abs(v-h)>ex)&&(c.splice(a,0,Km.push(Vf(u,p,Math.abs(d-t)ex?[t,Math.abs(l-t)ex?[Math.abs(h-r)ex?[e,Math.abs(l-e)ex?[Math.abs(h-n)=-rx)){var p=c*c+s*s,d=f*f+l*l,v=(l*p-s*d)/h,_=(c*d-f*p)/h,y=tx.pop()||new rl;y.arc=t,y.site=i,y.x=v+u,y.y=(y.cy=_+a)+Math.sqrt(v*v+_*_),t.circle=y;for(var g=null,m=Qm._;m;)if(y.yex)a=a.L;else{if(i=o-hl(a,u),!(i>ex)){r>-ex?(n=a.P,e=a):i>-ex?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}Jf(t);var c=al(t);if(Gm.insert(n,c),n||e){if(n===e)return ol(n),e=al(n.site),Gm.insert(c,e),c.edge=e.edge=Xf(n.site,c.site),il(n),void il(e);if(!e)return void(c.edge=Xf(n.site,c.site));ol(n),ol(e);var s=n.site,f=s[0],l=s[1],h=t[0]-f,p=t[1]-l,d=e.site,v=d[0]-f,_=d[1]-l,y=2*(h*_-p*v),g=h*h+p*p,m=v*v+_*_,x=[(_*g-p*m)/y+f,(h*m-v*g)/y+l];Wf(e.edge,s,d,x),c.edge=Xf(s,t,null,x),e.edge=Xf(t,d,null,x),il(n),il(e)}}function ll(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-(1/0);e=u.site;var a=e[0],c=e[1],s=c-n;if(!s)return a;var f=a-r,l=1/o-1/s,h=f/s;return l?(-h+Math.sqrt(h*h-2*l*(f*f/(-2*s)-c+s/2+i-o/2)))/l+r:(r+a)/2}function hl(t,n){var e=t.N;if(e)return ll(e,n);var r=t.site;return r[1]===n?r[0]:1/0}function pl(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function dl(t,n){return n[1]-t[1]||n[0]-t[0]}function vl(t,n){var e,r,i,o=t.sort(dl).pop();for(Km=[],Jm=new Array(t.length),Gm=new If,Qm=new If;;)if(i=Zm,o&&(!i||o[1]0?Ra(this).transition().duration(k).call(u,f,a):Ra(this).call(n.transform,f)}}function h(){if(y.apply(this,arguments)){var n,e,r,i=a(this,arguments),o=t.event.changedTouches,u=o.length;for(bl(),n=0;nMath.abs(t[1]-O[1])?M=!0:w=!0),O=t,b=!0,Cl(),o()}function o(){var t;switch(m=O[0]-D[0],x=O[1]-D[1],S){case ux:case ox:N&&(m=Math.max(P-l,Math.min(L-v,m)),h=l+m,_=v+m),A&&(x=Math.max(q-p,Math.min(R-y,x)),d=p+x,g=y+x);break;case ax:N<0?(m=Math.max(P-l,Math.min(L-l,m)),h=l+m,_=v):N>0&&(m=Math.max(P-v,Math.min(L-v,m)),h=l,_=v+m),A<0?(x=Math.max(q-p,Math.min(R-p,x)),d=p+x,g=y):A>0&&(x=Math.max(q-y,Math.min(R-y,x)),d=p,g=y+x);break;case cx:N&&(h=Math.max(P,Math.min(L,l-m*N)),_=Math.max(P,Math.min(L,v+m*N))),A&&(d=Math.max(q,Math.min(R,p-x*A)),g=Math.max(q,Math.min(R,y+x*A)))}_0&&(l=h-m),A<0?y=g-x:A>0&&(p=d-x),S=ux,Y.attr("cursor",hx.selection),o());break;default:return}Cl()}function s(){switch(t.event.keyCode){case 16:U&&(w=M=U=!1,o());break;case 18:S===cx&&(N<0?v=_:N>0&&(l=h),A<0?y=g:A>0&&(p=d),S=ax,o());break;case 32:S===ux&&(t.event.altKey?(N&&(v=_-m*N,l=h+m*N),A&&(y=g-x*A,p=d+x*A),S=cx):(N<0?v=_:N>0&&(l=h),A<0?y=g:A>0&&(p=d),S=ax),Y.attr("cursor",hx[k]),o());break;default:return}Cl()}if(t.event.touches){if(t.event.changedTouches.length1?0:t<-1?ib:Math.acos(t)}function th(t){return t>1?ob:t<-1?-ob:Math.asin(t)}function nh(t){return(t=gb(t/2))*t}function eh(){}function rh(t,n){t&&Mb.hasOwnProperty(t.type)&&Mb[t.type](t,n)}function ih(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i=0?1:-1,i=r*e,o=pb(n),u=gb(n),a=Ax*u,c=Nx*o+a*pb(i),s=a*r*gb(i);Tb.add(hb(s,c)),Sx=t,Nx=o,Ax=u}function lh(t){return kb.reset(),uh(t,Sb),2*kb}function hh(t){return[hb(t[1],t[0]),th(t[2])]}function ph(t){var n=t[0],e=t[1],r=pb(e);return[r*pb(n),r*gb(n),gb(e)]}function dh(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function vh(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function _h(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function yh(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function gh(t){var n=xb(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function mh(t,n){Dx.push(Ox=[Ex=t,zx=t]),nPx&&(Px=n)}function xh(t,n){var e=ph([t*sb,n*sb]);if(Ux){var r=vh(Ux,e),i=[r[1],-r[0],0],o=vh(i,r);gh(o),o=hh(o);var u,a=t-qx,c=a>0?1:-1,s=o[0]*cb*c,f=fb(a)>180;f^(c*qxPx&&(Px=u)):(s=(s+360)%360-180,f^(c*qxPx&&(Px=n))),f?tSh(Ex,zx)&&(zx=t):Sh(t,zx)>Sh(Ex,zx)&&(Ex=t):zx>=Ex?(tzx&&(zx=t)):t>qx?Sh(Ex,t)>Sh(Ex,zx)&&(zx=t):Sh(t,zx)>Sh(Ex,zx)&&(Ex=t)}else mh(t,n);Ux=e,qx=t}function bh(){Ab.point=xh}function wh(){Ox[0]=Ex,Ox[1]=zx,Ab.point=mh,Ux=null}function Mh(t,n){if(Ux){var e=t-qx;Nb.add(fb(e)>180?e+(e>0?360:-360):e)}else Lx=t,Rx=n;Sb.point(t,n),xh(t,n)}function Th(){Sb.lineStart()}function kh(){Mh(Lx,Rx),Sb.lineEnd(),fb(Nb)>eb&&(Ex=-(zx=180)),Ox[0]=Ex,Ox[1]=zx,Ux=null}function Sh(t,n){return(n-=t)<0?n+360:n}function Nh(t,n){return t[0]-n[0]}function Ah(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nSh(r[0],r[1])&&(r[1]=i[1]),Sh(i[0],r[1])>Sh(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(u=-(1/0),e=o.length-1,n=0,r=o[e];n<=e;r=i,++n)i=o[n],(a=Sh(r[1],i[0]))>u&&(u=a,Ex=i[0],zx=r[1])}return Dx=Ox=null,Ex===1/0||Cx===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ex,Cx],[zx,Px]]}function Ch(t,n){t*=sb,n*=sb;var e=pb(n);zh(e*pb(t),e*gb(t),gb(n))}function zh(t,n,e){++Fx,Yx+=(t-Yx)/Fx,Bx+=(n-Bx)/Fx,jx+=(e-jx)/Fx}function Ph(){Eb.point=qh}function qh(t,n){t*=sb,n*=sb;var e=pb(n);Qx=e*pb(t),Kx=e*gb(t),tb=gb(n),Eb.point=Lh,zh(Qx,Kx,tb)}function Lh(t,n){t*=sb,n*=sb;var e=pb(n),r=e*pb(t),i=e*gb(t),o=gb(n),u=hb(xb((u=Kx*o-tb*i)*u+(u=tb*r-Qx*o)*u+(u=Qx*i-Kx*r)*u),Qx*r+Kx*i+tb*o);Ix+=u,Hx+=u*(Qx+(Qx=r)),Xx+=u*(Kx+(Kx=i)),Vx+=u*(tb+(tb=o)),zh(Qx,Kx,tb)}function Rh(){Eb.point=Ch}function Uh(){Eb.point=Oh}function Dh(){Fh(Gx,Jx),Eb.point=Ch}function Oh(t,n){Gx=t,Jx=n,t*=sb,n*=sb,Eb.point=Fh;var e=pb(n);Qx=e*pb(t),Kx=e*gb(t),tb=gb(n),zh(Qx,Kx,tb)}function Fh(t,n){t*=sb,n*=sb;var e=pb(n),r=e*pb(t),i=e*gb(t),o=gb(n),u=Kx*o-tb*i,a=tb*r-Qx*o,c=Qx*i-Kx*r,s=xb(u*u+a*a+c*c),f=Qx*r+Kx*i+tb*o,l=s&&-Kl(f)/s,h=hb(s,f);Wx+=l*u,$x+=l*a,Zx+=l*c,Ix+=h,Hx+=h*(Qx+(Qx=r)),Xx+=h*(Kx+(Kx=i)),Vx+=h*(tb+(tb=o)),zh(Qx,Kx,tb)}function Ih(t){Fx=Ix=Yx=Bx=jx=Hx=Xx=Vx=Wx=$x=Zx=0,uh(t,Eb);var n=Wx,e=$x,r=Zx,i=n*n+e*e+r*r;return iib?t-ab:t<-ib?t+ab:t,n]}function Hh(t,n,e){return(t%=ab)?n||e?Bh(Vh(t),Wh(n,e)):Vh(t):n||e?Wh(n,e):jh}function Xh(t){return function(n,e){return n+=t,[n>ib?n-ab:n<-ib?n+ab:n,e]}}function Vh(t){var n=Xh(t);return n.invert=Xh(-t),n}function Wh(t,n){function e(t,n){var e=pb(n),a=pb(t)*e,c=gb(t)*e,s=gb(n),f=s*r+a*i;return[hb(c*o-f*u,a*r-s*i),th(f*o+c*u)]}var r=pb(t),i=gb(t),o=pb(n),u=gb(n);return e.invert=function(t,n){var e=pb(n),a=pb(t)*e,c=gb(t)*e,s=gb(n),f=s*o-c*u;return[hb(c*o+s*u,a*r+f*i),th(f*r-a*i)]},e}function $h(t){function n(n){return n=t(n[0]*sb,n[1]*sb),n[0]*=cb,n[1]*=cb,n}return t=Hh(t[0]*sb,t[1]*sb,t.length>2?t[2]*sb:0),n.invert=function(n){return n=t.invert(n[0]*sb,n[1]*sb),n[0]*=cb,n[1]*=cb,n},n}function Zh(t,n,e,r,i,o){if(e){var u=pb(n),a=gb(n),c=r*e;null==i?(i=n+r*ab,o=n-c/2):(i=Gh(u,i),o=Gh(u,o),(r>0?io)&&(i+=r*ab));for(var s,f=i;r>0?f>o:f1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function Kh(t,n,e,r,i,o){var u,a=t[0],c=t[1],s=n[0],f=n[1],l=0,h=1,p=s-a,d=f-c;if(u=e-a,p||!(u>0)){if(u/=p,p<0){if(u0){if(u>h)return;u>l&&(l=u)}if(u=i-a,p||!(u<0)){if(u/=p,p<0){if(u>h)return;u>l&&(l=u)}else if(p>0){if(u0)){if(u/=d,d<0){if(u0){if(u>h)return;u>l&&(l=u)}if(u=o-c,d||!(u<0)){if(u/=d,d<0){if(u>h)return;u>l&&(l=u)}else if(d>0){if(u0&&(t[0]=a+l*p,t[1]=c+l*d),h<1&&(n[0]=a+h*p,n[1]=c+h*d),!0}}}}}function tp(t,n){return fb(t[0]-n[0])=0;--o)i.point((f=s[o])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,s=h.z,p=!p}while(!h.v);i.lineEnd()}}}function rp(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r0){do s.point(0===f||3===f?t:e,f>1?r:n);while((f=(f+a+4)%4)!==l)}else s.point(o[0],o[1])}function u(r,i){return fb(r[0]-t)0?0:3:fb(r[0]-e)0?2:1:fb(r[1]-n)0?1:0:i>0?3:2}function a(t,n){return c(t.x,n.x)}function c(t,n){var e=u(t,1),r=u(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){function c(t,n){i(t,n)&&N.point(t,n)}function s(){for(var n=0,e=0,i=_.length;er&&(l-o)*(r-u)>(h-u)*(t-o)&&++n:h<=r&&(l-o)*(r-u)<(h-u)*(t-o)&&--n;return n}function f(){N=A,v=[],_=[],S=!0}function l(){var t=s(),n=S&&t,e=(v=w(v)).length;(n||e)&&(u.polygonStart(),n&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),e&&ep(v,a,t,o,u),u.polygonEnd()),N=u,v=_=y=null}function h(){E.point=d,_&&_.push(y=[]),k=!0,T=!1,b=M=NaN}function p(){v&&(d(g,m),x&&T&&A.rejoin(),v.push(A.result())),E.point=c,T&&N.lineEnd()}function d(o,u){var a=i(o,u);if(_&&y.push([o,u]),k)g=o,m=u,x=a,k=!1,a&&(N.lineStart(),N.point(o,u));else if(a&&T)N.point(o,u);else{var c=[b=Math.max(Bb,Math.min(Yb,b)),M=Math.max(Bb,Math.min(Yb,M))],s=[o=Math.max(Bb,Math.min(Yb,o)),u=Math.max(Bb,Math.min(Yb,u))];Kh(c,s,t,n,e,r)?(T||(N.lineStart(),N.point(c[0],c[1])),N.point(s[0],s[1]),a||N.lineEnd(),S=!1):a&&(N.lineStart(),N.point(o,u),S=!1)}b=o,M=u,T=a}var v,_,y,g,m,x,b,M,T,k,S,N=u,A=Qh(),E={point:c,lineStart:h,lineEnd:p,polygonStart:f,polygonEnd:l};return E}}function op(){var t,n,e,r=0,i=0,o=960,u=500;return e={stream:function(e){return t&&n===e?t:t=ip(r,i,o,u)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],u=+a[1][1],t=n=null,e):[[r,i],[o,u]]}}}function up(){Hb.point=cp,Hb.lineEnd=ap}function ap(){Hb.point=Hb.lineEnd=eh}function cp(t,n){t*=sb,n*=sb,Cb=t,zb=gb(n),Pb=pb(n),Hb.point=sp}function sp(t,n){t*=sb,n*=sb;var e=gb(n),r=pb(n),i=fb(t-Cb),o=pb(i),u=gb(i),a=r*u,c=Pb*e-zb*r*o,s=zb*e+Pb*r*o;jb.add(hb(xb(a*a+c*c),s)),Cb=t,zb=e,Pb=r}function fp(t){return jb.reset(),uh(t,Hb),+jb}function lp(t,n){return Xb[0]=t,Xb[1]=n,fp(Vb)}function hp(t,n,e){var r=l(t,n-eb,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function pp(t,n,e){var r=l(t,n-eb,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function dp(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return l(db(o/y)*y,i,y).map(p).concat(l(db(s/g)*g,c,g).map(d)).concat(l(db(r/v)*v,e,v).filter(function(t){return fb(t%y)>eb}).map(f)).concat(l(db(a/_)*_,u,_).filter(function(t){return fb(t%g)>eb}).map(h))}var e,r,i,o,u,a,c,s,f,h,p,d,v=10,_=v,y=90,g=360,m=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[p(o).concat(d(c).slice(1),p(i).reverse().slice(1),d(s).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.extentMajor(n).extentMinor(n):t.extentMinor()},t.extentMajor=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],s=+n[0][1],c=+n[1][1],o>i&&(n=o,o=i,i=n),s>c&&(n=s,s=c,c=n),t.precision(m)):[[o,s],[i,c]]},t.extentMinor=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],a=+n[0][1],u=+n[1][1],r>e&&(n=r,r=e,e=n),a>u&&(n=a,a=u,u=n),t.precision(m)):[[r,a],[e,u]]},t.step=function(n){return arguments.length?t.stepMajor(n).stepMinor(n):t.stepMinor()},t.stepMajor=function(n){return arguments.length?(y=+n[0],g=+n[1],t):[y,g]},t.stepMinor=function(n){return arguments.length?(v=+n[0],_=+n[1],t):[v,_]},t.precision=function(n){return arguments.length?(m=+n,f=hp(a,u,90),h=pp(r,e,m),p=hp(s,c,90),d=pp(o,i,m),t):m},t.extentMajor([[-180,-90+eb],[180,90-eb]]).extentMinor([[-180,-80-eb],[180,80+eb]])}function vp(t,n){var e=t[0]*sb,r=t[1]*sb,i=n[0]*sb,o=n[1]*sb,u=pb(r),a=gb(r),c=pb(o),s=gb(o),f=u*pb(e),l=u*gb(e),h=c*pb(i),p=c*gb(i),d=2*th(xb(nh(o-r)+u*c*nh(i-e))),v=gb(d),_=d?function(t){var n=gb(t*=d)/v,e=gb(d-t)/v,r=e*f+n*h,i=e*l+n*p,o=e*a+n*s;return[hb(i,r)*cb,hb(o,xb(r*r+i*i))*cb]}:function(){return[e*cb,r*cb]};return _.distance=d,_}function _p(t){return t}function yp(){Zb.point=gp}function gp(t,n){Zb.point=mp,qb=Rb=t,Lb=Ub=n}function mp(t,n){$b.add(Ub*t-Rb*n),Rb=t,Ub=n}function xp(){mp(qb,Lb)}function bp(t,n){tQb&&(Qb=t),nKb&&(Kb=n)}function wp(t,n){nw+=t,ew+=n,++rw}function Mp(){fw.point=Tp}function Tp(t,n){fw.point=kp,wp(Fb=t,Ib=n)}function kp(t,n){var e=t-Fb,r=n-Ib,i=xb(e*e+r*r);iw+=i*(Fb+t)/2,ow+=i*(Ib+n)/2,uw+=i,wp(Fb=t,Ib=n)}function Sp(){fw.point=wp}function Np(){fw.point=Ep}function Ap(){Cp(Db,Ob)}function Ep(t,n){fw.point=Cp,wp(Db=Fb=t,Ob=Ib=n)}function Cp(t,n){var e=t-Fb,r=n-Ib,i=xb(e*e+r*r);iw+=i*(Fb+t)/2,ow+=i*(Ib+n)/2,uw+=i,i=Ib*t-Fb*n,aw+=i*(Fb+t),cw+=i*(Ib+n),sw+=3*i,wp(Fb=t,Ib=n)}function zp(t){function n(n,e){t.moveTo(n+u,e),t.arc(n,e,u,0,ab)}function e(n,e){t.moveTo(n,e),a.point=r}function r(n,e){t.lineTo(n,e)}function i(){a.point=n}function o(){t.closePath()}var u=4.5,a={point:n,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=i,a.point=n},pointRadius:function(t){return u=t,a},result:eh};return a}function Pp(){function t(t,n){a.push("M",t,",",n,u)}function n(t,n){a.push("M",t,",",n),c.point=e}function e(t,n){a.push("L",t,",",n)}function r(){c.point=n}function i(){c.point=t}function o(){a.push("Z")}var u=qp(4.5),a=[],c={point:t,lineStart:r,lineEnd:i,polygonStart:function(){c.lineEnd=o},polygonEnd:function(){c.lineEnd=i,c.point=t},pointRadius:function(t){return u=qp(t),c},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return c}function qp(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Lp(){function t(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),uh(t,e(i))),i.result()}var n,e,r,i,o=4.5;return t.area=function(t){return uh(t,e(Zb)),Zb.result()},t.bounds=function(t){return uh(t,e(tw)),tw.result()},t.centroid=function(t){return uh(t,e(fw)),fw.result()},t.projection=function(r){return arguments.length?(e=null==(n=r)?_p:r.stream,t):n},t.context=function(n){return arguments.length?(i=null==(r=n)?new Pp:new zp(n),"function"!=typeof o&&i.pointRadius(o),t):r},t.pointRadius=function(n){return arguments.length?(o="function"==typeof n?n:(i.pointRadius(+n),+n),t):o},t.projection(null).context(null)}function Rp(t,n){var e=n[0],r=n[1],i=[gb(e),-pb(e),0],o=0,u=0;lw.reset();for(var a=0,c=t.length;a=0?1:-1,T=M*w,k=T>ib,S=d*x;if(lw.add(hb(S*M*gb(T),v*b+S*pb(T))),o+=k?w+M*ab:w,k^h>=e^g>=e){var N=vh(ph(l),ph(y));gh(N);var A=vh(i,N);gh(A);var E=(k^w>=0?-1:1)*th(A[2]);(r>E||r===E&&(N[0]||N[1]))&&(u+=k^w>=0?1:-1)}}return(o<-eb||o0){for(x||(o.polygonStart(),x=!0),o.lineStart(),t=0;t1&&2&i&&u.push(u.pop().concat(u.shift())),d.push(u.filter(Dp))}var p,d,v,_=n(o),y=i.invert(r[0],r[1]),g=Qh(),m=n(g),x=!1,b={point:u,lineStart:c,lineEnd:s,polygonStart:function(){b.point=f,b.lineStart=l,b.lineEnd=h,d=[],p=[]},polygonEnd:function(){b.point=u,b.lineStart=c,b.lineEnd=s,d=w(d);var t=Rp(p,y);d.length?(x||(o.polygonStart(),x=!0),ep(d,Op,t,e,o)):t&&(x||(o.polygonStart(),x=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),d=p=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}};return b}}function Dp(t){return t.length>1}function Op(t,n){return((t=t.x)[0]<0?t[1]-ob-eb:ob-t[1])-((n=n.x)[0]<0?n[1]-ob-eb:ob-n[1])}function Fp(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,u){var a=o>0?ib:-ib,c=fb(o-e);fb(c-ib)0?ob:-ob),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&c>=ib&&(fb(e-i)eb?lb((gb(n)*(o=pb(r))*gb(e)-gb(r)*(i=pb(n))*gb(t))/(i*o*u)):(n+r)/2}function Yp(t,n,e,r){var i;if(null==t)i=e*ob,r.point(-ib,i),r.point(0,i),r.point(ib,i),r.point(ib,0),r.point(ib,-i),r.point(0,-i),r.point(-ib,-i),r.point(-ib,0),r.point(-ib,i);else if(fb(t[0]-n[0])>eb){var o=t[0]a}function i(t){var n,e,i,a,f;return{lineStart:function(){a=i=!1,f=1},point:function(l,h){var p,d=[l,h],v=r(l,h),_=c?v?0:u(l,h):v?u(l+(l<0?ib:-ib),h):0;if(!n&&(a=i=v)&&t.lineStart(),v!==i&&(p=o(n,d),(tp(n,p)||tp(d,p))&&(d[0]+=eb,d[1]+=eb,v=r(d[0],d[1]))),v!==i)f=0,v?(t.lineStart(),p=o(d,n),t.point(p[0],p[1])):(p=o(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(s&&n&&c^v){var y;_&e||!(y=o(d,n,!0))||(f=0,c?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&tp(n,d)||t.point(d[0],d[1]),n=d,i=v,e=_},lineEnd:function(){i&&t.lineEnd(),n=null},clean:function(){return f|(a&&i)<<1}}}function o(t,n,e){var r=ph(t),i=ph(n),o=[1,0,0],u=vh(r,i),c=dh(u,u),s=u[0],f=c-s*s;if(!f)return!e&&t;var l=a*c/f,h=-a*s/f,p=vh(o,u),d=yh(o,l),v=yh(u,h);_h(d,v);var _=p,y=dh(d,_),g=dh(_,_),m=y*y-g*(dh(d,d)-1);if(!(m<0)){var x=xb(m),b=yh(_,(-y-x)/g);if(_h(b,d),b=hh(b),!e)return b;var w,M=t[0],T=n[0],k=t[1],S=n[1];T0^b[1]<(fb(b[0]-M)ib^(M<=b[0]&&b[0]<=T)){var C=yh(_,(-y+x)/g);return _h(C,d),[b,hh(C)]}}}function u(n,e){var r=c?t:ib-t,i=0;return n<-r?i|=1:n>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var a=pb(t),c=a>0,s=fb(a)>eb;return Up(r,i,e,c?[0,-t]:[-ib,t-ib])}function jp(t){return{stream:Hp(t)}}function Hp(t){function n(){}var e=n.prototype=Object.create(Xp.prototype);for(var r in t)e[r]=t[r];return function(t){var e=new n;return e.stream=t,e}}function Xp(){}function Vp(t,n,e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),uh(e,t.stream(tw));var u=tw.result(),a=Math.min(r/(u[1][0]-u[0][0]),i/(u[1][1]-u[0][1])),c=+n[0][0]+(r-a*(u[1][0]+u[0][0]))/2,s=+n[0][1]+(i-a*(u[1][1]+u[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*a).translate([c,s])}function Wp(t){return function(n,e){return Vp(t,[[0,0],n],e)}}function $p(t){return function(n,e){return Vp(t,n,e)}}function Zp(t,n){return+n?Jp(t,n):Gp(t)}function Gp(t){return Hp({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}function Jp(t,n){function e(r,i,o,u,a,c,s,f,l,h,p,d,v,_){var y=s-r,g=f-i,m=y*y+g*g;if(m>4*n&&v--){var x=u+h,b=a+p,w=c+d,M=xb(x*x+b*b+w*w),T=th(w/=M),k=fb(fb(w)-1)n||fb((y*E+g*C)/m-.5)>.3||u*h+a*p+c*d2?t[2]%360*sb:0,i()):[b*cb,w*cb,M*cb]},n.precision=function(t){return arguments.length?(E=Zp(r,A=t*t),o()):xb(A)},n.fitExtent=$p(n),n.fitSize=Wp(n),function(){return u=t.apply(this,arguments),n.invert=u.invert&&e,i()}}function td(t){var n=0,e=ib/3,r=Kp(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*sb,e=t[1]*sb):[n*cb,e*cb]},i}function nd(t,n){function e(t,n){var e=xb(o-2*i*gb(n))/i;return[e*gb(t*=i),u-e*pb(t)]}var r=gb(t),i=(r+gb(n))/2,o=1+r*(2*i-r),u=xb(o)/i;return e.invert=function(t,n){var e=u-n;return[hb(t,e)/i,th((o-(t*t+e*e)*i*i)/(2*i))]},e}function ed(){return td(nd).scale(155.424).center([0,33.6442])}function rd(){return ed().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function id(t){var n=t.length;return{point:function(e,r){for(var i=-1;++i=.12&&i<.234&&r>=-.425&&r<-.214?c:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},t.stream=function(t){return n&&e===t?n:n=id([a.stream(e=t),c.stream(t),s.stream(t)])},t.precision=function(n){return arguments.length?(a.precision(n),c.precision(n),s.precision(n),t):a.precision()},t.scale=function(n){return arguments.length?(a.scale(n),c.scale(.35*n),s.scale(n),t.translate(a.translate())):a.scale()},t.translate=function(n){if(!arguments.length)return a.translate();var e=a.scale(),u=+n[0],l=+n[1];return r=a.translate(n).clipExtent([[u-.455*e,l-.238*e],[u+.455*e,l+.238*e]]).stream(f),i=c.translate([u-.307*e,l+.201*e]).clipExtent([[u-.425*e+eb,l+.12*e+eb],[u-.214*e-eb,l+.234*e-eb]]).stream(f),o=s.translate([u-.205*e,l+.212*e]).clipExtent([[u-.214*e+eb,l+.166*e+eb],[u-.115*e-eb,l+.234*e-eb]]).stream(f),t},t.fitExtent=$p(t),t.fitSize=Wp(t),t.scale(1070)}function ud(t){return function(n,e){var r=pb(n),i=pb(e),o=t(r*i);return[o*i*gb(n),o*gb(e)]}}function ad(t){return function(n,e){var r=xb(n*n+e*e),i=t(r),o=gb(i),u=pb(i);return[hb(n*o,r*u),th(r&&e*o/r)]}}function cd(){return Qp(_w).scale(124.75).clipAngle(179.999)}function sd(){return Qp(yw).scale(79.4188).clipAngle(179.999)}function fd(t,n){return[t,_b(bb((ob+n)/2))]}function ld(){return hd(fd).scale(961/ab)}function hd(t){var n,e=Qp(t),r=e.scale,i=e.translate,o=e.clipExtent;return e.scale=function(t){return arguments.length?(r(t),n&&e.clipExtent(null),e):r()},e.translate=function(t){return arguments.length?(i(t),n&&e.clipExtent(null),e):i()},e.clipExtent=function(t){if(!arguments.length)return n?null:o();if(n=null==t){var u=ib*r(),a=i();t=[[a[0]-u,a[1]-u],[a[0]+u,a[1]+u]]}return o(t),e},e.clipExtent(null)}function pd(t){return bb((ob+t)/2)}function dd(t,n){function e(t,n){o>0?n<-ob+eb&&(n=-ob+eb):n>ob-eb&&(n=ob-eb);var e=o/yb(pd(n),i);return[e*gb(i*t),o-e*pb(i*t)]}var r=pb(t),i=t===n?gb(t):_b(r/pb(n))/_b(pd(n)/pd(t)),o=r*yb(pd(t),i)/i;return i?(e.invert=function(t,n){var e=o-n,r=mb(i)*xb(t*t+e*e);return[hb(t,e)/i,2*lb(yb(o/r,1/i))-ob]},e):fd}function vd(){return td(dd).scale(109.5).parallels([30,30])}function _d(t,n){return[t,n]}function yd(){return Qp(_d).scale(152.63)}function gd(t,n){function e(t,n){var e=o-n,r=i*t;return[e*gb(r),o-e*pb(r)]}var r=pb(t),i=t===n?gb(t):(r-pb(n))/(n-t),o=r/i+t;return fb(i)2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90]).scale(159.155)}var Ad="4.2.2",Ed=e(n),Cd=Ed.right,zd=Ed.left,Pd=Array.prototype,qd=Pd.slice,Ld=Pd.map,Rd=Math.sqrt(50),Ud=Math.sqrt(10),Dd=Math.sqrt(2),Od="$";P.prototype=q.prototype={constructor:P,has:function(t){return Od+t in this},get:function(t){return this[Od+t]},set:function(t,n){return this[Od+t]=n,this},remove:function(t){var n=Od+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===Od&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===Od&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===Od&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===Od&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===Od&&++t;return t},empty:function(){for(var t in this)if(t[0]===Od)return!1;return!0},each:function(t){for(var n in this)n[0]===Od&&t(this[n],n.slice(1),this)}};var Fd=q.prototype;F.prototype=I.prototype={constructor:F,has:Fd.has,add:function(t){return t+="",this[Od+t]=t,this},remove:Fd.remove,clear:Fd.clear,values:Fd.keys,size:Fd.size,empty:Fd.empty,each:Fd.each};var Id=3,Yd=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(Id),Bd=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(Id),jd=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(Id),Hd=Math.PI,Xd=Hd/2,Vd=4/11,Wd=6/11,$d=8/11,Zd=.75,Gd=9/11,Jd=10/11,Qd=.9375,Kd=21/22,tv=63/64,nv=1/Vd/Vd,ev=1.70158,rv=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(ev),iv=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(ev),ov=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(ev),uv=2*Math.PI,av=1,cv=.3,sv=function t(n,e){function r(t){return n*Math.pow(2,10*--t)*Math.sin((i-t)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=uv);return r.amplitude=function(n){return t(n,e*uv)},r.period=function(e){return t(n,e)},r}(av,cv),fv=function t(n,e){function r(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=uv);return r.amplitude=function(n){return t(n,e*uv)},r.period=function(e){return t(n,e)},r}(av,cv),lv=function t(n,e){function r(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((i-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((i+t)/e))/2}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=uv);return r.amplitude=function(n){return t(n,e*uv)},r.period=function(e){return t(n,e)},r}(av,cv),hv=Math.PI,pv=2*hv,dv=1e-6,vv=pv-dv;Mt.prototype=Tt.prototype={constructor:Mt,moveTo:function(t,n){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._.push("Z"))},lineTo:function(t,n){this._.push("L",this._x1=+t,",",this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._.push("Q",+t,",",+n,",",this._x1=+e,",",this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._.push("C",+t,",",+n,",",+e,",",+r,",",this._x1=+i,",",this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,u=this._y1,a=e-t,c=r-n,s=o-t,f=u-n,l=s*s+f*f;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._.push("M",this._x1=t,",",this._y1=n);else if(l>dv)if(Math.abs(f*a-c*s)>dv&&i){var h=e-o,p=r-u,d=a*a+c*c,v=h*h+p*p,_=Math.sqrt(d),y=Math.sqrt(l),g=i*Math.tan((hv-Math.acos((d+l-v)/(2*_*y)))/2),m=g/y,x=g/_;Math.abs(m-1)>dv&&this._.push("L",t+m*s,",",n+m*f),this._.push("A",i,",",i,",0,0,",+(f*h>s*p),",",this._x1=t+x*a,",",this._y1=n+x*c)}else this._.push("L",this._x1=t,",",this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,e=+e;var u=e*Math.cos(r),a=e*Math.sin(r),c=t+u,s=n+a,f=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._.push("M",c,",",s):(Math.abs(this._x1-c)>dv||Math.abs(this._y1-s)>dv)&&this._.push("L",c,",",s),e&&(l>vv?this._.push("A",e,",",e,",0,1,",f,",",t-u,",",n-a,"A",e,",",e,",0,1,",f,",",this._x1=c,",",this._y1=s):(l<0&&(l=l%pv+pv),this._.push("A",e,",",e,",0,",+(l>=hv),",",f,",",this._x1=t+e*Math.cos(i),",",this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+n,"h",+e,"v",+r,"h",-e,"Z")},toString:function(){return this._.join("")}};var _v=jt.prototype=Ht.prototype;_v.copy=function(){var t,n,e=new Ht(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Xt(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Xt(n));return e},_v.add=kt,_v.addAll=Nt,_v.cover=At,_v.data=Et,_v.extent=Ct,_v.find=Pt,_v.remove=qt,_v.removeAll=Lt,_v.root=Rt,_v.size=Ut,_v.visit=Dt,_v.visitAfter=Ot,_v.x=It,_v.y=Bt;var yv=[].slice,gv={};Vt.prototype=Qt.prototype={constructor:Vt,defer:function(t){if("function"!=typeof t||this._call)throw new Error;if(null!=this._error)return this;var n=yv.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),Wt(this),this},abort:function(){return null==this._error&&Gt(this,new Error("abort")), +this},await:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=function(n,e){t.apply(null,[n].concat(e))},Jt(this),this},awaitAll:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=t,Jt(this),this}};var mv=1e-12,xv=Math.PI,bv=xv/2,wv=2*xv;fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Mv=xn(ln);mn.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var Tv={draw:function(t,n){var e=Math.sqrt(n/xv);t.moveTo(e,0),t.arc(0,0,e,0,wv)}},kv={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},Sv=Math.sqrt(1/3),Nv=2*Sv,Av={draw:function(t,n){var e=Math.sqrt(n/Nv),r=e*Sv;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},Ev=.8908130915292852,Cv=Math.sin(xv/10)/Math.sin(7*xv/10),zv=Math.sin(wv/10)*Cv,Pv=-Math.cos(wv/10)*Cv,qv={draw:function(t,n){var e=Math.sqrt(n*Ev),r=zv*e,i=Pv*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=wv*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},Lv={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Rv=Math.sqrt(3),Uv={draw:function(t,n){var e=-Math.sqrt(n/(3*Rv));t.moveTo(0,2*e),t.lineTo(-Rv*e,-e),t.lineTo(Rv*e,-e),t.closePath()}},Dv=-.5,Ov=Math.sqrt(3)/2,Fv=1/Math.sqrt(12),Iv=3*(Fv/2+1),Yv={draw:function(t,n){var e=Math.sqrt(n/Iv),r=e/2,i=e*Fv,o=r,u=e*Fv+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(Dv*r-Ov*i,Ov*r+Dv*i),t.lineTo(Dv*o-Ov*u,Ov*o+Dv*u),t.lineTo(Dv*a-Ov*c,Ov*a+Dv*c),t.lineTo(Dv*r+Ov*i,Dv*i-Ov*r),t.lineTo(Dv*o+Ov*u,Dv*u-Ov*o),t.lineTo(Dv*a+Ov*c,Dv*c-Ov*a),t.closePath()}},Bv=[Tv,kv,Av,Lv,qv,Uv,Yv];Nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Sn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Sn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},En.prototype={areaStart:kn,areaEnd:kn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Sn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},zn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Sn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},qn.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var jv=function t(n){function e(t){return 1===n?new Nn(t):new qn(t,n)}return e.beta=function(n){return t(+n)},e}(.85);Rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ln(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Ln(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hv=function t(n){function e(t){return new Rn(t,n)}return e.tension=function(n){return t(+n)},e}(0);Un.prototype={areaStart:kn,areaEnd:kn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Ln(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Xv=function t(n){function e(t){return new Un(t,n)}return e.tension=function(n){return t(+n)},e}(0);Dn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ln(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Vv=function t(n){function e(t){return new Dn(t,n)}return e.tension=function(n){return t(+n)},e}(0);Fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this,this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:On(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Wv=function t(n){function e(t){return n?new Fn(t,n):new Rn(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);In.prototype={areaStart:kn,areaEnd:kn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:On(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var $v=function t(n){function e(t){return n?new In(t,n):new Un(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);Yn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:On(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Zv=function t(n){function e(t){return n?new Yn(t,n):new Dn(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);Bn.prototype={areaStart:kn,areaEnd:kn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},$n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Wn(this,this._t0,Vn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Wn(this,Vn(this,e=Xn(this,t,n)),e);break;default:Wn(this,this._t0,e=Xn(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Zn.prototype=Object.create($n.prototype)).point=function(t,n){$n.prototype.point.call(this,n,t)},Gn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},Kn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=te(t),i=te(n),o=0,u=1;u=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Gv=Array.prototype.slice,Jv=.7,Qv=1/Jv,Kv=/^#([0-9a-f]{3})$/,t_=/^#([0-9a-f]{6})$/,n_=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,e_=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,r_=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,i_=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,o_=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,u_=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,a_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ge(xe,be,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),ge(Se,ke,me(xe,{brighter:function(t){return t=null==t?Qv:Math.pow(Qv,t),new Se(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Jv:Math.pow(Jv,t),new Se(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),ge(Ce,Ee,me(xe,{brighter:function(t){return t=null==t?Qv:Math.pow(Qv,t),new Ce(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Jv:Math.pow(Jv,t),new Ce(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Se(ze(t>=240?t-240:t+120,i,r),ze(t,i,r),ze(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var c_=Math.PI/180,s_=180/Math.PI,f_=18,l_=.95047,h_=1,p_=1.08883,d_=4/29,v_=6/29,__=3*v_*v_,y_=v_*v_*v_;ge(Le,qe,me(xe,{brighter:function(t){return new Le(this.l+f_*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Le(this.l-f_*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=h_*Ue(t),n=l_*Ue(n),e=p_*Ue(e),new Se(De(3.2404542*n-1.5371385*t-.4985314*e),De(-.969266*n+1.8760108*t+.041556*e),De(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),ge(Ye,Ie,me(xe,{brighter:function(t){return new Ye(this.h,this.c,this.l+f_*(null==t?1:t),this.opacity)},darker:function(t){return new Ye(this.h,this.c,this.l-f_*(null==t?1:t),this.opacity)},rgb:function(){return Pe(this).rgb()}}));var g_=-.14861,m_=1.78277,x_=-.29227,b_=-.90649,w_=1.97294,M_=w_*b_,T_=w_*m_,k_=m_*x_-b_*g_;ge(He,je,me(xe,{brighter:function(t){return t=null==t?Qv:Math.pow(Qv,t),new He(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Jv:Math.pow(Jv,t),new He(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*c_,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Se(255*(n+e*(g_*r+m_*i)),255*(n+e*(x_*r+b_*i)),255*(n+e*(w_*r)),this.opacity)}}));var S_,N_,A_,E_,C_=function t(n){function e(t,n){var e=r((t=ke(t)).r,(n=ke(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),u=r(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}var r=Qe(n);return e.gamma=t,e}(1),z_=tr(Ve),P_=tr(We),q_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,L_=new RegExp(q_.source,"g"),R_=180/Math.PI,U_={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},D_=pr(lr,"px, ","px)","deg)"),O_=pr(hr,", ",")",")"),F_=Math.SQRT2,I_=2,Y_=4,B_=1e-12,j_=gr(Je),H_=gr(Ke),X_=xr(Je),V_=xr(Ke),W_=br(Je),$_=br(Ke),Z_={value:function(){}};Tr.prototype=Mr.prototype={constructor:Tr,on:function(t,n){var e,r=this._,i=kr(t+"",r),o=-1,u=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),o=0;o0?t>1?Zr(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):ky:null};var Sy=ky.range,Ny=1e3,Ay=6e4,Ey=36e5,Cy=864e5,zy=6048e5,Py=Zr(function(t){t.setTime(Math.floor(t/Ny)*Ny)},function(t,n){t.setTime(+t+n*Ny)},function(t,n){return(n-t)/Ny},function(t){return t.getUTCSeconds()}),qy=Py.range,Ly=Zr(function(t){t.setTime(Math.floor(t/Ay)*Ay)},function(t,n){t.setTime(+t+n*Ay)},function(t,n){return(n-t)/Ay},function(t){return t.getMinutes()}),Ry=Ly.range,Uy=Zr(function(t){var n=t.getTimezoneOffset()*Ay%Ey;n<0&&(n+=Ey),t.setTime(Math.floor((+t-n)/Ey)*Ey+n)},function(t,n){t.setTime(+t+n*Ey)},function(t,n){return(n-t)/Ey},function(t){return t.getHours()}),Dy=Uy.range,Oy=Zr(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ay)/Cy},function(t){return t.getDate()-1}),Fy=Oy.range,Iy=Gr(0),Yy=Gr(1),By=Gr(2),jy=Gr(3),Hy=Gr(4),Xy=Gr(5),Vy=Gr(6),Wy=Iy.range,$y=Yy.range,Zy=By.range,Gy=jy.range,Jy=Hy.range,Qy=Xy.range,Ky=Vy.range,tg=Zr(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),ng=tg.range,eg=Zr(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});eg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Zr(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var rg=eg.range,ig=Zr(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Ay)},function(t,n){return(n-t)/Ay},function(t){return t.getUTCMinutes()}),og=ig.range,ug=Zr(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Ey)},function(t,n){return(n-t)/Ey},function(t){return t.getUTCHours()}),ag=ug.range,cg=Zr(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Cy},function(t){return t.getUTCDate()-1}),sg=cg.range,fg=Jr(0),lg=Jr(1),hg=Jr(2),pg=Jr(3),dg=Jr(4),vg=Jr(5),_g=Jr(6),yg=fg.range,gg=lg.range,mg=hg.range,xg=pg.range,bg=dg.range,wg=vg.range,Mg=_g.range,Tg=Zr(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),kg=Tg.range,Sg=Zr(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Sg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Zr(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var Ng,Ag=Sg.range,Eg={"":ni,"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return ri(100*t,n)},r:ri,s:ei,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Cg=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;oi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var zg,Pg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ci({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var qg,Lg={"-":"",_:" ",0:"0"},Rg=/^\s*\d+/,Ug=/^%/,Dg=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;so({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Og="%Y-%m-%dT%H:%M:%S.%LZ",Fg=Date.prototype.toISOString?fo:t.utcFormat(Og),Ig=+new Date("2000-01-01T00:00:00.000Z")?lo:t.utcParse(Og),Yg=Array.prototype,Bg=Yg.map,jg=Yg.slice,Hg={name:"implicit"},Xg=[0,1],Vg=1e3,Wg=60*Vg,$g=60*Wg,Zg=24*$g,Gg=7*Zg,Jg=30*Zg,Qg=365*Zg,Kg=Zo("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),tm=Zo("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),nm=Zo("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),em=Zo("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),rm=$_(je(300,.5,0),je(-240,.5,1)),im=$_(je(-100,.75,.35),je(80,1.5,.8)),om=$_(je(260,.75,.35),je(80,1.5,.8)),um=je(),am=Jo(Zo("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),cm=Jo(Zo("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),sm=Jo(Zo("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),fm=Jo(Zo("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),lm="http://www.w3.org/1999/xhtml",hm={ +svg:"http://www.w3.org/2000/svg",xhtml:lm,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},pm=0;iu.prototype=ru.prototype={constructor:iu,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var dm=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var vm=document.documentElement;if(!vm.matches){var _m=vm.webkitMatchesSelector||vm.msMatchesSelector||vm.mozMatchesSelector||vm.oMatchesSelector;dm=function(t){return function(){return _m.call(this,t)}}}}var ym=dm,gm={};if(t.event=null,"undefined"!=typeof document){var mm=document.documentElement;"onmouseenter"in mm||(gm={mouseenter:"mouseover",mouseleave:"mouseout"})}Tu.prototype={constructor:Tu,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var xm="$";ia.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var bm=[null];qa.prototype=La.prototype={constructor:qa,select:yu,selectAll:xu,filter:bu,data:Au,enter:Mu,exit:Eu,merge:Cu,order:zu,sort:Pu,call:Lu,nodes:Ru,node:Uu,size:Du,empty:Ou,each:Fu,attr:Vu,style:Ju,property:na,classed:fa,text:da,html:ga,raise:xa,lower:wa,append:Ma,insert:ka,remove:Na,datum:Aa,on:fu,dispatch:Pa};var wm=Mr("start","end","interrupt"),Mm=[],Tm=0,km=1,Sm=2,Nm=3,Am=4,Em=5,Cm=La.prototype.constructor,zm=0,Pm=La.prototype;Uc.prototype=Dc.prototype={constructor:Uc,select:wc,selectAll:Mc,filter:vc,merge:_c,selection:Tc,transition:Rc,call:Pm.call,nodes:Pm.nodes,node:Pm.node,size:Pm.size,empty:Pm.empty,each:Pm.each,on:mc,attr:rc,attrTween:uc,style:Ec,styleTween:zc,text:Lc,remove:bc,tween:$a,delay:sc,duration:hc,ease:dc};var qm={time:null,delay:0,duration:250,ease:et};La.prototype.interrupt=Xa,La.prototype.transition=Ic;var Lm=[null],Rm=Array.prototype.slice,Um=1,Dm=2,Om=3,Fm=4,Im=1e-6;ws.prototype=ys.prototype={constructor:ws,each:us,eachAfter:cs,eachBefore:as,sum:ss,sort:fs,path:ls,ancestors:ps,descendants:ds,leaves:vs,links:_s,copy:gs};var Ym="$",Bm={depth:-1},jm={};of.prototype=Object.create(ws.prototype);var Hm=(1+Math.sqrt(5))/2,Xm=function t(n){function e(t,e,r,i,o){sf(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(Hm),Vm=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,c,s,f,l=-1,h=u.length,p=t.value;++l1?n:1)},e}(Hm),Wm=10,$m=Math.PI*(3-Math.sqrt(5));Pf.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t},If.prototype={constructor:If,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=Hf(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Bf(this,e),t=e,e=t.U),e.C=!1,r.C=!0,jf(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(jf(this,e),t=e,e=t.U),e.C=!1,r.C=!0,Bf(this,r))),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,u=t.R;if(e=o?u?Hf(u):o:u,i?i.L===t?i.L=e:i.R=e:this._=e,o&&u?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==u?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=u,u.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(n=i.R,n.C&&(n.C=!1,i.C=!0,Bf(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,jf(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Bf(this,i),t=this._;break}}else if(n=i.L,n.C&&(n.C=!1,i.C=!0,jf(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Bf(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,jf(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Zm,Gm,Jm,Qm,Km,tx=[],nx=[],ex=1e-6,rx=1e-12;vl.prototype={constructor:vl,polygons:function(){var t=this.edges;return this.cells.map(function(n){var e=n.halfedges.map(function(e){return Kf(n,t[e])});return e.data=n.site.data,e})},triangles:function(){var t=[],n=this.edges;return this.cells.forEach(function(e,r){for(var i,o=e.site,u=e.halfedges,a=-1,c=u.length,s=n[u[c-1]],f=s.left===o?s.right:s.left;++a0?1:t<0?-1:0},xb=Math.sqrt,bb=Math.tan,wb={Feature:function(t,n){rh(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++reb?Px=90:Nb<-eb&&(Cx=-90),Ox[0]=Ex,Ox[1]=zx}},Eb={sphere:eh,point:Ch,lineStart:Ph,lineEnd:Rh,polygonStart:function(){Eb.lineStart=Uh,Eb.lineEnd=Dh},polygonEnd:function(){Eb.lineStart=Ph,Eb.lineEnd=Rh}};jh.invert=jh;var Cb,zb,Pb,qb,Lb,Rb,Ub,Db,Ob,Fb,Ib,Yb=1e9,Bb=-Yb,jb=Gl(),Hb={sphere:eh,point:eh,lineStart:up,lineEnd:eh,polygonStart:eh,polygonEnd:eh},Xb=[null,null],Vb={type:"LineString",coordinates:Xb},Wb=Gl(),$b=Gl(),Zb={point:eh,lineStart:eh,lineEnd:eh,polygonStart:function(){Zb.lineStart=yp,Zb.lineEnd=xp},polygonEnd:function(){Zb.lineStart=Zb.lineEnd=Zb.point=eh,Wb.add(fb($b)),$b.reset()},result:function(){var t=Wb/2;return Wb.reset(),t}},Gb=1/0,Jb=Gb,Qb=-Gb,Kb=Qb,tw={point:bp,lineStart:eh,lineEnd:eh,polygonStart:eh,polygonEnd:eh,result:function(){var t=[[Gb,Jb],[Qb,Kb]];return Qb=Kb=-(Jb=Gb=1/0),t}},nw=0,ew=0,rw=0,iw=0,ow=0,uw=0,aw=0,cw=0,sw=0,fw={point:wp,lineStart:Mp,lineEnd:Sp,polygonStart:function(){fw.lineStart=Np,fw.lineEnd=Ap},polygonEnd:function(){fw.point=wp,fw.lineStart=Mp,fw.lineEnd=Sp},result:function(){var t=sw?[aw/sw,cw/sw]:uw?[iw/uw,ow/uw]:rw?[nw/rw,ew/rw]:[NaN,NaN];return nw=ew=rw=iw=ow=uw=aw=cw=sw=0,t}},lw=Gl(),hw=Up(function(){return!0},Fp,Yp,[-ib,-ob]);Xp.prototype={point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var pw=16,dw=pb(30*sb),vw=Hp({point:function(t,n){this.stream.point(t*sb,n*sb)}}),_w=ud(function(t){return xb(2/(1+t))});_w.invert=ad(function(t){return 2*th(t/2)});var yw=ud(function(t){return(t=Kl(t))&&t/gb(t)});yw.invert=ad(function(t){return t}),fd.invert=function(t,n){return[t,2*lb(vb(n))-ob]},_d.invert=_d,xd.invert=ad(lb),wd.invert=ad(th),Td.invert=ad(function(t){return 2*lb(t)}),Sd.invert=function(t,n){return[-n,2*lb(vb(t))-ob]},t.version=Ad,t.bisect=Cd,t.bisectRight=Cd,t.bisectLeft=zd,t.ascending=n,t.bisector=e,t.descending=i,t.deviation=a,t.extent=c,t.histogram=v,t.thresholdFreedmanDiaconis=y,t.thresholdScott=g,t.thresholdSturges=d,t.max=m,t.mean=x,t.median=b,t.merge=w,t.min=M,t.pairs=T,t.permute=k,t.quantile=_,t.range=l,t.scan=S,t.shuffle=N,t.sum=A,t.ticks=h,t.tickStep=p,t.transpose=E,t.variance=u,t.zip=z,t.entries=j,t.keys=Y,t.values=B,t.map=q,t.set=I,t.nest=L,t.randomUniform=H,t.randomNormal=X,t.randomLogNormal=V,t.randomBates=$,t.randomIrwinHall=W,t.randomExponential=Z,t.easeLinear=G,t.easeQuad=K,t.easeQuadIn=J,t.easeQuadOut=Q,t.easeQuadInOut=K,t.easeCubic=et,t.easeCubicIn=tt,t.easeCubicOut=nt,t.easeCubicInOut=et,t.easePoly=jd,t.easePolyIn=Yd,t.easePolyOut=Bd,t.easePolyInOut=jd,t.easeSin=ot,t.easeSinIn=rt,t.easeSinOut=it,t.easeSinInOut=ot,t.easeExp=ct,t.easeExpIn=ut,t.easeExpOut=at,t.easeExpInOut=ct,t.easeCircle=lt,t.easeCircleIn=st,t.easeCircleOut=ft,t.easeCircleInOut=lt,t.easeBounce=pt,t.easeBounceIn=ht,t.easeBounceOut=pt,t.easeBounceInOut=dt,t.easeBack=ov,t.easeBackIn=rv,t.easeBackOut=iv,t.easeBackInOut=ov,t.easeElastic=fv,t.easeElasticIn=sv,t.easeElasticOut=fv,t.easeElasticInOut=lv,t.polygonArea=vt,t.polygonCentroid=_t,t.polygonHull=xt,t.polygonContains=bt,t.polygonLength=wt,t.path=Tt,t.quadtree=jt,t.queue=Qt,t.arc=sn,t.area=vn,t.line=dn,t.pie=gn,t.radialArea=Mn,t.radialLine=wn,t.symbol=Tn,t.symbols=Bv,t.symbolCircle=Tv,t.symbolCross=kv,t.symbolDiamond=Av,t.symbolSquare=Lv,t.symbolStar=qv,t.symbolTriangle=Uv,t.symbolWye=Yv,t.curveBasisClosed=Cn,t.curveBasisOpen=Pn,t.curveBasis=An,t.curveBundle=jv,t.curveCardinalClosed=Xv,t.curveCardinalOpen=Vv,t.curveCardinal=Hv,t.curveCatmullRomClosed=$v,t.curveCatmullRomOpen=Zv,t.curveCatmullRom=Wv,t.curveLinearClosed=jn,t.curveLinear=ln,t.curveMonotoneX=Jn,t.curveMonotoneY=Qn,t.curveNatural=ne,t.curveStep=re,t.curveStepAfter=oe,t.curveStepBefore=ie,t.stack=se,t.stackOffsetExpand=fe,t.stackOffsetNone=ue,t.stackOffsetSilhouette=le,t.stackOffsetWiggle=he,t.stackOrderAscending=pe,t.stackOrderDescending=ve,t.stackOrderInsideOut=_e,t.stackOrderNone=ae,t.stackOrderReverse=ye,t.color=be,t.rgb=ke,t.hsl=Ee,t.lab=qe,t.hcl=Ie,t.cubehelix=je,t.interpolate=cr,t.interpolateArray=nr,t.interpolateDate=er,t.interpolateNumber=rr,t.interpolateObject=ir,t.interpolateRound=sr,t.interpolateString=ar,t.interpolateTransformCss=D_,t.interpolateTransformSvg=O_,t.interpolateZoom=yr,t.interpolateRgb=C_,t.interpolateRgbBasis=z_,t.interpolateRgbBasisClosed=P_,t.interpolateHsl=j_,t.interpolateHslLong=H_,t.interpolateLab=mr,t.interpolateHcl=X_,t.interpolateHclLong=V_,t.interpolateCubehelix=W_,t.interpolateCubehelixLong=$_,t.interpolateBasis=Ve,t.interpolateBasisClosed=We,t.quantize=wr,t.dispatch=Mr,t.dsvFormat=zr,t.csvParse=K_,t.csvParseRows=ty,t.csvFormat=ny,t.csvFormatRows=ey,t.tsvParse=iy,t.tsvParseRows=oy,t.tsvFormat=uy,t.tsvFormatRows=ay,t.request=Pr,t.html=cy,t.json=sy,t.text=fy,t.xml=ly,t.csv=hy,t.tsv=py,t.now=Or,t.timer=Yr,t.timerFlush=Br,t.timeout=Wr,t.interval=$r,t.timeInterval=Zr,t.timeMillisecond=ky,t.timeMilliseconds=Sy,t.timeSecond=Py,t.timeSeconds=qy,t.timeMinute=Ly,t.timeMinutes=Ry,t.timeHour=Uy,t.timeHours=Dy,t.timeDay=Oy,t.timeDays=Fy,t.timeWeek=Iy;t.timeWeeks=Wy;t.timeSunday=Iy,t.timeSundays=Wy,t.timeMonday=Yy,t.timeMondays=$y,t.timeTuesday=By,t.timeTuesdays=Zy,t.timeWednesday=jy,t.timeWednesdays=Gy,t.timeThursday=Hy,t.timeThursdays=Jy,t.timeFriday=Xy,t.timeFridays=Qy,t.timeSaturday=Vy,t.timeSaturdays=Ky,t.timeMonth=tg,t.timeMonths=ng,t.timeYear=eg,t.timeYears=rg,t.utcMillisecond=ky,t.utcMilliseconds=Sy,t.utcSecond=Py,t.utcSeconds=qy,t.utcMinute=ig,t.utcMinutes=og,t.utcHour=ug,t.utcHours=ag,t.utcDay=cg,t.utcDays=sg,t.utcWeek=fg,t.utcWeeks=yg,t.utcSunday=fg,t.utcSundays=yg,t.utcMonday=lg,t.utcMondays=gg,t.utcTuesday=hg,t.utcTuesdays=mg,t.utcWednesday=pg,t.utcWednesdays=xg,t.utcThursday=dg,t.utcThursdays=bg,t.utcFriday=vg,t.utcFridays=wg,t.utcSaturday=_g,t.utcSaturdays=Mg,t.utcMonth=Tg,t.utcMonths=kg,t.utcYear=Sg,t.utcYears=Ag,t.formatLocale=ai,t.formatDefaultLocale=ci,t.formatSpecifier=ii,t.precisionFixed=si,t.precisionPrefix=fi,t.precisionRound=li,t.isoFormat=Fg,t.isoParse=Ig,t.timeFormatLocale=vi,t.timeFormatDefaultLocale=so,t.scaleBand=po,t.scalePoint=_o,t.scaleIdentity=Eo,t.scaleLinear=Ao,t.scaleLog=Do,t.scaleOrdinal=ho,t.scaleImplicit=Hg,t.scalePow=Fo,t.scaleSqrt=Io,t.scaleQuantile=Yo,t.scaleQuantize=Bo,t.scaleThreshold=jo,t.scaleTime=Wo,t.scaleUtc=$o,t.schemeCategory10=Kg,t.schemeCategory20b=tm,t.schemeCategory20c=nm,t.schemeCategory20=em,t.scaleSequential=Qo,t.interpolateCubehelixDefault=rm,t.interpolateRainbow=Go,t.interpolateWarm=im,t.interpolateCool=om,t.interpolateViridis=am,t.interpolateMagma=cm,t.interpolateInferno=sm,t.interpolatePlasma=fm,t.creator=eu,t.customEvent=lu,t.local=ru,t.matcher=ym,t.mouse=du,t.namespace=Ko,t.namespaces=hm,t.select=Ra,t.selectAll=Ua,t.selection=La,t.selector=_u,t.selectorAll=mu,t.touch=Da,t.touches=Oa,t.window=Wu,t.active=Yc,t.interrupt=Ha,t.transition=Dc,t.axisTop=$c,t.axisRight=Zc,t.axisBottom=Gc,t.axisLeft=Jc,t.cluster=os,t.hierarchy=ys,t.pack=Bs,t.packSiblings=Us,t.packEnclose=ks,t.partition=$s,t.stratify=Js,t.tree=af,t.treemap=ff,t.treemapBinary=lf,t.treemapDice=Ws,t.treemapSlice=cf,t.treemapSliceDice=hf,t.treemapSquarify=Xm,t.treemapResquarify=Vm,t.forceCenter=pf,t.forceCollide=gf,t.forceLink=xf,t.forceManyBody=Tf,t.forceSimulation=Mf,t.forceX=kf,t.forceY=Sf,t.drag=Uf,t.dragDisable=Ef,t.dragEnable=Cf,t.voronoi=_l,t.zoom=Sl,t.zoomIdentity=ix,t.zoomTransform=xl,t.brush=Fl,t.brushX=Dl,t.brushY=Ol,t.brushSelection=Ul,t.chord=Bl,t.ribbon=Zl,t.geoAlbers=rd,t.geoAlbersUsa=od,t.geoArea=lh,t.geoAzimuthalEqualArea=cd,t.geoAzimuthalEqualAreaRaw=_w,t.geoAzimuthalEquidistant=sd,t.geoAzimuthalEquidistantRaw=yw,t.geoBounds=Eh,t.geoCentroid=Ih,t.geoCircle=Jh,t.geoClipExtent=op,t.geoConicConformal=vd,t.geoConicConformalRaw=dd,t.geoConicEqualArea=ed,t.geoConicEqualAreaRaw=nd,t.geoConicEquidistant=md,t.geoConicEquidistantRaw=gd,t.geoDistance=lp,t.geoEquirectangular=yd,t.geoEquirectangularRaw=_d,t.geoGnomonic=bd,t.geoGnomonicRaw=xd,t.geoGraticule=dp,t.geoInterpolate=vp,t.geoLength=fp,t.geoMercator=ld,t.geoMercatorRaw=fd,t.geoOrthographic=Md,t.geoOrthographicRaw=wd,t.geoPath=Lp,t.geoProjection=Qp,t.geoProjectionMutator=Kp,t.geoRotation=$h,t.geoStereographic=kd,t.geoStereographicRaw=Td,t.geoStream=uh,t.geoTransform=jp,t.geoTransverseMercator=Nd,t.geoTransverseMercatorRaw=Sd,Object.defineProperty(t,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/public/ext/font/css?family=PT+Sans b/public/ext/font/css?family=PT+Sans new file mode 100755 index 0000000..1757dda --- /dev/null +++ b/public/ext/font/css?family=PT+Sans @@ -0,0 +1,6 @@ +@font-face { + font-family: 'PT Sans'; + font-style: normal; + font-weight: 400; + src: local('PT Sans'), local('PTSans-Regular'), url(https://fonts.gstatic.com/s/ptsans/v8/FUDHvzEKSJww3kCxuiAo2A.ttf) format('truetype'); +} diff --git a/public/ext/font/ptsans.ttf b/public/ext/font/ptsans.ttf new file mode 100755 index 0000000..d55372b Binary files /dev/null and b/public/ext/font/ptsans.ttf differ diff --git a/public/ext/ptsans.ttf b/public/ext/ptsans.ttf new file mode 100755 index 0000000..d55372b Binary files /dev/null and b/public/ext/ptsans.ttf differ diff --git a/public/global/chaos/c.css b/public/global/chaos/c.css new file mode 100755 index 0000000..5a12530 --- /dev/null +++ b/public/global/chaos/c.css @@ -0,0 +1,20 @@ +section.chaos{ + display:flex; +display: -webkit-box; +display: -moz-box; +display: -ms-flexbox; +display: -webkit-flex; + + background-color:white; + height:30px; +} +img.chaos{ + padding:0px 5px 0px 5px; + height:30px; + opacity:0.2; +} +section.chaos p{ + padding:0px 5px 0px 5px; + font-size:10px; + opacity:0.2; +} diff --git a/public/global/chaos/chaos.png b/public/global/chaos/chaos.png new file mode 100755 index 0000000..05fe99e Binary files /dev/null and b/public/global/chaos/chaos.png differ diff --git a/public/global/head/cssHead.css b/public/global/head/cssHead.css new file mode 100755 index 0000000..c607fdf --- /dev/null +++ b/public/global/head/cssHead.css @@ -0,0 +1,35 @@ +body{ + background-repeat: no-repeat; + background-attachment: fixed; + background-size:cover; + background-image:url("grulla_21.jpg"); + background-position: top; +} + +#ihead{ + width:100%; +height:100vh; +} + +#courtain{ + background-color:black; + background-size:cover; + width: 100vw; + position:fixed; + z-index:100; + top: -50vh; + } + +article.mod{ + position:fixed; + z-index:0; +} + +p.mod{ + color:black; + font-weight:bold; + font-size:1.3em; + max-width:500px; + padding:5% 5%; + text-align:left; + } diff --git a/public/global/head/grulla_1.jpg b/public/global/head/grulla_1.jpg new file mode 100755 index 0000000..741bcc8 Binary files /dev/null and b/public/global/head/grulla_1.jpg differ diff --git a/public/global/head/grulla_2.jpg b/public/global/head/grulla_2.jpg new file mode 100755 index 0000000..047cc69 Binary files /dev/null and b/public/global/head/grulla_2.jpg differ diff --git a/public/global/head/grulla_21.jpg b/public/global/head/grulla_21.jpg new file mode 100755 index 0000000..ec1c091 Binary files /dev/null and b/public/global/head/grulla_21.jpg differ diff --git a/public/global/head/intro/cssAnimation.css b/public/global/head/intro/cssAnimation.css new file mode 100755 index 0000000..7c3830b --- /dev/null +++ b/public/global/head/intro/cssAnimation.css @@ -0,0 +1,55 @@ +/* +#ihead{ + animation-name: headIntro; + animation-fill-mode:backwards; + animation-timing-function:linear; + animation-delay:4s; + animation-duration: 3s; +} +@keyframes headIntro { + 0% { transform:scale(5,5); background-position: 30vw 30vh; } + 70% { transform:scale(3,3); background-position:top center; } + 100% { transform:scale(1,1); } + } +*/ + +#courtain{ + -webkit-animation: oopacity 2s ease-out 6s, clear 3s 6.5s; + -webkit-animation-fill-mode:both,both; +} + +/* +article.mod{ + animation-name:modIntro; + animation-timing-function:ease-in; + animation-delay:3s; + animation-duration:0.5s; + animation-fill-mode:backwards; +} +*/ +section#spacer{ +animation-name:nintro; +animation-timing-function:ease-in; +animation-delay:6s; +animation-duration:0s; +animation-fill-mode:backwards; + +} +section.anav{ +animation-name:nintro; +animation-timing-function:ease-in; +animation-delay:5s; +animation-duration:1s; +animation-fill-mode:backwards; +} + +@keyframes modIntro{ 0%{opacity:0;} 100%{opacity:1;} } +@keyframes oopacity { 0%{ opacity:1; } 100%{ opacity:0; } } +@keyframes clear{ 0%{ height:150vh; } 100%{ height:0px; } } +@keyframes nintro{ 0% { position:absolute; top:-200px; } 100% { top:0px;} } + +@-webkit-keyframes modIntro{ 0%{opacity:0;} 100%{opacity:1;} } +@-webkit-keyframes oopacity { 0%{ opacity:1; } 100%{ opacity:0; } } +@-webkit-keyframes clear{ 0%{ height:150vh; } 100%{ height:0px; } } +@-webkit-keyframes nintro{ 0% { position:absolute; top:-200px; } 100% { top:0px;} } + diff --git a/public/global/head/qUser.q b/public/global/head/qUser.q new file mode 100755 index 0000000..88f2293 --- /dev/null +++ b/public/global/head/qUser.q @@ -0,0 +1,13 @@ + + + /* c#host localhost*/ + /* c#database #dbdata */ + /* c#user #dbdata_user */ + /* c#password #dbdata_pass */ + + + +select + nombre as "tag", + contenido as "uContent" + from casa; diff --git a/public/global/layout.css b/public/global/layout.css new file mode 100755 index 0000000..2024561 --- /dev/null +++ b/public/global/layout.css @@ -0,0 +1,47 @@ +@import url('https://fonts.googleapis.com/css?family=PT+Sans'); +/* +@font-face { + font-family: 'PT Sans'; + font-style: normal; + font-weight: 400; + src: local('PT Sans'), local('PTSans-Regular'), url( #ext ptsans.ttf) format('truetype'); +} +*/ + +:root{ + --red-color:#c22a39; + --gray-color:#333333; +} +/*#C22A39*/ +*{ + box-sizing: border-box; +} +body{ +margin:0px; +} +section.row::after { + content: ""; + clear: both; + display: table; +} +html { + font-family: "PT Sans", sans-serif; +} + +.flex{ +/* better defined locally + padding: 0; margin: 0; + margin:auto; + list-style: none; + justify-content:center; +*/ + display: -webkit-box; display: -moz-box; display: -ms-flexbox; + display: -webkit-flex; display: flex; + -webkit-flex-flow: row wrap; + +} + +a:link { text-decoration: none; outline:none;} +a:visited { text-decoration: none; } +a:hover { text-decoration: none; } +a:active { text-decoration: none; outline: none;} diff --git a/public/global/nav/cssNav.css b/public/global/nav/cssNav.css new file mode 100755 index 0000000..3a22d57 --- /dev/null +++ b/public/global/nav/cssNav.css @@ -0,0 +1,96 @@ +section#spacer{ + position:relative; + visibility: hidden; +} + +@media(min-width:501px){ section.nav{ position:fixed; } } +@media(max-width:500px){ section.nav{ position:absolute; } } +section.nav{ + z-index:100; + width:100%; + background:#c22a39; + justify-content: end; + -webkit-justify-content: end; +} + +article.lhome{ + height:50px; + width:150px; + margin:auto; +} +a#hhome{ + background-image: url(" icon/LogoHome.svg "); + background-size: contain; + background-repeat: no-repeat; + background-position: center center; + width: 100%; + height: 100%; + display: block; +} + + +/* tel article ------------------*/ +article.tel{ + flex:5 1 300px; + display: -webkit-inline-flex; + -webkit-justify-content:baseline; + display: inline-flex; + justify-content:baseline; + min-width:250px; + margin:auto; +} +div.tnum{ + flex:1 1 100px; + color: white; + margin:auto 10px; + max-width:150px; +} +div.icon{ + background-size: contain; + background-repeat: no-repeat; + background-position: center center; + margin:auto 2%; +} +div#watts{ width:30px;height:30px; } +div#tel{ width:20px;height:30px; } + +/* nav --------------------------*/ + +article.nav{ + flex:6 1 300px; + display: inline-flex; + justify-content:flex-end; + display: -webkit-inline-flex; + -webkit-justify-content:flex-end; + max-width:400px; +} + +a.nav, +a.nav:link, +a.nav:visited, +a.nav:active, +a.nav:hover +{ + text-align: center; + text-decoration: none; + color:white; + flex:2 1 50px; +} +a.nav > p { +} + +div#tel{ background-image: url("icon/cel.svg "); } +div#watts{ background-image: url("icon/watts.svg "); } +/* hamb --------------------------*/ +div#menu{ + background-image: url("icon/hamb.svg "); + background-size: 70% 50%; + background-repeat: no-repeat; + background-position: center center; + max-width: 60px; + margin: 0px 5px; + flex:1 4 50px; +} +div#menu:hover{ + cursor: pointer; +} diff --git a/public/global/nav/cssSide.css b/public/global/nav/cssSide.css new file mode 100755 index 0000000..1bcfcca --- /dev/null +++ b/public/global/nav/cssSide.css @@ -0,0 +1,60 @@ +section.aside{ + + position: fixed; + min-height: 100rem; + margin-right: 0%; + background-color: rgba(0,0,0,0.9); + z-index: 101; + transition: width 0.6s; + transition-timing-function: ease-in; + + top:0px; + width:0%; + right:0px; + background-color:rgba(0,0,0,0.9); + z-index:101; + transition: width 0.6s; + transition-timing-function: ease-out; + +} +aside.aside{ + width: 50%; + min-width: 300px; + background-color: #333333; + margin-right: 0px; + margin-left: auto; + text-align: center; + min-height: 100vh; + padding-top: 60px; + +} + +p.close{ + width:100%; + font-size: 3em; + font-style: italic; + color: white; + background-color:#C22A39; + margin:auto; + +} +p.close:hover{ +cursor: pointer; +} +a.aside{ + font-size: 2em; + font-style: italic; + color: white; + + } +a.aside > p{ + padding: 0px 5%; + margin: 2vh 0%; + transition: transform 1.5s; + min-width:300px; +} + +a.aside > p:hover{ + background-color:#C22A39; + transform:scale(1.1,1.1); + } diff --git a/public/global/nav/d3Side.js b/public/global/nav/d3Side.js new file mode 100755 index 0000000..b94ed89 --- /dev/null +++ b/public/global/nav/d3Side.js @@ -0,0 +1,10 @@ +d3.select("div#menu").on("click",function(){ + d3.select("#saside").style("width","100%"); +}); + +d3.select("p#pclose").on("click",function(){ + d3.select("#saside").style("width","0%"); +}); +d3.selectAll("p.aside").on("click",function(){ + d3.select("#saside").style("width","0%"); +}); diff --git a/public/global/nav/icon/LogoHome.svg b/public/global/nav/icon/LogoHome.svg new file mode 100755 index 0000000..a0c6412 --- /dev/null +++ b/public/global/nav/icon/LogoHome.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/global/nav/icon/cabecita.svg b/public/global/nav/icon/cabecita.svg new file mode 100755 index 0000000..b32fb76 --- /dev/null +++ b/public/global/nav/icon/cabecita.svg @@ -0,0 +1,89 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/public/global/nav/icon/cel.svg b/public/global/nav/icon/cel.svg new file mode 100755 index 0000000..5e77a01 --- /dev/null +++ b/public/global/nav/icon/cel.svg @@ -0,0 +1,68 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/public/global/nav/icon/hamb.svg b/public/global/nav/icon/hamb.svg new file mode 100755 index 0000000..27eb77e --- /dev/null +++ b/public/global/nav/icon/hamb.svg @@ -0,0 +1,72 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/public/global/nav/icon/watts.svg b/public/global/nav/icon/watts.svg new file mode 100755 index 0000000..5e67719 --- /dev/null +++ b/public/global/nav/icon/watts.svg @@ -0,0 +1,80 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/public/home/cal/cssCal.css b/public/home/cal/cssCal.css new file mode 100755 index 0000000..58345e7 --- /dev/null +++ b/public/home/cal/cssCal.css @@ -0,0 +1,104 @@ +section.title{ +background: #C22A39; +min-height:50vh; +position:relative; +} +section.title > p { + font-size: 4em; + position: absolute; + left: 0; + top: 33%; + width: 100%; + text-align: center; + color:white; +} +a.cal{ + max-width:720px; + display:block; + margin:25px auto; +} + +section.month{ + max-width: 720px; + margin: 25px auto; + justify-content: space-between; + -webkit-justify-content: space-between; +} + +div.spacer{ + flex:4; + margin:auto; + background-color:black; + height:1px; +} + +p.month{ + flex:3; + font-weight: bold; + font-size: 1.5em; + margin:auto; + text-align: center; + text-transform: capitalize; +} + +section.event{ + justify-content: space-between; + -webkit-justify-content: space-between; +} + + +article.data{ padding:10px;} +article.more{ + position:absolute; + right: 3%; + top: 75%; + text-align: center; + color:white; + font-size:1.5em; + +} +article.image{ + position:relative; +} +img.small{ + max-height:180px; +} +p.date{ + font-size: 1.4em; + margin:auto; + } +p.city{ + font-weight: bold; + font-size: 1.7em; + margin:auto; + color:#C22A39; +} +p.place{ + font-size: 0.7em; + font-style: italic; + font-weight:lighter; + margin:10px auto; + color:#C22A39; + display:inline; +} +p.dir{ + font-size: 0.7em; + font-style: italic; + font-weight:lighter; + margin:10px auto; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + max-width:380px; + +} +p.name{ + font-size: 1em; + margin:10px auto; +} +a.cal, +a.cal:visited, +a.cal:link, +a.cal:active, +a.cal:hover{ color:black; +text-decoration:none; } diff --git a/public/home/cal/img/Argentina.jpg b/public/home/cal/img/Argentina.jpg new file mode 100755 index 0000000..0377464 Binary files /dev/null and b/public/home/cal/img/Argentina.jpg differ diff --git a/public/home/cal/img/CDMX.jpg b/public/home/cal/img/CDMX.jpg new file mode 100755 index 0000000..ac8ee8b Binary files /dev/null and b/public/home/cal/img/CDMX.jpg differ diff --git a/public/home/cal/img/Cancun.jpg b/public/home/cal/img/Cancun.jpg new file mode 100755 index 0000000..7822c76 Binary files /dev/null and b/public/home/cal/img/Cancun.jpg differ diff --git a/public/home/cal/img/Carmen.jpg b/public/home/cal/img/Carmen.jpg new file mode 100755 index 0000000..a338258 Binary files /dev/null and b/public/home/cal/img/Carmen.jpg differ diff --git a/public/home/cal/img/Chile.jpg b/public/home/cal/img/Chile.jpg new file mode 100755 index 0000000..53aa759 Binary files /dev/null and b/public/home/cal/img/Chile.jpg differ diff --git a/public/home/cal/img/China.jpg b/public/home/cal/img/China.jpg new file mode 100755 index 0000000..870d653 Binary files /dev/null and b/public/home/cal/img/China.jpg differ diff --git a/public/home/cal/img/Cuba.jpg b/public/home/cal/img/Cuba.jpg new file mode 100755 index 0000000..4ff477a Binary files /dev/null and b/public/home/cal/img/Cuba.jpg differ diff --git a/public/home/cal/img/Ensenada.jpg b/public/home/cal/img/Ensenada.jpg new file mode 100755 index 0000000..effc50b Binary files /dev/null and b/public/home/cal/img/Ensenada.jpg differ diff --git a/public/home/cal/img/Guadalajara.jpg b/public/home/cal/img/Guadalajara.jpg new file mode 100755 index 0000000..019c0cb Binary files /dev/null and b/public/home/cal/img/Guadalajara.jpg differ diff --git a/public/home/cal/img/Hidalgo.jpg b/public/home/cal/img/Hidalgo.jpg new file mode 100755 index 0000000..5897605 Binary files /dev/null and b/public/home/cal/img/Hidalgo.jpg differ diff --git a/public/home/cal/img/Leon.jpg b/public/home/cal/img/Leon.jpg new file mode 100755 index 0000000..6cce568 Binary files /dev/null and b/public/home/cal/img/Leon.jpg differ diff --git a/public/home/cal/img/Merida.jpg b/public/home/cal/img/Merida.jpg new file mode 100755 index 0000000..94b6f8b Binary files /dev/null and b/public/home/cal/img/Merida.jpg differ diff --git a/public/home/cal/img/Mexicali.jpg b/public/home/cal/img/Mexicali.jpg new file mode 100755 index 0000000..f6bb3b7 Binary files /dev/null and b/public/home/cal/img/Mexicali.jpg differ diff --git a/public/home/cal/img/Monterrey.jpg b/public/home/cal/img/Monterrey.jpg new file mode 100755 index 0000000..3b41391 Binary files /dev/null and b/public/home/cal/img/Monterrey.jpg differ diff --git a/public/home/cal/img/Oaxaca.jpg b/public/home/cal/img/Oaxaca.jpg new file mode 100755 index 0000000..c43523c Binary files /dev/null and b/public/home/cal/img/Oaxaca.jpg differ diff --git a/public/home/cal/img/Puebla.jpg b/public/home/cal/img/Puebla.jpg new file mode 100755 index 0000000..c91a2a3 Binary files /dev/null and b/public/home/cal/img/Puebla.jpg differ diff --git a/public/home/cal/img/Queretaro.jpg b/public/home/cal/img/Queretaro.jpg new file mode 100755 index 0000000..84d18f1 Binary files /dev/null and b/public/home/cal/img/Queretaro.jpg differ diff --git a/public/home/cal/img/Veracruz.jpg b/public/home/cal/img/Veracruz.jpg new file mode 100755 index 0000000..31374f5 Binary files /dev/null and b/public/home/cal/img/Veracruz.jpg differ diff --git a/public/home/cal/img/Xalapa.jpg b/public/home/cal/img/Xalapa.jpg new file mode 100755 index 0000000..6cce492 Binary files /dev/null and b/public/home/cal/img/Xalapa.jpg differ diff --git a/public/home/cal/img/Xalpan.jpg b/public/home/cal/img/Xalpan.jpg new file mode 100755 index 0000000..d7dc9d2 Binary files /dev/null and b/public/home/cal/img/Xalpan.jpg differ diff --git a/public/home/cal/q1Block.q b/public/home/cal/q1Block.q new file mode 100755 index 0000000..fed47e7 --- /dev/null +++ b/public/home/cal/q1Block.q @@ -0,0 +1,10 @@ + +select distinct + concat(mes.nombre,' ',year(evento.fecha_inicio)) as text, + date_format(evento.fecha_inicio,'%Y%m') as id + from evento + inner join mes on month(evento.fecha_inicio)=mes.id + where evento.estado=1 + order by evento.fecha_inicio + ; + diff --git a/public/home/cal/q3Event.q b/public/home/cal/q3Event.q new file mode 100755 index 0000000..38015df --- /dev/null +++ b/public/home/cal/q3Event.q @@ -0,0 +1,23 @@ + +select + date_format(evento.fecha_inicio,'%Y%m') as bid, + evento.id as eeid, + concat(lugar.municipio,", ",lugar.federativa) as ciudad, + concat(lugar.nombre,". ") as lugar, + lugar.direccion as dir, + case when month(evento.fecha_inicio) = month(evento.fecha_fin) + then concat("Del ", day(evento.fecha_inicio)," al ",day(evento.fecha_fin)," de ",mi.nombre) + else concat("Del ",day(evento.fecha_inicio)," de ",mi.nombre," al ", + day(evento.fecha_fin)," de ", mo.nombre) + end as fecha, + curso.nombre as nombre, + evento.imagen_chica as imagen_chica +from evento + inner join lugar on evento.lugar_id=lugar.id + inner join curso on evento.curso_id=curso.id + join mes as mi on mi.id=month(evento.fecha_inicio) + join mes as mo on mo.id=month(evento.fecha_fin) +where evento.estado=1 +order by evento.fecha_inicio + ; + diff --git a/public/home/candy/CandyReadMe.txt b/public/home/candy/CandyReadMe.txt new file mode 100755 index 0000000..a396638 --- /dev/null +++ b/public/home/candy/CandyReadMe.txt @@ -0,0 +1,15 @@ +Candy Javascript client for XMMS +Xmms setup instructions: + +install prosody +edit and copy prosody.cfg.lua -> /etc/prosody/ (arch) +run +# luac5.1 -p /etc/prosody/prosody.cfg.lua +no output = ok. + +Enable/start service +# prosodyctl adduser user_admin@virtualserver.org + +check bosh module at +http://virtualserver.org:5280/http-bind + diff --git a/public/home/candy/default.css b/public/home/candy/default.css new file mode 100755 index 0000000..3d9e2e3 --- /dev/null +++ b/public/home/candy/default.css @@ -0,0 +1,804 @@ +** File: default.css + * Candy - Chats are not dead yet. + * + * Legal: See the LICENSE file at the top-level directory of this distribution and at https://github.com/candy-chat/candy/blob/master/LICENSE + */ +html, body { + margin: 0; + padding: 0; + font-family: 'Helvetica Neue', Helvetica, sans-serif; +} + +#candy { + position: absolute; + top: 0; + bottom: 0; + right: 0; + left: 0; + background-color: #444; + color: #333; + overflow: hidden; +} + +a { + color: #333; + text-decoration: none; +} + +ul { + list-style: none; + padding: 0; + margin: 0; +} + +#chat-tabs { + list-style: none; + margin: 0 200px 0 0; + padding: 0; + overflow: auto; + overflow-y: hidden; +} + +#chat-tabs li { + margin: 0; + float: left; + position: relative; + white-space: nowrap; + margin: 3px 0 0 3px; +} + +#chat-tabs a { + padding: 4px 50px 4px 10px; + display: inline-block; + color: #ccc; + height: 20px; + background-color: #666; + border-radius: 3px 3px 0 0; +} + +#chat-tabs .active a { + background-color: #eee; + color: black; +} + +#chat-tabs .transition { + position: absolute; + top: 0; + right: 0; + padding: 0; + width: 30px; + height: 30px; + background: url( #ext candy/res/img/tab-transitions.png) repeat-y left; + border-radius: 0 3px 0 0; +} + +#chat-tabs a.close { + background-color: transparent; + position: absolute; + right: -2px; + top: -3px; + height: auto; + padding: 5px; + margin: 0 5px 0 2px; + color: #999; +} + +#chat-tabs .active .transition { + background: url( #ext candy/res/img/tab-transitions.png) repeat-y -50px; +} + +#chat-tabs .close:hover { + color: black; +} + +#chat-tabs .unread { + color: white; + background-color: #9b1414; + padding: 2px 4px; + font-weight: bold; + font-size: 10px; + position: absolute; + top: 5px; + right: 22px; + border-radius: 3px; +} + +#chat-tabs .offline .label { + text-decoration: line-through; +} + +#chat-toolbar { + position: fixed; + bottom: 0; + right: 0; + font-size: 11px; + color: #666; + width: 200px; + height: 24px; + padding-top: 7px; + background-color: #444; + display: none; + border-top: 1px solid black; + box-shadow: 0 1px 0 0 #555 inset; +} + +#chat-toolbar li { + width: 16px; + height: 16px; + margin-left: 5px; + float: left; + display: inline-block; + cursor: pointer; + background-position: top left; + background-repeat: no-repeat; +} + +#chat-toolbar #emoticons-icon { + background-image: url( #ext candy/res/img/action/emoticons.png); +} + +#chat-toolbar .context { + background-image: url( #ext candy/res/img/action/settings.png); + display: none; +} + +.role-moderator #chat-toolbar .context, .affiliation-owner #chat-toolbar .context { + display: inline-block; +} + +#chat-sound-control { + background-image: url( #ext candy/res/img/action/sound-off.png); +} + +#chat-sound-control.checked { + background-image: url( #ext candy/res/img/action/sound-on.png); +} + +#chat-autoscroll-control { + background-image: url( #ext candy/res/img/action/autoscroll-off.png); +} + +#chat-autoscroll-control.checked { + background-image: url( #ext candy/res/img/action/autoscroll-on.png); +} + +#chat-statusmessage-control { + background-image: url( #ext candy/res/img/action/statusmessage-off.png); +} + +#chat-statusmessage-control.checked { + background-image: url( #ext candy/res/img/action/statusmessage-on.png); +} + +#chat-toolbar .usercount { + background-image: url( #ext candy/res/img/action/usercount.png); + cursor: default; + padding-left: 20px; + width: auto; + margin-right: 5px; + float: right; +} + +.usercount span { + display: inline-block; + padding: 1px 3px; + background-color: #666; + font-weight: bold; + border-radius: 3px; + color: #ccc; +} + +.room-pane { + display: none; +} + +.roster-pane { + position: absolute; + overflow: auto; + top: 0; + right: 0; + bottom: 0; + width: 200px; + margin: 30px 0 31px 0; + background-color: #333; + border-top: 1px solid black; + box-shadow: inset 0 1px 0 0 #555; +} + +.roster-pane .user { + cursor: pointer; + padding: 7px 10px; + font-size: 12px; + opacity: 0; + display: none; + color: #ccc; + clear: both; + height: 14px; + border-bottom: 1px solid black; + box-shadow: 0 1px 0 0 #555; +} + +.roster-pane .user:hover { + background-color: #222; +} + +.roster-pane .user.status-ignored { + cursor: default; +} + +.roster-pane .user.me { + font-weight: bold; + cursor: default; +} + +.roster-pane .user.me:hover { + background-color: transparent; +} + +.roster-pane .label { + float: left; + width: 110px; + overflow: hidden; + white-space: nowrap; + text-shadow: 1px 1px black; +} + +.roster-pane li { + width: 16px; + height: 16px; + float: right; + display: block; + margin-left: 3px; + background-repeat: no-repeat; + background-position: center; +} + +.roster-pane li.role { + cursor: default; + display: none; +} + +.roster-pane li.role-moderator { + background-image: url( #ext candy/res/img/roster/role-moderator.png); + display: block; +} + +.roster-pane li.affiliation-owner { + background-image: url( #ext candy/res/img/roster/affiliation-owner.png); + display: block; +} + +.roster-pane li.ignore { + background-image: url( #ext candy/res/img/roster/ignore.png); + display: none; +} + +.roster-pane .status-ignored li.ignore { + display: block; +} + +.roster-pane li.context { + color: #999; + text-align: center; + cursor: pointer; +} + +.roster-pane li.context:hover { + background-color: #666; + border-radius: 4px; +} + +.roster-pane .me li.context { + display: none; +} + +.message-pane-wrapper { + clear: both; + overflow: auto; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + height: auto; + width: auto; + margin: 30px 200px 31px 0; + background-color: #eee; + font-size: 13px; + padding: 0 5px; +} + +.message-pane { + padding-top: 1px; +} + +.message-pane li { + cursor: default; + border-bottom: 1px solid #ccc; + box-shadow: 0 1px 0 0 white; +} + +.message-pane small { + display: none; + color: #a00; + font-size: 10px; + position: absolute; + background-color: #f7f7f7; + text-align: center; + line-height: 20px; + margin: 4px 0; + padding: 0 5px; + right: 5px; +} + +.message-pane li:hover { + background-color: #f7f7f7; +} + +.message-pane li:hover small { + display: block; +} + +.message-pane li>div { + overflow: auto; + padding: 2px 0 2px 130px; + line-height: 24px; + white-space: -o-pre-wrap; /* Opera */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ +} + +.message-pane li>div p { + margin: 0; +} + +.message-pane .label { + font-weight: bold; + white-space: nowrap; + display: block; + margin-left: -130px; + width: 110px; + float: left; + overflow: hidden; + text-align: right; + color: black; +} + +.message-pane .label:hover, +.message-pane .label:focus { + color: inherit; +} + +.message-pane .spacer { + color: #aaa; + font-weight: bold; + margin-left: -14px; + float: left; +} + +.message-pane .subject, .message-pane .subject .label { + color: #a00; + font-weight: bold; +} + +.message-pane .adminmessage { + color: #a00; + font-weight: bold; +} + +.message-pane .infomessage { + color: #888; + font-style: italic; +} + +.message-pane div>a { + color: #a00; +} + +.message-pane a:hover { + text-decoration: underline; +} + +.message-pane .emoticon { + vertical-align: text-bottom; + height: 15px; + width: 15px; +} + +.message-form-wrapper { + position: fixed; + bottom: 0; + left: 0; + right: 0; + width: auto; + margin-right: 200px; + border-top: 1px solid #ccc; + background-color: white; + height: 31px; +} + +.message-form { + position: fixed; + bottom: 0; + left: 0; + right: 0; + margin-right: 320px; + padding: 0; +} + +.message-form input { + border: 0 none; + padding: 5px 10px; + font-size: 14px; + width: 100%; + display: block; + outline-width: 0; + background-color: white; +} + +.message-form input.submit { + cursor: pointer; + background-color: #ccc; + color: #666; + position: fixed; + bottom: 0; + right: 0; + margin: 3px 203px 3px 3px; + padding: 0 10px; + width: auto; + font-size: 12px; + line-height: 12px; + height: 25px; + font-weight: bold; + border-radius: 3px; +} + +#tooltip { + position: absolute; + z-index: 10; + display: none; + margin: 13px -18px -3px -2px; + color: #333; + font-size: 11px; + padding: 5px 0; +} + +#tooltip div { + background-color: #f7f7f7; + padding: 2px 5px; + zoom: 1; + box-shadow: 0 1px 2px rgba(0, 0, 0, .75); +} + +.arrow { + background: url( #ext candy/res/img/tooltip-arrows.gif) no-repeat left bottom; + height: 5px; + display: block; + position: relative; + z-index: 11; +} + +.right-bottom .arrow-bottom { + background-position: right bottom; +} + +.arrow-top { + display: none; + background-position: left top; +} + +.right-top .arrow-top { + display: block; + background-position: right top; +} + +.left-top .arrow-top { + display: block; +} + + +.left-top .arrow-bottom, +.right-top .arrow-bottom { + display: none; +} + +#context-menu { + position: absolute; + z-index: 10; + display: none; + padding: 5px 10px; + margin: 13px -28px -3px -12px; +} + +#context-menu ul { + background-color: #f7f7f7; + color: #333; + font-size: 12px; + padding: 2px; + zoom: 1; + box-shadow: 0 1px 2px rgba(0, 0, 0, .75); +} + +#context-menu li { + padding: 3px 5px 3px 20px; + line-height: 12px; + cursor: pointer; + margin-bottom: 2px; + background: 1px no-repeat; + white-space: nowrap; +} + +#context-menu li:hover { + background-color: #ccc; +} + +#context-menu li:last-child { + margin-bottom: 0; +} + +#context-menu .private { + background-image: url( #ext candy/res/img/action/private.png); +} + +#context-menu .ignore { + background-image: url( #ext candy/res/img/action/ignore.png); +} + +#context-menu .unignore { + background-image: url( #ext candy/res/img/action/unignore.png); +} + +#context-menu .kick { + background-image: url( #ext candy/res/img/action/kick.png); +} + +#context-menu .ban { + background-image: url( #ext candy/res/img/action/ban.png); +} + +#context-menu .subject { + background-image: url( #ext candy/res/img/action/subject.png); +} + +#context-menu .emoticons { + padding-left: 5px; + width: 85px; + white-space: normal; +} + +#context-menu .emoticons:hover { + background-color: transparent; +} + +#context-menu .emoticons img { + cursor: pointer; + margin: 3px; + height: 15px; + width: 15px; +} + +#chat-modal.modal-common { + background: #eee; + width: 300px; + padding: 20px 5px; + color: #333; + font-size: 16px; + position: fixed; + left: 50%; + top: 50%; + margin-left: -160px; + margin-top: -45px; + text-align: center; + display: none; + z-index: 100; + border: 5px solid #888; + border-radius: 5px; + box-shadow: 0 0 5px black; +} + +#chat-modal-overlay { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + z-index: 90; + background-image: url( #ext candy/res/img/overlay.png); +} + +#chat-modal.modal-login { + display: block; + margin-top: -100px; +} + +#chat-modal-spinner { + display: none; + margin-left: 15px; +} + +#chat-modal form { + margin: 15px 0; +} + +#chat-modal label, #chat-modal input, #chat-modal select { + display: block; + float: left; + line-height: 26px; + font-size: 16px; + margin: 5px 0; +} + +#chat-modal input, #chat-modal select { + padding: 2px; + line-height: 16px; + width: 150px; +} + +#chat-modal input[type='text'], +#chat-modal input[type='password'] { + background-color: white; + border: 1px solid #ccc; + padding: 4px; + font-size: 14px; + color: #333; +} + +#chat-modal.login-with-domains { + width: 650px; + margin-left: -330px; +} + +#chat-modal span.at-symbol { + float: left; + padding: 6px; + font-size: 14px; +} + +#chat-modal select[name=domain] { + width: 320px; +} + +#chat-modal label { + text-align: right; + padding-right: 1em; + clear: both; + width: 100px; +} + +#chat-modal input.button { + float: none; + display: block; + margin: 5px auto; + clear: both; + position: relative; + top: 10px; + width: 200px; +} + +#chat-modal .close { + position: absolute; + right: 0; + display: none; + padding: 0 5px; + margin: -17px 3px 0 0; + color: #999; + border-radius: 3px; +} + +#chat-modal .close:hover { + color: #333; + background-color: #aaa; +} + +/** + * Bootstrap Responsive Design styles + * It add styles to every element so we need to override some to keep the look of Candy + */ +*, :after, :before { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +label { + font-weight: normal; +} + +.label { + font-size: 100%; + font-weight: normal; + text-align: left; + line-height: inherit; + padding: 0; + color: inherit; +} + +.close { + font-size: inherit; + line-height: inherit; + opacity: 1; + text-shadow: none; +} + +#mobile-roster-icon { + display: none; +} + +/* + * Responsive specific styles for devices under 600px + * Mainly changing the size of room, roster and message panes when opened / closed + */ +@media (max-width: 599px) { + .room-pane .message-pane-wrapper { + margin-right: 50px; + } + + .room-pane:not(.open) .roster-pane { + right: -150px; + } + + .roster-pane { + z-index: 10; + } + + .message-pane li>div { + padding-left: 10px; + } + + .message-pane li>div.infomessage { + padding-left: 30px; + } + + .message-pane .label { + width: auto; + margin-left: 0; + } + + .message-pane .spacer { + margin: 0 5px; + } + + .room-pane:not(.open) .message-form-wrapper { + margin-right: 50px; + } + + .room-pane:not(.open) .message-form { + margin-right: 150px; + } + + .room-pane:not(.open) .message-form input.submit { + margin-right: 53px; + } + + #mobile-roster-icon { + position: fixed; + top: 0; + right: 0; + } + +/* + * These are for the hamburger icon. The box-shadow adds the extra lines + */ + .box-shadow-icon { + position: relative; + display: block; + width: 50px; + height: 30px; + cursor: pointer; + } + + .box-shadow-icon:before { + content: ""; + position: absolute; + left: 15px; + top: 9px; + width: 20px; + height: 2px; + background: #aaa; + box-shadow: 0 5px 0 0 #aaa, 0 10px 0 0 #aaa; + } + + .box-shadow-icon:hover { + background: #222; + } +} + diff --git a/public/home/candy/loader.js b/public/home/candy/loader.js new file mode 100755 index 0000000..66230fa --- /dev/null +++ b/public/home/candy/loader.js @@ -0,0 +1,20 @@ +//var css = d3.select("#head").insert("link","link") +// .attr("rel","stylesheet") +// .attr("type","text/css"); +// css.attr("href"," #ext candy/libs.min.css"); +// css.attr("href"," #ext candy/res/default.css"); +window.onload = function(){ +// Candy.init(' #chat_addr :5280/http-bind/', { + Candy.init(chat_addr, { + core: { + debug: false, + autojoin: [chat_channel] + }, + view: { language: 'es', assets: 'ext/candy/res/'} + }); + Candy.Core.connect(chat_srv,null," <%= nick %>"); + Candy.Core.onWindowUnload = function(){window.close();}; + $(Candy).on("candy:view.connection.status-6",function(){ + window.close();}); +} + diff --git a/public/home/contact/cssContact1.css b/public/home/contact/cssContact1.css new file mode 100755 index 0000000..f51043d --- /dev/null +++ b/public/home/contact/cssContact1.css @@ -0,0 +1,66 @@ +section.contact{ + background-color:white; + width:100%; + text-align: center; + position:relative; +} +section.cbanner{ + background-color:#C22A39; + width:100%; + position: absolute; + text-align: center; + margin: 80px auto; +} +p.bsmall{font-size:1.5em; color:white; text-align:left;} +p.blarge{ + font-size:4em; font-style: italic; + color:white; + margin: 15px 0px 45px; +} +article.textc{ + display: inline-block; +} +div.bspace{ + background-color:white; + width:100%; + height: 1px; +} +section.cform{ + width:100%; + justify-content:center; + -webkit-justify-content:center; +} +article.cform{ + flex:1; + background-color:#333333; + margin: 30px auto; + display: inline-block; + text-align: left; + width: 60vw; + max-width: 800px; + min-width:300px; + +} +form.cform{ + margin: 380px auto 70px; + width: 80%; + max-width: 500px; + min-width: 240px; +} + + +label{ color:white; width:100%; display:block;} +textarea{ + width:100%; + height:25vh; + max-height:130px; + display:block; + font-size:1.2em; +} +input[type=text], +input[type=email]{ + width:100%; + height:10vh; + font-size:2em; + max-height:50px; + } diff --git a/public/home/contact/cssContact2.css b/public/home/contact/cssContact2.css new file mode 100755 index 0000000..898aadf --- /dev/null +++ b/public/home/contact/cssContact2.css @@ -0,0 +1,36 @@ +section.contact{ + background-color:white; + width:100%; + text-align: center; + position:relative; +} +section.cbanner{ + background-color:#C22A39; + width:100%; + position: absolute; + text-align: center; + margin: 80px auto; +} +p.bsmall{font-size:1.5em; color:white; text-align:left;} +p.blarge{ + font-size:4em; font-style: italic; + color:white; + margin: 15px 0px 45px; +} +article.textc{ + display: inline-block; +} +div.bspace{ + background-color:white; + width:100%; + height: 1px; +} +section.cform{ + background-color:#333333; + margin-top: 300px; + width:60vw; + margin: 30px auto; + padding: 300px 100px 70px; + display: inline-block; + text-align: left; +} diff --git a/public/home/contact/msg/b.pl b/public/home/contact/msg/b.pl new file mode 100755 index 0000000..affe18b --- /dev/null +++ b/public/home/contact/msg/b.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl -s +use warnings; +use strict; +#--- +use Cwd 'abs_path'; +use lib abs_path("../../")."/sibelius2/conf"; +use Paths; +use Init; +use ServerVars; +use Net::Telnet; +use MIME::Lite; +use JSON; +#------------- +### MimeLite necesita sendmail, para arch, sendmail esta sin atender, +### puedes usar msmtp msmtp-mta para simular sendmail. este ultimo +### necesita configurarse con un correo. + +my ($mod_name,$sid) = @ARGV; +my %var = (Init::modInit($sid),%ServerVars::sk); +my $server_name = $var{'chat_srv'}; + +my @arr; +push (@arr,{name=>"one",tag=>"notag"}); + + +my $to = 'benjamuga@gmail.com'; +my $from = 'mensajes@vuelodegrulla.com'; +my $subject = "Mensaje de $var{'mname'}"; +my $message = "Enviado por: +

                $var{'mname'}

                +

                correo:
                $var{'mail'}

                +

                $var{'msg'}

                + "; + +my $msg = MIME::Lite->new( + From => $from, + To => $to, + Subject => $subject, + Data => $message + ); + +$msg->attr("content-type" => "text/html"); +$msg->send; + +print encode_json( \@arr ) ."\n"; + +1 +__END__ diff --git a/public/home/contact/msg/qUpdate.q b/public/home/contact/msg/qUpdate.q new file mode 100755 index 0000000..e1e3a4c --- /dev/null +++ b/public/home/contact/msg/qUpdate.q @@ -0,0 +1,14 @@ + + /* c#host localhost*/ + /* c#database #dbmsg */ + /* c#user #dbmsg_w */ + /* c#password #dbmsg_wp */ + /* c#write write*/ + + + + insert into entrada + (nombre,correo,pagina,texto,fecha) + values + ( q#mname , q#mail , q#wp , q#msg ,now() ); + diff --git a/public/home/event/cssEvent.css b/public/home/event/cssEvent.css new file mode 100755 index 0000000..91a087c --- /dev/null +++ b/public/home/event/cssEvent.css @@ -0,0 +1,94 @@ +section.eimage{ + background-size:cover; + height:80vh; + background-attachment: fixed; + margin: auto; + background-image:url("img/grulla_10.jpg"); + background-position:center; +} +section.place{ + background: #C22A39; + padding:40px; +} +p.place{ + font-size: 1.5em; + color: white; + text-align: center; +} +p.cname{ + font-size: 1.7em; + color: white; + text-align: center; + margin: 7px; +} +section.description{ + background-color:white; + justify-content: center; + -webkit-justify-content: center; +} +article.info{ + flex:1 1 250px; + max-width:370px; + margin:auto; + min-width:250px; + padding-left:20px; +} +p.pbig{ + font-weight:bold; + font-size:1.8em; + } +p.pmed{ + font-size:1.1em; + } + +article.specs{ + flex:2 2 250px; + margin:auto; + max-width:420px; +} +p#subt{ +margin: 10px; +color: black; +font-size: 1.2em; +} + +article.specs >p{ +margin-bottom: 30px; +color: black; +font-size: .875rem; +font-weight: 400; +line-height: 1.5; +min-width:250px; +} + +p.promo{ +margin: 10px; +color: #c22a39; +font-size: 1.2em; +} + +section.map{ +background-color:#333333; +overflow:hidden; + height:80vh; + min-height:400px; + position:relative; +} + +section.map > iframe{ + width:70%; + height:70%; + top:15%; + left:15%; + overflow: hidden; + position:absolute; +} +p.arrive{ + position:absolute; + left:10%; + top:1%; + font-size:1.5em; + color:white; + } +article.contact{ + } diff --git a/public/home/event/img/grulla_10.jpg b/public/home/event/img/grulla_10.jpg new file mode 100755 index 0000000..5e7a690 Binary files /dev/null and b/public/home/event/img/grulla_10.jpg differ diff --git a/public/home/event/qEvent.q b/public/home/event/qEvent.q new file mode 100755 index 0000000..3e2e6a9 --- /dev/null +++ b/public/home/event/qEvent.q @@ -0,0 +1,29 @@ + +select + + curso.nombre as cname, + concat(lugar.municipio,', ',lugar.federativa) as place, + + lugar.direccion as paddr, + lugar.observacion as pobs, + lugar.municipio as city, + evento.precio as cost, + case evento.promo_estado when 1 then coalesce(evento.promocion,"") else "" end as promo, + curso.temario as csubjects, + curso.servicios as cservices, + + lugar.nombre as pname, + case when month(evento.fecha_inicio) = month(evento.fecha_fin) + then concat("Del ", day(evento.fecha_inicio)," al ",day(evento.fecha_fin)," de ",mi.nombre) + else concat("Del ",day(evento.fecha_inicio)," de ",mi.nombre," al ", + day(evento.fecha_fin)," de ", mo.nombre) + end as date + + + from evento + inner join lugar on evento.lugar_id=lugar.id + inner join curso on evento.curso_id=curso.id + join mes as mi on mi.id=month(evento.fecha_inicio) + join mes as mo on mo.id=month(evento.fecha_fin) + where evento.estado=1 + and evento.id = ? diff --git a/public/home/home/cssGrid.css b/public/home/home/cssGrid.css new file mode 100755 index 0000000..3a7498a --- /dev/null +++ b/public/home/home/cssGrid.css @@ -0,0 +1,112 @@ +/* general ---------------------------------*/ +section.content{ + width:100%; + background-color: white; + position:relative; +} +article.content{ + position: relative; + justify-content:center; + -webkit-justify-content:center; + max-width:1000px; + margin:auto; + z-index: 3; +} +[class*="box-"]{ + margin:10px; + box-shadow:1px 4px 8px 0px black; + transition: transform 0.3s; +} + +[class*="box-"]:hover,{ + -ms-transform: scale(2, 3); /* IE 9 */ + -webkit-transform: scale(2, 3); /* Safari */ + transform: scale(1.04, 1.04); +} +.box-1{ + height:180px; + min-width:44%; + flex:1 1 44%; +} +.box-2{ + height:180px; + min-width:48%; + flex:2 1 48%; +} +.box-4, +.group{ + height:400px; + min-width:300px; + flex:2 1 300px; +} +/* links ------------------------------------*/ + +article.link{ + height:180px; + min-width:44%; + flex:1 1 44%; + color:black; + align-content:center; + -webkit-align-content:center; + padding:10% 0px; +} +article.link > p{ font-size:1em;} +article.link > p.bold{ font-weight:bold;} +article.link > a { + list-style-type:none; + padding:5% 0px; + display: block; + text-align: center; + text-decoration: none; + margin: 10px 15px; + transition: transform 0.3s; +} + +article.link > a:hover{ + -ms-transform: scale(2, 3); /* IE 9 */ + -webkit-transform: scale(2, 3); /* Safari */ + transform: scale(1.1, 1.1); + cursor: pointer; +} +article.link > a > img{ + width:100%; + height:auto; +} + +/* facebook ---------------------------------*/ +article.fb{ background-color:#1d86d0; overflow: auto; padding-left: 5px; } +article.fb > p{ color:white; font-size:1.5em; } + +/* youtube ---------------------------------*/ +iframe#evideo{ + width:100%; + height:100%; +} +/* soundcloud-------------------------------*/ +iframe#scloud{ + width:100%; + height:100%; +} +/* pang ------------------------------------*/ +article.pang{ + background-image:url("img/pang.jpg"); + color:white; + align-content:center; text-align:center; + -webkit-align-content:center; text-align:center; + height:100%; padding:1px; +} +article.pang > p{ font-size:2em;} +article.pang > p.bold{ font-weight:bold;} + +/* Cal ------------------------------------*/ +article.cal{ + background-image:url("img/cal.jpg"); + color:white; + align-content:center; text-align:center; + -webkit-align-content:center; text-align:center; + height:100%; padding:1px; +} +article.cal > p{ font-size:1.9em;} +article.cal > p.bold{ font-weight:bold;} +/* a ---------------------------------------*/ + diff --git a/public/home/home/cssHead.css b/public/home/home/cssHead.css new file mode 100755 index 0000000..c607fdf --- /dev/null +++ b/public/home/home/cssHead.css @@ -0,0 +1,35 @@ +body{ + background-repeat: no-repeat; + background-attachment: fixed; + background-size:cover; + background-image:url("grulla_21.jpg"); + background-position: top; +} + +#ihead{ + width:100%; +height:100vh; +} + +#courtain{ + background-color:black; + background-size:cover; + width: 100vw; + position:fixed; + z-index:100; + top: -50vh; + } + +article.mod{ + position:fixed; + z-index:0; +} + +p.mod{ + color:black; + font-weight:bold; + font-size:1.3em; + max-width:500px; + padding:5% 5%; + text-align:left; + } diff --git a/public/home/home/cssOsc.css b/public/home/home/cssOsc.css new file mode 100755 index 0000000..676df70 --- /dev/null +++ b/public/home/home/cssOsc.css @@ -0,0 +1,17 @@ +#sadown{ +animation-name:pulsate; +animation-timing-function:linear; +animation-delay:5s; +animation-duration:2s; +animation-iteration-count:infinite; + +} + + @keyframes pulsate { +0%{margin-top:0px;} +25%{margin-top:5px;} +50%{margin-top:0px;} +75%{margin-top:-5px;} +100%{margin-top:0px;} +} + diff --git a/public/home/home/cssTrans.css b/public/home/home/cssTrans.css new file mode 100755 index 0000000..bb33f4f --- /dev/null +++ b/public/home/home/cssTrans.css @@ -0,0 +1,50 @@ +section.adown{ +position:absolute; +top: calc(100vh - 45px); +width:100%;} +article.adown{ + background-repeat: no-repeat; + background-size: contain; + background-position: center; + background-image:url("img/adown.svg"); + width: 35px; + height: 40px; + margin: auto; +} +section.trans{ +/* background-color: gray;*/ + width: 100%; + min-height: 40vh; + justify-content: center; + -webkit-justify-content: center; + position:relative; + padding: 40px 0px 10px 0px; + margin-bottom: -15vh; + z-index: 2; +} +article.vdg{ + background-repeat: no-repeat; + background-size: contain; + background-position: center; + background-image:url(logo/vdg.svg); + padding: 0px 20px; + margin: 10px 1% 10px 3%; + display: inline; + flex: 1; + max-width:25%; + position:relative; +} +article.trans{ + text-align: center; + flex:3; + max-width:50%; +} +article.trans > p.bold{ font-size: 2em } +article.trans > p.light{ font-size: 1em } +article.trans > p.superlight{ font-size: 0.5em } +section.gap{ + width:100%; + height: 15vh; + margin-bottom: 0px; + margin-top: auto; +} diff --git a/public/home/home/d3Tras.js b/public/home/home/d3Tras.js new file mode 100755 index 0000000..5ec29ef --- /dev/null +++ b/public/home/home/d3Tras.js @@ -0,0 +1,12 @@ + +var h = d3.select('section.trans').node().getBoundingClientRect().top; + +d3.select(window).on("scroll",function(){ + var t = d3.select('#trs').node().getBoundingClientRect().top; + var trans= 0.5 + Math.round(100*(h-t)/h)/100; + d3.select('#trs').style("background-color","rgba(229,229,229,"+ trans +")"); + + +}); + + diff --git a/public/home/home/grulla_1.jpg b/public/home/home/grulla_1.jpg new file mode 100755 index 0000000..741bcc8 Binary files /dev/null and b/public/home/home/grulla_1.jpg differ diff --git a/public/home/home/grulla_2.jpg b/public/home/home/grulla_2.jpg new file mode 100755 index 0000000..047cc69 Binary files /dev/null and b/public/home/home/grulla_2.jpg differ diff --git a/public/home/home/grulla_21.jpg b/public/home/home/grulla_21.jpg new file mode 100755 index 0000000..ec1c091 Binary files /dev/null and b/public/home/home/grulla_21.jpg differ diff --git a/public/home/home/img/adown.svg b/public/home/home/img/adown.svg new file mode 100755 index 0000000..7c78f7e --- /dev/null +++ b/public/home/home/img/adown.svg @@ -0,0 +1,62 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/public/home/home/img/cal.jpg b/public/home/home/img/cal.jpg new file mode 100755 index 0000000..d9a06d8 Binary files /dev/null and b/public/home/home/img/cal.jpg differ diff --git a/public/home/home/img/pang.jpg b/public/home/home/img/pang.jpg new file mode 100755 index 0000000..86e6b23 Binary files /dev/null and b/public/home/home/img/pang.jpg differ diff --git a/public/home/home/intro/cssAnimation.css b/public/home/home/intro/cssAnimation.css new file mode 100755 index 0000000..7c3830b --- /dev/null +++ b/public/home/home/intro/cssAnimation.css @@ -0,0 +1,55 @@ +/* +#ihead{ + animation-name: headIntro; + animation-fill-mode:backwards; + animation-timing-function:linear; + animation-delay:4s; + animation-duration: 3s; +} +@keyframes headIntro { + 0% { transform:scale(5,5); background-position: 30vw 30vh; } + 70% { transform:scale(3,3); background-position:top center; } + 100% { transform:scale(1,1); } + } +*/ + +#courtain{ + -webkit-animation: oopacity 2s ease-out 6s, clear 3s 6.5s; + -webkit-animation-fill-mode:both,both; +} + +/* +article.mod{ + animation-name:modIntro; + animation-timing-function:ease-in; + animation-delay:3s; + animation-duration:0.5s; + animation-fill-mode:backwards; +} +*/ +section#spacer{ +animation-name:nintro; +animation-timing-function:ease-in; +animation-delay:6s; +animation-duration:0s; +animation-fill-mode:backwards; + +} +section.anav{ +animation-name:nintro; +animation-timing-function:ease-in; +animation-delay:5s; +animation-duration:1s; +animation-fill-mode:backwards; +} + +@keyframes modIntro{ 0%{opacity:0;} 100%{opacity:1;} } +@keyframes oopacity { 0%{ opacity:1; } 100%{ opacity:0; } } +@keyframes clear{ 0%{ height:150vh; } 100%{ height:0px; } } +@keyframes nintro{ 0% { position:absolute; top:-200px; } 100% { top:0px;} } + +@-webkit-keyframes modIntro{ 0%{opacity:0;} 100%{opacity:1;} } +@-webkit-keyframes oopacity { 0%{ opacity:1; } 100%{ opacity:0; } } +@-webkit-keyframes clear{ 0%{ height:150vh; } 100%{ height:0px; } } +@-webkit-keyframes nintro{ 0% { position:absolute; top:-200px; } 100% { top:0px;} } + diff --git a/public/home/home/jsFb.js b/public/home/home/jsFb.js new file mode 100755 index 0000000..462d7ca --- /dev/null +++ b/public/home/home/jsFb.js @@ -0,0 +1,16 @@ +window.fbAsyncInit = function() { + FB.init({ + appId : '339e', + xfbml : true, + version : 'v2.8' + }); + FB.AppEvents.logPageView(); + }; + + (function(d, s, id){ + var js, fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) {return;} + js = d.createElement(s); js.id = id; + js.src = "//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.8"; + fjs.parentNode.insertBefore(js, fjs); + }(document, 'script', 'facebook-jssdk')); diff --git a/public/home/home/logo/fb.svg b/public/home/home/logo/fb.svg new file mode 100755 index 0000000..6d448e1 --- /dev/null +++ b/public/home/home/logo/fb.svg @@ -0,0 +1,62 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/public/home/home/logo/fb_1.svg b/public/home/home/logo/fb_1.svg new file mode 100755 index 0000000..6ddfe93 --- /dev/null +++ b/public/home/home/logo/fb_1.svg @@ -0,0 +1,118 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/home/home/logo/ins.svg b/public/home/home/logo/ins.svg new file mode 100755 index 0000000..0f1b06f --- /dev/null +++ b/public/home/home/logo/ins.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/public/home/home/logo/tw.svg b/public/home/home/logo/tw.svg new file mode 100755 index 0000000..4ffc68e --- /dev/null +++ b/public/home/home/logo/tw.svg @@ -0,0 +1,62 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/public/home/home/logo/tw_1.svg b/public/home/home/logo/tw_1.svg new file mode 100755 index 0000000..7d91506 --- /dev/null +++ b/public/home/home/logo/tw_1.svg @@ -0,0 +1,81 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/home/home/logo/vdg.svg b/public/home/home/logo/vdg.svg new file mode 100755 index 0000000..ce26b78 --- /dev/null +++ b/public/home/home/logo/vdg.svg @@ -0,0 +1,241 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + v + u + e + l + o + + d + e + + g + r + u + l + l + a + + + diff --git a/public/home/home/qUser.q b/public/home/home/qUser.q new file mode 100755 index 0000000..88f2293 --- /dev/null +++ b/public/home/home/qUser.q @@ -0,0 +1,13 @@ + + + /* c#host localhost*/ + /* c#database #dbdata */ + /* c#user #dbdata_user */ + /* c#password #dbdata_pass */ + + + +select + nombre as "tag", + contenido as "uContent" + from casa; diff --git a/public/home/pang/benjamin.md b/public/home/pang/benjamin.md new file mode 100755 index 0000000..66e875b --- /dev/null +++ b/public/home/pang/benjamin.md @@ -0,0 +1,5 @@ +Instructor certificado en China por el Beijing Wisdom Healing Center, con más de 5 años de experiencia en el desarrollo de esta herramienta. + +Benjamín ha vivido en carne propia los beneficios de esta ciencia al recuperarse totalmente de una enfermedad autoinmune, crónica, degenerativa e incurable. + +Cuenta con alumnos en 8 países y una comunidad de practicantes enfocados en practicar más y mejor los métodos y lineamientos del ZhiNengQiGong. diff --git a/public/home/pang/cssPang.css b/public/home/pang/cssPang.css new file mode 100755 index 0000000..2ac0bb6 --- /dev/null +++ b/public/home/pang/cssPang.css @@ -0,0 +1,70 @@ +body{ + background-repeat: no-repeat; + background-attachment: fixed; + background-size:cover; + background-image:url("grulla_21.jpg"); + background-position: right top; + +} +section.spacer{ height:85vh; } +section.header{ + background-color: rgba(51,51,51,0); + display: block; + padding: 45px 15px 0px; +} +h2.textHead{ + background-color: #c22a39; + color: white; + text-align: center; + font-weight: bold; + margin: auto; + font-size: 2em; + padding: 2.5vh; +} + +section.content{ + justify-content: center; + -webkit-justify-content: center; + background-color: rgba(51,51,51,0); + padding: 40px 0px 0px 0px; +} + +article.imageHead{ + min-width:270px; + background-repeat: no-repeat; + background-size:contain; + background-position:center; + flex:1 1 270px; + flex-shrink:1; + max-width:500px; + margin:20px; + min-height:300px +} +article#apang{ background-image:url("img/maestro.png");} +article#ahel{ background-image:url("img/helen.png");} +article#aben{ background-image:url("img/ben.png");} + +/* text column -------------------*/ +article.text{ + background-color: white; + overflow: auto; + min-width: 250px; + max-width:500px; + flex:3 2 250px; + flex-shrink:2; + margin:20px; + padding: 0px 30px; + height:70vh; +} + + +article.text > p{ + color: #3d3d3d; + /*font-family: 'Lato', sans-serif;*/ + font-size: 16px; + line-height: 1.8; + font-weight: 400; + text-align: justify; +} + + diff --git a/public/home/pang/d3Tras.js b/public/home/pang/d3Tras.js new file mode 100755 index 0000000..78cb101 --- /dev/null +++ b/public/home/pang/d3Tras.js @@ -0,0 +1,12 @@ + +var h = d3.select('section#trs').node().getBoundingClientRect().top; + +d3.select(window).on("scroll",function(){ + var t = d3.select('#trs').node().getBoundingClientRect().top; + var trans= Math.min(Math.round(100*(h-t)/h)/100,0.98); + d3.selectAll('.trans').style("background-color","rgba(51,51,51,"+ trans +")"); + + +}); + + diff --git a/public/home/pang/grulla_21.jpg b/public/home/pang/grulla_21.jpg new file mode 100755 index 0000000..ec1c091 Binary files /dev/null and b/public/home/pang/grulla_21.jpg differ diff --git a/public/home/pang/helen.md b/public/home/pang/helen.md new file mode 100755 index 0000000..8fbf320 --- /dev/null +++ b/public/home/pang/helen.md @@ -0,0 +1,5 @@ +Los maestros _Zhang Qing_ (Helen) y  _Qiu Fu Chun_ (Karl). Un ejemplo de congruencia. Personas sencillas, honestas, un verdadero ejemplo de mantenerse en un perfil modesto. Siempre desarrollando GongFu, Gracias a su calidad humana y su bello trabajo, en Vuelo de Grulla, podemos tener los mejores cimientos para ser practicantes que viven los beneficios de ZhiNeng QiGong. + +Beijing Wisdom Healing Center se encuentra ubicado en Shichahai en el centro de Beijing, China. + +[zhinengqigong.com](http://www.zhinengqigong.com) diff --git a/public/home/pang/htmlPang.html b/public/home/pang/htmlPang.html new file mode 100755 index 0000000..1a2d455 --- /dev/null +++ b/public/home/pang/htmlPang.html @@ -0,0 +1,31 @@ +
                + +
                +

                Nuestro querido maestro Pang He Ming

                +
                +
                +
                +
                + +
                +
                + +
                +

                Los maestros Zhang Qing (Helen) y  Qiu Fu Chun (Karl).

                +
                +
                +
                +
                + +
                +
                + +
                +

                Instructor Benjamín Munñóz

                +
                +
                +
                +
                + +
                +
                diff --git a/public/home/pang/img/ben.png b/public/home/pang/img/ben.png new file mode 100755 index 0000000..61d3159 Binary files /dev/null and b/public/home/pang/img/ben.png differ diff --git a/public/home/pang/img/helen.png b/public/home/pang/img/helen.png new file mode 100755 index 0000000..4736536 Binary files /dev/null and b/public/home/pang/img/helen.png differ diff --git a/public/home/pang/img/maestro.png b/public/home/pang/img/maestro.png new file mode 100755 index 0000000..67286c7 Binary files /dev/null and b/public/home/pang/img/maestro.png differ diff --git a/public/home/pang/pang.md b/public/home/pang/pang.md new file mode 100755 index 0000000..7f28170 --- /dev/null +++ b/public/home/pang/pang.md @@ -0,0 +1,21 @@ +No existen palabras para describir la generosidad de este gran hombre por el cual sentimos un enorme respeto y admiración. + +Gracias a su trabajo muchas personas hemos podido recuperar nuestra salud y acercarnos poco a poco a los sueños más hermosos de nuestra vida. + +Queremos compartir aquí algunos de sus logros y hacer un homenaje a la raíz del ZhiNengQiGong al que muchos debemos tanto. + +Pang He Ming (庞鹤鸣), también conocido como Pang Ming (庞明), es el creador de la ciencia de ZhiNeng QiGong y el fundador del Centro HuaXia ZhiNeng QiGong. Pang (庞) significa “de tamaño muy grande” o “enorme”. He (鹤) significa “grulla” y Ming (鸣) significa el sonido que hace una grulla al volar. Recibió este nombre de su abuela cuando nació. + +El nombre, Pang Ming, se lo dio a sí mismo cuando alcanzó el éxito en su práctica de QiGong. Aquí, Ming (明) significa “mucha claridad”. + +Pang He Ming nació el 26 de septiembre de 1940 en el condado DingXing de la provincia He Bei en China. En su infancia, recibió la influencia del QiGong tradicional, las artes marciales y la medicina china tradicional, se nutrió de estos en su ciudad natal y recibió mucha información por parte de practicantes de alto nivel. + +En 1958 se graduó en Medicina Occidental de la Universidad Médica de Beijing y trabajó como médico en Beijing. Después de eso, comenzó a aprender artes marciales y QiGong con 19 maestros de manera regular. Al mismo tiempo, aprendió medicina china y se convirtió en un médico de grandes logros. + +Antes de cumplir los 40 años, fue distinguido como el representante más joven de las 63 personas que asistieron a la primera Convención Nacional de Medicina China y Occidental en Beijing. + +En 1979, el profesor Pang formó en Beijing la Sociedad de Investigación de QiGong de Beijing con algunos practicantes e investigadores de QiGong. En la primavera de 1981, anunció formalmente el ZhiNeng QiGong al público. Desde entonces, ha estado enseñando ZhiNeng QiGong en toda China, y sus enseñanzas se extienden a todo el mundo. + +En 1988, fundó la Universidad de ZhiNeng QiGong de HeBei en Shi Jia Zhuang, que posteriormente se trasladó a Qin Huang Dao y cambió su nombre a Centro HuaXia de Investigación y Entrenamiento en ZhiNeng QiGong. Conforme la población estudiantil creció, el profesor Pang fundó el Centro HuaXia de Recuperación de ZhiNeng QiGong en Tang Shan. + +El profesor Pang es el primer erudito que elevó el QiGong tradicional al nivel de ciencia de QiGong. diff --git a/public/home/podcast/cssPodcast.css b/public/home/podcast/cssPodcast.css new file mode 100755 index 0000000..eabb42b --- /dev/null +++ b/public/home/podcast/cssPodcast.css @@ -0,0 +1,64 @@ + +section.title{ +background: #C22A39; +min-height: 45vh; +padding-top:60px; +} +p.title{ + font-size: 4em; + width: 100%; + text-align: center; + color: white; + margin: auto; + padding-top: 10vh; + padding-bottom:30px; +} +section.frame{ +width: 100%; +background-color: #333333; +padding: 50px 0px; +text-align: center; +} +article.sframe{ + width:100%; +} +p.subtitle { +font-size: 1em; +color: white; +max-width: 600px; +text-align: justify; +margin: auto 15px; +} + +#audioframe { + min-width: 300px; + width:50%; + height: 100%; + min-height: 200px; + margin: 50px auto; +} + +section.pcontent{ +justify-content: center; +-webkit-justify-content: center; +} +article.pcontent{ + min-width: 34%; + padding: 20px 30px; + } + +p.ctitle{ + font-size:1em; + text-align:center; + color:#D00000; + cursor:pointer; +} + +p.ccontent{ + text-align:center; + font-size:0.9em; + text-align:justify; + color:black; + max-width:400px; +} + diff --git a/public/home/podcast/grulla.jpg b/public/home/podcast/grulla.jpg new file mode 100755 index 0000000..3a1c391 Binary files /dev/null and b/public/home/podcast/grulla.jpg differ diff --git a/public/home/podcast/jsPodcast.js b/public/home/podcast/jsPodcast.js new file mode 100755 index 0000000..06f66c2 --- /dev/null +++ b/public/home/podcast/jsPodcast.js @@ -0,0 +1,18 @@ +var sources; +d3.json( "home/podcast/jsonPod.json",function(d){ + d3.select("#audioframe").attr("src",d[0].source); + sources=d; +}); +d3.selectAll("p.ctitle").on('click', function(){ + var this_id=d3.select(this).attr("value"); + sources.forEach(function (d){ + if(d.id == this_id){ + d3.select("#audioframe").attr("src",d.source); + window.scroll(0, + d3.select("#sframe").node().getBoundingClientRect().top - + d3.select("#stitle").node().getBoundingClientRect().top + ); + } + }); + }); + diff --git a/public/home/podcast/jsonPod.json b/public/home/podcast/jsonPod.json new file mode 100755 index 0000000..3bb986e --- /dev/null +++ b/public/home/podcast/jsonPod.json @@ -0,0 +1,100 @@ +[ + { + "tag":"podcast", + "id":"1", + "ptitle":"1. ZuChangFa - Las 8 frases explicadas", + "ptext":"Método de ZhiNeng QiGong para la Orgnanización del Campo", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/221858279&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"2", + "ptitle":"2. Dian Tian Li Di - Las 8 frases con música", + "ptext":"Método de ZhiNeng QiGong para la Organización del Campo, música con letra original compuesta por el maestro Pang He Ming.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/224314693&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"3", + "ptitle":"3. Din Tian Li Di - Grabación original del centro Huaxia (Chino)", + "ptext":"Método de ZhiNeng QiGong para la Organización del Campo. Con música y letra original compuesta por el maestro Pang He Ming, grabación original del Centro Huaxia (hospital más grande del mundo sin medicamentos).", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/224980950&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"4", + "ptitle":"4. La Teoría del HunYuan - ZhiNeng QiGong", + "ptext":"Este Podcast que contiene una mirada de los fundamentos teóricos de ZhiNeng QiGong. Con base en esta teoría, buscamos profundizar posteriormente en algunos conceptos muy importantes.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/226460492&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"5", + "ptitle":"5. Yi Yuan Ti - ZhiNeng QiGong", + "ptext":"Analizamos el recurso más importante que tiene el ser humano para transformarse a sí mismo: su propia mente.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/227191181&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"6", + "ptitle":"6. Explicación de HunHua - ZhiNeng QiGong", + "ptext":"En esta sexta entrega hablamos sobre el fenómeno de HunHua, como parte fundamental de la teoría de ZhiNeng QiGong.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/228450367&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"7", + "ptitle":"7. HunYuan LingTong - ZhiNeng QiGong", + "ptext":"La explicación de un concepto central de ZhiNeng QiGong, lleno de sabiduría y compromiso con nosotros mismos, con HunYuan LingTong TODO es posible.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/230195055&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"8", + "ptitle":"8. De Gao Qi Chun ( El cambio verdadero) - ZhiNeng QiGong", + "ptext":"De Gao Qi Chun, un concepto muy profundo que nos lleva al cambio verdadero. Alcanzar la más alta moral es llegar a un nivel congruencia y de respeto...", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/231667352&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"9", + "ptitle":"9. Mantener la mente simple", + "ptext":"Algunas recomendaciones para ayudarnos a mantener la mente simple.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/233739996&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"10", + "ptitle":"10. Amor al paso y al cambio.", + "ptext":"Estudiamos la necesidad de amar cada paso que damos para acercarnos a cumplir nuestros más bellos sueños y exploramos la importancia de aprender de los cambios que ocurren en nuestro camino.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/239091582&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"11", + "ptitle":"11. Cómo mejorar nuestra concentración - YiShou, DingLi", + "ptext":"¿Cómo puedo concentrarme mejor? En esta entrega de Podcast, abordamos dos conceptos que nos ayudan a mejorar nuestro enfoque y nuestra capacidad de concentración.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/244060912&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"12", + "ptitle":"12. Admira el GongFu", + "ptext":"De los campeones debemos admirar el gran esfuerzo que han realizado para lograr sus objetivos. Porque triunfan sólo cuando se convierten en la mejor versión de sí mismos, cuando recorren miles de veces el camino que los lleva a lograr lo que en verdad quieren.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/246592916&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"13", + "ptitle":"13. La voluntad", + "ptext":"Cuando analizamos qué tan lejos estamos de donde queremos llegar, nos damos cuenta de que es muy importante desarrollar una fuerza de voluntad indomable para lograr nuestros más bellos sueños...", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/250019055&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + }, + { + "tag":"podcast", + "id":"14", + "ptitle":"14. El Aprendiz de Mago (Oropel)", + "ptext":"En esta 14a entrega del Podcast de ZhiNeng QiGong, contamos una historia diseñada por nuestro amigo Fernando Filippis, un instructor argentino que ha creado un relato muy bello con un mensaje increíble.", + "source":"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/263699943&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" + } +] diff --git a/public/home/podcast/text.txt b/public/home/podcast/text.txt new file mode 100755 index 0000000..8fb2ee6 --- /dev/null +++ b/public/home/podcast/text.txt @@ -0,0 +1 @@ +Hemos desarrollado con mucho cariño ejercicios gratuitos y descargables que pueden ser practicados por cualquier persona aún antes de asistir a uno de los cursos de instrucción. diff --git a/public/home/radio/cssRadio.css b/public/home/radio/cssRadio.css new file mode 100755 index 0000000..1e9191b --- /dev/null +++ b/public/home/radio/cssRadio.css @@ -0,0 +1,132 @@ +section.title{ + background-color: #C22A39; + height:35vh; + min-height:360px; + padding-top:60px; + justify-content:center; + -webkit-justify-content:center; +} + +article.title p{ + font-size: 4em; + width: 100%; + text-align: center; + color: white; + margin: auto; + padding-top: 35px; +} +section.uname{ + background-color: #C22A39; +} +article.uname> p{ + font-size: 2em; + width: 100%; + text-align: center; + color: white; + margin: auto auto 20px 10px; +} + +section.rmod{ + width:100%; + background-color: #C22A39; + padding 10px; +} +article.rmod{ + flex:1 1 250px; + margin:30px; +} +p#rmod{ + font-size: 1em; + color: white; + text-align: left; + margin:10px 40px 50px; + max-width:440px; +} +section.logout{ + width:100%; + background-color: #C22A39; +} +article.logout{ + flex:1 1 100px; + margin:2px; +} +p#logout{ + font-size: 1em; + color: white; + text-align: right; + margin:-10px 50px 10px; +} +section.info, +section.radio, +section.chat{ + width:100%; + background-color: #333333; + padding 10px; + justify-content:center; + -webkit-justify-content:center; +} + +section.info{ +padding:50px 20px; +} +article.online, +article.offline +{ + flex:5 1 300px; + font-size: 1.5em; + color: white; + max-width:340px; +} +article.spot{ + text-align:center; + font-size: 1em; + color: white; + max-width:300px; + flex:1 1 280px; +} +div.spot{ + display:inline-block; + background-color:red; + padding:15px; + border-radius:15px; +} +div.chat{ + background-color: #C22A39; + padding:20px 0px; + margin:15px 0px; + border-radius:5px; + min-width:200px; +} +div.chat:hover{ + font-size:1.2em; + padding:22px 3px; + margin:13px -3px; + cursor:pointer; + +} + +article.radio{ + margin:30px; + background-color:black; + width:80vw; +} +p#now{ + color:white; + text-align:center; + +} +#ra{ + width:100%; + margin:10px 0px; +} + +article.online{ +} +article.offline{ +} +.show{ + display:block; +} +.hide{ + display:none; +} diff --git a/public/home/radio/jsLink.js b/public/home/radio/jsLink.js new file mode 100755 index 0000000..c3b4a22 --- /dev/null +++ b/public/home/radio/jsLink.js @@ -0,0 +1,20 @@ + +d3.select("#clink").on("click",function(){ + var newWindow = window.open('ext/candy','_blank'); +}); + +checkChat(); + +function checkChat(){ + d3.json("json/candy/candy_loader/candyInterface.pl&v=isOn",function(d){ + if(d != undefined){ + if (d.a==1) { d3.select("#clink").style("visibility","visible");} + else if (d.a==0) { d3.select("#clink").style("visibility","hidden");} + } + else { + d3.select("#clink").style("visibility","hidden"); + console.error("json/candy/candy_loader/candyInterface.pl&v=isOn");} + d3.select("#clink").transition().on("end",checkChat).delay(30000); + }); +} + diff --git a/public/home/radio/jsRadio.js b/public/home/radio/jsRadio.js new file mode 100755 index 0000000..06f3cbf --- /dev/null +++ b/public/home/radio/jsRadio.js @@ -0,0 +1,89 @@ +var vid = document.getElementById("ra"); +//defined by html template +// var radio_server=rs; +// var listen_url=lis; +// var channel=chan; +vid.autoplay=true; +window.onload = function(){ + radioUpdate(); + + function radioUpdate(){ + d3.json(radio_server +"/status-json.xsl") + .timeout(10000) + .get(function(e,d){ + if(e !=undefined){ + console.warn("sin conxion"); + offline();} + else{ + if(d.icestats.source!=undefined){ + if(d.icestats.source.listenurl == listen_url){ + console.log("transmitiendo"); + online(d); } + else { + console.warn("otro canal"); + offline(); }} + else { + console.warn("fuera de línea"); + offline(); + } + } }); }; + + + function dataUpdate(){ + d3.json(radio_server+"/status-json.xsl") + .timeout(10000) + .get(function(e,d){ + if(e !=undefined){ console.warn("sin datos radio"); } + else{ + if(d.icestats.source!=undefined){ + if(d.icestats.source.listenurl == listen_url ){ + d3.select("#now").text(d.icestats.source.title); + }}} + + d3.select("#ra").transition().on("end",dataUpdate).delay(60000); +}); +}; + + + function offline(){ + d3.selectAll("article.offline").style("display","block"); + d3.selectAll("article.online").style("display","none"); + d3.select("#spot").style("background-color","red"); + d3.select("#now").text(""); + console.log("desconectado"); + d3.select("#ra").transition().on("end",radioUpdate).delay(90000); + }; + + function online(d){ + d3.select("#spot").style("background-color","green"); + d3.select("#prof").text(d.icestats.source.server_name); + d3.select("#now").text(d.icestats.source.title); + d3.selectAll("article.online").style("display","block"); + d3.selectAll("article.offline").style("display","none"); + vid.src=radio_server+channel; + vid.load(); + console.log("conectado"); + dataUpdate(); +} + + function cerr(e){ console.warn("stream "+ e); + vid.pause(); + d3.select("#ra").transition() + .on("end",function(){ vid.play(); }) + .delay(1000); + }; + + function err(e){ + console.warn("stream "+e); + d3.select("#ra").transition().on("end",radioUpdate).delay(5000); + } + + // if error try reloading + + vid.onerror=function(e){ err("error")}; + vid.onended=function(){ err("end")}; + //vid.onstalled=function(){ cerr("st")}; + vid.onemptied=function(){ cerr("empty")}; + //vid.onsuspend=function(){ cerr("sus")}; + vid.onabort=function(){ err("abort")}; +} diff --git a/public/home/store/cssShop.css b/public/home/store/cssShop.css new file mode 100755 index 0000000..bb91fd8 --- /dev/null +++ b/public/home/store/cssShop.css @@ -0,0 +1,52 @@ +article.heading{ + width:100%; + height:55vh; + min-height:350px; + display: inline-block; + background-color: #333333; + text-align: center; + margin-top: 50px; + + +} +p.heading{ + font-size:5em; + color:white; + color: white; + margin: 20vh auto auto auto; +} +article.shop{ + justify-content:center; + -webkit-justify-content:center; + margin-top: 40px; +} +div.simage{ + flex:3; + max-width:350px; + transition: .5s ease; +} +div.simage:hover{ + transform:scale(1.2,1.2); +} +div.simage > img{ + max-width:70%; + max-height:100%; + margin:auto; + display:block; +} +div.description{ + flex:2; + max-width:250px; +} +p.description{ font-size:0.8em; } +p.title{font-weight:bold;} +p.promo{font-weight:bold; color:#C22A39;} +article.separator{ + background-repeat: no-repeat; + background-image: url(" #path img/separa.jpg"); + height: 20px; + background-size: contain; + background-position: center; + margin-top:30px; +} + diff --git a/public/home/store/img/libreta.jpg b/public/home/store/img/libreta.jpg new file mode 100755 index 0000000..a49ec19 Binary files /dev/null and b/public/home/store/img/libreta.jpg differ diff --git a/public/home/store/img/libro.jpg b/public/home/store/img/libro.jpg new file mode 100755 index 0000000..bdfb4d7 Binary files /dev/null and b/public/home/store/img/libro.jpg differ diff --git a/public/home/store/img/mapa.jpg b/public/home/store/img/mapa.jpg new file mode 100755 index 0000000..d6271fc Binary files /dev/null and b/public/home/store/img/mapa.jpg differ diff --git a/public/home/store/img/momo.jpg b/public/home/store/img/momo.jpg new file mode 100755 index 0000000..898ee76 Binary files /dev/null and b/public/home/store/img/momo.jpg differ diff --git a/public/home/store/img/playera.jpg b/public/home/store/img/playera.jpg new file mode 100755 index 0000000..3954ff3 Binary files /dev/null and b/public/home/store/img/playera.jpg differ diff --git a/public/home/store/img/separa.jpg b/public/home/store/img/separa.jpg new file mode 100755 index 0000000..b175eb9 Binary files /dev/null and b/public/home/store/img/separa.jpg differ diff --git a/public/home/store/qStore.q b/public/home/store/qStore.q new file mode 100755 index 0000000..1049aeb --- /dev/null +++ b/public/home/store/qStore.q @@ -0,0 +1,10 @@ +select + nombre as "titulo", + descripcion as "descripcion", + precio as "precio", + opcion as "opciones", + promocion as "promocion", + imagen as "imagen" + +from tienda where precio >= -1; + diff --git a/public/home/tst/tst.css b/public/home/tst/tst.css new file mode 100644 index 0000000..e69de29 diff --git a/public/home/tv/cssHead.css b/public/home/tv/cssHead.css new file mode 100755 index 0000000..37d509a --- /dev/null +++ b/public/home/tv/cssHead.css @@ -0,0 +1,31 @@ +body{ + background-repeat: no-repeat; + background-attachment: fixed; + background-position:right top; + background-size:cover; + background-image:url("grulla_31.jpg"); +} + +#ihead{ + width:100%; + height:100vh; +} + +#courtain{ background-color:black; background-size:cover; } + +article.mod{ + position:fixed; + right:10px; + z-index:0; + max-width:500px; + padding:5px 5%; + min-width:250px; +} + + +p.mod{ + color:black; + font-weight:bold; + font-size:1.5em; + background-color:rgba(145,145,145,0.2); + } diff --git a/public/home/tv/cssTv.css b/public/home/tv/cssTv.css new file mode 100755 index 0000000..e695eb9 --- /dev/null +++ b/public/home/tv/cssTv.css @@ -0,0 +1,100 @@ +section.grid{ + background-color: black; + position:relative; + margin: 0px; + padding-top:100px; + font-family: trade-gothic,sans-serif; +} +section.yt{ + width:80%; + max-height:600px; + height:80vw; + background-color:black; + margin: 20px auto; + padding: 5px 20px; +} +iframe#evideo{ + width:100%; + height:100%; +} +section.col{ + margin: 50px auto 0px; + align-items:flex-start; + -webkit-align-items:flex-start; + justify-content:space-around; + -webkit-justify-content:space-around; + background-color:#333333; + +} + +article.facefeed{ + flex:1 3 300px; + min-width:300px; + max-width:700px; + background-color: #8d8d8e; + text-align:center; + padding:5px; +} +@media(min-width:400px){ +iframe.facefeed{ + width:400px; + height:600px; /* same as url height */ +}} +@media(max-width:400px){ +iframe.facefeed{ + width:280px; + height:450px; /* same as url height */ + overflow:auto; +}} + +iframe.facefeed{ + vertical-align: top; + border:none; + overflow:hidden; +} + +article.series{ + flex:1 1 180px; + min-width:180px; + margin:20px 10px; + color:white; + text-align:center; +} +article.series >ul{ + list-style: none; +} +li.series{ + margin:5px; + font-size:1.5em; + margin:15px 10px; + color:white; + background-color:#C22A39; + background-color: #C22A39; + border-radius: 8px; +} + +li.series{ cursor:pointer; } + +article.chap{ + flex:2 1 300px; + min-width:300px; + margin:20px 10px; + color:white; + text-align:left; +} +article.chap > ul{ + list-style: none; + transition: 0.5s; +} +li.chap{ + margin:5px; + font-size:1.2em; + margin:15px 10px; + color:white; + display:none; +} +li.chap:hover{ + cursor:pointer; + transform:scale(1.1,1.1); +} + diff --git a/public/home/tv/d3Tune.js b/public/home/tv/d3Tune.js new file mode 100755 index 0000000..422bac2 --- /dev/null +++ b/public/home/tv/d3Tune.js @@ -0,0 +1,14 @@ +var def = d3.select("li.series").attr("value") +d3.selectAll("li."+def).style("display","block"); + +d3.selectAll("li.chap").on("click",function(){ + var link = d3.select(this).attr("value"); + d3.select("#evideo").attr("src","https://www.youtube.com/embed/"+link); +}); + +d3.selectAll("li.series").on("click",function(){ + var group = d3.select(this).attr("value"); + d3.selectAll("li.chap").style("display","none"); + d3.selectAll("li."+group).style("display","block"); +}); + diff --git a/public/home/tv/grulla_31.jpg b/public/home/tv/grulla_31.jpg new file mode 100755 index 0000000..08562ef Binary files /dev/null and b/public/home/tv/grulla_31.jpg differ diff --git a/public/home/tv/qSeries.q b/public/home/tv/qSeries.q new file mode 100755 index 0000000..0543423 --- /dev/null +++ b/public/home/tv/qSeries.q @@ -0,0 +1,6 @@ + + select distinct + replace(grupo,' ','_' ) as "group", + grupo as "name" + from tv where permiso = 1 + order by orden; diff --git a/public/home/tv/qTable.q b/public/home/tv/qTable.q new file mode 100755 index 0000000..5987970 --- /dev/null +++ b/public/home/tv/qTable.q @@ -0,0 +1,17 @@ + + /* c#host localhost*/ + /* c#database #dbdata */ + /* c#user #dbdata_user */ + /* c#password #dbdata_pass */ + + + +select + "table" as "tag", + nombre as "name", + vinculo as "link", + orden as "order", + replace(grupo,' ','_' ) as "group" +from tv where permiso = 1 +order by orden; + diff --git a/public/home/tv/trans/cssTrans.css b/public/home/tv/trans/cssTrans.css new file mode 100755 index 0000000..9326c73 --- /dev/null +++ b/public/home/tv/trans/cssTrans.css @@ -0,0 +1,31 @@ +section.trans{ + background-color: gray; + width: 100%; + justify-content: center; + -webkit-justify-content: center; + position:relative; + padding: 0px 0px 10px 0px; + margin-bottom:0px; + z-index: 2; +} +article.vdg{ + background-repeat: no-repeat; + background-size: contain; + background-position: center; + background-image:url(vdg.svg); + padding: 0px 20px; + margin: 10px 1% 10px 3%; + display: inline; + flex: 1; + max-width:25%; + min-height:150px; + position:relative; +} +article.trans{ + text-align: center; + flex:3; + max-width:50%; +} +article.trans > p.bold{ font-size: 2em } +article.trans > p.light{ font-size: 1em } +article.trans > p.superlight{ font-size: 0.5em } diff --git a/public/home/tv/trans/d3Tras.js b/public/home/tv/trans/d3Tras.js new file mode 100755 index 0000000..ba84a4a --- /dev/null +++ b/public/home/tv/trans/d3Tras.js @@ -0,0 +1,11 @@ + +var h=window.innerHeight; +d3.select(window).on("scroll",function(){ + var t = d3.select('#trs').node().getBoundingClientRect().top; + var trans= -0.2 + Math.round(100*(h-t)/h)/100; + d3.select('.grid').style("background-color","rgba(0,0,0,"+ trans +")"); + + +}); + + diff --git a/public/home/tv/trans/vdg.svg b/public/home/tv/trans/vdg.svg new file mode 100755 index 0000000..ce26b78 --- /dev/null +++ b/public/home/tv/trans/vdg.svg @@ -0,0 +1,241 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + v + u + e + l + o + + d + e + + g + r + u + l + l + a + + + diff --git a/public/users/login/cssForm.css b/public/users/login/cssForm.css new file mode 100755 index 0000000..6f68dcd --- /dev/null +++ b/public/users/login/cssForm.css @@ -0,0 +1,49 @@ +section.hero{ + height:100vh; + background-repeat: no-repeat; + background-attachment: fixed; + background-size:cover; + background-image:url("puerta.jpg"); + background-position: center center; + +} +article.login{ + background: rgba(33, 33, 33, 0.8); + color:white; + margin: auto 0px auto auto; + padding: 1px 0px; + text-align: center; + min-width: 300px; + width: 36%; + min-height: 100vh; +} + +article.login p{ +margin: 20vh auto 20px; +font-size: 2em; +} + +article.login form{ + font-size:1.2em; + width:80%; + margin:auto; +} + +label{ + display:block; + margin:10px 5px 15px 10px; +} + +form.login > input{ +} + +form.login > input#submit { + display:block; + margin:30px auto; + width:200px; + height:60px; +} + +form.login > .pass{ +display:none; +} diff --git a/public/users/login/puerta.jpg b/public/users/login/puerta.jpg new file mode 100755 index 0000000..2560d6a Binary files /dev/null and b/public/users/login/puerta.jpg differ diff --git a/readme b/readme new file mode 100644 index 0000000..056d715 --- /dev/null +++ b/readme @@ -0,0 +1,4 @@ +Text::Markdown + +djavu sans mono book 10 + diff --git a/script/dojo b/script/dojo new file mode 100755 index 0000000..6febe6b --- /dev/null +++ b/script/dojo @@ -0,0 +1,11 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use FindBin; +BEGIN { unshift @INC, "$FindBin::Bin/../lib" } +use Mojolicious::Commands; + +# Start command line interface for application +Mojolicious::Commands->start_app('Dojo'); diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..3ebe43f --- /dev/null +++ b/t/basic.t @@ -0,0 +1,9 @@ +use Mojo::Base -strict; + +use Test::More; +use Test::Mojo; + +my $t = Test::Mojo->new('Dojo'); +$t->get_ok('/')->status_is(200)->content_like(qr/Mojolicious/i); + +done_testing(); diff --git a/t/mil.sh b/t/mil.sh new file mode 100755 index 0000000..de268f5 --- /dev/null +++ b/t/mil.sh @@ -0,0 +1 @@ +for i in {1..1000}; do wget -q -O /dev/null localhost:3000/pang; done diff --git a/templates/home/cal.html.ep b/templates/home/cal.html.ep new file mode 100755 index 0000000..35e61ff --- /dev/null +++ b/templates/home/cal.html.ep @@ -0,0 +1,36 @@ +

                Próximos eventos

                + +
                + + % foreach (@$b) { +
                + +

                + <%= $_->{text} %> +

                +
                +
                + % foreach my $d( @{ $r->{$_->{id}} } ) { + + +
                +
                +

                <%= $d->{ciudad} %>

                +

                <%= $d->{fecha} %>

                +

                <%= $d->{lugar} %>

                +

                <%= $d->{dir} %>

                +

                <%= $d->{nombre} %>

                +
                +
                + +
                ...
                +
                + +
                +
                + %} + + %} +
                + + diff --git a/templates/home/candy.html.ep b/templates/home/candy.html.ep new file mode 100755 index 0000000..9c329c4 --- /dev/null +++ b/templates/home/candy.html.ep @@ -0,0 +1,15 @@ + + +<%= javascript "/ext/libs.min.js"; %> +<%= javascript "/ext/candy.min.js"; %> +<%= stylesheet "/ext/lib.min.css"; %> + +
                +
                +
                + diff --git a/templates/home/contact.html.ep b/templates/home/contact.html.ep new file mode 100755 index 0000000..8abcc7a --- /dev/null +++ b/templates/home/contact.html.ep @@ -0,0 +1,28 @@ +
                + +
                +
                +

                Escríbenos

                +
                +

                VUELO DE GRULLA

                +
                +
                + + + +
                +
                +
                + + + + + + + + +
                +
                +
                +
                + diff --git a/templates/home/contact2.html.ep b/templates/home/contact2.html.ep new file mode 100644 index 0000000..5da81f2 --- /dev/null +++ b/templates/home/contact2.html.ep @@ -0,0 +1,15 @@ +
                + +
                +
                +

                <%= $mname %>

                +
                +

                Gracias por tu comentario

                +
                +
                + +
                +

                Nos comunicaremos pronto

                +
                + +
                diff --git a/templates/home/event.html.ep b/templates/home/event.html.ep new file mode 100755 index 0000000..bf7d483 --- /dev/null +++ b/templates/home/event.html.ep @@ -0,0 +1,39 @@ +
                +
                +
                +
                +

                <%= $cname %>

                +

                <%= $place %>

                +
                +
                +
                +

                <%= $pname %>

                +

                <%= $date %>

                +

                <%= $paddr %>

                +

                <%= $pobs %>

                +

                <%= $city %>

                +

                <%= $cost %>

                +

                <%= $promo %>

                +
                +
                +

                Temario

                + <%== $csubjects %> +

                El evento incluye

                + <%== $cservices %> +
                +
                +
                +

                Cómo llegar

                + % my $s=$pname.$paddr.$city; + % $s=~s/\#/No /; +
                +
                +
                +
                +
                +
                + +
                + +
                diff --git a/templates/home/home.html.ep b/templates/home/home.html.ep new file mode 100755 index 0000000..97fa342 --- /dev/null +++ b/templates/home/home.html.ep @@ -0,0 +1,52 @@ +
                +
                +
                +

                <%= $mod %>

                +
                +
                + +
                +
                +
                +
                +

                Explora y Encuentra

                +

                Aquello que buscas

                +

                +++

                +
                +
                +
                +
                + +
                diff --git a/templates/home/htmlChaos.html.ep b/templates/home/htmlChaos.html.ep new file mode 100755 index 0000000..391cc6b --- /dev/null +++ b/templates/home/htmlChaos.html.ep @@ -0,0 +1,5 @@ +
                + +

                Chaos.foundation

                +
                + diff --git a/templates/home/htmlNav.html.ep b/templates/home/htmlNav.html.ep new file mode 100644 index 0000000..f0730cc --- /dev/null +++ b/templates/home/htmlNav.html.ep @@ -0,0 +1,35 @@ + + + diff --git a/templates/home/htmlSide.html.ep b/templates/home/htmlSide.html.ep new file mode 100644 index 0000000..0a83066 --- /dev/null +++ b/templates/home/htmlSide.html.ep @@ -0,0 +1,14 @@ + +
                + +
                + diff --git a/templates/home/pang.html.ep b/templates/home/pang.html.ep new file mode 100644 index 0000000..1c505a4 --- /dev/null +++ b/templates/home/pang.html.ep @@ -0,0 +1,31 @@ +
                + +
                +

                Nuestro querido maestro Pang He Ming

                +
                +
                +
                +
                + <%== $pang %> +
                +
                + +
                +

                Los maestros Zhang Qing (Helen) y  Qiu Fu Chun (Karl).

                +
                +
                +
                +
                + <%== $helen %> +
                +
                + +
                +

                Instructor Benjamín Muñóz

                +
                +
                +
                +
                + <%== $benjamin %> +
                +
                diff --git a/templates/home/podcast.html.ep b/templates/home/podcast.html.ep new file mode 100755 index 0000000..92bbbd7 --- /dev/null +++ b/templates/home/podcast.html.ep @@ -0,0 +1,20 @@ +
                +

                Podcast de ZhiNeng QiGong

                +
                + +
                +

                <%= $t %>

                + +
                + +
                + + % for my $p(@$pod){ +
                +

                + <%= $p->{ptitle} %>

                +

                <%= $p->{ptext} %>

                +
                + % } + +
                diff --git a/templates/home/radio.html.ep b/templates/home/radio.html.ep new file mode 100755 index 0000000..e5ad82f --- /dev/null +++ b/templates/home/radio.html.ep @@ -0,0 +1,43 @@ +
                +

                Radio Vuelo de grulla

                +
                + +
                +

                <%= $nick %>

                +
                + +
                +

                <%= $rmod %>

                +
                + +
                + +
                +
                +

                Estás escuchando a

                +

                +
                +
                +

                Todavía no comenzamos

                +

                Por favor espera unos minutos

                +
                +
                +
                + +
                +
                + +
                +

                + +
                + +
                +
                + diff --git a/templates/home/store.html.ep b/templates/home/store.html.ep new file mode 100755 index 0000000..888c5eb --- /dev/null +++ b/templates/home/store.html.ep @@ -0,0 +1,17 @@ +
                +

                TIENDA VIRTUAL

                + % for my $d (@$r){ +
                +
                {imagen} "%> >
                +
                +

                <%= $d->{titulo} %>

                +

                <%= $d->{descripcion} %>

                +

                $<%= $d->{precio} %> pesos

                +

                <%= $d->{opciones} %>

                +

                <%= $d->{promocion} %>

                +
                +
                +
                + %} +
                + diff --git a/templates/home/tst.html.ep b/templates/home/tst.html.ep new file mode 100644 index 0000000..6d1a4ab --- /dev/null +++ b/templates/home/tst.html.ep @@ -0,0 +1,4 @@ +

                <%= url_for("$controller/$action/img") %>

                +

                +%= url_for->path('/meself') +

                diff --git a/templates/home/tv.html.ep b/templates/home/tv.html.ep new file mode 100755 index 0000000..bf753d1 --- /dev/null +++ b/templates/home/tv.html.ep @@ -0,0 +1,56 @@ +
                +
                + +
                + + +
                +
                +
                +

                VUELO DE GRULLA .TV

                +

                Perseverancia es la llave

                +

                +++

                +
                +
                + + +
                +
                + +
                + +
                + +
                  + + % for my $s(@$series){ +
                • + <%= $s->{name} %> +
                • + % } + + +
                +
                + +
                  + + % for my $t(@$table){ +
                • + <%= $t->{order} %> <%= $t->{name} %> +
                • + % } + +
                + +
                + +
                + +
                +
                + diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep new file mode 100644 index 0000000..9549701 --- /dev/null +++ b/templates/layouts/default.html.ep @@ -0,0 +1,24 @@ + + + + <%= title %> + + + + <%= javascript "/ext/d3.v4.min.js"; %> + <%= stylesheet "/global/layout.css" %> + <%= stylesheet "/global/nav/cssSide.css" %> + <%= stylesheet "/global/nav/cssNav.css" %> + <%= stylesheet "/global/chaos/c.css" %> + <%foreach my $v ( @{ stash('css') } ) {%><%= stylesheet "$v";%><%}%> + + + %= include 'home/htmlNav' + %= include 'home/htmlSide' + <%= content %> + %= include 'home/htmlChaos' + <%= javascript "/global/nav/d3Side.js"; %> + <%foreach my $v ( @{ stash('js') } ) {%><%= javascript "$v";%><%}%> + + + diff --git a/templates/users/login.html.ep b/templates/users/login.html.ep new file mode 100755 index 0000000..2d7db14 --- /dev/null +++ b/templates/users/login.html.ep @@ -0,0 +1,13 @@ +
                + +